fzeet 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -149,6 +149,74 @@ module Fzeet
149
149
  :Lo64, :ulong_long
150
150
  end
151
151
 
152
+ class VARIANT < FFI::Union
153
+ include AnonymousSupport
154
+
155
+ layout \
156
+ :_, Class.new(FFI::Struct) {
157
+ layout \
158
+ :vt, :ushort,
159
+ :wReserved1, :ushort,
160
+ :wReserved2, :ushort,
161
+ :wReserved3, :ushort,
162
+ :_, Class.new(FFI::Union) {
163
+ layout \
164
+ :llVal, :long_long,
165
+ :lVal, :long,
166
+ :bVal, :uchar,
167
+ :iVal, :short,
168
+ :fltVal, :float,
169
+ :dblVal, :double,
170
+ :boolVal, :short,
171
+ :bool, :short,
172
+ :scode, :long,
173
+ :cyVal, :ulong_long,
174
+ :date, :double,
175
+ :bstrVal, :pointer,
176
+ :punkVal, :pointer,
177
+ :pdispVal, :pointer,
178
+ :parray, :pointer,
179
+ :pbVal, :pointer,
180
+ :piVal, :pointer,
181
+ :plVal, :pointer,
182
+ :pllVal, :pointer,
183
+ :pfltVal, :pointer,
184
+ :pdblVal, :pointer,
185
+ :pboolVal, :pointer,
186
+ :pbool, :pointer,
187
+ :pscode, :pointer,
188
+ :pcyVal, :pointer,
189
+ :pdate, :pointer,
190
+ :pbstrVal, :pointer,
191
+ :ppunkVal, :pointer,
192
+ :ppdispVal, :pointer,
193
+ :pparrayv, :pointer,
194
+ :pvarVal, :pointer,
195
+ :byref, :pointer,
196
+ :cVal, :char,
197
+ :uiVal, :ushort,
198
+ :ulVal, :ulong,
199
+ :ullVal, :ulong_long,
200
+ :intVal, :int,
201
+ :uintVal, :uint,
202
+ :pdecVal, :pointer,
203
+ :pcVal, :pointer,
204
+ :puiVal, :pointer,
205
+ :pulVal, :pointer,
206
+ :pullVal, :pointer,
207
+ :pintVal, :pointer,
208
+ :puintVal, :pointer,
209
+ :BRECORD, Class.new(FFI::Struct) {
210
+ layout \
211
+ :pvRecord, :pointer,
212
+ :pRecInfo, :pointer
213
+ }
214
+ }
215
+ },
216
+
217
+ :decVal, DECIMAL
218
+ end
219
+
152
220
  class PROPVARIANT < FFI::Union
153
221
  include AnonymousSupport
154
222
 
@@ -283,6 +351,22 @@ module Fzeet
283
351
 
284
352
  attach_function :PropVariantClear, [:pointer], :long
285
353
 
354
+ class SAFEARRAYBOUND < FFI::Struct
355
+ layout \
356
+ :cElements, :ulong,
357
+ :lLbound, :long
358
+ end
359
+
360
+ class SAFEARRAY < FFI::Struct
361
+ layout \
362
+ :cDims, :ushort,
363
+ :fFeatures, :ushort,
364
+ :cbElements, :ulong,
365
+ :cLocks, :ulong,
366
+ :pvData, :pointer,
367
+ :rgsabound, [SAFEARRAYBOUND, 1]
368
+ end
369
+
286
370
  ffi_lib 'oleaut32'
287
371
  ffi_convention :stdcall
288
372
 
@@ -290,6 +374,11 @@ module Fzeet
290
374
  attach_function :SysFreeString, [:pointer], :void
291
375
  attach_function :SysStringLen, [:pointer], :uint
292
376
 
