"Fossies" - the Fresh Open Source Software Archive

Member "Ygl-4.2/X11/Ygl.h" (8 May 2012, 26528 Bytes) of package /linux/misc/Ygl-4.2g.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Ygl.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 4.2f_vs_4.2g.

    1 /*
    2  *    Ygl: Run GL programs with standard X11 routines.
    3  *    (C) Fred Hucht 1993-2009
    4  *    EMail: fred@thp.Uni-DuE.de
    5  *
    6  *    $Id: Ygl.h,v 4.6 2009-09-18 12:01:11+02 fred Exp fred $
    7  */
    8 
    9 #ifndef _YGL_INCLUDED_
   10 #define _YGL_INCLUDED_
   11 
   12 #include <sys/types.h>
   13 
   14 #ifdef _AUX_SOURCE
   15 # include <X11/Yglprefix.h>
   16 #endif
   17 
   18 #ifdef __cplusplus
   19 extern "C" {
   20 #endif
   21   
   22 #define BLACK           0
   23 #define WHITE           1
   24 #define GREEN           2
   25 #define YELLOW          3
   26 #define BLUE            4
   27 #define MAGENTA         5
   28 #define CYAN            6
   29 #define RED         7
   30   
   31   /* for queue */
   32 #define NULLDEV         0
   33 #define BREAKKEY        1
   34 #define SETUPKEY        2
   35 #define LEFTCTRLKEY     3
   36 #define CAPSLOCKKEY     4
   37 #define RIGHTSHIFTKEY       5
   38 #define LEFTSHIFTKEY        6
   39 #define ESCKEY          7
   40 #define ONEKEY          8
   41 #define TABKEY          9
   42 #define QKEY            10
   43 #define AKEY            11
   44 #define SKEY            12
   45 #define NOSCRLKEY       13
   46 #define TWOKEY          14
   47 #define THREEKEY        15
   48 #define WKEY            16
   49 #define EKEY            17
   50 #define DKEY            18
   51 #define FKEY            19
   52 #define ZKEY            20
   53 #define XKEY            21
   54 #define FOURKEY         22
   55 #define FIVEKEY         23
   56 #define RKEY            24
   57 #define TKEY            25
   58 #define GKEY            26
   59 #define HKEY            27
   60 #define CKEY            28
   61 #define VKEY            29
   62 #define SIXKEY          30
   63 #define SEVENKEY        31
   64 #define YKEY            32
   65 #define UKEY            33
   66 #define JKEY            34
   67 #define KKEY            35
   68 #define BKEY            36
   69 #define NKEY            37
   70 #define EIGHTKEY        38
   71 #define NINEKEY         39
   72 #define IKEY            40
   73 #define OKEY            41
   74 #define LKEY            42
   75 #define SEMICOLONKEY        43
   76 #define MKEY            44
   77 #define COMMAKEY        45
   78 #define ZEROKEY         46
   79 #define MINUSKEY        47
   80 #define PKEY            48
   81 #define LEFTBRACKETKEY      49
   82 #define QUOTEKEY        50
   83 #define RETKEY          51
   84 #define PERIODKEY       52
   85 #define VIRGULEKEY      53
   86 #define EQUALKEY        54
   87 #define ACCENTGRAVEKEY      55
   88 #define RIGHTBRACKETKEY     56
   89 #define BACKSLASHKEY        57
   90 #define PAD1            58
   91 #define PAD0            59
   92 #define LINEFEEDKEY     60
   93 #define BACKSPACEKEY        61
   94 #define DELKEY          62
   95 #define PAD4            63
   96 #define PAD2            64
   97 #define PAD3            65
   98 #define PADPERIOD       66
   99 #define PAD7            67
  100 #define PAD8            68
  101 #define PAD5            69
  102 #define PAD6            70
  103 #define PADPF2          71
  104 #define PADPF1          72
  105 #define LEFTARROWKEY        73
  106 #define DOWNARROWKEY        74
  107 #define PAD9            75
  108 #define PADMINUS        76
  109 #define PADCOMMA        77
  110 #define PADPF4          78
  111 #define PADPF3          79
  112 #define RIGHTARROWKEY       80
  113 #define UPARROWKEY      81
  114 #define PADENTER        82
  115 #define SPACEKEY        83
  116 #define LEFTALTKEY      143
  117 #define RIGHTALTKEY     144
  118 #define RIGHTCTRLKEY        145
  119 #define F1KEY           146
  120 #define F2KEY           147
  121 #define F3KEY           148
  122 #define F4KEY           149
  123 #define F5KEY           150
  124 #define F6KEY           151
  125 #define F7KEY           152
  126 #define F8KEY           153
  127 #define F9KEY           154
  128 #define F10KEY          155
  129 #define F11KEY          156
  130 #define F12KEY          157
  131 #define PRINTSCREENKEY      158
  132 #define SCROLLLOCKKEY       159
  133 #define PAUSEKEY        160
  134 #define INSERTKEY       161
  135 #define HOMEKEY         162
  136 #define PAGEUPKEY       163
  137 #define ENDKEY          164
  138 #define PAGEDOWNKEY     165
  139 #define NUMLOCKKEY      166
  140 #define PADVIRGULEKEY       167
  141 #define PADASTERKEY     168
  142 #define PADPLUSKEY      169
  143   
  144 #define MOUSE1          101
  145 #define MOUSE2          102
  146 #define MOUSE3          103
  147 #define LEFTMOUSE       103
  148 #define MIDDLEMOUSE     102
  149 #define RIGHTMOUSE      101
  150 #define MENUBUTTON      101
  151   
  152   /* Wheel mouse (not in GL) */
  153 #define WHEELUP         200
  154 #define WHEELDOWN       201
  155   
  156 #define MOUSEX          266
  157 #define MOUSEY          267
  158   
  159 #define ANYKEY          512
  160 #define KEYBD           513
  161 #define TIMER0          515
  162 #define TIMER1          516
  163 #define TIMER2          517
  164 #define TIMER3          518
  165 #define REDRAW          528
  166 #define INPUTCHANGE     534
  167 #define WINCLOSE        537
  168 #define WINFREEZE       539
  169 #define WINTHAW         540
  170 #define WINQUIT         542
  171 #define DEPTHCHANGE     543
  172   
  173 #define MAXYGLDEVICE        544
  174   
  175   /* for readsource(): */
  176 #define SRC_AUTO        0
  177 #define SRC_FRONT       1
  178 #define SRC_BACK        2
  179   
  180   /* for getdisplaymode(): */
  181 #define DMRGB           0L
  182 #define DMSINGLE        1L
  183 #define DMDOUBLE        2L
  184 #define DMRGBDOUBLE     5L
  185   
  186   /* for getgdesc(): */
  187 #define GD_XPMAX        1L
  188 #define GD_YPMAX        2L
  189   
  190   /* {XY}MAXSCREEN are dynamic */
  191 #define XMAXSCREEN (getgdesc(GD_XPMAX) - 1)
  192 #define YMAXSCREEN (getgdesc(GD_YPMAX) - 1)
  193 
  194   /* for setpup() */
  195 #define PUP_NONE        0
  196 #define PUP_GREY        1
  197   
  198   /* for logicop() */
  199 #define LO_ZERO         0x0
  200 #define LO_AND          0x1
  201 #define LO_ANDR         0x2
  202 #define LO_SRC          0x3
  203 #define LO_ANDI         0x4
  204 #define LO_DST          0x5
  205 #define LO_XOR          0x6
  206 #define LO_OR           0x7
  207 #define LO_NOR          0x8
  208 #define LO_XNOR         0x9
  209 #define LO_NDST         0xa
  210 #define LO_ORR          0xb
  211 #define LO_NSRC         0xc
  212 #define LO_ORI          0xd
  213 #define LO_NAND         0xe
  214 #define LO_ONE          0xf
  215 #define LO_MIN          0x10
  216 #define LO_MAX          0x11
  217 #define LO_AVG          0x12
  218 #define LO_DMS          0x13
  219 #define LO_SMD          0x14
  220 #define LO_SUM          0x15
  221   
  222   /* for mmode() */
  223 #define MSINGLE         0
  224 #define MPROJECTION     1
  225 #define MVIEWING        2
  226 
  227   /* for blendfunction() */
  228 #define BF_ZERO         0
  229 #define BF_ONE          1
  230 #define BF_SC           2
  231 #define BF_MSC          3
  232 #define BF_SA           4
  233 #define BF_MSA          5
  234 #define BF_DA           6
  235 #define BF_MDA          7
  236 #define BF_DC           8
  237 #define BF_MDC          9
  238 #define BF_MIN_SA_MDA       10
  239   
  240   /* for zfunction() */
  241 #define ZF_NEVER        0
  242 #define ZF_LESS         1
  243 #define ZF_EQUAL        2
  244 #define ZF_LEQUAL       3
  245 #define ZF_GREATER      4
  246 #define ZF_NOTEQUAL     5
  247 #define ZF_GEQUAL       6
  248 #define ZF_ALWAYS       7
  249 
  250   /* for lmdef(): MATERIAL properties */
  251 #define DEFMATERIAL     0
  252 #define EMISSION        1
  253 #define AMBIENT         2
  254 #define DIFFUSE         3
  255 #define SPECULAR        4
  256 #define SHININESS       5
  257 #define COLORINDEXES        6
  258 #define ALPHA           7
  259   /* for lmdef(): LIGHT properties */
  260 #define DEFLIGHT        100
  261 #define LCOLOR          101
  262 #define POSITION        102
  263 #define SPOTDIRECTION       103
  264 #define SPOTLIGHT       104
  265 
  266   /* LIGHTINGMODEL properties */
  267 #define DEFLMODEL       200
  268 #define LOCALVIEWER     201
  269 #define ATTENUATION     202
  270 #define ATTENUATION2        203 /* used by SGI */
  271 #define TWOSIDE         204
  272 
  273   /* TARGET constants */
  274 #define MATERIAL        1000
  275 #define BACKMATERIAL        1001
  276 #define LIGHT0          1100
  277 #define LIGHT1          1101
  278 #define LIGHT2          1102
  279 #define LIGHT3          1103
  280 #define LIGHT4          1104
  281 #define LIGHT5          1105
  282 #define LIGHT6          1106
  283 #define LIGHT7          1107
  284 #define LMODEL          1200
  285 
  286   /* for lmcolor(): modes */
  287 #define LMC_COLOR       0
  288 #define LMC_EMISSION    1
  289 #define LMC_AMBIENT     2
  290 #define LMC_DIFFUSE     3
  291 #define LMC_SPECULAR    4
  292 #define LMC_AD          5
  293 #define LMC_NULL        6
  294 
  295   /* for lmdef(): constants     */
  296 #define LMNULL           0.0
  297 
  298   /* for shademodel() */
  299 #define FLAT            0
  300 #define GOURAUD         1
  301 
  302   /* Types */
  303 #include <X11/Ygltypes.h>
  304   typedef char          Char8;
  305   typedef char          Void;
  306   
  307   typedef Uint8         Byte;
  308   typedef Uint8         RGBvalue;
  309   
  310   typedef Uint16        Colorindex;
  311   typedef Uint16        Device;
  312   typedef Uint16        Linestyle;
  313   
  314   typedef Int16         Angle;
  315   typedef Int16         Scoord;
  316   typedef Int16         Screencoord;
  317   
  318   typedef Int32         Icoord;
  319   
  320   typedef Float32       Coord;
  321   
  322   typedef Float32       Matrix[4][4];
  323 
  324   /********************* draw.c */
  325   extern void  clear        ( void );
  326   
  327   /* Points */
  328   extern void  pnt2         (  Coord,  Coord );
  329   extern void  pnt2i        ( Icoord, Icoord );
  330   extern void  pnt2s        ( Scoord, Scoord );
  331   
  332   /* Lines */
  333   extern void  move2        (  Coord,  Coord );
  334   extern void  move2i       ( Icoord, Icoord );
  335   extern void  move2s       ( Scoord, Scoord );
  336   
  337   extern void  rmv2         (  Coord,  Coord );
  338   extern void  rmv2i        ( Icoord, Icoord );
  339   extern void  rmv2s        ( Scoord, Scoord );
  340   
  341   extern void  draw2        (  Coord,  Coord );
  342   extern void  draw2i       ( Icoord, Icoord );
  343   extern void  draw2s       ( Scoord, Scoord );
  344   
  345   extern void  rdr2         (  Coord,  Coord );
  346   extern void  rdr2i        ( Icoord, Icoord );
  347   extern void  rdr2s        ( Scoord, Scoord );
  348   
  349   /* Arcs & Circles */
  350   extern void  arc      (  Coord,  Coord,  Coord, Angle, Angle );
  351   extern void  arci     ( Icoord, Icoord, Icoord, Angle, Angle );
  352   extern void  arcs     ( Scoord, Scoord, Scoord, Angle, Angle );
  353   
  354   extern void  arcf         (  Coord,  Coord,  Coord, Angle, Angle );
  355   extern void  arcfi        ( Icoord, Icoord, Icoord, Angle, Angle );
  356   extern void  arcfs        ( Scoord, Scoord, Scoord, Angle, Angle );
  357   
  358   extern void  circ         (  Coord,  Coord,  Coord );
  359   extern void  circi        ( Icoord, Icoord, Icoord );
  360   extern void  circs        ( Scoord, Scoord, Scoord );
  361   
  362   extern void  circf        (  Coord,  Coord,  Coord );
  363   extern void  circfi       ( Icoord, Icoord, Icoord );
  364   extern void  circfs       ( Scoord, Scoord, Scoord );
  365   
  366   /* Rects & Boxes */
  367   extern void  rect         (  Coord,  Coord,  Coord,  Coord );
  368   extern void  recti        ( Icoord, Icoord, Icoord, Icoord );
  369   extern void  rects        ( Scoord, Scoord, Scoord, Scoord );
  370   
  371   extern void  rectf        (  Coord,  Coord,  Coord,  Coord );
  372   extern void  rectfi       ( Icoord, Icoord, Icoord, Icoord );
  373   extern void  rectfs       ( Scoord, Scoord, Scoord, Scoord );
  374   
  375   extern void  sbox         (  Coord,  Coord,  Coord,  Coord );
  376   extern void  sboxi        ( Icoord, Icoord, Icoord, Icoord );
  377   extern void  sboxs        ( Scoord, Scoord, Scoord, Scoord );
  378   
  379   extern void  sboxf        (  Coord,  Coord,  Coord,  Coord );
  380   extern void  sboxfi       ( Icoord, Icoord, Icoord, Icoord );
  381   extern void  sboxfs       ( Scoord, Scoord, Scoord, Scoord );
  382   
  383   /* Filled Polygons */
  384   extern void  concave      ( Int32 );
  385   
  386   extern void  pmv2         (  Coord,  Coord );
  387   extern void  pmv2i        ( Icoord, Icoord );
  388   extern void  pmv2s        ( Scoord, Scoord );
  389   
  390   extern void  rpmv2        (  Coord,  Coord );
  391   extern void  rpmv2i       ( Icoord, Icoord );
  392   extern void  rpmv2s       ( Scoord, Scoord );
  393   
  394   extern void  pdr2         (  Coord,  Coord );
  395   extern void  pdr2i        ( Icoord, Icoord );
  396   extern void  pdr2s        ( Scoord, Scoord );
  397   
  398   extern void  rpdr2        (  Coord,  Coord );
  399   extern void  rpdr2i       ( Icoord, Icoord );
  400   extern void  rpdr2s       ( Scoord, Scoord );
  401   
  402   extern void  pclos        ( void );
  403   
  404   extern void  poly2        ( Int32,  Coord[][2] );
  405   extern void  poly2i       ( Int32, Icoord[][2] );
  406   extern void  poly2s       ( Int32, Scoord[][2] );
  407   
  408   extern void  polf2        ( Int32,  Coord[][2] );
  409   extern void  polf2i       ( Int32, Icoord[][2] );
  410   extern void  polf2s       ( Int32, Scoord[][2] );
  411   
  412   /* Vertex graphics */
  413   extern void  bgnpoint     ( void );
  414   extern void  bgnline      ( void );
  415   extern void  bgnclosedline    ( void );
  416   extern void  bgnpolygon   ( void );
  417   extern void  bgntmesh     ( void );
  418   
  419   extern void  endpoint     ( void );
  420   extern void  endline      ( void );
  421   extern void  endclosedline    ( void );
  422   extern void  endpolygon   ( void );
  423   extern void  endtmesh     ( void );
  424   
  425   extern void  v2s      ( Int16[2] );
  426   extern void  v2i      ( Int32[2] );
  427   extern void  v2f      ( Float32[2] );
  428   extern void  v2d      ( Float64[2] );
  429   
  430   /* Text */
  431   extern void  cmov2        (  Coord,  Coord );
  432   extern void  cmov2i       ( Icoord, Icoord );
  433   extern void  cmov2s       ( Scoord, Scoord );
  434   
  435   extern void  getcpos      ( Screencoord *, Screencoord * );
  436   
  437   /* Extensions: Routines not in gl by MiSt (michael@thp.Uni-Duisburg.de) */
  438 #ifdef X11
  439   extern void  arcx         (  Coord,  Coord,  Coord,  Coord, Angle, Angle );
  440   extern void  arcxi        ( Icoord, Icoord, Icoord, Icoord, Angle, Angle );
  441   extern void  arcxs        ( Scoord, Scoord, Scoord, Scoord, Angle, Angle );
  442   
  443   extern void  arcxf        (  Coord,  Coord,  Coord,  Coord, Angle, Angle );
  444   extern void  arcxfi       ( Icoord, Icoord, Icoord, Icoord, Angle, Angle );
  445   extern void  arcxfs       ( Scoord, Scoord, Scoord, Scoord, Angle, Angle );
  446 #endif
  447   
  448   /********************* queue.c */
  449   extern void  tie      ( Device, Device, Device );
  450   extern void  noise        ( Device, Int16 );
  451   extern Int32 isqueued     ( Int16 );
  452   extern void  qdevice      ( Device );
  453   extern void  unqdevice    ( Device );
  454   extern void  qreset       ( void );
  455   extern Int32 qtest        ( void );
  456   extern Int32 qread        ( Int16 * );
  457   extern void  qenter       ( Int16, Int16 );
  458 
  459   extern void pick      ( Int16 *, Int32 );
  460   extern Int32 endpick      ( Int16[] );
  461   extern void picksize      ( Int16, Int16 );
  462   
  463   extern void initnames     ( void );
  464   extern void loadname      ( Int16 );
  465   extern void pushname      ( Int16 );
  466   extern void popname       ( void );
  467   
  468   /********************* misc.c */
  469   extern void  singlebuffer     ( void );
  470   extern void  doublebuffer     ( void );
  471   extern void  swapbuffers  ( void );
  472   extern void  frontbuffer  ( Int32 );
  473   extern void  backbuffer   ( Int32 );
  474   
  475   extern void  gflush       ( void );
  476   extern void  gsync        ( void );
  477   
  478 #ifdef _XLIB_H_         /* Declare if <X11/Xlib.h> is included */
  479   extern Display *getXdpy   ( void );
  480   extern Window   getXwid   ( void );
  481 #ifdef X11
  482   extern Window   getXdid   ( void );
  483   extern GC       getXgc    ( void );
  484 #endif
  485 #endif /* _XLIB_H_ */
  486   
  487   extern void  wintitle     ( Char8 * );
  488   extern void  winset       ( Int32 );
  489   extern Int32 winget       ( void );
  490   extern Int32 getplanes    ( void );
  491   extern Int32 getvaluator  ( Device );
  492   extern Int32 getbutton    ( Device );
  493   extern Int32 gversion     ( Char8[12] );
  494   
  495   extern void  ortho2       ( Coord, Coord, Coord, Coord );
  496   extern void  viewport     ( Screencoord, Screencoord, Screencoord, Screencoord );
  497   extern void  getviewport  ( Screencoord *, Screencoord *, Screencoord *, Screencoord * );
  498   extern void  reshapeviewport  ( void );
  499   extern void  pushviewport     ( void );
  500   extern void  popviewport  ( void );
  501   
  502   extern void  winpop       ( void );
  503   extern void  winpush      ( void );
  504   extern Int32 windepth     ( Int32 );
  505   
  506   extern void  linewidth    ( Int16 );
  507   extern Int32 getlwidth    ( void );
  508   extern void  deflinestyle ( Int32, Linestyle );
  509   extern void  setlinestyle ( Int32 );
  510   extern Int32 getlstyle    ( void );
  511   extern void  lsrepeat     ( Int32 );
  512   extern Int32 getlsrepeat  ( void );
  513   extern Int32 getdisplaymode   ( void );
  514   
  515   extern void  setbell      ( Char8 );
  516   extern void  ringbell     ( void );
  517   
  518   extern Int32 getgdesc     ( Int32 );
  519   
  520   extern void  foreground   ( void );
  521   
  522   extern void  logicop      ( Int32 );
  523   
  524   extern void  getmatrix    ( Matrix );
  525   
  526   /* for fsscale et al. */
  527   extern void  pntsize      ( Int16 );
  528   extern void  pntsizef     ( Float32 );
  529   
  530   /********************* font.c */
  531   extern void  loadXfont    ( Int32 , Char8 * );
  532   extern void  font     ( Int16 );
  533   extern Int32 getfont      ( void );
  534   extern void  getfontencoding  ( Char8 * );
  535   extern Int32 getheight        ( void );
  536   extern Int32 getdescender     ( void );
  537   extern Int32 strwidth     ( Char8 * );
  538   extern void  charstr      ( Char8 * );
  539   
  540   /********************* color.c */
  541   extern void  mapcolor     ( Colorindex, Int16, Int16, Int16 );
  542   extern void  RGBcolor     ( Int16, Int16, Int16 );
  543   extern void  cpack        ( Uint32 );
  544   
  545   extern void  c3s      ( Int16[3] );
  546   extern void  c3i      ( Int32[3] );
  547   extern void  c3f      ( Float32[3] );
  548   
  549   extern Int32 getcolor     ( void );
  550   extern void  getmcolor    ( Colorindex, Int16 *, Int16 *, Int16 * );
  551   extern void  getmcolors   ( Colorindex, Colorindex, Int16 *, Int16 *, Int16 * );
  552   extern void  gRGBcolor    ( Int16 *, Int16 *, Int16 * );
  553   
  554   extern void  color        ( Colorindex );
  555   extern void  readsource   ( Int32 );
  556   
  557   extern void  rectzoom     ( Float32, Float32 );
  558   
  559   extern Int32 crectread    ( Screencoord, Screencoord, Screencoord, Screencoord, Uint8 * );
  560   extern Int32 rectread     ( Screencoord, Screencoord, Screencoord, Screencoord, Int16 * );
  561   extern Int32 lrectread    ( Screencoord, Screencoord, Screencoord, Screencoord, Int32 * );
  562   
  563   extern void  crectwrite   ( Screencoord, Screencoord, Screencoord, Screencoord, Uint8 * );
  564   extern void  rectwrite    ( Screencoord, Screencoord, Screencoord, Screencoord, Int16 * );
  565   extern void  lrectwrite   ( Screencoord, Screencoord, Screencoord, Screencoord, Int32 * );
  566   
  567   extern void  rectcopy     ( Screencoord, Screencoord, Screencoord, Screencoord, Screencoord, Screencoord );
  568   
  569   extern Int32 readpixels   ( Int16, Colorindex[] );
  570   extern void  writepixels  ( Int16, Colorindex[] );
  571   extern Int32 readRGB      ( Int16, RGBvalue[], RGBvalue[], RGBvalue[] );
  572   extern void  writeRGB     ( Int16, RGBvalue[], RGBvalue[], RGBvalue[] );
  573 
  574   /* for/from Bill Bishop */
  575   extern void blendfunction     ( Int32, Int32 );
  576   
  577   /********************* menu.c */
  578   extern void  addtopup     ( Int32, Char8 *, ... );
  579   extern Int32 defpup       ( Char8 *, ... );
  580   extern Int32 dopup        ( Int32 );
  581   extern void  freepup      ( Int32 );
  582   extern Int32 newpup       ( void );
  583   extern void  setpup       ( Int32, Int32, Int32 );
  584   
  585   /********************* ygl.c */
  586   /* Contraints */
  587   extern void  minsize      ( Int32, Int32 );
  588   extern void  maxsize      ( Int32, Int32 );
  589   extern void  prefsize     ( Int32, Int32 );
  590   extern void  prefposition     ( Int32, Int32, Int32, Int32 );
  591   extern void  stepunit     ( Int32, Int32 );
  592   extern void  keepaspect   ( Int32, Int32 );
  593   extern void  noport       ( void );
  594   extern void  noborder     ( void );
  595   
  596   extern void  ginit        ( void );
  597   extern void  winconstraints   ( void );
  598   extern Int32 winopen      ( Char8 * );
  599   extern Int32 swinopen     ( Int32 );
  600   
  601   extern void  winposition  ( Int32, Int32, Int32, Int32 );
  602   extern void  winmove      ( Int32, Int32 );
  603   
  604   extern void  getsize      ( Int32 *, Int32 * );
  605   extern void  getorigin    ( Int32 *, Int32 * );
  606   
  607   extern void  RGBmode      ( void );
  608   extern void  cmode        ( void );
  609   
  610   extern void  gconfig      ( void );
  611   extern void  winclose     ( Int32 );
  612   extern void  gexit        ( void );
  613   
  614 #ifdef _XLIB_H_         /* Declare if <X11/Xlib.h> is included */
  615   extern Int32 winX         ( Display *, Window );
  616 #endif /* _XLIB_H_ */
  617   
  618   /* gl2ppm.c */
  619   extern int   gl2ppm       ( const char * );
  620   
  621   /* 3d.c */
  622 
  623   extern void  cmov         ( Coord, Coord, Coord );
  624   extern void  cmovi        ( Icoord, Icoord, Icoord );
  625   extern void  cmovs        ( Scoord, Scoord, Scoord );
  626   
  627   extern void  pnt      ( Coord, Coord, Coord );
  628   extern void  pnti         ( Icoord, Icoord, Icoord );
  629   extern void  pnts         ( Scoord, Scoord, Scoord );
  630   
  631   extern void  move         ( Coord, Coord, Coord );
  632   extern void  movei        ( Icoord, Icoord, Icoord );
  633   extern void  moves        ( Scoord, Scoord, Scoord );
  634   
  635   extern void  rmv      ( Coord, Coord, Coord );
  636   extern void  rmvi         ( Icoord, Icoord, Icoord );
  637   extern void  rmvs         ( Scoord, Scoord, Scoord );
  638   
  639   extern void  draw         ( Coord, Coord, Coord );
  640   extern void  drawi        ( Icoord, Icoord, Icoord );
  641   extern void  draws        ( Scoord, Scoord, Scoord );
  642   
  643   extern void  rdr      ( Coord, Coord, Coord );
  644   extern void  rdri         ( Icoord, Icoord, Icoord );
  645   extern void  rdrs         ( Scoord, Scoord, Scoord );
  646 
  647   extern void  pmv      ( Coord, Coord, Coord );
  648   extern void  pmvi         ( Icoord, Icoord, Icoord );
  649   extern void  pmvs         ( Scoord, Scoord, Scoord );
  650   
  651   extern void  rpmv         ( Coord, Coord, Coord );
  652   extern void  rpmvi        ( Icoord, Icoord, Icoord );
  653   extern void  rpmvs        ( Scoord, Scoord, Scoord );
  654   
  655   extern void  pdr      ( Coord, Coord, Coord );
  656   extern void  pdri         ( Icoord, Icoord, Icoord );
  657   extern void  pdrs         ( Scoord, Scoord, Scoord );
  658   
  659   extern void  rpdr         ( Coord, Coord, Coord );
  660   extern void  rpdri        ( Icoord, Icoord, Icoord );
  661   extern void  rpdrs        ( Scoord, Scoord, Scoord );
  662   
  663   
  664   
  665   
  666   
  667   extern void  polf         ( Int32, Coord[][3] );
  668   extern void  polfi        ( Int32, Icoord[][3] );
  669   extern void  polfs        ( Int32, Scoord[][3] );
  670 
  671   extern void  v3s      ( Int16[3] );
  672   extern void  v3i      ( Int32[3] );
  673   extern void  v3f      ( Float32[3] );
  674   extern void  v3d      ( Float64[3] );
  675   
  676   extern void  v4s      ( Int16[4] );
  677   extern void  v4i      ( Int32[4] );
  678   extern void  v4f      ( Float32[4] );
  679   extern void  v4d      ( Float64[4] );
  680 
  681   extern void  swaptmesh    ( void );
  682 
  683   extern void  ortho        ( Coord, Coord, Coord, Coord, Coord, Coord );
  684   extern void  lookat       ( Coord, Coord, Coord, Coord, Coord, Coord, Angle );
  685   extern void  window       ( Coord, Coord, Coord, Coord, Coord, Coord );
  686   extern void  perspective  ( Angle, Float32, Coord, Coord );
  687   extern void  polarview    ( Coord, Angle, Angle, Angle );
  688   extern void  rot      ( Float32, char );
  689   extern void  rotate       ( Angle, char );
  690   extern void  scale        ( Float32, Float32, Float32 );
  691   extern void  translate    ( Coord, Coord, Coord );
  692 
  693   extern void  loadmatrix   ( Matrix );
  694   extern void  multmatrix   ( Matrix );
  695   extern void  pushmatrix   ( void );
  696   extern void  popmatrix    ( void );
  697 
  698   extern void  shademodel   ( Int32 );
  699   
  700   extern void  c4f      ( Float32[4] );
  701   extern void  c4i      ( Int32[4] );
  702   extern void  c4s      ( Int16[4] );
  703 
  704   extern void  n3f      ( Float32[3] );
  705   extern void  normal       ( Coord[3] );
  706 
  707   extern void  backface     ( Int32 );
  708   extern void  frontface    ( Int32 );
  709 
  710   extern Int32 getmmode     ( void );
  711   extern void  mmode        ( Int16 );
  712   
  713   extern void  zbuffer      ( Int32 );
  714   extern void  zclear       ( void );
  715   extern void  zdraw        ( Int32 );
  716   extern void  zfunction    ( Int32 );
  717   extern void  czclear      ( Int32, Int32 );
  718   extern void  depthcue     ( Int32 );
  719   extern void  lRGBrange    ( Int16, Int16, Int16, Int16, Int16, Int16, Int32, Int32 );
  720   extern void  lsetdepth    ( Int32, Int32 );
  721   extern void  lshaderange  ( Colorindex, Colorindex, Int32, Int32 );
  722 
  723   /* Display lists */
  724   extern Int32 genobj       ( void );
  725   extern Int32 isobj        ( Int32 );
  726   extern void  makeobj      ( Int32 );
  727   extern Int32 getopenobj   ( void );
  728   extern void  closeobj     ( void );
  729   extern void  callobj      ( Int32 );
  730   extern void  delobj       ( Int32 );
  731   
  732   /* Lighting */
  733   extern void  lmbind       ( Int32, Int32 );
  734   extern void  lmcolor      ( Int32 );
  735   extern void  lmdef        ( Int16, Int16, Int16, Float32[] );
  736 
  737   extern void  RGBwritemask     ( Int16, Int16, Int16 );
  738   
  739   /* for Pete Riley */
  740   extern void  drawmode     ( Int32 );
  741   extern void  iconsize     ( Int32, Int32 );
  742   extern void  overlay      ( Int32 );
  743   extern void  pushattributes   ( void );
  744   extern void  popattributes    ( void );
  745   extern void  fullscrn     ( void );
  746   extern void  endfullscrn  ( void );
  747   extern void  scrmask      ( Screencoord , Screencoord , Screencoord , Screencoord  );
  748   
  749   /* Added 2012 */
  750   extern void  blanktime    ( Int32 );
  751   extern void  defpattern   ( Int16, Int16, Int16 * );
  752   extern Int32 getpattern   ( void );
  753   extern void  setpattern   ( Int16 );
  754   extern void  writemask    ( Colorindex );
  755   
  756   /* not implemented (yet) */
  757 #if 0
  758   extern void attachcursor ( Device, Device );
  759   extern void bbox2 ( Screencoord, Screencoord, Coord, Coord, Coord, Coord );
  760   extern void bbox2i ( Screencoord, Screencoord, Icoord, Icoord, Icoord, Icoord );
  761   extern void bbox2s ( Screencoord, Screencoord, Scoord, Scoord, Scoord, Scoord );
  762   extern void bgnsurface ( void );
  763   extern void bgntrim ( void );
  764   extern void blankscreen ( Int32 );
  765   extern void blink ( Int16, Colorindex, Int16, Int16, Int16 );
  766   extern Int32 blkqread ( Int16 *, Int16 );
  767   extern void chunksize ( Int32 );
  768   extern void clkoff ( void );
  769   extern void clkon ( void );
  770   extern void colorf ( Float32 );
  771   extern void compactify ( Int32 );
  772   extern void crv ( Coord[4][3] );
  773   extern void crvn ( Int32, Coord[][3] );
  774   extern void curorigin ( Int16, Int16, Int16 );
  775   extern void cursoff ( void );
  776   extern void curson ( void );
  777   extern void curstype ( Int32 );
  778   extern void curvebasis ( Int16 );
  779   extern void curveit ( Int16 );
  780   extern void curveprecision ( Int16 );
  781   extern void cyclemap ( Int16, Int16, Int16 );
  782   extern void defbasis ( Int32, Matrix );
  783   extern void defcursor ( Int16, Uint16 * );
  784   /*extern void defrasterfont ( Int16, Int16, Int16, Fontchar[], Int16, Int16[] );*/
  785   extern void deltag ( Int32 );
  786   extern void editobj ( Int32 );
  787   extern Int32 endselect ( Int16[] );
  788   extern void endsurface ( void );
  789   extern void endtrim ( void );
  790   extern void finish ( void );
  791   extern void fudge ( Int32, Int32 );
  792   extern void gRGBmask ( Int16 *, Int16 *, Int16 * );
  793   extern void gammaramp ( Int16[256], Int16[256], Int16[256] );
  794   extern void gbegin ( void );
  795   extern Int32 gentag ( void );
  796   extern Int32 getbackface ( void );
  797   extern Int32 getbuffer ( void );
  798   extern Int32 getcmmode ( void );
  799   extern void getcursor ( Int16 *, Colorindex *, Colorindex *, Int32 * );
  800   extern Int32 getdcm ( void );
  801   extern void getdev ( Int32, Device[], short[] );
  802   extern Int32 getdrawmode ( void );
  803   extern void getgpos ( Coord *, Coord *, Coord *, Coord * );
  804   extern Int32 getmap ( void );
  805   extern void getnurbsproperty (Int32, Float32 *);
  806   extern void getscrmask ( Screencoord *, Screencoord *, Screencoord *, Screencoord * );
  807   extern Int32 getshade ( void );
  808   extern Int32 getsm ( void );
  809   extern Int32 getwritemask ( void );
  810   extern Int32 getzbuffer ( void );
  811   extern void greset ( void );
  812   extern void gselect ( Int16 *, Int32 );
  813   extern void icontitle ( char * );
  814   extern void imakebackground ( void );
  815   extern Int32 istag ( Int32 );
  816   extern void lampoff ( char );
  817   extern void lampon ( char );
  818   extern void lgetdepth ( Int32 *, Int32 * );
  819   extern void linesmooth ( Int32 );
  820   extern void maketag ( Int32 );
  821   extern void mapcolors ( Colorindex, Colorindex, Int16 *, Int16 *, Int16 *);
  822   extern void mapw ( Int32, Screencoord, Screencoord, Coord *, Coord *, Coord *, Coord *, Coord *, Coord * );
  823   extern void mapw2 ( Int32, Screencoord, Screencoord, Coord *, Coord * );
  824   extern void multimap ( void );
  825   /*extern void newtag ( Int32, Int32, Offset );*/
  826   extern void nurbscurve (Int32, Float64 *,Int32, Float64 *, Int32, Int32);
  827   extern void nurbssurface (Int32, Float64 *,Int32, Float64 *, Int32, Int32, Float64 *, Int32, Int32, Int32);
  828   extern void objdelete ( Int32, Int32 );
  829   extern void objinsert ( Int32 );
  830   extern void objreplace ( Int32 );
  831   extern void onemap ( void );
  832   extern void patch ( Matrix, Matrix, Matrix );
  833   extern void patchbasis ( Int32, Int32 );
  834   extern void patchcurves ( Int32, Int32 );
  835   extern void patchprecision ( Int32, Int32 );
  836   extern void pixmode (Int32,Int32);
  837   extern void pntsmooth ( Int32 );
  838 
  839   extern void poly      ( Int32, Coord[][3] );
  840   extern void polyi         ( Int32, Icoord[][3] );
  841   extern void polys         ( Int32, Scoord[][3] );
  842   
  843   extern void polygonlist ( Int32, Int32, void * );
  844   extern void polylinelist ( Int32, Int32, void * );
  845   extern void pwlcurve (Int32, Float64 *,Int32, Int32);
  846   extern void rcrv ( Coord[4][4] );
  847   extern void rcrvn ( Int32, Coord[4][4] );
  848   extern void rpatch ( Matrix, Matrix, Matrix, Matrix );
  849   extern void screenspace ( void );
  850   extern void set_dither ( Int32 );
  851   extern void setcursor ( Int16, Colorindex, Colorindex );
  852   extern void setdblights ( Int32 );
  853   extern void setmap ( Int16 );
  854   extern void setnurbsproperty (Int32, Float32);
  855   extern void setvaluator ( Device, Int16, Int16, Int16 );
  856   extern void splf ( Int32, Coord[][3], Colorindex[] );
  857   extern void splf2 ( Int32, Coord[][2], Colorindex[] );
  858   extern void splf2i ( Int32, Icoord[][2], Colorindex[] );
  859   extern void splf2s ( Int32, Scoord[][2], Colorindex[] );
  860   extern void splfi ( Int32, Icoord[][3], Colorindex[] );
  861   extern void splfs ( Int32, Scoord[][3], Colorindex[] );
  862   extern void subpixel ( Int32 );
  863   extern void swapinterval ( Int16 );
  864   extern void textport ( Screencoord, Screencoord, Screencoord, Screencoord );
  865   extern void tpoff ( void );
  866   extern void tpon ( void );
  867   extern void underlay ( Int32 );
  868   extern void wmpack ( Uint32 );
  869   extern void zsource ( Int32 );
  870   extern void zwritemask ( Int32 );
  871 #endif
  872 #ifdef __cplusplus
  873 }
  874 #endif
  875 
  876 #endif /* _YGL_INCLUDED_ */