mgldos.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. #ifndef __MGLDOS_H
  20. #define __MGLDOS_H
  21. #ifndef MGLDOS
  22. #define MGLDOS
  23. #endif
  24. /*---------------------- Macros and type definitions ----------------------*/
  25. typedef void *MGL_HWND;
  26. /*------------------------- Function Prototypes ---------------------------*/
  27. #ifdef __cplusplus
  28. extern "C" { /* Use "C" linkage when in C++ mode */
  29. #endif
  30. /* Initialise the MGL for fullscreen output */
  31. bool MGLAPI MGL_init(m_int *driver,m_int *mode,const char *mglpath);
  32. /* Change the active display mode. You must destroy all display device
  33. * contexts before calling this function, and re-create them again with
  34. * the new display mode. Does not affect any event handling hooks.
  35. */
  36. bool MGLAPI MGL_changeDisplayMode(m_int mode);
  37. /* Disable/enable event handling (call before calling MGL_init */
  38. void MGLAPI MGL_useEvents(bool use);
  39. /* Device context management */
  40. MGLDC * MGLAPI MGL_createDisplayDC(m_int numBuffers);
  41. MGLDC * MGLAPI MGL_createScrollingDC(m_int virtualX,m_int virtualY,m_int numBuffers);
  42. MGLDC * MGLAPI MGL_createOffscreenDC(void);
  43. MGLDC * MGLAPI MGL_createLinearOffscreenDC(void);
  44. MGLDC * MGLAPI MGL_createMemoryDC(m_int xSize,m_int ySize,m_int bitsPerPixel,pixel_format_t *pf);
  45. bool MGLAPI MGL_destroyDC(MGLDC *dc);
  46. /* Generic helper functions */
  47. ulong MGLAPI MGL_getTicks(void);
  48. ulong MGLAPI MGL_getTickResolution(void);
  49. void MGLAPI MGL_delay(m_int millseconds);
  50. void MGLAPI MGL_beep(m_int freq,m_int milliseconds);
  51. void MGLAPI MGL_suspend(void);
  52. void MGLAPI MGL_resume(void);
  53. /* Fullscreen specific routines */
  54. void MGLAPI MGL_setPaletteSnowLevel(MGLDC *dc,m_int level);
  55. m_int MGLAPI MGL_getPaletteSnowLevel(MGLDC *dc);
  56. /* Determine if a specific scancode'ed key is held down (PC specific) */
  57. bool MGLAPI EVT_isKeyDown(uchar scanCode);
  58. #ifdef __cplusplus
  59. } /* End of "C" linkage for C++ */
  60. #endif
  61. #endif /* __MGLDOS_H */