mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Implement atom-related vfuncs for quartz
This commit is contained in:
parent
51f149df5e
commit
6eb2a3520c
@ -100,6 +100,8 @@ gdk_display_manager_quartz_class_init (GdkDisplayManagerQuartzClass *class)
|
||||
manager_class->list_displays = gdk_display_manager_quartz_list_displays;
|
||||
manager_class->set_default_display = gdk_display_manager_quartz_set_default_display;
|
||||
manager_class->get_default_display = gdk_display_manager_quartz_get_default_display;
|
||||
manager_class->atom_intern = _gdk_quartz_display_manager_atom_intern;
|
||||
manager_class->get_atom_name = _gdk_quartz_display_manager_get_atom_name;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -236,5 +236,11 @@ gboolean _gdk_quartz_screen_get_setting (GdkScreen *screen,
|
||||
|
||||
void _gdk_quartz_device_check_extension_events (GdkDevice *device);
|
||||
|
||||
GdkAtom _gdk_quartz_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
const gchar *atom_name,
|
||||
gboolean copy_name);
|
||||
gchar * _gdk_quartz_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom);
|
||||
|
||||
|
||||
#endif /* __GDK_PRIVATE_QUARTZ_H__ */
|
||||
|
@ -151,27 +151,22 @@ intern_atom_internal (const gchar *atom_name, gboolean allocate)
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gdk_atom_intern (const gchar *atom_name,
|
||||
gboolean only_if_exists)
|
||||
_gdk_quartz_display_manager_atom_intern (GdkDisplayManager *manager,
|
||||
const gchar *atom_name,
|
||||
gboolean copy_name)
|
||||
{
|
||||
return intern_atom_internal (atom_name, TRUE);
|
||||
return intern_atom_internal (atom_name, copy_name);
|
||||
}
|
||||
|
||||
GdkAtom
|
||||
gdk_atom_intern_static_string (const gchar *atom_name)
|
||||
{
|
||||
return intern_atom_internal (atom_name, FALSE);
|
||||
}
|
||||
|
||||
|
||||
gchar *
|
||||
gdk_atom_name (GdkAtom atom)
|
||||
_gdk_quartz_display_manager_get_atom_name (GdkDisplayManager *manager,
|
||||
GdkAtom atom)
|
||||
{
|
||||
ensure_atom_tables ();
|
||||
|
||||
|
||||
if (GPOINTER_TO_INT (atom) >= atoms_to_names->len)
|
||||
return NULL;
|
||||
|
||||
|
||||
return g_strdup (g_ptr_array_index (atoms_to_names, GPOINTER_TO_INT (atom)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user