mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Add private api for setting cursor theme
This is implemented in multiple gdk backends, and we can avoid and ugly ifdef cascade in gtk by adding a vfunc for this.
This commit is contained in:
parent
2d591cde78
commit
c2f6208ce5
@ -45,5 +45,8 @@ void gdk_display_set_double_click_time (GdkDisplay *display,
|
||||
guint msec);
|
||||
void gdk_display_set_double_click_distance (GdkDisplay *display,
|
||||
guint distance);
|
||||
void gdk_display_set_cursor_theme (GdkDisplay *display,
|
||||
const char *theme,
|
||||
int size);
|
||||
|
||||
#endif /* __GDK__PRIVATE_H__ */
|
||||
|
@ -2038,3 +2038,12 @@ gdk_display_set_double_click_distance (GdkDisplay *display,
|
||||
{
|
||||
display->double_click_distance = distance;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_display_set_cursor_theme (GdkDisplay *display,
|
||||
const char *name,
|
||||
int size)
|
||||
{
|
||||
if (GDK_DISPLAY_GET_CLASS (display)->set_cursor_theme)
|
||||
GDK_DISPLAY_GET_CLASS (display)->set_cursor_theme (display, name, size);
|
||||
}
|
||||
|
@ -220,6 +220,9 @@ struct _GdkDisplayClass
|
||||
const char *name,
|
||||
GValue *value);
|
||||
guint32 (*get_last_seen_time) (GdkDisplay *display);
|
||||
void (*set_cursor_theme) (GdkDisplay *display,
|
||||
const char *name,
|
||||
int size);
|
||||
|
||||
/* Signals */
|
||||
void (*opened) (GdkDisplay *display);
|
||||
|
@ -1041,6 +1041,7 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
|
||||
display_class->get_monitor = gdk_wayland_display_get_monitor;
|
||||
display_class->get_monitor_at_window = gdk_wayland_display_get_monitor_at_window;
|
||||
display_class->get_setting = gdk_wayland_display_get_setting;
|
||||
display_class->set_cursor_theme = gdk_wayland_display_set_cursor_theme;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1273,6 +1273,7 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
|
||||
|
||||
display_class->get_setting = gdk_win32_display_get_setting;
|
||||
display_class->get_last_seen_time = gdk_win32_display_get_last_seen_time;
|
||||
display_class->set_cursor_theme = gdk_win32_display_set_cursor_theme;
|
||||
|
||||
_gdk_win32_windowing_init ();
|
||||
}
|
||||
|
@ -3222,6 +3222,7 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
|
||||
display_class->get_primary_monitor = gdk_x11_display_get_primary_monitor;
|
||||
display_class->get_setting = gdk_x11_display_get_setting;
|
||||
display_class->get_last_seen_time = gdk_x11_display_get_last_seen_time;
|
||||
display_class->set_cursor_theme = gdk_x11_display_set_cursor_theme;
|
||||
|
||||
_gdk_x11_windowing_init ();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user