Module: VRDdeServer

Includes:
DDElParam, VRDdeConversation, VRMessageHandler
Included in:
VRDdeExecuteServer, VRDdePokeServer, VRDdeRequestServer
Defined in:
lib/vr/vrdde.rb

Constant Summary

Constants included from DDElParam

DDElParam::FreeDDElParam, DDElParam::PackDDElParam, DDElParam::ReuseDDElParam, DDElParam::UnpackDDElParam

Constants included from VRDdeConversation

VRDdeConversation::WM_DDE_ACK, VRDdeConversation::WM_DDE_ADVISE, VRDdeConversation::WM_DDE_DATA, VRDdeConversation::WM_DDE_EXECUTE, VRDdeConversation::WM_DDE_INITIATE, VRDdeConversation::WM_DDE_POKE, VRDdeConversation::WM_DDE_REQUEST, VRDdeConversation::WM_DDE_TERMINATE, VRDdeConversation::WM_DDE_UNADVISE

Constants included from VRMessageHandler

VRMessageHandler::PREHANDLERSTR

Instance Method Summary collapse

Methods included from DDElParam

#freeDDElParam, #packDDElParam, #reuseDDElParam, #unpackDDElParam

Methods included from VRDdeConversation

#sendDDEAck

Methods included from VRMessageHandler

#acceptEvents, #addHandler, #addNoRelayMessages, #controlmsg_dispatching, #deleteHandler, #msghandlerinit, #selfmsg_dispatching

Instance Method Details

#addDDEAppTopic(appname, topic) ⇒ Object



152
153
154
# File 'lib/vr/vrdde.rb', line 152

def addDDEAppTopic(appname,topic)
  @_vr_ddeacceptable.push([appname,topic])
end

#ddeserverinitObject



124
125
126
127
128
129
130
# File 'lib/vr/vrdde.rb', line 124

def ddeserverinit
  acceptEvents([WM_DDE_INITIATE,WM_DDE_TERMINATE])
  addHandler WM_DDE_INITIATE,"_ddeInitiate",MSGTYPE::ARGINTINTINT,nil
  addHandler WM_DDE_TERMINATE,"_ddeTerminate",MSGTYPE::ARGWINT,nil
  @_vr_clients={} #{client's hwnd=>[client's hwnd,appname,topic]
  @_vr_ddeacceptable=[] # [appname,topic]
end

#delDDEAppTopic(appname, topic) ⇒ Object



155
156
157
# File 'lib/vr/vrdde.rb', line 155

def delDDEAppTopic(appname,topic)
  @_vr_ddeacceptable.delete([appname,topic])
end

#self__ddeInitiate(shwnd, aApp, aTopic) ⇒ Object



136
137
138
139
140
141
142
143
144
# File 'lib/vr/vrdde.rb', line 136

def self__ddeInitiate(shwnd,aApp,aTopic)
  p=[GAtom::GetName(aApp),GAtom::GetName(aTopic)]
  return unless @_vr_ddeacceptable.index(p)

  @_vr_clients[shwnd] = [shwnd] + p
  r=nil
  r=selfmsg_dispatching("ddeinitiate",shwnd,p[0],p[1])
  SMSG::SendMessage.call shwnd,WM_DDE_ACK,self.hWnd,MAKELPARAM(aApp,aTopic)
end

#self__ddeTerminate(shwnd) ⇒ Object



146
147
148
149
150
# File 'lib/vr/vrdde.rb', line 146

def self__ddeTerminate(shwnd)
  selfmsg_dispatching("ddeterminate",shwnd)
  SMSG::PostMessage.call shwnd,WM_DDE_TERMINATE,self.hWnd,0
  @_vr_clients.delete(shwnd)
end

#self_ddeinitiate(*args) ⇒ Object



159
# File 'lib/vr/vrdde.rb', line 159

def self_ddeinitiate(*args) end

#self_ddeterminate(*arg) ⇒ Object



160
# File 'lib/vr/vrdde.rb', line 160

def self_ddeterminate(*arg) end

#vrinitObject



131
132
133
134
# File 'lib/vr/vrdde.rb', line 131

def vrinit
  super
  ddeserverinit
end