{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.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.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
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
/= :: FixedLayout -> FixedLayout -> Bool
$c/= :: FixedLayout -> FixedLayout -> Bool
== :: FixedLayout -> FixedLayout -> Bool
$c== :: FixedLayout -> FixedLayout -> Bool
Eq)
instance SP.ManagedPtrNewtype FixedLayout where
toManagedPtr :: FixedLayout -> ManagedPtr FixedLayout
toManagedPtr (FixedLayout ManagedPtr FixedLayout
p) = ManagedPtr FixedLayout
p
foreign import ccall "gtk_fixed_layout_get_type"
c_gtk_fixed_layout_get_type :: IO B.Types.GType
instance B.Types.TypedObject FixedLayout where
glibType :: IO GType
glibType = IO GType
c_gtk_fixed_layout_get_type
instance B.Types.GObject FixedLayout
instance B.GValue.IsGValue FixedLayout where
toGValue :: FixedLayout -> IO GValue
toGValue FixedLayout
o = do
GType
gtype <- IO GType
c_gtk_fixed_layout_get_type
FixedLayout -> (Ptr FixedLayout -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FixedLayout
o (GType
-> (GValue -> Ptr FixedLayout -> IO ())
-> Ptr FixedLayout
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FixedLayout -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO FixedLayout
fromGValue GValue
gv = do
Ptr FixedLayout
ptr <- GValue -> IO (Ptr FixedLayout)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FixedLayout)
(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
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 = '[Gtk.LayoutManager.LayoutManager, GObject.Object.Object]
toFixedLayout :: (MonadIO m, IsFixedLayout o) => o -> m FixedLayout
toFixedLayout :: o -> m FixedLayout
toFixedLayout = IO FixedLayout -> m FixedLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr FixedLayout -> FixedLayout
FixedLayout
#if defined(ENABLE_OVERLOADING)
type family ResolveFixedLayoutMethod (t :: Symbol) (o :: *) :: * where
ResolveFixedLayoutMethod "allocate" o = Gtk.LayoutManager.LayoutManagerAllocateMethodInfo
ResolveFixedLayoutMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFixedLayoutMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
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 = Gtk.LayoutManager.LayoutManagerLayoutChangedMethodInfo
ResolveFixedLayoutMethod "measure" o = Gtk.LayoutManager.LayoutManagerMeasureMethodInfo
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 "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFixedLayoutMethod "getLayoutChild" o = Gtk.LayoutManager.LayoutManagerGetLayoutChildMethodInfo
ResolveFixedLayoutMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFixedLayoutMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFixedLayoutMethod "getRequestMode" o = Gtk.LayoutManager.LayoutManagerGetRequestModeMethodInfo
ResolveFixedLayoutMethod "getWidget" o = Gtk.LayoutManager.LayoutManagerGetWidgetMethodInfo
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.MethodInfo 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
#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 = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_fixed_layout_new" gtk_fixed_layout_new ::
IO (Ptr FixedLayout)
fixedLayoutNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FixedLayout
fixedLayoutNew :: m FixedLayout
fixedLayoutNew = IO FixedLayout -> m FixedLayout
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)
gtk_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
wrapObject ManagedPtr FixedLayout -> FixedLayout
FixedLayout) Ptr FixedLayout
result
FixedLayout -> IO FixedLayout
forall (m :: * -> *) a. Monad m => a -> m a
return FixedLayout
result'
#if defined(ENABLE_OVERLOADING)
#endif