Module: VRUserMessageUseable
Defined Under Namespace
Modules: ReservedMsg
Constant Summary
VRMessageHandler::PREHANDLERSTR
Instance Method Summary
collapse
#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching
Instance Method Details
#registerUserMessage(messageid, eventname, offset = 0x100) ⇒ Object
852
853
854
855
856
857
|
# File 'lib/vr/vruby.rb', line 852
def registerUserMessage(messageid,eventname,offset=0x100)
msg = WMsg::WM_APP+messageid+offset
addEvent msg
addHandler(msg, eventname,MSGTYPE::ARGINTINT,nil)
@_vr_usermessages[eventname]=msg
end
|
#userMessage(eventname, wparam = 0, lparam = 0) ⇒ Object
859
860
861
862
863
|
# File 'lib/vr/vruby.rb', line 859
def userMessage(eventname,wparam=0,lparam=0)
msg = @_vr_usermessages[eventname]
raise "No such an usermessage (#{eventname}" unless msg
postMessage msg,wparam.to_i,lparam.to_i
end
|
#usermessageuseableinit ⇒ Object
844
845
846
|
# File 'lib/vr/vruby.rb', line 844
def usermessageuseableinit
@_vr_usermessages={}
end
|
847
848
849
850
|
# File 'lib/vr/vruby.rb', line 847
def vrinit
super
usermessageuseableinit
end
|