[r508]: uPSI_uGlobals.pas Maximize Restore History

Download this file

uPSI_uGlobals.pas    139 lines (117 with data), 5.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
unit uPSI_uGlobals;
{
This file has been generated by UnitParser v0.7, written by M. Knight
and updated by NP. v/d Spek and George Birbilis.
Source Code from Carlo Kok has been used to implement various sections of
UnitParser. Components of ROPS are used in the construction of UnitParser,
code implementing the class wrapper is taken from Carlo Kok's conv utility
}
interface
uses
SysUtils
,Classes
,uPSComponent
,uPSRuntime
,uPSCompiler
;
type
(*----------------------------------------------------------------------------*)
TPSImport_uGlobals = class(TPSPlugin)
public
procedure CompileImport1(CompExec: TPSScript); override;
procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
end;
{ compile-time registration functions }
procedure SIRegister_uGlobals(CL: TPSPascalCompiler);
{ run-time registration functions }
procedure RIRegister_uGlobals_Routines(S: TPSExec);
procedure Register;
implementation
uses
uGlobals
;
procedure Register;
begin
RegisterComponents('Pascal Script', [TPSImport_uGlobals]);
end;
(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_uGlobals(CL: TPSPascalCompiler);
begin
CL.AddConstantN('kRemoteKeysReleased','LongWord').SetUInt( $0000);
CL.AddConstantN('kRemotePBMessage1','LongWord').SetUInt( $0100);
CL.AddConstantN('kRemotePBMessage2','LongWord').SetUInt( $0200);
CL.AddConstantN('kRemotePBMessage3','LongWord').SetUInt( $0400);
CL.AddConstantN('kRemoteOutAForward','LongWord').SetUInt( $0800);
CL.AddConstantN('kRemoteOutBForward','LongWord').SetUInt( $1000);
CL.AddConstantN('kRemoteOutCForward','LongWord').SetUInt( $2000);
CL.AddConstantN('kRemoteOutABackward','LongWord').SetUInt( $4000);
CL.AddConstantN('kRemoteOutBBackward','LongWord').SetUInt( $8000);
CL.AddConstantN('kRemoteOutCBackward','LongWord').SetUInt( $0001);
CL.AddConstantN('kRemoteSelProgram1','LongWord').SetUInt( $0002);
CL.AddConstantN('kRemoteSelProgram2','LongWord').SetUInt( $0004);
CL.AddConstantN('kRemoteSelProgram3','LongWord').SetUInt( $0008);
CL.AddConstantN('kRemoteSelProgram4','LongWord').SetUInt( $0010);
CL.AddConstantN('kRemoteSelProgram5','LongWord').SetUInt( $0020);
CL.AddConstantN('kRemoteStopOutOff','LongWord').SetUInt( $0040);
CL.AddConstantN('kRemotePlayASound','LongWord').SetUInt( $0080);
CL.AddConstantN('MB_ICONASTERISK','LongWord').SetUInt( $00000040);
CL.AddConstantN('K_RCX','String').SetString( 'RCX');
CL.AddConstantN('K_CYBER','String').SetString( 'CyberMaster');
CL.AddConstantN('K_SCOUT','String').SetString( 'Scout');
CL.AddConstantN('K_RCX2','String').SetString( 'RCX2');
CL.AddConstantN('K_SPY','String').SetString( 'Spybot');
CL.AddConstantN('K_SWAN','String').SetString( 'Swan');
CL.AddConstantN('K_NXT','String').SetString( 'NXT');
CL.AddConstantN('rtRCX','LongInt').SetInt( 0);
CL.AddConstantN('rtCybermaster','LongInt').SetInt( 1);
CL.AddConstantN('rtScout','LongInt').SetInt( 2);
CL.AddConstantN('rtRCX2','LongInt').SetInt( 3);
CL.AddConstantN('rtSpy','LongInt').SetInt( 4);
CL.AddConstantN('rtSwan','LongInt').SetInt( 5);
CL.AddConstantN('rtNXT','LongInt').SetInt( 6);
CL.AddConstantN('SU_RCX','byte').SetUInt( rtRCX);
CL.AddConstantN('SU_CYBERMASTER','byte').SetUInt( rtCybermaster);
CL.AddConstantN('SU_SCOUT','byte').SetUInt( rtScout);
CL.AddConstantN('SU_RCX2','byte').SetUInt( rtRCX2);
CL.AddConstantN('SU_SPYBOTIC','byte').SetUInt( rtSpy);
CL.AddConstantN('SU_SWAN','byte').SetUInt( rtSwan);
CL.AddConstantN('SU_NXT','byte').SetUInt( rtNXT);
CL.AddDelphiFunction('Function IsNXT : boolean');
CL.AddDelphiFunction('Function IsSwan : boolean');
CL.AddDelphiFunction('Function IsRCX2 : boolean');
CL.AddDelphiFunction('Function IsRCX : boolean');
CL.AddDelphiFunction('Function IsScout : boolean');
CL.AddDelphiFunction('Function IsSpybotic : boolean');
CL.AddDelphiFunction('Function GetSpecialFolderPath( folder : integer) : string');
end;
(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure RIRegister_uGlobals(CL: TPSRuntimeClassImporter);
begin
// do nothing
end;
procedure RIRegister_uGlobals_Routines(S: TPSExec);
begin
S.RegisterDelphiFunction(@IsNXT, 'IsNXT', cdRegister);
S.RegisterDelphiFunction(@IsSwan, 'IsSwan', cdRegister);
S.RegisterDelphiFunction(@IsRCX2, 'IsRCX2', cdRegister);
S.RegisterDelphiFunction(@IsRCX, 'IsRCX', cdRegister);
S.RegisterDelphiFunction(@IsScout, 'IsScout', cdRegister);
S.RegisterDelphiFunction(@IsSpybotic, 'IsSpybotic', cdRegister);
S.RegisterDelphiFunction(@GetSpecialFolderPath, 'GetSpecialFolderPath', cdRegister);
end;
{ TPSImport_uGlobals }
(*----------------------------------------------------------------------------*)
procedure TPSImport_uGlobals.CompileImport1(CompExec: TPSScript);
begin
SIRegister_uGlobals(CompExec.Comp);
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_uGlobals.ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
begin
RIRegister_uGlobals(ri);
RIRegister_uGlobals_Routines(CompExec.Exec); // comment it if no routines
end;
(*----------------------------------------------------------------------------*)
end.