377
+ attach_function :SafeArrayCreateVector, [:ushort, :long, :uint], :pointer
378
+ attach_function :SafeArrayDestroy, [:pointer], :long
379
+ attach_function :SafeArrayAccessData, [:pointer, :pointer], :long
380
+ attach_function :SafeArrayUnaccessData, [:pointer], :long
381
+
293
382
  OLEIVERB_PRIMARY = 0
294
383
  OLEIVERB_SHOW = -1
295
384
  OLEIVERB_OPEN = -2
@@ -45,6 +45,22 @@ module Fzeet
45
45
 
46
46
  WebBrowserEvents = COM::Callback[DWebBrowserEvents]
47
47
 
48
+ class WebBrowserEvents
49
+ def Invoke(dispid, *rest)
50
+ method = (self.class::VTBL.members - IDispatch::VTBL.members).find { |name|
51
+ dispidName = "DISPID_#{name.upcase}"
52
+
53
+ Windows.const_defined?(dispidName) && Windows.const_get(dispidName) == dispid
54
+ }
55
+
56
+ return E_NOTIMPL unless method
57
+
58
+ send(method, DISPPARAMS.new(rest[3]))
59
+
60
+ S_OK
61
+ end
62
+ end
63
+
48
64
  NavOpenInNewWindow = 0x0001
49
65
  NavNoHistory = 0x0002
50
66
  NavNoReadFromCache = 0x0004
