home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-26 | 3.4 KB | 165 lines | [TEXT/CWIE] |
- // ModuleAPI.h
-
- //#include <Types.h>
- //#include <Files.h>
- //#include <Windows.h>
- #include <CodeFragments.h>
- //#include <MixedMode.h>
-
- #pragma once
- //****************************************************************************
- // ScreenSaver Module API
-
- #define SS_API_VERS 0x0012
- #define kSysCustIconID (-16455)
-
- #include "ModuleProcInfos.h"
- // MODULE PROC RECORD
- #ifdef powerc
- #pragma options align=mac68k
- #endif
-
- struct ModuleProcs {
- ModOpenUPP openProc;
- ModDrawUPP drawProc;
- ModCloseUPP closeProc;
- ModAboutUPP aboutProc;
- ModChangePrefsUPP chngPrefsProc;
- };
- typedef struct ModuleProcs ModuleProcs;
-
- #ifdef powerc
- #pragma options align=reset
- #endif
-
- // Drawing Window Interface
- #ifdef powerc
- #pragma options align=mac68k
- #endif
-
- struct DrawingWindow {
- WindowRecord wRec;
- GrafPtr modGraf;
- ModuleProcs modProcs;
- FSSpec modSpec;
- short modResRefNum;
- long modStorage;
- Boolean modInPreview;
- long modInfo;
- CFragConnectionID modConnID;
- };
- typedef struct DrawingWindow DrawingWindow;
- typedef DrawingWindow *DrawingWindowPeek;
-
- #ifdef powerc
- #pragma options align=reset
- #endif
-
- // Module ParamBlk
- struct ModuleParamBlk {
- GrafPtr mGraf;
- ModuleProcs mProcs;
- FSSpec mSpec;
- short mResRefNum;
- long mStorage;
- Boolean mInPreview;
- long mInfo;
- };
- typedef struct ModuleParamBlk ModuleParamBlk;
- typedef ModuleParamBlk *ModuleParamBlkPtr;
-
-
- // MODULE ROUTINE PROTOTYPES
- OSErr ModOpen( ModuleParamBlkPtr mpPtr);
- OSErr ModDraw( ModuleParamBlkPtr mpPtr);
- OSErr ModClose( ModuleParamBlkPtr mpPtr);
- OSErr ModAbout( ModuleParamBlkPtr mpPtr);
- OSErr ModChangePrefs( ModuleParamBlkPtr mpPtr);
-
-
-
- // Module Controls
- // Module Controls
- enum {
- kSliderCntl = 'cSLD',
- kButtonCntl = 'cBTN',
- kCheckBoxCntl = 'cCHK',
- kListCntl = 'cLST',
- kStaticStrCntl = 'cSTR'
- };
-
- #define hjPopup 1101 // Jim's CDEF PopupControl
- #define hSlider 1105 // Jim's CDEF Horiz Slider
- #define ctl3D 0x0002 // 3D control appearance
- #define useWFont 0x0008 // draw control with window font
-
- #ifdef powerc
- #pragma options align=mac68k
- #endif
-
- //------
- struct Sc_StubRec {
- long ID;
- long ctlType;
- };
- typedef struct Sc_StubRec Sc_StubRec;
- //------
- struct ScCHK_CheckBoxRec {
- long ID;
- long ctlType;
- long val;
- Str255 titleStr;
- };
- typedef struct ScCHK_CheckBoxRec ScCHK_CheckBoxRec;
- //------
-
- struct ScSLD_SliderRec {
- long ID;
- long ctlType;
- long min; // vers1 -> always 0
- long max; // vers1 -> always 100
- long curValue;
- Str255 titleStr;
- };
- typedef struct ScSLD_SliderRec ScSLD_SliderRec;
- //------
-
- struct ScLST_ListRec {
- long ID;
- long ctlType;
- long valueOptions; // popupMenu value options per IM-VI
- long menuID;
- long curValue;
- long menuH;
- Str255 titleStr;
- };
- typedef struct ScLST_ListRec ScLST_ListRec;
- //------
-
- struct ScBTN_ButtonRec {
- long ID;
- long ctlType;
- long isHit;
- Str255 titleStr;
- };
- typedef struct ScBTN_ButtonRec ScBTN_ButtonRec;
- //------
-
- #ifdef powerc
- #pragma options align=reset
- #endif
-
- //--------------------------------------------------------------------------
- // Misc Error Codes
- #define kUnknownCtlType 2000
- #define kModDisableControl 2002
- #define kNoMoreControlSpace 2031
-
- #define kNoPreviewMode 1200
- #define kNoFPUerr 90
- #define kNoCQDerr 92
-
-
- //**********************************************************************************
- // E N D O F L I S T I N G
-