~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to include/X11/Xlib.h

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* $XdotOrg: lib/X11/include/X11/Xlib.h,v 1.6 2005-11-08 06:33:25 jkj Exp $ */
2
2
/* $Xorg: Xlib.h,v 1.6 2001/02/09 02:03:38 xorgcvs Exp $ */
3
 
/* 
 
3
/*
4
4
 
5
5
Copyright 1985, 1986, 1987, 1991, 1998  The Open Group
6
6
 
84
84
 
85
85
#if defined(ISC) && defined(USE_XMBTOWC)
86
86
#define wctomb(a,b)     _Xwctomb(a,b)
87
 
#define mblen(a,b)      _Xmblen(a,b) 
 
87
#define mblen(a,b)      _Xmblen(a,b)
88
88
#ifndef USE_XWCHAR_STRING
89
89
#define mbtowc(a,b,c)   _Xmbtowc(a,b,c)
90
90
#endif
217
217
        unsigned long background;/* background pixel */
218
218
        int line_width;         /* line width */
219
219
        int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
220
 
        int cap_style;          /* CapNotLast, CapButt, 
 
220
        int cap_style;          /* CapNotLast, CapButt,
221
221
                                   CapRound, CapProjecting */
222
222
        int join_style;         /* JoinMiter, JoinRound, JoinBevel */
223
 
        int fill_style;         /* FillSolid, FillTiled, 
 
223
        int fill_style;         /* FillSolid, FillTiled,
224
224
                                   FillStippled, FillOpaeueStippled */
225
225
        int fill_rule;          /* EvenOddRule, WindingRule */
226
226
        int arc_mode;           /* ArcChord, ArcPieSlice */
271
271
 
272
272
/*
273
273
 * Depth structure; contains information for each possible depth.
274
 
 */     
 
274
 */
275
275
typedef struct {
276
276
        int depth;              /* this depth (Z) of the depth */
277
277
        int nvisuals;           /* number of Visual types at this depth */
302
302
        unsigned long black_pixel;      /* White and Black pixel values */
303
303
        int max_maps, min_maps; /* max and min color maps */
304
304
        int backing_store;      /* Never, WhenMapped, Always */
305
 
        Bool save_unders;       
 
305
        Bool save_unders;
306
306
        long root_input_mask;   /* initial root input mask */
307
307
} Screen;
308
308
 
425
425
        } f;
426
426
} XImage;
427
427
 
428
 
/* 
 
428
/*
429
429
 * Data structure for XReconfigureWindow
430
430
 */
431
431
typedef struct {
446
446
        char pad;
447
447
} XColor;
448
448
 
449
 
/* 
 
449
/*
450
450
 * Data structures for graphics operations.  On most machines, these are
451
451
 * congruent with the wire protocol structures, so reformatting the data
452
452
 * can be avoided on these architectures.
458
458
typedef struct {
459
459
    short x, y;
460
460
} XPoint;
461
 
    
 
461
 
462
462
typedef struct {
463
463
    short x, y;
464
464
    unsigned short width, height;
465
465
} XRectangle;
466
 
    
 
466
 
467
467
typedef struct {
468
468
    short x, y;
469
469
    unsigned short width, height;
522
522
struct _XPrivate;               /* Forward declare before use for C++ */
523
523
struct _XrmHashBucketRec;
524
524
 
525
 
typedef struct 
 
525
typedef struct
526
526
#ifdef XLIB_ILLEGAL_ACCESS
527
527
_XDisplay
528
528
#endif
577
577
        /* there is more to this structure, but it is private to Xlib */
578
578
}
579
579
#ifdef XLIB_ILLEGAL_ACCESS
580
 
Display, 
 
580
Display,
581
581
#endif
582
582
*_XPrivDisplay;
583
583
 
653
653
        int mode;               /* NotifyNormal, NotifyGrab, NotifyUngrab */
654
654
        int detail;
655
655
        /*
656
 
         * NotifyAncestor, NotifyVirtual, NotifyInferior, 
 
656
         * NotifyAncestor, NotifyVirtual, NotifyInferior,
657
657
         * NotifyNonlinear,NotifyNonlinearVirtual
658
658
         */
659
659
        Bool same_screen;       /* same screen flag */
673
673
                                   NotifyGrab, NotifyUngrab */
674
674
        int detail;
675
675
        /*
676
 
         * NotifyAncestor, NotifyVirtual, NotifyInferior, 
 
676
         * NotifyAncestor, NotifyVirtual, NotifyInferior,
677
677
         * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
678
 
         * NotifyPointerRoot, NotifyDetailNone 
 
678
         * NotifyPointerRoot, NotifyDetailNone
679
679
         */
680
680
} XFocusChangeEvent;
681
681
typedef XFocusChangeEvent XFocusInEvent;
689
689
        Display *display;       /* Display the event was read from */
690
690
        Window window;
691
691
        char key_vector[32];
692
 
} XKeymapEvent; 
 
692
} XKeymapEvent;
693
693
 