@@ -0,0 +1,61 @@
1
+ require_relative 'common'
2
+
3
+ module Fzeet
4
+ module Windows
5
+ ffi_lib 'urlmon'
6
+ ffi_convention :stdcall
7
+
8
+ FEATURE_OBJECT_CACHING = 0
9
+ FEATURE_ZONE_ELEVATION = FEATURE_OBJECT_CACHING + 1
10
+ FEATURE_MIME_HANDLING = FEATURE_ZONE_ELEVATION + 1
11
+ FEATURE_MIME_SNIFFING = FEATURE_MIME_HANDLING + 1
12
+ FEATURE_WINDOW_RESTRICTIONS = FEATURE_MIME_SNIFFING + 1
13
+ FEATURE_WEBOC_POPUPMANAGEMENT = FEATURE_WINDOW_RESTRICTIONS + 1
14
+ FEATURE_BEHAVIORS = FEATURE_WEBOC_POPUPMANAGEMENT + 1
15
+ FEATURE_DISABLE_MK_PROTOCOL = FEATURE_BEHAVIORS + 1
16
+ FEATURE_LOCALMACHINE_LOCKDOWN = FEATURE_DISABLE_MK_PROTOCOL + 1
17
+ FEATURE_SECURITYBAND = FEATURE_LOCALMACHINE_LOCKDOWN + 1
18
+ FEATURE_RESTRICT_ACTIVEXINSTALL = FEATURE_SECURITYBAND + 1
19
+ FEATURE_VALIDATE_NAVIGATE_URL = FEATURE_RESTRICT_ACTIVEXINSTALL + 1
20
+ FEATURE_RESTRICT_FILEDOWNLOAD = FEATURE_VALIDATE_NAVIGATE_URL + 1
21
+ FEATURE_ADDON_MANAGEMENT = FEATURE_RESTRICT_FILEDOWNLOAD + 1
22
+ FEATURE_PROTOCOL_LOCKDOWN = FEATURE_ADDON_MANAGEMENT + 1
23
+ FEATURE_HTTP_USERNAME_PASSWORD_DISABLE = FEATURE_PROTOCOL_LOCKDOWN + 1
24
+ FEATURE_SAFE_BINDTOOBJECT = FEATURE_HTTP_USERNAME_PASSWORD_DISABLE + 1
25
+ FEATURE_UNC_SAVEDFILECHECK = FEATURE_SAFE_BINDTOOBJECT + 1
26
+ FEATURE_GET_URL_DOM_FILEPATH_UNENCODED = FEATURE_UNC_SAVEDFILECHECK + 1
27
+ FEATURE_TABBED_BROWSING = FEATURE_GET_URL_DOM_FILEPATH_UNENCODED + 1
28
+ FEATURE_SSLUX = FEATURE_TABBED_BROWSING + 1
29
+ FEATURE_DISABLE_NAVIGATION_SOUNDS = FEATURE_SSLUX + 1
30
+ FEATURE_DISABLE_LEGACY_COMPRESSION = FEATURE_DISABLE_NAVIGATION_SOUNDS + 1
31
+ FEATURE_FORCE_ADDR_AND_STATUS = FEATURE_DISABLE_LEGACY_COMPRESSION + 1
32
+ FEATURE_XMLHTTP = FEATURE_FORCE_ADDR_AND_STATUS + 1
33
+ FEATURE_DISABLE_TELNET_PROTOCOL = FEATURE_XMLHTTP + 1
34
+ FEATURE_FEEDS = FEATURE_DISABLE_TELNET_PROTOCOL + 1
35
+ FEATURE_BLOCK_INPUT_PROMPTS = FEATURE_FEEDS + 1
36
+ FEATURE_ENTRY_COUNT = FEATURE_BLOCK_INPUT_PROMPTS + 1
37
+
38
+ SET_FEATURE_ON_THREAD = 0x00000001
39
+ SET_FEATURE_ON_PROCESS = 0x00000002
40
+ SET_FEATURE_IN_REGISTRY = 0x00000004
41
+ SET_FEATURE_ON_THREAD_LOCALMACHINE = 0x00000008
42
+ SET_FEATURE_ON_THREAD_INTRANET = 0x00000010
43
+ SET_FEATURE_ON_THREAD_TRUSTED = 0x00000020
44
+ SET_FEATURE_ON_THREAD_INTERNET = 0x00000040
45
+ SET_FEATURE_ON_THREAD_RESTRICTED = 0x00000080
46
+
47
+ GET_FEATURE_FROM_THREAD = 0x00000001
48
+ GET_FEATURE_FROM_PROCESS = 0x00000002
49
+ GET_FEATURE_FROM_REGISTRY = 0x00000004
50
+ GET_FEATURE_FROM_THREAD_LOCALMACHINE = 0x00000008
51
+ GET_FEATURE_FROM_THREAD_INTRANET = 0x00000010
52
+ GET_FEATURE_FROM_THREAD_TRUSTED = 0x00000020
53
+ GET_FEATURE_FROM_THREAD_INTERNET = 0x00000040
54
+ GET_FEATURE_FROM_THREAD_RESTRICTED = 0x00000080
55
+
56
+ if WINVER.AtLeastWindowsXP?
57
+ attach_function :CoInternetSetFeatureEnabled, [:int, :ulong, :int], :long
58
+ attach_function :CoInternetIsFeatureEnabled, [:int, :ulong], :long
59
+ end
60
+ end
61
+ end
data/lib/fzeet/windows.rb CHANGED
@@ -14,6 +14,8 @@ require_relative 'windows/ole'
14
14
  require_relative 'windows/shell'
15
15
  require_relative 'windows/shlwapi'
16
16
  require_relative 'windows/shdocvw'
17
+ require_relative 'windows/mshtml'
18
+ require_relative 'windows/urlmon'
17
19
 
18
20
  require_relative 'windows/propsys' if Fzeet::Windows::WINVER.AtLeastWindowsVista?
19
21
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fzeet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 4
10
- version: 0.6.4
9
+ - 5
10
+ version: 0.6.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Radoslav Peev
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-01 00:00:00 +03:00
18
+ date: 2010-10-08 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -50,15 +50,15 @@ files:
50
50
  - lib/fzeet/windows/gdi.rb
51
51
  - lib/fzeet/windows/kernel.rb
52
52
  - lib/fzeet/windows/libc.rb
53
- - lib/fzeet/windows/ole - Copy.rb
53
+ - lib/fzeet/windows/mshtml.rb
54
54
  - lib/fzeet/windows/ole.rb
55
55
  - lib/fzeet/windows/propsys.rb
