home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sa104os2.zip / SATHR104.ZIP / SATHER / CONTRIB / SCHNETTR / XLIB / PIXMAP.SA < prev    next >
Text File  |  1994-11-14  |  1KB  |  42 lines

  1. -- -*-Sather-*-
  2. -- access to the X window system routines
  3. -- (c) 1994/11/03 - 1994/11/14 by Erik Schnetter
  4.    
  5.    
  6.    
  7. class X_PIXMAP < $X_DRAWABLE is
  8.    -- handle a pixmap
  9.    
  10.    include X_DRAWABLE;
  11.    
  12. -- create a pixmap
  13.    Create (disp: X_DISPLAY, drawable: $X_DRAWABLE,
  14.    width, height: INT, depth: INT) pre Void post ~Void is
  15.       display := disp;
  16.       c_drawable := C_X_PIXMAP::X_CreatePixmap
  17.       (display.c_display, drawable.c_drawable,
  18.       width, height, depth);
  19.    end; -- Create
  20.    
  21.    Create (disp: X_DISPLAY, drawable: $X_DRAWABLE,
  22.    offset: X_OFFSET, depth: INT) pre Void post ~Void is
  23.       Create (disp, drawable, offset.width, offset.height, depth) end;
  24.    
  25. -- destroy the pixmap
  26.    Destroy pre ~Void post Void is
  27.       C_X_PIXMAP::X_FreePixmap (display.c_display, c_drawable);
  28.       c_drawable := void_c_drawable;
  29.    end; -- Destroy
  30.    
  31. end; -- class X_PIXMAP
  32.    
  33.    
  34.    
  35. external class C_X_PIXMAP is
  36.    
  37.    X_CreatePixmap (display: EXT_OB, drawable: INT,
  38.    width, height: INT, depth: INT): INT;
  39.    X_FreePixmap (display: EXT_OB, pixmap: INT);
  40.    
  41. end; -- class C_X_PIXMAP
  42.