data-device: Don't implement data source through data offer object

The wl_data_source object used to specify the implementation for data
offers created for it.  This means you need a data offer to retrieve the
data from the source, which makes it awkward to use in-process in a
compositor.  Now we instead have three virtual functions that can be
connected to a protocol object or in-process data-sources such as an
X server proxy or clipboard.
This commit is contained in:
Kristian Høgsberg 2012-06-03 17:30:12 -04:00
parent dff84e5638
commit 68f058ffd3
2 changed files with 39 additions and 22 deletions

View file

@ -232,7 +232,10 @@ struct wl_data_source {
struct wl_resource resource;
struct wl_array mime_types;
const struct wl_data_offer_interface *offer_interface;
void (*accept)(struct wl_data_source *source,
uint32_t serial, const char *mime_type);
void (*send)(struct wl_data_source *source,
const char *mime_type, int32_t fd);
void (*cancel)(struct wl_data_source *source);
};