mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
Wayland: Fix various compiler warnings
Mostly missing declarations, missing statics and unused functions.
This commit is contained in:
parent
24b8499833
commit
52578945bd
@ -59,6 +59,8 @@ struct _GdkWaylandAppLaunchContextClass
|
||||
GdkAppLaunchContextClass base_class;
|
||||
};
|
||||
|
||||
GType gdk_wayland_app_launch_context_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandAppLaunchContext, gdk_wayland_app_launch_context, GDK_TYPE_APP_LAUNCH_CONTEXT)
|
||||
|
||||
static void
|
||||
|
@ -66,6 +66,8 @@ struct _GdkWaylandCursorClass
|
||||
GdkCursorClass cursor_class;
|
||||
};
|
||||
|
||||
GType _gdk_wayland_cursor_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandCursor, _gdk_wayland_cursor, GDK_TYPE_CURSOR)
|
||||
|
||||
void
|
||||
|
@ -132,6 +132,8 @@ struct _GdkWaylandDeviceManagerClass
|
||||
GdkDeviceManagerClass parent_class;
|
||||
};
|
||||
|
||||
GType gdk_wayland_device_manager_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandDeviceManager,
|
||||
gdk_wayland_device_manager, GDK_TYPE_DEVICE_MANAGER)
|
||||
|
||||
|
@ -418,73 +418,10 @@ gdk_wayland_display_get_next_serial (GdkDisplay *display)
|
||||
return ++serial;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_wayland_display_broadcast_startup_message:
|
||||
* @display: a #GdkDisplay
|
||||
* @message_type: startup notification message type ("new", "change",
|
||||
* or "remove")
|
||||
* @...: a list of key/value pairs (as strings), terminated by a
|
||||
* %NULL key. (A %NULL value for a key will cause that key to be
|
||||
* skipped in the output.)
|
||||
*
|
||||
* Sends a startup notification message of type @message_type to
|
||||
* @display.
|
||||
*
|
||||
* This is a convenience function for use by code that implements the
|
||||
* freedesktop startup notification specification. Applications should
|
||||
* not normally need to call it directly. See the
|
||||
* [Startup Notification Protocol specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt)
|
||||
* for definitions of the message types and keys that can be used.
|
||||
*
|
||||
* Since: 2.12
|
||||
**/
|
||||
void
|
||||
gdk_wayland_display_broadcast_startup_message (GdkDisplay *display,
|
||||
const char *message_type,
|
||||
...)
|
||||
{
|
||||
GString *message;
|
||||
va_list ap;
|
||||
const char *key, *value, *p;
|
||||
|
||||
message = g_string_new (message_type);
|
||||
g_string_append_c (message, ':');
|
||||
|
||||
va_start (ap, message_type);
|
||||
while ((key = va_arg (ap, const char *)))
|
||||
{
|
||||
value = va_arg (ap, const char *);
|
||||
if (!value)
|
||||
continue;
|
||||
|
||||
g_string_append_printf (message, " %s=\"", key);
|
||||
for (p = value; *p; p++)
|
||||
{
|
||||
switch (*p)
|
||||
{
|
||||
case ' ':
|
||||
case '"':
|
||||
case '\\':
|
||||
g_string_append_c (message, '\\');
|
||||
break;
|
||||
}
|
||||
|
||||
g_string_append_c (message, *p);
|
||||
}
|
||||
g_string_append_c (message, '\"');
|
||||
}
|
||||
va_end (ap);
|
||||
|
||||
g_string_free (message, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_wayland_display_notify_startup_complete (GdkDisplay *display,
|
||||
const gchar *startup_id)
|
||||
{
|
||||
gdk_wayland_display_broadcast_startup_message (display, "remove",
|
||||
"ID", startup_id,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -500,7 +437,7 @@ gdk_wayland_display_event_data_free (GdkDisplay *display,
|
||||
{
|
||||
}
|
||||
|
||||
GdkKeymap *
|
||||
static GdkKeymap *
|
||||
_gdk_wayland_display_get_keymap (GdkDisplay *display)
|
||||
{
|
||||
GdkDeviceManager *device_manager;
|
||||
@ -764,7 +701,7 @@ static const struct wl_buffer_listener buffer_listener = {
|
||||
buffer_release_callback
|
||||
};
|
||||
|
||||
struct wl_shm_pool *
|
||||
static struct wl_shm_pool *
|
||||
create_shm_pool (struct wl_shm *shm,
|
||||
int width,
|
||||
int height,
|
||||
|
@ -56,6 +56,8 @@ struct _GdkWaylandDragContextClass
|
||||
|
||||
static GList *contexts;
|
||||
|
||||
GType gdk_wayland_drag_context_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandDragContext, gdk_wayland_drag_context, GDK_TYPE_DRAG_CONTEXT)
|
||||
|
||||
static void
|
||||
|
@ -64,6 +64,8 @@ struct _GdkWaylandKeymapClass
|
||||
#define GDK_WAYLAND_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_KEYMAP, GdkWaylandKeymap))
|
||||
#define GDK_IS_WAYLAND_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_KEYMAP))
|
||||
|
||||
GType _gdk_wayland_keymap_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandKeymap, _gdk_wayland_keymap, GDK_TYPE_KEYMAP)
|
||||
|
||||
static void
|
||||
|
@ -98,6 +98,8 @@ struct _GdkWaylandMonitor
|
||||
gint scale;
|
||||
};
|
||||
|
||||
GType _gdk_wayland_screen_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandScreen, _gdk_wayland_screen, GDK_TYPE_SCREEN)
|
||||
|
||||
static void
|
||||
@ -805,6 +807,8 @@ struct _GdkWaylandVisualClass
|
||||
GdkVisualClass parent_class;
|
||||
};
|
||||
|
||||
GType _gdk_wayland_visual_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWaylandVisual, _gdk_wayland_visual, GDK_TYPE_VISUAL)
|
||||
|
||||
static void
|
||||
|
@ -346,7 +346,7 @@ gdk_wayland_selection_get_targets (void)
|
||||
return selection->targets;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gdk_wayland_selection_emit_request (GdkWindow *window,
|
||||
GdkAtom selection,
|
||||
GdkAtom target)
|
||||
@ -366,7 +366,7 @@ gdk_wayland_selection_emit_request (GdkWindow *window,
|
||||
gdk_event_free (event);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
gdk_wayland_selection_check_write (GdkWaylandSelection *selection)
|
||||
{
|
||||
gssize len, bytes_written = 0;
|
||||
|
@ -135,6 +135,8 @@ static void gdk_wayland_window_configure (GdkWindow *window,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
GType _gdk_window_impl_wayland_get_type (void);
|
||||
|
||||
G_DEFINE_TYPE (GdkWindowImplWayland, _gdk_window_impl_wayland, GDK_TYPE_WINDOW_IMPL)
|
||||
|
||||
static void
|
||||
@ -1484,7 +1486,7 @@ gdk_wayland_window_get_type_hint (GdkWindow *window)
|
||||
return impl->hint;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gdk_wayland_window_set_modal_hint (GdkWindow *window,
|
||||
gboolean modal)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user