home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / ft-beta.zip / freetype / test / gdriver.h < prev    next >
C/C++ Source or Header  |  1997-10-06  |  2KB  |  55 lines

  1. /*******************************************************************
  2.  *
  3.  *  gdriver.h : Graphics utility driver generic interface       1.1
  4.  *
  5.  *  Generic interface for all drivers of the graphics utility used
  6.  *  by the FreeType test programs.
  7.  *
  8.  *  Copyright 1996, 1997 by
  9.  *  David Turner, Robert Wilhelm, and Werner Lemberg.
  10.  *
  11.  *  This file is part of the FreeType project, and may only be used
  12.  *  modified and distributed under the terms of the FreeType project
  13.  *  license, LICENSE.TXT. By continuing to use, modify or distribute 
  14.  *  this file you indicate that you have read the license and
  15.  *  understand and accept it fully.
  16.  *
  17.  ******************************************************************/
  18.  
  19. #ifndef GDRIVER_H
  20. #define GDRIVER_H
  21.  
  22.   /* Note that we now support an event based model, even with  */
  23.   /* full-screen modes. It is the responsability of the driver */
  24.   /* to map its events to the TEvent structure when called     */
  25.   /* through Get_Event.                                        */
  26.  
  27.   /* the event classes are defined in the file 'gevents.h' included */
  28.   /* by the test programs, not by the graphics utility.             */
  29.  
  30.   typedef struct  _TEvent
  31.   {
  32.     int  what; /* event class     */
  33.     int  info; /* event parameter */
  34.   } TEvent;
  35.  
  36.   /* get last event. In full-screen modes, a keystroke must be */
  37.   /* translated to an event class with a parameter.            */
  38.   void  Get_Event( TEvent*  event );
  39.  
  40.   /* a call to this function must set the graphics mode, the Vio  */
  41.   /* variable, as well as the values vio_ScanLineWidth, vio_Width */
  42.   /* and vio_Height.                                              */
  43.   int  Driver_Set_Graphics( int  mode );
  44.  
  45.   /* restore previous mode or release display buffer/window */
  46.   int  Driver_Restore_Mode();
  47.  
  48.   /* display bitmap on screen */
  49.   int  Driver_Display_Bitmap( char*  buffer, int  line, int  col );
  50.  
  51. #endif /* GDRIVER_H */
  52.  
  53.  
  54. /* End */
  55.