Debian Codegraph @

cpython27/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py

raw symbols SCIP
1 """Suite Web Browser Suite: Class of events supported by Web Browser applications
2 Level 1, version 1
3
4 Generated from /Applications/Internet Explorer.app
5 AETE/AEUT resource version 1/0, language 0, script 0
6 """
7
8 import aetools
9 import MacOS
10
11 _code = 'WWW!'
12
13 class Web_Browser_Suite_Events:
14
15 def Activate(self, _object=None, _attributes={}, **_arguments):
16 """Activate: Activate Internet Explorer and optionally select window designated by Window Identifier.
17 Required argument: Window Identifier
18 Keyword argument _attributes: AppleEvent attribute dictionary
19 Returns: Window Identifier of window to activate
20 """
21 _code = 'WWW!'
22 _subcode = 'ACTV'
23
24 if _arguments: raise TypeError, 'No optional args expected'
25 _arguments['----'] = _object
26
27
28 _reply, _arguments, _attributes = self.send(_code, _subcode,
29 _arguments, _attributes)
30 if _arguments.get('errn', 0):
31 raise aetools.Error, aetools.decodeerror(_arguments)
32 # XXXX Optionally decode result
33 if _arguments.has_key('----'):
34 return _arguments['----']
35
36 def CloseAllWindows(self, _no_object=None, _attributes={}, **_arguments):
37 """CloseAllWindows: Closes all windows
38 Keyword argument _attributes: AppleEvent attribute dictionary
39 Returns: Success
40 """
41 _code = 'WWW!'
42 _subcode = 'CLSA'
43
44 if _arguments: raise TypeError, 'No optional args expected'
45 if _no_object is not None: raise TypeError, 'No direct arg expected'
46
47
48 _reply, _arguments, _attributes = self.send(_code, _subcode,
49 _arguments, _attributes)
50 if _arguments.get('errn', 0):
51 raise aetools.Error, aetools.decodeerror(_arguments)
52 # XXXX Optionally decode result
53 if _arguments.has_key('----'):
54 return _arguments['----']
55
56 _argmap_CloseWindow = {
57 'ID' : 'WIND',
58 'Title' : 'TITL',
59 }
60
61 def CloseWindow(self, _no_object=None, _attributes={}, **_arguments):
62 """CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window.
63 Keyword argument ID: ID of the window to close. (Can use -1 for top window)
64 Keyword argument Title: Title of the window to close
65 Keyword argument _attributes: AppleEvent attribute dictionary
66 Returns: Success
67 """
68 _code = 'WWW!'
69 _subcode = 'CLOS'
70
71 aetools.keysubst(_arguments, self._argmap_CloseWindow)
72 if _no_object is not None: raise TypeError, 'No direct arg expected'
73
74
75 _reply, _arguments, _attributes = self.send(_code, _subcode,
76 _arguments, _attributes)
77 if _arguments.get('errn', 0):
78 raise aetools.Error, aetools.decodeerror(_arguments)
79 # XXXX Optionally decode result
80 if _arguments.has_key('----'):
81 return _arguments['----']
82
83 def GetWindowInfo(self, _object, _attributes={}, **_arguments):
84 """GetWindowInfo: Returns a window info record (URL/Title) for the specified window.
85 Required argument: Window Identifier of the window
86 Keyword argument _attributes: AppleEvent attribute dictionary
87 Returns:
88 """
89 _code = 'WWW!'
90 _subcode = 'WNFO'
91
92 if _arguments: raise TypeError, 'No optional args expected'
93 _arguments['----'] = _object
94
95
96 _reply, _arguments, _attributes = self.send(_code, _subcode,
97 _arguments, _attributes)
98 if _arguments.get('errn', 0):
99 raise aetools.Error, aetools.decodeerror(_arguments)
100 # XXXX Optionally decode result
101 if _arguments.has_key('----'):
102 return _arguments['----']
103
104 def ListWindows(self, _no_object=None, _attributes={}, **_arguments):
105 """ListWindows: Returns list of Window Identifiers for all open windows.
106 Keyword argument _attributes: AppleEvent attribute dictionary
107 Returns: undocumented, typecode 'list'
108 """
109 _code = 'WWW!'
110 _subcode = 'LSTW'
111
112 if _arguments: raise TypeError, 'No optional args expected'
113 if _no_object is not None: raise TypeError, 'No direct arg expected'
114
115
116 _reply, _arguments, _attributes = self.send(_code, _subcode,
117 _arguments, _attributes)
118 if _arguments.get('errn', 0):
119 raise aetools.Error, aetools.decodeerror(_arguments)
120 # XXXX Optionally decode result
121 if _arguments.has_key('----'):
122 return _arguments['----']
123
124 _argmap_OpenURL = {
125 'to' : 'INTO',
126 'toWindow' : 'WIND',
127 'Flags' : 'FLGS',
128 'FormData' : 'POST',
129 'MIME_Type' : 'MIME',
130 }
131
132 def OpenURL(self, _object, _attributes={}, **_arguments):
133 """OpenURL: Retrieves URL off the Web.
134 Required argument: Fully-qualified URL
135 Keyword argument to: Target file for saving downloaded data
136 Keyword argument toWindow: Target window for resource at URL (-1 for top window, 0 for new window)
137 Keyword argument Flags: Valid Flags settings are: 1-Ignore the document cache; 2-Ignore the image cache; 4-Operate in background mode.
138 Keyword argument FormData: data to post
139 Keyword argument MIME_Type: MIME type of data being posted
140 Keyword argument _attributes: AppleEvent attribute dictionary
141 """
142 _code = 'WWW!'
143 _subcode = 'OURL'
144
145 aetools.keysubst(_arguments, self._argmap_OpenURL)
146 _arguments['----'] = _object
147
148
149 _reply, _arguments, _attributes = self.send(_code, _subcode,
150 _arguments, _attributes)
151 if _arguments.get('errn', 0):
152 raise aetools.Error, aetools.decodeerror(_arguments)
153 # XXXX Optionally decode result
154 if _arguments.has_key('----'):
155 return _arguments['----']
156
157 _argmap_ParseAnchor = {
158 'withURL' : 'RELA',
159 }
160
161 def ParseAnchor(self, _object, _attributes={}, **_arguments):
162 """ParseAnchor: Combines a base URL and a relative URL to produce a fully-qualified URL
163 Required argument: Base URL
164 Keyword argument withURL: Relative URL that is combined with the Base URL (in the direct object) to produce a fully-qualified URL.
165 Keyword argument _attributes: AppleEvent attribute dictionary
166 Returns: Fully-qualified URL
167 """
168 _code = 'WWW!'
169 _subcode = 'PRSA'
170
171 aetools.keysubst(_arguments, self._argmap_ParseAnchor)
172 _arguments['----'] = _object
173
174
175 _reply, _arguments, _attributes = self.send(_code, _subcode,
176 _arguments, _attributes)
177 if _arguments.get('errn', 0):
178 raise aetools.Error, aetools.decodeerror(_arguments)
179 # XXXX Optionally decode result
180 if _arguments.has_key('----'):
181 return _arguments['----']
182
183 _argmap_ShowFile = {
184 'MIME_Type' : 'MIME',
185 'Window_Identifier' : 'WIND',
186 'URL' : 'URL ',
187 }
188
189 def ShowFile(self, _object, _attributes={}, **_arguments):
190 """ShowFile: FileSpec containing data of specified MIME type to be rendered in window specified by Window Identifier.
191 Required argument: The file
192 Keyword argument MIME_Type: MIME type
193 Keyword argument Window_Identifier: Identifier of the target window for the URL. (Can use -1 for top window)
194 Keyword argument URL: URL that allows this document to be reloaded.
195 Keyword argument _attributes: AppleEvent attribute dictionary
196 """
197 _code = 'WWW!'
198 _subcode = 'SHWF'
199
200 aetools.keysubst(_arguments, self._argmap_ShowFile)
201 _arguments['----'] = _object
202
203
204 _reply, _arguments, _attributes = self.send(_code, _subcode,
205 _arguments, _attributes)
206 if _arguments.get('errn', 0):
207 raise aetools.Error, aetools.decodeerror(_arguments)
208 # XXXX Optionally decode result
209 if _arguments.has_key('----'):
210 return _arguments['----']
211
212
213 #
214 # Indices of types declared in this module
215 #
216 _classdeclarations = {
217 }
218
219 _propdeclarations = {
220 }
221
222 _compdeclarations = {
223 }
224
225 _enumdeclarations = {
226 }