source: cprs/trunk/VA/VA508Accessibility/JAWS/FSAPILib_TLB.pas@ 1008

Last change on this file since 1008 was 829, checked in by Kevin Toppenberg, 14 years ago

Upgrade to version 27

File size: 11.1 KB
Line 
1unit FSAPILib_TLB;
2
3// ************************************************************************ //
4// WARNING
5// -------
6// The types declared in this file were generated from data read from a
7// Type Library. If this type library is explicitly or indirectly (via
8// another type library referring to this type library) re-imported, or the
9// 'Refresh' command of the Type Library Editor activated while editing the
10// Type Library, the contents of this file will be regenerated and all
11// manual modifications will be lost.
12// ************************************************************************ //
13
14// PASTLWTR : 1.2
15// File generated on 5/11/2007 1:25:41 PM from Type Library described below.
16
17// ************************************************************************ //
18// Type Lib: C:\Program Files\Freedom Scientific\Shared\fsapi\1.0\FSAPI.dll (1)
19// LIBID: {F152C4EF-B92F-4139-A901-E8F1E28CC8E0}
20// LCID: 0
21// Helpfile:
22// HelpString: FSAPI 1.0 Type Library
23// DepndLst:
24// (1) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
25// Errors:
26// Error creating palette bitmap of (TJawsApi) : Server C:\Program Files\Freedom Scientific\Shared\fsapi\1.0\fsapi.dll contains no icons
27// ************************************************************************ //
28// *************************************************************************//
29// NOTE:
30// Items guarded by $IFDEF_LIVE_SERVER_AT_DESIGN_TIME are used by properties
31// which return objects that may need to be explicitly created via a function
32// call prior to any access via the property. These items have been disabled
33// in order to prevent accidental use from within the object inspector. You
34// may enable them by defining LIVE_SERVER_AT_DESIGN_TIME or by selectively
35// removing them from the $IFDEF blocks. However, such items must still be
36// programmatically created via a method of the appropriate CoClass before
37// they can be used.
38{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
39{$WARN SYMBOL_PLATFORM OFF}
40{$WRITEABLECONST ON}
41{$VARPROPSETTER ON}
42interface
43
44uses Windows, ActiveX, Classes, Graphics, OleServer, StdVCL, Variants;
45
46
47// *********************************************************************//
48// GUIDS declared in the TypeLibrary. Following prefixes are used:
49// Type Libraries : LIBID_xxxx
50// CoClasses : CLASS_xxxx
51// DISPInterfaces : DIID_xxxx
52// Non-DISP interfaces: IID_xxxx
53// *********************************************************************//
54const
55 // TypeLibrary Major and minor versions
56 FSAPILibMajorVersion = 1;
57 FSAPILibMinorVersion = 0;
58
59 LIBID_FSAPILib: TGUID = '{F152C4EF-B92F-4139-A901-E8F1E28CC8E0}';
60
61 IID_IJawsApi: TGUID = '{123DEDB4-2CF6-429C-A2AB-CC809E5516CE}';
62 CLASS_JawsApi: TGUID = '{CCE5B1E5-B2ED-45D5-B09F-8EC54B75ABF4}';
63type
64
65// *********************************************************************//
66// Forward declaration of types defined in TypeLibrary
67// *********************************************************************//
68 IJawsApi = interface;
69 IJawsApiDisp = dispinterface;
70
71// *********************************************************************//
72// Declaration of CoClasses defined in Type Library
73// (NOTE: Here we map each CoClass to its Default Interface)
74// *********************************************************************//
75 JawsApi = IJawsApi;
76
77
78// *********************************************************************//
79// Interface: IJawsApi
80// Flags: (4416) Dual OleAutomation Dispatchable
81// GUID: {123DEDB4-2CF6-429C-A2AB-CC809E5516CE}
82// *********************************************************************//
83 IJawsApi = interface(IDispatch)
84 ['{123DEDB4-2CF6-429C-A2AB-CC809E5516CE}']
85 function RunScript(const ScriptName: WideString): WordBool; safecall;
86 function SayString(const StringToSpeak: WideString; bFlush: WordBool): WordBool; safecall;
87 procedure StopSpeech; safecall;
88 function Enable(vbNoDDIHooks: WordBool): WordBool; safecall;
89 function Disable: WordBool; safecall;
90 function RunFunction(const FunctionName: WideString): WordBool; safecall;
91 end;
92
93// *********************************************************************//
94// DispIntf: IJawsApiDisp
95// Flags: (4416) Dual OleAutomation Dispatchable
96// GUID: {123DEDB4-2CF6-429C-A2AB-CC809E5516CE}
97// *********************************************************************//
98 IJawsApiDisp = dispinterface
99 ['{123DEDB4-2CF6-429C-A2AB-CC809E5516CE}']
100 function RunScript(const ScriptName: WideString): WordBool; dispid 1;
101 function SayString(const StringToSpeak: WideString; bFlush: WordBool): WordBool; dispid 2;
102 procedure StopSpeech; dispid 3;
103 function Enable(vbNoDDIHooks: WordBool): WordBool; dispid 4;
104 function Disable: WordBool; dispid 5;
105 function RunFunction(const FunctionName: WideString): WordBool; dispid 6;
106 end;
107
108// *********************************************************************//
109// The Class CoJawsApi provides a Create and CreateRemote method to
110// create instances of the default interface IJawsApi exposed by
111// the CoClass JawsApi. The functions are intended to be used by
112// clients wishing to automate the CoClass objects exposed by the
113// server of this typelibrary.
114// *********************************************************************//
115 CoJawsApi = class
116 class function Create: IJawsApi;
117 class function CreateRemote(const MachineName: string): IJawsApi;
118 end;
119
120
121// *********************************************************************//
122// OLE Server Proxy class declaration
123// Server Object : TJawsApi
124// Help String : JawsApi Class
125// Default Interface: IJawsApi
126// Def. Intf. DISP? : No
127// Event Interface:
128// TypeFlags : (2) CanCreate
129// *********************************************************************//
130{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
131 TJawsApiProperties= class;
132{$ENDIF}
133 TJawsApi = class(TOleServer)
134 private
135 FIntf: IJawsApi;
136{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
137 FProps: TJawsApiProperties;
138 function GetServerProperties: TJawsApiProperties;
139{$ENDIF}
140 function GetDefaultInterface: IJawsApi;
141 protected
142 procedure InitServerData; override;
143 public
144 constructor Create(AOwner: TComponent); override;
145 destructor Destroy; override;
146 procedure Connect; override;
147 procedure ConnectTo(svrIntf: IJawsApi);
148 procedure Disconnect; override;
149 function RunScript(const ScriptName: WideString): WordBool;
150 function SayString(const StringToSpeak: WideString; bFlush: WordBool): WordBool;
151 procedure StopSpeech;
152 function Enable(vbNoDDIHooks: WordBool): WordBool;
153 function Disable: WordBool;
154 function RunFunction(const FunctionName: WideString): WordBool;
155 property DefaultInterface: IJawsApi read GetDefaultInterface;
156 published
157{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
158 property Server: TJawsApiProperties read GetServerProperties;
159{$ENDIF}
160 end;
161
162{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
163// *********************************************************************//
164// OLE Server Properties Proxy Class
165// Server Object : TJawsApi
166// (This object is used by the IDE's Property Inspector to allow editing
167// of the properties of this server)
168// *********************************************************************//
169 TJawsApiProperties = class(TPersistent)
170 private
171 FServer: TJawsApi;
172 function GetDefaultInterface: IJawsApi;
173 constructor Create(AServer: TJawsApi);
174 protected
175 public
176 property DefaultInterface: IJawsApi read GetDefaultInterface;
177 published
178 end;
179{$ENDIF}
180
181
182procedure Register;
183
184resourcestring
185 dtlServerPage = 'VA 508';
186
187 dtlOcxPage = 'VA 508';
188
189implementation
190
191uses ComObj;
192
193class function CoJawsApi.Create: IJawsApi;
194begin
195 Result := CreateComObject(CLASS_JawsApi) as IJawsApi;
196end;
197
198class function CoJawsApi.CreateRemote(const MachineName: string): IJawsApi;
199begin
200 Result := CreateRemoteComObject(MachineName, CLASS_JawsApi) as IJawsApi;
201end;
202
203procedure TJawsApi.InitServerData;
204const
205 CServerData: TServerData = (
206 ClassID: '{CCE5B1E5-B2ED-45D5-B09F-8EC54B75ABF4}';
207 IntfIID: '{123DEDB4-2CF6-429C-A2AB-CC809E5516CE}';
208 EventIID: '';
209 LicenseKey: nil;
210 Version: 500);
211begin
212 ServerData := @CServerData;
213end;
214
215procedure TJawsApi.Connect;
216var
217 punk: IUnknown;
218begin
219 if FIntf = nil then
220 begin
221 punk := GetServer;
222 Fintf:= punk as IJawsApi;
223 end;
224end;
225
226procedure TJawsApi.ConnectTo(svrIntf: IJawsApi);
227begin
228 Disconnect;
229 FIntf := svrIntf;
230end;
231
232procedure TJawsApi.DisConnect;
233begin
234 if Fintf <> nil then
235 begin
236 FIntf := nil;
237 end;
238end;
239
240function TJawsApi.GetDefaultInterface: IJawsApi;
241begin
242 if FIntf = nil then
243 Connect;
244 Assert(FIntf <> nil, 'DefaultInterface is NULL. Component is not connected to Server. You must call ''Connect'' or ''ConnectTo'' before this operation');
245 Result := FIntf;
246end;
247
248constructor TJawsApi.Create(AOwner: TComponent);
249begin
250 inherited Create(AOwner);
251{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
252 FProps := TJawsApiProperties.Create(Self);
253{$ENDIF}
254end;
255
256destructor TJawsApi.Destroy;
257begin
258{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
259 FProps.Free;
260{$ENDIF}
261 inherited Destroy;
262end;
263
264{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
265function TJawsApi.GetServerProperties: TJawsApiProperties;
266begin
267 Result := FProps;
268end;
269{$ENDIF}
270
271function TJawsApi.RunScript(const ScriptName: WideString): WordBool;
272begin
273 Result := DefaultInterface.RunScript(ScriptName);
274end;
275
276function TJawsApi.SayString(const StringToSpeak: WideString; bFlush: WordBool): WordBool;
277begin
278 Result := DefaultInterface.SayString(StringToSpeak, bFlush);
279end;
280
281procedure TJawsApi.StopSpeech;
282begin
283 DefaultInterface.StopSpeech;
284end;
285
286function TJawsApi.Enable(vbNoDDIHooks: WordBool): WordBool;
287begin
288 Result := DefaultInterface.Enable(vbNoDDIHooks);
289end;
290
291function TJawsApi.Disable: WordBool;
292begin
293 Result := DefaultInterface.Disable;
294end;
295
296function TJawsApi.RunFunction(const FunctionName: WideString): WordBool;
297begin
298 Result := DefaultInterface.RunFunction(FunctionName);
299end;
300
301{$IFDEF LIVE_SERVER_AT_DESIGN_TIME}
302constructor TJawsApiProperties.Create(AServer: TJawsApi);
303begin
304 inherited Create;
305 FServer := AServer;
306end;
307
308function TJawsApiProperties.GetDefaultInterface: IJawsApi;
309begin
310 Result := FServer.DefaultInterface;
311end;
312
313{$ENDIF}
314
315procedure Register;
316begin
317 RegisterComponents(dtlServerPage, [TJawsApi]);
318end;
319
320end.
Note: See TracBrowser for help on using the repository browser.