{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- An IBusKeymap defines the mapping between keyboard scancodes and
-- keyboard symbols such as numbers, alphabets, and punctuation marks.
-- 
-- Some input methods assume certain keyboard layout
-- (such as Chewing and Wubi requires an US-QWERTY layout),
-- and expect key symbols to be arranged in that order.
-- These input methods should new an IBusKeymap
-- instance and define the keyboard layout.
-- Then 'GI.IBus.Objects.Keymap.keymapLookupKeysym' can
-- convert scancodes back to the key symbols.
-- 
-- see_also: t'GI.IBus.Objects.Component.Component', t'GI.IBus.Objects.EngineDesc.EngineDesc'

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.IBus.Objects.Keymap
    ( 

-- * Exported types
    Keymap(..)                              ,
    IsKeymap                                ,
    toKeymap                                ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [destroy]("GI.IBus.Objects.Object#g:method:destroy"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [lookupKeysym]("GI.IBus.Objects.Keymap#g:method:lookupKeysym"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getData]("GI.GObject.Objects.Object#g:method:getData"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveKeymapMethod                     ,
#endif

-- ** get #method:get#

    keymapGet                               ,


-- ** lookupKeysym #method:lookupKeysym#

#if defined(ENABLE_OVERLOADING)
    KeymapLookupKeysymMethodInfo            ,
#endif
    keymapLookupKeysym                      ,


-- ** new #method:new#

    keymapNew                               ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.IBus.Objects.Object as IBus.Object

-- | Memory-managed wrapper type.
newtype Keymap = Keymap (SP.ManagedPtr Keymap)
    deriving (Keymap -> Keymap -> Bool
(Keymap -> Keymap -> Bool)
-> (Keymap -> Keymap -> Bool) -> Eq Keymap
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Keymap -> Keymap -> Bool
== :: Keymap -> Keymap -> Bool
$c/= :: Keymap -> Keymap -> Bool
/= :: Keymap -> Keymap -> Bool
Eq)

instance SP.ManagedPtrNewtype Keymap where
    toManagedPtr :: Keymap -> ManagedPtr Keymap
toManagedPtr (Keymap ManagedPtr Keymap
p) = ManagedPtr Keymap
p

foreign import ccall "ibus_keymap_get_type"
    c_ibus_keymap_get_type :: IO B.Types.GType

instance B.Types.TypedObject Keymap where
    glibType :: IO GType
glibType = IO GType
c_ibus_keymap_get_type

instance B.Types.GObject Keymap

-- | Type class for types which can be safely cast to `Keymap`, for instance with `toKeymap`.
class (SP.GObject o, O.IsDescendantOf Keymap o) => IsKeymap o
instance (SP.GObject o, O.IsDescendantOf Keymap o) => IsKeymap o

instance O.HasParentTypes Keymap
type instance O.ParentTypes Keymap = '[IBus.Object.Object, GObject.Object.Object]

-- | Cast to `Keymap`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toKeymap :: (MIO.MonadIO m, IsKeymap o) => o -> m Keymap
toKeymap :: forall (m :: * -> *) o. (MonadIO m, IsKeymap o) => o -> m Keymap
toKeymap = IO Keymap -> m Keymap
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Keymap -> m Keymap) -> (o -> IO Keymap) -> o -> m Keymap
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Keymap -> Keymap) -> o -> IO Keymap
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Keymap -> Keymap
Keymap

-- | Convert 'Keymap' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Keymap) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_ibus_keymap_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Keymap -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Keymap
P.Nothing = Ptr GValue -> Ptr Keymap -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Keymap
forall a. Ptr a
FP.nullPtr :: FP.Ptr Keymap)
    gvalueSet_ Ptr GValue
gv (P.Just Keymap
obj) = Keymap -> (Ptr Keymap -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Keymap
obj (Ptr GValue -> Ptr Keymap -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Keymap)
gvalueGet_ Ptr GValue
gv = do
        Ptr Keymap
ptr <- Ptr GValue -> IO (Ptr Keymap)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Keymap)
        if Ptr Keymap
ptr Ptr Keymap -> Ptr Keymap -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Keymap
forall a. Ptr a
FP.nullPtr
        then Keymap -> Maybe Keymap
forall a. a -> Maybe a
P.Just (Keymap -> Maybe Keymap) -> IO Keymap -> IO (Maybe Keymap)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Keymap -> Keymap) -> Ptr Keymap -> IO Keymap
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Keymap -> Keymap
Keymap Ptr Keymap
ptr
        else Maybe Keymap -> IO (Maybe Keymap)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Keymap
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveKeymapMethod (t :: Symbol) (o :: *) :: * where
    ResolveKeymapMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveKeymapMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveKeymapMethod "destroy" o = IBus.Object.ObjectDestroyMethodInfo
    ResolveKeymapMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveKeymapMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveKeymapMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveKeymapMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveKeymapMethod "lookupKeysym" o = KeymapLookupKeysymMethodInfo
    ResolveKeymapMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveKeymapMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveKeymapMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveKeymapMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveKeymapMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveKeymapMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveKeymapMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveKeymapMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveKeymapMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveKeymapMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveKeymapMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveKeymapMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveKeymapMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveKeymapMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveKeymapMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveKeymapMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveKeymapMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveKeymapMethod t Keymap, O.OverloadedMethod info Keymap p) => OL.IsLabel t (Keymap -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveKeymapMethod t Keymap, O.OverloadedMethod info Keymap p, R.HasField t Keymap p) => R.HasField t Keymap p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveKeymapMethod t Keymap, O.OverloadedMethodInfo info Keymap) => OL.IsLabel t (O.MethodProxy info Keymap) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Keymap