694
694
typedef struct {
695
695
        int type;
971
971
        Window window;  /* window on which event was requested in event mask */
972
972
} XAnyEvent;
973
973
 
 
974
 
 
975
/***************************************************************
 
976
 *
 
977
 * GenericEvent.  This event is the standard event for all newer extensions.
 
978
 */
 
979
 
 
980
typedef struct
 
981
    {
 
982
    int            type;         /* of event. Always GenericEvent */
 
983
    unsigned long  serial;       /* # of last request processed */
 
984
    Bool           send_event;   /* true if from SendEvent request */
 
985
    Display        *display;     /* Display the event was read from */
 
986
    int            extension;    /* major opcode of extension that caused the event */
 
987
    int            evtype;       /* actual event type. */
 
988
    } XGenericEvent;
 
989
 
974
990
/*
975
991
 * this union is defined so Xlib can always use the same sized
976
992
 * event structure internally, to avoid memory fragmentation.
1248
1264
typedef unsigned long XIMFeedback;
1249
1265
 
1250
1266
#define XIMReverse              1L
1251
 
#define XIMUnderline            (1L<<1) 
 
1267
#define XIMUnderline            (1L<<1)
1252
1268
#define XIMHighlight            (1L<<2)
1253
1269
#define XIMPrimary              (1L<<5)
1254
1270
#define XIMSecondary            (1L<<6)
1260
1276
typedef struct _XIMText {
1261
1277
    unsigned short length;
1262
1278
    XIMFeedback *feedback;
1263
 
    Bool encoding_is_wchar; 
 
1279
    Bool encoding_is_wchar;
1264
1280
    union {
1265
1281
        char *multi_byte;
1266
1282
        wchar_t *wide_char;
1267
 
    } string; 
 
1283
    } string;
1268
1284
} XIMText;
1269
1285
 
1270
1286
typedef unsigned long    XIMPreeditState;
1294
1310
typedef struct _XIMStringConversionText {
1295
1311
    unsigned short length;
1296
1312
    XIMStringConversionFeedback *feedback;
1297
 
    Bool encoding_is_wchar; 
 
1313
    Bool encoding_is_wchar;
1298
1314
    union {
1299
1315
        char *mbs;
1300
1316
        wchar_t *wcs;
1301
 
    } string; 
 
1317
    } string;
1302
1318
} XIMStringConversionText;
1303
1319
 
1304
1320
typedef unsigned short  XIMStringConversionPosition;
1320
1336
    XIMForwardWord, XIMBackwardWord,
1321
1337
    XIMCaretUp, XIMCaretDown,
1322
1338
    XIMNextLine, XIMPreviousLine,
1323
 
    XIMLineStart, XIMLineEnd, 
 
1339
    XIMLineStart, XIMLineEnd,
1324
1340
    XIMAbsolutePosition,
1325
1341
    XIMDontChange
1326
1342
} XIMCaretDirection;
1341
1357
} XIMPreeditDrawCallbackStruct;
1342
1358
 
1343
1359
typedef enum {
1344
 
    XIMIsInvisible,     /* Disable caret feedback */ 
 
1360
    XIMIsInvisible,     /* Disable caret feedback */
1345
1361
    XIMIsPrimary,       /* UI defined caret feedback */
1346
1362
    XIMIsSecondary      /* UI defined caret feedback */
1347
1363
} XIMCaretStyle;
1356
1372
    XIMTextType,
1357
1373
    XIMBitmapType
1358
1374
} XIMStatusDataType;
1359
 
        
 
1375
 
