#ifndef WH_LX_H_c07a7644_ #define WH_LX_H_c07a7644_ #include typedef unsigned int LX_XID; /* * Ideally, I'd like to set things up so that (to pick an example) * LX_WCLASS is the type of a window class, with values such as * LX_WCLASS_InputOutput and LX_WCLASS_InputOnly, and we get strict * typechecking from the compiler, so that passing a non-LX_WCLASS_* * value as an LX_WCLASS argument produces a type mismatch error. But * I also want LX_WCLASS_InputOutput and LX_WCLASS_InputOnly to be * compile-time constants, so they are suitable for use in switches. * * I have not come up with a way to get both. The compromise I'm * picking is to use compile-time constant values and back off to * run-time typechecking, by using values such that (for example) * LX_WCLASS_InputOutput does not equal LX_BACKINGSTORE_WhenMapped, * even though they have the same representation in the protocol, so, * while it won't be a compile-time error to pass * LX_BACKINGSTORE_WhenMapped as a window class, it will be a run-time * error. * * This is especially relevant for values that are a set of fixed * alternatives or an X ID, such as the input focus window (which is a * window ID or None or PointerRoot). * * We can pick values which are known to be disjoint from X IDs because * X IDs never have any of the 0xe0000000 bits set. */ typedef unsigned int LX_IMAGE_BYTE_ORDER; #define LX_IBO_LSBFirst 0x20000001 #define LX_IBO_MSBFirst 0x20000002 typedef unsigned int LX_BITMAP_BIT_ORDER; #define LX_BBO_LeastSignificant 0x20000003 #define LX_BBO_MostSignificant 0x20000004 typedef unsigned int LX_WINDOW_CLASS; #define LX_WCLASS_InputOutput 0x20000005 #define LX_WCLASS_InputOnly 0x20000006 #define LX_WCLASS_CopyFromParent 0x20000007 #define LX__WCLASS_Error 0x20000019 typedef unsigned int LX_GRAVITY; #define LX_GRAVITY_NorthWest 0x2000000d #define LX_GRAVITY_North 0x2000000e #define LX_GRAVITY_NorthEast 0x2000000f #define LX_GRAVITY_West 0x20000010 #define LX_GRAVITY_Center 0x20000011 #define LX_GRAVITY_East 0x20000012 #define LX_GRAVITY_SouthWest 0x20000013 #define LX_GRAVITY_South 0x20000014 #define LX_GRAVITY_SouthEast 0x20000015 #define LX_GRAVITY_Static 0x20000016 #define LX_GRAVITY_Forget 0x20000017 #define LX_GRAVITY_Unmap 0x20000018 #define LX__GRAVITY_Error 0x20000022 typedef unsigned int LX_BACKINGSTORE; #define LX_BACKINGSTORE_NotUseful 0x2000001d #define LX_BACKINGSTORE_WhenMapped 0x2000001e #define LX_BACKINGSTORE_Always 0x2000001f #define LX__BACKINGSTORE_Error 0x20000023 typedef unsigned int LX_GCFUNCTION; #define LX_GCFUNCTION__base 0x20000030 #define LX_GCFUNCTION__mask 0x0000000f #define LX_GCFUNCTION__src 0x00000003 #define LX_GCFUNCTION__dst 0x00000005 #define LX_GCFUNCTION_norm(x) (((x) & LX_GCFUNCTION__mask) | LX_GCFUNCTION__base) #define LX_GCFUNCTION_Clear 0x20000030 #define LX_GCFUNCTION_And 0x20000031 #define LX_GCFUNCTION_AndReverse 0x20000032 #define LX_GCFUNCTION_Copy 0x20000033 #define LX_GCFUNCTION_AndInverted 0x20000034 #define LX_GCFUNCTION_NoOp 0x20000035 #define LX_GCFUNCTION_Xor 0x20000036 #define LX_GCFUNCTION_Or 0x20000037 #define LX_GCFUNCTION_Nor 0x20000038 #define LX_GCFUNCTION_Equiv 0x20000039 #define LX_GCFUNCTION_Invert 0x2000003a #define LX_GCFUNCTION_OrReverse 0x2000003b #define LX_GCFUNCTION_CopyInverted 0x2000003c #define LX_GCFUNCTION_OrInverted 0x2000003d #define LX_GCFUNCTION_Nand 0x2000003e #define LX_GCFUNCTION_Set 0x2000003f #define LX__GCFUNCTION_Error 0x2000002c typedef unsigned int LX_GCLINESTYLE; #define LX_GCLINESTYLE_Solid 0x2000002d #define LX_GCLINESTYLE_OnOffDash 0x2000002e #define LX_GCLINESTYLE_DoubleDash 0x2000002f #define LX__GCLINESTYLE_Error 0x20000040 typedef unsigned int LX_GCCAPSTYLE; #define LX_GCCAPSTYLE_NotLast 0x20000041 #define LX_GCCAPSTYLE_Butt 0x20000042 #define LX_GCCAPSTYLE_Round 0x20000043 #define LX_GCCAPSTYLE_Projecting 0x20000044 #define LX__GCCAPSTYLE_Error 0x20000045 typedef unsigned int LX_GCJOINSTYLE; #define LX_GCJOINSTYLE_Miter 0x20000046 #define LX_GCJOINSTYLE_Round 0x20000047 #define LX_GCJOINSTYLE_Bevel 0x20000048 #define LX__GCJOINSTYLE_Error 0x20000049 typedef unsigned int LX_GCFILLSTYLE; #define LX_GCFILLSTYLE_Solid 0x2000004a #define LX_GCFILLSTYLE_Tiled 0x2000004b #define LX_GCFILLSTYLE_Stippled 0x2000004c #define LX_GCFILLSTYLE_OpaqueStippled 0x2000004d #define LX__GCFILLSTYLE_Error 0x2000004e typedef unsigned int LX_GCFILLRULE; #define LX_GCFILLRULE_EvenOdd 0x2000004f #define LX_GCFILLRULE_Winding 0x20000050 #define LX__GCFILLRULE_Error 0x20000051 typedef unsigned int LX_GCSUBWINDOWMODE; #define LX_GCSUBWINDOWMODE_ClipByChildren 0x20000052 #define LX_GCSUBWINDOWMODE_IncludeInferiors 0x20000053 #define LX__GCSUBWINDOWMODE_Error 0x20000054 typedef unsigned int LX_GCARCMODE; #define LX_GCARCMODE_Chord 0x20000055 #define LX_GCARCMODE_PieSlice 0x20000056 #define LX__GCARCMODE_Error 0x20000057 typedef unsigned int LX_OPEN_STATUS; #define LX_OPENSTATUS_failed 0x20000028 #define LX_OPENSTATUS_worked 0x20000029 typedef struct lx_conn LX_CONN; typedef struct lx_op LX_OP; typedef struct lx_segment LX_SEGMENT; struct lx_segment { int x1; int y1; int x2; int y2; } ; /* * There are various internal functions prototyped here as well, * typically because they are part of the implementation behind a * macro. Any name lx__* or LX__* should be considered an internal * interface, not part of the interface contract, and should not be * used directly. */ /* * The argument string is * * lhs:rhs * * lhs is * hostname * numeric-address * [address-literal] * the four-character string "unix" * the zero-length string * * rhs is * D * D.S * (D and S are decimal integers) * * lx_open's arguments after the string consist of one or more * LX_OPEN_*() calls. The list must be terminated by LX_OPEN_END * (which takes no parens). * * The supported flags (and, for those that have them, arguments): * * LX_OPEN_ERR(strp) * char **strp * If this is given, then on success, (char *)0 is written * to *strp; on error, a string explaining the error is. * On error, the resulting string is owned by lx_open's * caller; to free it, pass it to lx_free(). * * Multiple errors can occur (for example, if a name which * resolves to multiple addresses is used). If so, they * are concatenated, oldest first, with newlines between * them. There is no trailing newline after the last. * * LX_OPEN_CB(fn,arg) * void (*fn)(void *, LX_OPEN_STATUS) * void *arg * Normally, lx_open blocks until the open and the initial * protocol exchange complete. With this flag, it does * not block. When the open completes, fn is called with * arg as its argument. (If LX_OPEN_ERR is also * specified, the error string is written before fn is * called.) arg is used for nothing but passing to fn. * * The callback must not throw out. Its second argument * is LX_OPENSTATUS_worked on success or * LX_OPENSTATUS_failed on failure. * * The function pointer may be nil, in which case no call * is actually made, but lx_open is still nonblocking. * * Unfortunately, because there is no nonblocking form of * getaddrinfo(), using names will make the call block for * name resolution regardless (it's the connection * attempts that can be nonblocking). This is a * misfeature which may be fixed someday. * * LX_OPEN_USE_LOOP(loop) * AIO_LOOP *loop * By default, the XCONN returned by lx_open uses an * AIO_LOOP of its own, which is created when needed and * destroyed once no longer needed. With this flag, it * uses the argument AIO_LOOP instead, which is _not_ * destroyed by lx. (Obviously, destroying the AIO_LOOP * before the XCONN is closed will break lx rather badly.) * * LX_OPEN_NO_PREAMBLE() * By default, the library automatically does some initial * protocol exchanges (such as querying and, if supported, * enabling BIG_REQUESTS) as part of the connection open. * Specifying this suppresses these; the only protocol * done as part of open is then just the strict minimum, * one blob of data in each direction. * * LX_OPEN_DEBUG(args) * Turns on various debugging. The arguments, if any, and * their effects, if any, are not documented here; like * most debugging facilities, this is not useful without * the source. * * If any of these is present multiple times in a given call, only the * last one has any effect. */ extern LX_CONN *lx_open(const char *, ...); #define LX_OPEN_END LX__OPEN_END #define LX_OPEN_ERR(strp) LX__OPEN_ERR, lx__cvt_char_p_p((strp)) #define LX_OPEN_CB(fn,arg) LX__OPEN_CB, lx__cvt_fn_opencbarg((fn)), lx__cvt_void_p((arg)) #define LX_OPEN_USE_LOOP(loop) LX__OPEN_USE_LOOP, lx__cvt_AIO_LOOP_p((loop)) #define LX_OPEN_NO_PREAMBLE() LX__OPEN_NO_PREAMBLE #define LX_OPEN_DEBUG(x) LX__OPEN_DEBUG, lx__cvt_int((x)) /* * lx_close closes an X connection. This implies lx_op_drop on all * pending LX_OPs on it. */ extern void lx_close(LX_CONN *); /* * Convenience routine. This runs an event loop on the XCONN's * AIO_LOOP until, during some iteration, lx_break_loop is called on * that XCONN, at which point this returns. This is suitable for * simple applications that do not interact with anything but X. * * lx_event_loop can also return if the underlying aio facilities * return an unexpected error. This causes it to return -1. * Otherwise (if it returns because lx_break_loop broke out of it), it * returns 0. * * Applications that want more than just X in their event loop probably * want to use LX_OPEN_USE_LOOP so they can control the event loop, * add their own poll and block functions, and the like. */ extern int lx_event_loop(LX_CONN *); extern void lx_break_loop(LX_CONN *); /* * There are two general paradigms for requests: open-loop and * response-expected. An example of an open-loop request might be * CreateWindow; an example of a response-expected request might be * GetWindowAttributes. * * For open-loop requests, the call (eg, lx_CreateWindow) returns the * results, if any, immediately (eg, an LX_XID for lx_CreateWindow, or * nothing for lx_Bell) and there is no way to tell when it has * completed, except indirectly, such as by a later response-expected * request's response arriving. * * For response-expected requests, the call returns an LX_OP pointer, * which can be passed to various calls, such as lx_op_await, to do * useful things with the pending request. */ // conn, percent extern void lx_Bell(LX_CONN *, signed char); // conn, focusp, revertp extern LX_OP *lx_GetInputFocus(LX_CONN *, LX_XID *, LX_XID *); // conn, parent, x, y, w, h, bw, dp, class, vis, ... extern LX_XID lx_CreateWindow(LX_CONN *, LX_XID, int, int, unsigned int, unsigned int, unsigned int, int, LX_WINDOW_CLASS, LX_XID, ...); #define LX_CWV_BackPixmap(pm) LX__CWV_BackPixmap, lx__cvt_LX_XID((pm)) #define LX_CWV_BackPixel(pix) LX__CWV_BackPixel, lx__cvt_pixel((pix)) #define LX_CWV_BorderPixmap(pm) LX__CWV_BorderPixmap, lx__cvt_LX_XID((pm)) #define LX_CWV_BorderPixel(pix) LX__CWV_BorderPixel, lx__cvt_pixel((pix)) #define LX_CWV_BitGravity(g) LX__CWV_BitGravity, lx__cvt_LX_XID((g)) #define LX_CWV_WinGravity(g) LX__CWV_WinGravity, lx__cvt_LX_XID((g)) #define LX_CWV_BackingStore(bs) LX__CWV_BackingStore, lx__cvt_LX_XID((bs)) #define LX_CWV_BackingPlanes(bp) LX__CWV_BackingPlanes, lx__cvt_pixel((bp)) #define LX_CWV_BackingPixel(bp) LX__CWV_BackingPixel, lx__cvt_pixel((bp)) #define LX_CWV_OverrideRedirect(or) LX__CWV_OverrideRedirect, lx__cvt_bool((or)) #define LX_CWV_SaveUnder(su) LX__CWV_SaveUnder, lx__cvt_bool((su)) #define LX_CWV_EventMask(em) LX__CWV_EventMask, lx__cvt_mask((em)) #define LX_CWV_DontPropagate(dp) LX__CWV_DontPropagate, lx__cvt_eventmask((dp)) #define LX_CWV_Colormap(cmap) LX__CWV_Colormap, lx__cvt_LX_XID((cmap)) #define LX_CWV_Cursor(curs) LX__CWV_Cursor, lx__cvt_LX_XID((curs)) #define LX_CWV_END LX__CWV_END // conn, visual, window, alloc extern LX_XID lx_CreateColormap(LX_CONN *, LX_XID, LX_XID, LX_XID); // conn, window extern void lx_MapWindow(LX_CONN *, LX_XID); // conn, cmap, r, g, b, pix, actr, actg, actb extern LX_OP *lx_AllocColor(LX_CONN *, LX_XID, unsigned int, unsigned int, unsigned int, unsigned int *, unsigned int *, unsigned int *, unsigned int *); // conn, drawable, ... extern LX_XID lx_CreateGC(LX_CONN *, LX_XID, ...); #define LX_GCV_Function(f) LX__GCV_Function, lx__cvt_LX_XID((f)) #define LX_GCV_PlaneMask(pm) LX__GCV_PlaneMask, lx__cvt_mask((pm)) #define LX_GCV_Foreground(pix) LX__GCV_Foreground, lx__cvt_pixel((pix)) #define LX_GCV_Background(pix) LX__GCV_Background, lx__cvt_pixel((pix)) #define LX_GCV_LineWidth(w) LX__GCV_LineWidth, lx__cvt_uint((w)) #define LX_GCV_LineStyle(ls) LX__GCV_LineStyle, lx__cvt_LX_XID((ls)) #define LX_GCV_CapStyle(cs) LX__GCV_CapStyle, lx__cvt_LX_XID((cs)) #define LX_GCV_JoinStyle(js) LX__GCV_JoinStyle, lx__cvt_LX_XID((js)) #define LX_GCV_FillStyle(fs) LX__GCV_FillStyle, lx__cvt_LX_XID((fs)) #define LX_GCV_FillRule(fr) LX__GCV_FillRule, lx__cvt_LX_XID((fr)) #define LX_GCV_Tile(pm) LX__GCV_Tile, lx__cvt_LX_XID((pm)) #define LX_GCV_Stipple(pm) LX__GCV_Stipple, lx__cvt_LX_XID((pm)) #define LX_GCV_TileStipXOrigin(xo) LX__GCV_TileStipXOrigin, lx__cvt_int((xo)) #define LX_GCV_TileStipYOrigin(yo) LX__GCV_TileStipYOrigin, lx__cvt_int((yo)) #define LX_GCV_Font(f) LX__GCV_Font, lx__cvt_LX_XID((f)) #define LX_GCV_SubwindowMode(sm) LX__GCV_SubwindowMode, lx__cvt_LX_XID((sm)) #define LX_GCV_GraphicsExposures(gx) LX__GCV_GraphicsExposures, lx__cvt_bool((gx)) #define LX_GCV_ClipXOrigin(cxo) LX__GCV_ClipXOrigin, lx__cvt_int((cxo)) #define LX_GCV_ClipYOrigin(cyo) LX__GCV_ClipYOrigin, lx__cvt_int((cyo)) #define LX_GCV_ClipMask(pm) LX__GCV_ClipMask, lx__cvt_LX_XID((pm)) #define LX_GCV_DashOffset(do) LX__GCV_DashOffset, lx__cvt_uint((do)) #define LX_GCV_Dashes(dl) LX__GCV_DashList, lx__cvt_uint((dl)) #define LX_GCV_ArcMode(am) LX__GCV_ArcMode, lx__cvt_LX_XID((am)) #define LX_GCV_END LX__GCV_END // conn, drawable, gc, nseg, segments extern void lx_PolySegment(LX_CONN *, LX_XID, LX_XID, int, const LX_SEGMENT *); // conn, gc, ... // varargs are the same as for lx_CreateGC extern void lx_ChangeGC(LX_CONN *, LX_XID, ...); /* * There are also a few functions which are conceptually like requests * but which are handled entirely within the library. */ // return number of screens // conn extern int lx_nscreens(LX_CONN *); // return root window of screen N (LX_WINDOW_None if error) // conn, N extern LX_XID lx_root(LX_CONN *, int); // return depth of root window of screen N (-1 if error) // conn, N extern int lx_root_depth(LX_CONN *, int); // return visual of root window of screen N (LX_VISUAL_None if error) // conn, N extern LX_XID lx_root_visual(LX_CONN *, int); /* * Mapping between protocol values and API values. */ extern int lx__wclass_to_proto(LX_WINDOW_CLASS); extern LX_WINDOW_CLASS lx__proto_to_wclass(unsigned int); extern int lx__backingstore_to_proto(LX_BACKINGSTORE); extern LX_BACKINGSTORE lx__proto_to_backingstore(unsigned int); extern int lx__bitgravity_to_proto(LX_GRAVITY); extern LX_GRAVITY lx__proto_to_bitgravity(unsigned int); extern int lx__wingravity_to_proto(LX_GRAVITY); extern LX_GRAVITY lx__proto_to_wingravity(unsigned int); extern int lx__gcfunction_to_proto(LX_GCFUNCTION); extern LX_GCFUNCTION lx__proto_to_gcfunction(unsigned int); extern int lx__gclinestyle_to_proto(LX_GCLINESTYLE); extern LX_GCLINESTYLE lx__proto_to_gclinestyle(unsigned int); extern int lx__gccapstyle_to_proto(LX_GCCAPSTYLE); extern LX_GCCAPSTYLE lx__proto_to_gccapstyle(unsigned int); extern int lx__gcjoinstyle_to_proto(LX_GCJOINSTYLE); extern LX_GCJOINSTYLE lx__proto_to_gcjoinstyle(unsigned int); extern int lx__gcfillstyle_to_proto(LX_GCFILLSTYLE); extern LX_GCFILLSTYLE lx__proto_to_gcfillstyle(unsigned int); extern int lx__gcfillrule_to_proto(LX_GCFILLRULE); extern LX_GCFILLRULE lx__proto_to_gcfillrule(unsigned int); extern int lx__gcsubwindowmode_to_proto(LX_GCSUBWINDOWMODE); extern LX_GCSUBWINDOWMODE lx__proto_to_gcsubwindowmode(unsigned int); extern int lx__gcarcmode_to_proto(LX_GCARCMODE); extern LX_GCARCMODE lx__proto_to_gcarcmode(unsigned int); // Distinguished values for input focus #define LX_FOCUS_None 0x20000008 #define LX_FOCUS_PointerRoot 0x20000009 #define LX_FOCUS_Parent 0x2000000a // Distinguished values for window IDs #define LX_WINDOW_None 0x2000000b // Distinguished values for pixmap IDs #define LX_PIXMAP_None 0x2000001a #define LX_PIXMAP_ParentRelative 0x2000001b #define LX_PIXMAP_CopyFromParent 0x2000001c // Distinguished values for visual IDs #define LX_VISUAL_None 0x2000000c #define LX_VISUAL_CopyFromParent 0x20000024 // Distinguished values for colormap IDs #define LX_COLORMAP_CopyFromParent 0x20000020 #define LX_COLORMAP_None 0x20000027 // Distinguished values for cursor IDs #define LX_CURSOR_None 0x20000021 // Distinguished values for CreateColormap alloc #define LX_AllocNone 0x20000025 #define LX_AllocAll 0x20000026 // Distinguished values for GC IDs #define LX_GC_None 0x2000002a // Distinguished values for GC clip-mask #define LX_GCCLIPMASK_None 0x2000002b /* * Handling for operations in progress. As outlined above, such * operations return LX_OP pointers. Every LX_OP pointer must * eventually be disposed of by one of: * * - Passing it to lx_op_drop. * - Passing it to lx_op_await without the LX_OP_KEEP flag. * - Passing it to lx_op_callback without the LX_OP_KEEP flag. * - Calling lx_close on its XCONN pointer. * * The calls are: * * void lx_op_await(LX_OP *op, unsigned int flags) * Waits for op to complete. See below for flags. Note that * mixing lx_op_await and lx_op_callback requires care. While * waiting in lx_op_await, other pending requests, if any, can * potentially complete, and calling lx_break_loop from their * callbacks will not affect the lx_op_await call. However, they * will have completed and thus will not be available to complete * after lx_op_await returns. * * If the LX_OP was created with LX_OPEN_USE_LOOP, note that this * runs an event loop for that AIO_LOOP, which, depending on what * else it's used for, may involve more than just the X * connection. * * Note also that libaio's event loop is not reentrant. It is an * error to call lx_op_await from within a callback called due to * lx_op_callback(), or indeed any other callback from libaio on * the same AIO_LOOP. lx_op_await exists for setup and * non-event-driven use. * * void lx_op_callback(LX_OP *op, void (*cb)(void *), void *arg, unsigned int flags) * Sets a callback and argument to be called when op completes. * See below for flags. Note that using lx_op_callback without * LX_OP_KEEP means that the LX_OP will become invalid without any * notice to the application beyond the calling of the callback * (and not even that, if it's already completed, which can be * detected by calling lx_op_test). * * int lx_op_test(LX_OP *op) * Tests whether the request has completed, returning 0 if it has * not completed or 1 if it has. * * void lx_op_drop(LX_OP *op) * Indicates that the application no longer cares when op * completes. This also revokes any lx_op_callback on this op. * The LX_OP must not be passed to any lx_op_* functions, * including another lx_op_drop, after this call returns. * * void lx_op_set_udata(LX_OP *op, void *udata) * Sets op's user data pointer to udata. * * void *lx_op_udata(LX_OP *op) * Returns op's user data pointer. * * For lx_op_await and lx_op_callback, the flags argument selects * optional behaviour: * * LX_OP_KEEP * By default, these calls perform the equivalent of * lx_op_drop on the LX_OP once it completes. If * LX_OP_KEEP is set in the flags word, the LX_OP remains * valid. (To dispose of an LX_OP that is done but which * was kept this way, use lx_op_drop() - or lx_op_await() * without LX_OP_KEEP.) */ #define LX_OP_KEEP 0x00000001 extern void lx_op_await(LX_OP *, unsigned int); extern void lx_op_callback(LX_OP *, void (*)(void *), void *, unsigned int); extern int lx_op_test(LX_OP *); extern void lx_op_drop(LX_OP *); extern void lx_op_set_udata(LX_OP *, void *); extern void *lx_op_udata(LX_OP *); /* * lx_abort() is a somewhat odd case. It is an interface which lx * calls but the user will, optionally, provide. It is called in a * few circumstances that should never happen, such as when the * application has misused an API or when the library bugchecks. If * the application defines lx_abort(), the library will call it in * these circumstances. Otherwise, it will call a version of its own * which calls abort(). * * lx_abort() normally should not return. If it ever does, the library * tries to do something reasonable, but no promises are made about * precisely what. */ extern void lx_abort(void); /* * Implementation support for the LX_OPEN_* macros. */ #define LX__OPEN_END (-1700) #define LX__OPEN_ERR (-1701) #define LX__OPEN_CB (-1702) #define LX__OPEN_USE_LOOP (-1703) #define LX__OPEN_NO_PREAMBLE (-1704) #define LX__OPEN_DEBUG (-1705) /* * Implementation support for the LX_CWV_* macros. */ #define LX__CWV_BackPixmap (-1750) #define LX__CWV_BackPixel (-1751) #define LX__CWV_BorderPixmap (-1752) #define LX__CWV_BorderPixel (-1753) #define LX__CWV_BitGravity (-1754) #define LX__CWV_WinGravity (-1755) #define LX__CWV_BackingStore (-1756) #define LX__CWV_BackingPlanes (-1757) #define LX__CWV_BackingPixel (-1758) #define LX__CWV_OverrideRedirect (-1759) #define LX__CWV_SaveUnder (-1760) #define LX__CWV_EventMask (-1761) #define LX__CWV_DontPropagate (-1762) #define LX__CWV_Colormap (-1763) #define LX__CWV_Cursor (-1764) #define LX__CWV_END (-1765) /* * Implementation support for the LX_GCV_* macros. */ #define LX__GCV_Function (-1800) #define LX__GCV_PlaneMask (-1801) #define LX__GCV_Foreground (-1802) #define LX__GCV_Background (-1803) #define LX__GCV_LineWidth (-1804) #define LX__GCV_LineStyle (-1805) #define LX__GCV_CapStyle (-1806) #define LX__GCV_JoinStyle (-1807) #define LX__GCV_FillStyle (-1808) #define LX__GCV_FillRule (-1809) #define LX__GCV_Tile (-1810) #define LX__GCV_Stipple (-1811) #define LX__GCV_TileStipXOrigin (-1812) #define LX__GCV_TileStipYOrigin (-1813) #define LX__GCV_Font (-1814) #define LX__GCV_SubwindowMode (-1815) #define LX__GCV_GraphicsExposures (-1816) #define LX__GCV_ClipXOrigin (-1817) #define LX__GCV_ClipYOrigin (-1818) #define LX__GCV_ClipMask (-1819) #define LX__GCV_DashOffset (-1820) #define LX__GCV_Dashes (-1821) #define LX__GCV_ArcMode (-1822) #define LX__GCV_END (-1823) /* * Arglist converters. */ #ifndef LX__EXTERN_INLINE #define LX__EXTERN_INLINE extern inline #endif extern char **lx__cvt_char_p_p(char **); LX__EXTERN_INLINE char **lx__cvt_char_p_p(char **arg) { return(arg); } extern void (*lx__cvt_fn_opencbarg(void (*)(void *, LX_OPEN_STATUS)))(void *, LX_OPEN_STATUS); LX__EXTERN_INLINE void (*lx__cvt_fn_opencbarg(void (*arg)(void *, LX_OPEN_STATUS)))(void *, LX_OPEN_STATUS) { return(arg); } extern void *lx__cvt_void_p(void *); LX__EXTERN_INLINE void *lx__cvt_void_p(void *arg) { return(arg); } extern int lx__cvt_int(int); LX__EXTERN_INLINE int lx__cvt_int(int arg) { return(arg); } extern AIO_LOOP *lx__cvt_AIO_LOOP_p(AIO_LOOP *); LX__EXTERN_INLINE AIO_LOOP *lx__cvt_AIO_LOOP_p(AIO_LOOP *arg) { return(arg); } extern unsigned long int lx__cvt_LX_XID(LX_XID); LX__EXTERN_INLINE unsigned long int lx__cvt_LX_XID(LX_XID arg) { return(arg); } extern int lx__cvt_bool(int); LX__EXTERN_INLINE int lx__cvt_bool(int arg) { return(arg); } extern unsigned int lx__cvt_mask(unsigned int); LX__EXTERN_INLINE unsigned int lx__cvt_mask(unsigned int arg) { return(arg); } extern unsigned int lx__cvt_pixel(unsigned int); LX__EXTERN_INLINE unsigned int lx__cvt_pixel(unsigned int arg) { return(arg); } /* * Reverse mapping for 0x20000000-and-up values. This is here to serve * as a registry, to make it harder to accidentally allocate the same * value to multiple names. * 0x20000001 LX_IBO_LSBFirst 0x20000002 LX_IBO_MSBFirst 0x20000003 LX_BBO_LeastSignificant 0x20000004 LX_BBO_MostSignificant 0x20000005 LX_WCLASS_InputOutput 0x20000006 LX_WCLASS_InputOnly 0x20000007 LX_WCLASS_CopyFromParent 0x20000008 LX_FOCUS_None 0x20000009 LX_FOCUS_PointerRoot 0x2000000a LX_FOCUS_Parent 0x2000000b LX_WINDOW_None 0x2000000c LX_VISUAL_None 0x2000000d LX_GRAVITY_NorthWest 0x2000000e LX_GRAVITY_North 0x2000000f LX_GRAVITY_NorthEast 0x20000010 LX_GRAVITY_West 0x20000011 LX_GRAVITY_Center 0x20000012 LX_GRAVITY_East 0x20000013 LX_GRAVITY_SouthWest 0x20000014 LX_GRAVITY_South 0x20000015 LX_GRAVITY_SouthEast 0x20000016 LX_GRAVITY_Static 0x20000017 LX_GRAVITY_Forget 0x20000018 LX_GRAVITY_Unmap 0x20000019 LX__WCLASS_Error 0x2000001a LX_PIXMAP_None 0x2000001b LX_PIXMAP_ParentRelative 0x2000001c LX_PIXMAP_CopyFromParent 0x2000001d LX_BACKINGSTORE_NotUseful 0x2000001e LX_BACKINGSTORE_WhenMapped 0x2000001f LX_BACKINGSTORE_Always 0x20000020 LX_COLORMAP_CopyFromParent 0x20000021 LX_CURSOR_None 0x20000022 LX__GRAVITY_Error 0x20000023 LX__BACKINGSTORE_Error 0x20000024 LX_VISUAL_CopyFromParent 0x20000025 LX_AllocNone 0x20000026 LX_AllocAll 0x20000027 LX_COLORMAP_None 0x20000028 LX_OPENSTATUS_failed 0x20000029 LX_OPENSTATUS_worked 0x2000002a LX_GC_None 0x2000002b LX_GCCLIPMASK_None 0x2000002c LX__GCFUNCTION_Error 0x2000002d LX_GCLINESTYLE_Solid 0x2000002e LX_GCLINESTYLE_OnOffDash 0x2000002f LX_GCLINESTYLE_DoubleDash 0x20000030 LX_GCFUNCTION_Clear 0x20000031 LX_GCFUNCTION_And 0x20000032 LX_GCFUNCTION_AndReverse 0x20000033 LX_GCFUNCTION_Copy 0x20000034 LX_GCFUNCTION_AndInverted 0x20000035 LX_GCFUNCTION_NoOp 0x20000036 LX_GCFUNCTION_Xor 0x20000037 LX_GCFUNCTION_Or 0x20000038 LX_GCFUNCTION_Nor 0x20000039 LX_GCFUNCTION_Equiv 0x2000003a LX_GCFUNCTION_Invert 0x2000003b LX_GCFUNCTION_OrReverse 0x2000003c LX_GCFUNCTION_CopyInverted 0x2000003d LX_GCFUNCTION_OrInverted 0x2000003e LX_GCFUNCTION_Nand 0x2000003f LX_GCFUNCTION_Set 0x20000040 LX__GCLINESTYLE_Error 0x20000041 LX_GCCAPSTYLE_NotLast 0x20000042 LX_GCCAPSTYLE_Butt 0x20000043 LX_GCCAPSTYLE_Round 0x20000044 LX_GCCAPSTYLE_Projecting 0x20000045 LX__GCCAPSTYLE_Error 0x20000046 LX_GCJOINSTYLE_Miter 0x20000047 LX_GCJOINSTYLE_Round 0x20000048 LX_GCJOINSTYLE_Bevel 0x20000049 LX__GCJOINSTYLE_Error 0x2000004a LX_GCFILLSTYLE_Solid 0x2000004b LX_GCFILLSTYLE_Tiled 0x2000004c LX_GCFILLSTYLE_Stippled 0x2000004d LX_GCFILLSTYLE_OpaqueStippled 0x2000004e LX__GCFILLSTYLE_Error 0x2000004f LX_GCFILLRULE_EvenOdd 0x20000050 LX_GCFILLRULE_Winding 0x20000051 LX__GCFILLRULE_Error 0x20000052 LX_GCSUBWINDOWMODE_ClipByChildren 0x20000053 LX_GCSUBWINDOWMODE_IncludeInferiors 0x20000054 LX__GCSUBWINDOWMODE_Error 0x20000055 LX_GCARCMODE_Chord 0x20000056 LX_GCARCMODE_PieSlice 0x20000057 LX__GCARCMODE_Error */ #endif