-
Notifications
You must be signed in to change notification settings - Fork 4
/
SystemEvents.h
1690 lines (1174 loc) · 65.6 KB
/
SystemEvents.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
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* SystemEvents.h
*/
#import <AppKit/AppKit.h>
#import <ScriptingBridge/ScriptingBridge.h>
@class SystemEventsItem, SystemEventsApplication, SystemEventsColor, SystemEventsDocument, SystemEventsWindow, SystemEventsAttributeRun, SystemEventsCharacter, SystemEventsParagraph, SystemEventsText, SystemEventsAttachment, SystemEventsWord, SystemEventsScreenSaver, SystemEventsScreenSaverPreferencesObject, SystemEventsConfiguration, SystemEventsInterface, SystemEventsLocation, SystemEventsNetworkPreferencesObject, SystemEventsService, SystemEventsExposePreferencesObject, SystemEventsScreenCorner, SystemEventsShortcut, SystemEventsSpacesPreferencesObject, SystemEventsSpacesShortcut, SystemEventsUser, SystemEventsLoginItem, SystemEventsDesktop, SystemEventsDiskItem, SystemEventsAlias, SystemEventsDisk, SystemEventsDomain, SystemEventsClassicDomainObject, SystemEventsFile, SystemEventsFilePackage, SystemEventsFolder, SystemEventsLocalDomainObject, SystemEventsNetworkDomainObject, SystemEventsSystemDomainObject, SystemEventsUserDomainObject, SystemEventsFolderAction, SystemEventsScript, SystemEventsAction, SystemEventsAttribute, SystemEventsUIElement, SystemEventsBrowser, SystemEventsBusyIndicator, SystemEventsButton, SystemEventsCheckbox, SystemEventsColorWell, SystemEventsColumn, SystemEventsComboBox, SystemEventsDrawer, SystemEventsGroup, SystemEventsGrowArea, SystemEventsImage, SystemEventsIncrementor, SystemEventsList, SystemEventsMenu, SystemEventsMenuBar, SystemEventsMenuBarItem, SystemEventsMenuButton, SystemEventsMenuItem, SystemEventsOutline, SystemEventsPopUpButton, SystemEventsProcess, SystemEventsApplicationProcess, SystemEventsDeskAccessoryProcess, SystemEventsProgressIndicator, SystemEventsRadioButton, SystemEventsRadioGroup, SystemEventsRelevanceIndicator, SystemEventsRow, SystemEventsScrollArea, SystemEventsScrollBar, SystemEventsSheet, SystemEventsSlider, SystemEventsSplitter, SystemEventsSplitterGroup, SystemEventsStaticText, SystemEventsTabGroup, SystemEventsTable, SystemEventsTextArea, SystemEventsTextField, SystemEventsToolBar, SystemEventsValueIndicator, SystemEventsPropertyListFile, SystemEventsPropertyListItem, SystemEventsAnnotation, SystemEventsQuickTimeData, SystemEventsAudioData, SystemEventsMovieData, SystemEventsQuickTimeFile, SystemEventsAudioFile, SystemEventsMovieFile, SystemEventsTrack, SystemEventsXMLAttribute, SystemEventsXMLData, SystemEventsXMLElement, SystemEventsXMLFile, SystemEventsAppearancePreferencesObject, SystemEventsSecurityPreferencesObject, SystemEventsDockPreferencesObject, SystemEventsCDAndDVDPreferencesObject, SystemEventsInsertionPreference, SystemEventsPrintSettings;
enum SystemEventsSavo {
SystemEventsSavoAsk = 'ask ' /* Ask the user whether or not to save the file. */,
SystemEventsSavoNo = 'no ' /* Do not save the file. */,
SystemEventsSavoYes = 'yes ' /* Save the file. */
};
typedef enum SystemEventsSavo SystemEventsSavo;
enum SystemEventsEpac {
SystemEventsEpacAllWindows = 'allw' /* all windows */,
SystemEventsEpacApplicationWindows = 'appw' /* application windows */,
SystemEventsEpacDashboard = 'dash' /* dashboard */,
SystemEventsEpacDisableScreenSaver = 'disc' /* disable screen saver */,
SystemEventsEpacNone = 'none' /* none */,
SystemEventsEpacShowDesktop = 'desk' /* show desktop */,
SystemEventsEpacShowSpaces = 'spcs' /* show spaces */,
SystemEventsEpacSleepDisplay = 'diss' /* sleep display */,
SystemEventsEpacStartScreenSaver = 'star' /* start screen saver */
};
typedef enum SystemEventsEpac SystemEventsEpac;
enum SystemEventsEpmd {
SystemEventsEpmdCommand = 'cmdm' /* command */,
SystemEventsEpmdControl = 'ctlm' /* control */,
SystemEventsEpmdNone = 'none' /* none */,
SystemEventsEpmdOption = 'optm' /* option */,
SystemEventsEpmdShift = 'shtm' /* shift */
};
typedef enum SystemEventsEpmd SystemEventsEpmd;
enum SystemEventsEpfk {
SystemEventsEpfkF1 = 'F1ky' /* F1 */,
SystemEventsEpfkF10 = 'F10k' /* F10 */,
SystemEventsEpfkF11 = 'F11k' /* F11 */,
SystemEventsEpfkF12 = 'F12k' /* F12 */,
SystemEventsEpfkF13 = 'F13k' /* F13 */,
SystemEventsEpfkF14 = 'F14k' /* F14 */,
SystemEventsEpfkF15 = 'F15k' /* F15 */,
SystemEventsEpfkF16 = 'F16k' /* F16 */,
SystemEventsEpfkF17 = 'F17k' /* F17 */,
SystemEventsEpfkF18 = 'F18k' /* F18 */,
SystemEventsEpfkF19 = 'F19k' /* F19 */,
SystemEventsEpfkF2 = 'F2ky' /* F2 */,
SystemEventsEpfkF3 = 'F3ky' /* F3 */,
SystemEventsEpfkF4 = 'F4ky' /* F4 */,
SystemEventsEpfkF5 = 'F5ky' /* F5 */,
SystemEventsEpfkF6 = 'F6ky' /* F6 */,
SystemEventsEpfkF7 = 'F7ky' /* F7 */,
SystemEventsEpfkF8 = 'F8ky' /* F8 */,
SystemEventsEpfkF9 = 'F9ky' /* F9 */,
SystemEventsEpfkLeftCommand = 'Lcmd' /* left command */,
SystemEventsEpfkLeftControl = 'Lctl' /* left control */,
SystemEventsEpfkLeftOption = 'Lopt' /* left option */,
SystemEventsEpfkLeftShift = 'Lsht' /* left shift */,
SystemEventsEpfkNone = 'none' /* none */,
SystemEventsEpfkRightCommand = 'Rcmd' /* right command */,
SystemEventsEpfkRightControl = 'Rctl' /* right control */,
SystemEventsEpfkRightOption = 'Ropt' /* right option */,
SystemEventsEpfkRightShift = 'Rsht' /* right shift */,
SystemEventsEpfkSecondaryFunctionKey = 'SFky' /* secondary function key */
};
typedef enum SystemEventsEpfk SystemEventsEpfk;
enum SystemEventsEdfm {
SystemEventsEdfmApplePhotoFormat = 'dfph' /* Apple Photo format */,
SystemEventsEdfmAppleShareFormat = 'dfas' /* AppleShare format */,
SystemEventsEdfmAudioFormat = 'dfau' /* audio format */,
SystemEventsEdfmHighSierraFormat = 'dfhs' /* High Sierra format */,
SystemEventsEdfmISO9660Format = 'df96' /* ISO 9660 format */,
SystemEventsEdfmMacOSExtendedFormat = 'dfh+' /* Mac OS Extended format */,
SystemEventsEdfmMacOSFormat = 'dfhf' /* Mac OS format */,
SystemEventsEdfmMSDOSFormat = 'dfms' /* MSDOS format */,
SystemEventsEdfmNFSFormat = 'dfnf' /* NFS format */,
SystemEventsEdfmProDOSFormat = 'dfpr' /* ProDOS format */,
SystemEventsEdfmQuickTakeFormat = 'dfqt' /* QuickTake format */,
SystemEventsEdfmUDFFormat = 'dfud' /* UDF format */,
SystemEventsEdfmUFSFormat = 'dfuf' /* UFS format */,
SystemEventsEdfmUnknownFormat = 'df$$' /* unknown format */,
SystemEventsEdfmWebDAVFormat = 'dfwd' /* WebDAV format */
};
typedef enum SystemEventsEdfm SystemEventsEdfm;
enum SystemEventsEMds {
SystemEventsEMdsCommandDown = 'Kcmd' /* command down */,
SystemEventsEMdsControlDown = 'Kctl' /* control down */,
SystemEventsEMdsOptionDown = 'Kopt' /* option down */,
SystemEventsEMdsShiftDown = 'Ksft' /* shift down */
};
typedef enum SystemEventsEMds SystemEventsEMds;
enum SystemEventsEMky {
SystemEventsEMkyCommand = 'eCmd' /* command */,
SystemEventsEMkyControl = 'eCnt' /* control */,
SystemEventsEMkyOption = 'eOpt' /* option */,
SystemEventsEMkyShift = 'eSft' /* shift */
};
typedef enum SystemEventsEMky SystemEventsEMky;
enum SystemEventsPrmd {
SystemEventsPrmdNormal = 'norm' /* normal */,
SystemEventsPrmdSlideShow = 'pmss' /* slide show */
};
typedef enum SystemEventsPrmd SystemEventsPrmd;
enum SystemEventsMvsz {
SystemEventsMvszCurrent = 'cust' /* current */,
SystemEventsMvszDouble = 'doub' /* double */,
SystemEventsMvszHalf = 'half' /* half */,
SystemEventsMvszNormal = 'norm' /* normal */,
SystemEventsMvszScreen = 'fits' /* screen */
};
typedef enum SystemEventsMvsz SystemEventsMvsz;
enum SystemEventsSclp {
SystemEventsSclpTogether = 'tgth' /* together */,
SystemEventsSclpTogetherAtTopAndBottom = 'tgtb' /* together at top and bottom */,
SystemEventsSclpTopAndBottom = 'tpbt' /* top and bottom */
};
typedef enum SystemEventsSclp SystemEventsSclp;
enum SystemEventsSclb {
SystemEventsSclbJumpToHere = 'tohr' /* jump to here */,
SystemEventsSclbJumpToNextPage = 'nxpg' /* jump to next page */
};
typedef enum SystemEventsSclb SystemEventsSclb;
enum SystemEventsFtss {
SystemEventsFtssAutomatic = 'autm' /* automatic */,
SystemEventsFtssLight = 'lite' /* light */,
SystemEventsFtssMedium = 'medi' /* medium */,
SystemEventsFtssStandard = 'stnd' /* standard */,
SystemEventsFtssStrong = 'strg' /* strong */
};
typedef enum SystemEventsFtss SystemEventsFtss;
enum SystemEventsAppe {
SystemEventsAppeBlue = 'blue' /* blue */,
SystemEventsAppeGraphite = 'grft' /* graphite */
};
typedef enum SystemEventsAppe SystemEventsAppe;
enum SystemEventsHico {
SystemEventsHicoBlue = 'blue' /* blue */,
SystemEventsHicoGold = 'gold' /* gold */,
SystemEventsHicoGraphite = 'grft' /* graphite */,
SystemEventsHicoGreen = 'gren' /* green */,
SystemEventsHicoOrange = 'orng' /* orange */,
SystemEventsHicoPurple = 'prpl' /* purple */,
SystemEventsHicoRed = 'red ' /* red */,
SystemEventsHicoSilver = 'slvr' /* silver */
};
typedef enum SystemEventsHico SystemEventsHico;
enum SystemEventsDpls {
SystemEventsDplsBottom = 'bott' /* bottom */,
SystemEventsDplsLeft = 'left' /* left */,
SystemEventsDplsRight = 'righ' /* right */
};
typedef enum SystemEventsDpls SystemEventsDpls;
enum SystemEventsDpef {
SystemEventsDpefGenie = 'geni' /* genie */,
SystemEventsDpefScale = 'scal' /* scale */
};
typedef enum SystemEventsDpef SystemEventsDpef;
enum SystemEventsDhac {
SystemEventsDhacAskWhatToDo = 'dhas' /* ask what to do */,
SystemEventsDhacIgnore = 'dhig' /* ignore */,
SystemEventsDhacOpenApplication = 'dhap' /* open application */,
SystemEventsDhacRunAScript = 'dhrs' /* run a script */
};
typedef enum SystemEventsDhac SystemEventsDhac;
enum SystemEventsEnum {
SystemEventsEnumStandard = 'lwst' /* Standard PostScript error handling */,
SystemEventsEnumDetailed = 'lwdt' /* print a detailed report of PostScript errors */
};
typedef enum SystemEventsEnum SystemEventsEnum;
/*
* Standard Suite
*/
// A scriptable object.
@interface SystemEventsItem : SBObject
@property (copy) NSDictionary *properties; // All of the object's properties.
- (void) closeSaving:(SystemEventsSavo)saving savingIn:(SystemEventsAlias *)savingIn; // Close an object.
- (void) delete; // Delete an object.
- (void) duplicateTo:(SBObject *)to withProperties:(NSDictionary *)withProperties; // Copy object(s) and put the copies at a new location.
- (BOOL) exists; // Verify if an object exists.
- (void) moveTo:(SBObject *)to; // Move object(s) to a new location.
- (void) saveAs:(NSString *)as in:(SystemEventsAlias *)in_; // Save an object.
- (void) start; // start the screen saver
- (void) stop; // stop the screen saver
@end
// An application's top level scripting object.
@interface SystemEventsApplication : SBApplication
- (SBElementArray *) documents;
- (SBElementArray *) windows;
@property (readonly) BOOL frontmost; // Is this the frontmost (active) application?
@property (copy, readonly) NSString *name; // The name of the application.
@property (copy, readonly) NSString *version; // The version of the application.
- (void) quitSaving:(SystemEventsSavo)saving; // Quit an application.
- (SystemEventsConfiguration *) connect:(id)x; // connect a configuration or service
- (SystemEventsConfiguration *) disconnect:(id)x; // disconnect a configuration or service
- (void) logOut; // Log out the current user
- (void) restart; // Restart the computer
- (void) shutDown; // Shut Down the computer
- (void) sleep; // Put the computer to sleep
- (SystemEventsUIElement *) clickAt:(NSArray *)at; // cause the target process to behave as if the UI element were clicked
- (void) keyCode:(NSInteger)x using:(SystemEventsEMds)using_; // cause the target process to behave as if key codes were entered
- (void) keystroke:(NSString *)x using:(SystemEventsEMds)using_; // cause the target process to behave as if keystrokes were entered
- (void) abortTransaction; // Discard the results of a bounded update session with one or more files.
- (NSInteger) beginTransaction; // Begin a bounded update session with one or more files.
- (void) endTransaction; // Apply the results of a bounded update session with one or more files.
@end
// A color.
@interface SystemEventsColor : SystemEventsItem
@end
// A document.
@interface SystemEventsDocument : SystemEventsItem
@property (readonly) BOOL modified; // Has the document been modified since the last save?
@property (copy) NSString *name; // The document's name.
@property (copy) NSString *path; // The document's path.
@end
// A window.
@interface SystemEventsWindow : SystemEventsItem
@property NSRect bounds; // The bounding rectangle of the window.
@property (readonly) BOOL closeable; // Whether the window has a close box.
@property (copy, readonly) SystemEventsDocument *document; // The document whose contents are being displayed in the window.
@property (readonly) BOOL floating; // Whether the window floats.
- (NSInteger) id; // The unique identifier of the window.
@property NSInteger index; // The index of the window, ordered front to back.
@property (readonly) BOOL miniaturizable; // Whether the window can be miniaturized.
@property BOOL miniaturized; // Whether the window is currently miniaturized.
@property (readonly) BOOL modal; // Whether the window is the application's current modal window.
@property (copy) NSString *name; // The full title of the window.
@property (readonly) BOOL resizable; // Whether the window can be resized.
@property (readonly) BOOL titled; // Whether the window has a title bar.
@property BOOL visible; // Whether the window is currently visible.
@property (readonly) BOOL zoomable; // Whether the window can be zoomed.
@property BOOL zoomed; // Whether the window is currently zoomed.
@end
/*
* Text Suite
*/
// This subdivides the text into chunks that all have the same attributes.
@interface SystemEventsAttributeRun : SystemEventsItem
- (SBElementArray *) attachments;
- (SBElementArray *) attributeRuns;
- (SBElementArray *) characters;
- (SBElementArray *) paragraphs;
- (SBElementArray *) words;
@property (copy) NSColor *color; // The color of the first character.
@property (copy) NSString *font; // The name of the font of the first character.
@property NSInteger size; // The size in points of the first character.
@end
// This subdivides the text into characters.
@interface SystemEventsCharacter : SystemEventsItem
- (SBElementArray *) attachments;
- (SBElementArray *) attributeRuns;
- (SBElementArray *) characters;
- (SBElementArray *) paragraphs;
- (SBElementArray *) words;
@property (copy) NSColor *color; // The color of the first character.
@property (copy) NSString *font; // The name of the font of the first character.
@property NSInteger size; // The size in points of the first character.
@end
// This subdivides the text into paragraphs.
@interface SystemEventsParagraph : SystemEventsItem
- (SBElementArray *) attachments;
- (SBElementArray *) attributeRuns;
- (SBElementArray *) characters;
- (SBElementArray *) paragraphs;
- (SBElementArray *) words;
@property (copy) NSColor *color; // The color of the first character.
@property (copy) NSString *font; // The name of the font of the first character.
@property NSInteger size; // The size in points of the first character.
@end
// Rich (styled) text
@interface SystemEventsText : SystemEventsItem
- (SBElementArray *) attachments;
- (SBElementArray *) attributeRuns;
- (SBElementArray *) characters;
- (SBElementArray *) paragraphs;
- (SBElementArray *) words;
@property (copy) NSColor *color; // The color of the first character.
@property (copy) NSString *font; // The name of the font of the first character.
@property NSInteger size; // The size in points of the first character.
- (void) keystrokeUsing:(SystemEventsEMds)using_; // cause the target process to behave as if keystrokes were entered
@end
// Represents an inline text attachment. This class is used mainly for make commands.
@interface SystemEventsAttachment : SystemEventsText
@property (copy) NSString *fileName; // The path to the file for the attachment
@end
// This subdivides the text into words.
@interface SystemEventsWord : SystemEventsItem
- (SBElementArray *) attachments;
- (SBElementArray *) attributeRuns;
- (SBElementArray *) characters;
- (SBElementArray *) paragraphs;
- (SBElementArray *) words;
@property (copy) NSColor *color; // The color of the first character.
@property (copy) NSString *font; // The name of the font of the first character.
@property NSInteger size; // The size in points of the first character.
@end
/*
* Screen Saver Suite
*/
// an installed screen saver
@interface SystemEventsScreenSaver : SystemEventsItem
@property (copy, readonly) NSString *displayedName; // name of the screen saver module as displayed to the user
@property (copy, readonly) NSString *name; // name of the screen saver module to be displayed
@property (copy, readonly) SystemEventsAlias *path; // path to the screen saver module
@property (copy) NSString *pictureDisplayStyle; // effect to use when displaying picture-based screen savers (slideshow, collage, or mosaic)
@end
// screen saver settings
@interface SystemEventsScreenSaverPreferencesObject : SystemEventsItem
@property NSInteger delayInterval; // number of seconds of idle time before the screen saver starts; zero for never
@property BOOL mainScreenOnly; // should the screen saver be shown only on the main screen?
@property (readonly) BOOL running; // is the screen saver running?
@property BOOL showClock; // should a clock appear over the screen saver?
@end
/*
* Network Preferences Suite
*/
// A collection of settings for configuring a connection
@interface SystemEventsConfiguration : SystemEventsItem
@property (copy) NSString *accountName; // the name used to authenticate
@property (readonly) BOOL connected; // Is the configuration connected?
- (NSString *) id; // the unique identifier for the configuration
@property (copy) NSString *name; // the name of the configuration
@end
// A collection of settings for a network interface
@interface SystemEventsInterface : SystemEventsItem
@property BOOL automatic; // configure the interface speed, duplex, and mtu automatically?
@property (copy) NSString *duplex; // the duplex setting half | full | full with flow control
- (NSString *) id; // the unique identifier for the interface
@property (copy, readonly) NSString *kind; // the type of interface
@property (copy, readonly) NSString *MACAddress; // the MAC address for the interface
@property NSInteger mtu; // the packet size
@property (copy, readonly) NSString *name; // the name of the interface
@property NSInteger speed; // ethernet speed 10 | 100 | 1000
@end
// A set of services
@interface SystemEventsLocation : SystemEventsItem
- (SBElementArray *) services;
- (NSString *) id; // the unique identifier for the location
@property (copy) NSString *name; // the name of the location
@end
// the preferences for the current user's network
@interface SystemEventsNetworkPreferencesObject : SystemEventsItem
- (SBElementArray *) interfaces;
- (SBElementArray *) locations;
- (SBElementArray *) services;
@property (copy) SystemEventsLocation *currentLocation; // the current location
@end
// A collection of settings for a network service
@interface SystemEventsService : SystemEventsItem
- (SBElementArray *) configurations;
@property (readonly) BOOL active; // Is the service active?
@property (copy) SystemEventsConfiguration *currentConfiguration; // the currently selected configuration
- (NSString *) id; // the unique identifier for the service
@property (copy, readonly) SystemEventsInterface *interface; // the interface the service is built on
@property (readonly) NSInteger kind; // the type of service
@property (copy) NSString *name; // the name of the service
@end
/*
* Expose Preferences Suite
*/
// user's expose and dashboard mouse and key preferences
@interface SystemEventsExposePreferencesObject : SystemEventsItem
@property (copy, readonly) SystemEventsShortcut *allWindowsShortcut; // the key and mouse binding shortcuts for showing the all application windows
@property (copy, readonly) SystemEventsShortcut *applicationWindowsShortcut; // the key and mouse binding shortcuts for showing the current application windows
@property (copy, readonly) SystemEventsScreenCorner *bottomLeftScreenCorner; // the bottom left screen corner
@property (copy, readonly) SystemEventsScreenCorner *bottomRightScreenCorner; // the bottom right screen corner
@property (copy, readonly) SystemEventsShortcut *dashboardShortcut; // the key and mouse binding shortcuts for showing the dashboard
@property (copy, readonly) SystemEventsShortcut *showDesktopShortcut; // the key and mouse binding shortcuts for showing the desktop
@property (copy, readonly) SystemEventsShortcut *showSpacesShortcut; // the key and mouse binding shortcuts for showing spaces
@property (copy, readonly) SystemEventsSpacesPreferencesObject *spacesPreferences; // the spaces preferences
@property (copy, readonly) SystemEventsScreenCorner *topLeftScreenCorner; // the top left screen corner
@property (copy, readonly) SystemEventsScreenCorner *topRightScreenCorner; // the top right screen corner
@end
// a screen corner location for a specific expose or dashboard feature
@interface SystemEventsScreenCorner : SystemEventsItem
@property SystemEventsEpac activity; // activity for a specific screen corner
@property SystemEventsEpmd modifiers; // keyboard modifiers used for a specific screen corner, passed as string or list
@end
// a keyboard or mouse shortcut for a specific expose or dashboard feature
@interface SystemEventsShortcut : SystemEventsItem
@property SystemEventsEpfk functionKey; // keyboard key for a specific shortcut, not all keyboards support all possible function keys
@property SystemEventsEpmd functionKeyModifiers; // keyboard modifiers used for a specific function key, passed as string or list
@property NSInteger mouseButton; // mouse button for a specific shortcut (between 2 and the users number of buttons, 0 or none to remove the property)
@property SystemEventsEpmd mouseButtonModifiers; // keyboard modifiers used for a specific mouse button, passed as string or list
@end
// user's spaces application bindings and navigation preferences
@interface SystemEventsSpacesPreferencesObject : SystemEventsItem
@property (copy) NSDictionary *applicationBindings; // binding of applications to specific spaces
@property (copy, readonly) SystemEventsSpacesShortcut *arrowKeyModifiers; // keyboard modifiers used controlling the arrow key navigation through spaces
@property (copy, readonly) SystemEventsSpacesShortcut *numbersKeyModifiers; // keyboard modifiers used controlling the number key navigation through spaces
@property NSInteger spacesColumns; // number of columns of spaces
@property BOOL spacesEnabled; // is spaces enabled?
@property NSInteger spacesRows; // number of rows of spaces
@end
// The keyboard modifiers for a specific spaces navigation shortcut
@interface SystemEventsSpacesShortcut : SystemEventsItem
@property SystemEventsEpmd keyModifiers; // modifiers used for a specific function key, passed as string or list
@end
/*
* Accounts Suite
*/
// user account
@interface SystemEventsUser : SystemEventsItem
@property (copy, readonly) NSString *fullName; // user's full name
@property (copy, readonly) SystemEventsAlias *homeDirectory; // path to user's home directory
@property (copy, readonly) NSString *name; // user's short name
@property (copy) SystemEventsAlias *picturePath; // path to user's picture. Can be set for current user only!
@end
/*
* Login Items Suite
*/
// an item to be launched or opened at login
@interface SystemEventsLoginItem : SystemEventsItem
@property BOOL hidden; // Is the Login Item hidden when launched?
@property (copy, readonly) NSString *kind; // the file type of the Login Item
@property (copy, readonly) NSString *name; // the name of the Login Item
@property (copy, readonly) NSString *path; // the file system path to the Login Item
@end
/*
* Desktop Suite
*/
// desktop picture settings
@interface SystemEventsDesktop : SystemEventsItem
@property double changeInterval; // number of seconds to wait between changing the desktop picture
@property (copy, readonly) NSString *displayName; // name of display on which this desktop appears
@property (copy) SystemEventsAlias *picture; // path to file used as desktop picture
@property NSInteger pictureRotation; // never, using interval, using login, after sleep
@property (copy) SystemEventsAlias *picturesFolder; // path to folder containing pictures for changing desktop background
@property BOOL randomOrder; // turn on for random ordering of changing desktop pictures
@property BOOL translucentMenuBar; // indicates whether the menu bar is translucent
@end
/*
* Disk-Folder-File Suite
*/
// An item stored in the file system
@interface SystemEventsDiskItem : SystemEventsItem
@property (readonly) BOOL busyStatus; // Is the disk item busy?
@property (copy, readonly) SystemEventsDiskItem *container; // the folder or disk which has this disk item as an element
@property (copy, readonly) NSDate *creationDate; // the date on which the disk item was created
@property (copy, readonly) NSString *displayedName; // the name of the disk item as displayed in the User Interface
- (NSString *) id; // the unique ID of the disk item
@property (copy) NSDate *modificationDate; // the date on which the disk item was last modified
@property (copy) NSString *name; // the name of the disk item
@property (copy, readonly) NSString *nameExtension; // the extension portion of the name
@property (readonly) BOOL packageFolder; // Is the disk item a package?
@property (copy, readonly) NSString *path; // the file system path of the disk item
@property (readonly) long long physicalSize; // the actual space used by the disk item on disk
@property (copy, readonly) NSString *POSIXPath; // the POSIX file system path of the disk item
@property (readonly) long long size; // the logical size of the disk item
@property (copy, readonly) NSString *URL; // the URL of the disk item
@property BOOL visible; // Is the disk item visible?
@property (copy, readonly) NSString *volume; // the volume on which the disk item resides
- (void) delete; // Delete disk item(s).
- (SystemEventsDiskItem *) moveTo:(SBObject *)to; // Move disk item(s) to a new location.
@end
// An alias in the file system
@interface SystemEventsAlias : SystemEventsDiskItem
- (SBElementArray *) aliases;
- (SBElementArray *) diskItems;
- (SBElementArray *) files;
- (SBElementArray *) filePackages;
- (SBElementArray *) folders;
- (SBElementArray *) items;
@property (copy) NSString *creatorType; // the OSType identifying the application that created the alias
@property (copy) NSString *fileType; // the OSType identifying the type of data contained in the alias
@property (copy, readonly) NSString *kind; // The kind of alias, as shown in Finder
@property (copy, readonly) NSString *productVersion; // the version of the product (visible at the top of the "Get Info" window)
@property (copy, readonly) NSString *shortVersion; // the short version of the application bundle referenced by the alias
@property BOOL stationery; // Is the alias a stationery pad?
@property (copy, readonly) NSString *typeIdentifier; // The type identifier of the alias
@property (copy, readonly) NSString *version; // the version of the application bundle referenced by the alias (visible at the bottom of the "Get Info" window)
- (SystemEventsDocument *) open; // Open an object.
- (void) printPrintDialog:(BOOL)printDialog withProperties:(SystemEventsPrintSettings *)withProperties; // Print an object.
@end
// A disk in the file system
@interface SystemEventsDisk : SystemEventsDiskItem
- (SBElementArray *) aliases;
- (SBElementArray *) diskItems;
- (SBElementArray *) files;
- (SBElementArray *) filePackages;
- (SBElementArray *) folders;
- (SBElementArray *) items;
@property (readonly) long long capacity; // the total number of bytes (free or used) on the disk
@property (readonly) BOOL ejectable; // Can the media be ejected (floppies, CD's, and so on)?
@property (readonly) SystemEventsEdfm format; // the file system format of this disk
@property (readonly) long long freeSpace; // the number of free bytes left on the disk
@property BOOL ignorePrivileges; // Ignore permissions on this disk?
@property (readonly) BOOL localVolume; // Is the media a local volume (as opposed to a file server)?
@property (copy, readonly) NSString *server; // the server on which the disk resides, AFP volumes only
@property (readonly) BOOL startup; // Is this disk the boot disk?
@property (copy, readonly) NSString *zone; // the zone in which the disk's server resides, AFP volumes only
@end
// A domain in the file system
@interface SystemEventsDomain : SystemEventsItem
- (SBElementArray *) folders;
@property (copy, readonly) SystemEventsFolder *applicationSupportFolder; // The Application Support folder
@property (copy, readonly) SystemEventsFolder *applicationsFolder; // The Applications folder
@property (copy, readonly) SystemEventsFolder *desktopPicturesFolder; // The Desktop Pictures folder
@property (copy, readonly) SystemEventsFolder *FolderActionScriptsFolder; // The Folder Action Scripts folder
@property (copy, readonly) SystemEventsFolder *fontsFolder; // The Fonts folder
- (NSString *) id; // the unique identifier of the domain
@property (copy, readonly) SystemEventsFolder *libraryFolder; // The Library folder
@property (copy, readonly) NSString *name; // the name of the domain
@property (copy, readonly) SystemEventsFolder *preferencesFolder; // The Preferences folder
@property (copy, readonly) SystemEventsFolder *scriptingAdditionsFolder; // The Scripting Additions folder
@property (copy, readonly) SystemEventsFolder *scriptsFolder; // The Scripts folder
@property (copy, readonly) SystemEventsFolder *sharedDocumentsFolder; // The Shared Documents folder
@property (copy, readonly) SystemEventsFolder *speakableItemsFolder; // The Speakable Items folder
@property (copy, readonly) SystemEventsFolder *utilitiesFolder; // The Utilities folder
@property (copy, readonly) SystemEventsFolder *workflowsFolder; // The Automator Workflows folder
@end
// The Classic domain in the file system
@interface SystemEventsClassicDomainObject : SystemEventsDomain
- (SBElementArray *) folders;
@property (copy, readonly) SystemEventsFolder *appleMenuFolder; // The Apple Menu Items folder
@property (copy, readonly) SystemEventsFolder *controlPanelsFolder; // The Control Panels folder
@property (copy, readonly) SystemEventsFolder *controlStripModulesFolder; // The Control Strip Modules folder
@property (copy, readonly) SystemEventsFolder *desktopFolder; // The Classic Desktop folder
@property (copy, readonly) SystemEventsFolder *extensionsFolder; // The Extensions folder
@property (copy, readonly) SystemEventsFolder *fontsFolder; // The Fonts folder
@property (copy, readonly) SystemEventsFolder *launcherItemsFolder; // The Launcher Items folder
@property (copy, readonly) SystemEventsFolder *preferencesFolder; // The Classic Preferences folder
@property (copy, readonly) SystemEventsFolder *shutdownFolder; // The Shutdown Items folder
@property (copy, readonly) SystemEventsFolder *startupItemsFolder; // The StartupItems folder
@property (copy, readonly) SystemEventsFolder *systemFolder; // The System folder
@end
// A file in the file system
@interface SystemEventsFile : SystemEventsDiskItem
@property (copy) NSString *creatorType; // the OSType identifying the application that created the file
@property (copy) SystemEventsDiskItem *defaultApplication; // the application that will launch if the file is opened
@property (copy) NSString *fileType; // the OSType identifying the type of data contained in the file
@property (copy, readonly) NSString *kind; // The kind of file, as shown in Finder
@property (copy, readonly) NSString *productVersion; // the version of the product (visible at the top of the "Get Info" window)
@property (copy, readonly) NSString *shortVersion; // the short version of the file
@property BOOL stationery; // Is the file a stationery pad?
@property (copy, readonly) NSString *typeIdentifier; // The type identifier of the file
@property (copy, readonly) NSString *version; // the version of the file (visible at the bottom of the "Get Info" window)
- (SystemEventsFile *) open; // Open disk item(s) with the appropriate application.
@end
// A file package in the file system
@interface SystemEventsFilePackage : SystemEventsFile
- (SBElementArray *) aliases;
- (SBElementArray *) diskItems;
- (SBElementArray *) files;
- (SBElementArray *) filePackages;
- (SBElementArray *) folders;
- (SBElementArray *) items;
@end
// A folder in the file system
@interface SystemEventsFolder : SystemEventsDiskItem
- (SBElementArray *) aliases;
- (SBElementArray *) diskItems;
- (SBElementArray *) files;
- (SBElementArray *) filePackages;
- (SBElementArray *) folders;
- (SBElementArray *) items;
@end
// An item stored in the file system
@interface SystemEventsItem (DiskFolderFileSuite)
- (NSString *) id; // the unique ID of the item
@property (copy) NSString *name; // the name of the item
@end
// The local domain in the file system
@interface SystemEventsLocalDomainObject : SystemEventsDomain
- (SBElementArray *) folders;
@end
// The network domain in the file system
@interface SystemEventsNetworkDomainObject : SystemEventsDomain
- (SBElementArray *) folders;
@end
// The system domain in the file system
@interface SystemEventsSystemDomainObject : SystemEventsDomain
- (SBElementArray *) folders;
@end
// The user domain in the file system
@interface SystemEventsUserDomainObject : SystemEventsDomain
- (SBElementArray *) folders;
@property (copy, readonly) SystemEventsFolder *desktopFolder; // The user's Desktop folder
@property (copy, readonly) SystemEventsFolder *documentsFolder; // The user's Documents folder
@property (copy, readonly) SystemEventsFolder *downloadsFolder; // The user's Downloads folder
@property (copy, readonly) SystemEventsFolder *favoritesFolder; // The user's Favorites folder
@property (copy, readonly) SystemEventsFolder *homeFolder; // The user's Home folder
@property (copy, readonly) SystemEventsFolder *moviesFolder; // The user's Movies folder
@property (copy, readonly) SystemEventsFolder *musicFolder; // The user's Music folder
@property (copy, readonly) SystemEventsFolder *picturesFolder; // The user's Pictures folder
@property (copy, readonly) SystemEventsFolder *publicFolder; // The user's Public folder
@property (copy, readonly) SystemEventsFolder *sitesFolder; // The user's Sites folder
@property (copy, readonly) SystemEventsFolder *temporaryItemsFolder; // The Temporary Items folder
@end
/*
* Folder Actions Suite
*/
// An action attached to a folder in the file system
@interface SystemEventsFolderAction : SystemEventsItem
- (SBElementArray *) scripts;
@property BOOL enabled; // Is the folder action enabled?
@property (copy) NSString *name; // the name of the folder action, which is also the name of the folder
@property (copy, readonly) NSString *path; // the path to the folder to which the folder action applies
@property (copy, readonly) NSString *volume; // the volume on which the folder action resides
@end
// A script invoked by a folder action
@interface SystemEventsScript : SystemEventsItem
@property BOOL enabled; // Is the script enabled?
@property (copy, readonly) NSString *name; // the name of the script
@property (copy, readonly) NSString *path; // the file system path of the disk
@property (copy, readonly) NSString *POSIXPath; // the POSIX file system path of the disk
@end
/*
* Processes Suite
*/
// An action that can be performed on the UI element
@interface SystemEventsAction : SystemEventsItem
@property (copy, readonly) NSString *objectDescription; // what the action does
@property (copy, readonly) NSString *name; // the name of the action
- (SystemEventsAction *) perform; // cause the target process to behave as if the action were applied to its UI element
@end
// An named data value associated with the UI element
@interface SystemEventsAttribute : SystemEventsItem
@property (copy, readonly) NSString *name; // the name of the attribute
@property (readonly) BOOL settable; // Can the attribute be set?
@property (copy) id value; // the current value of the attribute
@end
// A piece of the user interface of a process
@interface SystemEventsUIElement : SystemEventsItem
- (SBElementArray *) actions;
- (SBElementArray *) attributes;
- (SBElementArray *) browsers;
- (SBElementArray *) busyIndicators;
- (SBElementArray *) buttons;
- (SBElementArray *) checkboxes;
- (SBElementArray *) colorWells;
- (SBElementArray *) columns;
- (SBElementArray *) comboBoxes;
- (SBElementArray *) drawers;
- (SBElementArray *) groups;
- (SBElementArray *) growAreas;
- (SBElementArray *) images;
- (SBElementArray *) incrementors;
- (SBElementArray *) lists;
- (SBElementArray *) menus;
- (SBElementArray *) menuBars;
- (SBElementArray *) menuBarItems;
- (SBElementArray *) menuButtons;
- (SBElementArray *) menuItems;
- (SBElementArray *) outlines;
- (SBElementArray *) popUpButtons;
- (SBElementArray *) progressIndicators;
- (SBElementArray *) radioButtons;
- (SBElementArray *) radioGroups;
- (SBElementArray *) relevanceIndicators;
- (SBElementArray *) rows;
- (SBElementArray *) scrollAreas;
- (SBElementArray *) scrollBars;
- (SBElementArray *) sheets;
- (SBElementArray *) sliders;
- (SBElementArray *) splitters;
- (SBElementArray *) splitterGroups;
- (SBElementArray *) staticTexts;
- (SBElementArray *) tabGroups;
- (SBElementArray *) tables;
- (SBElementArray *) textAreas;
- (SBElementArray *) textFields;
- (SBElementArray *) toolBars;
- (SBElementArray *) UIElements;
- (SBElementArray *) valueIndicators;
- (SBElementArray *) windows;
@property (copy, readonly) NSString *accessibilityDescription; // a more complete description of the UI element and its capabilities
@property (copy, readonly) NSString *objectDescription; // the accessibility description, if available; otherwise, the role description
@property (readonly) BOOL enabled; // Is the UI element enabled? ( Does it accept clicks? )
@property (copy, readonly) NSArray *entireContents; // a list of every UI element contained in this UI element and its child UI elements, to the limits of the tree
@property BOOL focused; // Is the focus on this UI element?
@property (copy, readonly) NSString *help; // an elaborate description of the UI element and its capabilities
@property (readonly) NSInteger maximumValue; // the maximum value that the UI element can take on
@property (readonly) NSInteger minimumValue; // the minimum value that the UI element can take on
@property (copy, readonly) NSString *name; // the name of the UI Element, which identifies it within its container
@property (copy, readonly) NSString *orientation; // the orientation of the UI element
@property (copy) NSArray *position; // the position of the UI element
@property (copy, readonly) NSString *role; // an encoded description of the UI element and its capabilities
@property (copy, readonly) NSString *roleDescription; // a more complete description of the UI element's role
@property BOOL selected; // Is the UI element selected?
@property (copy) NSArray *size; // the size of the UI element
@property (copy, readonly) NSString *subrole; // an encoded description of the UI element and its capabilities
@property (copy, readonly) NSString *title; // the title of the UI element as it appears on the screen
@property NSInteger value; // the current value of the UI element
- (SystemEventsUIElement *) clickAt:(NSArray *)at; // cause the target process to behave as if the UI element were clicked
- (SystemEventsUIElement *) select; // set the selected property of the UI element
@end
// A browser belonging to a window
@interface SystemEventsBrowser : SystemEventsUIElement
@end
// A busy indicator belonging to a window
@interface SystemEventsBusyIndicator : SystemEventsUIElement
@end
// A button belonging to a window or scroll bar
@interface SystemEventsButton : SystemEventsUIElement
@end
// A checkbox belonging to a window
@interface SystemEventsCheckbox : SystemEventsUIElement
@end
// A color well belonging to a window
@interface SystemEventsColorWell : SystemEventsUIElement
@end
// A column belonging to a table
@interface SystemEventsColumn : SystemEventsUIElement
@end
// A combo box belonging to a window
@interface SystemEventsComboBox : SystemEventsUIElement
@end
// A drawer that may be extended from a window
@interface SystemEventsDrawer : SystemEventsUIElement
@end
// A group belonging to a window
@interface SystemEventsGroup : SystemEventsUIElement
- (SBElementArray *) checkboxes;
- (SBElementArray *) staticTexts;
@end
// A grow area belonging to a window
@interface SystemEventsGrowArea : SystemEventsUIElement
@end
// An image belonging to a static text field
@interface SystemEventsImage : SystemEventsUIElement
@end
// A incrementor belonging to a window
@interface SystemEventsIncrementor : SystemEventsUIElement