{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Clutter.Objects.FixedLayout
(
FixedLayout(..) ,
IsFixedLayout ,
toFixedLayout ,
#if defined(ENABLE_OVERLOADING)
ResolveFixedLayoutMethod ,
#endif
fixedLayoutNew ,
) 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 {-# SOURCE #-} qualified GI.Clutter.Objects.LayoutManager as Clutter.LayoutManager
import qualified GI.GObject.Objects.Object as GObject.Object
newtype FixedLayout = FixedLayout (SP.ManagedPtr FixedLayout)
deriving (FixedLayout -> FixedLayout -> Bool
(FixedLayout -> FixedLayout -> Bool)
-> (FixedLayout -> FixedLayout -> Bool) -> Eq FixedLayout
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FixedLayout -> FixedLayout -> Bool
== :: FixedLayout -> FixedLayout -> Bool
$c/= :: FixedLayout -> FixedLayout -> Bool
/= :: FixedLayout -> FixedLayout -> Bool
Eq)
instance SP.ManagedPtrNewtype FixedLayout where
toManagedPtr :: FixedLayout -> ManagedPtr FixedLayout
toManagedPtr (FixedLayout ManagedPtr FixedLayout
p) = ManagedPtr FixedLayout
p
foreign import ccall "clutter_fixed_layout_get_type"
c_clutter_fixed_layout_get_type :: IO B.Types.GType
instance B.Types.TypedObject FixedLayout where
glibType :: IO GType
glibType = IO GType
c_clutter_fixed_layout_get_type
instance B.Types.GObject FixedLayout
class (SP.GObject o, O.IsDescendantOf FixedLayout o) => IsFixedLayout o
instance (SP.GObject o, O.IsDescendantOf FixedLayout o) => IsFixedLayout o
instance O.HasParentTypes FixedLayout
type instance O.ParentTypes FixedLayout = '[Clutter.LayoutManager.LayoutManager, GObject.Object.Object]
toFixedLayout :: (MIO.MonadIO m, IsFixedLayout o) => o -> m FixedLayout
toFixedLayout :: forall (m :: * -> *) o.
(MonadIO m, IsFixedLayout o) =>
o -> m FixedLayout
toFixedLayout = IO FixedLayout -> m FixedLayout
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO FixedLayout -> m FixedLayout)
-> (o -> IO FixedLayout) -> o -> m FixedLayout
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FixedLayout -> FixedLayout) -> o -> IO FixedLayout
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr FixedLayout -> FixedLayout
FixedLayout
instance B.GValue.IsGValue (Maybe FixedLayout) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_clutter_fixed_layout_get_type
gvalueSet_ :: Ptr GValue -> Maybe FixedLayout -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FixedLayout
P.Nothing = Ptr GValue -> Ptr FixedLayout -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr FixedLayout
forall a. Ptr a
FP.nullPtr :: FP.Ptr FixedLayout)
gvalueSet_ Ptr GValue
gv (P.Just FixedLayout
obj) = FixedLayout -> (Ptr FixedLayout -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FixedLayout
obj (Ptr GValue -> Ptr FixedLayout -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FixedLayout)
gvalueGet_ Ptr GValue
gv = do
Ptr FixedLayout
ptr <- Ptr GValue -> IO (Ptr FixedLayout)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr FixedLayout)
if Ptr FixedLayout
ptr Ptr FixedLayout -> Ptr FixedLayout -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr FixedLayout
forall a. Ptr a
FP.nullPtr
then FixedLayout -> Maybe FixedLayout
forall a. a -> Maybe a
P.Just (FixedLayout -> Maybe FixedLayout)
-> IO FixedLayout -> IO (Maybe FixedLayout)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr FixedLayout -> FixedLayout)
-> Ptr FixedLayout -> IO FixedLayout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FixedLayout -> FixedLayout
FixedLayout Ptr FixedLayout
ptr
else Maybe FixedLayout -> IO (Maybe FixedLayout)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FixedLayout
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveFixedLayoutMethod (t :: Symbol) (o :: *) :: * where
ResolveFixedLayoutMethod "allocate" o = Clutter.LayoutManager.LayoutManagerAllocateMethodInfo
ResolveFixedLayoutMethod "beginAnimation" o = Clutter.LayoutManager.LayoutManagerBeginAnimationMethodInfo
ResolveFixedLayoutMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFixedLayoutMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFixedLayoutMethod "childGetProperty" o = Clutter.LayoutManager.LayoutManagerChildGetPropertyMethodInfo
ResolveFixedLayoutMethod "childSetProperty" o = Clutter.LayoutManager.LayoutManagerChildSetPropertyMethodInfo
ResolveFixedLayoutMethod "endAnimation" o = Clutter.LayoutManager.LayoutManagerEndAnimationMethodInfo
ResolveFixedLayoutMethod "findChildProperty" o = Clutter.LayoutManager.LayoutManagerFindChildPropertyMethodInfo
ResolveFixedLayoutMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFixedLayoutMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFixedLayoutMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFixedLayoutMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFixedLayoutMethod "layoutChanged" o = Clutter.LayoutManager.LayoutManagerLayoutChangedMethodInfo
ResolveFixedLayoutMethod "listChildProperties" o = Clutter.LayoutManager.LayoutManagerListChildPropertiesMethodInfo
ResolveFixedLayoutMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFixedLayoutMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFixedLayoutMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFixedLayoutMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFixedLayoutMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFixedLayoutMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFixedLayoutMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFixedLayoutMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFixedLayoutMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFixedLayoutMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFixedLayoutMethod "getAnimationProgress" o = Clutter.LayoutManager.LayoutManagerGetAnimationProgressMethodInfo
ResolveFixedLayoutMethod "getChildMeta" o = Clutter.LayoutManager.LayoutManagerGetChildMetaMethodInfo
ResolveFixedLayoutMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFixedLayoutMethod "getPreferredHeight" o = Clutter.LayoutManager.LayoutManagerGetPreferredHeightMethodInfo
ResolveFixedLayoutMethod "getPreferredWidth" o = Clutter.LayoutManager.LayoutManagerGetPreferredWidthMethodInfo
ResolveFixedLayoutMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFixedLayoutMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFixedLayoutMethod "setContainer" o = Clutter.LayoutManager.LayoutManagerSetContainerMethodInfo
ResolveFixedLayoutMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFixedLayoutMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFixedLayoutMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFixedLayoutMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFixedLayoutMethod t FixedLayout, O.OverloadedMethod info FixedLayout p) => OL.IsLabel t (FixedLayout -> 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 ~ ResolveFixedLayoutMethod t FixedLayout, O.OverloadedMethod info FixedLayout p, R.HasField t FixedLayout p) => R.HasField t FixedLayout p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFixedLayoutMethod t FixedLayout, O.OverloadedMethodInfo info FixedLayout) => OL.IsLabel t (O.MethodProxy info FixedLayout) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FixedLayout
type instance O.AttributeList FixedLayout = FixedLayoutAttributeList
type FixedLayoutAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FixedLayout = FixedLayoutSignalList
type FixedLayoutSignalList = ('[ '("layoutChanged", Clutter.LayoutManager.LayoutManagerLayoutChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "clutter_fixed_layout_new" clutter_fixed_layout_new ::
IO (Ptr FixedLayout)
fixedLayoutNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FixedLayout
fixedLayoutNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m FixedLayout
fixedLayoutNew = IO FixedLayout -> m FixedLayout
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FixedLayout -> m FixedLayout)
-> IO FixedLayout -> m FixedLayout
forall a b. (a -> b) -> a -> b
$ do
Ptr FixedLayout
result <- IO (Ptr FixedLayout)
clutter_fixed_layout_new
Text -> Ptr FixedLayout -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fixedLayoutNew" Ptr FixedLayout
result
FixedLayout
result' <- ((ManagedPtr FixedLayout -> FixedLayout)
-> Ptr FixedLayout -> IO FixedLayout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FixedLayout -> FixedLayout
FixedLayout) Ptr FixedLayout
result
FixedLayout -> IO FixedLayout
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FixedLayout
result'
#if defined(ENABLE_OVERLOADING)
#endif