home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip Hitware 10
/
Chip_Hitware_Vol_10.iso
/
chiphit
/
multmedi
/
95licht
/
install.dll
/
1001
/
1
/
LGDAPI.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1997-02-02
|
8KB
|
217 lines
unit LGDAPI;
interface
uses WinTypes;
const
cMagic = $2d48542b;
SCR_LEAVESBLANK = 1;
SCR_MUSTHAVENONBLANK = 2;
SCR_CONFIGDIALOG = 4;
SCR_HELPAVAILABLE = 8;
SCR_ERASEPALETTE = 16;
ID_HELPKEY = $5000; { LGD send ID_HELPKEY thru ID_HELPKEY+9 for Fxx keys}
ID_HELPKEY_F1 = $5000;
ID_HELPKEY_F2 = $5001;
ID_HELPKEY_F3 = $5002;
ID_HELPKEY_F4 = $5003;
ID_HELPKEY_F5 = $5004;
ID_HELPKEY_F6 = $5005;
ID_HELPKEY_F7 = $5006;
ID_HELPKEY_F8 = $5007;
ID_HELPKEY_F9 = $5008;
ID_HELPKEY_F10 = $5009;
ID_HELPKEY_F11 = $500a;
ID_HELPKEY_F12 = $500b;
{ --------------------------------------- }
{ definitionen fⁿr allgemeine farbpalette }
const cColorCircle = 30;
const ColorValues: array [0..5]of byte =
(0, 65, 110, 155, 205, 255); { farbabstufungen }
{ 133 180 230 }
{ 40 90 168 }
{ farbabstufungen bei grundfarben }
ColorValuesBase: array [0..8] of byte =
(0, 65, 110, 133, 155, 180, 205, 230, 255);
{ graustufen }
ColorValuesGrey: array [0..11] of byte =
(0, 40, 65, 90, 110, 133, 155, 168, 180, 205, 230, 255);
ColorIndexesColorScales :array[0..55] of byte =
(11, 12, 235, 13, 236, 14, 237, 15, { blau }
16, 22, 229, 28, 230, 34, 231, 40, { grⁿn }
17, 24, 241, 31, 242, 38, 243, 45, { cyan }
46, 82, 226,118, 227,154, 228,190, { rot }
47, 84, 238,121, 239,158, 240,195, { magenta }
52, 94, 232,136, 233,178, 234,220, { gelb }
10, 53, 96,244, 139,245, 182,225 );{ wei▀ }
(* ColorIndexesGreyScales: array [0..11]of byte =
(0, 237, 43, 238, 86, 234,129, 239, 235,172, 236,215);*)
ColorIndexesGreyScales: array [0..7]of byte =
(10, 53, 96, 244, 139, 245, 182, 225);
{ 1 6 36
2 12 72
3 18 108
4 24 144
5 30 180
}
type
TColorPalette = record
palVersion: Word;
palNumEntries: Word;
palPalEntry: array[0..255] of TPaletteEntry;
end;
TColorCircle = array [0..cColorCircle - 1] of Byte;
(*
PInterface = ^TInterface;
TInterface = record
lSize: LongInt;
lLevel: LongInt;
lMagic: LongInt;
lCaller: LongInt; { 1: LGD, 2: Randomizer }
{ hwndParent: hWnd;}
cp: TColorPalette;
hpal: HPalette;
lUser1, lUser2: LongInt;
cColors: integer;
ColorCircle: TColorCircle;
end;
*)
{ definitionen fⁿr allgemeine farbpalette }
{ --------------------------------------- }
type
PString = ^String;
{ information about screen saver }
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;
{ 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;
{ 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 }
(* for internal use by LGD only - subject to change! *)
TModuleHandle = record
hmod: HModule;
ScrInfo: fpScrInfo;
{ index 11; requests information about screen saver }
ScrAbout: fpScrAbout;
{ index 12; display information about screen saver }
{ these functions are called to execute the screen saver }
ScrInit: fpScrInit;
{ index 13; init screen saver - should save pointer to structure }
ScrDone: fpScrDone;
{ index 14 }
ScrIdle: fpScrIdle; { called at maximum rate if requested by saver }
{ index 15 }
ScrTimer: fpScrTimer;{ called by timer with selected interval }
{ index 16 }
ScrConfig: fpScrConfig;
{ index 17; display configuration dialog }
end;
PModuleHandle = ^TModuleHandle;
(* for internal use only! *)
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;
implementation
end.