gdk: Use const instead G_CONST_RETURN

This commit is contained in:
Javier Jardón 2011-06-06 19:05:18 +01:00
parent 7a328b377c
commit 7c688cb8a6
14 changed files with 19 additions and 19 deletions

View File

@ -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);

View File

@ -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));

View File

@ -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;

View File

@ -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 */

View File

@ -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);

View File

@ -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,

View File

@ -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);

View File

@ -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:

View File

@ -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";

View File

@ -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 ());

View File

@ -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;

View File

@ -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));

View File

@ -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);

View File

@ -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