module CSlipsEnumVariables
    ! use CVoidEventHandlerCollection
    implicit none
    integer :: Slips = 0
    integer :: Slips_S = 0
    
    public
    
    ! type(VoidEventHandlerCollection) :: OnSlipsChange
    
    enum, bind(c)
        enumerator SLIPS_NEUTRAL
        enumerator SLIPS_SET_BEGIN
        enumerator SLIPS_SET_END
        enumerator SLIPS_UNSET_BEGIN
        enumerator SLIPS_UNSET_END
    end enum
    
    private :: Slips
    
    contains
    
    subroutine Set_Slips(v)
        implicit none
        integer , intent(in) :: v
#ifdef ExcludeExtraChanges
        if(Slips == v) return
#endif
        Slips = v
#ifdef deb
        print*, 'Slips=', Slips
#endif
        call OnSlipsChange%RunAll()
    end subroutine
    
    integer function Get_Slips()
        implicit none
        Get_Slips = Slips
    end function
end module CSlipsEnumVariables