This file documents the liblx routines for core requests. Most requests have one routine; a few have more (typically because certain information can be provided in more than one way, such as an RGB triple being provided as a struct or as three arguments). The first argument to all of these is an LX_CONN *. This is always the connection the request is made on; this is rarely-to-never specifically mentioned. Many of these do not give full details here; see the X protocol documentation for them. For example, there are various interactions among the arguments to CreateWindow requests, few-to-none of which are documented here. A `drawable' means either a window or a pixmap; many requests can operate on either. For the routines returning an LX_OP *, see pending-operations for more. **** THIS FILE IS STILL BEING WRITTEN **** lx_ChangeProperty ----------------- void lx_ChangeProperty(LX_CONN *conn, LX_XID win, LX_ATOM prop, LX_ATOM ptype, int fmt, LX_PROPERTYMODE mode, const void *data, int len) Issues a ChangeProperty request. win is the window whose property list is to be affected. prop is the property name. ptype is the property type. fmt is 8, 16, or 32, as the property value is made up of 8-, 16-, or 32-bit units; this is needed so the server can byteswap between clients using different endiannesses. mode is one of the LX_PROPERTYMODE_* values, specifying whether the vlaue is to be appended to, prepended to, or completely replaced. data and len are the new value; len is in fmt-sized units (which, unless fmt is 8, is not the length in bytes). lx_ChangeSaveSet ---------------- void lx_ChangeSaveSet(LX_CONN *conn, LX_XID win, LX_CHANGESAVESETMODE mode) Issues a ChangeSaveSet request. Depending on mode, this either inserts (LX_CHANGESAVESETMODE_Insert) or deletes (LX_CHANGESAVESETMODE_Delete) the window from this client's save set. It is a Match error for win to have been created by the client issuing the request. lx_CirculateWindow ------------------ void lx_CirculateWindow(LX_CONN *conn, LX_XID win, LX_CIRCULATE op) Issues a CirculateWindow request for win, potentially restacking its child windows. op specifies the request and can be LX_CIRCULATE_RaiseLowest or LX_CIRCULATE_LowerHighest. lx_ChangeWindowAttributes_va, lx_ChangeWindowAttributes_attr ---------------------------- ------------------------------ void lx_ChangeWindowAttributes_va(LX_CONN *conn, LX_XID win, ...) void lx_ChangeWindowAttributes_attr(LX_CONN *conn, LX_XID win, unsigned int mask, const LX_SET_WINDOW_ATTRIBUTES *attr) Issues a ChangeWindowAttributes request. conn is the connection, win is the win. The rest of the arguments specify the attributes to change; their values are the same as for lx_CreateWindow_* (qv). lx_ConfigureWindow_va, lx_ConfigureWindow_attr --------------------- ----------------------- void lx_ConfigureWindow_va(LX_CONN *conn, LX_XID win, ...) void lx_ConfigureWindow_attr(LX_CONN *conn, LX_XID win, unsigned int mask, const LX_CFG_WINDOW_ATTRIBUTES * attr) Issues a ConfigureWindow request. The first two arguments are the same for both versions; the difference is how the configuration changes are presented. The _va version uses a varargs list; the _attr version uses a struct, with a mask to specify which of the struct's members are to be used. (Xlib's XConfigureWindow takes the latter approach.) win is the window to be reconfigured. After that various changes are specified; how they are specified is how the _va and _attr variants differ. lx_ConfigureWindow_va specifies changes with macros forming a variable argument list. This is a sequence of one or more of the LX_CWV_* macros listed below, of which the last must be LX_CWV_END. The possible attributes and their meanings are: LX_CWV_X(x) x is the window's new outside X position. LX_CWV_Y(y) y is the window's new outside Y position. LX_CWV_W(w) w is the window's new interior width. LX_CWV_H(h) h is the window's new interior height. LX_CWV_BorderWidth(bw) bw is the window's new border width. LX_CWV_Sibling(sib) LX_CWV_StackMode(sm) Together, these specify restacking the window among its siblings. See the protocol document for details. LX_CWV_END Marks the end of the arguments. lx_ConfigureWindow_attr specifies changes with a (pointer to a) struct containing all possible attributes and a mask specifying which elements of the struct to use. (If the mask is zero, the pointer does not need to be valid.) The struct members, their mask bit names, and their meanings are: x LX_CONFIGUREREQUEST_X The window's new outside X position. y LX_CONFIGUREREQUEST_Y The window's new outside Y position. w LX_CONFIGUREREQUEST_Width The window's new interior width. h LX_CONFIGUREREQUEST_Height The window's new interior height. border_width LX_CONFIGUREREQUEST_BorderWidth The window's new border width. sibling LX_CONFIGUREREQUEST_Sibling stack_mode LX_CONFIGUREREQUEST_StackMode Together, these specify restacking the window among its siblings. See the protocol document for details. lx_ConvertSelection ------------------- void lx_ConvertSelection(LX_CONN *conn, LX_XID req, LX_ATOM sel, LX_ATOM tgt, LX_ATOM prop, LX_TIME ts) Issues a ConvertSelection request. req is the requestor window, sel is the selection, tgt is the target the selection owner is requested to convert the selection to, prop is the property the owner is to use when returning the value, and ts is the timestamp of the moment at which the selection value is of interest. Note that the protocol document's description of ConvertSelection is slightly self-contradictory (its description of the SelectionNotify event generated if the selection has no owner ("with property None") conflicts with its statement that the arguments are passed on unchanged). Implementors seem to have created interoperable implementations, though. lx_CreateWindow_va, lx_CreateWindow_attr ------------------ -------------------- LX_XID lx_CreateWindow_va( LX_CONN *conn, LX_XID parent, int x, int y, unsigned int w, unsigned int h, unsigned int bw, int dp, LX_WINDOW_CLASS cls, LX_XID vis, ... ) LX_XID lx_CreateWindow_attr( LX_CONN *conn, LX_XID parent, int x, int y, unsigned int w, unsigned int h, unsigned int bw, int dp, LX_WINDOW_CLASS cls, LX_XID vis, unsigned int mask, const LX_SET_WINDOW_ATTRIBUTES * attr ) Issues a CreateWindow request, to create a window. The first ten arguments are the same for both versions; the difference is how optional attributes are presented. The _va version uses a varargs list; the _attr version uses a struct, with a mask to specify which of the struct's members are to be used. (Xlib's XCreateWindow takes the latter approach.) The new window's LX_XID is returned. parent is the parent window ID. x and y specify the position of the upper left corner of the outside of the new window's border (that is, the position is specified for the window including its border). w and h specify the width and height of the new window's interior (that is, they are specified not including the border). bw is the new window's border width. dp is its depth, that is, the number of bits per pixel. cls is its class (one of the LX_WCLASS_* values). After that any optional attributes are specified; how these are specified is how the _va and _attr variants differ. lx_CreateWindow_va specifies optional attributes with macros forming a variable argument list. This is a sequence of one or more of the LX_CWV_* macros listed below, of which the last must be LX_CWV_END. The possible attributes and their meanings are: LX_CWV_BackPixmap(pm) pm is the new window's background pixmap. LX_CWV_BackPixel(pix) pix is the new window's background pixel. LX_CWV_BorderPixmap(pm) pm is the new window's border pixmap. LX_CWV_BorderPixel(pix) pix is the ndw window's border pixel. LX_CWV_BitGravity(g) g is the new window's bit-gravity. LX_CWV_WinGravity(g) g is the new window's win-gravity. LX_CWV_BackingStore(bs) bs is the new window's backing-store hint. LX_CWV_BackingPlanes(bp) bp is the new window's backing-store planes mask. LX_CWV_BackingPixel(bp) bp is the new window's backing-store pixel value. LX_CWV_OverrideRedirect(or) or is the new window's override-redirect setting. LX_CWV_SaveUnder(su) su is the new window's save-under setting. LX_CWV_EventMask(em) em is the new window's event mask for this client. LX_CWV_DontPropagate(dp) dp is the new window's do-not-propagate mask. LX_CWV_Colormap(cmap) cmap is the new window's colormap. LX_CWV_Cursor(curs) curs is the new window's cursor. LX_CWV_END Marks the end of the arguments. lx_CreateWindow_attr specifies optional attributes with a (pointer to a) struct containing all possible attributes and a mask specifying which elements of the struct to use. (If the mask is zero, the pointer does not need to be valid.) The struct members, their mask bit names, and their meanings are: background_pixmap LX_SWM_BLackPixmap The new window's background pixmap. background_pixel LX_SWM_BackPixel The new window's background pixel. border_pixmap LX_SWM_BorderPixmap The new window's border pixmap. border_pixel LX_SWM_BorderPixel The ndw window's border pixel. bit_gravity LX_SWM_BitGravity The new window's bit-gravity. win_gravity LX_SWM_WinGravity The new window's win-gravity. backing_store LX_SWM_BackingStore The new window's backing-store hint. backing_planes LX_SWM_BackingPlanes The new window's backing-store planes mask. backing_pixel LX_SWM_BackingPixel The new window's backing-store pixel value. override_redirect LX_SWM_OverrideRedirect The new window's override-redirect setting. save_under LX_SWM_SaveUnder The new window's save-under setting. event_mask LX_SWM_EventMask The new window's event mask for this client. dont_propagate LX_SWM_DontPropagate The new window's do-not-propagate mask. colormap LX_SWM_Colormap The new window's colormap. cursor LX_CWV_Cursor The new window's cursor. There are many interactions among these values; see the protocol document for details. lx_DeleteProperty ----------------- void lx_DeleteProperty(LX_CONN *conn, LX_XID win, LX_ATOM prop) Issues a DeleteProperty request. win is the window whose property list is to be affected and prop is the property name. lx_DestroySubwindows -------------------- void lx_DestroySubwindows(LX_CONN *conn, LX_XID win) Issues a DestroySubwindows request for win, destroying all its subwindows (if any). lx_DestroyWindow ---------------- void lx_DestroyWindow(LX_CONN *conn, LX_XID win) Issues a DestroyWindow request for win, destroying it. This includes destroying all its subwindows, if any. lx_GetAtomName -------------- LX_OP *lx_GetAtomName(LX_CONN *conn, LX_ATOM atom, int *lenp, char **textp) Issues a GetAtomName request, returning the string for an atom. The returned string's length is written through lenp and a pointer to the string is written through textp at some point after entry to lx_GetAtomName and before the returned LX_OP completes. For convenience in the common case of the atom name not containing a NUL, a NUL is appended to the string returned by the server. This added NUL is not included in the length. The returned string contents are owned by the application and can be freed with a simple free(). lx_GetGeometry -------------- LX_OP *lx_GetGeometry(LX_CONN *conn, LX_XID d, LX_GET_GEOMETRY *ggp) Issues a GetGeometry request for drawable d. The returned values are written through ggp at some point after entry to lx_GetGeometry and before the returned LX_OP completes. x, y, and borderwidth will be zero for pixmaps. lx_GetProperty -------------- LX_OP *lx_GetProperty(LX_CONN *conn, LX_XID win, LX_ATOM prop, LX_ATOM type, unsigned int offset, unsigned int len, int del, int *fmtp, LX_ATOM *typep, unsigned int *afterp, int *lenp, void **valuep) Issues a GetProperty request. See the protocol document for details. The output arguments (fmtp through valuep) have the returned values wsritten through them at some point after entry to lx_GetProperty and before the returned LX_OP completes. The memory pointed to by the returned value (the pointer stored through valuep) is owned by the applicaitnoand is allocated such that it is freeable with a simple free(). lx_GetSelectionOwner -------------------- LX_OP *lx_GetSelectionOwner(LX_CONN *conn, LX_ATOM sel, LX_XID *ownp) Issues a GetSelectionOwner for sel. The returned owner value is stored through ownp at some point after entry to lx_GetSelectionOwner and before the returned LX_OP completes. lx_GetWindowAttributes ---------------------- LX_OP *lx_GetWindowAttributes(LX_CONN *conn, LX_XID win, LX_GET_WINDOW_ATTRIBUTES *gwa) Issues a GetWindowAttributes request for win. The returned attributes are written throuogh gwa at some point after entry to lx_GetWindowAttributes and before the returned LX_OP completes. lx_GrabPointer -------------- LX_OP *lx_GrabPointer(LX_CONN *conn, LX_XID grabwin, int ownerevents, unsigned int eventmask, LX_GRABMODE ptrmode, LX_GRABMODE kbdmode, LX_XID confine, LX_XID curs, LX_TIME ts, LX_GRABSTATUS *statp) Issues a GrabPointer request, attempting to activelygrab the pointer. grabwin is the grab window. ownerevents and eventmask control how events are reported. ptrmode and kbdmode control how event processing proceeds for pointer and keyboard events. confine is the confine-to window for the grab. curs is the cursor. ts is a timestamp used to resolve races. A status value indicating the success or failure (and, if failure, some indication of why it failed) is written through statp at some point after entry to lx_GrabPointer and before the returned LX_OP completes. lx_InternAtom ------------- LX_OP *lx_InternAtom(LX_CONN *conn, int oie, const char *name, int len, LX_ATOM *atomp) Issues an InternAtom request. name and len are the desired atom name and its length (except that, for convenience when using NUL-terminated strings, if len is -1, strlen(name) is used instead). If oie is zero and no such atom exists, one is created. The protocol document's description of InternAtom is silent on the behaviour if oie is nonzero and no atom exists; the encoding section does provide for None in the encoding of the returned atom, and the Xlib document says "[t]herefore, XInternAtom can return None". liblx reflects a None return as LX_ATOM_None. The protocol document says that the atom name string "should use the ISO Latin-1 encoding", noting that "[u]ppercase and lowercase matter"; it does not specify what happens if that `should' is violated. The returned atom is written through *atomp at some point after entry to lx_InternAtom and before the returned LX_OP completes. lx_ListProperties ----------------- LX_OP *lx_ListProperties(LX_CONN *conn, LX_XID win, LX_XIDLIST **listp) Issues a ListProperties request. win is the window whose property list is being queried. The resulting property name list is returned as an LX_XIDLIST (the LX_ATOMs being cast to LX_XIDs for the purpose); see the lx_XIDlist_* functions, documented in lists, for what cna be done with the LX_XIDLIST. lx_MapSubwindows ---------------- void lx_MapSubwindows(LX_CONN *conn, LX_XID win) Issues a MapSubwindows request for win. This is (usually) more efficient than mapping the subwindows individually, because some of the work needs to be done only once. lx_MapWindow ------------ void lx_MapWindow(LX_CONN *conn, LX_XID win) Issues a MapWindow request for win. lx_QueryTree ------------ LX_OP *lx_QueryTree(LX_CONN *conn, LX_XID win, LX_XID *rootp, LX_XID *parentp, LX_XIDLIST **kidsp) Issues a QueryTree request for win. The returned information is written through rootp, parentp, and/or kidsp at some point after entry to lx_QueryTree and before the returned LX_OP completes. See also the lx_XIDlist_* functions. Any of rootp, parentp, and/or kidsp may be nil, in which case the corresponding information is not returned. lx_ReparentWindow ----------------- void lx_ReparentWindow(LX_CONN *conn, LX_XID win, LX_XID newparent, int x, int y) Issues a ReparentWindow request, reparenting win so its new parent is newparent. x and y specify its position in the new parent (given as the upper-left corner of the outside of the window's border). lx_SendEvent ------------ void lx_SendEvent(LX_CONN *conn, LX_XID dst, int prop, unsigned int mask, const LX_EVENT *ev) Issues a SendEvent request. This causes the server to send the event on to the client that created dst (or, if dst is LX_WINDOW_PointerWindow or LX_WINDOW_InputFocus, a window determined dynamically from the pointer position or the inpout focus). (prop, here, stands for `propagate', not `property'.) lx_SetSelectionOwner -------------------- void lx_SetSelectionOwner(LX_CONN *conn, LX_ATOM sel, LX_XID win, LX_TIME ts) Issues a SetSelectionOwner request. sel is the selection, win is the new owner window (or LX_WINDOW_None for no owner), and ts is the timestamp (or LX_TIME_CurrentTime). lx_UnmapSubwindows ------------------ void lx_UnmapSubwindows(LX_CONN *conn, LX_XID win) Issues an UnmapSubwindows request for win, unmapping all its subwindows. This is (usually) more efficient than unmapping the subwindows individually, because some of the work needs to be done only once. lx_UnmapWindow -------------- void lx_UnmapWindow(LX_CONN *conn, LX_XID win) Issues an UnmapWindow request for win. // conn, time extern void lx_UngrabPointer(LX_CONN *, LX_TIME); // conn, button, modifiers, grabwin, ownerevents, mask, ptrmode, kbdmode, confine, cursor extern void lx_GrabButton(LX_CONN *, int, unsigned int, LX_XID, int, unsigned int, LX_GRABMODE, LX_GRABMODE, LX_XID, LX_XID); // conn, button, modifiers, grabwin extern void lx_UngrabButton(LX_CONN *, int, unsigned int, LX_XID); // conn, eventmask, cursor, time) extern void lx_ChangeActivePointerGrab(LX_CONN *, unsigned int, LX_XID, LX_TIME); // conn, grabwin, ownerevents, ptrmode, kbdmode, time, statusp extern LX_OP *lx_GrabKeyboard(LX_CONN *, LX_XID, int, LX_GRABMODE, LX_GRABMODE, LX_TIME, LX_GRABSTATUS *); // conn, time extern void lx_UngrabKeyboard(LX_CONN *, LX_TIME); // conn, keycode, modifiers, grabwin, ownerevents, ptrmode, kbdmode extern void lx_GrabKey(LX_CONN *, unsigned int, unsigned int, LX_XID, int, LX_GRABMODE, LX_GRABMODE); // conn, keycode, modifiers, grabwin extern void lx_UngrabKey(LX_CONN *, unsigned int, unsigned int, LX_XID); // conn, mode, time extern void lx_AllowEvents(LX_CONN *, LX_ALLOWMODE, LX_TIME); // conn extern void lx_GrabServer(LX_CONN *); // conn extern void lx_UngrabServer(LX_CONN *); // conn, window, samescreenp, rootp, childp, rxp, ryp, wxp, wyp, maskp extern LX_OP *lx_QueryPointer(LX_CONN *, LX_XID, int *, LX_XID *, LX_XID *, int *, int *, int *, int *, unsigned int *); // conn, window, statusp extern LX_OP *lx_QueryPointer_status(LX_CONN *, LX_XID, LX_QUERYPOINTER_STATUS *); // conn, window, start, stop, nevp, evp // *evp freeable with free() extern LX_OP *lx_GetMotionEvents(LX_CONN *, LX_XID, LX_TIME, LX_TIME, int *, LX_TIMECOORD **); // conn, srcwin, dstwin, sx, sy, samescreenp, dxp, dyp, childp extern LX_OP *lx_TranslateCoordinates(LX_CONN *, LX_XID, LX_XID, int, int, int *, int *, int *, LX_XID *); // conn, srcwin, dstwin, srcx, srcy, srcw, srch, dstx, dsty extern void lx_WarpPointer(LX_CONN *, LX_XID, LX_XID, int, int, int, int, int, int); // conn, focus, revert, time // revert, and non-window values for focus, use LX_FOCUS_* values extern void lx_SetInputFocus(LX_CONN *, LX_XID, LX_XID, LX_TIME); // conn, focusp, revertp extern LX_OP *lx_GetInputFocus(LX_CONN *, LX_XID *, LX_XID *); // conn, statep // statep points to (at least) 32 unsigned chars extern LX_OP *lx_QueryKeymap(LX_CONN *, unsigned char *); // conn, name // XXX Do we want an interface supporting NULs in font names? extern LX_XID lx_OpenFont(LX_CONN *, const char *); // conn, font extern void lx_CloseFont(LX_CONN *, LX_XID); // conn, fontable, infop extern LX_OP *lx_QueryFont(LX_CONN *, LX_XID, LX_FONTINFO **); // conn, fontable, str, len, dirp, ascp, descp, overallp // len==-1 means use strlen(str) extern LX_OP *lx_QueryTextExtents8(LX_CONN *, LX_XID, const unsigned char *, int, LX_TEXTDIRECTION *, int *, int *, LX_CHARINFO *); // conn, fontable, str, len, dirp, ascp, descp, overallp // len is in characters, not chars extern LX_OP *lx_QueryTextExtents16(LX_CONN *, LX_XID, const unsigned short int *, int, LX_TEXTDIRECTION *, int *, int *, LX_CHARINFO *); // conn, pattern, maxnames, listp // XXX Do we want an interface supporting NULs in patterns? // XXX Do we want an interface supporting NULs in path names? extern LX_OP *lx_ListFonts(LX_CONN *, const char *, int, LX_STRLIST **); // conn, pattern, maxnames, eachcb // XXX Do we want an interface supporting NULs in patterns? // XXX Do we want an interface supporting NULs in path names? // eachcb is called for each font and takes ownership of its arguments // string arg is freeable with free() // for info arg, see LX_FONTINFO comment extern LX_OP *lx_ListFontsWithInfo(LX_CONN *, const char *, int, void (*)(char *, LX_FONTINFO *)); // conn, nstrs, strs // XXX Do we want an interface supporting NULs in path list entries? extern void lx_SetFontPath(LX_CONN *, int, const char * const *); // conn, pathp extern LX_OP *lx_GetFontPath(LX_CONN *, LX_STRLIST **); // conn, drawable, depth, width, height extern LX_XID lx_CreatePixmap(LX_CONN *, LX_XID, unsigned int, unsigned int, unsigned int); // conn, pixmap extern void lx_FreePixmap(LX_CONN *, LX_XID); // conn, drawable, ... extern LX_XID lx_CreateGC_va(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 #define LX_GCV_PUSH LX__GCV_PUSH // conn, drawable, mask, attr extern LX_XID lx_CreateGC_attr(LX_CONN *, LX_XID, unsigned int, const LX_GC_ATTRIBUTES *); // conn, gc, ... // varargs are the same as for lx_CreateGC_va extern void lx_ChangeGC_va(LX_CONN *, LX_XID, ...); // conn, gc, mask, attr extern void lx_ChangeGC_attr(LX_CONN *, LX_XID, unsigned int, const LX_GC_ATTRIBUTES *); // conn, src, dst, mask // mask uses LX_GCM_* bits extern void lx_CopyGC(LX_CONN *, LX_XID, LX_XID, unsigned int); // conn, gc, offset, ndash, dashes extern void lx_SetDashes(LX_CONN *, LX_XID, int, int, const unsigned char *); // conn, gc, xo, yo, nrects, rects, ordering extern void lx_SetClipRectangles(LX_CONN *, LX_XID, int, int, int, const LX_RECTANGLE *, LX_RECTORDER); // conn, gc extern void lx_FreeGC(LX_CONN *, LX_XID); // conn, window, x, y, w, h, exposures extern void lx_ClearArea(LX_CONN *, LX_XID, int, int, int, int, int); // conn, srcd, dstd, gc, sx, sy, dx, dy, w, h extern void lx_CopyArea(LX_CONN *, LX_XID, LX_XID, LX_XID, int, int, int, int, int, int); // conn, srcd, dstd, gc, sx, sy, dx, dy, w, h, bit extern void lx_CopyPlane(LX_CONN *, LX_XID, LX_XID, LX_XID, int, int, int, int, int, int, unsigned int); // conn, drawable, gc, coord-mode, npts, points extern void lx_PolyPoint(LX_CONN *, LX_XID, LX_XID, LX_COORDMODE, int, const LX_POINT *); // conn, drawable, gc, coordmode, npts, pts extern void lx_PolyLine(LX_CONN *, LX_XID, LX_XID, LX_COORDMODE, int, const LX_POINT *); // conn, drawable, gc, nseg, segments extern void lx_PolySegment(LX_CONN *, LX_XID, LX_XID, int, const LX_SEGMENT *); // conn, drawable, gc, nrects, rects extern void lx_PolyRectangle(LX_CONN *, LX_XID, LX_XID, int, const LX_RECTANGLE *); // conn, drawable, gc, narcs, arcs extern void lx_PolyArc(LX_CONN *, LX_XID, LX_XID, int, const LX_ARC *); // conn, drawable, gc, shape, coordmode, npts, pts extern void lx_FillPoly(LX_CONN *, LX_XID, LX_XID, LX_SHAPECLASS, LX_COORDMODE, int, const LX_POINT *); // conn, drawable, gc, nrects, rects extern void lx_PolyFillRectangle(LX_CONN *, LX_XID, LX_XID, int, const LX_RECTANGLE *); // conn, drawable, gc, narcs, arcs extern void lx_PolyFillArc(LX_CONN *, LX_XID, LX_XID, int, const LX_ARC *); // conn, drawable, gc, format, depth, w, h, dstx, dsty, leftpad, datalen, data extern void lx_PutImage(LX_CONN *, LX_XID, LX_XID, LX_IMAGEFORMAT, int, int, int, int, int, int, int, const void *); // conn, drawable, format, x, y, int w, int h, planes, depthp, visualp, sizep, bitsp // *bitsp freeable with free() extern LX_OP *lx_GetImage(LX_CONN *, LX_XID, LX_IMAGEFORMAT, int, int, int, int, unsigned int, int *, LX_XID *, int *, void **); // conn, drawable, gc, x, y, nitems, items extern void lx_PolyText8(LX_CONN *, LX_XID, LX_XID, int, int, int, const LX_TEXTITEM8 *); // conn, drawable, gc, x, y, nitems, items extern void lx_PolyText16(LX_CONN *, LX_XID, LX_XID, int, int, int, const LX_TEXTITEM16 *); // conn, drawable, gc, x, y, string, len // len==-1 means use strlen(string) extern void lx_ImageText8(LX_CONN *, LX_XID, LX_XID, int, int, const unsigned char *, int); // conn, drawable, gc, x, y, string, len extern void lx_ImageText16(LX_CONN *, LX_XID, LX_XID, int, int, const unsigned short int *, int); // conn, visual, window, alloc extern LX_XID lx_CreateColormap(LX_CONN *, LX_XID, LX_XID, LX_XID); // conn, cmap extern void lx_FreeColormap(LX_CONN *, LX_XID); // conn, old extern LX_XID lx_CopyColormapAndFree(LX_CONN *, LX_XID); // conn, cmap extern void lx_InstallColormap(LX_CONN *, LX_XID); // conn, cmap extern void lx_UninstallColormap(LX_CONN *, LX_XID); // conn, window, listp // See also the lx_XIDlist_* functions extern LX_OP *lx_ListInstalledColormaps(LX_CONN *, LX_XID, LX_XIDLIST **); // 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, cmap, name, len, pixp, xrp, xgp, xbp, vrp, vgp, vbp // len==-1 means use strlen(name) extern LX_OP *lx_AllocNamedColor(LX_CONN *, LX_XID, const char *, int, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *); // conn, cmap, name, len, pixp, xp, vp // len==-1 means use strlen(name) extern LX_OP *lx_AllocNamedColor_rgb(LX_CONN *, LX_XID, const char *, int, unsigned int *, LX_RGB *, LX_RGB *); // conn, cmap, contig, cols, planes, pixp, planep extern LX_OP *lx_AllocColorCells(LX_CONN *, LX_XID, int, int, int, unsigned int *, unsigned int *); // conn, cmap, contig, ncol, nr, ng, nb, pixp, rmp, gmp, bmp extern LX_OP *lx_AllocColorPlanes(LX_CONN *, LX_XID, int, int, int, int, int, unsigned int *, unsigned int *, unsigned int *, unsigned int *); // conn, cmap, planes, npix, pixv extern void lx_FreeColors(LX_CONN *, LX_XID, unsigned int, int, const unsigned int *); // conn, cmap, num, items extern void lx_StoreColors(LX_CONN *, LX_XID, int, const LX_RGBPF *); // conn, cmap, pixel, name, len, doflags // len==-1 means use strlen(name); doflags uses LX_DO_* extern void lx_StoreNamedColor(LX_CONN *, LX_XID, unsigned int, const char *, int, unsigned int); // conn, cmap, npix, pixels, rgbp // rgbp must point to at least npix LX_RGBs extern LX_OP *lx_QueryColors(LX_CONN *, LX_XID, int, const unsigned int *, LX_RGB *); // conn, cmap, name, len, xrp, xgp, xbp, vrp, vgp, vbp // len==-1 means use strlen(name) extern LX_OP *lx_LookupColor(LX_CONN *, LX_XID, const char *, int, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *); // conn, cmap, name, len, xp, vp // len==-1 means use strlen(name) extern LX_OP *lx_LookupColor_rgb(LX_CONN *, LX_XID, const char *, int, LX_RGB *, LX_RGB *); // conn, src, mask, fr, fg, fb, br, bg, bb, hotx, hoty extern LX_XID lx_CreateCursor(LX_CONN *, LX_XID, LX_XID, int, int, int, int, int, int, int, int); // conn, src, mask, fg, bg, hotx, hoty extern LX_XID lx_CreateCursor_rgb(LX_CONN *, LX_XID, LX_XID, LX_RGB, LX_RGB, int, int); // conn, srcfont, maskfont, srcchar, maskchar, fr, fg, fb, br, bg, bb extern LX_XID lx_CreateGlyphCursor(LX_CONN *, LX_XID, LX_XID, int, int, int, int, int, int, int, int); // conn, srcfont, maskfont, srcchar, maskchar, fg, bg extern LX_XID lx_CreateGlyphCursor_rgb(LX_CONN *, LX_XID, LX_XID, int, int, LX_RGB, LX_RGB); // conn, cursor extern void lx_FreeCursor(LX_CONN *, LX_XID); // conn, cursor, fr, fg, fb, br, bg, bb extern void lx_RecolorCursor(LX_CONN *, LX_XID, int, int, int, int, int, int); // conn, cursor, fg, bg extern void lx_RecolorCursor_rgb(LX_CONN *, LX_XID, LX_RGB, LX_RGB); // conn, drawable, class, w, h, rwp, rhp extern LX_OP *lx_QueryBestSize(LX_CONN *, LX_XID, LX_SIZECLASS, int, int, int *, int *); // conn, name, len, presentp, majorp, eventbasep, errorbasep // len==-1 means use strlen(name) // if !*presentp the other return values are meaningless extern LX_OP *lx_QueryExtension(LX_CONN *, const char *, int, int *, int *, int *, int *); // conn, namesp // See also the lx_strlist_* functions extern LX_OP *lx_ListExtensions(LX_CONN *, LX_STRLIST **listp); // conn, first, keycodes, symspercode, syms extern void lx_ChangeKeyboardMapping(LX_CONN *, int, int, int, const LX_KEYSYM *); // conn, minkeycode, count, symspercodep, keysymsp // LX_KEYSYM vector is allocated by the library, freeable with free() extern LX_OP *lx_GetKeyboardMapping(LX_CONN *, int, int, int *, LX_KEYSYM **); // conn, ... extern void lx_ChangeKeyboardControl_va(LX_CONN *, ...); // LED and Repeat depend on LX_KBCTLLEDACTION and LX_KBCTLREPEATACTION // being typedeffed the same as LX_XID. #define LX_KCV_KeyClickPercent(p) LX__KCV_KeyClickPercent, lx__cvt_int((p)) #define LX_KCV_BellPercent(p) LX__KCV_BellPercent, lx__cvt_int((p)) #define LX_KCV_BellPitch(p) LX__KCV_BellPitch, lx__cvt_int((p)) #define LX_KCV_BellDuration(d) LX__KCV_BellDuration, lx__cvt_int((d)) #define LX_KCV_LED(led,action) LX__KCV_LED, lx__cvt_int((led)) lx__LX_XID((action)) #define LX_KCV_AllLED(action) LX__KCV_LED, (-1), lx__LX_XID((action)) #define LX_KCV_Repeat(key,action) LX__KCV_Repeat, lx__cvt_int((key)) lx__LX_XID((action)) #define LX_KCV_GlobalRepeat(action) LX__KCV_Repeat, (-1) lx__LX_XID((action)) #define LX_KCV_END LX__KCV_END // conn, status extern LX_OP *lx_GetKeyboardControl(LX_CONN *, LX_KEYBOARDCONTROL *); // conn, percent extern void lx_Bell(LX_CONN *, int); // conn, status extern void lx_ChangePointerControl(LX_CONN *, const LX_POINTERCONTROL *); // conn, status extern LX_OP *lx_GetPointerControl(LX_CONN *, LX_POINTERCONTROL *); // conn, status extern void lx_SetScreenSaver(LX_CONN *, const LX_SCREENSAVER *); // conn, status extern LX_OP *lx_GetScreenSaver(LX_CONN *, LX_SCREENSAVER *); // conn, mode, type, datalen, data extern void lx_ChangeHosts(LX_CONN *, LX_CHANGEHOSTSMODE, LX_HOSTTYPE, int, const void *); // conn, accctl, list // See also the lx_hostlist_* functions. extern LX_OP *lx_ListHosts(LX_CONN *, LX_ACCESSCONTROL *, LX_HOSTLIST **); // conn, mode extern void lx_SetAccessControl(LX_CONN *, LX_ACCESSCONTROL); // conn, mode extern void lx_SetCloseDownMode(LX_CONN *, LX_CLOSEDOWNMODE); // conn, resource extern void lx_KillClient(LX_CONN *, LX_XID); // conn, window, delta, nprop, props extern void lx_RotateProperties(LX_CONN *, LX_XID, int, int, const LX_ATOM *); // conn, mode extern void lx_ForceScreenSaver(LX_CONN *, LX_FORCESCREENSAVER); // conn, num, mapping // mapping must point to num unsigned chars extern void lx_SetPointerMapping(LX_CONN *, int, const unsigned char *); // conn, nump, mapping // mapping must point to enough unsigned chars (255 are always enough) extern LX_OP *lx_GetPointerMapping(LX_CONN *, int *, unsigned char *); // conn, num, keycodesp // keycodesp must point to 8*num LX_KeyCodes extern void lx_SetModifierMapping(LX_CONN *, int, const LX_KEYCODE *); // conn, nump, keycodesp // keycodesp must point to enough space (2048 LX_KEYCODEs is always enough) extern LX_OP *lx_GetModifierMapping(LX_CONN *, int *, LX_KEYCODE *); // conn extern void lx_NoOperation(LX_CONN *);