{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.Gtk.Objects.CustomLayout
    ( 

-- * Exported types
    CustomLayout(..)                        ,
    IsCustomLayout                          ,
    toCustomLayout                          ,
    noCustomLayout                          ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveCustomLayoutMethod               ,
#endif




    ) 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.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 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

-- | Memory-managed wrapper type.
newtype CustomLayout = CustomLayout (ManagedPtr CustomLayout)
    deriving (CustomLayout -> CustomLayout -> Bool
(CustomLayout -> CustomLayout -> Bool)
-> (CustomLayout -> CustomLayout -> Bool) -> Eq CustomLayout
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomLayout -> CustomLayout -> Bool
$c/= :: CustomLayout -> CustomLayout -> Bool
== :: CustomLayout -> CustomLayout -> Bool
$c== :: CustomLayout -> CustomLayout -> Bool
Eq)
foreign import ccall "gtk_custom_layout_get_type"
    c_gtk_custom_layout_get_type :: IO GType

instance GObject CustomLayout where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_custom_layout_get_type
    

-- | Convert 'CustomLayout' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue CustomLayout where
    toGValue :: CustomLayout -> IO GValue
toGValue o :: CustomLayout
o = do
        GType
gtype <- IO GType
c_gtk_custom_layout_get_type
        CustomLayout -> (Ptr CustomLayout -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr CustomLayout
o (GType
-> (GValue -> Ptr CustomLayout -> IO ())
-> Ptr CustomLayout
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr CustomLayout -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO CustomLayout
fromGValue gv :: GValue
gv = do
        Ptr CustomLayout
ptr <- GValue -> IO (Ptr CustomLayout)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr CustomLayout)
        (ManagedPtr CustomLayout -> CustomLayout)
-> Ptr CustomLayout -> IO CustomLayout
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr CustomLayout -> CustomLayout
CustomLayout Ptr CustomLayout
ptr
        
    

-- | Type class for types which can be safely cast to `CustomLayout`, for instance with `toCustomLayout`.
class (GObject o, O.IsDescendantOf CustomLayout o) => IsCustomLayout o
instance (GObject o, O.IsDescendantOf CustomLayout o) => IsCustomLayout o

instance O.HasParentTypes CustomLayout
type instance O.ParentTypes CustomLayout = '[Gtk.LayoutManager.LayoutManager, GObject.Object.Object]

-- | Cast to `CustomLayout`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toCustomLayout :: (MonadIO m, IsCustomLayout o) => o -> m CustomLayout
toCustomLayout :: o -> m CustomLayout
toCustomLayout = IO CustomLayout -> m CustomLayout
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CustomLayout -> m CustomLayout)
-> (o -> IO CustomLayout) -> o -> m CustomLayout
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr CustomLayout -> CustomLayout) -> o -> IO CustomLayout
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr CustomLayout -> CustomLayout
CustomLayout

-- | A convenience alias for `Nothing` :: `Maybe` `CustomLayout`.
noCustomLayout :: Maybe CustomLayout
noCustomLayout :: Maybe CustomLayout
noCustomLayout = Maybe CustomLayout
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveCustomLayoutMethod (t :: Symbol) (o :: *) :: * where
    ResolveCustomLayoutMethod "allocate" o = Gtk.LayoutManager.LayoutManagerAllocateMethodInfo
    ResolveCustomLayoutMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCustomLayoutMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCustomLayoutMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCustomLayoutMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCustomLayoutMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCustomLayoutMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCustomLayoutMethod "layoutChanged" o = Gtk.LayoutManager.LayoutManagerLayoutChangedMethodInfo
    ResolveCustomLayoutMethod "measure" o = Gtk.LayoutManager.LayoutManagerMeasureMethodInfo
    ResolveCustomLayoutMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCustomLayoutMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCustomLayoutMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCustomLayoutMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCustomLayoutMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCustomLayoutMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCustomLayoutMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCustomLayoutMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCustomLayoutMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCustomLayoutMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCustomLayoutMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCustomLayoutMethod "getLayoutChild" o = Gtk.LayoutManager.LayoutManagerGetLayoutChildMethodInfo
    ResolveCustomLayoutMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCustomLayoutMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCustomLayoutMethod "getRequestMode" o = Gtk.LayoutManager.LayoutManagerGetRequestModeMethodInfo
    ResolveCustomLayoutMethod "getWidget" o = Gtk.LayoutManager.LayoutManagerGetWidgetMethodInfo
    ResolveCustomLayoutMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCustomLayoutMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveCustomLayoutMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCustomLayoutMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveCustomLayoutMethod t CustomLayout, O.MethodInfo info CustomLayout p) => OL.IsLabel t (CustomLayout -> 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 CustomLayout
type instance O.AttributeList CustomLayout = CustomLayoutAttributeList
type CustomLayoutAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList CustomLayout = CustomLayoutSignalList
type CustomLayoutSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif