diff options
| author | Kristian Høgsberg <krh@redhat.com> | 2008-11-07 08:39:37 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@redhat.com> | 2008-11-07 08:39:37 -0500 |
| commit | 7f77bd8fbedee8a8a1fbb26776084ccaffc2a087 (patch) | |
| tree | 1d93060c20a11ece0fef71d3a061d918072f40c2 /wayland-client.c | |
| parent | dlopen the compositor, add a glx compositor. (diff) | |
| download | wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar.gz wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar.bz2 wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar.lz wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar.xz wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.tar.zst wayland-7f77bd8fbedee8a8a1fbb26776084ccaffc2a087.zip | |
Add copy and damage surface requests.
Diffstat (limited to 'wayland-client.c')
| -rw-r--r-- | wayland-client.c | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/wayland-client.c b/wayland-client.c index 8f673cc..8503a30 100644 --- a/wayland-client.c +++ b/wayland-client.c @@ -173,6 +173,8 @@ wl_display_create_surface(struct wl_display *display) #define WL_SURFACE_DESTROY 0 #define WL_SURFACE_ATTACH 1 #define WL_SURFACE_MAP 2 +#define WL_SURFACE_COPY 3 +#define WL_SURFACE_DAMAGE 4 void wl_surface_destroy(struct wl_surface *surface) { @@ -185,8 +187,8 @@ void wl_surface_destroy(struct wl_surface *surface) request, sizeof request); } -void wl_surface_attach(struct wl_surface *surface, - uint32_t name, int width, int height, int stride) +void wl_surface_attach(struct wl_surface *surface, uint32_t name, + int32_t width, int32_t height, uint32_t stride) { uint32_t request[6]; @@ -201,7 +203,6 @@ void wl_surface_attach(struct wl_surface *surface, request, sizeof request); } - void wl_surface_map(struct wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height) { @@ -217,3 +218,41 @@ void wl_surface_map(struct wl_surface *surface, wl_connection_write(surface->proxy.display->connection, request, sizeof request); } + +void wl_surface_copy(struct wl_surface *surface, int32_t dst_x, int32_t dst_y, + uint32_t name, uint32_t stride, + int32_t x, int32_t y, int32_t width, int32_t height) +{ + uint32_t request[10]; + + request[0] = surface->proxy.id; + request[1] = WL_SURFACE_COPY | ((sizeof request) << 16); + request[2] = dst_x; + request[3] = dst_y; + request[4] = name; + request[5] = stride; + request[6] = x; + request[7] = y; + request[8] = width; + request[9] = height; + + wl_connection_write(surface->proxy.display->connection, + request, sizeof request); +} + +void wl_surface_damage(struct wl_surface *surface, + int32_t x, int32_t y, int32_t width, int32_t height) +{ + uint32_t request[6]; + + request[0] = surface->proxy.id; + request[1] = WL_SURFACE_DAMAGE | ((sizeof request) << 16); + request[2] = x; + request[3] = y; + request[4] = width; + request[5] = height; + + wl_connection_write(surface->proxy.display->connection, + request, sizeof request); +} + |