1360
1376
typedef struct _XIMStatusDrawCallbackStruct {
1361
1377
    XIMStatusDataType type;
1362
1378
    union {
1434
1450
#else
1435
1451
    KeyCode             /* keycode_entry */,
1436
1452
#endif
1437
 
    int                 /* modifier */    
 
1453
    int                 /* modifier */
1438
1454
);
1439
1455
 
1440
1456
extern XModifierKeymap *XNewModifiermap(
1480
1496
    int                 /* dest_y */
1481
1497
);
1482
1498
 
1483
 
/* 
 
1499
/*
1484
1500
 * X function declarations.
1485
1501
 */
1486
1502
extern Display *XOpenDisplay(
1513
1529
extern char *XGetDefault(
1514
1530
    Display*            /* display */,
1515
1531
    _Xconst char*       /* program */,
1516
 
    _Xconst char*       /* option */              
 
1532
    _Xconst char*       /* option */
1517
1533
);
1518
1534
extern char *XDisplayName(
1519
1535
    _Xconst char*       /* string */
1539
1555
extern Atom XInternAtom(
1540
1556
    Display*            /* display */,
1541
1557
    _Xconst char*       /* atom_name */,
1542
 
    Bool                /* only_if_exists */             
 
1558
    Bool                /* only_if_exists */
1543
1559
);
1544
1560
extern Status XInternAtoms(
1545
1561
    Display*            /* dpy */,
1556
1572
    Display*            /* display */,
1557
1573
    Window              /* w */,
1558
1574
    Visual*             /* visual */,
1559
 
    int                 /* alloc */                      
 
1575
    int                 /* alloc */
1560
1576
);
1561
1577
extern Cursor XCreatePixmapCursor(
1562
1578
    Display*            /* display */,
1565
1581
    XColor*             /* foreground_color */,
1566
1582
    XColor*             /* background_color */,
1567
1583
    unsigned int        /* x */,
1568
 
    unsigned int        /* y */                    
 
1584
    unsigned int        /* y */
1569
1585
);
1570
1586
extern Cursor XCreateGlyphCursor(
1571
1587
    Display*            /* display */,
1602
1618
    Drawable            /* d */,
1603
1619
    unsigned int        /* width */,
1604
1620
    unsigned int        /* height */,
1605
 
    unsigned int        /* depth */                     
 
1621
    unsigned int        /* depth */
1606
1622
);
1607
1623
extern Pixmap XCreateBitmapFromData(
1608
1624
    Display*            /* display */,
1649
1665
    Visual*             /* visual */,
1650
1666
    unsigned long       /* valuemask */,
1651
1667
    XSetWindowAttributes*       /* attributes */
1652
 
); 
 
1668
);
1653
1669
extern Colormap *XListInstalledColormaps(
1654
1670
    Display*            /* display */,
1655
1671
    Window              /* w */,
1944
1960
extern int XAddHosts(
1945
1961
    Display*            /* display */,
1946
1962
    XHostAddress*       /* hosts */,
1947
 
    int                 /* num_hosts */    
 
1963
    int                 /* num_hosts */
1948
1964
);
1949
1965
 
1950
1966
extern int XAddToExtensionList(
2167
2183
    Display*            /* display */,
2168
2184
    Window              /* w */,
2169
2185
    unsigned int        /* value_mask */,
2170
 
    XWindowChanges*     /* values */             
 
2186
    XWindowChanges*     /* values */
2171
2187
);
2172
2188
 
2173
2189
extern int XConnectionNumber(
2253
2269
);
2254
2270
 
2255
2271
extern int XDoesBackingStore(
2256
 
    Screen*             /* screen */    
 
2272
    Screen*             /* screen */
2257
2273
);
2258
2274
 
2259
2275
extern Bool XDoesSaveUnders(
2538
2554
);
2539
2555
 
2540
2556
extern int XFreeExtensionList(
2541
 
    char**              /* list */    
 
2557
    char**              /* list */
2542
2558
);
2543
2559
 
2544
2560
extern int XFreeFont(
2912
2928
    int                 /* dest_x */,
2913
2929
    int                 /* dest_y */,
2914
2930
    unsigned int        /* width */,
2915
 
    unsigned int        /* height */      
 
2931
    unsigned int        /* height */
2916
2932
);
2917
2933
 
2918
2934
extern int XQLength(
3002
3018
    int*                /* direction_return */,
3003
3019
    int*                /* font_ascent_return */,
3004
3020
    int*                /* font_descent_return */,
3005
 
    XCharStruct*        /* overall_return */    
 
3021
    XCharStruct*        /* overall_return */
3006
3022
);
3007
3023
 
3008
3024
extern int XQueryTextExtents16(
3067
3083
);
3068
3084
 
3069
3085
extern int XRefreshKeyboardMapping(
3070
 
    XMappingEvent*      /* event_map */    
 
3086
    XMappingEvent*      /* event_map */
3071
3087
);
3072
3088
 
3073
3089
extern int XRemoveFromSaveSet(
3223
3239
extern int XSetFontPath(
3224
3240
    Display*            /* display */,
3225
3241
    char**              /* directories */,
3226
 
    int                 /* ndirs */          
 
3242
    int                 /* ndirs */
3227
3243
);
3228
3244
 
3229
3245
extern int XSetForeground(
3522
3538
    unsigned int        /* src_width */,
3523
3539
    unsigned int        /* src_height */,
3524
3540
    int                 /* dest_x */,
3525
 
    int                 /* dest_y */         
 
3541
    int                 /* dest_y */
3526
3542
);
3527
3543
 
3528
3544
extern int XWidthMMOfScreen(
3547
3563
    unsigned int        /* width */,
3548
3564
    unsigned int        /* height */,
3549
3565
    int                 /* x_hot */,
3550
 
    int                 /* y_hot */                  
 
3566
    int                 /* y_hot */
3551
3567
);
3552
3568
 
3553
3569
extern Bool XSupportsLocale (void);
3955
3971
    Bool                        /* opening */,   /* open or close flag */
3956
3972
    XPointer*                   /* watch_data */ /* open sets, close uses */
3957
3973
);
3958
 
    
 
3974
 
3959
3975
 
3960
3976
extern Status XInternalConnectionNumbers(
3961
3977
    Display*                    /* dpy */,
3982
3998
 
3983
3999
extern void XSetAuthorization(
3984
4000
    char *                      /* name */,
3985
 
    int                         /* namelen */, 
 
4001
    int                         /* namelen */,
3986
4002
    char *                      /* data */,
3987
4003
    int                         /* datalen */
3988
4004
);