-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppleGuide.h
930 lines (797 loc) · 24.5 KB
/
AppleGuide.h
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
/*
File: AppleGuide.h
Contains: Apple Guide Interfaces.
Version: Technology: Mac OS 8
Release: Universal Interfaces 3.4
Copyright: © 1994-2001 by Apple Computer, Inc., all rights reserved.
Bugs?: For bug reports, consult the following page on
the World Wide Web:
http://developer.apple.com/bugreporter/
*/
#ifndef __APPLEGUIDE__
#define __APPLEGUIDE__
#ifndef __MACTYPES__
#include <MacTypes.h>
#endif
#ifndef __APPLEEVENTS__
#include <AppleEvents.h>
#endif
#ifndef __FILES__
#include <Files.h>
#endif
#if PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if PRAGMA_IMPORT
#pragma import on
#endif
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(push, 2)
#elif PRAGMA_STRUCT_PACK
#pragma pack(2)
#endif
/* Types*/
typedef UInt32 AGRefNum;
typedef UInt32 AGCoachRefNum;
typedef UInt32 AGContextRefNum;
struct AGAppInfo {
AEEventID eventId;
long refCon;
void * contextObj; /* private system field*/
};
typedef struct AGAppInfo AGAppInfo;
typedef AGAppInfo * AGAppInfoPtr;
typedef AGAppInfoPtr * AGAppInfoHdl;
typedef CALLBACK_API( OSErr , CoachReplyProcPtr )(Rect *pRect, Ptr name, long refCon);
typedef CALLBACK_API( OSErr , ContextReplyProcPtr )(Ptr pInputData, Size inputDataSize, Ptr *ppOutputData, Size *pOutputDataSize, AGAppInfoHdl hAppInfo);
typedef STACK_UPP_TYPE(CoachReplyProcPtr) CoachReplyUPP;
typedef STACK_UPP_TYPE(ContextReplyProcPtr) ContextReplyUPP;
#if CALL_NOT_IN_CARBON
/*
* NewCoachReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( CoachReplyUPP )
NewCoachReplyUPP(CoachReplyProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
enum { uppCoachReplyProcInfo = 0x00000FE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
#ifdef __cplusplus
inline CoachReplyUPP NewCoachReplyUPP(CoachReplyProcPtr userRoutine) { return (CoachReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCoachReplyProcInfo, GetCurrentArchitecture()); }
#else
#define NewCoachReplyUPP(userRoutine) (CoachReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCoachReplyProcInfo, GetCurrentArchitecture())
#endif
#endif
/*
* NewContextReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( ContextReplyUPP )
NewContextReplyUPP(ContextReplyProcPtr userRoutine);
#if !OPAQUE_UPP_TYPES
enum { uppContextReplyProcInfo = 0x0000FFE0 }; /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
#ifdef __cplusplus
inline ContextReplyUPP NewContextReplyUPP(ContextReplyProcPtr userRoutine) { return (ContextReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppContextReplyProcInfo, GetCurrentArchitecture()); }
#else
#define NewContextReplyUPP(userRoutine) (ContextReplyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppContextReplyProcInfo, GetCurrentArchitecture())
#endif
#endif
/*
* DisposeCoachReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( void )
DisposeCoachReplyUPP(CoachReplyUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void DisposeCoachReplyUPP(CoachReplyUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
#else
#define DisposeCoachReplyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
#endif
#endif
/*
* DisposeContextReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( void )
DisposeContextReplyUPP(ContextReplyUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline void DisposeContextReplyUPP(ContextReplyUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
#else
#define DisposeContextReplyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
#endif
#endif
/*
* InvokeCoachReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( OSErr )
InvokeCoachReplyUPP(
Rect * pRect,
Ptr name,
long refCon,
CoachReplyUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline OSErr InvokeCoachReplyUPP(Rect * pRect, Ptr name, long refCon, CoachReplyUPP userUPP) { return (OSErr)CALL_THREE_PARAMETER_UPP(userUPP, uppCoachReplyProcInfo, pRect, name, refCon); }
#else
#define InvokeCoachReplyUPP(pRect, name, refCon, userUPP) (OSErr)CALL_THREE_PARAMETER_UPP((userUPP), uppCoachReplyProcInfo, (pRect), (name), (refCon))
#endif
#endif
/*
* InvokeContextReplyUPP()
*
* Availability:
* Non-Carbon CFM: available as macro/inline
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API_C( OSErr )
InvokeContextReplyUPP(
Ptr pInputData,
Size inputDataSize,
Ptr * ppOutputData,
Size * pOutputDataSize,
AGAppInfoHdl hAppInfo,
ContextReplyUPP userUPP);
#if !OPAQUE_UPP_TYPES
#ifdef __cplusplus
inline OSErr InvokeContextReplyUPP(Ptr pInputData, Size inputDataSize, Ptr * ppOutputData, Size * pOutputDataSize, AGAppInfoHdl hAppInfo, ContextReplyUPP userUPP) { return (OSErr)CALL_FIVE_PARAMETER_UPP(userUPP, uppContextReplyProcInfo, pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo); }
#else
#define InvokeContextReplyUPP(pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo, userUPP) (OSErr)CALL_FIVE_PARAMETER_UPP((userUPP), uppContextReplyProcInfo, (pInputData), (inputDataSize), (ppOutputData), (pOutputDataSize), (hAppInfo))
#endif
#endif
#endif /* CALL_NOT_IN_CARBON */
#if CALL_NOT_IN_CARBON || OLDROUTINENAMES
/* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
#define NewCoachReplyProc(userRoutine) NewCoachReplyUPP(userRoutine)
#define NewContextReplyProc(userRoutine) NewContextReplyUPP(userRoutine)
#define CallCoachReplyProc(userRoutine, pRect, name, refCon) InvokeCoachReplyUPP(pRect, name, refCon, userRoutine)
#define CallContextReplyProc(userRoutine, pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo) InvokeContextReplyUPP(pInputData, inputDataSize, ppOutputData, pOutputDataSize, hAppInfo, userRoutine)
#endif /* CALL_NOT_IN_CARBON */
/* Constants*/
enum {
kAGDefault = 0,
kAGFrontDatabase = 1,
kAGNoMixin = (-1)
};
enum {
kAGViewFullHowdy = 1, /* Full-size Howdy*/
kAGViewTopicAreas = 2, /* Full-size Topic Areas*/
kAGViewIndex = 3, /* Full-size Index Terms*/
kAGViewLookFor = 4, /* Full-size Look-For (Search)*/
kAGViewSingleHowdy = 5, /* Single-list-size Howdy*/
kAGViewSingleTopics = 6 /* Single-list-size Topics*/
};
enum {
kAGFileMain = FOUR_CHAR_CODE('poco'),
kAGFileMixin = FOUR_CHAR_CODE('mixn')
};
/* To test against AGGetAvailableDBTypes*/
enum {
kAGDBTypeBitAny = 0x00000001,
kAGDBTypeBitHelp = 0x00000002,
kAGDBTypeBitTutorial = 0x00000004,
kAGDBTypeBitShortcuts = 0x00000008,
kAGDBTypeBitAbout = 0x00000010,
kAGDBTypeBitOther = 0x00000080
};
typedef UInt16 AGStatus;
/* Returned by AGGetStatus*/
enum {
kAGIsNotRunning = 0,
kAGIsSleeping = 1,
kAGIsActive = 2
};
/* Flags used in AGOpen, AGOpenWithSearch, AGOpenWithView*/
enum {
kHelpViewerSearchAll = (1 << 0)
};
typedef UInt16 AGWindowKind;
/* Returned by AGGetFrontWindowKind*/
enum {
kAGNoWindow = 0,
kAGAccessWindow = 1,
kAGPresentationWindow = 2
};
/* Error Codes*/
/* Not an enum, because other OSErrs are valid.*/
typedef SInt16 AGErr;
/* Apple Guide error codes*/
enum {
/* -------------------- Apple event reply codes*/
kAGErrUnknownEvent = -2900,
kAGErrCantStartup = -2901,
kAGErrNoAccWin = -2902,
kAGErrNoPreWin = -2903,
kAGErrNoSequence = -2904,
kAGErrNotOopsSequence = -2905,
kAGErrReserved06 = -2906,
kAGErrNoPanel = -2907,
kAGErrContentNotFound = -2908,
kAGErrMissingString = -2909,
kAGErrInfoNotAvail = -2910,
kAGErrEventNotAvailable = -2911,
kAGErrCannotMakeCoach = -2912,
kAGErrSessionIDsNotMatch = -2913,
kAGErrMissingDatabaseSpec = -2914,
kAGMissingSequenceMap = -2915, /* -------------------- Coach's Chalkboard reply codes*/
kAGErrItemNotFound = -2925,
kAGErrBalloonResourceNotFound = -2926,
kAGErrChalkResourceNotFound = -2927,
kAGErrChdvResourceNotFound = -2928,
kAGErrAlreadyShowing = -2929,
kAGErrBalloonResourceSkip = -2930,
kAGErrItemNotVisible = -2931,
kAGErrReserved32 = -2932,
kAGErrNotFrontProcess = -2933,
kAGErrMacroResourceNotFound = -2934, /* -------------------- API reply codes*/
kAGErrAppleGuideNotAvailable = -2951,
kAGErrCannotInitCoach = -2952,
kAGErrCannotInitContext = -2953,
kAGErrCannotOpenAliasFile = -2954,
kAGErrNoAliasResource = -2955,
kAGErrDatabaseNotAvailable = -2956,
kAGErrDatabaseNotOpen = -2957,
kAGErrMissingAppInfoHdl = -2958,
kAGErrMissingContextObject = -2959,
kAGErrInvalidRefNum = -2960,
kAGErrDatabaseOpen = -2961,
kAGErrInsufficientMemory = -2962
};
/* Events*/
/* Not an enum because we want to make assignments.*/
typedef UInt32 AGEvent;
/* Handy events for AGGeneral.*/
enum {
/* Panel actions (Require a presentation window).*/
kAGEventDoCoach = FOUR_CHAR_CODE('doco'),
kAGEventDoHuh = FOUR_CHAR_CODE('dhuh'),
kAGEventGoNext = FOUR_CHAR_CODE('gonp'),
kAGEventGoPrev = FOUR_CHAR_CODE('gopp'),
kAGEventHidePanel = FOUR_CHAR_CODE('pahi'),
kAGEventReturnBack = FOUR_CHAR_CODE('gobk'),
kAGEventShowPanel = FOUR_CHAR_CODE('pash'),
kAGEventTogglePanel = FOUR_CHAR_CODE('patg')
};
/* Functions*/
/*
AGClose
Close the database associated with the AGRefNum.
*/
#if CALL_NOT_IN_CARBON
/*
* AGClose()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGClose(AGRefNum * refNum) TWOWORDINLINE(0x7011, 0xAA6E);
/*
AGGeneral
Cause various events to happen.
*/
/*
* AGGeneral()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGGeneral(
AGRefNum refNum,
AGEvent theEvent) TWOWORDINLINE(0x700D, 0xAA6E);
/*
AGGetAvailableDBTypes
Return the database types available for this application.
*/
/*
* AGGetAvailableDBTypes()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( UInt32 )
AGGetAvailableDBTypes(void) TWOWORDINLINE(0x7008, 0xAA6E);
/*
AGGetFrontWindowKind
Return the kind of the front window.
*/
/*
* AGGetFrontWindowKind()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGWindowKind )
AGGetFrontWindowKind(AGRefNum refNum) TWOWORDINLINE(0x700C, 0xAA6E);
/*
AGGetFSSpec
Return the FSSpec for the AGRefNum.
*/
/*
* AGGetFSSpec()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGGetFSSpec(
AGRefNum refNum,
FSSpec * fileSpec) TWOWORDINLINE(0x700F, 0xAA6E);
/*
AGGetStatus
Return the status of Apple Guide.
*/
/*
* AGGetStatus()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGStatus )
AGGetStatus(void) TWOWORDINLINE(0x7009, 0xAA6E);
/*
AGInstallCoachHandler
Install a Coach object location query handler.
*/
/*
* AGInstallCoachHandler()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGInstallCoachHandler(
CoachReplyUPP coachReplyProc,
long refCon,
AGCoachRefNum * resultRefNum) TWOWORDINLINE(0x7012, 0xAA6E);
/*
AGInstallContextHandler
Install a context check query handler.
*/
/*
* AGInstallContextHandler()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGInstallContextHandler(
ContextReplyUPP contextReplyProc,
AEEventID eventID,
long refCon,
AGContextRefNum * resultRefNum) TWOWORDINLINE(0x7013, 0xAA6E);
/*
AGIsDatabaseOpen
Return true if the database associated with the AGRefNum is open.
*/
/*
* AGIsDatabaseOpen()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( Boolean )
AGIsDatabaseOpen(AGRefNum refNum) TWOWORDINLINE(0x7006, 0xAA6E);
/*
AGOpen
Open a guide database.
*/
/*
* AGOpen()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGOpen(
ConstFSSpecPtr fileSpec,
UInt32 flags,
Handle mixinControl,
AGRefNum * resultRefNum) TWOWORDINLINE(0x7001, 0xAA6E);
/*
AGOpenWithSearch
Open a guide database and preset a search string.
*/
/*
* AGOpenWithSearch()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGOpenWithSearch(
ConstFSSpecPtr fileSpec,
UInt32 flags,
Handle mixinControl,
ConstStr255Param searchString,
AGRefNum * resultRefNum) TWOWORDINLINE(0x7002, 0xAA6E);
/*
AGOpenWithSequence
Open a guide database and display a presentation window sequence.
*/
/*
* AGOpenWithSequence()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGOpenWithSequence(
ConstFSSpecPtr fileSpec,
UInt32 flags,
Handle mixinControl,
short sequenceID,
AGRefNum * resultRefNum) TWOWORDINLINE(0x7004, 0xAA6E);
/*
AGOpenWithView
Open a guide database and override the default view.
*/
/*
* AGOpenWithView()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGOpenWithView(
ConstFSSpecPtr fileSpec,
UInt32 flags,
Handle mixinControl,
short viewNum,
AGRefNum * resultRefNum) TWOWORDINLINE(0x7005, 0xAA6E);
/*
AGQuit
Make Apple Guide quit.
*/
/*
* AGQuit()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGQuit(void) TWOWORDINLINE(0x7010, 0xAA6E);
/*
AGRemoveCoachHandler
Remove the Coach object location query handler.
*/
/*
* AGRemoveCoachHandler()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGRemoveCoachHandler(AGCoachRefNum * resultRefNum) TWOWORDINLINE(0x7014, 0xAA6E);
/*
AGRemoveContextHandler
Remove the context check query handler.
*/
/*
* AGRemoveContextHandler()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGRemoveContextHandler(AGContextRefNum * resultRefNum) TWOWORDINLINE(0x7015, 0xAA6E);
/*
AGStart
Start up Apple Guide in the background.
*/
/*
* AGStart()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.0 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGErr )
AGStart(void) TWOWORDINLINE(0x700A, 0xAA6E);
/* typedef's*/
#endif /* CALL_NOT_IN_CARBON */
typedef FSSpec AGFileFSSpecType;
typedef short AGFileSelectorCountType;
typedef short AGFileSelectorIndexType;
typedef OSType AGFileSelectorType;
typedef long AGFileSelectorValueType;
typedef short AGFileDBType;
typedef Str63 AGFileDBMenuNamePtr;
typedef short AGFileDBScriptType;
typedef short AGFileDBRegionType;
typedef short AGFileMajorRevType;
typedef short AGFileMinorRevType;
typedef short AGFileCountType;
/* Database types (for AGFileDBType parameter).*/
enum {
kAGFileDBTypeAny = 0,
kAGFileDBTypeHelp = 1,
kAGFileDBTypeTutorial = 2,
kAGFileDBTypeShortcuts = 3,
kAGFileDBTypeAbout = 4,
kAGFileDBTypeOther = 8
};
#if CALL_NOT_IN_CARBON
/*
* AGFileGetDBMenuName()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetDBMenuName(
const FSSpec * fileSpec,
Str63 menuItemNameString);
/* Get the database type.*/
/*
* AGFileGetDBType()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetDBType(
const FSSpec * fileSpec,
AGFileDBType * databaseType);
/*
Get the version of the software
that created this database.
*/
/*
* AGFileGetDBVersion()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetDBVersion(
const FSSpec * fileSpec,
AGFileMajorRevType * majorRev,
AGFileMinorRevType * minorRev);
/* Get the database script and region information.*/
/*
* AGFileGetDBCountry()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetDBCountry(
const FSSpec * fileSpec,
AGFileDBScriptType * script,
AGFileDBRegionType * region);
/* Return the number of selectors in database.*/
/*
* AGFileGetSelectorCount()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGFileSelectorCountType )
AGFileGetSelectorCount(const FSSpec * fileSpec);
/*
Get the i-th database selector (1 to AGFileSelectorCountType)
and its value.
*/
/*
* AGFileGetSelector()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetSelector(
const FSSpec * fileSpec,
AGFileSelectorIndexType selectorNumber,
AGFileSelectorType * selector,
AGFileSelectorValueType * value);
/* Return true if database is mixin.*/
/*
* AGFileIsMixin()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( Boolean )
AGFileIsMixin(const FSSpec * fileSpec);
/*
Return the number of database files
of the specified databaseType and main/mixin.
Any file creator is acceptible,
but type must be kAGFileMain or kAGFileMixin.
*/
/*
* AGFileGetDBCount()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( AGFileCountType )
AGFileGetDBCount(
short vRefNum,
long dirID,
AGFileDBType databaseType,
Boolean wantMixin);
/*
Get the FSSpec for the dbIndex-th database
of the specified databaseType and main/mixin.
Any file creator is acceptible,
but type must be kAGFileMain or kAGFileMixin.
*/
/*
* AGFileGetIndDB()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetIndDB(
short vRefNum,
long dirID,
AGFileDBType databaseType,
Boolean wantMixin,
short dbIndex,
FSSpec * fileSpec);
/*
This selector must match with the application
creator in order for this file to appear in the
application's Help menu. Ignored for mixin files
because they never appear in the Help menu anyway.
If empty (zeros), will appear in the Help menu
of any host application.
*/
/*
* AGFileGetHelpMenuAppCreator()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetHelpMenuAppCreator(
const FSSpec * fileSpec,
OSType * helpMenuAppCreator);
/*
This selector must match in the main and mixin
files in order for the mixin to mix-in with the main.
Empty (zeros) selectors are valid matches.
A '****' selector will mix-in with any main.
*/
/*
* AGFileGetMixinMatchSelector()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetMixinMatchSelector(
const FSSpec * fileSpec,
OSType * mixinMatchSelector);
/*
This is the text of the balloon for the
Help menu item for this database.
*/
/*
* AGFileGetHelpMenuBalloonText()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGFileGetHelpMenuBalloonText(
const FSSpec * fileSpec,
Str255 helpMenuBalloonString);
/*
* AGGetSystemDB()
*
* Availability:
* Non-Carbon CFM: in AppleGuideLib 2.2 and later
* CarbonLib: not available
* Mac OS X: not available
*/
EXTERN_API( OSErr )
AGGetSystemDB(
AGFileDBType databaseType,
Boolean wantMixin,
FSSpec * pFileSpec);
#endif /* CALL_NOT_IN_CARBON */
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#elif PRAGMA_STRUCT_PACKPUSH
#pragma pack(pop)
#elif PRAGMA_STRUCT_PACK
#pragma pack()
#endif
#ifdef PRAGMA_IMPORT_OFF
#pragma import off
#elif PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#endif /* __APPLEGUIDE__ */