type instance O.AttributeList Keymap = KeymapAttributeList
type KeymapAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Keymap = KeymapSignalList
type KeymapSignalList = ('[ '("destroy", IBus.Object.ObjectDestroySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method Keymap::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The keymap file to be loaded, such as 'us', 'jp'."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "IBus" , name = "Keymap" })
-- throws : False
-- Skip return : False

foreign import ccall "ibus_keymap_new" ibus_keymap_new :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr Keymap)

{-# DEPRECATED keymapNew ["This function has been deprecated and should","not be used in newly written code. Please use 'GI.IBus.Objects.Keymap.keymapGet'."] #-}
-- | Get an t'GI.IBus.Objects.Keymap.Keymap' associated with the giving name.
-- 
-- This function loads the keymap file specified in /@name@/
-- in the IBUS_DATA_DIR\/keymaps directory.
keymapNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@name@/: The keymap file to be loaded, such as \'us\', \'jp\'.
    -> m Keymap
    -- ^ __Returns:__ An t'GI.IBus.Objects.Keymap.Keymap' associated with the giving name; or 'P.Nothing' if failed.
keymapNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Keymap
keymapNew Text
name = IO Keymap -> m Keymap
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Keymap -> m Keymap) -> IO Keymap -> m Keymap
forall a b. (a -> b) -> a -> b
$ do
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Keymap
result <- CString -> IO (Ptr Keymap)
ibus_keymap_new CString
name'
    Text -> Ptr Keymap -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keymapNew" Ptr Keymap
result
    Keymap
result' <- ((ManagedPtr Keymap -> Keymap) -> Ptr Keymap -> IO Keymap
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Keymap -> Keymap
Keymap) Ptr Keymap
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Keymap -> IO Keymap
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Keymap
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Keymap::lookup_keysym
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "keymap"
--           , argType =
--               TInterface Name { namespace = "IBus" , name = "Keymap" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "An IBusKeymap." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "keycode"
--           , argType = TBasicType TUInt16
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A scancode to be converted."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "state"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Modifier flags(such as Ctrl, Shift)."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "ibus_keymap_lookup_keysym" ibus_keymap_lookup_keysym :: 
    Ptr Keymap ->                           -- keymap : TInterface (Name {namespace = "IBus", name = "Keymap"})
    Word16 ->                               -- keycode : TBasicType TUInt16
    Word32 ->                               -- state : TBasicType TUInt32
    IO Word32

-- | Converts the scancode to keysym, given the keymap.
keymapLookupKeysym ::
    (B.CallStack.HasCallStack, MonadIO m, IsKeymap a) =>
    a
    -- ^ /@keymap@/: An IBusKeymap.
    -> Word16
    -- ^ /@keycode@/: A scancode to be converted.
    -> Word32
    -- ^ /@state@/: Modifier flags(such as Ctrl, Shift).
    -> m Word32
    -- ^ __Returns:__ Corresponding keysym.
keymapLookupKeysym :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsKeymap a) =>
a -> Word16 -> Word32 -> m Word32
keymapLookupKeysym a
keymap Word16
keycode Word32
state = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Keymap
keymap' <- a -> IO (Ptr Keymap)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
keymap
    Word32
result <- Ptr Keymap -> Word16 -> Word32 -> IO Word32
ibus_keymap_lookup_keysym Ptr Keymap
keymap' Word16
keycode Word32
state
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
keymap
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data KeymapLookupKeysymMethodInfo
instance (signature ~ (Word16 -> Word32 -> m Word32), MonadIO m, IsKeymap a) => O.OverloadedMethod KeymapLookupKeysymMethodInfo a signature where
    overloadedMethod = keymapLookupKeysym

instance O.OverloadedMethodInfo KeymapLookupKeysymMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.IBus.Objects.Keymap.keymapLookupKeysym",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-ibus-1.5.5/docs/GI-IBus-Objects-Keymap.html#v:keymapLookupKeysym"
        })


#endif

-- method Keymap::get
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "The keymap file to be loaded, such as 'us', 'jp'."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "IBus" , name = "Keymap" })
-- throws : False
-- Skip return : False

foreign import ccall "ibus_keymap_get" ibus_keymap_get :: 
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr Keymap)

-- | Get an IBusKeymap associated with the giving name.
-- 
-- This function loads the keymap file specified in /@name@/
-- in the IBUS_DATA_DIR\/keymaps directory.
keymapGet ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    -- ^ /@name@/: The keymap file to be loaded, such as \'us\', \'jp\'.
    -> m Keymap
    -- ^ __Returns:__ An t'GI.IBus.Objects.Keymap.Keymap' associated with the giving name;
    -- or 'P.Nothing' if failed.
keymapGet :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Keymap
keymapGet Text
name = IO Keymap -> m Keymap
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Keymap -> m Keymap) -> IO Keymap -> m Keymap
forall a b. (a -> b) -> a -> b
$ do
    CString
name' <- Text -> IO CString
textToCString Text
name
    Ptr Keymap
result <- CString -> IO (Ptr Keymap)
ibus_keymap_get CString
name'
    Text -> Ptr Keymap -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"keymapGet" Ptr Keymap
result
    Keymap
result' <- ((ManagedPtr Keymap -> Keymap) -> Ptr Keymap -> IO Keymap
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Keymap -> Keymap
Keymap) Ptr Keymap
result
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
    Keymap -> IO Keymap
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Keymap
result'

#if defined(ENABLE_OVERLOADING)
#endif