56
56
  - lib/fzeet/windows/scintilla.rb
57
- - lib/fzeet/windows/shdocvw - Copy.rb
58
57
  - lib/fzeet/windows/shdocvw.rb
59
58
  - lib/fzeet/windows/shell.rb
60
59
  - lib/fzeet/windows/shlwapi.rb
61
60
  - lib/fzeet/windows/uiribbon.rb
61
+ - lib/fzeet/windows/urlmon.rb
62
62
  - lib/fzeet/windows/user.rb
63
63
  - lib/fzeet/windows/SciLexer.dll
64
64
  - lib/fzeet/windows/user/Accelerator.rb
@@ -234,6 +234,12 @@ files:
234
234
  - examples/Control/TreeView.rbw
235
235
  - examples/Control/UpDown.rbw
236
236
  - examples/Control/WebBrowser.rbw
237
+ - examples/Control/WebBrowser1.rbw
238
+ - examples/Control/WebBrowser2.rbw
239
+ - examples/Control/WebBrowser3.rbw
240
+ - examples/Control/WebBrowser4.rbw
241
+ - examples/Control/WebBrowser5.rbw
242
+ - examples/Control/WebBrowser4Sinatra.rb
237
243
  - examples/Dialog/ColorDialog.rbw
238
244
  - examples/Dialog/Dialog.rbw
239
245
  - examples/Dialog/DialogApplication.rbw
