Rename wl_data_source to weston_data_source
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 25 Jul 2013 22:52:14 +0000 (15:52 -0700)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 25 Jul 2013 22:54:20 +0000 (15:54 -0700)
Missed this rename when we moved the input structs over from wayland.

src/clipboard.c
src/compositor.h
src/data-device.c
src/xwayland/selection.c

index 6f793f7..81b7b19 100644 (file)
@@ -32,7 +32,7 @@
 #include "compositor.h"
 
 struct clipboard_source {
-       struct wl_data_source base;
+       struct weston_data_source base;
        struct wl_array contents;
        struct clipboard *clipboard;
        struct wl_event_source *event_source;
@@ -99,13 +99,13 @@ clipboard_source_data(int fd, uint32_t mask, void *data)
 }
 
 static void
-clipboard_source_accept(struct wl_data_source *source,
+clipboard_source_accept(struct weston_data_source *source,
                        uint32_t time, const char *mime_type)
 {
 }
 
 static void
-clipboard_source_send(struct wl_data_source *base,
+clipboard_source_send(struct weston_data_source *base,
                      const char *mime_type, int32_t fd)
 {
        struct clipboard_source *source =
@@ -120,7 +120,7 @@ clipboard_source_send(struct wl_data_source *base,
 }
 
 static void
-clipboard_source_cancel(struct wl_data_source *source)
+clipboard_source_cancel(struct weston_data_source *source)
 {
 }
 
@@ -226,7 +226,7 @@ clipboard_set_selection(struct wl_listener *listener, void *data)
        struct clipboard *clipboard =
                container_of(listener, struct clipboard, selection_listener);
        struct weston_seat *seat = data;
-       struct wl_data_source *source = seat->selection_data_source;
+       struct weston_data_source *source = seat->selection_data_source;
        const char **mime_types;
        int p[2];
 
index acaecbb..a045839 100644 (file)
@@ -277,20 +277,20 @@ struct weston_touch_grab {
 
 struct wl_data_offer {
        struct wl_resource *resource;
-       struct wl_data_source *source;
+       struct weston_data_source *source;
        struct wl_listener source_destroy_listener;
 };
 
-struct wl_data_source {
+struct weston_data_source {
        struct wl_resource *resource;
        struct wl_signal destroy_signal;
        struct wl_array mime_types;
 
-       void (*accept)(struct wl_data_source *source,
+       void (*accept)(struct weston_data_source *source,
                       uint32_t serial, const char *mime_type);
-       void (*send)(struct wl_data_source *source,
+       void (*send)(struct weston_data_source *source,
                     const char *mime_type, int32_t fd);
-       void (*cancel)(struct wl_data_source *source);
+       void (*cancel)(struct weston_data_source *source);
 };
 
 struct weston_pointer {
@@ -385,7 +385,7 @@ wl_data_device_manager_init(struct wl_display *display);
 
 void
 weston_seat_set_selection(struct weston_seat *seat,
-                         struct wl_data_source *source, uint32_t serial);
+                         struct weston_data_source *source, uint32_t serial);
 
 struct weston_xkb_info {
        struct xkb_keymap *keymap;
@@ -454,7 +454,7 @@ struct weston_seat {
        struct wl_list drag_resource_list;
 
        uint32_t selection_serial;
-       struct wl_data_source *selection_data_source;
+       struct weston_data_source *selection_data_source;
        struct wl_listener selection_data_source_listener;
        struct wl_signal selection_signal;
 
index c89379c..a47ea5e 100644 (file)
@@ -29,7 +29,7 @@
 
 struct weston_drag {
        struct wl_client *client;
-       struct wl_data_source *data_source;
+       struct weston_data_source *data_source;
        struct wl_listener data_source_listener;
        struct weston_surface *focus;
        struct wl_resource *focus_resource;
@@ -107,8 +107,8 @@ destroy_offer_data_source(struct wl_listener *listener, void *data)
 }
 
 static struct wl_resource *
-wl_data_source_send_offer(struct wl_data_source *source,
-                         struct wl_resource *target)
+weston_data_source_send_offer(struct weston_data_source *source,
+                             struct wl_resource *target)
 {
        struct wl_data_offer *offer;
        char **p;
@@ -141,7 +141,8 @@ data_source_offer(struct wl_client *client,
                  struct wl_resource *resource,
                  const char *type)
 {
-       struct wl_data_source *source = wl_resource_get_user_data(resource);
+       struct weston_data_source *source =
+               wl_resource_get_user_data(resource);
        char **p;
 
        p = wl_array_add(&source->mime_types, sizeof *p);
@@ -230,7 +231,8 @@ weston_drag_set_focus(struct weston_drag *drag, struct weston_surface *surface,
        serial = wl_display_next_serial(display);
 
        if (drag->data_source)
-               offer = wl_data_source_send_offer(drag->data_source, resource);
+               offer = weston_data_source_send_offer(drag->data_source,
+                                                     resource);
 
        wl_data_device_send_enter(resource, serial, surface->resource,
                                  sx, sy, offer);
@@ -429,7 +431,7 @@ destroy_selection_data_source(struct wl_listener *listener, void *data)
 
 WL_EXPORT void
 weston_seat_set_selection(struct weston_seat *seat,
-                         struct wl_data_source *source, uint32_t serial)
+                         struct weston_data_source *source, uint32_t serial)
 {
        struct wl_resource *data_device, *offer;
        struct wl_resource *focus = NULL;
@@ -453,8 +455,8 @@ weston_seat_set_selection(struct weston_seat *seat,
                data_device = wl_resource_find_for_client(&seat->drag_resource_list,
                                                          wl_resource_get_client(focus));
                if (data_device && source) {
-                       offer = wl_data_source_send_offer(seat->selection_data_source,
-                                                         data_device);
+                       offer = weston_data_source_send_offer(seat->selection_data_source,
+                                                             data_device);
                        wl_data_device_send_selection(data_device, offer);
                } else if (data_device) {
                        wl_data_device_send_selection(data_device, NULL);
@@ -493,7 +495,8 @@ static const struct wl_data_device_interface data_device_interface = {
 static void
 destroy_data_source(struct wl_resource *resource)
 {
-       struct wl_data_source *source = wl_resource_get_user_data(resource);
+       struct weston_data_source *source =
+               wl_resource_get_user_data(resource);
        char **p;
 
        wl_signal_emit(&source->destroy_signal, source);
@@ -507,14 +510,14 @@ destroy_data_source(struct wl_resource *resource)
 }
 
 static void
-client_source_accept(struct wl_data_source *source,
+client_source_accept(struct weston_data_source *source,
                     uint32_t time, const char *mime_type)
 {
        wl_data_source_send_target(source->resource, mime_type);
 }
 
 static void
-client_source_send(struct wl_data_source *source,
+client_source_send(struct weston_data_source *source,
                   const char *mime_type, int32_t fd)
 {
        wl_data_source_send_send(source->resource, mime_type, fd);
@@ -522,7 +525,7 @@ client_source_send(struct wl_data_source *source,
 }
 
 static void
-client_source_cancel(struct wl_data_source *source)
+client_source_cancel(struct weston_data_source *source)
 {
        wl_data_source_send_cancelled(source->resource);
 }
@@ -531,7 +534,7 @@ static void
 create_data_source(struct wl_client *client,
                   struct wl_resource *resource, uint32_t id)
 {
-       struct wl_data_source *source;
+       struct weston_data_source *source;
 
        source = malloc(sizeof *source);
        if (source == NULL) {
@@ -596,7 +599,7 @@ WL_EXPORT void
 wl_data_device_set_keyboard_focus(struct weston_seat *seat)
 {
        struct wl_resource *data_device, *focus, *offer;
-       struct wl_data_source *source;
+       struct weston_data_source *source;
 
        if (!seat->keyboard)
                return;
@@ -612,7 +615,7 @@ wl_data_device_set_keyboard_focus(struct weston_seat *seat)
 
        source = seat->selection_data_source;
        if (source) {
-               offer = wl_data_source_send_offer(source, data_device);
+               offer = weston_data_source_send_offer(source, data_device);
                wl_data_device_send_selection(data_device, offer);
        }
 }
index 6c7cfc0..735b726 100644 (file)
@@ -106,18 +106,18 @@ weston_wm_get_incr_chunk(struct weston_wm *wm)
 }
 
 struct x11_data_source {
-       struct wl_data_source base;
+       struct weston_data_source base;
        struct weston_wm *wm;
 };
 
 static void
-data_source_accept(struct wl_data_source *source,
+data_source_accept(struct weston_data_source *source,
                   uint32_t time, const char *mime_type)
 {
 }
 
 static void
-data_source_send(struct wl_data_source *base,
+data_source_send(struct weston_data_source *base,
                 const char *mime_type, int32_t fd)
 {
        struct x11_data_source *source = (struct x11_data_source *) base;
@@ -140,7 +140,7 @@ data_source_send(struct wl_data_source *base,
 }
 
 static void
-data_source_cancel(struct wl_data_source *source)
+data_source_cancel(struct weston_data_source *source)
 {
 }
 
@@ -421,7 +421,7 @@ weston_wm_read_data_source(int fd, uint32_t mask, void *data)
 static void
 weston_wm_send_data(struct weston_wm *wm, xcb_atom_t target, const char *mime_type)
 {
-       struct wl_data_source *source;
+       struct weston_data_source *source;
        struct weston_seat *seat = weston_wm_pick_seat(wm);
        int p[2];
 
@@ -621,7 +621,7 @@ weston_wm_set_selection(struct wl_listener *listener, void *data)
        struct weston_seat *seat = data;
        struct weston_wm *wm =
                container_of(listener, struct weston_wm, selection_listener);
-       struct wl_data_source *source = seat->selection_data_source;
+       struct weston_data_source *source = seat->selection_data_source;
        const char **p, **end;
        int has_text_plain = 0;