Problem with interfacing C code to D

bioinfornatics bioinfornatics at
Mon Jan 9 16:34:13 PST 2012

Le mardi 10 janvier 2012 à 01:26 +0100, Trass3r a écrit :
> What's the definition of Display?

This one:
struct _XDisplay{
    XExtData* ext_data;                             /* hook for
extension to hang data                              */
    _XPrivate* private1;
    int fd;                                         /* Network socket.
    int private2;
    int proto_major_version;                        /* major version of
server's X protocol */
    int proto_minor_version;                        /* minor version of
servers X protocol */
    char* vendor;                                   /* vendor of the
server hardware */
    XID private3;
    XID private4;
    XID private5;
    int private6;
    XID function(_XDisplay*)resource_alloc;         /* allocator
function */
    int char_order;                                 /* screen char
order, LSBFirst, MSBFirst */
    int bitmap_unit;                                /* padding and data
requirements */
    int bitmap_pad;                                 /* padding
requirements on bitmaps */
    int bitmap_bit_order;                           /* LeastSignificant
or MostSignificant */
    int nformats;                                   /* number of pixmap
formats in list */
    ScreenFormat* pixmap_format;                    /* pixmap format
list */
    int private8;
    int release;                                    /* release of the
server */
    _XPrivate* private9, private10;
    int qlen;                                       /* Length of input
event queue */
    c_ulong  last_request_read;                     /* seq number of
last event read */
    c_ulong  request;                               /* sequence number
of last request. */
    XPointer private11;
    XPointer private12;
    XPointer private13;
    XPointer private14;
    uint max_request_size;                          /* maximum number 32
bit words in request*/
    _XrmHashBucketRec* db;
    int function( _XDisplay* )private15;
    char* display_name;                             /* "host:display"
string used on this connect*/
    int default_screen;                             /* default screen
for operations */
    int nscreens;                                   /* number of screens
on this server*/
    Screen* screens;                                /* pointer to list
of screens */
    c_ulong motion_buffer;                          /* size of motion
buffer */
    c_ulong private16;
    int min_keycode;                                /* minimum defined
keycode */
    int max_keycode;                                /* maximum defined
keycode */
    XPointer private17;
    XPointer private18;
    int private19;
    char* xdefaults;                                /* contents of
defaults from server */
    /* there is more to this structure, but it is private to Xlib */
alias _XDisplay Display;

More information about the Digitalmars-d-learn mailing list