@@ -1,446 +0,0 @@
1
- require_relative 'com'
2
-
3
- module Fzeet
4
- module Windows
5
- ffi_lib 'ole32'
6
- ffi_convention :stdcall
7
-
8
- attach_function :OleInitialize, [:pointer], :long
9
- attach_function :OleUninitialize, [], :void
10
-
11
- def InitializeOle
12
- DetonateHresult(:OleInitialize, nil)
13
-
14
- at_exit { OleUninitialize() }
15
- end
16
-
17
- module_function :InitializeOle
18
-
19
- attach_function :CoTaskMemAlloc, [:ulong], :pointer
20
- attach_function :CoTaskMemFree, [:pointer], :void
21
-
22
- VT_EMPTY = 0
23
- VT_NULL = 1
24
- VT_I2 = 2
25
- VT_I4 = 3
26
- VT_R4 = 4
27
- VT_R8 = 5
28
- VT_CY = 6
29
- VT_DATE = 7
30
- VT_BSTR = 8
31
- VT_DISPATCH = 9
32
- VT_ERROR = 10
33
- VT_BOOL = 11
34
- VT_VARIANT = 12
35
- VT_UNKNOWN = 13
36
- VT_DECIMAL = 14
37
- VT_I1 = 16
38
- VT_UI1 = 17
39
- VT_UI2 = 18
40
- VT_UI4 = 19
41
- VT_I8 = 20
42
- VT_UI8 = 21
43
- VT_INT = 22
44
- VT_UINT = 23
45
- VT_VOID = 24
46
- VT_HRESULT = 25
47
- VT_PTR = 26
48
- VT_SAFEARRAY = 27
49
- VT_CARRAY = 28
50
- VT_USERDEFINED = 29
51
- VT_LPSTR = 30
52
- VT_LPWSTR = 31
53
- VT_FILETIME = 64
54
- VT_BLOB = 65
55
- VT_STREAM = 66
56
- VT_STORAGE = 67
57
- VT_STREAMED_OBJECT = 68
58
- VT_STORED_OBJECT = 69
59
- VT_BLOB_OBJECT = 70
60
- VT_CF = 71
61
- VT_CLSID = 72
62
- VT_VECTOR = 0x1000
63
- VT_ARRAY = 0x2000
64
- VT_BYREF = 0x4000
65
- VT_RESERVED = 0x8000
66
- VT_ILLEGAL = 0xffff
67
- VT_ILLEGALMASKED = 0xfff
68
- VT_TYPEMASK = 0xff
69
-
70
- class PROPERTYKEY < FFI::Struct
71
- layout \
72
- :fmtid, GUID,
73
- :pid, :ulong
74
-
75
- def self.[](type, index)
76
- new.tap { |key|
77
- key[:fmtid].tap { |guid|
78
- guid[:Data1] = 0x00000000 + index
79
- guid[:Data2] = 0x7363
80
- guid[:Data3] = 0x696e
81
- [0x84, 0x41, 0x79, 0x8a, 0xcf, 0x5a, 0xeb, 0xb7].each_with_index { |part, i|
82
- guid[:Data4][i] = part
83
- }
84
- }
85
-
86
- key[:pid] = type
87
- }
88
- end
89
-
90
- def ==(other) Windows.memcmp(other, self, size) == 0 end
91
- end
92
-
93
- class LARGE_INTEGER < FFI::Union
94
- include AnonymousSupport
95
-
96
- layout \
97
- :_, Class.new(FFI::Struct) {
98
- layout \
99
- :LowPart, :ulong,
100
- :HighPart, :long
101
- },
102
-
103
- :QuadPart, :long_long
104
- end
105
-
106
- class ULARGE_INTEGER < FFI::Union
107
- include AnonymousSupport
108
-
109
- layout \
110
- :_, Class.new(FFI::Struct) {
111
- layout \
112
- :LowPart, :ulong,
113
- :HighPart, :ulong
114
- },
115
-
116
- :QuadPart, :ulong_long
117
- end
118
-
119
- class FILETIME < FFI::Struct
120
- layout \
121
- :dwLowDateTime, :ulong,
122
- :dwHighDateTime, :ulong
123
- end
124
-
125
- class BSTRBLOB < FFI::Struct
126
- layout \
127
- :cbSize, :ulong,
128
- :pData, :pointer
129
- end
130
-
131
- class BLOB < FFI::Struct
132
- layout \
133
- :cbSize, :ulong,
134
- :pBlobData, :pointer
135
- end
136
-
137
- class CA < FFI::Struct
138
- layout \
139
- :cElems, :ulong,
140
- :pElems, :pointer
141
- end
142
-
143
- class DECIMAL < FFI::Struct
144
- layout \
145
- :wReserved, :ushort,
146
- :scale, :uchar,
147
- :sign, :uchar,
148
- :Hi32, :ulong,
149
- :Lo64, :ulong_long
150
- end
151
-
152
- class PROPVARIANT < FFI::Union
153
- include AnonymousSupport
154
-
155
- layout \
156
- :_, Class.new(FFI::Struct) {
157
- layout \
158
- :vt, :ushort,
159
- :wReserved1, :ushort,
160
- :wReserved2, :ushort,
161
- :wReserved3, :ushort,
162
- :_, Class.new(FFI::Union) {
163
- layout \
164
- :cVal, :char,
165
- :bVal, :uchar,
166
- :iVal, :short,
167
- :uiVal, :ushort,
168
- :lVal, :long,
169
- :ulVal, :ulong,
170
- :intVal, :int,
171
- :uintVal, :uint,
172
- :hVal, LARGE_INTEGER,
173
- :uhVal, ULARGE_INTEGER,
174
- :fltVal, :float,
175
- :dblVal, :double,
176
- :boolVal, :short,
177
- :bool, :short,
178
- :scode, :long,
179
- :cyVal, :long_long,
180
- :date, :double,
181
- :filetime, FILETIME,
182
- :puuid, :pointer,
183
- :pclipdata, :pointer,
184
- :bstrVal, :pointer,
185
- :bstrblobVal, BSTRBLOB,
186
- :blob, BLOB,
187
- :pszVal, :pointer,
188
- :pwszVal, :pointer,
189
- :punkVal, :pointer,
190
- :pdispVal, :pointer,
191
- :pStream, :pointer,
192
- :pStorage, :pointer,
193
- :pVersionedStream, :pointer,
194
- :parray, :pointer,
195
- :cac, CA,
196
- :caub, CA,
197
- :cai, CA,
198
- :caui, CA,
199
- :cal, CA,
200
- :caul, CA,
201
- :cah, CA,
202
- :cauh, CA,
203
- :caflt, CA,
204
- :cadbl, CA,
205
- :cabool, CA,
206
- :cascode, CA,
207
- :cacy, CA,
208
- :cadate, CA,
209
- :cafiletime, CA,
210
- :cauuid, CA,
211
- :caclipdata, CA,
212
- :cabstr, CA,
213
- :cabstrblob, CA,
214
- :calpstr, CA,
215
- :calpwstr, CA,
216
- :capropvar, CA,
217
- :pcVal, :pointer,
218
- :pbVal, :pointer,
219
- :piVal, :pointer,
220
- :puiVal, :pointer,
221
- :plVal, :pointer,
222
- :pulVal, :pointer,
223
- :pintVal, :pointer,
224
- :puintVal, :pointer,
225
- :pfltVal, :pointer,
226
- :pdblVal, :pointer,
227
- :pboolVal, :pointer,
228
- :pdecVal, :pointer,
229
- :pscode, :pointer,
230
- :pcyVal, :pointer,
231
- :pdate, :pointer,
232
- :pbstrVal, :pointer,
233
- :ppunkVal, :pointer,
234
- :ppdispVal, :pointer,
235
- :pparray, :pointer,
236
- :pvarVal, :pointer
237
- }
238
- },
239
-
240
- :decVal, DECIMAL
241
-
242
- def self.[](t, *v) new.tap { |var| var.send("#{t}=", *v) } end
243
-
244
- def bool; raise 'Wrong type tag.' unless self[:vt] == VT_BOOL; self[:boolVal] != 0 end
245
- def bool=(bool) self[:vt] = VT_BOOL; self[:boolVal] = (bool) ? -1 : 0 end
246
-
247
- def int; raise 'Wrong type tag.' unless self[:vt] == VT_I4; self[:intVal] end
248
- def int=(int) self[:vt] = VT_I4; self[:intVal] = int end
249
-
250
- def uint; raise 'Wrong type tag.' unless self[:vt] == VT_UI4; self[:uintVal] end
251
- def uint=(uint) self[:vt] = VT_UI4; self[:uintVal] = uint end
252
-
253
- def unknown
254
- raise 'Wrong type tag.' unless self[:vt] == VT_UNKNOWN
255
-
256
- yield Unknown.new(self[:punkVal])
257
- ensure
258
- Windows.PropVariantClear(self)
259
- end
260
-
261
- def unknown=(unknown) self[:vt] = VT_UNKNOWN; self[:punkVal] = unknown.pointer; unknown.AddRef end
262
-
263
- def wstring; raise 'Wrong type tag.' unless self[:vt] == VT_LPWSTR; Windows.WCSTOMBS(self[:pwszVal]) end
264
-
265
- def wstring=(string)
266
- self[:vt] = VT_LPWSTR
267
-
268
- FFI::MemoryPointer.new(:pointer) { |p|
269
- Windows.DetonateHresult(:SHStrDup, string, p)
270
-
271
- self[:pwszVal] = p.read_pointer
272
- }
273
- end
274
-
275
- def decimal
276
- raise 'Wrong type tag.' unless self[:vt] == VT_DECIMAL
277
-
278
- Rational(self[:decVal][:Lo64], 10 ** self[:decVal][:scale]) + self[:decVal][:Hi32]
279
- end
280
-
281
- def decimal=(decimal) self[:vt] = VT_DECIMAL; self[:decVal][:Lo64] = decimal end
282
- end
283
-
284
- attach_function :PropVariantClear, [:pointer], :long
285
-
286
- ffi_lib 'oleaut32'
287
- ffi_convention :stdcall
288
-
289
- attach_function :SysAllocString, [:buffer_in], :pointer
290
- attach_function :SysFreeString, [:pointer], :void
291
- attach_function :SysStringLen, [:pointer], :uint
292
-
293
- OLEIVERB_PRIMARY = 0
294
- OLEIVERB_SHOW = -1
295
- OLEIVERB_OPEN = -2
296
- OLEIVERB_HIDE = -3
297
- OLEIVERB_UIACTIVATE = -4
298
- OLEIVERB_INPLACEACTIVATE = -5
299
- OLEIVERB_DISCARDUNDOSTATE = -6
300
-
301
- IOleWindow = COM::Interface[IUnknown,
302
- GUID['00000114-0000-0000-C000-000000000046'],
303
-
304
- GetWindow: [[:pointer], :long],
305
- ContextSensitiveHelp: [[:int], :long]
306
- ]
307
-
308
- OleWindow = COM::Instance[IOleWindow]
309
-
310
- IOleInPlaceSite = COM::Interface[IOleWindow,
311
- GUID['00000119-0000-0000-C000-000000000046'],
312
-
313
- CanInPlaceActivate: [[], :long],
314
- OnInPlaceActivate: [[], :long],
315
- OnUIActivate: [[], :long],
316
- GetWindowContext: [[:pointer, :pointer, :pointer, :pointer, :pointer], :long],
317
- Scroll: [[:long_long], :long],
318
- OnUIDeactivate: [[:int], :long],
319
- OnInPlaceDeactivate: [[], :long],
320
- DiscardUndoState: [[], :long],
321
- DeactivateAndUndo: [[], :long],
322
- OnPosRectChange: [[:pointer], :long]
323
- ]
324
-
325
- OleInPlaceSite = COM::Callback[IOleInPlaceSite]
326
-
327
- IOleInPlaceUIWindow = COM::Interface[IOleWindow,
328
- GUID['00000115-0000-0000-C000-000000000046'],
329
-
330
- GetBorder: [[:pointer], :long],
331
- RequestBorderSpace: [[:pointer], :long],
332
- SetBorderSpace: [[:pointer], :long],
333
- SetActiveObject: [[:pointer], :long]
334
- ]
335
-
336
- OleInPlaceUIWindow = COM::Callback[IOleInPlaceUIWindow]
337
-
338
- class OLEINPLACEFRAMEINFO < FFI::Struct
339
- layout \
340
- :cb, :uint,
341
- :fMDIApp, :int,
342
- :hwndFrame, :pointer,
343
- :haccel, :pointer,
344
- :cAccelEntries, :uint
345
- end
346
-
347
- class OLEMENUGROUPWIDTHS < FFI::Struct
348
- layout \
349
- :width, [:long, 6]
350
- end
351
-
352
- IOleInPlaceFrame = COM::Interface[IOleInPlaceUIWindow,
353
- GUID['00000116-0000-0000-C000-000000000046'],
354
-
355
- InsertMenus: [[:pointer, :pointer], :long],
356
- SetMenu: [[:pointer, :pointer, :pointer], :long],
357
- RemoveMenus: [[:pointer], :long],
358
- SetStatusText: [[:pointer], :long],
359
- EnableModeless: [[:int], :long],
360
- TranslateAccelerator: [[:pointer, :ushort], :long]
361
- ]
362
-
363
- OleInPlaceFrame = COM::Callback[IOleInPlaceFrame]
364
-
365
- IOleClientSite = COM::Interface[IUnknown,
366
- GUID['00000118-0000-0000-C000-000000000046'],
367
-
368
- SaveObject: [[], :long],
369
- GetMoniker: [[:ulong, :ulong, :pointer], :long],
370
- GetContainer: [[:pointer], :long],
371
- ShowObject: [[], :long],
372
- OnShowWindow: [[:int], :long],
373
- RequestNewObjectLayout: [[], :long]
374
- ]
375
-
376
- OleClientSite = COM::Callback[IOleClientSite]
377
-
378
- OLEGETMONIKER_ONLYIFTHERE = 1
379
- OLEGETMONIKER_FORCEASSIGN = 2
380
- OLEGETMONIKER_UNASSIGN = 3
381
- OLEGETMONIKER_TEMPFORUSER = 4
382
-
383
- OLEWHICHMK_CONTAINER = 1
384
- OLEWHICHMK_OBJREL = 2
385
- OLEWHICHMK_OBJFULL = 3
386
-
387
- USERCLASSTYPE_FULL = 1
388
- USERCLASSTYPE_SHORT = 2
389
- USERCLASSTYPE_APPNAME = 3
390
-
391
- OLEMISC_RECOMPOSEONRESIZE = 0x00000001
392
- OLEMISC_ONLYICONIC = 0x00000002
393
- OLEMISC_INSERTNOTREPLACE = 0x00000004
394
- OLEMISC_STATIC = 0x00000008
395
- OLEMISC_CANTLINKINSIDE = 0x00000010
396
- OLEMISC_CANLINKBYOLE1 = 0x00000020
397
- OLEMISC_ISLINKOBJECT = 0x00000040
398
- OLEMISC_INSIDEOUT = 0x00000080
399
- OLEMISC_ACTIVATEWHENVISIBLE = 0x00000100
400
- OLEMISC_RENDERINGISDEVICEINDEPENDENT = 0x00000200
401
- OLEMISC_INVISIBLEATRUNTIME = 0x00000400
402
- OLEMISC_ALWAYSRUN = 0x00000800
403
- OLEMISC_ACTSLIKEBUTTON = 0x00001000
404
- OLEMISC_ACTSLIKELABEL = 0x00002000
405
- OLEMISC_NOUIACTIVATE = 0x00004000
406
- OLEMISC_ALIGNABLE = 0x00008000
407
- OLEMISC_SIMPLEFRAME = 0x00010000
408
- OLEMISC_SETCLIENTSITEFIRST = 0x00020000
409
- OLEMISC_IMEMODE = 0x00040000
410
- OLEMISC_IGNOREACTIVATEWHENVISIBLE = 0x00080000
411
- OLEMISC_WANTSTOMENUMERGE = 0x00100000
412
- OLEMISC_SUPPORTSMULTILEVELUNDO = 0x00200000
413
-
414
- OLECLOSE_SAVEIFDIRTY = 0
415
- OLECLOSE_NOSAVE = 1
416
- OLECLOSE_PROMPTSAVE = 2
417
-
418
- IOleObject = COM::Interface[IUnknown,
419
- GUID['00000112-0000-0000-C000-000000000046'],
420
-
421
- SetClientSite: [[:pointer], :long],
422
- GetClientSite: [[:pointer], :long],
423
- SetHostNames: [[:pointer, :pointer], :long],
424
- Close: [[:ulong], :long],
425
- SetMoniker: [[:ulong, :pointer], :long],
426
- GetMoniker: [[:ulong, :ulong, :pointer], :long],
427
- InitFromData: [[:pointer, :int, :ulong], :long],
428
- GetClipboardData: [[:ulong, :pointer], :long],
429
- DoVerb: [[:long, :pointer, :pointer, :long, :pointer, :pointer], :long],
430
- EnumVerbs: [[:pointer], :long],
431
- Update: [[], :long],
432
- IsUpToDate: [[], :long],
433
- GetUserClassID: [[:pointer], :long],
434
- GetUserType: [[:ulong, :pointer], :long],
435
- SetExtent: [[:ulong, :pointer], :long],
436
- GetExtent: [[:ulong, :pointer], :long],
437
- Advise: [[:pointer, :pointer], :long],
438
- Unadvise: [[:ulong], :long],
439
- EnumAdvise: [[:pointer], :long],
440
- GetMiscStatus: [[:ulong, :pointer], :long],
441
- SetColorScheme: [[:pointer], :long]
442
- ]
443
-
444
- OleObject = COM::Instance[IOleObject]
445
- end
446
- end