{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) 'GI.Gdk.Objects.Screen.Screen' objects are the GDK representation of the screen on which windows can be displayed and on which the pointer moves. X originally identified screens with physical screens, but nowadays it is more common to have a single 'GI.Gdk.Objects.Screen.Screen' which combines several physical monitors (see 'GI.Gdk.Objects.Screen.screenGetNMonitors'). GdkScreen is used throughout GDK and GTK+ to specify which screen the top level windows are to be displayed on. it is also used to query the screen specification and default settings such as the default visual ('GI.Gdk.Objects.Screen.screenGetSystemVisual'), the dimensions of the physical monitors ('GI.Gdk.Objects.Screen.screenGetMonitorGeometry'), etc. -} module GI.Gdk.Objects.Screen ( -- * Exported types Screen(..) , IsScreen , toScreen , noScreen , -- * Methods -- ** getActiveWindow #method:getActiveWindow# ScreenGetActiveWindowMethodInfo , screenGetActiveWindow , -- ** getDefault #method:getDefault# screenGetDefault , -- ** getDisplay #method:getDisplay# ScreenGetDisplayMethodInfo , screenGetDisplay , -- ** getFontOptions #method:getFontOptions# ScreenGetFontOptionsMethodInfo , screenGetFontOptions , -- ** getHeight #method:getHeight# ScreenGetHeightMethodInfo , screenGetHeight , -- ** getHeightMm #method:getHeightMm# ScreenGetHeightMmMethodInfo , screenGetHeightMm , -- ** getMonitorAtPoint #method:getMonitorAtPoint# ScreenGetMonitorAtPointMethodInfo , screenGetMonitorAtPoint , -- ** getMonitorAtWindow #method:getMonitorAtWindow# ScreenGetMonitorAtWindowMethodInfo , screenGetMonitorAtWindow , -- ** getMonitorGeometry #method:getMonitorGeometry# ScreenGetMonitorGeometryMethodInfo , screenGetMonitorGeometry , -- ** getMonitorHeightMm #method:getMonitorHeightMm# ScreenGetMonitorHeightMmMethodInfo , screenGetMonitorHeightMm , -- ** getMonitorPlugName #method:getMonitorPlugName# ScreenGetMonitorPlugNameMethodInfo , screenGetMonitorPlugName , -- ** getMonitorScaleFactor #method:getMonitorScaleFactor# ScreenGetMonitorScaleFactorMethodInfo , screenGetMonitorScaleFactor , -- ** getMonitorWidthMm #method:getMonitorWidthMm# ScreenGetMonitorWidthMmMethodInfo , screenGetMonitorWidthMm , -- ** getMonitorWorkarea #method:getMonitorWorkarea# ScreenGetMonitorWorkareaMethodInfo , screenGetMonitorWorkarea , -- ** getNMonitors #method:getNMonitors# ScreenGetNMonitorsMethodInfo , screenGetNMonitors , -- ** getNumber #method:getNumber# ScreenGetNumberMethodInfo , screenGetNumber , -- ** getPrimaryMonitor #method:getPrimaryMonitor# ScreenGetPrimaryMonitorMethodInfo , screenGetPrimaryMonitor , -- ** getResolution #method:getResolution# ScreenGetResolutionMethodInfo , screenGetResolution , -- ** getRgbaVisual #method:getRgbaVisual# ScreenGetRgbaVisualMethodInfo , screenGetRgbaVisual , -- ** getRootWindow #method:getRootWindow# ScreenGetRootWindowMethodInfo , screenGetRootWindow , -- ** getSetting #method:getSetting# ScreenGetSettingMethodInfo , screenGetSetting , -- ** getSystemVisual #method:getSystemVisual# ScreenGetSystemVisualMethodInfo , screenGetSystemVisual , -- ** getToplevelWindows #method:getToplevelWindows# ScreenGetToplevelWindowsMethodInfo , screenGetToplevelWindows , -- ** getWidth #method:getWidth# ScreenGetWidthMethodInfo , screenGetWidth , -- ** getWidthMm #method:getWidthMm# ScreenGetWidthMmMethodInfo , screenGetWidthMm , -- ** getWindowStack #method:getWindowStack# ScreenGetWindowStackMethodInfo , screenGetWindowStack , -- ** height #method:height# screenHeight , -- ** heightMm #method:heightMm# screenHeightMm , -- ** isComposited #method:isComposited# ScreenIsCompositedMethodInfo , screenIsComposited , -- ** listVisuals #method:listVisuals# ScreenListVisualsMethodInfo , screenListVisuals , -- ** makeDisplayName #method:makeDisplayName# ScreenMakeDisplayNameMethodInfo , screenMakeDisplayName , -- ** setFontOptions #method:setFontOptions# ScreenSetFontOptionsMethodInfo , screenSetFontOptions , -- ** setResolution #method:setResolution# ScreenSetResolutionMethodInfo , screenSetResolution , -- ** width #method:width# screenWidth , -- ** widthMm #method:widthMm# screenWidthMm , -- * Properties -- ** fontOptions #attr:fontOptions# ScreenFontOptionsPropertyInfo , constructScreenFontOptions , getScreenFontOptions , screenFontOptions , setScreenFontOptions , -- ** resolution #attr:resolution# ScreenResolutionPropertyInfo , constructScreenResolution , getScreenResolution , screenResolution , setScreenResolution , -- * Signals -- ** compositedChanged #signal:compositedChanged# C_ScreenCompositedChangedCallback , ScreenCompositedChangedCallback , ScreenCompositedChangedSignalInfo , afterScreenCompositedChanged , genClosure_ScreenCompositedChanged , mk_ScreenCompositedChangedCallback , noScreenCompositedChangedCallback , onScreenCompositedChanged , wrap_ScreenCompositedChangedCallback , -- ** monitorsChanged #signal:monitorsChanged# C_ScreenMonitorsChangedCallback , ScreenMonitorsChangedCallback , ScreenMonitorsChangedSignalInfo , afterScreenMonitorsChanged , genClosure_ScreenMonitorsChanged , mk_ScreenMonitorsChangedCallback , noScreenMonitorsChangedCallback , onScreenMonitorsChanged , wrap_ScreenMonitorsChangedCallback , -- ** sizeChanged #signal:sizeChanged# C_ScreenSizeChangedCallback , ScreenSizeChangedCallback , ScreenSizeChangedSignalInfo , afterScreenSizeChanged , genClosure_ScreenSizeChanged , mk_ScreenSizeChangedCallback , noScreenSizeChangedCallback , onScreenSizeChanged , wrap_ScreenSizeChangedCallback , ) 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.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack 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 GI.Cairo.Structs.FontOptions as Cairo.FontOptions import qualified GI.GObject.Objects.Object as GObject.Object import {-# SOURCE #-} qualified GI.Gdk.Objects.Display as Gdk.Display import {-# SOURCE #-} qualified GI.Gdk.Objects.Visual as Gdk.Visual import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle newtype Screen = Screen (ManagedPtr Screen) foreign import ccall "gdk_screen_get_type" c_gdk_screen_get_type :: IO GType instance GObject Screen where gobjectType _ = c_gdk_screen_get_type class GObject o => IsScreen o #if MIN_VERSION_base(4,9,0) instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Screen a) => IsScreen a #endif instance IsScreen Screen instance GObject.Object.IsObject Screen toScreen :: IsScreen o => o -> IO Screen toScreen = unsafeCastTo Screen noScreen :: Maybe Screen noScreen = Nothing type family ResolveScreenMethod (t :: Symbol) (o :: *) :: * where ResolveScreenMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo ResolveScreenMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo ResolveScreenMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo ResolveScreenMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo ResolveScreenMethod "isComposited" o = ScreenIsCompositedMethodInfo ResolveScreenMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo ResolveScreenMethod "listVisuals" o = ScreenListVisualsMethodInfo ResolveScreenMethod "makeDisplayName" o = ScreenMakeDisplayNameMethodInfo ResolveScreenMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo ResolveScreenMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo ResolveScreenMethod "ref" o = GObject.Object.ObjectRefMethodInfo ResolveScreenMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo ResolveScreenMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo ResolveScreenMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo ResolveScreenMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo ResolveScreenMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo ResolveScreenMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo ResolveScreenMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo ResolveScreenMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo ResolveScreenMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo ResolveScreenMethod "getActiveWindow" o = ScreenGetActiveWindowMethodInfo ResolveScreenMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo ResolveScreenMethod "getDisplay" o = ScreenGetDisplayMethodInfo ResolveScreenMethod "getFontOptions" o = ScreenGetFontOptionsMethodInfo ResolveScreenMethod "getHeight" o = ScreenGetHeightMethodInfo ResolveScreenMethod "getHeightMm" o = ScreenGetHeightMmMethodInfo ResolveScreenMethod "getMonitorAtPoint" o = ScreenGetMonitorAtPointMethodInfo ResolveScreenMethod "getMonitorAtWindow" o = ScreenGetMonitorAtWindowMethodInfo ResolveScreenMethod "getMonitorGeometry" o = ScreenGetMonitorGeometryMethodInfo ResolveScreenMethod "getMonitorHeightMm" o = ScreenGetMonitorHeightMmMethodInfo ResolveScreenMethod "getMonitorPlugName" o = ScreenGetMonitorPlugNameMethodInfo ResolveScreenMethod "getMonitorScaleFactor" o = ScreenGetMonitorScaleFactorMethodInfo ResolveScreenMethod "getMonitorWidthMm" o = ScreenGetMonitorWidthMmMethodInfo ResolveScreenMethod "getMonitorWorkarea" o = ScreenGetMonitorWorkareaMethodInfo ResolveScreenMethod "getNMonitors" o = ScreenGetNMonitorsMethodInfo ResolveScreenMethod "getNumber" o = ScreenGetNumberMethodInfo ResolveScreenMethod "getPrimaryMonitor" o = ScreenGetPrimaryMonitorMethodInfo ResolveScreenMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo ResolveScreenMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo ResolveScreenMethod "getResolution" o = ScreenGetResolutionMethodInfo ResolveScreenMethod "getRgbaVisual" o = ScreenGetRgbaVisualMethodInfo ResolveScreenMethod "getRootWindow" o = ScreenGetRootWindowMethodInfo ResolveScreenMethod "getSetting" o = ScreenGetSettingMethodInfo ResolveScreenMethod "getSystemVisual" o = ScreenGetSystemVisualMethodInfo ResolveScreenMethod "getToplevelWindows" o = ScreenGetToplevelWindowsMethodInfo ResolveScreenMethod "getWidth" o = ScreenGetWidthMethodInfo ResolveScreenMethod "getWidthMm" o = ScreenGetWidthMmMethodInfo ResolveScreenMethod "getWindowStack" o = ScreenGetWindowStackMethodInfo ResolveScreenMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo ResolveScreenMethod "setFontOptions" o = ScreenSetFontOptionsMethodInfo ResolveScreenMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo ResolveScreenMethod "setResolution" o = ScreenSetResolutionMethodInfo ResolveScreenMethod l o = O.MethodResolutionFailed l o instance (info ~ ResolveScreenMethod t Screen, O.MethodInfo info Screen p) => O.IsLabelProxy t (Screen -> p) where fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #if MIN_VERSION_base(4,9,0) instance (info ~ ResolveScreenMethod t Screen, O.MethodInfo info Screen p) => O.IsLabel t (Screen -> p) where fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info) #endif -- signal Screen::composited-changed type ScreenCompositedChangedCallback = IO () noScreenCompositedChangedCallback :: Maybe ScreenCompositedChangedCallback noScreenCompositedChangedCallback = Nothing type C_ScreenCompositedChangedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_ScreenCompositedChangedCallback :: C_ScreenCompositedChangedCallback -> IO (FunPtr C_ScreenCompositedChangedCallback) genClosure_ScreenCompositedChanged :: ScreenCompositedChangedCallback -> IO Closure genClosure_ScreenCompositedChanged cb = do let cb' = wrap_ScreenCompositedChangedCallback cb mk_ScreenCompositedChangedCallback cb' >>= newCClosure wrap_ScreenCompositedChangedCallback :: ScreenCompositedChangedCallback -> Ptr () -> Ptr () -> IO () wrap_ScreenCompositedChangedCallback _cb _ _ = do _cb onScreenCompositedChanged :: (GObject a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId onScreenCompositedChanged obj cb = liftIO $ connectScreenCompositedChanged obj cb SignalConnectBefore afterScreenCompositedChanged :: (GObject a, MonadIO m) => a -> ScreenCompositedChangedCallback -> m SignalHandlerId afterScreenCompositedChanged obj cb = connectScreenCompositedChanged obj cb SignalConnectAfter connectScreenCompositedChanged :: (GObject a, MonadIO m) => a -> ScreenCompositedChangedCallback -> SignalConnectMode -> m SignalHandlerId connectScreenCompositedChanged obj cb after = liftIO $ do let cb' = wrap_ScreenCompositedChangedCallback cb cb'' <- mk_ScreenCompositedChangedCallback cb' connectSignalFunPtr obj "composited-changed" cb'' after -- signal Screen::monitors-changed type ScreenMonitorsChangedCallback = IO () noScreenMonitorsChangedCallback :: Maybe ScreenMonitorsChangedCallback noScreenMonitorsChangedCallback = Nothing type C_ScreenMonitorsChangedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_ScreenMonitorsChangedCallback :: C_ScreenMonitorsChangedCallback -> IO (FunPtr C_ScreenMonitorsChangedCallback) genClosure_ScreenMonitorsChanged :: ScreenMonitorsChangedCallback -> IO Closure genClosure_ScreenMonitorsChanged cb = do let cb' = wrap_ScreenMonitorsChangedCallback cb mk_ScreenMonitorsChangedCallback cb' >>= newCClosure wrap_ScreenMonitorsChangedCallback :: ScreenMonitorsChangedCallback -> Ptr () -> Ptr () -> IO () wrap_ScreenMonitorsChangedCallback _cb _ _ = do _cb onScreenMonitorsChanged :: (GObject a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId onScreenMonitorsChanged obj cb = liftIO $ connectScreenMonitorsChanged obj cb SignalConnectBefore afterScreenMonitorsChanged :: (GObject a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> m SignalHandlerId afterScreenMonitorsChanged obj cb = connectScreenMonitorsChanged obj cb SignalConnectAfter connectScreenMonitorsChanged :: (GObject a, MonadIO m) => a -> ScreenMonitorsChangedCallback -> SignalConnectMode -> m SignalHandlerId connectScreenMonitorsChanged obj cb after = liftIO $ do let cb' = wrap_ScreenMonitorsChangedCallback cb cb'' <- mk_ScreenMonitorsChangedCallback cb' connectSignalFunPtr obj "monitors-changed" cb'' after -- signal Screen::size-changed type ScreenSizeChangedCallback = IO () noScreenSizeChangedCallback :: Maybe ScreenSizeChangedCallback noScreenSizeChangedCallback = Nothing type C_ScreenSizeChangedCallback = Ptr () -> -- object Ptr () -> -- user_data IO () foreign import ccall "wrapper" mk_ScreenSizeChangedCallback :: C_ScreenSizeChangedCallback -> IO (FunPtr C_ScreenSizeChangedCallback) genClosure_ScreenSizeChanged :: ScreenSizeChangedCallback -> IO Closure genClosure_ScreenSizeChanged cb = do let cb' = wrap_ScreenSizeChangedCallback cb mk_ScreenSizeChangedCallback cb' >>= newCClosure wrap_ScreenSizeChangedCallback :: ScreenSizeChangedCallback -> Ptr () -> Ptr () -> IO () wrap_ScreenSizeChangedCallback _cb _ _ = do _cb onScreenSizeChanged :: (GObject a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId onScreenSizeChanged obj cb = liftIO $ connectScreenSizeChanged obj cb SignalConnectBefore afterScreenSizeChanged :: (GObject a, MonadIO m) => a -> ScreenSizeChangedCallback -> m SignalHandlerId afterScreenSizeChanged obj cb = connectScreenSizeChanged obj cb SignalConnectAfter connectScreenSizeChanged :: (GObject a, MonadIO m) => a -> ScreenSizeChangedCallback -> SignalConnectMode -> m SignalHandlerId connectScreenSizeChanged obj cb after = liftIO $ do let cb' = wrap_ScreenSizeChangedCallback cb cb'' <- mk_ScreenSizeChangedCallback cb' connectSignalFunPtr obj "size-changed" cb'' after -- VVV Prop "font-options" -- Type: TBasicType TPtr -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Nothing,Nothing) getScreenFontOptions :: (MonadIO m, IsScreen o) => o -> m (Ptr ()) getScreenFontOptions obj = liftIO $ getObjectPropertyPtr obj "font-options" setScreenFontOptions :: (MonadIO m, IsScreen o) => o -> Ptr () -> m () setScreenFontOptions obj val = liftIO $ setObjectPropertyPtr obj "font-options" val constructScreenFontOptions :: (IsScreen o) => Ptr () -> IO (GValueConstruct o) constructScreenFontOptions val = constructObjectPropertyPtr "font-options" val data ScreenFontOptionsPropertyInfo instance AttrInfo ScreenFontOptionsPropertyInfo where type AttrAllowedOps ScreenFontOptionsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint ScreenFontOptionsPropertyInfo = (~) (Ptr ()) type AttrBaseTypeConstraint ScreenFontOptionsPropertyInfo = IsScreen type AttrGetType ScreenFontOptionsPropertyInfo = (Ptr ()) type AttrLabel ScreenFontOptionsPropertyInfo = "font-options" type AttrOrigin ScreenFontOptionsPropertyInfo = Screen attrGet _ = getScreenFontOptions attrSet _ = setScreenFontOptions attrConstruct _ = constructScreenFontOptions attrClear _ = undefined -- VVV Prop "resolution" -- Type: TBasicType TDouble -- Flags: [PropertyReadable,PropertyWritable] -- Nullable: (Just False,Just False) getScreenResolution :: (MonadIO m, IsScreen o) => o -> m Double getScreenResolution obj = liftIO $ getObjectPropertyDouble obj "resolution" setScreenResolution :: (MonadIO m, IsScreen o) => o -> Double -> m () setScreenResolution obj val = liftIO $ setObjectPropertyDouble obj "resolution" val constructScreenResolution :: (IsScreen o) => Double -> IO (GValueConstruct o) constructScreenResolution val = constructObjectPropertyDouble "resolution" val data ScreenResolutionPropertyInfo instance AttrInfo ScreenResolutionPropertyInfo where type AttrAllowedOps ScreenResolutionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint ScreenResolutionPropertyInfo = (~) Double type AttrBaseTypeConstraint ScreenResolutionPropertyInfo = IsScreen type AttrGetType ScreenResolutionPropertyInfo = Double type AttrLabel ScreenResolutionPropertyInfo = "resolution" type AttrOrigin ScreenResolutionPropertyInfo = Screen attrGet _ = getScreenResolution attrSet _ = setScreenResolution attrConstruct _ = constructScreenResolution attrClear _ = undefined instance O.HasAttributeList Screen type instance O.AttributeList Screen = ScreenAttributeList type ScreenAttributeList = ('[ '("fontOptions", ScreenFontOptionsPropertyInfo), '("resolution", ScreenResolutionPropertyInfo)] :: [(Symbol, *)]) screenFontOptions :: AttrLabelProxy "fontOptions" screenFontOptions = AttrLabelProxy screenResolution :: AttrLabelProxy "resolution" screenResolution = AttrLabelProxy data ScreenCompositedChangedSignalInfo instance SignalInfo ScreenCompositedChangedSignalInfo where type HaskellCallbackType ScreenCompositedChangedSignalInfo = ScreenCompositedChangedCallback connectSignal _ = connectScreenCompositedChanged data ScreenMonitorsChangedSignalInfo instance SignalInfo ScreenMonitorsChangedSignalInfo where type HaskellCallbackType ScreenMonitorsChangedSignalInfo = ScreenMonitorsChangedCallback connectSignal _ = connectScreenMonitorsChanged data ScreenSizeChangedSignalInfo instance SignalInfo ScreenSizeChangedSignalInfo where type HaskellCallbackType ScreenSizeChangedSignalInfo = ScreenSizeChangedCallback connectSignal _ = connectScreenSizeChanged type instance O.SignalList Screen = ScreenSignalList type ScreenSignalList = ('[ '("compositedChanged", ScreenCompositedChangedSignalInfo), '("monitorsChanged", ScreenMonitorsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("sizeChanged", ScreenSizeChangedSignalInfo)] :: [(Symbol, *)]) -- method Screen::get_active_window -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_active_window" gdk_screen_get_active_window :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Gdk.Window.Window) {-# DEPRECATED screenGetActiveWindow ["(Since version 3.22)"] #-} {- | Returns the screen’s currently active window. On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property on the root window, as described in the <http://www.freedesktop.org/Standards/wm-spec Extended Window Manager Hints>. If there is no currently currently active window, or the window manager does not support the _NET_ACTIVE_WINDOW hint, this function returns 'Nothing'. On other platforms, this function may return 'Nothing', depending on whether it is implementable on that platform. The returned window should be unrefed using 'GI.GObject.Objects.Object.objectUnref' when no longer needed. @since 2.10 -} screenGetActiveWindow :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m (Maybe Gdk.Window.Window) {- ^ __Returns:__ the currently active window, or 'Nothing'. -} screenGetActiveWindow screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_active_window screen' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (wrapObject Gdk.Window.Window) result' return result'' touchManagedPtr screen return maybeResult data ScreenGetActiveWindowMethodInfo instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetActiveWindowMethodInfo a signature where overloadedMethod _ = screenGetActiveWindow -- method Screen::get_display -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Display"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_display" gdk_screen_get_display :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Gdk.Display.Display) {- | Gets the display to which the /@screen@/ belongs. @since 2.2 -} screenGetDisplay :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Gdk.Display.Display {- ^ __Returns:__ the display to which /@screen@/ belongs -} screenGetDisplay screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_display screen' checkUnexpectedReturnNULL "screenGetDisplay" result result' <- (newObject Gdk.Display.Display) result touchManagedPtr screen return result' data ScreenGetDisplayMethodInfo instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetDisplayMethodInfo a signature where overloadedMethod _ = screenGetDisplay -- method Screen::get_font_options -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "cairo", name = "FontOptions"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_font_options" gdk_screen_get_font_options :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Cairo.FontOptions.FontOptions) {- | Gets any options previously set with 'GI.Gdk.Objects.Screen.screenSetFontOptions'. @since 2.10 -} screenGetFontOptions :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m (Maybe Cairo.FontOptions.FontOptions) {- ^ __Returns:__ the current font options, or 'Nothing' if no default font options have been set. -} screenGetFontOptions screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_font_options screen' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newPtr Cairo.FontOptions.FontOptions) result' return result'' touchManagedPtr screen return maybeResult data ScreenGetFontOptionsMethodInfo instance (signature ~ (m (Maybe Cairo.FontOptions.FontOptions)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetFontOptionsMethodInfo a signature where overloadedMethod _ = screenGetFontOptions -- method Screen::get_height -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_height" gdk_screen_get_height :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetHeight ["(Since version 3.22)","Use per-monitor information instead"] #-} {- | Gets the height of /@screen@/ in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). @since 2.2 -} screenGetHeight :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ the height of /@screen@/ in pixels. -} screenGetHeight screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_height screen' touchManagedPtr screen return result data ScreenGetHeightMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetHeightMethodInfo a signature where overloadedMethod _ = screenGetHeight -- method Screen::get_height_mm -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_height_mm" gdk_screen_get_height_mm :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetHeightMm ["(Since version 3.22)","Use per-monitor information instead"] #-} {- | Returns the height of /@screen@/ in millimeters. Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead. @since 2.2 -} screenGetHeightMm :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ the heigth of /@screen@/ in millimeters. -} screenGetHeightMm screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_height_mm screen' touchManagedPtr screen return result data ScreenGetHeightMmMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetHeightMmMethodInfo a signature where overloadedMethod _ = screenGetHeightMm -- method Screen::get_monitor_at_point -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the x coordinate in the virtual screen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the y coordinate in the virtual screen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_at_point" gdk_screen_get_monitor_at_point :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- x : TBasicType TInt Int32 -> -- y : TBasicType TInt IO Int32 {-# DEPRECATED screenGetMonitorAtPoint ["(Since version 3.22)","Use 'GI.Gdk.Objects.Display.displayGetMonitorAtPoint' instead"] #-} {- | Returns the monitor number in which the point (/@x@/,/@y@/) is located. @since 2.2 -} screenGetMonitorAtPoint :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen'. -} -> Int32 {- ^ /@x@/: the x coordinate in the virtual screen. -} -> Int32 {- ^ /@y@/: the y coordinate in the virtual screen. -} -> m Int32 {- ^ __Returns:__ the monitor number in which the point (/@x@/,/@y@/) lies, or a monitor close to (/@x@/,/@y@/) if the point is not in any monitor. -} screenGetMonitorAtPoint screen x y = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_monitor_at_point screen' x y touchManagedPtr screen return result data ScreenGetMonitorAtPointMethodInfo instance (signature ~ (Int32 -> Int32 -> m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorAtPointMethodInfo a signature where overloadedMethod _ = screenGetMonitorAtPoint -- method Screen::get_monitor_at_window -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "window", argType = TInterface (Name {namespace = "Gdk", name = "Window"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkWindow", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_at_window" gdk_screen_get_monitor_at_window :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Ptr Gdk.Window.Window -> -- window : TInterface (Name {namespace = "Gdk", name = "Window"}) IO Int32 {-# DEPRECATED screenGetMonitorAtWindow ["(Since version 3.22)","Use 'GI.Gdk.Objects.Display.displayGetMonitorAtWindow' instead"] #-} {- | Returns the number of the monitor in which the largest area of the bounding rectangle of /@window@/ resides. @since 2.2 -} screenGetMonitorAtWindow :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a, Gdk.Window.IsWindow b) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen'. -} -> b {- ^ /@window@/: a 'GI.Gdk.Objects.Window.Window' -} -> m Int32 {- ^ __Returns:__ the monitor number in which most of /@window@/ is located, or if /@window@/ does not intersect any monitors, a monitor, close to /@window@/. -} screenGetMonitorAtWindow screen window = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen window' <- unsafeManagedPtrCastPtr window result <- gdk_screen_get_monitor_at_window screen' window' touchManagedPtr screen touchManagedPtr window return result data ScreenGetMonitorAtWindowMethodInfo instance (signature ~ (b -> m Int32), MonadIO m, IsScreen a, Gdk.Window.IsWindow b) => O.MethodInfo ScreenGetMonitorAtWindowMethodInfo a signature where overloadedMethod _ = screenGetMonitorAtWindow -- method Screen::get_monitor_geometry -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the monitor number", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkRectangle to be filled with\n the monitor geometry", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_geometry" gdk_screen_get_monitor_geometry :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt Ptr Gdk.Rectangle.Rectangle -> -- dest : TInterface (Name {namespace = "Gdk", name = "Rectangle"}) IO () {-# DEPRECATED screenGetMonitorGeometry ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetGeometry' instead"] #-} {- | Retrieves the 'GI.Gdk.Structs.Rectangle.Rectangle' representing the size and position of the individual monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). Monitor numbers start at 0. To obtain the number of monitors of /@screen@/, use 'GI.Gdk.Objects.Screen.screenGetNMonitors'. Note that the size of the entire screen area can be retrieved via 'GI.Gdk.Objects.Screen.screenGetWidth' and 'GI.Gdk.Objects.Screen.screenGetHeight'. @since 2.2 -} screenGetMonitorGeometry :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Int32 {- ^ /@monitorNum@/: the monitor number -} -> m (Gdk.Rectangle.Rectangle) screenGetMonitorGeometry screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen dest <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle) gdk_screen_get_monitor_geometry screen' monitorNum dest dest' <- (wrapBoxed Gdk.Rectangle.Rectangle) dest touchManagedPtr screen return dest' data ScreenGetMonitorGeometryMethodInfo instance (signature ~ (Int32 -> m (Gdk.Rectangle.Rectangle)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorGeometryMethodInfo a signature where overloadedMethod _ = screenGetMonitorGeometry -- method Screen::get_monitor_height_mm -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_height_mm" gdk_screen_get_monitor_height_mm :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt IO Int32 {-# DEPRECATED screenGetMonitorHeightMm ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetHeightMm' instead"] #-} {- | Gets the height in millimeters of the specified monitor. @since 2.14 -} screenGetMonitorHeightMm :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Int32 {- ^ /@monitorNum@/: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) -} -> m Int32 {- ^ __Returns:__ the height of the monitor, or -1 if not available -} screenGetMonitorHeightMm screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_monitor_height_mm screen' monitorNum touchManagedPtr screen return result data ScreenGetMonitorHeightMmMethodInfo instance (signature ~ (Int32 -> m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorHeightMmMethodInfo a signature where overloadedMethod _ = screenGetMonitorHeightMm -- method Screen::get_monitor_plug_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_plug_name" gdk_screen_get_monitor_plug_name :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt IO CString {-# DEPRECATED screenGetMonitorPlugName ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetModel' instead"] #-} {- | Returns the output name of the specified monitor. Usually something like VGA, DVI, or TV, not the actual product name of the display device. @since 2.14 -} screenGetMonitorPlugName :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Int32 {- ^ /@monitorNum@/: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) -} -> m (Maybe T.Text) {- ^ __Returns:__ a newly-allocated string containing the name of the monitor, or 'Nothing' if the name cannot be determined -} screenGetMonitorPlugName screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_monitor_plug_name screen' monitorNum maybeResult <- convertIfNonNull result $ \result' -> do result'' <- cstringToText result' freeMem result' return result'' touchManagedPtr screen return maybeResult data ScreenGetMonitorPlugNameMethodInfo instance (signature ~ (Int32 -> m (Maybe T.Text)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorPlugNameMethodInfo a signature where overloadedMethod _ = screenGetMonitorPlugName -- method Screen::get_monitor_scale_factor -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "screen to get scale factor for", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_scale_factor" gdk_screen_get_monitor_scale_factor :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt IO Int32 {-# DEPRECATED screenGetMonitorScaleFactor ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetScaleFactor' instead"] #-} {- | Returns the internal scale factor that maps from monitor coordinates to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2). This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a window where it is better to use 'GI.Gdk.Objects.Window.windowGetScaleFactor' instead. @since 3.10 -} screenGetMonitorScaleFactor :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: screen to get scale factor for -} -> Int32 {- ^ /@monitorNum@/: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) -} -> m Int32 {- ^ __Returns:__ the scale factor -} screenGetMonitorScaleFactor screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_monitor_scale_factor screen' monitorNum touchManagedPtr screen return result data ScreenGetMonitorScaleFactorMethodInfo instance (signature ~ (Int32 -> m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorScaleFactorMethodInfo a signature where overloadedMethod _ = screenGetMonitorScaleFactor -- method Screen::get_monitor_width_mm -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "number of the monitor, between 0 and gdk_screen_get_n_monitors (screen)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_width_mm" gdk_screen_get_monitor_width_mm :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt IO Int32 {-# DEPRECATED screenGetMonitorWidthMm ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetWidthMm' instead"] #-} {- | Gets the width in millimeters of the specified monitor, if available. @since 2.14 -} screenGetMonitorWidthMm :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Int32 {- ^ /@monitorNum@/: number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) -} -> m Int32 {- ^ __Returns:__ the width of the monitor, or -1 if not available -} screenGetMonitorWidthMm screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_monitor_width_mm screen' monitorNum touchManagedPtr screen return result data ScreenGetMonitorWidthMmMethodInfo instance (signature ~ (Int32 -> m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorWidthMmMethodInfo a signature where overloadedMethod _ = screenGetMonitorWidthMm -- method Screen::get_monitor_workarea -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "monitor_num", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the monitor number", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dest", argType = TInterface (Name {namespace = "Gdk", name = "Rectangle"}), direction = DirectionOut, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkRectangle to be filled with\n the monitor workarea", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = True, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_monitor_workarea" gdk_screen_get_monitor_workarea :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Int32 -> -- monitor_num : TBasicType TInt Ptr Gdk.Rectangle.Rectangle -> -- dest : TInterface (Name {namespace = "Gdk", name = "Rectangle"}) IO () {-# DEPRECATED screenGetMonitorWorkarea ["(Since version 3.22)","Use 'GI.Gdk.Objects.Monitor.monitorGetWorkarea' instead"] #-} {- | Retrieves the 'GI.Gdk.Structs.Rectangle.Rectangle' representing the size and position of the “work area” on a monitor within the entire screen area. The returned geometry is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). The work area should be considered when positioning menus and similar popups, to avoid placing them below panels, docks or other desktop components. Note that not all backends may have a concept of workarea. This function will return the monitor geometry if a workarea is not available, or does not apply. Monitor numbers start at 0. To obtain the number of monitors of /@screen@/, use 'GI.Gdk.Objects.Screen.screenGetNMonitors'. @since 3.4 -} screenGetMonitorWorkarea :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Int32 {- ^ /@monitorNum@/: the monitor number -} -> m (Gdk.Rectangle.Rectangle) screenGetMonitorWorkarea screen monitorNum = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen dest <- callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle) gdk_screen_get_monitor_workarea screen' monitorNum dest dest' <- (wrapBoxed Gdk.Rectangle.Rectangle) dest touchManagedPtr screen return dest' data ScreenGetMonitorWorkareaMethodInfo instance (signature ~ (Int32 -> m (Gdk.Rectangle.Rectangle)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetMonitorWorkareaMethodInfo a signature where overloadedMethod _ = screenGetMonitorWorkarea -- method Screen::get_n_monitors -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_n_monitors" gdk_screen_get_n_monitors :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetNMonitors ["(Since version 3.22)","Use 'GI.Gdk.Objects.Display.displayGetNMonitors' instead"] #-} {- | Returns the number of monitors which /@screen@/ consists of. @since 2.2 -} screenGetNMonitors :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ number of monitors which /@screen@/ consists of -} screenGetNMonitors screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_n_monitors screen' touchManagedPtr screen return result data ScreenGetNMonitorsMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetNMonitorsMethodInfo a signature where overloadedMethod _ = screenGetNMonitors -- method Screen::get_number -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_number" gdk_screen_get_number :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetNumber ["(Since version 3.22)"] #-} {- | Gets the index of /@screen@/ among the screens in the display to which it belongs. (See 'GI.Gdk.Objects.Screen.screenGetDisplay') @since 2.2 -} screenGetNumber :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ the index -} screenGetNumber screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_number screen' touchManagedPtr screen return result data ScreenGetNumberMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetNumberMethodInfo a signature where overloadedMethod _ = screenGetNumber -- method Screen::get_primary_monitor -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_primary_monitor" gdk_screen_get_primary_monitor :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetPrimaryMonitor ["(Since version 3.22)","Use 'GI.Gdk.Objects.Display.displayGetPrimaryMonitor' instead"] #-} {- | Gets the primary monitor for /@screen@/. The primary monitor is considered the monitor where the “main desktop” lives. While normal application windows typically allow the window manager to place the windows, specialized desktop applications such as panels should place themselves on the primary monitor. If no primary monitor is configured by the user, the return value will be 0, defaulting to the first monitor. @since 2.20 -} screenGetPrimaryMonitor :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen'. -} -> m Int32 {- ^ __Returns:__ An integer index for the primary monitor, or 0 if none is configured. -} screenGetPrimaryMonitor screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_primary_monitor screen' touchManagedPtr screen return result data ScreenGetPrimaryMonitorMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetPrimaryMonitorMethodInfo a signature where overloadedMethod _ = screenGetPrimaryMonitor -- method Screen::get_resolution -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_resolution" gdk_screen_get_resolution :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO CDouble {- | Gets the resolution for font handling on the screen; see 'GI.Gdk.Objects.Screen.screenSetResolution' for full details. @since 2.10 -} screenGetResolution :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Double {- ^ __Returns:__ the current resolution, or -1 if no resolution has been set. -} screenGetResolution screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_resolution screen' let result' = realToFrac result touchManagedPtr screen return result' data ScreenGetResolutionMethodInfo instance (signature ~ (m Double), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetResolutionMethodInfo a signature where overloadedMethod _ = screenGetResolution -- method Screen::get_rgba_visual -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Visual"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_rgba_visual" gdk_screen_get_rgba_visual :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Gdk.Visual.Visual) {- | Gets a visual to use for creating windows with an alpha channel. The windowing system on which GTK+ is running may not support this capability, in which case 'Nothing' will be returned. Even if a non-'Nothing' value is returned, its possible that the window’s alpha channel won’t be honored when displaying the window on the screen: in particular, for X an appropriate windowing manager and compositing manager must be running to provide appropriate display. This functionality is not implemented in the Windows backend. For setting an overall opacity for a top-level window, see 'GI.Gdk.Objects.Window.windowSetOpacity'. @since 2.8 -} screenGetRgbaVisual :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m (Maybe Gdk.Visual.Visual) {- ^ __Returns:__ a visual to use for windows with an alpha channel or 'Nothing' if the capability is not available. -} screenGetRgbaVisual screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_rgba_visual screen' maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Gdk.Visual.Visual) result' return result'' touchManagedPtr screen return maybeResult data ScreenGetRgbaVisualMethodInfo instance (signature ~ (m (Maybe Gdk.Visual.Visual)), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetRgbaVisualMethodInfo a signature where overloadedMethod _ = screenGetRgbaVisual -- method Screen::get_root_window -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_root_window" gdk_screen_get_root_window :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Gdk.Window.Window) {- | Gets the root window of /@screen@/. @since 2.2 -} screenGetRootWindow :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Gdk.Window.Window {- ^ __Returns:__ the root window -} screenGetRootWindow screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_root_window screen' checkUnexpectedReturnNULL "screenGetRootWindow" result result' <- (newObject Gdk.Window.Window) result touchManagedPtr screen return result' data ScreenGetRootWindowMethodInfo instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetRootWindowMethodInfo a signature where overloadedMethod _ = screenGetRootWindow -- method Screen::get_setting -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the #GdkScreen where the setting is located", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the name of the setting", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TInterface (Name {namespace = "GObject", name = "Value"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "location to store the value of the setting", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_setting" gdk_screen_get_setting :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) CString -> -- name : TBasicType TUTF8 Ptr GValue -> -- value : TInterface (Name {namespace = "GObject", name = "Value"}) IO CInt {- | Retrieves a desktop-wide setting such as double-click time for the 'GI.Gdk.Objects.Screen.Screen' /@screen@/. FIXME needs a list of valid settings here, or a link to more information. @since 2.2 -} screenGetSetting :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: the 'GI.Gdk.Objects.Screen.Screen' where the setting is located -} -> T.Text {- ^ /@name@/: the name of the setting -} -> GValue {- ^ /@value@/: location to store the value of the setting -} -> m Bool {- ^ __Returns:__ 'True' if the setting existed and a value was stored in /@value@/, 'False' otherwise. -} screenGetSetting screen name value = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen name' <- textToCString name value' <- unsafeManagedPtrGetPtr value result <- gdk_screen_get_setting screen' name' value' let result' = (/= 0) result touchManagedPtr screen touchManagedPtr value freeMem name' return result' data ScreenGetSettingMethodInfo instance (signature ~ (T.Text -> GValue -> m Bool), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetSettingMethodInfo a signature where overloadedMethod _ = screenGetSetting -- method Screen::get_system_visual -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Visual"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_system_visual" gdk_screen_get_system_visual :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr Gdk.Visual.Visual) {- | Get the system’s default visual for /@screen@/. This is the visual for the root window of the display. The return value should not be freed. @since 2.2 -} screenGetSystemVisual :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen'. -} -> m Gdk.Visual.Visual {- ^ __Returns:__ the system visual -} screenGetSystemVisual screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_system_visual screen' checkUnexpectedReturnNULL "screenGetSystemVisual" result result' <- (newObject Gdk.Visual.Visual) result touchManagedPtr screen return result' data ScreenGetSystemVisualMethodInfo instance (signature ~ (m Gdk.Visual.Visual), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetSystemVisualMethodInfo a signature where overloadedMethod _ = screenGetSystemVisual -- method Screen::get_toplevel_windows -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GdkScreen where the toplevels are located.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGList (TInterface (Name {namespace = "Gdk", name = "Window"}))) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_toplevel_windows" gdk_screen_get_toplevel_windows :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr (GList (Ptr Gdk.Window.Window))) {- | Obtains a list of all toplevel windows known to GDK on the screen /@screen@/. A toplevel window is a child of the root window (see 'GI.Gdk.Functions.getDefaultRootWindow'). The returned list should be freed with @/g_list_free()/@, but its elements need not be freed. @since 2.2 -} screenGetToplevelWindows :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: The 'GI.Gdk.Objects.Screen.Screen' where the toplevels are located. -} -> m [Gdk.Window.Window] {- ^ __Returns:__ list of toplevel windows, free with @/g_list_free()/@ -} screenGetToplevelWindows screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_toplevel_windows screen' result' <- unpackGList result result'' <- mapM (newObject Gdk.Window.Window) result' g_list_free result touchManagedPtr screen return result'' data ScreenGetToplevelWindowsMethodInfo instance (signature ~ (m [Gdk.Window.Window]), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetToplevelWindowsMethodInfo a signature where overloadedMethod _ = screenGetToplevelWindows -- method Screen::get_width -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_width" gdk_screen_get_width :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetWidth ["(Since version 3.22)","Use per-monitor information instead"] #-} {- | Gets the width of /@screen@/ in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). @since 2.2 -} screenGetWidth :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ the width of /@screen@/ in pixels. -} screenGetWidth screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_width screen' touchManagedPtr screen return result data ScreenGetWidthMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWidthMethodInfo a signature where overloadedMethod _ = screenGetWidth -- method Screen::get_width_mm -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_width_mm" gdk_screen_get_width_mm :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO Int32 {-# DEPRECATED screenGetWidthMm ["(Since version 3.22)","Use per-monitor information instead"] #-} {- | Gets the width of /@screen@/ in millimeters. Note that this value is somewhat ill-defined when the screen has multiple monitors of different resolution. It is recommended to use the monitor dimensions instead. @since 2.2 -} screenGetWidthMm :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Int32 {- ^ __Returns:__ the width of /@screen@/ in millimeters. -} screenGetWidthMm screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_width_mm screen' touchManagedPtr screen return result data ScreenGetWidthMmMethodInfo instance (signature ~ (m Int32), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWidthMmMethodInfo a signature where overloadedMethod _ = screenGetWidthMm -- method Screen::get_window_stack -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGList (TInterface (Name {namespace = "Gdk", name = "Window"}))) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_window_stack" gdk_screen_get_window_stack :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr (GList (Ptr Gdk.Window.Window))) {- | Returns a 'GI.GLib.Structs.List.List' of @/GdkWindows/@ representing the current window stack. On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING property on the root window, as described in the <http://www.freedesktop.org/Standards/wm-spec Extended Window Manager Hints>. If the window manager does not support the _NET_CLIENT_LIST_STACKING hint, this function returns 'Nothing'. On other platforms, this function may return 'Nothing', depending on whether it is implementable on that platform. The returned list is newly allocated and owns references to the windows it contains, so it should be freed using @/g_list_free()/@ and its windows unrefed using 'GI.GObject.Objects.Object.objectUnref' when no longer needed. @since 2.10 -} screenGetWindowStack :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m [Gdk.Window.Window] {- ^ __Returns:__ a list of @/GdkWindows/@ for the current window stack, or 'Nothing'. -} screenGetWindowStack screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_get_window_stack screen' result' <- unpackGList result result'' <- mapM (wrapObject Gdk.Window.Window) result' g_list_free result touchManagedPtr screen return result'' data ScreenGetWindowStackMethodInfo instance (signature ~ (m [Gdk.Window.Window]), MonadIO m, IsScreen a) => O.MethodInfo ScreenGetWindowStackMethodInfo a signature where overloadedMethod _ = screenGetWindowStack -- method Screen::is_composited -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_is_composited" gdk_screen_is_composited :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO CInt {- | Returns whether windows with an RGBA visual can reasonably be expected to have their alpha channel drawn correctly on the screen. On X11 this function returns whether a compositing manager is compositing /@screen@/. @since 2.10 -} screenIsComposited :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m Bool {- ^ __Returns:__ Whether windows with RGBA visuals can reasonably be expected to have their alpha channels drawn correctly on the screen. -} screenIsComposited screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_is_composited screen' let result' = (/= 0) result touchManagedPtr screen return result' data ScreenIsCompositedMethodInfo instance (signature ~ (m Bool), MonadIO m, IsScreen a) => O.MethodInfo ScreenIsCompositedMethodInfo a signature where overloadedMethod _ = screenIsComposited -- method Screen::list_visuals -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the relevant #GdkScreen.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TGList (TInterface (Name {namespace = "Gdk", name = "Visual"}))) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_list_visuals" gdk_screen_list_visuals :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO (Ptr (GList (Ptr Gdk.Visual.Visual))) {- | Lists the available visuals for the specified /@screen@/. A visual describes a hardware image data format. For example, a visual might support 24-bit color, or 8-bit color, and might expect pixels to be in a certain format. Call @/g_list_free()/@ on the return value when you’re finished with it. @since 2.2 -} screenListVisuals :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: the relevant 'GI.Gdk.Objects.Screen.Screen'. -} -> m [Gdk.Visual.Visual] {- ^ __Returns:__ a list of visuals; the list must be freed, but not its contents -} screenListVisuals screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_list_visuals screen' result' <- unpackGList result result'' <- mapM (newObject Gdk.Visual.Visual) result' g_list_free result touchManagedPtr screen return result'' data ScreenListVisualsMethodInfo instance (signature ~ (m [Gdk.Visual.Visual]), MonadIO m, IsScreen a) => O.MethodInfo ScreenListVisualsMethodInfo a signature where overloadedMethod _ = screenListVisuals -- method Screen::make_display_name -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_make_display_name" gdk_screen_make_display_name :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) IO CString {-# DEPRECATED screenMakeDisplayName ["(Since version 3.22)"] #-} {- | Determines the name to pass to 'GI.Gdk.Objects.Display.displayOpen' to get a 'GI.Gdk.Objects.Display.Display' with this screen as the default screen. @since 2.2 -} screenMakeDisplayName :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> m T.Text {- ^ __Returns:__ a newly allocated string, free with 'GI.GLib.Functions.free' -} screenMakeDisplayName screen = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen result <- gdk_screen_make_display_name screen' checkUnexpectedReturnNULL "screenMakeDisplayName" result result' <- cstringToText result freeMem result touchManagedPtr screen return result' data ScreenMakeDisplayNameMethodInfo instance (signature ~ (m T.Text), MonadIO m, IsScreen a) => O.MethodInfo ScreenMakeDisplayNameMethodInfo a signature where overloadedMethod _ = screenMakeDisplayName -- method Screen::set_font_options -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "options", argType = TInterface (Name {namespace = "cairo", name = "FontOptions"}), direction = DirectionIn, mayBeNull = True, argDoc = Documentation {rawDocText = Just "a #cairo_font_options_t, or %NULL to unset any\n previously set default font options.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gdk_screen_set_font_options" gdk_screen_set_font_options :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) Ptr Cairo.FontOptions.FontOptions -> -- options : TInterface (Name {namespace = "cairo", name = "FontOptions"}) IO () {- | Sets the default font options for the screen. These options will be set on any 'GI.Pango.Objects.Context.Context'’s newly created with 'GI.Gdk.Functions.pangoContextGetForScreen'. Changing the default set of font options does not affect contexts that have already been created. @since 2.10 -} screenSetFontOptions :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Maybe (Cairo.FontOptions.FontOptions) {- ^ /@options@/: a 'GI.Cairo.Structs.FontOptions.FontOptions', or 'Nothing' to unset any previously set default font options. -} -> m () screenSetFontOptions screen options = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen maybeOptions <- case options of Nothing -> return nullPtr Just jOptions -> do jOptions' <- unsafeManagedPtrGetPtr jOptions return jOptions' gdk_screen_set_font_options screen' maybeOptions touchManagedPtr screen whenJust options touchManagedPtr return () data ScreenSetFontOptionsMethodInfo instance (signature ~ (Maybe (Cairo.FontOptions.FontOptions) -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenSetFontOptionsMethodInfo a signature where overloadedMethod _ = screenSetFontOptions -- method Screen::set_resolution -- method type : OrdinaryMethod -- Args : [Arg {argCName = "screen", argType = TInterface (Name {namespace = "Gdk", name = "Screen"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkScreen", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dpi", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the resolution in \8220dots per inch\8221. (Physical inches aren\8217t actually\n involved; the terminology is conventional.)", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}] -- Lengths : [] -- returnType : Nothing -- throws : False -- Skip return : False foreign import ccall "gdk_screen_set_resolution" gdk_screen_set_resolution :: Ptr Screen -> -- screen : TInterface (Name {namespace = "Gdk", name = "Screen"}) CDouble -> -- dpi : TBasicType TDouble IO () {- | Sets the resolution for font handling on the screen. This is a scale factor between points specified in a 'GI.Pango.Structs.FontDescription.FontDescription' and cairo units. The default value is 96, meaning that a 10 point font will be 13 units high. (10 * 96. \/ 72. = 13.3). @since 2.10 -} screenSetResolution :: (B.CallStack.HasCallStack, MonadIO m, IsScreen a) => a {- ^ /@screen@/: a 'GI.Gdk.Objects.Screen.Screen' -} -> Double {- ^ /@dpi@/: the resolution in “dots per inch”. (Physical inches aren’t actually involved; the terminology is conventional.) -} -> m () screenSetResolution screen dpi = liftIO $ do screen' <- unsafeManagedPtrCastPtr screen let dpi' = realToFrac dpi gdk_screen_set_resolution screen' dpi' touchManagedPtr screen return () data ScreenSetResolutionMethodInfo instance (signature ~ (Double -> m ()), MonadIO m, IsScreen a) => O.MethodInfo ScreenSetResolutionMethodInfo a signature where overloadedMethod _ = screenSetResolution -- method Screen::get_default -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Screen"})) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_get_default" gdk_screen_get_default :: IO (Ptr Screen) {- | Gets the default screen for the default display. (See gdk_display_get_default ()). @since 2.2 -} screenGetDefault :: (B.CallStack.HasCallStack, MonadIO m) => m (Maybe Screen) {- ^ __Returns:__ a 'GI.Gdk.Objects.Screen.Screen', or 'Nothing' if there is no default display. -} screenGetDefault = liftIO $ do result <- gdk_screen_get_default maybeResult <- convertIfNonNull result $ \result' -> do result'' <- (newObject Screen) result' return result'' return maybeResult -- method Screen::height -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_height" gdk_screen_height :: IO Int32 {-# DEPRECATED screenHeight ["(Since version 3.22)","Use per-monitor information"] #-} {- | Gets the height of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). -} screenHeight :: (B.CallStack.HasCallStack, MonadIO m) => m Int32 {- ^ __Returns:__ the height of the default screen in pixels. -} screenHeight = liftIO $ do result <- gdk_screen_height return result -- method Screen::height_mm -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_height_mm" gdk_screen_height_mm :: IO Int32 {-# DEPRECATED screenHeightMm ["(Since version 3.22)","Use per-monitor information"] #-} {- | Returns the height of the default screen in millimeters. Note that on many X servers this value will not be correct. -} screenHeightMm :: (B.CallStack.HasCallStack, MonadIO m) => m Int32 {- ^ __Returns:__ the height of the default screen in millimeters, though it is not always correct. -} screenHeightMm = liftIO $ do result <- gdk_screen_height_mm return result -- method Screen::width -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_width" gdk_screen_width :: IO Int32 {-# DEPRECATED screenWidth ["(Since version 3.22)","Use per-monitor information"] #-} {- | Gets the width of the default screen in pixels. The returned size is in ”application pixels”, not in ”device pixels” (see 'GI.Gdk.Objects.Screen.screenGetMonitorScaleFactor'). -} screenWidth :: (B.CallStack.HasCallStack, MonadIO m) => m Int32 {- ^ __Returns:__ the width of the default screen in pixels. -} screenWidth = liftIO $ do result <- gdk_screen_width return result -- method Screen::width_mm -- method type : MemberFunction -- Args : [] -- Lengths : [] -- returnType : Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gdk_screen_width_mm" gdk_screen_width_mm :: IO Int32 {-# DEPRECATED screenWidthMm ["(Since version 3.22)","Use per-monitor information"] #-} {- | Returns the width of the default screen in millimeters. Note that on many X servers this value will not be correct. -} screenWidthMm :: (B.CallStack.HasCallStack, MonadIO m) => m Int32 {- ^ __Returns:__ the width of the default screen in millimeters, though it is not always correct. -} screenWidthMm = liftIO $ do result <- gdk_screen_width_mm return result