home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 14 / MA_Cover_14.iso / source / c / q1source_amy / qw / scitech / include / mgldos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-30  |  2.4 KB  |  84 lines

  1. /****************************************************************************
  2. *
  3. *                        MegaGraph Graphics Library
  4. *
  5. *                   Copyright (C) 1996 SciTech Software.
  6. *                            All rights reserved.
  7. *
  8. * Filename:        $Workfile:   mgldos.h  $
  9. * Version:        $Revision:   1.9  $
  10. *
  11. * Language:        ANSI C
  12. * Environment:    IBM PC (MS DOS)
  13. *
  14. * Description:    Header file for the MGLDOS binding for the MSDOS environment.
  15. *
  16. * $Date:   30 Jan 1997 17:31:58  $ $Author:   KendallB  $
  17. *
  18. ****************************************************************************/
  19.  
  20. #ifndef    __MGLDOS_H
  21. #define    __MGLDOS_H
  22.  
  23. #ifndef MGLDOS
  24. #define    MGLDOS
  25. #endif
  26.  
  27. /*---------------------- Macros and type definitions ----------------------*/
  28.  
  29. typedef void    *MGL_HWND;
  30.  
  31. /*------------------------- Function Prototypes ---------------------------*/
  32.  
  33. #ifdef    __cplusplus
  34. extern "C" {            /* Use "C" linkage when in C++ mode    */
  35. #endif
  36.  
  37. /* Initialise the MGL for fullscreen output */
  38.  
  39. bool    MGLAPI MGL_init(m_int *driver,m_int *mode,const char *mglpath);
  40.  
  41. /* Change the active display mode. You must destroy all display device
  42.  * contexts before calling this function, and re-create them again with
  43.  * the new display mode. Does not affect any event handling hooks.
  44.  */
  45.  
  46. bool    MGLAPI MGL_changeDisplayMode(m_int mode);
  47.  
  48. /* Disable/enable event handling (call before calling MGL_init */
  49.  
  50. void     MGLAPI MGL_useEvents(bool use);
  51.  
  52. /* Device context management */
  53.  
  54. MGLDC    * MGLAPI MGL_createDisplayDC(m_int numBuffers);
  55. MGLDC    * MGLAPI MGL_createScrollingDC(m_int virtualX,m_int virtualY,m_int numBuffers);
  56. MGLDC    * MGLAPI MGL_createOffscreenDC(void);
  57. MGLDC    * MGLAPI MGL_createLinearOffscreenDC(void);
  58. MGLDC     * MGLAPI MGL_createMemoryDC(m_int xSize,m_int ySize,m_int bitsPerPixel,pixel_format_t *pf);
  59. bool    MGLAPI MGL_destroyDC(MGLDC *dc);
  60.  
  61. /* Generic helper functions */
  62.  
  63. ulong    MGLAPI MGL_getTicks(void);
  64. ulong    MGLAPI MGL_getTickResolution(void);
  65. void    MGLAPI MGL_delay(m_int millseconds);
  66. void    MGLAPI MGL_beep(m_int freq,m_int milliseconds);
  67. void    MGLAPI MGL_suspend(void);
  68. void    MGLAPI MGL_resume(void);
  69.  
  70. /* Fullscreen specific routines */
  71.  
  72. void    MGLAPI MGL_setPaletteSnowLevel(MGLDC *dc,m_int level);
  73. m_int    MGLAPI MGL_getPaletteSnowLevel(MGLDC *dc);
  74.  
  75. /* Determine if a specific scancode'ed key is held down (PC specific) */
  76.  
  77. bool    MGLAPI EVT_isKeyDown(uchar scanCode);
  78.  
  79. #ifdef    __cplusplus
  80. }                        /* End of "C" linkage for C++    */
  81. #endif
  82.  
  83. #endif    /* __MGLDOS_H */
  84.