    {-# 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 !defined(__HADDOCK_VERSION__)
    #define ENABLE_OVERLOADING
    #endif

    module GI.GdkX11.Objects.X11Monitor
        (

    -- * Exported types
        X11Monitor(..)                          ,
        IsX11Monitor                            ,
        toX11Monitor                            ,

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

    #if defined(ENABLE_OVERLOADING)
        ResolveX11MonitorMethod                 ,
    #endif

    -- ** getOutput #method:getOutput#

        x11MonitorGetOutput                     ,

        ) 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.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 qualified GI.Gdk.Objects.Monitor as Gdk.Monitor

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

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

    foreign import ccall "gdk_x11_monitor_get_type"
        c_gdk_x11_monitor_get_type :: IO B.Types.GType

    instance B.Types.TypedObject X11Monitor where
        glibType :: IO GType
    glibType = IO GType
    c_gdk_x11_monitor_get_type

    instance B.Types.GObject X11Monitor

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

        fromGValue :: GValue -> IO X11Monitor
    fromGValue gv :: GValue
    gv = do
            Ptr X11Monitor
    ptr <- GValue -> IO (Ptr X11Monitor)
    forall b. GObject b => GValue -> IO (Ptr b)
    B.GValue.get_object GValue
    gv :: IO (Ptr X11Monitor)
            (ManagedPtr X11Monitor -> X11Monitor)
    -> Ptr X11Monitor -> IO X11Monitor
    forall a b.
    (HasCallStack, GObject a, GObject b) =>
    (ManagedPtr a -> a) -> Ptr b -> IO a
    B.ManagedPtr.newObject ManagedPtr X11Monitor -> X11Monitor
    X11Monitor Ptr X11Monitor
    ptr

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

    instance O.HasParentTypes X11Monitor
    type instance O.ParentTypes X11Monitor = '[Gdk.Monitor.Monitor, GObject.Object.Object]

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

    #if defined(ENABLE_OVERLOADING)
    type family ResolveX11MonitorMethod (t :: Symbol) (o :: *) :: * where
        ResolveX11MonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
        ResolveX11MonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
        ResolveX11MonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
        ResolveX11MonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
        ResolveX11MonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
        ResolveX11MonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
        ResolveX11MonitorMethod "isPrimary" o = Gdk.Monitor.MonitorIsPrimaryMethodInfo
        ResolveX11MonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
        ResolveX11MonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
        ResolveX11MonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
        ResolveX11MonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
        ResolveX11MonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
        ResolveX11MonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
        ResolveX11MonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
        ResolveX11MonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
        ResolveX11MonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
        ResolveX11MonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
        ResolveX11MonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
        ResolveX11MonitorMethod "getDisplay" o = Gdk.Monitor.MonitorGetDisplayMethodInfo
        ResolveX11MonitorMethod "getGeometry" o = Gdk.Monitor.MonitorGetGeometryMethodInfo
        ResolveX11MonitorMethod "getHeightMm" o = Gdk.Monitor.MonitorGetHeightMmMethodInfo
        ResolveX11MonitorMethod "getManufacturer" o = Gdk.Monitor.MonitorGetManufacturerMethodInfo
        ResolveX11MonitorMethod "getModel" o = Gdk.Monitor.MonitorGetModelMethodInfo
        ResolveX11MonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
        ResolveX11MonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
        ResolveX11MonitorMethod "getRefreshRate" o = Gdk.Monitor.MonitorGetRefreshRateMethodInfo
        ResolveX11MonitorMethod "getScaleFactor" o = Gdk.Monitor.MonitorGetScaleFactorMethodInfo
        ResolveX11MonitorMethod "getSubpixelLayout" o = Gdk.Monitor.MonitorGetSubpixelLayoutMethodInfo
        ResolveX11MonitorMethod "getWidthMm" o = Gdk.Monitor.MonitorGetWidthMmMethodInfo
        ResolveX11MonitorMethod "getWorkarea" o = Gdk.Monitor.MonitorGetWorkareaMethodInfo
        ResolveX11MonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
        ResolveX11MonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
        ResolveX11MonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
        ResolveX11MonitorMethod l o = O.MethodResolutionFailed l o

    instance (info ~ ResolveX11MonitorMethod t X11Monitor, O.MethodInfo info X11Monitor p) => OL.IsLabel t (X11Monitor -> 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 X11Monitor
    type instance O.AttributeList X11Monitor = X11MonitorAttributeList
    type X11MonitorAttributeList = ('[ '("display", Gdk.Monitor.MonitorDisplayPropertyInfo), '("geometry", Gdk.Monitor.MonitorGeometryPropertyInfo), '("heightMm", Gdk.Monitor.MonitorHeightMmPropertyInfo), '("manufacturer", Gdk.Monitor.MonitorManufacturerPropertyInfo), '("model", Gdk.Monitor.MonitorModelPropertyInfo), '("refreshRate", Gdk.Monitor.MonitorRefreshRatePropertyInfo), '("scaleFactor", Gdk.Monitor.MonitorScaleFactorPropertyInfo), '("subpixelLayout", Gdk.Monitor.MonitorSubpixelLayoutPropertyInfo), '("widthMm", Gdk.Monitor.MonitorWidthMmPropertyInfo), '("workarea", Gdk.Monitor.MonitorWorkareaPropertyInfo)] :: [(Symbol, *)])
    #endif

    #if defined(ENABLE_OVERLOADING)
    #endif

    #if defined(ENABLE_OVERLOADING)
    type instance O.SignalList X11Monitor = X11MonitorSignalList
    type X11MonitorSignalList = ('[ '("invalidate", Gdk.Monitor.MonitorInvalidateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

    #endif

    -- method X11Monitor::get_output
    -- method type : MemberFunction
    -- Args: [ Arg
    --           { argCName = "monitor"
    --           , argType =
    --               TInterface Name { namespace = "Gdk" , name = "Monitor" }
    --           , direction = DirectionIn
    --           , mayBeNull = False
    --           , argDoc =
    --               Documentation { rawDocText = Nothing , sinceVersion = Nothing }
    --           , argScope = ScopeTypeInvalid
    --           , argClosure = -1
    --           , argDestroy = -1
    --           , argCallerAllocates = False
    --           , transfer = TransferNothing
    --           }
    --       ]
    -- Lengths: []
    -- returnType: Just (TBasicType TULong)
    -- throws : False
    -- Skip return : False

    foreign import ccall "gdk_x11_monitor_get_output" gdk_x11_monitor_get_output ::
        Ptr Gdk.Monitor.Monitor ->              -- monitor : TInterface (Name {namespace = "Gdk", name = "Monitor"})
        IO CULong

    -- | /No description available in the introspection data./
    x11MonitorGetOutput ::
        (B.CallStack.HasCallStack, MonadIO m, Gdk.Monitor.IsMonitor a) =>
        a
        -> m CULong
    x11MonitorGetOutput :: a -> m CULong
    x11MonitorGetOutput monitor :: a
    monitor = IO CULong -> m CULong
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO CULong -> m CULong) -> IO CULong -> m CULong
    forall a b. (a -> b) -> a -> b
    $ do
        Ptr Monitor
    monitor' <- a -> IO (Ptr Monitor)
    forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
    unsafeManagedPtrCastPtr a
    monitor
        CULong
    result <- Ptr Monitor -> IO CULong
    gdk_x11_monitor_get_output Ptr Monitor
    monitor'
        a -> IO ()
    forall a. ManagedPtrNewtype a => a -> IO ()
    touchManagedPtr a
    monitor
        CULong -> IO CULong
    forall (m :: * -> *) a. Monad m => a -> m a
    return CULong
    result

    #if defined(ENABLE_OVERLOADING)
    #endif