Module: VRUserMessageUseable

Includes:
VRMessageHandler
Included in:
VROleDragSourceLow, VROleDropTarget, VRTrayiconFeasible
Defined in:
lib/vr/vruby.rb

Defined Under Namespace

Modules: ReservedMsg

Constant Summary

Constants included from VRMessageHandler

VRMessageHandler::PREHANDLERSTR

Instance Method Summary collapse

Methods included from VRMessageHandler

#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

#usermessageuseableinitObject



844
845
846
# File 'lib/vr/vruby.rb', line 844

def usermessageuseableinit
  @_vr_usermessages={}
end

#vrinitObject



847
848
849
850
# File 'lib/vr/vruby.rb', line 847

def vrinit
  super
  usermessageuseableinit
end