/* ----------------------------------------------------------------------------- This source file is part of OpenSpace3D For the latest info, see http://www.openspace3d.com Copyright (c) 2012 I-maginer This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt ----------------------------------------------------------------------------- */ /* plugins callbacks */ /** cbPlugView3dUnClick [V3Dview I I I] I * callback on mouse un click * * private * * return 0 **/ fun cbPlugView3dUnClick(viewstr, x, y, btn)= let lInstCbUnClick -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbUnClick [inst viewstr x y btn]; set l = tl l; ); 0;; /** cbPlugView3dDbClick [V3Dview I I I] I * callback on mouse double click * * private * * return 0 **/ fun cbPlugView3dDbClick(viewstr, x, y, btn)= let lInstCbDbClick -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbDbClick [inst viewstr x y btn]; set l = tl l; ); 0;; /** cbPlugView3dClick [V3Dview I I I] I * callback on mouse click * * private * * return 0 **/ fun cbPlugView3dClick(viewstr, x, y, btn)= let lInstCbClick -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbClick [inst viewstr x y btn]; set l = tl l; ); 0;; /** cbPlugView3dWheel [V3Dview I I I I] I * callback on mouse wheel * * private * * return 0 **/ fun cbPlugView3dWheel(viewstr, x, y, delta, btn)= let lInstCbWheel -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbWheel [inst viewstr x y delta btn]; set l = tl l; ); 0;; /** cbPlugView3dCursorMove [V3Dview I I I] I * callback on mouse cursor move * * private * * return 0 **/ fun cbPlugView3dCursorMove(viewstr, x, y, btn)= let lInstCbCursorMove -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbCursorMove [inst viewstr x y btn]; set l = tl l; ); 0;; /** cbPlugView3dInputClick [V3Dview I I I I [SO3_OBJECT SO3_MATERIAL I [F F F] [F F] F]] I * callback on input click * * private * * return 0 **/ fun cbPlugView3dInputClick(viewstr, id, x, y, btn, pdata)= let lInstCbInputClick -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbInputClick [inst viewstr id x y btn pdata]; set l = tl l; ); 0;; /** cbPlugView3dInputUnClick [V3Dview I I I I [SO3_OBJECT SO3_MATERIAL I [F F F] [F F] F]] I * callback on input unclick * * private * * return 0 **/ fun cbPlugView3dInputUnClick(viewstr, id, x, y, btn, pdata)= let lInstCbInputUnClick -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbInputUnClick [inst viewstr id x y btn pdata]; set l = tl l; ); 0;; /** cbPlugView3dInputUpdate [V3Dview I I I I [SO3_OBJECT SO3_MATERIAL I [F F F] [F F] F]] I * callback on input click * * private * * return 0 **/ fun cbPlugView3dInputUpdate(viewstr, id, x, y, btn, pdata)= let lInstCbInputUpdate -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbInputUpdate [inst viewstr id x y btn pdata]; set l = tl l; ); 0;; /** cbPlugView3dKeyDown [V3Dview I I] I * callback on key down * * private * * return 0 **/ fun cbPlugView3dKeyDown(viewstr, key, ascode)= let lInstCbKeyDown -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbKeyDown [inst viewstr key ascode]; set l = tl l; ); 0;; /** cbPlugView3dKeyUp [V3Dview I] I * callback on key up * * private * * return 0 **/ fun cbPlugView3dKeyUp(viewstr, key)= let lInstCbKeyUp -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbKeyUp [inst viewstr key]; set l = tl l; ); 0;; /** cbPlugView3dTouchPointAdd [V3Dview I I I] I * callback on touch point add * * private * * return 0 **/ fun cbPlugView3dTouchPointAdd(viewstr, id, x, y)= let lInstCbTouchPointAdd -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbTouchPointAdd [inst viewstr id x y]; set l = tl l; ); 0;; /** cbPlugView3dTouchPointRemove [V3Dview I] I * callback on touch point removed * * private * * return 0 **/ fun cbPlugView3dTouchPointRemove(viewstr, id)= let lInstCbTouchPointRemove -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbTouchPointRemove [inst viewstr id]; set l = tl l; ); 0;; /** cbPlugView3dTouchPointUpdate [V3Dview I I I I I] I * callback on touch point update * * private * * return 0 **/ fun cbPlugView3dTouchPointUpdate(viewstr, id, x, y, vx, vy)= let lInstCbTouchPointUpdate -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbTouchPointUpdate [inst viewstr id x y vx vy]; set l = tl l; ); 0;; /** cbPlugNavigateControlState [V3Dsession I] I * callback on navigation control enable * * private * * return 0 **/ fun cbPlugNavigateControlState(sessionstr, state)= let lInstCbNavigateControlState -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNavigateControlState [inst sessionstr state]; set l = tl l; ); 0;; /** cbPlugScenePreRender [V3Dsession I] I * callback on scene pre render * * private * * return 0 **/ fun cbPlugScenePreRender(sessionstr, etime)= let lInstCbScenePreRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbScenePreRender [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugScenePreRender2 [V3Dsession I] I * callback on scene pre render * * private * * return 0 **/ fun cbPlugScenePreRender2(sessionstr, etime)= let lInstCbScenePreRender2 -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbScenePreRender2 [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugScenePreRenderPhysic [V3Dsession I] I * callback on scene pre render physic * * private * * return 0 **/ fun cbPlugScenePreRenderPhysic(sessionstr, etime)= let lInstCbScenePreRenderPhysic -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbScenePreRenderPhysic [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugScenePostRender [V3Dsession I] I * callback on scene post render * * private * * return 0 **/ fun cbPlugScenePostRender(sessionstr, etime)= let lInstCbScenePostRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbScenePostRender [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugView3dPreRender [V3Dview] I * callback on pre render * * private * * return 0 **/ fun cbPlugView3dPreRender(viewstr)= let lInstCbPreRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbPreRender [inst viewstr]; set l = tl l; ); 0;; /** cbPlugView3dPreRender2 [V3Dview] I * callback on pre render2 * * private * * return 0 **/ fun cbPlugView3dPreRender2(viewstr)= let lInstCbPreRender2 -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbPreRender2 [inst viewstr]; set l = tl l; ); 0;; /** cbPlugView3dPostRender [V3Dview] I * callback on post render * * private * * return 0 **/ fun cbPlugView3dPostRender(viewstr)= let lInstCbPostRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbPostRender [inst viewstr]; set l = tl l; ); 0;; /** cbPlugView3dEditorPreRender [V3Dsession I] I * callback on pre render * * private * * return 0 **/ fun cbPlugView3dEditorPreRender(sessionstr, etime)= let lInstCbEditorPreRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbEditorPreRender [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugView3dEditorPostRender [V3Dsession I] I * callback on post render * * private * * return 0 **/ fun cbPlugView3dEditorPostRender(sessionstr, etime)= let lInstCbEditorPostRender -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbEditorPostRender [inst sessionstr etime]; set l = tl l; ); 0;; /** cbPlugView3dCameraChange [V3Dview V3Dsession SO3Object] I * callback on current viewport camera change * * private * * return 0 **/ fun cbPlugView3dCameraChange(viewstr, sessiontstr, camera)= let lInstCbCameraChange -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbCameraChange [inst viewstr sessiontstr camera]; set l = tl l; ); 0;; /** cbPlugView3dResize [V3Dview I I] I * callback on view resize * * private * * return 0 **/ fun cbPlugView3dResize(viewstr, w, h)= let lInstCbResizeView -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbResizeView [inst viewstr w h]; set l = tl l; ); 0;; /** cbPlugView3dFocus [V3Dview] I * callback on get focus * * private * * return 0 **/ fun cbPlugView3dFocus(viewstr)= let lInstCbFocusView -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbFocusView [inst viewstr]; set l = tl l; ); 0;; /** cbPlugView3dKillFocus [V3Dview] I * callback on lost focus * * private * * return 0 **/ fun cbPlugView3dKillFocus(viewstr)= let lInstCbKillFocusView -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbKillFocusView [inst viewstr]; set l = tl l; ); 0;; /** cbPlugView3dDropFile [V3Dview I I [P r1]] I * callback on drop files * * private * * return 0 **/ fun cbPlugView3dDropFile(viewstr, x, y, lp)= let lInstCbDropFileView -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbDropFileView [inst viewstr x y lp]; set l = tl l; ); 0;; /** cbPlugViewVrMode [V3Dview I] I * callback on VR mode changed * * private * * return 0 **/ fun cbPlugViewVrMode(viewstr, state)= let lInstCbVrModeView -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbVrModeView [inst viewstr state]; set l = tl l; ); 0;; /** cbPlugNetConnected [NetComm] I * callback on network connection * * private * * return 0 **/ fun cbPlugNetConnected(netstr)= let lInstCbNetConnected -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetConnected [inst netstr]; set l = tl l; ); 0;; /** cbPlugNetSConnected [NetComm] I * callback on network secure connection etablished * * private * * return 0 **/ fun cbPlugNetSConnected(netstr)= let lInstCbNetSConnected -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetSConnected [inst netstr]; set l = tl l; ); 0;; /** cbPlugNetClosed [NetComm] I * callback on network connection closed * * private * * return 0 **/ fun cbPlugNetClosed(netstr)= let lInstCbNetClosed -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetClosed [inst netstr]; set l = tl l; ); 0;; /** cbPlugNetSrvMessage [NetComm S S S] I * callback on incoming server message * * private * * return 0 **/ fun cbPlugNetSrvMessage(netstr, cmd, message, arg)= let lInstCbNetSrvMessage -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetSrvMessage [inst netstr cmd message arg]; set l = tl l; ); 0;; /** cbPlugNetUserMessage [NetComm NetUser S S S] I * callback on incoming user message * * private * * return 0 **/ fun cbPlugNetUserMessage(netstr, userstr, cmd, message, arg)= let lInstCbNetUserMessage -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetUserMessage [inst netstr userstr cmd message arg]; set l = tl l; ); 0;; /** cbPlugNetUserPrivateMessage [NetComm NetUser S S S] I * callback on incoming user message * * private * * return 0 **/ fun cbPlugNetUserPrivateMessage(netstr, userstr, cmd, message, arg)= let lInstCbNetUserPrivateMessage -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetUserPrivateMessage [inst netstr userstr cmd message arg]; set l = tl l; ); 0;; /** cbPlugUserChangeLogin [NetComm NetUser S] I * callback on user change login * * private * * return 0 **/ fun cbPlugUserChangeLogin(netstr, userstr, newlogin)= let lInstCbNetUserChangeLogin -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetUserChangeLogin [inst netstr userstr newlogin]; set l = tl l; ); 0;; /** cbPlugNewUser [NetComm NetUser] I * callback on new user * * private * * return 0 **/ fun cbPlugNewUser(netstr, userstr)= let lInstCbNetNewUser -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetNewUser [inst netstr userstr]; set l = tl l; ); 0;; /** cbPlugDelUser [NetComm NetUser] I * callback on delete user * * private * * return 0 **/ fun cbPlugDelUser(netstr, userstr)= let lInstCbNetDelUser -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetDelUser [inst netstr userstr]; set l = tl l; ); 0;; /** cbPlugGetFile [NetComm NetUser S S S] I * callback on file reception * * private * * return 0 **/ fun cbPlugGetFile(netstr, userstr, cmd, data, filename)= let lInstCbNetGetFile -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetGetFile [inst netstr userstr cmd data filename]; set l = tl l; ); 0;; /** cbPlugUserGetItem [NetComm NetUser S S] I * callback on user item change * * private * * return 0 **/ fun cbPlugUserGetItem(netstr, userstr, item, val)= let lInstCbNetUserGetItem -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetUserGetItem [inst netstr userstr item val]; set l = tl l; ); 0;; /** cbPlugRoomGetItem [NetComm S S] I * callback on room item change * * private * * return 0 **/ fun cbPlugRoomGetItem(netstr, item, val)= let lInstCbNetRoomGetItem -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetRoomGetItem [inst netstr item val]; set l = tl l; ); 0;; /** cbPlugNbUsers [NetComm I] I * callback on nb users change * * private * * return 0 **/ fun cbPlugNbUsers(netstr, val)= let lInstCbNetNbUsers -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetNbUsers [inst netstr val]; set l = tl l; ); 0;; /** cbPlugRoomChanged [NetComm S] I * callback on room changed * * private * * return 0 **/ fun cbPlugRoomChanged(netstr, val)= let lInstCbNetRoomChanged -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbNetRoomChanged [inst netstr val]; set l = tl l; ); 0;; /** cbPlugGeneric [I S S] I * generic callback * * private * * return 0 **/ fun cbPlugGeneric(type, val, param)= let lInstCbGeneric -> l in while (l != nil) do ( let hd l -> inst in execch inst.INST_plugin.PLUG_channel inst.INST_cbGeneric [inst type val param]; set l = tl l; ); 0;;