#ifndef WH_LX_SHAPE_H_268909cb_ #define WH_LX_SHAPE_H_268909cb_ /* * lx interface to the SHAPE extension. * * Any name beginning LX_SHAPE__ or lx_shape__ should be considered * private to the implementation. Any use of such identifiers by * client code is dangerous and unsupported, very defniitely "at your * own risk". */ #include // Shape kinds typedef unsigned int LX_SHAPE_KIND; #define LX_SHAPE_Bounding 0x40000000 #define LX_SHAPE_Clip 0x40000001 // #define LX_SHAPE_Input 0x40000002 not (yet) supported // Region operations typedef unsigned int LX_SHAPE_OP; #define LX_SHAPE_Set 0x40000003 #define LX_SHAPE_Union 0x40000004 #define LX_SHAPE_Intersect 0x40000005 #define LX_SHAPE_Subtract 0x40000006 #define LX_SHAPE_Invert 0x40000007 // Struct for struct version of QueryExtents typedef struct lx_shape_extents LX_SHAPE_EXTENTS; struct lx_shape_extents { unsigned int shaped; #define LX_SHAPED_Bounding 0x00000001 #define LX_SHAPED_Clip 0x00000002 // #define LX_SHAPED_Input 0x00000004 not (yet) supported LX_RECTANGLE bounding; LX_RECTANGLE clip; // LX_RECTANGLE input; not (yet) supported } ; /* * Query whether SHAPE is supported in a way this library understands. * The int is written with 0 if SHAPE cannot be used (absent or * incompatible) or 1 if it can. * * Using any of the other calls on an LX_CONN produces undefined * behaviour unless this has returned 1 for that LX_CONN first. * * It is an error to call this on an LX_CONN and then, before that call * has completed, call it again on the same LX_CONN. */ extern LX_OP *lx_shape_query(LX_CONN *, int *); // conn, dstwin, dstkind, op, xoff, yoff, ordering, nrects, rects extern void lx_shape_Rectangles( LX_CONN *, LX_XID, LX_SHAPE_KIND, LX_SHAPE_OP, int, int, LX_RECTORDER, int, const LX_RECTANGLE *); // conn, dstwin, dstkind, op, xoff, yoff, src extern void lx_shape_Mask(LX_CONN *, LX_XID, LX_SHAPE_KIND, LX_SHAPE_OP, int, int, LX_XID); // conn, dstwin, dstkind, op, xoff, yoff, src, srckind extern void lx_shape_Combine(LX_CONN *, LX_XID, LX_SHAPE_KIND, LX_SHAPE_OP, int, int, LX_XID, LX_SHAPE_KIND); // conn, dstwin, dstkind, xoff, yoff extern void lx_shape_Offset(LX_CONN *, LX_XID, LX_SHAPE_KIND, int, int); // conn, win, shapedp, bbxp, bbyp, bbwp, bbhp, clipxp, clipyp, clipwp, cliphp // shapedp uses the same bits as LX_SHAPE_EXTENTS.shaped extern LX_OP *lx_shape_QueryExtents(LX_CONN *, LX_XID, unsigned int *, int *, int *, int *, int *, int *, int *, int *, int *); // conn, win, extents extern LX_OP *lx_shape_QueryExtents_extents(LX_CONN *, LX_SHAPE_EXTENTS *); // conn, win, enable (boolean) extern void lx_shape_SelectInput(LX_CONN *, LX_XID, int); // conn, win, enablep (boolean) extern LX_OP *lx_shape_InputSelected(LX_CONN *, LX_XID, int *); // conn, win, kind, orderp, nrectp, rectsp // rect list is allocated by library, freeable with free extern void lx_shape_GetRectangles(LX_CONN *, LX_XID, LX_SHAPE_KIND, LX_RECTORDER *, int *, LX_RECTANGLE **); /* * Registry of 0x40000000-0x400000ff values 0x40000000 LX_SHAPE_Bounding 0x40000001 LX_SHAPE_Clip 0x40000002 reserved for _Input 0x40000003 LX_SHAPE_Set 0x40000004 LX_SHAPE_Union 0x40000005 LX_SHAPE_Intersect 0x40000006 LX_SHAPE_Subtract 0x40000007 LX_SHAPE_Invert */ #endif