vw->UnlockLooper ();
}
-void *
-BCursor_create_default (void)
-{
- return new BCursor (B_CURSOR_ID_SYSTEM_DEFAULT);
-}
-
-void *
-BCursor_create_modeline (void)
-{
- return new BCursor (B_CURSOR_ID_CONTEXT_MENU);
-}
-
-void *
-BCursor_from_id (int cursor)
-{
- return new BCursor ((enum BCursorID) cursor);
-}
-
-void *
-BCursor_create_i_beam (void)
-{
- return new BCursor (B_CURSOR_ID_I_BEAM);
-}
-
-void *
-BCursor_create_progress_cursor (void)
+void
+be_delete_cursor (void *cursor)
{
- return new BCursor (B_CURSOR_ID_PROGRESS);
+ if (cursor)
+ delete (BCursor *) cursor;
}
void *
-BCursor_create_grab (void)
+be_create_cursor_from_id (int id)
{
- return new BCursor (B_CURSOR_ID_GRAB);
-}
-
-void
-BCursor_delete (void *cursor)
-{
- if (cursor)
- delete (BCursor *) cursor;
+ return new BCursor ((enum BCursorID) id);
}
void
BView_set_view_cursor (void *view, void *cursor)
{
- if (!((BView *) view)->LockLooper ())
+ BView *v = (BView *) view;
+
+ if (!v->LockLooper ())
gui_abort ("Failed to lock view setting cursor");
- ((BView *) view)->SetViewCursor ((BCursor *) cursor);
- ((BView *) view)->UnlockLooper ();
+ v->SetViewCursor ((BCursor *) cursor);
+ v->UnlockLooper ();
}
void
enum haiku_cursor
{
+ CURSOR_ID_SYSTEM_DEFAULT = 1,
+ CURSOR_ID_CONTEXT_MENU = 3,
+ CURSOR_ID_COPY = 4,
+ CURSOR_ID_CREATE_LINK = 29,
+ CURSOR_ID_CROSS_HAIR = 5,
+ CURSOR_ID_FOLLOW_LINK = 6,
+ CURSOR_ID_GRAB = 7,
+ CURSOR_ID_GRABBING = 8,
+ CURSOR_ID_HELP = 9,
+ CURSOR_ID_I_BEAM = 2,
+ CURSOR_ID_I_BEAM_HORIZONTAL = 10,
+ CURSOR_ID_MOVE = 11,
CURSOR_ID_NO_CURSOR = 12,
+ CURSOR_ID_NOT_ALLOWED = 13,
+ CURSOR_ID_PROGRESS = 14,
CURSOR_ID_RESIZE_NORTH = 15,
CURSOR_ID_RESIZE_EAST = 16,
CURSOR_ID_RESIZE_SOUTH = 17,
CURSOR_ID_RESIZE_NORTH_SOUTH = 23,
CURSOR_ID_RESIZE_EAST_WEST = 24,
CURSOR_ID_RESIZE_NORTH_EAST_SOUTH_WEST = 25,
- CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST = 26
+ CURSOR_ID_RESIZE_NORTH_WEST_SOUTH_EAST = 26,
+ CURSOR_ID_ZOOM_IN = 27,
+ CURSOR_ID_ZOOM_OUT = 28
};
enum haiku_z_group
extern void be_get_screen_dimensions (int *, int *);
/* Functions for creating and freeing cursors. */
-extern void *BCursor_create_default (void);
-extern void *BCursor_from_id (int);
-extern void *BCursor_create_modeline (void);
-extern void *BCursor_create_i_beam (void);
-extern void *BCursor_create_progress_cursor (void);
-extern void *BCursor_create_grab (void);
-extern void BCursor_delete (void *);
+extern void *be_create_cursor_from_id (int);
extern void *be_create_pixmap_cursor (void *, int, int);
+extern void be_delete_cursor (void *);
extern void *BScrollBar_make_for_view (void *, int, int, int, int, int, void *);
extern void BScrollBar_delete (void *);
if (output->current_cursor == *frame_cursor)
output->current_cursor = *display_cursor;
- BCursor_delete (*frame_cursor);
+ be_delete_cursor (*frame_cursor);
}
*frame_cursor = *display_cursor;
}
/* Create and set the custom cursor. */
- *frame_cursor = BCursor_from_id (n);
+ *frame_cursor = be_create_cursor_from_id (n);
}
else if (color_specified_p && cursor_bitmaps[i].bits)
{
gui_init_fringe (terminal->rif);
-#define ASSIGN_CURSOR(cursor, be_cursor) (dpyinfo->cursor = be_cursor)
- ASSIGN_CURSOR (text_cursor, BCursor_create_i_beam ());
- ASSIGN_CURSOR (nontext_cursor, BCursor_create_default ());
- ASSIGN_CURSOR (modeline_cursor, BCursor_create_modeline ());
- ASSIGN_CURSOR (hand_cursor, BCursor_create_grab ());
- ASSIGN_CURSOR (hourglass_cursor, BCursor_create_progress_cursor ());
- ASSIGN_CURSOR (horizontal_drag_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_EAST_WEST));
- ASSIGN_CURSOR (vertical_drag_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_NORTH_SOUTH));
- ASSIGN_CURSOR (left_edge_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_WEST));
- ASSIGN_CURSOR (top_left_corner_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_NORTH_WEST));
- ASSIGN_CURSOR (top_edge_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_NORTH));
- ASSIGN_CURSOR (top_right_corner_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_NORTH_EAST));
- ASSIGN_CURSOR (right_edge_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_EAST));
- ASSIGN_CURSOR (bottom_right_corner_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_SOUTH_EAST));
- ASSIGN_CURSOR (bottom_edge_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_SOUTH));
- ASSIGN_CURSOR (bottom_left_corner_cursor,
- BCursor_from_id (CURSOR_ID_RESIZE_SOUTH_WEST));
- ASSIGN_CURSOR (no_cursor,
- BCursor_from_id (CURSOR_ID_NO_CURSOR));
+#define ASSIGN_CURSOR(cursor, cursor_id) \
+ (dpyinfo->cursor = be_create_cursor_from_id (cursor_id))
+ ASSIGN_CURSOR (text_cursor, CURSOR_ID_I_BEAM);
+ ASSIGN_CURSOR (nontext_cursor, CURSOR_ID_SYSTEM_DEFAULT);
+ ASSIGN_CURSOR (modeline_cursor, CURSOR_ID_CONTEXT_MENU);
+ ASSIGN_CURSOR (hand_cursor, CURSOR_ID_GRAB);
+ ASSIGN_CURSOR (hourglass_cursor, CURSOR_ID_PROGRESS);
+ ASSIGN_CURSOR (horizontal_drag_cursor, CURSOR_ID_RESIZE_EAST_WEST);
+ ASSIGN_CURSOR (vertical_drag_cursor, CURSOR_ID_RESIZE_NORTH_SOUTH);
+ ASSIGN_CURSOR (left_edge_cursor, CURSOR_ID_RESIZE_WEST);
+ ASSIGN_CURSOR (top_left_corner_cursor, CURSOR_ID_RESIZE_NORTH_WEST);
+ ASSIGN_CURSOR (top_edge_cursor, CURSOR_ID_RESIZE_NORTH);
+ ASSIGN_CURSOR (top_right_corner_cursor, CURSOR_ID_RESIZE_NORTH_EAST);
+ ASSIGN_CURSOR (right_edge_cursor, CURSOR_ID_RESIZE_EAST);
+ ASSIGN_CURSOR (bottom_right_corner_cursor, CURSOR_ID_RESIZE_SOUTH_EAST);
+ ASSIGN_CURSOR (bottom_edge_cursor, CURSOR_ID_RESIZE_SOUTH);
+ ASSIGN_CURSOR (bottom_left_corner_cursor, CURSOR_ID_RESIZE_SOUTH_WEST);
+ ASSIGN_CURSOR (no_cursor, CURSOR_ID_NO_CURSOR);
#undef ASSIGN_CURSOR
system_name = Fsystem_name ();