forked from enlightenment/efl
Needed to copy the protocol file from Enlightenment.devs/barbieri/cmake
parent
2aa8b5acad
commit
f162f47297
6 changed files with 34 additions and 177 deletions
@ -1,41 +0,0 @@ |
||||
#include <stdlib.h> |
||||
#include <stdint.h> |
||||
#include "wayland-util.h" |
||||
|
||||
extern const struct wl_interface wl_surface_interface; |
||||
extern const struct wl_interface www_surface_interface; |
||||
|
||||
static const struct wl_interface *types[] = { |
||||
NULL, |
||||
NULL, |
||||
NULL, |
||||
&www_surface_interface, |
||||
&wl_surface_interface, |
||||
}; |
||||
|
||||
static const struct wl_message www_requests[] = { |
||||
{ "create", "no", types + 3 }, |
||||
}; |
||||
|
||||
WL_EXPORT const struct wl_interface www_interface = { |
||||
"www", 1, |
||||
1, www_requests, |
||||
0, NULL, |
||||
}; |
||||
|
||||
static const struct wl_message www_surface_requests[] = { |
||||
{ "destroy", "", types + 0 }, |
||||
}; |
||||
|
||||
static const struct wl_message www_surface_events[] = { |
||||
{ "status", "iiu", types + 0 }, |
||||
{ "start_drag", "", types + 0 }, |
||||
{ "end_drag", "", types + 0 }, |
||||
}; |
||||
|
||||
WL_EXPORT const struct wl_interface www_surface_interface = { |
||||
"www_surface", 1, |
||||
1, www_surface_requests, |
||||
3, www_surface_events, |
||||
}; |
||||
|
@ -1,134 +0,0 @@ |
||||
#ifndef ZWP_WWW_CLIENT_PROTOCOL_H |
||||
#define ZWP_WWW_CLIENT_PROTOCOL_H |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
#include <stdint.h> |
||||
#include <stddef.h> |
||||
#include "wayland-client.h" |
||||
|
||||
struct wl_client; |
||||
struct wl_resource; |
||||
|
||||
struct wl_surface; |
||||
struct www; |
||||
struct www_surface; |
||||
|
||||
extern const struct wl_interface www_interface; |
||||
extern const struct wl_interface www_surface_interface; |
||||
|
||||
#define WWW_CREATE 0 |
||||
|
||||
#define WWW_CREATE_SINCE_VERSION 1 |
||||
|
||||
static inline void |
||||
www_set_user_data(struct www *www, void *user_data) |
||||
{ |
||||
wl_proxy_set_user_data((struct wl_proxy *) www, user_data); |
||||
} |
||||
|
||||
static inline void * |
||||
www_get_user_data(struct www *www) |
||||
{ |
||||
return wl_proxy_get_user_data((struct wl_proxy *) www); |
||||
} |
||||
|
||||
static inline uint32_t |
||||
www_get_version(struct www *www) |
||||
{ |
||||
return wl_proxy_get_version((struct wl_proxy *) www); |
||||
} |
||||
|
||||
static inline void |
||||
www_destroy(struct www *www) |
||||
{ |
||||
wl_proxy_destroy((struct wl_proxy *) www); |
||||
} |
||||
|
||||
static inline struct www_surface * |
||||
www_create(struct www *www, struct wl_surface *surface) |
||||
{ |
||||
struct wl_proxy *id; |
||||
|
||||
id = wl_proxy_marshal_constructor((struct wl_proxy *) www, |
||||
WWW_CREATE, &www_surface_interface, NULL, surface); |
||||
|
||||
return (struct www_surface *) id; |
||||
} |
||||
|
||||
struct www_surface_listener { |
||||
/**
|
||||
* status - Status update on a www_surface |
||||
* @x_rel: (none) |
||||
* @y_rel: (none) |
||||
* @timestamp: (none) |
||||
* |
||||
*
|
||||
*/ |
||||
void (*status)(void *data, |
||||
struct www_surface *www_surface, |
||||
int32_t x_rel, |
||||
int32_t y_rel, |
||||
uint32_t timestamp); |
||||
/**
|
||||
* start_drag - Drag has started |
||||
* |
||||
*
|
||||
*/ |
||||
void (*start_drag)(void *data, |
||||
struct www_surface *www_surface); |
||||
/**
|
||||
* end_drag - Drag has ended |
||||
* |
||||
*
|
||||
*/ |
||||
void (*end_drag)(void *data, |
||||
struct www_surface *www_surface); |
||||
}; |
||||
|
||||
static inline int |
||||
www_surface_add_listener(struct www_surface *www_surface, |
||||
const struct www_surface_listener *listener, void *data) |
||||
{ |
||||
return wl_proxy_add_listener((struct wl_proxy *) www_surface, |
||||
(void (**)(void)) listener, data); |
||||
} |
||||
|
||||
#define WWW_SURFACE_DESTROY 0 |
||||
|
||||
#define WWW_SURFACE_DESTROY_SINCE_VERSION 1 |
||||
|
||||
static inline void |
||||
www_surface_set_user_data(struct www_surface *www_surface, void *user_data) |
||||
{ |
||||
wl_proxy_set_user_data((struct wl_proxy *) www_surface, user_data); |
||||
} |
||||
|
||||
static inline void * |
||||
www_surface_get_user_data(struct www_surface *www_surface) |
||||
{ |
||||
return wl_proxy_get_user_data((struct wl_proxy *) www_surface); |
||||
} |
||||
|
||||
static inline uint32_t |
||||
www_surface_get_version(struct www_surface *www_surface) |
||||
{ |
||||
return wl_proxy_get_version((struct wl_proxy *) www_surface); |
||||
} |
||||
|
||||
static inline void |
||||
www_surface_destroy(struct www_surface *www_surface) |
||||
{ |
||||
wl_proxy_marshal((struct wl_proxy *) www_surface, |
||||
WWW_SURFACE_DESTROY); |
||||
|
||||
wl_proxy_destroy((struct wl_proxy *) www_surface); |
||||
} |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
||||
|
||||
#endif |
@ -0,0 +1,28 @@ |
||||
<protocol name="zwp_www"> |
||||
<interface name="www" version="1"> |
||||
<request name="create"> |
||||
<description summary="Create an object for WWW notifications"> |
||||
</description> |
||||
<arg name="id" type="new_id" interface="www_surface"/> |
||||
<arg name="surface" type="object" interface="wl_surface"/> |
||||
</request> |
||||
</interface> |
||||
<interface name="www_surface" version="1"> |
||||
<event name="status"> |
||||
<description summary="Status update on a www_surface"></description> |
||||
<arg name="x_rel" type="int"/> |
||||
<arg name="y_rel" type="int"/> |
||||
<arg name="timestamp" type="uint"/> |
||||
</event> |
||||
<event name="start_drag"> |
||||
<description summary="Drag has started"></description> |
||||
</event> |
||||
<event name="end_drag"> |
||||
<description summary="Drag has ended"></description> |
||||
</event> |
||||
<request name="destroy" type="destructor"> |
||||
<description summary="Destroy a www_surface"> |
||||
</description> |
||||
</request> |
||||
</interface> |
||||
</protocol> |
Loading…
Reference in new issue