fb:porticula NoPaste
GuiPtrTools.bi
Uploader: | OneCypher |
Datum/Zeit: | 13.10.2009 11:05:35 |
Hinweis: Dieser Quelltext ist Bestandteil des Projekts GuiPtr, zu dem es auf FreeBASIC-Portal.de eine Projektseite gibt.
#define Use(G) scope: var This = G :Dim Tmp1 as GuiObjectControl ptr = cast(any ptr, This): Dim Tmp2 as GuiObject ptr = Tmp1->GuiObjectPtr: dim Me as GuiObject ptr = Tmp2
#define EndUse end scope
function Event(MyObject as any ptr) as Events ptr
Dim GCO as GuiObjectControl ptr = MyObject
Dim GO as GuiObject ptr = GCO->GuiObjectPTR
return GO->PublicEvents
end function
function Signal(MyObject as any ptr) as Signals ptr
Dim GCO as GuiObjectControl ptr = MyObject
Dim GO as GuiObject ptr = GCO->GuiObjectPTR
return GO->Signal
end function
function RC overload (GO as GuiObject ptr) as uinteger
dim TmpRC as uinteger
if GO->ThreadID <> 0 then
'Mutexlock GO->ThreadMutex
TMPRC = GO->ReturnValue
'Mutexunlock GO->ThreadMutex
return TMPRC
else
return GO->DoEvents
end if
end function
function RC overload(MyObject as any ptr) as uinteger
'If MyObject = 0 then MyObject = GuiPtrTools.RootObject->MyObject
Dim GCO as GuiObjectControl ptr = MyObject
Dim GO as GuiObject ptr = GCO->GuiObjectPTR
dim TmpRC as uinteger
if GO->ThreadID <> 0 then
'Mutexlock GO->ThreadMutex
TMPRC = GO->ReturnValue
'Mutexunlock GO->ThreadMutex
return TMPRC
else
return GO->DoEvents
end if
end function