[gtk+/gtk-2-24] gdk: Use 'const' instead deprecated G_CONST_RETURN
- From: Javier JardÃn <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] gdk: Use 'const' instead deprecated G_CONST_RETURN
- Date: Wed, 15 Jun 2011 13:47:52 +0000 (UTC)
commit 8d5d9e68edd8d3472a487d5bdf98a15cddcada89
Author: Javier JardÃn <jjardon gnome org>
Date: Wed Jun 15 14:45:58 2011 +0100
gdk: Use 'const' instead deprecated G_CONST_RETURN
gdk/gdk.c | 4 ++--
gdk/gdk.h | 4 ++--
gdk/gdkdisplay.h | 4 ++--
gdk/gdkinput.h | 2 +-
gdk/quartz/gdkdisplay-quartz.c | 2 +-
gdk/quartz/gdkinput.c | 2 +-
gdk/win32/gdkdisplay-win32.c | 2 +-
gdk/win32/gdkinput.c | 2 +-
gdk/x11/gdkdisplay-x11.c | 4 ++--
gdk/x11/gdkfont-x11.c | 2 +-
gdk/x11/gdkproperty-x11.c | 6 +++---
gdk/x11/gdkx.h | 8 ++++----
12 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index 8686a18..0106d8a 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -284,7 +284,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)
@@ -798,7 +798,7 @@ gdk_threads_add_timeout_seconds (guint interval,
}
-G_CONST_RETURN char *
+const char *
gdk_get_program_class (void)
{
return gdk_progclass;
diff --git a/gdk/gdk.h b/gdk/gdk.h
index 1db77ec..3f0b1ac 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -80,7 +80,7 @@ void gdk_exit (gint error_code);
gchar* gdk_set_locale (void);
#endif /* GDK_DISABLE_DEPRECATED */
-G_CONST_RETURN char *gdk_get_program_class (void);
+const char * gdk_get_program_class (void);
void gdk_set_program_class (const char *program_class);
/* Push and pop error handlers for X errors
@@ -94,7 +94,7 @@ gboolean gdk_get_use_xshm (void);
#endif /* GDK_DISABLE_DEPRECATED */
gchar* gdk_get_display (void);
-G_CONST_RETURN gchar* gdk_get_display_arg_name (void);
+const gchar* gdk_get_display_arg_name (void);
#ifndef GDK_DISABLE_DEPRECATED
gint gdk_input_add_full (gint source,
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index aee4b1b..2702758 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -109,7 +109,7 @@ struct _GdkDisplayClass
{
GObjectClass parent_class;
- G_CONST_RETURN gchar * (*get_display_name) (GdkDisplay *display);
+ const gchar * (*get_display_name) (GdkDisplay *display);
gint (*get_n_screens) (GdkDisplay *display);
GdkScreen * (*get_screen) (GdkDisplay *display,
gint screen_num);
@@ -141,7 +141,7 @@ struct _GdkDisplayPointerHooks
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,
diff --git a/gdk/gdkinput.h b/gdk/gdkinput.h
index 3799d5d..aeeeccc 100644
--- a/gdk/gdkinput.h
+++ b/gdk/gdkinput.h
@@ -130,7 +130,7 @@ GType gdk_device_get_type (void) G_GNUC_CONST;
GList * gdk_devices_list (void);
#endif /* GDK_MULTIHEAD_SAFE */
-G_CONST_RETURN gchar *gdk_device_get_name (GdkDevice *device);
+const gchar * gdk_device_get_name (GdkDevice *device);
GdkInputSource gdk_device_get_source (GdkDevice *device);
GdkInputMode gdk_device_get_mode (GdkDevice *device);
gboolean gdk_device_get_has_cursor (GdkDevice *device);
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index 5de6519..6884d00 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -71,7 +71,7 @@ gdk_display_open (const gchar *display_name)
return _gdk_display;
}
-G_CONST_RETURN gchar *
+const gchar *
gdk_display_get_name (GdkDisplay *display)
{
static gchar *display_name = NULL;
diff --git a/gdk/quartz/gdkinput.c b/gdk/quartz/gdkinput.c
index fe256d1..0fc9f72 100644
--- a/gdk/quartz/gdkinput.c
+++ b/gdk/quartz/gdkinput.c
@@ -116,7 +116,7 @@ gdk_display_list_devices (GdkDisplay *dpy)
return _gdk_input_devices;
}
-G_CONST_RETURN gchar *
+const gchar *
gdk_device_get_name (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index f640be2..6f48a2f 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -223,7 +223,7 @@ gdk_display_open (const gchar *display_name)
return _gdk_display;
}
-G_CONST_RETURN gchar *
+const gchar *
gdk_display_get_name (GdkDisplay *display)
{
HDESK hdesk = GetThreadDesktop (GetCurrentThreadId ());
diff --git a/gdk/win32/gdkinput.c b/gdk/win32/gdkinput.c
index 143f375..2612afb 100644
--- a/gdk/win32/gdkinput.c
+++ b/gdk/win32/gdkinput.c
@@ -109,7 +109,7 @@ gdk_display_list_devices (GdkDisplay *dpy)
return _gdk_input_devices;
}
-G_CONST_RETURN gchar *
+const gchar *
gdk_device_get_name (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 47284f2..2bbcb35 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -502,7 +502,7 @@ gdk_internal_connection_watch (Display *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);
@@ -1450,7 +1450,7 @@ gdk_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_DISPLAY_X11 (display)->startup_notification_id;
diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c
index e47df1f..18debd6 100644
--- a/gdk/x11/gdkfont-x11.c
+++ b/gdk/x11/gdkfont-x11.c
@@ -832,7 +832,7 @@ gdk_x11_font_get_xfont (GdkFont *font)
* Return value: the name of the font. This string is owned
* by GDK and must not be modified or freed.
**/
-G_CONST_RETURN char *
+const char *
gdk_x11_font_get_name (GdkFont *font)
{
GdkFontPrivateX *private = (GdkFontPrivateX *)font;
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index 1cf54f9..fa676fd 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -425,7 +425,7 @@ gdk_atom_intern_static_string (const gchar *atom_name)
return intern_atom (atom_name, FALSE);
}
-static G_CONST_RETURN char *
+static const char *
get_atom_name (GdkAtom atom)
{
virtual_atom_check_init ();
@@ -496,7 +496,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)
{
@@ -518,7 +518,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));
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index c8debba..8d6e74b 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -148,7 +148,7 @@ gpointer gdk_xid_table_lookup_for_display (GdkDisplay *display,
guint32 gdk_x11_get_server_time (GdkWindow *window);
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_cursor_theme (GdkDisplay *display,
const gchar *theme,
@@ -184,13 +184,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
void gdk_x11_display_grab (GdkDisplay *display);
@@ -211,7 +211,7 @@ gpointer gdk_x11_font_get_xfont (GdkFont *font);
#ifndef GDK_DISABLE_DEPRECATED
Display * gdk_x11_font_get_xdisplay (GdkFont *font);
-G_CONST_RETURN char *gdk_x11_font_get_name (GdkFont *font);
+const char * gdk_x11_font_get_name (GdkFont *font);
#define GDK_FONT_XDISPLAY(font) (gdk_x11_font_get_xdisplay (font))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]