#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GdkX11.Objects.X11Screen
(
X11Screen(..) ,
IsX11Screen ,
toX11Screen ,
noX11Screen ,
#if ENABLE_OVERLOADING
X11ScreenGetCurrentDesktopMethodInfo ,
#endif
x11ScreenGetCurrentDesktop ,
#if ENABLE_OVERLOADING
X11ScreenGetMonitorOutputMethodInfo ,
#endif
x11ScreenGetMonitorOutput ,
#if ENABLE_OVERLOADING
X11ScreenGetNumberOfDesktopsMethodInfo ,
#endif
x11ScreenGetNumberOfDesktops ,
#if ENABLE_OVERLOADING
X11ScreenGetScreenNumberMethodInfo ,
#endif
x11ScreenGetScreenNumber ,
#if ENABLE_OVERLOADING
X11ScreenGetWindowManagerNameMethodInfo ,
#endif
x11ScreenGetWindowManagerName ,
#if ENABLE_OVERLOADING
X11ScreenGetXscreenMethodInfo ,
#endif
x11ScreenGetXscreen ,
#if ENABLE_OVERLOADING
X11ScreenLookupVisualMethodInfo ,
#endif
x11ScreenLookupVisual ,
#if ENABLE_OVERLOADING
X11ScreenSupportsNetWmHintMethodInfo ,
#endif
x11ScreenSupportsNetWmHint ,
C_X11ScreenWindowManagerChangedCallback ,
X11ScreenWindowManagerChangedCallback ,
#if ENABLE_OVERLOADING
X11ScreenWindowManagerChangedSignalInfo ,
#endif
afterX11ScreenWindowManagerChanged ,
genClosure_X11ScreenWindowManagerChanged,
mk_X11ScreenWindowManagerChangedCallback,
noX11ScreenWindowManagerChangedCallback ,
onX11ScreenWindowManagerChanged ,
wrap_X11ScreenWindowManagerChangedCallback,
) 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 qualified GI.Gdk.Objects.Screen as Gdk.Screen
import qualified GI.Gdk.Structs.Atom as Gdk.Atom
import {-# SOURCE #-} qualified GI.GdkX11.Objects.X11Visual as GdkX11.X11Visual
import qualified GI.Xlib.Structs.Screen as Xlib.Screen
newtype X11Screen = X11Screen (ManagedPtr X11Screen)
foreign import ccall "gdk_x11_screen_get_type"
c_gdk_x11_screen_get_type :: IO GType
instance GObject X11Screen where
gobjectType = c_gdk_x11_screen_get_type
class (GObject o, O.IsDescendantOf X11Screen o) => IsX11Screen o
instance (GObject o, O.IsDescendantOf X11Screen o) => IsX11Screen o
instance O.HasParentTypes X11Screen
type instance O.ParentTypes X11Screen = '[Gdk.Screen.Screen, GObject.Object.Object]
toX11Screen :: (MonadIO m, IsX11Screen o) => o -> m X11Screen
toX11Screen = liftIO . unsafeCastTo X11Screen
noX11Screen :: Maybe X11Screen
noX11Screen = Nothing
#if ENABLE_OVERLOADING
type family ResolveX11ScreenMethod (t :: Symbol) (o :: *) :: * where
ResolveX11ScreenMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveX11ScreenMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveX11ScreenMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveX11ScreenMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveX11ScreenMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveX11ScreenMethod "isComposited" o = Gdk.Screen.ScreenIsCompositedMethodInfo
ResolveX11ScreenMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveX11ScreenMethod "listVisuals" o = Gdk.Screen.ScreenListVisualsMethodInfo
ResolveX11ScreenMethod "lookupVisual" o = X11ScreenLookupVisualMethodInfo
ResolveX11ScreenMethod "makeDisplayName" o = Gdk.Screen.ScreenMakeDisplayNameMethodInfo
ResolveX11ScreenMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveX11ScreenMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveX11ScreenMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveX11ScreenMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveX11ScreenMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveX11ScreenMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveX11ScreenMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveX11ScreenMethod "supportsNetWmHint" o = X11ScreenSupportsNetWmHintMethodInfo
ResolveX11ScreenMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveX11ScreenMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveX11ScreenMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveX11ScreenMethod "getActiveWindow" o = Gdk.Screen.ScreenGetActiveWindowMethodInfo
ResolveX11ScreenMethod "getCurrentDesktop" o = X11ScreenGetCurrentDesktopMethodInfo
ResolveX11ScreenMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveX11ScreenMethod "getDisplay" o = Gdk.Screen.ScreenGetDisplayMethodInfo
ResolveX11ScreenMethod "getFontOptions" o = Gdk.Screen.ScreenGetFontOptionsMethodInfo
ResolveX11ScreenMethod "getHeight" o = Gdk.Screen.ScreenGetHeightMethodInfo
ResolveX11ScreenMethod "getHeightMm" o = Gdk.Screen.ScreenGetHeightMmMethodInfo
ResolveX11ScreenMethod "getMonitorAtPoint" o = Gdk.Screen.ScreenGetMonitorAtPointMethodInfo
ResolveX11ScreenMethod "getMonitorAtWindow" o = Gdk.Screen.ScreenGetMonitorAtWindowMethodInfo
ResolveX11ScreenMethod "getMonitorGeometry" o = Gdk.Screen.ScreenGetMonitorGeometryMethodInfo
ResolveX11ScreenMethod "getMonitorHeightMm" o = Gdk.Screen.ScreenGetMonitorHeightMmMethodInfo
ResolveX11ScreenMethod "getMonitorOutput" o = X11ScreenGetMonitorOutputMethodInfo
ResolveX11ScreenMethod "getMonitorPlugName" o = Gdk.Screen.ScreenGetMonitorPlugNameMethodInfo
ResolveX11ScreenMethod "getMonitorScaleFactor" o = Gdk.Screen.ScreenGetMonitorScaleFactorMethodInfo
ResolveX11ScreenMethod "getMonitorWidthMm" o = Gdk.Screen.ScreenGetMonitorWidthMmMethodInfo
ResolveX11ScreenMethod "getMonitorWorkarea" o = Gdk.Screen.ScreenGetMonitorWorkareaMethodInfo
ResolveX11ScreenMethod "getNMonitors" o = Gdk.Screen.ScreenGetNMonitorsMethodInfo
ResolveX11ScreenMethod "getNumber" o = Gdk.Screen.ScreenGetNumberMethodInfo
ResolveX11ScreenMethod "getNumberOfDesktops" o = X11ScreenGetNumberOfDesktopsMethodInfo
ResolveX11ScreenMethod "getPrimaryMonitor" o = Gdk.Screen.ScreenGetPrimaryMonitorMethodInfo
ResolveX11ScreenMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveX11ScreenMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveX11ScreenMethod "getResolution" o = Gdk.Screen.ScreenGetResolutionMethodInfo
ResolveX11ScreenMethod "getRgbaVisual" o = Gdk.Screen.ScreenGetRgbaVisualMethodInfo
ResolveX11ScreenMethod "getRootWindow" o = Gdk.Screen.ScreenGetRootWindowMethodInfo
ResolveX11ScreenMethod "getScreenNumber" o = X11ScreenGetScreenNumberMethodInfo
ResolveX11ScreenMethod "getSetting" o = Gdk.Screen.ScreenGetSettingMethodInfo
ResolveX11ScreenMethod "getSystemVisual" o = Gdk.Screen.ScreenGetSystemVisualMethodInfo
ResolveX11ScreenMethod "getToplevelWindows" o = Gdk.Screen.ScreenGetToplevelWindowsMethodInfo
ResolveX11ScreenMethod "getWidth" o = Gdk.Screen.ScreenGetWidthMethodInfo
ResolveX11ScreenMethod "getWidthMm" o = Gdk.Screen.ScreenGetWidthMmMethodInfo
ResolveX11ScreenMethod "getWindowManagerName" o = X11ScreenGetWindowManagerNameMethodInfo
ResolveX11ScreenMethod "getWindowStack" o = Gdk.Screen.ScreenGetWindowStackMethodInfo
ResolveX11ScreenMethod "getXscreen" o = X11ScreenGetXscreenMethodInfo
ResolveX11ScreenMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveX11ScreenMethod "setFontOptions" o = Gdk.Screen.ScreenSetFontOptionsMethodInfo
ResolveX11ScreenMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveX11ScreenMethod "setResolution" o = Gdk.Screen.ScreenSetResolutionMethodInfo
ResolveX11ScreenMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveX11ScreenMethod t X11Screen, O.MethodInfo info X11Screen p) => OL.IsLabel t (X11Screen -> 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 X11ScreenWindowManagerChangedCallback =
IO ()
noX11ScreenWindowManagerChangedCallback :: Maybe X11ScreenWindowManagerChangedCallback
noX11ScreenWindowManagerChangedCallback = Nothing
type C_X11ScreenWindowManagerChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_X11ScreenWindowManagerChangedCallback :: C_X11ScreenWindowManagerChangedCallback -> IO (FunPtr C_X11ScreenWindowManagerChangedCallback)
genClosure_X11ScreenWindowManagerChanged :: MonadIO m => X11ScreenWindowManagerChangedCallback -> m (GClosure C_X11ScreenWindowManagerChangedCallback)
genClosure_X11ScreenWindowManagerChanged cb = liftIO $ do
let cb' = wrap_X11ScreenWindowManagerChangedCallback cb
mk_X11ScreenWindowManagerChangedCallback cb' >>= B.GClosure.newGClosure
wrap_X11ScreenWindowManagerChangedCallback ::
X11ScreenWindowManagerChangedCallback ->
C_X11ScreenWindowManagerChangedCallback
wrap_X11ScreenWindowManagerChangedCallback _cb _ _ = do
_cb
onX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId
onX11ScreenWindowManagerChanged obj cb = liftIO $ do
let cb' = wrap_X11ScreenWindowManagerChangedCallback cb
cb'' <- mk_X11ScreenWindowManagerChangedCallback cb'
connectSignalFunPtr obj "window-manager-changed" cb'' SignalConnectBefore
afterX11ScreenWindowManagerChanged :: (IsX11Screen a, MonadIO m) => a -> X11ScreenWindowManagerChangedCallback -> m SignalHandlerId
afterX11ScreenWindowManagerChanged obj cb = liftIO $ do
let cb' = wrap_X11ScreenWindowManagerChangedCallback cb
cb'' <- mk_X11ScreenWindowManagerChangedCallback cb'
connectSignalFunPtr obj "window-manager-changed" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList X11Screen
type instance O.AttributeList X11Screen = X11ScreenAttributeList
type X11ScreenAttributeList = ('[ '("fontOptions", Gdk.Screen.ScreenFontOptionsPropertyInfo), '("resolution", Gdk.Screen.ScreenResolutionPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data X11ScreenWindowManagerChangedSignalInfo
instance SignalInfo X11ScreenWindowManagerChangedSignalInfo where
type HaskellCallbackType X11ScreenWindowManagerChangedSignalInfo = X11ScreenWindowManagerChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_X11ScreenWindowManagerChangedCallback cb
cb'' <- mk_X11ScreenWindowManagerChangedCallback cb'
connectSignalFunPtr obj "window-manager-changed" cb'' connectMode
type instance O.SignalList X11Screen = X11ScreenSignalList
type X11ScreenSignalList = ('[ '("compositedChanged", Gdk.Screen.ScreenCompositedChangedSignalInfo), '("monitorsChanged", Gdk.Screen.ScreenMonitorsChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("sizeChanged", Gdk.Screen.ScreenSizeChangedSignalInfo), '("windowManagerChanged", X11ScreenWindowManagerChangedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_x11_screen_get_current_desktop" gdk_x11_screen_get_current_desktop ::
Ptr X11Screen ->
IO Word32
x11ScreenGetCurrentDesktop ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> m Word32
x11ScreenGetCurrentDesktop screen = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_current_desktop screen'
touchManagedPtr screen
return result
#if ENABLE_OVERLOADING
data X11ScreenGetCurrentDesktopMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetCurrentDesktopMethodInfo a signature where
overloadedMethod _ = x11ScreenGetCurrentDesktop
#endif
foreign import ccall "gdk_x11_screen_get_monitor_output" gdk_x11_screen_get_monitor_output ::
Ptr X11Screen ->
Int32 ->
IO CULong
x11ScreenGetMonitorOutput ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> Int32
-> m CULong
x11ScreenGetMonitorOutput screen monitorNum = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_monitor_output screen' monitorNum
touchManagedPtr screen
return result
#if ENABLE_OVERLOADING
data X11ScreenGetMonitorOutputMethodInfo
instance (signature ~ (Int32 -> m CULong), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetMonitorOutputMethodInfo a signature where
overloadedMethod _ = x11ScreenGetMonitorOutput
#endif
foreign import ccall "gdk_x11_screen_get_number_of_desktops" gdk_x11_screen_get_number_of_desktops ::
Ptr X11Screen ->
IO Word32
x11ScreenGetNumberOfDesktops ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> m Word32
x11ScreenGetNumberOfDesktops screen = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_number_of_desktops screen'
touchManagedPtr screen
return result
#if ENABLE_OVERLOADING
data X11ScreenGetNumberOfDesktopsMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetNumberOfDesktopsMethodInfo a signature where
overloadedMethod _ = x11ScreenGetNumberOfDesktops
#endif
foreign import ccall "gdk_x11_screen_get_screen_number" gdk_x11_screen_get_screen_number ::
Ptr X11Screen ->
IO Int32
x11ScreenGetScreenNumber ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> m Int32
x11ScreenGetScreenNumber screen = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_screen_number screen'
touchManagedPtr screen
return result
#if ENABLE_OVERLOADING
data X11ScreenGetScreenNumberMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetScreenNumberMethodInfo a signature where
overloadedMethod _ = x11ScreenGetScreenNumber
#endif
foreign import ccall "gdk_x11_screen_get_window_manager_name" gdk_x11_screen_get_window_manager_name ::
Ptr X11Screen ->
IO CString
x11ScreenGetWindowManagerName ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> m T.Text
x11ScreenGetWindowManagerName screen = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_window_manager_name screen'
checkUnexpectedReturnNULL "x11ScreenGetWindowManagerName" result
result' <- cstringToText result
touchManagedPtr screen
return result'
#if ENABLE_OVERLOADING
data X11ScreenGetWindowManagerNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetWindowManagerNameMethodInfo a signature where
overloadedMethod _ = x11ScreenGetWindowManagerName
#endif
foreign import ccall "gdk_x11_screen_get_xscreen" gdk_x11_screen_get_xscreen ::
Ptr X11Screen ->
IO (Ptr Xlib.Screen.Screen)
x11ScreenGetXscreen ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> m Xlib.Screen.Screen
x11ScreenGetXscreen screen = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_get_xscreen screen'
checkUnexpectedReturnNULL "x11ScreenGetXscreen" result
result' <- (newPtr Xlib.Screen.Screen) result
touchManagedPtr screen
return result'
#if ENABLE_OVERLOADING
data X11ScreenGetXscreenMethodInfo
instance (signature ~ (m Xlib.Screen.Screen), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenGetXscreenMethodInfo a signature where
overloadedMethod _ = x11ScreenGetXscreen
#endif
foreign import ccall "gdk_x11_screen_lookup_visual" gdk_x11_screen_lookup_visual ::
Ptr X11Screen ->
CULong ->
IO (Ptr GdkX11.X11Visual.X11Visual)
x11ScreenLookupVisual ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> CULong
-> m GdkX11.X11Visual.X11Visual
x11ScreenLookupVisual screen xvisualid = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
result <- gdk_x11_screen_lookup_visual screen' xvisualid
checkUnexpectedReturnNULL "x11ScreenLookupVisual" result
result' <- (newObject GdkX11.X11Visual.X11Visual) result
touchManagedPtr screen
return result'
#if ENABLE_OVERLOADING
data X11ScreenLookupVisualMethodInfo
instance (signature ~ (CULong -> m GdkX11.X11Visual.X11Visual), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenLookupVisualMethodInfo a signature where
overloadedMethod _ = x11ScreenLookupVisual
#endif
foreign import ccall "gdk_x11_screen_supports_net_wm_hint" gdk_x11_screen_supports_net_wm_hint ::
Ptr X11Screen ->
Ptr Gdk.Atom.Atom ->
IO CInt
x11ScreenSupportsNetWmHint ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Screen a) =>
a
-> Gdk.Atom.Atom
-> m Bool
x11ScreenSupportsNetWmHint screen property = liftIO $ do
screen' <- unsafeManagedPtrCastPtr screen
property' <- unsafeManagedPtrGetPtr property
result <- gdk_x11_screen_supports_net_wm_hint screen' property'
let result' = (/= 0) result
touchManagedPtr screen
touchManagedPtr property
return result'
#if ENABLE_OVERLOADING
data X11ScreenSupportsNetWmHintMethodInfo
instance (signature ~ (Gdk.Atom.Atom -> m Bool), MonadIO m, IsX11Screen a) => O.MethodInfo X11ScreenSupportsNetWmHintMethodInfo a signature where
overloadedMethod _ = x11ScreenSupportsNetWmHint
#endif