add utility function for clipping shapes to a rect
SVN revision: 14306
This commit is contained in:
parent
55cfa78e75
commit
6d90182cc1
|
@ -986,6 +986,7 @@ EAPI void ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
|
||||||
EAPI void ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win);
|
EAPI void ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win);
|
||||||
EAPI void ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
|
EAPI void ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y);
|
||||||
EAPI void ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h);
|
EAPI void ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h);
|
||||||
|
EAPI void ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h);
|
||||||
EAPI void ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
|
EAPI void ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num);
|
||||||
EAPI Ecore_X_Rectangle *ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret);
|
EAPI Ecore_X_Rectangle *ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret);
|
||||||
EAPI void ecore_x_window_shape_events_select(Ecore_X_Window win, int on);
|
EAPI void ecore_x_window_shape_events_select(Ecore_X_Window win, int on);
|
||||||
|
|
|
@ -90,6 +90,18 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int
|
||||||
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeUnion, Unsorted);
|
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeUnion, Unsorted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
XRectangle rect;
|
||||||
|
|
||||||
|
rect.x = x;
|
||||||
|
rect.y = y;
|
||||||
|
rect.width = w;
|
||||||
|
rect.height = h;
|
||||||
|
XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, &rect, 1, ShapeIntersect, Unsorted);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
|
ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue