home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d9xx / d916 / screenmode.lha / ScreenMode / source / UserScreenMode.h < prev    next >
C/C++ Source or Header  |  1993-10-04  |  2KB  |  70 lines

  1. //--------------------------------------------------------------------------
  2. //
  3. //                  "UserScreenMode.h"
  4. //
  5. //  HEADER file for "UserScreenMode.o", ©ASWare 1993, by Ekke Verheul.
  6. //
  7. //  The use of this header and the objectfile "UserScreenMode.o" is FREE for
  8. //  non-comercial purposes. Anyone else MUST register first, but that is not
  9. //  a punishment is it? If you send me you name and address and #include the
  10. //  PD-fee (read the readme-file !) you will receive ALL the latest versions
  11. //  of my PD-programs INCLUDING the C-source of "UserScreenMode.o"...
  12. //
  13. //                                                            Oh, lucky you!
  14. //
  15. //--------------------------------------------------------------------------
  16.  
  17. #include <graphics/displayinfo.h>
  18.  
  19. typedef struct {
  20.     ULONG ModeID;
  21.     ULONG OScan;
  22.     ULONG Width;
  23.     ULONG Height;
  24.     ULONG Depth;
  25. } SCRMODE;
  26.  
  27. typedef struct {
  28.     UBYTE title[16]; //--- keep it short!
  29.     ULONG include;
  30.     ULONG exclude;
  31. } PRPT;
  32.  
  33. extern int __asm UserScreenMode( register __a1 UBYTE *   PublicScreenName,
  34.                                  register __a2 SCRMODE * DataToFill,
  35.                                  register __a3 PRPT **   PropList
  36.                                );
  37.  
  38. extern int __asm ModeName ( register __d0 ULONG Mode,
  39.                             register __a0 UBYTE *Name
  40.                           );
  41.  
  42.  
  43. #define DIPF_ALL  ~0L
  44. #define DIPF_NONE  0L
  45.  
  46. extern LONG USM_Error;
  47.  
  48. #define ERR_GFXLIB 1   //--- Can't open graphics.library v37
  49. #define ERR_INTLIB 2   //--- Can't open intuition.library v37
  50. #define ERR_GTSLIB 3   //--- Can't open gadtools.library v37
  51. #define ERR_PBSLCK 4   //--- Can't lock public screen
  52. #define ERR_VSLINF 5   //--- Can't get public screen's visual info
  53. #define ERR_NO_MEM 6   //--- Out of memory
  54. #define ERR_NO_WIN 7   //--- Can't open window
  55.  
  56.  
  57. #ifdef USM_ERRTXT      //--- define this only in the module that uses the texts!
  58. UBYTE *USM_ErrorTxt[] =
  59. {
  60.     "",
  61.     "Can't open graphics.library v37",
  62.     "Can't open intuition.library v37",
  63.     "Can't open gadtools.library v37",
  64.     "Can't lock public screen",
  65.     "Can't get public screen's visual info",
  66.     "Out of memory",
  67.     "Can't open window",
  68. };
  69. #define USM_ERROR USM_ErrorTxt[USM_Error]
  70. #endif