#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gdk.Objects.Monitor
(
Monitor(..) ,
IsMonitor ,
toMonitor ,
noMonitor ,
#if ENABLE_OVERLOADING
MonitorGetDisplayMethodInfo ,
#endif
monitorGetDisplay ,
#if ENABLE_OVERLOADING
MonitorGetGeometryMethodInfo ,
#endif
monitorGetGeometry ,
#if ENABLE_OVERLOADING
MonitorGetHeightMmMethodInfo ,
#endif
monitorGetHeightMm ,
#if ENABLE_OVERLOADING
MonitorGetManufacturerMethodInfo ,
#endif
monitorGetManufacturer ,
#if ENABLE_OVERLOADING
MonitorGetModelMethodInfo ,
#endif
monitorGetModel ,
#if ENABLE_OVERLOADING
MonitorGetRefreshRateMethodInfo ,
#endif
monitorGetRefreshRate ,
#if ENABLE_OVERLOADING
MonitorGetScaleFactorMethodInfo ,
#endif
monitorGetScaleFactor ,
#if ENABLE_OVERLOADING
MonitorGetSubpixelLayoutMethodInfo ,
#endif
monitorGetSubpixelLayout ,
#if ENABLE_OVERLOADING
MonitorGetWidthMmMethodInfo ,
#endif
monitorGetWidthMm ,
#if ENABLE_OVERLOADING
MonitorGetWorkareaMethodInfo ,
#endif
monitorGetWorkarea ,
#if ENABLE_OVERLOADING
MonitorIsPrimaryMethodInfo ,
#endif
monitorIsPrimary ,
#if ENABLE_OVERLOADING
MonitorDisplayPropertyInfo ,
#endif
constructMonitorDisplay ,
getMonitorDisplay ,
#if ENABLE_OVERLOADING
monitorDisplay ,
#endif
#if ENABLE_OVERLOADING
MonitorGeometryPropertyInfo ,
#endif
getMonitorGeometry ,
#if ENABLE_OVERLOADING
monitorGeometry ,
#endif
#if ENABLE_OVERLOADING
MonitorHeightMmPropertyInfo ,
#endif
getMonitorHeightMm ,
#if ENABLE_OVERLOADING
monitorHeightMm ,
#endif
#if ENABLE_OVERLOADING
MonitorManufacturerPropertyInfo ,
#endif
getMonitorManufacturer ,
#if ENABLE_OVERLOADING
monitorManufacturer ,
#endif
#if ENABLE_OVERLOADING
MonitorModelPropertyInfo ,
#endif
getMonitorModel ,
#if ENABLE_OVERLOADING
monitorModel ,
#endif
#if ENABLE_OVERLOADING
MonitorRefreshRatePropertyInfo ,
#endif
getMonitorRefreshRate ,
#if ENABLE_OVERLOADING
monitorRefreshRate ,
#endif
#if ENABLE_OVERLOADING
MonitorScaleFactorPropertyInfo ,
#endif
getMonitorScaleFactor ,
#if ENABLE_OVERLOADING
monitorScaleFactor ,
#endif
#if ENABLE_OVERLOADING
MonitorSubpixelLayoutPropertyInfo ,
#endif
getMonitorSubpixelLayout ,
#if ENABLE_OVERLOADING
monitorSubpixelLayout ,
#endif
#if ENABLE_OVERLOADING
MonitorWidthMmPropertyInfo ,
#endif
getMonitorWidthMm ,
#if ENABLE_OVERLOADING
monitorWidthMm ,
#endif
#if ENABLE_OVERLOADING
MonitorWorkareaPropertyInfo ,
#endif
getMonitorWorkarea ,
#if ENABLE_OVERLOADING
monitorWorkarea ,
#endif
C_MonitorInvalidateCallback ,
MonitorInvalidateCallback ,
#if ENABLE_OVERLOADING
MonitorInvalidateSignalInfo ,
#endif
afterMonitorInvalidate ,
genClosure_MonitorInvalidate ,
mk_MonitorInvalidateCallback ,
noMonitorInvalidateCallback ,
onMonitorInvalidate ,
wrap_MonitorInvalidateCallback ,
) 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.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.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Objects.Display as Gdk.Display
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
newtype Monitor = Monitor (ManagedPtr Monitor)
foreign import ccall "gdk_monitor_get_type"
c_gdk_monitor_get_type :: IO GType
instance GObject Monitor where
gobjectType = c_gdk_monitor_get_type
class (GObject o, O.IsDescendantOf Monitor o) => IsMonitor o
instance (GObject o, O.IsDescendantOf Monitor o) => IsMonitor o
instance O.HasParentTypes Monitor
type instance O.ParentTypes Monitor = '[GObject.Object.Object]
toMonitor :: (MonadIO m, IsMonitor o) => o -> m Monitor
toMonitor = liftIO . unsafeCastTo Monitor
noMonitor :: Maybe Monitor
noMonitor = Nothing
#if ENABLE_OVERLOADING
type family ResolveMonitorMethod (t :: Symbol) (o :: *) :: * where
ResolveMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMonitorMethod "isPrimary" o = MonitorIsPrimaryMethodInfo
ResolveMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMonitorMethod "getDisplay" o = MonitorGetDisplayMethodInfo
ResolveMonitorMethod "getGeometry" o = MonitorGetGeometryMethodInfo
ResolveMonitorMethod "getHeightMm" o = MonitorGetHeightMmMethodInfo
ResolveMonitorMethod "getManufacturer" o = MonitorGetManufacturerMethodInfo
ResolveMonitorMethod "getModel" o = MonitorGetModelMethodInfo
ResolveMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMonitorMethod "getRefreshRate" o = MonitorGetRefreshRateMethodInfo
ResolveMonitorMethod "getScaleFactor" o = MonitorGetScaleFactorMethodInfo
ResolveMonitorMethod "getSubpixelLayout" o = MonitorGetSubpixelLayoutMethodInfo
ResolveMonitorMethod "getWidthMm" o = MonitorGetWidthMmMethodInfo
ResolveMonitorMethod "getWorkarea" o = MonitorGetWorkareaMethodInfo
ResolveMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMonitorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMonitorMethod t Monitor, O.MethodInfo info Monitor p) => OL.IsLabel t (Monitor -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type MonitorInvalidateCallback =
IO ()
noMonitorInvalidateCallback :: Maybe MonitorInvalidateCallback
noMonitorInvalidateCallback = Nothing
type C_MonitorInvalidateCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_MonitorInvalidateCallback :: C_MonitorInvalidateCallback -> IO (FunPtr C_MonitorInvalidateCallback)
genClosure_MonitorInvalidate :: MonadIO m => MonitorInvalidateCallback -> m (GClosure C_MonitorInvalidateCallback)
genClosure_MonitorInvalidate cb = liftIO $ do
let cb' = wrap_MonitorInvalidateCallback cb
mk_MonitorInvalidateCallback cb' >>= B.GClosure.newGClosure
wrap_MonitorInvalidateCallback ::
MonitorInvalidateCallback ->
C_MonitorInvalidateCallback
wrap_MonitorInvalidateCallback _cb _ _ = do
_cb
onMonitorInvalidate :: (IsMonitor a, MonadIO m) => a -> MonitorInvalidateCallback -> m SignalHandlerId
onMonitorInvalidate obj cb = liftIO $ do
let cb' = wrap_MonitorInvalidateCallback cb
cb'' <- mk_MonitorInvalidateCallback cb'
connectSignalFunPtr obj "invalidate" cb'' SignalConnectBefore
afterMonitorInvalidate :: (IsMonitor a, MonadIO m) => a -> MonitorInvalidateCallback -> m SignalHandlerId
afterMonitorInvalidate obj cb = liftIO $ do
let cb' = wrap_MonitorInvalidateCallback cb
cb'' <- mk_MonitorInvalidateCallback cb'
connectSignalFunPtr obj "invalidate" cb'' SignalConnectAfter
getMonitorDisplay :: (MonadIO m, IsMonitor o) => o -> m Gdk.Display.Display
getMonitorDisplay obj = liftIO $ checkUnexpectedNothing "getMonitorDisplay" $ B.Properties.getObjectPropertyObject obj "display" Gdk.Display.Display
constructMonitorDisplay :: (IsMonitor o, Gdk.Display.IsDisplay a) => a -> IO (GValueConstruct o)
constructMonitorDisplay val = B.Properties.constructObjectPropertyObject "display" (Just val)
#if ENABLE_OVERLOADING
data MonitorDisplayPropertyInfo
instance AttrInfo MonitorDisplayPropertyInfo where
type AttrAllowedOps MonitorDisplayPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MonitorDisplayPropertyInfo = Gdk.Display.IsDisplay
type AttrBaseTypeConstraint MonitorDisplayPropertyInfo = IsMonitor
type AttrGetType MonitorDisplayPropertyInfo = Gdk.Display.Display
type AttrLabel MonitorDisplayPropertyInfo = "display"
type AttrOrigin MonitorDisplayPropertyInfo = Monitor
attrGet _ = getMonitorDisplay
attrSet _ = undefined
attrConstruct _ = constructMonitorDisplay
attrClear _ = undefined
#endif
getMonitorGeometry :: (MonadIO m, IsMonitor o) => o -> m (Maybe Gdk.Rectangle.Rectangle)
getMonitorGeometry obj = liftIO $ B.Properties.getObjectPropertyBoxed obj "geometry" Gdk.Rectangle.Rectangle
#if ENABLE_OVERLOADING
data MonitorGeometryPropertyInfo
instance AttrInfo MonitorGeometryPropertyInfo where
type AttrAllowedOps MonitorGeometryPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MonitorGeometryPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorGeometryPropertyInfo = IsMonitor
type AttrGetType MonitorGeometryPropertyInfo = (Maybe Gdk.Rectangle.Rectangle)
type AttrLabel MonitorGeometryPropertyInfo = "geometry"
type AttrOrigin MonitorGeometryPropertyInfo = Monitor
attrGet _ = getMonitorGeometry
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorHeightMm :: (MonadIO m, IsMonitor o) => o -> m Int32
getMonitorHeightMm obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "height-mm"
#if ENABLE_OVERLOADING
data MonitorHeightMmPropertyInfo
instance AttrInfo MonitorHeightMmPropertyInfo where
type AttrAllowedOps MonitorHeightMmPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MonitorHeightMmPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorHeightMmPropertyInfo = IsMonitor
type AttrGetType MonitorHeightMmPropertyInfo = Int32
type AttrLabel MonitorHeightMmPropertyInfo = "height-mm"
type AttrOrigin MonitorHeightMmPropertyInfo = Monitor
attrGet _ = getMonitorHeightMm
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorManufacturer :: (MonadIO m, IsMonitor o) => o -> m (Maybe T.Text)
getMonitorManufacturer obj = liftIO $ B.Properties.getObjectPropertyString obj "manufacturer"
#if ENABLE_OVERLOADING
data MonitorManufacturerPropertyInfo
instance AttrInfo MonitorManufacturerPropertyInfo where
type AttrAllowedOps MonitorManufacturerPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MonitorManufacturerPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorManufacturerPropertyInfo = IsMonitor
type AttrGetType MonitorManufacturerPropertyInfo = (Maybe T.Text)
type AttrLabel MonitorManufacturerPropertyInfo = "manufacturer"
type AttrOrigin MonitorManufacturerPropertyInfo = Monitor
attrGet _ = getMonitorManufacturer
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorModel :: (MonadIO m, IsMonitor o) => o -> m (Maybe T.Text)
getMonitorModel obj = liftIO $ B.Properties.getObjectPropertyString obj "model"
#if ENABLE_OVERLOADING
data MonitorModelPropertyInfo
instance AttrInfo MonitorModelPropertyInfo where
type AttrAllowedOps MonitorModelPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MonitorModelPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorModelPropertyInfo = IsMonitor
type AttrGetType MonitorModelPropertyInfo = (Maybe T.Text)
type AttrLabel MonitorModelPropertyInfo = "model"
type AttrOrigin MonitorModelPropertyInfo = Monitor
attrGet _ = getMonitorModel
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorRefreshRate :: (MonadIO m, IsMonitor o) => o -> m Int32
getMonitorRefreshRate obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "refresh-rate"
#if ENABLE_OVERLOADING
data MonitorRefreshRatePropertyInfo
instance AttrInfo MonitorRefreshRatePropertyInfo where
type AttrAllowedOps MonitorRefreshRatePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MonitorRefreshRatePropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorRefreshRatePropertyInfo = IsMonitor
type AttrGetType MonitorRefreshRatePropertyInfo = Int32
type AttrLabel MonitorRefreshRatePropertyInfo = "refresh-rate"
type AttrOrigin MonitorRefreshRatePropertyInfo = Monitor
attrGet _ = getMonitorRefreshRate
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorScaleFactor :: (MonadIO m, IsMonitor o) => o -> m Int32
getMonitorScaleFactor obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "scale-factor"
#if ENABLE_OVERLOADING
data MonitorScaleFactorPropertyInfo
instance AttrInfo MonitorScaleFactorPropertyInfo where
type AttrAllowedOps MonitorScaleFactorPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MonitorScaleFactorPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorScaleFactorPropertyInfo = IsMonitor
type AttrGetType MonitorScaleFactorPropertyInfo = Int32
type AttrLabel MonitorScaleFactorPropertyInfo = "scale-factor"
type AttrOrigin MonitorScaleFactorPropertyInfo = Monitor
attrGet _ = getMonitorScaleFactor
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorSubpixelLayout :: (MonadIO m, IsMonitor o) => o -> m Gdk.Enums.SubpixelLayout
getMonitorSubpixelLayout obj = liftIO $ B.Properties.getObjectPropertyEnum obj "subpixel-layout"
#if ENABLE_OVERLOADING
data MonitorSubpixelLayoutPropertyInfo
instance AttrInfo MonitorSubpixelLayoutPropertyInfo where
type AttrAllowedOps MonitorSubpixelLayoutPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MonitorSubpixelLayoutPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorSubpixelLayoutPropertyInfo = IsMonitor
type AttrGetType MonitorSubpixelLayoutPropertyInfo = Gdk.Enums.SubpixelLayout
type AttrLabel MonitorSubpixelLayoutPropertyInfo = "subpixel-layout"
type AttrOrigin MonitorSubpixelLayoutPropertyInfo = Monitor
attrGet _ = getMonitorSubpixelLayout
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorWidthMm :: (MonadIO m, IsMonitor o) => o -> m Int32
getMonitorWidthMm obj = liftIO $ B.Properties.getObjectPropertyInt32 obj "width-mm"
#if ENABLE_OVERLOADING
data MonitorWidthMmPropertyInfo
instance AttrInfo MonitorWidthMmPropertyInfo where
type AttrAllowedOps MonitorWidthMmPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint MonitorWidthMmPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorWidthMmPropertyInfo = IsMonitor
type AttrGetType MonitorWidthMmPropertyInfo = Int32
type AttrLabel MonitorWidthMmPropertyInfo = "width-mm"
type AttrOrigin MonitorWidthMmPropertyInfo = Monitor
attrGet _ = getMonitorWidthMm
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getMonitorWorkarea :: (MonadIO m, IsMonitor o) => o -> m (Maybe Gdk.Rectangle.Rectangle)
getMonitorWorkarea obj = liftIO $ B.Properties.getObjectPropertyBoxed obj "workarea" Gdk.Rectangle.Rectangle
#if ENABLE_OVERLOADING
data MonitorWorkareaPropertyInfo
instance AttrInfo MonitorWorkareaPropertyInfo where
type AttrAllowedOps MonitorWorkareaPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint MonitorWorkareaPropertyInfo = (~) ()
type AttrBaseTypeConstraint MonitorWorkareaPropertyInfo = IsMonitor
type AttrGetType MonitorWorkareaPropertyInfo = (Maybe Gdk.Rectangle.Rectangle)
type AttrLabel MonitorWorkareaPropertyInfo = "workarea"
type AttrOrigin MonitorWorkareaPropertyInfo = Monitor
attrGet _ = getMonitorWorkarea
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList Monitor
type instance O.AttributeList Monitor = MonitorAttributeList
type MonitorAttributeList = ('[ '("display", MonitorDisplayPropertyInfo), '("geometry", MonitorGeometryPropertyInfo), '("heightMm", MonitorHeightMmPropertyInfo), '("manufacturer", MonitorManufacturerPropertyInfo), '("model", MonitorModelPropertyInfo), '("refreshRate", MonitorRefreshRatePropertyInfo), '("scaleFactor", MonitorScaleFactorPropertyInfo), '("subpixelLayout", MonitorSubpixelLayoutPropertyInfo), '("widthMm", MonitorWidthMmPropertyInfo), '("workarea", MonitorWorkareaPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
monitorDisplay :: AttrLabelProxy "display"
monitorDisplay = AttrLabelProxy
monitorGeometry :: AttrLabelProxy "geometry"
monitorGeometry = AttrLabelProxy
monitorHeightMm :: AttrLabelProxy "heightMm"
monitorHeightMm = AttrLabelProxy
monitorManufacturer :: AttrLabelProxy "manufacturer"
monitorManufacturer = AttrLabelProxy
monitorModel :: AttrLabelProxy "model"
monitorModel = AttrLabelProxy
monitorRefreshRate :: AttrLabelProxy "refreshRate"
monitorRefreshRate = AttrLabelProxy
monitorScaleFactor :: AttrLabelProxy "scaleFactor"
monitorScaleFactor = AttrLabelProxy
monitorSubpixelLayout :: AttrLabelProxy "subpixelLayout"
monitorSubpixelLayout = AttrLabelProxy
monitorWidthMm :: AttrLabelProxy "widthMm"
monitorWidthMm = AttrLabelProxy
monitorWorkarea :: AttrLabelProxy "workarea"
monitorWorkarea = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data MonitorInvalidateSignalInfo
instance SignalInfo MonitorInvalidateSignalInfo where
type HaskellCallbackType MonitorInvalidateSignalInfo = MonitorInvalidateCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_MonitorInvalidateCallback cb
cb'' <- mk_MonitorInvalidateCallback cb'
connectSignalFunPtr obj "invalidate" cb'' connectMode
type instance O.SignalList Monitor = MonitorSignalList
type MonitorSignalList = ('[ '("invalidate", MonitorInvalidateSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_monitor_get_display" gdk_monitor_get_display ::
Ptr Monitor ->
IO (Ptr Gdk.Display.Display)
monitorGetDisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Gdk.Display.Display
monitorGetDisplay monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_display monitor'
checkUnexpectedReturnNULL "monitorGetDisplay" result
result' <- (newObject Gdk.Display.Display) result
touchManagedPtr monitor
return result'
#if ENABLE_OVERLOADING
data MonitorGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetDisplayMethodInfo a signature where
overloadedMethod _ = monitorGetDisplay
#endif
foreign import ccall "gdk_monitor_get_geometry" gdk_monitor_get_geometry ::
Ptr Monitor ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
monitorGetGeometry ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m (Gdk.Rectangle.Rectangle)
monitorGetGeometry monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
geometry <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
gdk_monitor_get_geometry monitor' geometry
geometry' <- (wrapBoxed Gdk.Rectangle.Rectangle) geometry
touchManagedPtr monitor
return geometry'
#if ENABLE_OVERLOADING
data MonitorGetGeometryMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetGeometryMethodInfo a signature where
overloadedMethod _ = monitorGetGeometry
#endif
foreign import ccall "gdk_monitor_get_height_mm" gdk_monitor_get_height_mm ::
Ptr Monitor ->
IO Int32
monitorGetHeightMm ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Int32
monitorGetHeightMm monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_height_mm monitor'
touchManagedPtr monitor
return result
#if ENABLE_OVERLOADING
data MonitorGetHeightMmMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetHeightMmMethodInfo a signature where
overloadedMethod _ = monitorGetHeightMm
#endif
foreign import ccall "gdk_monitor_get_manufacturer" gdk_monitor_get_manufacturer ::
Ptr Monitor ->
IO CString
monitorGetManufacturer ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m (Maybe T.Text)
monitorGetManufacturer monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_manufacturer monitor'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr monitor
return maybeResult
#if ENABLE_OVERLOADING
data MonitorGetManufacturerMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetManufacturerMethodInfo a signature where
overloadedMethod _ = monitorGetManufacturer
#endif
foreign import ccall "gdk_monitor_get_model" gdk_monitor_get_model ::
Ptr Monitor ->
IO CString
monitorGetModel ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m (Maybe T.Text)
monitorGetModel monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_model monitor'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToText result'
return result''
touchManagedPtr monitor
return maybeResult
#if ENABLE_OVERLOADING
data MonitorGetModelMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetModelMethodInfo a signature where
overloadedMethod _ = monitorGetModel
#endif
foreign import ccall "gdk_monitor_get_refresh_rate" gdk_monitor_get_refresh_rate ::
Ptr Monitor ->
IO Int32
monitorGetRefreshRate ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Int32
monitorGetRefreshRate monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_refresh_rate monitor'
touchManagedPtr monitor
return result
#if ENABLE_OVERLOADING
data MonitorGetRefreshRateMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetRefreshRateMethodInfo a signature where
overloadedMethod _ = monitorGetRefreshRate
#endif
foreign import ccall "gdk_monitor_get_scale_factor" gdk_monitor_get_scale_factor ::
Ptr Monitor ->
IO Int32
monitorGetScaleFactor ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Int32
monitorGetScaleFactor monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_scale_factor monitor'
touchManagedPtr monitor
return result
#if ENABLE_OVERLOADING
data MonitorGetScaleFactorMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetScaleFactorMethodInfo a signature where
overloadedMethod _ = monitorGetScaleFactor
#endif
foreign import ccall "gdk_monitor_get_subpixel_layout" gdk_monitor_get_subpixel_layout ::
Ptr Monitor ->
IO CUInt
monitorGetSubpixelLayout ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Gdk.Enums.SubpixelLayout
monitorGetSubpixelLayout monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_subpixel_layout monitor'
let result' = (toEnum . fromIntegral) result
touchManagedPtr monitor
return result'
#if ENABLE_OVERLOADING
data MonitorGetSubpixelLayoutMethodInfo
instance (signature ~ (m Gdk.Enums.SubpixelLayout), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetSubpixelLayoutMethodInfo a signature where
overloadedMethod _ = monitorGetSubpixelLayout
#endif
foreign import ccall "gdk_monitor_get_width_mm" gdk_monitor_get_width_mm ::
Ptr Monitor ->
IO Int32
monitorGetWidthMm ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Int32
monitorGetWidthMm monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_get_width_mm monitor'
touchManagedPtr monitor
return result
#if ENABLE_OVERLOADING
data MonitorGetWidthMmMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetWidthMmMethodInfo a signature where
overloadedMethod _ = monitorGetWidthMm
#endif
foreign import ccall "gdk_monitor_get_workarea" gdk_monitor_get_workarea ::
Ptr Monitor ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
monitorGetWorkarea ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m (Gdk.Rectangle.Rectangle)
monitorGetWorkarea monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
workarea <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
gdk_monitor_get_workarea monitor' workarea
workarea' <- (wrapBoxed Gdk.Rectangle.Rectangle) workarea
touchManagedPtr monitor
return workarea'
#if ENABLE_OVERLOADING
data MonitorGetWorkareaMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsMonitor a) => O.MethodInfo MonitorGetWorkareaMethodInfo a signature where
overloadedMethod _ = monitorGetWorkarea
#endif
foreign import ccall "gdk_monitor_is_primary" gdk_monitor_is_primary ::
Ptr Monitor ->
IO CInt
monitorIsPrimary ::
(B.CallStack.HasCallStack, MonadIO m, IsMonitor a) =>
a
-> m Bool
monitorIsPrimary monitor = liftIO $ do
monitor' <- unsafeManagedPtrCastPtr monitor
result <- gdk_monitor_is_primary monitor'
let result' = (/= 0) result
touchManagedPtr monitor
return result'
#if ENABLE_OVERLOADING
data MonitorIsPrimaryMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMonitor a) => O.MethodInfo MonitorIsPrimaryMethodInfo a signature where
overloadedMethod _ = monitorIsPrimary
#endif