?? xlib.h
字號:
/* * per character font metric information. */typedef struct { short lbearing; /* origin to left edge of raster */ short rbearing; /* origin to right edge of raster */ short width; /* advance to next char's origin */ short ascent; /* baseline to top edge of raster */ short descent; /* baseline to bottom edge of raster */ unsigned short attributes; /* per char flags (not predefined) */} XCharStruct;/* * To allow arbitrary information with fonts, there are additional properties * returned. */typedef struct { Atom name; unsigned long card32;} XFontProp;typedef struct { XExtData *ext_data; /* hook for extension to hang data */ Font fid; /* Font id for this font */ unsigned direction; /* hint about direction the font is painted */ unsigned min_char_or_byte2;/* first character */ unsigned max_char_or_byte2;/* last character */ unsigned min_byte1; /* first row that exists */ unsigned max_byte1; /* last row that exists */ Bool all_chars_exist;/* flag if all characters have non-zero size*/ unsigned default_char; /* char to print for undefined character */ int n_properties; /* how many properties there are */ XFontProp *properties; /* pointer to array of additional properties*/ XCharStruct min_bounds; /* minimum bounds over all existing char*/ XCharStruct max_bounds; /* maximum bounds over all existing char*/ XCharStruct *per_char; /* first_char to last_char information */ int ascent; /* log. extent above baseline for spacing */ int descent; /* log. descent below baseline for spacing */} XFontStruct;/* * PolyText routines take these as arguments. */typedef struct { char *chars; /* pointer to string */ int nchars; /* number of characters */ int delta; /* delta between strings */ Font font; /* font to print it in, None don't change */} XTextItem;typedef struct { /* normal 16 bit characters are two bytes */ unsigned char byte1; unsigned char byte2;} XChar2b;typedef struct { XChar2b *chars; /* two byte characters */ int nchars; /* number of characters */ int delta; /* delta between strings */ Font font; /* font to print it in, None don't change */} XTextItem16;typedef union { Display *display; GC gc; Visual *visual; Screen *screen; ScreenFormat *pixmap_format; XFontStruct *font; } XEDataObject;typedef struct { XRectangle max_ink_extent; XRectangle max_logical_extent;} XFontSetExtents;typedef struct _XFontSet *XFontSet;typedef struct { char *chars; int nchars; int delta; XFontSet font_set;} XmbTextItem;typedef struct { wchar_t *chars; int nchars; int delta; XFontSet font_set;} XwcTextItem;typedef void (*XIMProc)();typedef struct _XIM *XIM;typedef struct _XIC *XIC;typedef unsigned long XIMStyle;typedef struct { unsigned short count_styles; XIMStyle *supported_styles;} XIMStyles;#define XIMPreeditArea 0x0001L#define XIMPreeditCallbacks 0x0002L#define XIMPreeditPosition 0x0004L#define XIMPreeditNothing 0x0008L#define XIMPreeditNone 0x0010L#define XIMStatusArea 0x0100L#define XIMStatusCallbacks 0x0200L#define XIMStatusNothing 0x0400L#define XIMStatusNone 0x0800L#define XNVaNestedList "XNVaNestedList"#define XNClientWindow "clientWindow"#define XNInputStyle "inputStyle"#define XNFocusWindow "focusWindow"#define XNResourceName "resourceName"#define XNResourceClass "resourceClass"#define XNGeometryCallback "geometryCallback"#define XNFilterEvents "filterEvents"#define XNPreeditStartCallback "preeditStartCallback"#define XNPreeditDoneCallback "preeditDoneCallback"#define XNPreeditDrawCallback "preeditDrawCallback"#define XNPreeditCaretCallback "preeditCaretCallback"#define XNPreeditAttributes "preeditAttributes"#define XNStatusStartCallback "statusStartCallback"#define XNStatusDoneCallback "statusDoneCallback"#define XNStatusDrawCallback "statusDrawCallback"#define XNStatusAttributes "statusAttributes"#define XNArea "area"#define XNAreaNeeded "areaNeeded"#define XNSpotLocation "spotLocation"#define XNColormap "colorMap"#define XNStdColormap "stdColorMap"#define XNForeground "foreground"#define XNBackground "background"#define XNBackgroundPixmap "backgroundPixmap"#define XNFontSet "fontSet"#define XNLineSpace "lineSpace"#define XNCursor "cursor"#define XBufferOverflow -1#define XLookupNone 1#define XLookupChars 2#define XLookupKeySym 3#define XLookupBoth 4#if NeedFunctionPrototypestypedef void *XVaNestedList;#elsetypedef XPointer XVaNestedList;#endiftypedef struct { XPointer client_data; XIMProc callback;} XIMCallback;typedef unsigned long XIMFeedback;#define XIMReverse 1#define XIMUnderline (1<<1) #define XIMHighlight (1<<2)#define XIMPrimary (1<<5)#define XIMSecondary (1<<6)#define XIMTertiary (1<<7)typedef struct _XIMText { unsigned short length; XIMFeedback *feedback; Bool encoding_is_wchar; union { char *multi_byte; wchar_t *wide_char; } string; } XIMText;typedef struct _XIMPreeditDrawCallbackStruct { int caret; /* Cursor offset within pre-edit string */ int chg_first; /* Starting change position */ int chg_length; /* Length of the change in character count */ XIMText *text;} XIMPreeditDrawCallbackStruct;typedef enum { XIMForwardChar, XIMBackwardChar, XIMForwardWord, XIMBackwardWord, XIMCaretUp, XIMCaretDown, XIMNextLine, XIMPreviousLine, XIMLineStart, XIMLineEnd, XIMAbsolutePosition, XIMDontChange} XIMCaretDirection;typedef enum { XIMIsInvisible, /* Disable caret feedback */ XIMIsPrimary, /* UI defined caret feedback */ XIMIsSecondary /* UI defined caret feedback */} XIMCaretStyle;typedef struct _XIMPreeditCaretCallbackStruct { int position; /* Caret offset within pre-edit string */ XIMCaretDirection direction; /* Caret moves direction */ XIMCaretStyle style; /* Feedback of the caret */} XIMPreeditCaretCallbackStruct;typedef enum { XIMTextType, XIMBitmapType} XIMStatusDataType; typedef struct _XIMStatusDrawCallbackStruct { XIMStatusDataType type; union { XIMText *text; Pixmap bitmap; } data;} XIMStatusDrawCallbackStruct;_XFUNCPROTOBEGINextern XFontStruct *XLoadQueryFont(#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */#endif);extern XFontStruct *XQueryFont(#if NeedFunctionPrototypes Display* /* display */, XID /* font_ID */#endif);extern XTimeCoord *XGetMotionEvents(#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Time /* start */, Time /* stop */, int* /* nevents_return */#endif);extern XModifierKeymap *XDeleteModifiermapEntry(#if NeedFunctionPrototypes XModifierKeymap* /* modmap */,#if NeedWidePrototypes unsigned int /* keycode_entry */,#else KeyCode /* keycode_entry */,#endif int /* modifier */#endif);extern XModifierKeymap *XGetModifierMapping(#if NeedFunctionPrototypes Display* /* display */#endif);extern XModifierKeymap *XInsertModifiermapEntry(#if NeedFunctionPrototypes XModifierKeymap* /* modmap */,#if NeedWidePrototypes unsigned int /* keycode_entry */,#else KeyCode /* keycode_entry */,#endif int /* modifier */ #endif);extern XModifierKeymap *XNewModifiermap(#if NeedFunctionPrototypes int /* max_keys_per_mod */#endif);extern XImage *XCreateImage(#if NeedFunctionPrototypes Display* /* display */, Visual* /* visual */, unsigned int /* depth */, int /* format */, int /* offset */, char* /* data */, unsigned int /* width */, unsigned int /* height */, int /* bitmap_pad */, int /* bytes_per_line */#endif);extern XImage *XGetImage(#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned long /* plane_mask */, int /* format */#endif);extern XImage *XGetSubImage(#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, int /* x */, int /* y */, unsigned int /* width */, unsigned int /* height */, unsigned long /* plane_mask */, int /* format */, XImage* /* dest_image */, int /* dest_x */, int /* dest_y */#endif);/* * X function declarations. */extern Display *XOpenDisplay(#if NeedFunctionPrototypes _Xconst char* /* display_name */#endif);extern void XrmInitialize(#if NeedFunctionPrototypes void#endif);extern char *XFetchBytes(#if NeedFunctionPrototypes Display* /* display */, int* /* nbytes_return */#endif);extern char *XFetchBuffer(#if NeedFunctionPrototypes Display* /* display */, int* /* nbytes_return */, int /* buffer */#endif);extern char *XGetAtomName(#if NeedFunctionPrototypes Display* /* display */, Atom /* atom */#endif);extern char *XGetDefault(#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* program */, _Xconst char* /* option */ #endif);extern char *XDisplayName(#if NeedFunctionPrototypes _Xconst char* /* string */#endif);extern char *XKeysymToString(#if NeedFunctionPrototypes KeySym /* keysym */#endif);extern int (*XSynchronize(#if NeedFunctionPrototypes Display* /* display */, Bool /* onoff */#endif))();extern int (*XSetAfterFunction(#if NeedFunctionPrototypes Display* /* display */, int (*) (#if NeedNestedPrototypes Display* /* display */#endif ) /* procedure */#endif))();extern Atom XInternAtom(#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* atom_name */, Bool /* only_if_exists */ #endif);extern Colormap XCopyColormapAndFree(#if NeedFunctionPrototypes Display* /* display */, Colormap /* colormap */#endif);extern Colormap XCreateColormap(#if NeedFunctionPrototypes Display* /* display */, Window /* w */, Visual* /* visual */, int /* alloc */ #endif);extern Cursor XCreatePixmapCursor(#if NeedFunctionPrototypes Display* /* display */, Pixmap /* source */, Pixmap /* mask */, XColor* /* foreground_color */, XColor* /* background_color */, unsigned int /* x */, unsigned int /* y */ #endif);extern Cursor XCreateGlyphCursor(#if NeedFunctionPrototypes Display* /* display */, Font /* source_font */, Font /* mask_font */, unsigned int /* source_char */, unsigned int /* mask_char */, XColor* /* foreground_color */, XColor* /* background_color */#endif);extern Cursor XCreateFontCursor(#if NeedFunctionPrototypes Display* /* display */, unsigned int /* shape */#endif);extern Font XLoadFont(#if NeedFunctionPrototypes Display* /* display */, _Xconst char* /* name */#endif);extern GC XCreateGC(#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, unsigned long /* valuemask */, XGCValues* /* values */#endif);extern GContext XGContextFromGC(#if NeedFunctionPrototypes GC /* gc */#endif);extern void XFlushGC(#if NeedFunctionPrototypes Display* /* display */, GC /* gc */#endif);extern Pixmap XCreatePixmap(#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, unsigned int /* width */, unsigned int /* height */, unsigned int /* depth */ #endif);extern Pixmap XCreateBitmapFromData(#if NeedFunctionPrototypes Display* /* display */, Drawable /* d */, _Xconst char* /* data */, unsigned int /* width */, unsigned int /* height */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -