gdk_cursor_new_from_pixbuf
gdk_cursor_new_from_surface
gdk_cursor_new_from_name
-gdk_cursor_new_for_display
gdk_cursor_get_display
gdk_cursor_get_image
gdk_cursor_get_surface
-gdk_cursor_get_cursor_type
<SUBSECTION Standard>
GDK_TYPE_CURSOR_TYPE
display_class->store_clipboard = gdk_broadway_display_store_clipboard;
display_class->supports_shapes = gdk_broadway_display_supports_shapes;
display_class->supports_input_shapes = gdk_broadway_display_supports_input_shapes;
- display_class->get_cursor_for_type = _gdk_broadway_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_broadway_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_broadway_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_broadway_display_get_default_cursor_size;
{
}
-/**
- * gdk_cursor_get_cursor_type:
- * @cursor: a #GdkCursor
- *
- * Returns the cursor type for this cursor.
- *
- * Returns: a #GdkCursorType
- *
- * Since: 2.22
- **/
-GdkCursorType
-gdk_cursor_get_cursor_type (GdkCursor *cursor)
-{
- g_return_val_if_fail (cursor != NULL, GDK_BLANK_CURSOR);
-
- return cursor->type;
-}
-
-/**
- * gdk_cursor_new_for_display:
- * @display: the #GdkDisplay for which the cursor will be created
- * @cursor_type: cursor to create
- *
- * Creates a new cursor from the set of builtin cursors.
- *
- * Returns: a new #GdkCursor
- *
- * Since: 2.2
- **/
-GdkCursor*
-gdk_cursor_new_for_display (GdkDisplay *display,
- GdkCursorType cursor_type)
-{
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
-
- return GDK_DISPLAY_GET_CLASS (display)->get_cursor_for_type (display, cursor_type);
-}
-
/**
* gdk_cursor_new_from_name:
* @display: the #GdkDisplay for which the cursor will be created
GDK_AVAILABLE_IN_ALL
GType gdk_cursor_get_type (void) G_GNUC_CONST;
-GDK_AVAILABLE_IN_ALL
-GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
- GdkCursorType cursor_type);
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,
cairo_surface_t *gdk_cursor_get_surface (GdkCursor *cursor,
gdouble *x_hot,
gdouble *y_hot);
-GDK_AVAILABLE_IN_ALL
-GdkCursorType gdk_cursor_get_cursor_type (GdkCursor *cursor);
G_END_DECLS
void (*get_maximal_cursor_size) (GdkDisplay *display,
guint *width,
guint *height);
- GdkCursor * (*get_cursor_for_type) (GdkDisplay *display,
- GdkCursorType type);
GdkCursor * (*get_cursor_for_name) (GdkDisplay *display,
const gchar *name);
GdkCursor * (*get_cursor_for_surface) (GdkDisplay *display,
display_class->store_clipboard = gdk_quartz_display_store_clipboard;
display_class->supports_shapes = gdk_quartz_display_supports_shapes;
display_class->supports_input_shapes = gdk_quartz_display_supports_input_shapes;
- display_class->get_cursor_for_type = _gdk_quartz_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_quartz_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_quartz_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_quartz_display_get_default_cursor_size;
display_class->get_app_launch_context = _gdk_wayland_display_get_app_launch_context;
display_class->get_default_cursor_size = _gdk_wayland_display_get_default_cursor_size;
display_class->get_maximal_cursor_size = _gdk_wayland_display_get_maximal_cursor_size;
- display_class->get_cursor_for_type = _gdk_wayland_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_wayland_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_wayland_display_get_cursor_for_surface;
display_class->supports_cursor_alpha = _gdk_wayland_display_supports_cursor_alpha;
display_class->supports_input_shapes = gdk_win32_display_supports_input_shapes;
//? display_class->get_app_launch_context = _gdk_win32_display_get_app_launch_context;
- display_class->get_cursor_for_type = _gdk_win32_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_win32_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_win32_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_win32_display_get_default_cursor_size;
return cursor;
}
-GdkCursor*
-_gdk_x11_display_get_cursor_for_type (GdkDisplay *display,
- GdkCursorType cursor_type)
-{
- GdkX11Cursor *private;
- Cursor xcursor;
-
- if (gdk_display_is_closed (display))
- {
- xcursor = None;
- }
- else
- {
- private = find_in_cache (display, cursor_type, NULL);
-
- if (private)
- {
- /* Cache had it, add a ref for this user */
- g_object_ref (private);
-
- return (GdkCursor*) private;
- }
- else
- {
- if (cursor_type != GDK_BLANK_CURSOR)
- xcursor = XCreateFontCursor (GDK_DISPLAY_XDISPLAY (display),
- cursor_type);
- else
- xcursor = get_blank_cursor (display);
- }
- }
-
- private = g_object_new (GDK_TYPE_X11_CURSOR,
- "cursor-type", cursor_type,
- "display", display,
- NULL);
- private->xcursor = xcursor;
- private->name = NULL;
- private->serial = theme_serial;
-
- if (xcursor != None)
- add_to_cache (private);
-
- return GDK_CURSOR (private);
-}
-
/**
* gdk_x11_cursor_get_xdisplay:
* @cursor: (type GdkX11Cursor): a #GdkCursor.
{
xcursor = None;
}
+ else if (strcmp (name, "none") == 0)
+ {
+ xcursor = get_blank_cursor (display);
+ }
else
{
- if (strcmp (name, "none") == 0)
- return _gdk_x11_display_get_cursor_for_type (display, GDK_BLANK_CURSOR);
-
private = find_in_cache (display, GDK_CURSOR_IS_PIXMAP, name);
if (private)
display_class->supports_shapes = gdk_x11_display_supports_shapes;
display_class->supports_input_shapes = gdk_x11_display_supports_input_shapes;
display_class->get_app_launch_context = _gdk_x11_display_get_app_launch_context;
- display_class->get_cursor_for_type = _gdk_x11_display_get_cursor_for_type;
display_class->get_cursor_for_name = _gdk_x11_display_get_cursor_for_name;
display_class->get_cursor_for_surface = _gdk_x11_display_get_cursor_for_surface;
display_class->get_default_cursor_size = _gdk_x11_display_get_default_cursor_size;
gchar * _gdk_x11_display_manager_get_atom_name (GdkDisplayManager *manager,
GdkAtom atom);
-GdkCursor *_gdk_x11_display_get_cursor_for_type (GdkDisplay *display,
- GdkCursorType type);
GdkCursor *_gdk_x11_display_get_cursor_for_name (GdkDisplay *display,
const gchar *name);
GdkCursor *_gdk_x11_display_get_cursor_for_surface (GdkDisplay *display,