| 1 | n/a | """Suite Standard Suite: Common terms for most applications |
|---|
| 2 | n/a | Level 1, version 1 |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | Generated from /Volumes/Sap/Applications (Mac OS 9)/Netscape Communicator\xe2\x84\xa2 Folder/Netscape Communicator\xe2\x84\xa2 |
|---|
| 5 | n/a | AETE/AEUT resource version 1/0, language 0, script 0 |
|---|
| 6 | n/a | """ |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import aetools |
|---|
| 9 | n/a | import MacOS |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | _code = 'CoRe' |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | from StdSuites.Standard_Suite import * |
|---|
| 14 | n/a | class Standard_Suite_Events(Standard_Suite_Events): |
|---|
| 15 | n/a | |
|---|
| 16 | n/a | def close(self, _object, _attributes={}, **_arguments): |
|---|
| 17 | n/a | """close: Close an object |
|---|
| 18 | n/a | Required argument: the objects to close |
|---|
| 19 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 20 | n/a | """ |
|---|
| 21 | n/a | _code = 'core' |
|---|
| 22 | n/a | _subcode = 'clos' |
|---|
| 23 | n/a | |
|---|
| 24 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 25 | n/a | _arguments['----'] = _object |
|---|
| 26 | n/a | |
|---|
| 27 | n/a | |
|---|
| 28 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 29 | n/a | _arguments, _attributes) |
|---|
| 30 | n/a | if _arguments.get('errn', 0): |
|---|
| 31 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 32 | n/a | # XXXX Optionally decode result |
|---|
| 33 | n/a | if _arguments.has_key('----'): |
|---|
| 34 | n/a | return _arguments['----'] |
|---|
| 35 | n/a | |
|---|
| 36 | n/a | def data_size(self, _object, _attributes={}, **_arguments): |
|---|
| 37 | n/a | """data size: Return the size in bytes of an object |
|---|
| 38 | n/a | Required argument: the object whose data size is to be returned |
|---|
| 39 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 40 | n/a | Returns: the size of the object in bytes |
|---|
| 41 | n/a | """ |
|---|
| 42 | n/a | _code = 'core' |
|---|
| 43 | n/a | _subcode = 'dsiz' |
|---|
| 44 | n/a | |
|---|
| 45 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 46 | n/a | _arguments['----'] = _object |
|---|
| 47 | n/a | |
|---|
| 48 | n/a | |
|---|
| 49 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 50 | n/a | _arguments, _attributes) |
|---|
| 51 | n/a | if _arguments.get('errn', 0): |
|---|
| 52 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 53 | n/a | # XXXX Optionally decode result |
|---|
| 54 | n/a | if _arguments.has_key('----'): |
|---|
| 55 | n/a | return _arguments['----'] |
|---|
| 56 | n/a | |
|---|
| 57 | n/a | def get(self, _object, _attributes={}, **_arguments): |
|---|
| 58 | n/a | """get: Get the data for an object |
|---|
| 59 | n/a | Required argument: the object whose data is to be returned |
|---|
| 60 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 61 | n/a | Returns: The data from the object |
|---|
| 62 | n/a | """ |
|---|
| 63 | n/a | _code = 'core' |
|---|
| 64 | n/a | _subcode = 'getd' |
|---|
| 65 | n/a | |
|---|
| 66 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 67 | n/a | _arguments['----'] = _object |
|---|
| 68 | n/a | |
|---|
| 69 | n/a | |
|---|
| 70 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 71 | n/a | _arguments, _attributes) |
|---|
| 72 | n/a | if _arguments.get('errn', 0): |
|---|
| 73 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 74 | n/a | # XXXX Optionally decode result |
|---|
| 75 | n/a | if _arguments.has_key('----'): |
|---|
| 76 | n/a | return _arguments['----'] |
|---|
| 77 | n/a | |
|---|
| 78 | n/a | _argmap_set = { |
|---|
| 79 | n/a | 'to' : 'data', |
|---|
| 80 | n/a | } |
|---|
| 81 | n/a | |
|---|
| 82 | n/a | def set(self, _object, _attributes={}, **_arguments): |
|---|
| 83 | n/a | """set: Set an object\xd5s data |
|---|
| 84 | n/a | Required argument: the object to change |
|---|
| 85 | n/a | Keyword argument to: the new value |
|---|
| 86 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 87 | n/a | """ |
|---|
| 88 | n/a | _code = 'core' |
|---|
| 89 | n/a | _subcode = 'setd' |
|---|
| 90 | n/a | |
|---|
| 91 | n/a | aetools.keysubst(_arguments, self._argmap_set) |
|---|
| 92 | n/a | _arguments['----'] = _object |
|---|
| 93 | n/a | |
|---|
| 94 | n/a | |
|---|
| 95 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 96 | n/a | _arguments, _attributes) |
|---|
| 97 | n/a | if _arguments.get('errn', 0): |
|---|
| 98 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 99 | n/a | # XXXX Optionally decode result |
|---|
| 100 | n/a | if _arguments.has_key('----'): |
|---|
| 101 | n/a | return _arguments['----'] |
|---|
| 102 | n/a | |
|---|
| 103 | n/a | |
|---|
| 104 | n/a | class application(aetools.ComponentItem): |
|---|
| 105 | n/a | """application - An application program """ |
|---|
| 106 | n/a | want = 'capp' |
|---|
| 107 | n/a | class _Prop_alert_application(aetools.NProperty): |
|---|
| 108 | n/a | """alert application - Most of the alerts will be sent to this application using yet unspecified AE interface. We need a few alert boxes: alert, confirm and notify. Any ideas on how to design this event? mailto:atotic@netscape.com. I\xd5d like to conform to the standard. """ |
|---|
| 109 | n/a | which = 'ALAP' |
|---|
| 110 | n/a | want = 'type' |
|---|
| 111 | n/a | alert_application = _Prop_alert_application() |
|---|
| 112 | n/a | class _Prop_kiosk_mode(aetools.NProperty): |
|---|
| 113 | n/a | """kiosk mode - Kiosk mode leaves very few menus enabled """ |
|---|
| 114 | n/a | which = 'KOSK' |
|---|
| 115 | n/a | want = 'long' |
|---|
| 116 | n/a | kiosk_mode = _Prop_kiosk_mode() |
|---|
| 117 | n/a | # element 'cwin' as ['indx', 'name', 'ID '] |
|---|
| 118 | n/a | |
|---|
| 119 | n/a | class window(aetools.ComponentItem): |
|---|
| 120 | n/a | """window - A Window """ |
|---|
| 121 | n/a | want = 'cwin' |
|---|
| 122 | n/a | class _Prop_URL(aetools.NProperty): |
|---|
| 123 | n/a | """URL - Current URL """ |
|---|
| 124 | n/a | which = 'curl' |
|---|
| 125 | n/a | want = 'TEXT' |
|---|
| 126 | n/a | class _Prop_bounds(aetools.NProperty): |
|---|
| 127 | n/a | """bounds - the boundary rectangle for the window """ |
|---|
| 128 | n/a | which = 'pbnd' |
|---|
| 129 | n/a | want = 'qdrt' |
|---|
| 130 | n/a | class _Prop_busy(aetools.NProperty): |
|---|
| 131 | n/a | """busy - Is window loading something right now. 2, window is busy and will reject load requests. 1, window is busy, but will interrupt outstanding loads """ |
|---|
| 132 | n/a | which = 'busy' |
|---|
| 133 | n/a | want = 'long' |
|---|
| 134 | n/a | class _Prop_closeable(aetools.NProperty): |
|---|
| 135 | n/a | """closeable - Does the window have a close box? """ |
|---|
| 136 | n/a | which = 'hclb' |
|---|
| 137 | n/a | want = 'bool' |
|---|
| 138 | n/a | class _Prop_floating(aetools.NProperty): |
|---|
| 139 | n/a | """floating - Does the window float? """ |
|---|
| 140 | n/a | which = 'isfl' |
|---|
| 141 | n/a | want = 'bool' |
|---|
| 142 | n/a | class _Prop_index(aetools.NProperty): |
|---|
| 143 | n/a | """index - the number of the window """ |
|---|
| 144 | n/a | which = 'pidx' |
|---|
| 145 | n/a | want = 'long' |
|---|
| 146 | n/a | class _Prop_modal(aetools.NProperty): |
|---|
| 147 | n/a | """modal - Is the window modal? """ |
|---|
| 148 | n/a | which = 'pmod' |
|---|
| 149 | n/a | want = 'bool' |
|---|
| 150 | n/a | class _Prop_name(aetools.NProperty): |
|---|
| 151 | n/a | """name - the title of the window """ |
|---|
| 152 | n/a | which = 'pnam' |
|---|
| 153 | n/a | want = 'itxt' |
|---|
| 154 | n/a | class _Prop_position(aetools.NProperty): |
|---|
| 155 | n/a | """position - upper left coordinates of window """ |
|---|
| 156 | n/a | which = 'ppos' |
|---|
| 157 | n/a | want = 'QDpt' |
|---|
| 158 | n/a | class _Prop_resizable(aetools.NProperty): |
|---|
| 159 | n/a | """resizable - Is the window resizable? """ |
|---|
| 160 | n/a | which = 'prsz' |
|---|
| 161 | n/a | want = 'bool' |
|---|
| 162 | n/a | class _Prop_titled(aetools.NProperty): |
|---|
| 163 | n/a | """titled - Does the window have a title bar? """ |
|---|
| 164 | n/a | which = 'ptit' |
|---|
| 165 | n/a | want = 'bool' |
|---|
| 166 | n/a | class _Prop_unique_ID(aetools.NProperty): |
|---|
| 167 | n/a | """unique ID - Window\xd5s unique ID (a bridge between WWW! suite window id\xd5s and standard AE windows) """ |
|---|
| 168 | n/a | which = 'wiid' |
|---|
| 169 | n/a | want = 'long' |
|---|
| 170 | n/a | class _Prop_visible(aetools.NProperty): |
|---|
| 171 | n/a | """visible - is the window visible? """ |
|---|
| 172 | n/a | which = 'pvis' |
|---|
| 173 | n/a | want = 'bool' |
|---|
| 174 | n/a | class _Prop_zoomable(aetools.NProperty): |
|---|
| 175 | n/a | """zoomable - Is the window zoomable? """ |
|---|
| 176 | n/a | which = 'iszm' |
|---|
| 177 | n/a | want = 'bool' |
|---|
| 178 | n/a | class _Prop_zoomed(aetools.NProperty): |
|---|
| 179 | n/a | """zoomed - Is the window zoomed? """ |
|---|
| 180 | n/a | which = 'pzum' |
|---|
| 181 | n/a | want = 'bool' |
|---|
| 182 | n/a | application._superclassnames = [] |
|---|
| 183 | n/a | application._privpropdict = { |
|---|
| 184 | n/a | 'alert_application' : _Prop_alert_application, |
|---|
| 185 | n/a | 'kiosk_mode' : _Prop_kiosk_mode, |
|---|
| 186 | n/a | } |
|---|
| 187 | n/a | application._privelemdict = { |
|---|
| 188 | n/a | 'window' : window, |
|---|
| 189 | n/a | } |
|---|
| 190 | n/a | window._superclassnames = [] |
|---|
| 191 | n/a | window._privpropdict = { |
|---|
| 192 | n/a | 'URL' : _Prop_URL, |
|---|
| 193 | n/a | 'bounds' : _Prop_bounds, |
|---|
| 194 | n/a | 'busy' : _Prop_busy, |
|---|
| 195 | n/a | 'closeable' : _Prop_closeable, |
|---|
| 196 | n/a | 'floating' : _Prop_floating, |
|---|
| 197 | n/a | 'index' : _Prop_index, |
|---|
| 198 | n/a | 'modal' : _Prop_modal, |
|---|
| 199 | n/a | 'name' : _Prop_name, |
|---|
| 200 | n/a | 'position' : _Prop_position, |
|---|
| 201 | n/a | 'resizable' : _Prop_resizable, |
|---|
| 202 | n/a | 'titled' : _Prop_titled, |
|---|
| 203 | n/a | 'unique_ID' : _Prop_unique_ID, |
|---|
| 204 | n/a | 'visible' : _Prop_visible, |
|---|
| 205 | n/a | 'zoomable' : _Prop_zoomable, |
|---|
| 206 | n/a | 'zoomed' : _Prop_zoomed, |
|---|
| 207 | n/a | } |
|---|
| 208 | n/a | window._privelemdict = { |
|---|
| 209 | n/a | } |
|---|
| 210 | n/a | |
|---|
| 211 | n/a | # |
|---|
| 212 | n/a | # Indices of types declared in this module |
|---|
| 213 | n/a | # |
|---|
| 214 | n/a | _classdeclarations = { |
|---|
| 215 | n/a | 'capp' : application, |
|---|
| 216 | n/a | 'cwin' : window, |
|---|
| 217 | n/a | } |
|---|
| 218 | n/a | |
|---|
| 219 | n/a | _propdeclarations = { |
|---|
| 220 | n/a | 'ALAP' : _Prop_alert_application, |
|---|
| 221 | n/a | 'KOSK' : _Prop_kiosk_mode, |
|---|
| 222 | n/a | 'busy' : _Prop_busy, |
|---|
| 223 | n/a | 'curl' : _Prop_URL, |
|---|
| 224 | n/a | 'hclb' : _Prop_closeable, |
|---|
| 225 | n/a | 'isfl' : _Prop_floating, |
|---|
| 226 | n/a | 'iszm' : _Prop_zoomable, |
|---|
| 227 | n/a | 'pbnd' : _Prop_bounds, |
|---|
| 228 | n/a | 'pidx' : _Prop_index, |
|---|
| 229 | n/a | 'pmod' : _Prop_modal, |
|---|
| 230 | n/a | 'pnam' : _Prop_name, |
|---|
| 231 | n/a | 'ppos' : _Prop_position, |
|---|
| 232 | n/a | 'prsz' : _Prop_resizable, |
|---|
| 233 | n/a | 'ptit' : _Prop_titled, |
|---|
| 234 | n/a | 'pvis' : _Prop_visible, |
|---|
| 235 | n/a | 'pzum' : _Prop_zoomed, |
|---|
| 236 | n/a | 'wiid' : _Prop_unique_ID, |
|---|
| 237 | n/a | } |
|---|
| 238 | n/a | |
|---|
| 239 | n/a | _compdeclarations = { |
|---|
| 240 | n/a | } |
|---|
| 241 | n/a | |
|---|
| 242 | n/a | _enumdeclarations = { |
|---|
| 243 | n/a | } |
|---|