Commit 7c688cb8 authored by Javier Jardón's avatar Javier Jardón
Browse files

gdk: Use const instead G_CONST_RETURN

parent 7a328b37
......@@ -909,7 +909,7 @@ _gdk_broadway_display_open (const gchar *display_name)
}
static G_CONST_RETURN gchar *
static const gchar *
gdk_broadway_display_get_name (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
......
......@@ -52,7 +52,7 @@ _gdk_broadway_display_manager_atom_intern_static_string (GdkDisplayManager *mana
return _GDK_MAKE_ATOM (g_quark_from_static_string (atom_name));
}
static G_CONST_RETURN char *
static const char *
get_atom_name (GdkAtom atom)
{
return g_quark_to_string (GPOINTER_TO_UINT(atom));
......
......@@ -319,7 +319,7 @@ gdk_parse_args (int *argc,
*
* Since: 2.2
*/
G_CONST_RETURN gchar *
const gchar *
gdk_get_display_arg_name (void)
{
if (!_gdk_display_arg_name)
......@@ -1052,7 +1052,7 @@ gdk_threads_add_timeout_seconds (guint interval,
*
* Returns: the program class.
*/
G_CONST_RETURN char *
const char *
gdk_get_program_class (void)
{
return gdk_progclass;
......
......@@ -156,7 +156,7 @@ struct _GdkTimeCoord
GType gdk_device_get_type (void) G_GNUC_CONST;
G_CONST_RETURN gchar *gdk_device_get_name (GdkDevice *device);
const gchar * gdk_device_get_name (GdkDevice *device);
gboolean gdk_device_get_has_cursor (GdkDevice *device);
/* Functions to configure a device */
......
......@@ -1337,7 +1337,7 @@ gdk_display_get_device_manager (GdkDisplay *display)
*
* Since: 2.2
*/
G_CONST_RETURN gchar *
const gchar *
gdk_display_get_name (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
......
......@@ -44,7 +44,7 @@ G_BEGIN_DECLS
GType gdk_display_get_type (void) G_GNUC_CONST;
GdkDisplay *gdk_display_open (const gchar *display_name);
G_CONST_RETURN gchar * gdk_display_get_name (GdkDisplay *display);
const gchar * gdk_display_get_name (GdkDisplay *display);
gint gdk_display_get_n_screens (GdkDisplay *display);
GdkScreen * gdk_display_get_screen (GdkDisplay *display,
......
......@@ -119,7 +119,7 @@ struct _GdkDisplayClass
GType window_type; /* type for native windows for this display, set in class_init */
G_CONST_RETURN gchar * (*get_name) (GdkDisplay *display);
const gchar * (*get_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
......
......@@ -50,7 +50,7 @@ gboolean gdk_init_check (gint *argc,
void gdk_add_option_entries_libgtk_only (GOptionGroup *group);
void gdk_pre_parse_libgtk_only (void);
G_CONST_RETURN gchar *gdk_get_program_class (void);
const gchar * gdk_get_program_class (void);
void gdk_set_program_class (const gchar *program_class);
void gdk_notify_startup_complete (void);
......@@ -64,7 +64,7 @@ G_GNUC_WARN_UNUSED_RESULT gint gdk_error_trap_pop (void);
void gdk_error_trap_pop_ignored (void);
G_CONST_RETURN gchar *gdk_get_display_arg_name (void);
const gchar * gdk_get_display_arg_name (void);
/**
* gdk_get_display:
......
......@@ -301,7 +301,7 @@ gdk_wayland_display_finalize (GObject *object)
G_OBJECT_CLASS (_gdk_display_wayland_parent_class)->finalize (object);
}
static G_CONST_RETURN gchar *
static const gchar *
gdk_wayland_display_get_name (GdkDisplay *display)
{
return "Wayland";
......
......@@ -236,7 +236,7 @@ struct _GdkWin32DisplayClass
G_DEFINE_TYPE (GdkWin32Display, gdk_win32_display, GDK_TYPE_DISPLAY)
static G_CONST_RETURN gchar *
static const gchar *
gdk_win32_display_get_name (GdkDisplay *display)
{
HDESK hdesk = GetThreadDesktop (GetCurrentThreadId ());
......
......@@ -1502,7 +1502,7 @@ gdk_internal_connection_watch (Display *display,
}
#endif /* HAVE_X11R6 */
static G_CONST_RETURN gchar *
static const gchar *
gdk_x11_display_get_name (GdkDisplay *display)
{
return (gchar *) DisplayString (GDK_X11_DISPLAY (display)->xdisplay);
......@@ -2188,7 +2188,7 @@ gdk_x11_display_supports_input_shapes (GdkDisplay *display)
*
* Since: 2.12
*/
G_CONST_RETURN gchar *
const gchar *
gdk_x11_display_get_startup_notification_id (GdkDisplay *display)
{
return GDK_X11_DISPLAY (display)->startup_notification_id;
......
......@@ -503,7 +503,7 @@ gdk_x11_get_xatom_by_name (const gchar *atom_name)
*
* Since: 2.2
**/
G_CONST_RETURN gchar *
const gchar *
gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
Atom xatom)
{
......@@ -525,7 +525,7 @@ gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
* Return value: name of the X atom; this string is owned by GTK+,
* so it shouldn't be modifed or freed.
**/
G_CONST_RETURN gchar *
const gchar *
gdk_x11_get_xatom_name (Atom xatom)
{
return get_atom_name (gdk_x11_xatom_to_atom (xatom));
......
......@@ -60,7 +60,7 @@ Display *gdk_x11_display_get_xdisplay (GdkDisplay *display);
guint32 gdk_x11_display_get_user_time (GdkDisplay *display);
G_CONST_RETURN gchar *gdk_x11_display_get_startup_notification_id (GdkDisplay *display);
const gchar * gdk_x11_display_get_startup_notification_id (GdkDisplay *display);
void gdk_x11_display_set_startup_notification_id (GdkDisplay *display,
const gchar *startup_id);
......
......@@ -45,13 +45,13 @@ GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
Atom xatom);
Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
const gchar *atom_name);
G_CONST_RETURN gchar *gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
Atom xatom);
#ifndef GDK_MULTIHEAD_SAFE
Atom gdk_x11_atom_to_xatom (GdkAtom atom);
GdkAtom gdk_x11_xatom_to_atom (Atom xatom);
Atom gdk_x11_get_xatom_by_name (const gchar *atom_name);
G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom);
const gchar * gdk_x11_get_xatom_name (Atom xatom);
#endif
G_END_DECLS
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment