All pastes #881888 Raw Edit

Reportingsjr

public text v1 · immutable
#881888 ·published 2008-01-30 00:44 UTC
rendered paste body
cdef extern from "X11/X.h" :
  cdef enum :
    GXcopy
    GCFunction
    
  ctypedef unsigned long XID    
  ctypedef XID GContext



cdef extern from "X11/Xlib.h" :
  ctypedef char *XPointer
  ctypedef void _XDisplay

  ctypedef struct XImage :
    int width, height
    int xoffset
    int format
    char *data
    int byte_order
    int bitmap_unit
    int bitmap_bit_order
    int bitmap_pad
    int depth
    int bytes_per_line
    int bits_per_pixel
    unsigned long red_mask
    unsigned long green_mask
    unsigned long blue_mask
    XPointer obdata
   
  ctypedef struct XExtData :
    int number
    XPointer private_data
  
  ctypedef struct XCGValues :
    int function
    unsigned long plane_mask
    unsigned long foreground
    unsigned long background
    int line_width
    int line_style
    int cap_style
    int join_style
    int fill_style
    int fill_rule
    int arc_mode
    Pixmap tile
    Pixmap stipple
    int ts_x_origin
    int ts_y_origin
    int subwindow_mode
    Bool graphics_exposures
    int clip_x_origin
    int clip_y_origin
    Pixmap clip_mask
    int dash_offset
    char dashes
  
  ctypedef struct GC :
   GContext gid
   XExtData *ext_data

  cdef XImage *XCreateImage( Display*, Visual*, unsigned int,
                             int, int, char*, unsigned int,
                             unsigned int, int, int )                        
  cdef int XPutImage( Display*, Drawable, GC, XImage*,
                      int, int, int, int, unsigned int,
                      unsigned int )                   
  cdef GC XCreateGX( Display*, Drawable, unsigned long,
                     XGCValues* )