2012-03-07 08:08:43 -08:00
|
|
|
#include "e.h"
|
|
|
|
#ifdef HAVE_WAYLAND_CLIENTS
|
2013-01-09 03:34:07 -08:00
|
|
|
# include "e_comp_wl.h"
|
|
|
|
# include "e_comp_wl_comp.h"
|
|
|
|
# include "e_comp_wl_region.h"
|
2012-03-07 08:08:43 -08:00
|
|
|
#endif
|
|
|
|
|
2012-06-28 00:03:44 -07:00
|
|
|
void
|
2013-01-09 03:34:07 -08:00
|
|
|
e_comp_wl_region_destroy(struct wl_client *client __UNUSED__, struct wl_resource *resource)
|
2012-03-07 08:08:43 -08:00
|
|
|
{
|
2012-04-24 10:15:05 -07:00
|
|
|
wl_resource_destroy(resource);
|
2012-03-07 08:08:43 -08:00
|
|
|
}
|
|
|
|
|
2012-06-28 00:03:44 -07:00
|
|
|
void
|
2013-01-09 03:34:07 -08:00
|
|
|
e_comp_wl_region_add(struct wl_client *client __UNUSED__, struct wl_resource *resource, int x, int y, int w, int h)
|
2012-03-07 08:08:43 -08:00
|
|
|
{
|
|
|
|
Wayland_Region *region;
|
|
|
|
|
|
|
|
region = resource->data;
|
|
|
|
pixman_region32_union_rect(®ion->region, ®ion->region, x, y, w, h);
|
|
|
|
}
|
|
|
|
|
2012-06-28 00:03:44 -07:00
|
|
|
void
|
2013-01-09 03:34:07 -08:00
|
|
|
e_comp_wl_region_subtract(struct wl_client *client __UNUSED__, struct wl_resource *resource, int x, int y, int w, int h)
|
2012-03-07 08:08:43 -08:00
|
|
|
{
|
|
|
|
Wayland_Region *region;
|
|
|
|
pixman_region32_t rect;
|
|
|
|
|
|
|
|
region = resource->data;
|
|
|
|
pixman_region32_init_rect(&rect, x, y, w, h);
|
|
|
|
pixman_region32_subtract(®ion->region, ®ion->region, &rect);
|
|
|
|
pixman_region32_fini(&rect);
|
|
|
|
}
|
|
|
|
|