home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip Hitware 10
/
Chip_Hitware_Vol_10.iso
/
chiphit
/
multmedi
/
95licht
/
install.dll
/
1001
/
1
/
LGDAPI.H
< prev
next >
Wrap
Text File
|
1997-02-02
|
6KB
|
199 lines
#define LGDCALL __export __stdcall
#define CMAGIC 0x2d48542bl
#define SCR_LEAVESBLANK 1
#define SCR_MUSTHAVENONBLANK 2
#define SCR_CONFIGDIALOG 4
#define SCR_HELPAVAILABLE 8
#define SCR_ERASEPALETTE 16
#define cColorCircle 30
typedef struct _TColorPalette
{
short palVersion;
short palNumEntries;
PALETTEENTRY palPalEntry[256];
} TColorPalette, *PColorPalette;
/*
type
TColorPalette = record
palVersion: Word;
palNumEntries: Word;
palPalEntry: array[0..255] of TPaletteEntry;
end;
*/
typedef unsigned char TColorCircle [cColorCircle];
typedef char STRING [256], *PSTRING;
//{ information about screen saver }
typedef struct _TLgdInfoStruct
{
long cBytes;
long lMagic;
long afSaverFlags;
PSTRING pstrModule;
char strTitle[32];
char strInfo[256];
char strHelpFile[256];
char strHelpKey[32];
void *pSaverData;
}
TLgdInfoStruct, *PLgdInfoStruct;
/*
TLgdInfoStruct = record
cBytes: LongInt;
lMagic: LongInt; { magic bytes }
afSaverFlags: LongInt; { combination of SCR_??? flags }
pstrModule: PSTRING; { name of module file }
strTitle: array[1..32] of char; { short title for list boxes }
strInfo: array [1..256] of char; { description }
strHelpFile: array[1..256] of char; { name of HELP file }
strHelpKey: array[1..32] of char; { keyword for HELP file }
PSaverData: Pointer;
end;
PLgdInfoStruct = ^TLgdInfoStruct;
*/
typedef struct _TLgdSaverStruct
{
long cBytes;
// fields filled by LGD
BOOL fPaletteAvailable;
HPALETTE hpalGlobal;
int cColors;
TColorCircle ColorCircle;
TColorPalette cp;
int iBPP;
// fields filled by saver module
HPALETTE hpalModule;
}
TLgdSaverStruct, *PLgdSaverStruct;
/*{ information exchanged when saver is started -
global information for all savers }
TLgdSaverStruct = record
cBytes: LongInt;
{ in: fields filled by LGD }
fPaletteAvailable: bool; { cleared if you set fPaletteRequested }
hpalGlobal: HPalette; { used for global palette }
cColors: integer;
ColorCircle: TColorCircle;
cp: TColorPalette;
iBPP: integer; { display mode: bits per pixel }
{ use fPaletteAvailable only with iBPP = 8 }
{ out: fields filled by module }
hpalModule: HPalette;
{ note: if fPaletteAvailable is TRUE, store your
color palette handle in hpalModule and set
fPaletteAvailable to FALSE (in ScrInit).
Be sure to reverse this in ScrDone!
Restore hpalModule with hpalGlobal!
If iBPP > 8, use your palette without registering it here!}
end;
PLgdSaverStruct = ^TLgdSaverStruct;
*/
typedef struct _TLgdModuleStruct
{
long cBytes;
// fields filled by LGD
PLgdSaverStruct pss;
HWND hwndSaver;
HRGN hrngArea; // not used yet
long cxScreen, cyScreen;
STRING sCallerName;
STRING sSaverName;
long lLastTime;
// fields filled by screen saver module
BOOL fPaletteRequested;
HPALETTE hpalSaver;
BOOL fSupportsIdleFunction;
long lTimerDelay;
long lCallDelay;
BOOL fNoTimeout; // signal for Randomizer: do not terminate saver now
BOOL fTerminateRequest; // set by LGD to terminate saver if fTerminateInhibit is set
BOOL fTerminateInhibit; // set by saver to prevent termination
BOOL fHasChildWindows;
void *pSaverData;
}
TLgdModuleStruct, *PLgdModuleStruct;
/*
{ information specific to screen saver module }
TLgdModuleStruct = record
cBytes: LongInt;
{ in: fields filled by LGD }
pss: PLgdSaverStruct;
hwndSaver: HWND;
hrgnArea: HRGN; { drawing region - not yet implemented }
cxScreen, cyScreen: LongInt; { window size }
sCallerName: string; { caller name - used for INI settings }
sSaverName: string; { saver name - used for INI settings }
lLastTime: LongInt; { used internally for run delay }
{ out: fields filled by screen saver }
fPaletteRequested: bool; { set this flag only if fPaletteAvailable is TRUE }
{ reset it again in fpScrDone! }
hpalSaver: HPalette; { saver specific color palette - set fPaletteRequested }
fSupportsIdleFunction: bool; { set true if ScrIdle shall be called }
lTimerDelay: LongInt; { requested interval for ScrTimer; 0 = no timer; changes allowed in ScrInit and ScrTimer only! }
lCallDelay: LongInt; { requested interval for ScrIdle; 0 = maximum }
fNoTimeout: bool; { set true if screen save shall not timeout }
fTerminateRequest: bool; { set by SCRNSAVE.PAS to terminate saver }
fTerminateInhibit: bool; { set by saver to inhibit termination }
fHasChildWindows: bool; { prevent WM_ERASEBKGND and SetPalette etc. }
PSaverData: Pointer;
end;
PLgdModuleStruct = ^TLgdModuleStruct;
*/
/*
fpScrInfo = Function (var lisInfo: TLgdInfoStruct): bool; stdcall;
{ index 11; requests information about screen saver }
fpScrAbout = Function (hwndParent: HWND): bool; stdcall;
{ index 12; display information about screen saver }
{ these functions are called to execute the screen saver }
fpScrInit = Function (pmdModuleData: Pointer {PModuleData}): bool; stdcall;
{ index 13; init screen saver - should save pointer to structure }
fpScrDone = Procedure (pmdModuleData: Pointer {PModuleData}); stdcall;
{ index 14 }
fpScrIdle = Procedure (pmdModuleData: Pointer {PModuleData}); stdcall; { called at maximum rate if requested by saver }
{ index 15 }
fpScrTimer = Procedure (pmdModuleData: Pointer {PModuleData}); stdcall;{ called by timer with selected interval }
{ index 16 }
fpScrConfig = Function (pmdModuleData: Pointer; hwndParent: HWND): integer; stdcall;
{ index 17; display configuration dialog }
*/
typedef struct _TModuleData
{
void *pmh; // internal use only
PLgdInfoStruct pis; // always present
PLgdModuleStruct pms; // allocated while module is running
STRING strModule; // path to module
}
TModuleData, *PModuleData;
/*
TModuleData = record
pmh: PModuleHandle; { allocated while module is loaded - internal use only }
pis: PLgdInfoStruct; { always present }
pms: PLgdModuleStruct; { allocated while module is running }
strModule: string; { path to module }
end;
PModuleData = ^TModuleData;
*/