|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- module CMouseHoleEnumVariables
- use CVoidEventHandlerCollection
- implicit none
- integer :: MouseHole = 0
- integer :: MouseHole_S = 0
-
- public
-
- type(VoidEventHandlerCollection) :: OnMouseHoleChange
-
- enum, bind(c)
- enumerator MOUSE_HOLE_NEUTRAL
- enumerator MOUSE_HOLE_FILL
- enumerator MOUSE_HOLE_EMPTY
- end enum
-
- private :: MouseHole
-
- contains
-
- subroutine Set_MouseHole(v)
- implicit none
- integer , intent(in) :: v
- #ifdef ExcludeExtraChanges
- if(MouseHole == v) return
- #endif
- !call sleep(2)
- MouseHole = v
- #ifdef deb
- print*, 'MouseHole=', MouseHole
- #endif
- call OnMouseHoleChange%RunAll()
- end subroutine
-
- integer function Get_MouseHole()
- implicit none
- Get_MouseHole = MouseHole
- end function
-
-
- subroutine Update_MouseHole_From_Snapshot()
- implicit none
- call Set_MouseHole(MouseHole_S)
- end subroutine
-
- subroutine Set_MouseHole_WN(v)
- !DEC$ ATTRIBUTES DLLEXPORT :: Set_MouseHole_WN
- !DEC$ ATTRIBUTES ALIAS: 'Set_MouseHole_WN' :: Set_MouseHole_WN
- implicit none
- integer , intent(in) :: v
- !call Set_MouseHole(v)
- MouseHole_S = v
- end subroutine
-
- integer function Get_MouseHole_WN()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_MouseHole_WN
- !DEC$ ATTRIBUTES ALIAS: 'Get_MouseHole_WN' :: Get_MouseHole_WN
- implicit none
- Get_MouseHole_WN = MouseHole
- end function
-
-
-
-
-
-
-
-
- logical function Get_EmptyMouseHole()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_EmptyMouseHole
- !DEC$ ATTRIBUTES ALIAS: 'Get_EmptyMouseHole' :: Get_EmptyMouseHole
- implicit none
- Get_EmptyMouseHole = .false. ! MouseHole == EMPTY_MOUSE_HOLE
- end function
-
- logical function Get_FillMouseHole()
- !DEC$ ATTRIBUTES DLLEXPORT :: Get_FillMouseHole
- !DEC$ ATTRIBUTES ALIAS: 'Get_FillMouseHole' :: Get_FillMouseHole
- implicit none
- Get_FillMouseHole = .false. ! MouseHole == FILL_MOUSE_HOLE
- end function
-
- end module CMouseHoleEnumVariables
|