Class: WIN32OLE_EVENT
- Inherits:
-
Object
- Object
- WIN32OLE_EVENT
- Defined in:
- win32ole.c,
win32ole.c
Overview
WIN32OLE_EVENT
objects controls OLE event.
Class Method Summary collapse
-
.message_loop ⇒ Object
Translates and dispatches Windows message.
Instance Method Summary collapse
-
#new(ole, event) ⇒ Object
constructor
Returns OLE event object.
-
#on_event([event]) { ... } ⇒ Object
Defines the callback event.
-
#on_event_with_outargs([event]) { ... } ⇒ Object
Defines the callback of event.
Constructor Details
#new(ole, event) ⇒ Object
Returns OLE event object. The first argument specifies WIN32OLE object. The second argument specifies OLE event name.
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
5984 5985 5986 |
# File 'win32ole.c', line 5984 static VALUE fev_initialize(argc, argv, self) int argc; |
Class Method Details
.message_loop ⇒ Object
Translates and dispatches Windows message.
6073 6074 6075 |
# File 'win32ole.c', line 6073 static VALUE fev_s_msg_loop(klass) VALUE klass; |
Instance Method Details
#on_event([event]) { ... } ⇒ Object
Defines the callback event. If argument is omitted, this method defines the callback of all events.
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
ev.on_event("NavigateComplete") {|url| puts url}
6128 6129 6130 |
# File 'win32ole.c', line 6128 static VALUE fev_on_event(argc, argv, self) int argc; |
#on_event_with_outargs([event]) { ... } ⇒ Object
Defines the callback of event. If you want modify argument in callback, you should use this method instead of WIN32OLE_EVENT#on_event.
6145 6146 6147 |
# File 'win32ole.c', line 6145 static VALUE fev_on_event_with_outargs(argc, argv, self) int argc; |