[gtk+] wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
- Date: Tue, 17 Apr 2012 13:16:11 +0000 (UTC)
commit fc58ff1e6a80484e7deaa67baefe5345765dc3b6
Author: Rob Bradford <rob linux intel com>
Date: Mon Apr 16 16:55:43 2012 +0100
wayland: Rename GdkDisplayWayland to GdkWaylandDisplay
This makes it consistent with the functions in the vtable and also consistent
with other backends.
gdk/wayland/gdkcursor-wayland.c | 6 ++--
gdk/wayland/gdkdevice-wayland.c | 12 ++++----
gdk/wayland/gdkdisplay-wayland.c | 50 +++++++++++++++++++-------------------
gdk/wayland/gdkdisplay-wayland.h | 28 ++++++++++----------
gdk/wayland/gdkeventsource.c | 12 ++++----
gdk/wayland/gdkwindow-wayland.c | 14 +++++-----
6 files changed, 61 insertions(+), 61 deletions(-)
---
diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
index 9b02b43..1794993 100644
--- a/gdk/wayland/gdkcursor-wayland.c
+++ b/gdk/wayland/gdkcursor-wayland.c
@@ -163,7 +163,7 @@ set_pixbuf (GdkWaylandCursor *cursor, GdkPixbuf *pixbuf)
}
static GdkCursor *
-create_cursor(GdkDisplayWayland *display, GdkPixbuf *pixbuf, int x, int y)
+create_cursor(GdkWaylandDisplay *display, GdkPixbuf *pixbuf, int x, int y)
{
GdkWaylandCursor *cursor;
int stride, fd;
@@ -251,7 +251,7 @@ GdkCursor *
_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
GdkCursorType cursor_type)
{
- GdkDisplayWayland *wayland_display;
+ GdkWaylandDisplay *wayland_display;
GdkPixbuf *pixbuf = NULL;
GError *error = NULL;
int i;
@@ -269,7 +269,7 @@ _gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
i = 0;
}
- wayland_display = GDK_DISPLAY_WAYLAND (display);
+ wayland_display = GDK_WAYLAND_DISPLAY (display);
if (!wayland_display->cursors)
wayland_display->cursors =
g_new0 (GdkCursor *, G_N_ELEMENTS(cursor_definitions));
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index dcd92a2..b7f39ee 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -350,7 +350,7 @@ input_handle_motion(void *data, struct wl_input_device *input_device,
int32_t x, int32_t y, int32_t sx, int32_t sy)
{
GdkWaylandDevice *device = data;
- GdkDisplayWayland *display = GDK_DISPLAY_WAYLAND (device->display);
+ GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
GdkEvent *event;
event = gdk_event_new (GDK_NOTHING);
@@ -386,7 +386,7 @@ input_handle_button(void *data, struct wl_input_device *input_device,
uint32_t time, uint32_t button, uint32_t state)
{
GdkWaylandDevice *device = data;
- GdkDisplayWayland *display = GDK_DISPLAY_WAYLAND (device->display);
+ GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
GdkEvent *event;
uint32_t modifier;
int gdk_button;
@@ -911,14 +911,14 @@ _gdk_wayland_device_manager_add_device (GdkDeviceManager *device_manager,
struct wl_input_device *wl_device)
{
GdkDisplay *display;
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
GdkDeviceManagerCore *device_manager_core =
GDK_DEVICE_MANAGER_CORE(device_manager);
GdkWaylandDevice *device;
device = g_new0 (GdkWaylandDevice, 1);
display = gdk_device_manager_get_display (device_manager);
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
device->display = display;
device->pointer = g_object_new (GDK_TYPE_DEVICE_CORE,
@@ -1258,7 +1258,7 @@ gdk_wayland_device_offer_selection_content (GdkDevice
gpointer userdata)
{
GdkDisplay *display;
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
GdkWaylandSelectionOffer *offer;
GdkWaylandDevice *device;
gint i;
@@ -1267,7 +1267,7 @@ gdk_wayland_device_offer_selection_content (GdkDevice
device = GDK_DEVICE_CORE (gdk_device)->device;
display = device->display;
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
offer = g_new0 (GdkWaylandSelectionOffer, 1);
offer->cb = cb;
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 1d81395..479db8b 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -38,17 +38,17 @@
#include "gdkkeysprivate.h"
#include "gdkprivate-wayland.h"
-G_DEFINE_TYPE (GdkDisplayWayland, _gdk_display_wayland, GDK_TYPE_DISPLAY)
+G_DEFINE_TYPE (GdkWaylandDisplay, _gdk_wayland_display, GDK_TYPE_DISPLAY)
static void
gdk_input_init (GdkDisplay *display)
{
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
GdkDeviceManager *device_manager;
GdkDevice *device;
GList *list, *l;
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
device_manager = gdk_display_get_device_manager (display);
/* For backwards compatibility, just add
@@ -120,7 +120,7 @@ static void
gdk_display_handle_global(struct wl_display *display, uint32_t id,
const char *interface, uint32_t version, void *data)
{
- GdkDisplayWayland *display_wayland = data;
+ GdkWaylandDisplay *display_wayland = data;
GdkDisplay *gdk_display = GDK_DISPLAY_OBJECT (data);
struct wl_input_device *input;
@@ -151,15 +151,15 @@ gdk_display_handle_global(struct wl_display *display, uint32_t id,
static gboolean
gdk_display_init_egl(GdkDisplay *display)
{
- GdkDisplayWayland *display_wayland = GDK_DISPLAY_WAYLAND (display);
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
EGLint major, minor, i;
void *p;
static const struct { const char *f; unsigned int offset; }
extension_functions[] = {
- { "glEGLImageTargetTexture2DOES", offsetof(GdkDisplayWayland, image_target_texture_2d) },
- { "eglCreateImageKHR", offsetof(GdkDisplayWayland, create_image) },
- { "eglDestroyImageKHR", offsetof(GdkDisplayWayland, destroy_image) }
+ { "glEGLImageTargetTexture2DOES", offsetof(GdkWaylandDisplay, image_target_texture_2d) },
+ { "eglCreateImageKHR", offsetof(GdkWaylandDisplay, create_image) },
+ { "eglDestroyImageKHR", offsetof(GdkWaylandDisplay, destroy_image) }
};
display_wayland->egl_display =
@@ -210,14 +210,14 @@ _gdk_wayland_display_open (const gchar *display_name)
{
struct wl_display *wl_display;
GdkDisplay *display;
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
wl_display = wl_display_connect(display_name);
if (!wl_display)
return NULL;
- display = g_object_new (GDK_TYPE_DISPLAY_WAYLAND, NULL);
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display = g_object_new (GDK_TYPE_WAYLAND_DISPLAY, NULL);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
display_wayland->wl_display = wl_display;
@@ -250,7 +250,7 @@ _gdk_wayland_display_open (const gchar *display_name)
static void
gdk_wayland_display_dispose (GObject *object)
{
- GdkDisplayWayland *display_wayland = GDK_DISPLAY_WAYLAND (object);
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (object);
_gdk_wayland_display_manager_remove_display (gdk_display_manager_get (),
GDK_DISPLAY (display_wayland));
@@ -270,13 +270,13 @@ gdk_wayland_display_dispose (GObject *object)
eglTerminate(display_wayland->egl_display);
#endif
- G_OBJECT_CLASS (_gdk_display_wayland_parent_class)->dispose (object);
+ G_OBJECT_CLASS (_gdk_wayland_display_parent_class)->dispose (object);
}
static void
gdk_wayland_display_finalize (GObject *object)
{
- GdkDisplayWayland *display_wayland = GDK_DISPLAY_WAYLAND (object);
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (object);
/* Keymap */
if (display_wayland->keymap)
@@ -289,7 +289,7 @@ gdk_wayland_display_finalize (GObject *object)
g_free (display_wayland->startup_notification_id);
- G_OBJECT_CLASS (_gdk_display_wayland_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_gdk_wayland_display_parent_class)->finalize (object);
}
static const gchar *
@@ -311,7 +311,7 @@ gdk_wayland_display_get_screen (GdkDisplay *display,
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
- return GDK_DISPLAY_WAYLAND (display)->screen;
+ return GDK_WAYLAND_DISPLAY (display)->screen;
}
static GdkScreen *
@@ -319,7 +319,7 @@ gdk_wayland_display_get_default_screen (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return GDK_DISPLAY_WAYLAND (display)->screen;
+ return GDK_WAYLAND_DISPLAY (display)->screen;
}
static void
@@ -331,11 +331,11 @@ gdk_wayland_display_beep (GdkDisplay *display)
static void
gdk_wayland_display_sync (GdkDisplay *display)
{
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
g_return_if_fail (GDK_IS_DISPLAY (display));
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
wl_display_roundtrip(display_wayland->wl_display);
}
@@ -347,7 +347,7 @@ gdk_wayland_display_flush (GdkDisplay *display)
if (!display->closed)
_gdk_wayland_display_flush (display,
- GDK_DISPLAY_WAYLAND (display)->event_source);
+ GDK_WAYLAND_DISPLAY (display)->event_source);
}
static gboolean
@@ -417,7 +417,7 @@ gdk_wayland_display_list_devices (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- return GDK_DISPLAY_WAYLAND (display)->input_devices;
+ return GDK_WAYLAND_DISPLAY (display)->input_devices;
}
static void
@@ -531,10 +531,10 @@ gdk_wayland_display_event_data_free (GdkDisplay *display,
static GdkKeymap *
gdk_wayland_display_get_keymap (GdkDisplay *display)
{
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
if (!display_wayland->keymap)
display_wayland->keymap = _gdk_wayland_keymap_new (display);
@@ -555,7 +555,7 @@ gdk_wayland_display_pop_error_trap (GdkDisplay *display,
}
static void
-_gdk_display_wayland_class_init (GdkDisplayWaylandClass * class)
+_gdk_wayland_display_class_init (GdkWaylandDisplayClass * class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
GdkDisplayClass *display_class = GDK_DISPLAY_CLASS (class);
@@ -610,7 +610,7 @@ _gdk_display_wayland_class_init (GdkDisplayWaylandClass * class)
}
static void
-_gdk_display_wayland_init (GdkDisplayWayland *display)
+_gdk_wayland_display_init (GdkWaylandDisplay *display)
{
_gdk_wayland_display_manager_add_display (gdk_display_manager_get (),
GDK_DISPLAY (display));
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index ae456bc..3c8866a 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -19,8 +19,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GDK_DISPLAY_WAYLAND__
-#define __GDK_DISPLAY_WAYLAND__
+#ifndef __GDK_WAYLAND_DISPLAY__
+#define __GDK_WAYLAND_DISPLAY__
#include <config.h>
#include <stdint.h>
@@ -45,17 +45,17 @@
G_BEGIN_DECLS
-typedef struct _GdkDisplayWayland GdkDisplayWayland;
-typedef struct _GdkDisplayWaylandClass GdkDisplayWaylandClass;
+typedef struct _GdkWaylandDisplay GdkWaylandDisplay;
+typedef struct _GdkWaylandDisplayClass GdkWaylandDisplayClass;
-#define GDK_TYPE_DISPLAY_WAYLAND (_gdk_display_wayland_get_type())
-#define GDK_DISPLAY_WAYLAND(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWayland))
-#define GDK_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWaylandClass))
-#define GDK_IS_DISPLAY_WAYLAND(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_DISPLAY_WAYLAND))
-#define GDK_IS_DISPLAY_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_DISPLAY_WAYLAND))
-#define GDK_DISPLAY_WAYLAND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_DISPLAY_WAYLAND, GdkDisplayWaylandClass))
+#define GDK_TYPE_WAYLAND_DISPLAY (_gdk_wayland_display_get_type())
+#define GDK_WAYLAND_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplay))
+#define GDK_WAYLAND_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplayClass))
+#define GDK_IS_WAYLAND_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WAYLAND_DISPLAY))
+#define GDK_IS_WAYLAND_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WAYLAND_DISPLAY))
+#define GDK_WAYLAND_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WAYLAND_DISPLAY, GdkWaylandDisplayClass))
-struct _GdkDisplayWayland
+struct _GdkWaylandDisplay
{
GdkDisplay parent_instance;
GdkScreen *screen;
@@ -97,13 +97,13 @@ struct _GdkDisplayWayland
#endif
};
-struct _GdkDisplayWaylandClass
+struct _GdkWaylandDisplayClass
{
GdkDisplayClass parent_class;
};
-GType _gdk_display_wayland_get_type (void);
+GType _gdk_wayland_display_get_type (void);
G_END_DECLS
-#endif /* __GDK_DISPLAY_WAYLAND__ */
+#endif /* __GDK_WAYLAND_DISPLAY__ */
diff --git a/gdk/wayland/gdkeventsource.c b/gdk/wayland/gdkeventsource.c
index 7a6c704..badbaaa 100644
--- a/gdk/wayland/gdkeventsource.c
+++ b/gdk/wayland/gdkeventsource.c
@@ -33,7 +33,7 @@ static gboolean
gdk_event_source_prepare(GSource *base, gint *timeout)
{
GdkWaylandEventSource *source = (GdkWaylandEventSource *) base;
- GdkDisplayWayland *display = (GdkDisplayWayland *) source->display;
+ GdkWaylandDisplay *display = (GdkWaylandDisplay *) source->display;
*timeout = -1;
@@ -122,7 +122,7 @@ _gdk_wayland_display_event_source_new (GdkDisplay *display)
{
GSource *source;
GdkWaylandEventSource *wl_source;
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
char *name;
source = g_source_new (&wl_glib_source_funcs,
@@ -132,7 +132,7 @@ _gdk_wayland_display_event_source_new (GdkDisplay *display)
g_free (name);
wl_source = (GdkWaylandEventSource *) source;
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
wl_source->display = display;
wl_source->pfd.fd = wl_display_get_fd(display_wayland->wl_display,
gdk_event_source_update, source);
@@ -154,17 +154,17 @@ _gdk_wayland_display_flush (GdkDisplay *display, GSource *source)
GdkWaylandEventSource *wayland_source = (GdkWaylandEventSource *) source;
while (wayland_source->mask & WL_DISPLAY_WRITABLE)
- wl_display_iterate(GDK_DISPLAY_WAYLAND (display)->wl_display,
+ wl_display_iterate(GDK_WAYLAND_DISPLAY (display)->wl_display,
WL_DISPLAY_WRITABLE);
}
void
_gdk_wayland_display_queue_events (GdkDisplay *display)
{
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
GdkWaylandEventSource *source;
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
source = (GdkWaylandEventSource *) display_wayland->event_source;
if (source->pfd.revents)
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 4ec77ff..a8c59b5 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -310,7 +310,7 @@ typedef struct _GdkWaylandCairoSurfaceData {
size_t buf_length;
#endif
struct wl_buffer *buffer;
- GdkDisplayWayland *display;
+ GdkWaylandDisplay *display;
int32_t width, height;
} GdkWaylandCairoSurfaceData;
@@ -388,7 +388,7 @@ gdk_wayland_cairo_surface_destroy (void *p)
}
static cairo_surface_t *
-gdk_wayland_create_cairo_surface (GdkDisplayWayland *display,
+gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
int width, int height)
{
GdkWaylandCairoSurfaceData *data;
@@ -486,7 +486,7 @@ gdk_wayland_cairo_surface_destroy (void *p)
}
static cairo_surface_t *
-gdk_wayland_create_cairo_surface (GdkDisplayWayland *display,
+gdk_wayland_create_cairo_surface (GdkWaylandDisplay *display,
int width, int height)
{
GdkWaylandCairoSurfaceData *data;
@@ -530,8 +530,8 @@ static cairo_surface_t *
gdk_wayland_window_ref_cairo_surface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
- GdkDisplayWayland *display_wayland =
- GDK_DISPLAY_WAYLAND (gdk_window_get_display (impl->wrapper));
+ GdkWaylandDisplay *display_wayland =
+ GDK_WAYLAND_DISPLAY (gdk_window_get_display (impl->wrapper));
if (GDK_WINDOW_DESTROYED (impl->wrapper))
return NULL;
@@ -679,12 +679,12 @@ static void
gdk_wayland_window_show (GdkWindow *window, gboolean already_mapped)
{
GdkDisplay *display;
- GdkDisplayWayland *display_wayland;
+ GdkWaylandDisplay *display_wayland;
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
GdkEvent *event;
display = gdk_window_get_display (window);
- display_wayland = GDK_DISPLAY_WAYLAND (display);
+ display_wayland = GDK_WAYLAND_DISPLAY (display);
if (impl->user_time != 0 &&
display_wayland->user_time != 0 &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]