This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
Camino.h
142 lines (98 loc) · 5.15 KB
/
Camino.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
/*
* Camino.h
*/
#import <AppKit/AppKit.h>
#import <ScriptingBridge/ScriptingBridge.h>
@class CaminoItem, CaminoWindow, CaminoApplication, CaminoBrowserWindow, CaminoTab, CaminoBookmarkItem, CaminoBookmarkFolder, CaminoBookmark;
/*
* Standard Suite
*/
// A scriptable object.
@interface CaminoItem : SBObject
@property (copy) NSDictionary *properties; // All of the object's properties.
- (void) close; // 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) saveIn:(NSURL *)in_ as:(NSString *)as; // Save an object.
@end
// A window.
@interface CaminoWindow : SBObject
@property (copy) NSString *name; // The full title of the window.
- (NSNumber *) id; // The unique identifier of the window.
@property NSRect bounds; // The bounding rectangle of the window.
@property (readonly) BOOL closeable; // Whether the window has a close box.
@property (readonly) BOOL titled; // Whether the window has a title bar.
@property (copy) NSNumber *index; // The index of the window in the back-to-front window ordering.
@property (readonly) BOOL floating; // Whether the window floats.
@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 (readonly) BOOL resizable; // Whether the window can be resized.
@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.
- (void) close; // 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) saveIn:(NSURL *)in_ as:(NSString *)as; // Save an object.
@end
/*
* Camino Suite
*/
// The application's top-level scripting object.
@interface CaminoApplication : SBApplication
- (SBElementArray *) windows;
- (SBElementArray *) browserWindows;
- (SBElementArray *) bookmarkFolders;
@property (copy, readonly) NSString *name; // The name of the application.
@property (readonly) BOOL frontmost; // Is this the frontmost (active) application?
@property (copy, readonly) NSString *version; // The version of the application.
@property (copy, readonly) CaminoBookmarkFolder *bookmarkMenuCollection;
@property (copy, readonly) CaminoBookmarkFolder *bookmarkBarCollection;
@property (copy, readonly) CaminoBookmarkFolder *topTenCollection;
@property (copy, readonly) CaminoBookmarkFolder *bonjourCollection;
@property (copy, readonly) CaminoBookmarkFolder *addressBookCollection;
- (void) open:(NSURL *)x; // Open an object.
- (void) print:(NSURL *)x; // Print an object.
- (void) quit; // Quit an application.
- (void) openLocation:(NSString *)x; // Open a URL in Camino.
@end
@interface CaminoBrowserWindow : CaminoWindow
- (SBElementArray *) tabs;
@property (copy) CaminoTab *currentTab; // The tab currently selected in the window
@end
@interface CaminoTab : SBObject
@property (copy, readonly) NSString *title; // The tab's displayed title
@property (copy) NSString *URL; // The tab's current URL
- (void) close; // 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) saveIn:(NSURL *)in_ as:(NSString *)as; // Save an object.
@end
@interface CaminoBookmarkItem : SBObject
@property (copy) NSString *name; // The name of the bookmark item.
@property (copy) NSString *objectDescription; // The description of the bookmark item.
@property (copy) NSString *shortcut; // The shortcut for the bookmark item.
- (void) close; // 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) saveIn:(NSURL *)in_ as:(NSString *)as; // Save an object.
@end
@interface CaminoBookmarkFolder : CaminoBookmarkItem
- (SBElementArray *) bookmarkItems;
- (SBElementArray *) bookmarkFolders;
- (SBElementArray *) bookmarks;
@end
@interface CaminoBookmark : CaminoBookmarkItem
@property (copy) NSString *URL; // The URL of the bookmark.
@property (copy, readonly) NSDate *lastVisitDate; // The date the bookmark was last visited.
@property (copy, readonly) NSNumber *visitCount; // The number of times the bookmark has been visited.
@end