#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GdkX11.Objects.X11Display
(
#if ENABLE_OVERLOADING
X11DisplayStringToCompoundTextMethodInfo,
#endif
#if ENABLE_OVERLOADING
X11DisplayUtf8ToCompoundTextMethodInfo ,
#endif
X11Display(..) ,
IsX11Display ,
toX11Display ,
noX11Display ,
#if ENABLE_OVERLOADING
X11DisplayErrorTrapPopMethodInfo ,
#endif
x11DisplayErrorTrapPop ,
#if ENABLE_OVERLOADING
X11DisplayErrorTrapPopIgnoredMethodInfo ,
#endif
x11DisplayErrorTrapPopIgnored ,
#if ENABLE_OVERLOADING
X11DisplayErrorTrapPushMethodInfo ,
#endif
x11DisplayErrorTrapPush ,
x11DisplayGetGlxVersion ,
#if ENABLE_OVERLOADING
X11DisplayGetStartupNotificationIdMethodInfo,
#endif
x11DisplayGetStartupNotificationId ,
#if ENABLE_OVERLOADING
X11DisplayGetUserTimeMethodInfo ,
#endif
x11DisplayGetUserTime ,
#if ENABLE_OVERLOADING
X11DisplayGetXdisplayMethodInfo ,
#endif
x11DisplayGetXdisplay ,
#if ENABLE_OVERLOADING
X11DisplayGrabMethodInfo ,
#endif
x11DisplayGrab ,
#if ENABLE_OVERLOADING
X11DisplaySetCursorThemeMethodInfo ,
#endif
x11DisplaySetCursorTheme ,
#if ENABLE_OVERLOADING
X11DisplaySetStartupNotificationIdMethodInfo,
#endif
x11DisplaySetStartupNotificationId ,
#if ENABLE_OVERLOADING
X11DisplaySetWindowScaleMethodInfo ,
#endif
x11DisplaySetWindowScale ,
#if ENABLE_OVERLOADING
X11DisplayTextPropertyToTextListMethodInfo,
#endif
x11DisplayTextPropertyToTextList ,
#if ENABLE_OVERLOADING
X11DisplayUngrabMethodInfo ,
#endif
x11DisplayUngrab ,
) 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.Display as Gdk.Display
import qualified GI.Gdk.Structs.Atom as Gdk.Atom
import qualified GI.Xlib.Structs.Display as Xlib.Display
newtype X11Display = X11Display (ManagedPtr X11Display)
foreign import ccall "gdk_x11_display_get_type"
c_gdk_x11_display_get_type :: IO GType
instance GObject X11Display where
gobjectType = c_gdk_x11_display_get_type
class (GObject o, O.IsDescendantOf X11Display o) => IsX11Display o
instance (GObject o, O.IsDescendantOf X11Display o) => IsX11Display o
instance O.HasParentTypes X11Display
type instance O.ParentTypes X11Display = '[Gdk.Display.Display, GObject.Object.Object]
toX11Display :: (MonadIO m, IsX11Display o) => o -> m X11Display
toX11Display = liftIO . unsafeCastTo X11Display
noX11Display :: Maybe X11Display
noX11Display = Nothing
#if ENABLE_OVERLOADING
type family ResolveX11DisplayMethod (t :: Symbol) (o :: *) :: * where
ResolveX11DisplayMethod "beep" o = Gdk.Display.DisplayBeepMethodInfo
ResolveX11DisplayMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveX11DisplayMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveX11DisplayMethod "close" o = Gdk.Display.DisplayCloseMethodInfo
ResolveX11DisplayMethod "deviceIsGrabbed" o = Gdk.Display.DisplayDeviceIsGrabbedMethodInfo
ResolveX11DisplayMethod "errorTrapPop" o = X11DisplayErrorTrapPopMethodInfo
ResolveX11DisplayMethod "errorTrapPopIgnored" o = X11DisplayErrorTrapPopIgnoredMethodInfo
ResolveX11DisplayMethod "errorTrapPush" o = X11DisplayErrorTrapPushMethodInfo
ResolveX11DisplayMethod "flush" o = Gdk.Display.DisplayFlushMethodInfo
ResolveX11DisplayMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveX11DisplayMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveX11DisplayMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveX11DisplayMethod "grab" o = X11DisplayGrabMethodInfo
ResolveX11DisplayMethod "hasPending" o = Gdk.Display.DisplayHasPendingMethodInfo
ResolveX11DisplayMethod "isClosed" o = Gdk.Display.DisplayIsClosedMethodInfo
ResolveX11DisplayMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveX11DisplayMethod "keyboardUngrab" o = Gdk.Display.DisplayKeyboardUngrabMethodInfo
ResolveX11DisplayMethod "listDevices" o = Gdk.Display.DisplayListDevicesMethodInfo
ResolveX11DisplayMethod "listSeats" o = Gdk.Display.DisplayListSeatsMethodInfo
ResolveX11DisplayMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveX11DisplayMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveX11DisplayMethod "notifyStartupComplete" o = Gdk.Display.DisplayNotifyStartupCompleteMethodInfo
ResolveX11DisplayMethod "peekEvent" o = Gdk.Display.DisplayPeekEventMethodInfo
ResolveX11DisplayMethod "pointerIsGrabbed" o = Gdk.Display.DisplayPointerIsGrabbedMethodInfo
ResolveX11DisplayMethod "pointerUngrab" o = Gdk.Display.DisplayPointerUngrabMethodInfo
ResolveX11DisplayMethod "putEvent" o = Gdk.Display.DisplayPutEventMethodInfo
ResolveX11DisplayMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveX11DisplayMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveX11DisplayMethod "requestSelectionNotification" o = Gdk.Display.DisplayRequestSelectionNotificationMethodInfo
ResolveX11DisplayMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveX11DisplayMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveX11DisplayMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveX11DisplayMethod "storeClipboard" o = Gdk.Display.DisplayStoreClipboardMethodInfo
ResolveX11DisplayMethod "stringToCompoundText" o = X11DisplayStringToCompoundTextMethodInfo
ResolveX11DisplayMethod "supportsClipboardPersistence" o = Gdk.Display.DisplaySupportsClipboardPersistenceMethodInfo
ResolveX11DisplayMethod "supportsComposite" o = Gdk.Display.DisplaySupportsCompositeMethodInfo
ResolveX11DisplayMethod "supportsCursorAlpha" o = Gdk.Display.DisplaySupportsCursorAlphaMethodInfo
ResolveX11DisplayMethod "supportsCursorColor" o = Gdk.Display.DisplaySupportsCursorColorMethodInfo
ResolveX11DisplayMethod "supportsInputShapes" o = Gdk.Display.DisplaySupportsInputShapesMethodInfo
ResolveX11DisplayMethod "supportsSelectionNotification" o = Gdk.Display.DisplaySupportsSelectionNotificationMethodInfo
ResolveX11DisplayMethod "supportsShapes" o = Gdk.Display.DisplaySupportsShapesMethodInfo
ResolveX11DisplayMethod "sync" o = Gdk.Display.DisplaySyncMethodInfo
ResolveX11DisplayMethod "textPropertyToTextList" o = X11DisplayTextPropertyToTextListMethodInfo
ResolveX11DisplayMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveX11DisplayMethod "ungrab" o = X11DisplayUngrabMethodInfo
ResolveX11DisplayMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveX11DisplayMethod "utf8ToCompoundText" o = X11DisplayUtf8ToCompoundTextMethodInfo
ResolveX11DisplayMethod "warpPointer" o = Gdk.Display.DisplayWarpPointerMethodInfo
ResolveX11DisplayMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveX11DisplayMethod "getAppLaunchContext" o = Gdk.Display.DisplayGetAppLaunchContextMethodInfo
ResolveX11DisplayMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveX11DisplayMethod "getDefaultCursorSize" o = Gdk.Display.DisplayGetDefaultCursorSizeMethodInfo
ResolveX11DisplayMethod "getDefaultGroup" o = Gdk.Display.DisplayGetDefaultGroupMethodInfo
ResolveX11DisplayMethod "getDefaultScreen" o = Gdk.Display.DisplayGetDefaultScreenMethodInfo
ResolveX11DisplayMethod "getDefaultSeat" o = Gdk.Display.DisplayGetDefaultSeatMethodInfo
ResolveX11DisplayMethod "getDeviceManager" o = Gdk.Display.DisplayGetDeviceManagerMethodInfo
ResolveX11DisplayMethod "getEvent" o = Gdk.Display.DisplayGetEventMethodInfo
ResolveX11DisplayMethod "getMaximalCursorSize" o = Gdk.Display.DisplayGetMaximalCursorSizeMethodInfo
ResolveX11DisplayMethod "getMonitor" o = Gdk.Display.DisplayGetMonitorMethodInfo
ResolveX11DisplayMethod "getMonitorAtPoint" o = Gdk.Display.DisplayGetMonitorAtPointMethodInfo
ResolveX11DisplayMethod "getMonitorAtWindow" o = Gdk.Display.DisplayGetMonitorAtWindowMethodInfo
ResolveX11DisplayMethod "getNMonitors" o = Gdk.Display.DisplayGetNMonitorsMethodInfo
ResolveX11DisplayMethod "getNScreens" o = Gdk.Display.DisplayGetNScreensMethodInfo
ResolveX11DisplayMethod "getName" o = Gdk.Display.DisplayGetNameMethodInfo
ResolveX11DisplayMethod "getPointer" o = Gdk.Display.DisplayGetPointerMethodInfo
ResolveX11DisplayMethod "getPrimaryMonitor" o = Gdk.Display.DisplayGetPrimaryMonitorMethodInfo
ResolveX11DisplayMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveX11DisplayMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveX11DisplayMethod "getScreen" o = Gdk.Display.DisplayGetScreenMethodInfo
ResolveX11DisplayMethod "getStartupNotificationId" o = X11DisplayGetStartupNotificationIdMethodInfo
ResolveX11DisplayMethod "getUserTime" o = X11DisplayGetUserTimeMethodInfo
ResolveX11DisplayMethod "getWindowAtPointer" o = Gdk.Display.DisplayGetWindowAtPointerMethodInfo
ResolveX11DisplayMethod "getXdisplay" o = X11DisplayGetXdisplayMethodInfo
ResolveX11DisplayMethod "setCursorTheme" o = X11DisplaySetCursorThemeMethodInfo
ResolveX11DisplayMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveX11DisplayMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveX11DisplayMethod "setDoubleClickDistance" o = Gdk.Display.DisplaySetDoubleClickDistanceMethodInfo
ResolveX11DisplayMethod "setDoubleClickTime" o = Gdk.Display.DisplaySetDoubleClickTimeMethodInfo
ResolveX11DisplayMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveX11DisplayMethod "setStartupNotificationId" o = X11DisplaySetStartupNotificationIdMethodInfo
ResolveX11DisplayMethod "setWindowScale" o = X11DisplaySetWindowScaleMethodInfo
ResolveX11DisplayMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveX11DisplayMethod t X11Display, O.MethodInfo info X11Display p) => OL.IsLabel t (X11Display -> 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
#if ENABLE_OVERLOADING
instance O.HasAttributeList X11Display
type instance O.AttributeList X11Display = X11DisplayAttributeList
type X11DisplayAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList X11Display = X11DisplaySignalList
type X11DisplaySignalList = ('[ '("closed", Gdk.Display.DisplayClosedSignalInfo), '("monitorAdded", Gdk.Display.DisplayMonitorAddedSignalInfo), '("monitorRemoved", Gdk.Display.DisplayMonitorRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("opened", Gdk.Display.DisplayOpenedSignalInfo), '("seatAdded", Gdk.Display.DisplaySeatAddedSignalInfo), '("seatRemoved", Gdk.Display.DisplaySeatRemovedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_x11_display_error_trap_pop" gdk_x11_display_error_trap_pop ::
Ptr X11Display ->
IO Int32
x11DisplayErrorTrapPop ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m Int32
x11DisplayErrorTrapPop display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
result <- gdk_x11_display_error_trap_pop display'
touchManagedPtr display
return result
#if ENABLE_OVERLOADING
data X11DisplayErrorTrapPopMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayErrorTrapPopMethodInfo a signature where
overloadedMethod _ = x11DisplayErrorTrapPop
#endif
foreign import ccall "gdk_x11_display_error_trap_pop_ignored" gdk_x11_display_error_trap_pop_ignored ::
Ptr X11Display ->
IO ()
x11DisplayErrorTrapPopIgnored ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m ()
x11DisplayErrorTrapPopIgnored display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
gdk_x11_display_error_trap_pop_ignored display'
touchManagedPtr display
return ()
#if ENABLE_OVERLOADING
data X11DisplayErrorTrapPopIgnoredMethodInfo
instance (signature ~ (m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayErrorTrapPopIgnoredMethodInfo a signature where
overloadedMethod _ = x11DisplayErrorTrapPopIgnored
#endif
foreign import ccall "gdk_x11_display_error_trap_push" gdk_x11_display_error_trap_push ::
Ptr X11Display ->
IO ()
x11DisplayErrorTrapPush ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m ()
x11DisplayErrorTrapPush display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
gdk_x11_display_error_trap_push display'
touchManagedPtr display
return ()
#if ENABLE_OVERLOADING
data X11DisplayErrorTrapPushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayErrorTrapPushMethodInfo a signature where
overloadedMethod _ = x11DisplayErrorTrapPush
#endif
foreign import ccall "gdk_x11_display_get_startup_notification_id" gdk_x11_display_get_startup_notification_id ::
Ptr X11Display ->
IO CString
x11DisplayGetStartupNotificationId ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m T.Text
x11DisplayGetStartupNotificationId display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
result <- gdk_x11_display_get_startup_notification_id display'
checkUnexpectedReturnNULL "x11DisplayGetStartupNotificationId" result
result' <- cstringToText result
touchManagedPtr display
return result'
#if ENABLE_OVERLOADING
data X11DisplayGetStartupNotificationIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayGetStartupNotificationIdMethodInfo a signature where
overloadedMethod _ = x11DisplayGetStartupNotificationId
#endif
foreign import ccall "gdk_x11_display_get_user_time" gdk_x11_display_get_user_time ::
Ptr X11Display ->
IO Word32
x11DisplayGetUserTime ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m Word32
x11DisplayGetUserTime display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
result <- gdk_x11_display_get_user_time display'
touchManagedPtr display
return result
#if ENABLE_OVERLOADING
data X11DisplayGetUserTimeMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayGetUserTimeMethodInfo a signature where
overloadedMethod _ = x11DisplayGetUserTime
#endif
foreign import ccall "gdk_x11_display_get_xdisplay" gdk_x11_display_get_xdisplay ::
Ptr X11Display ->
IO (Ptr Xlib.Display.Display)
x11DisplayGetXdisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m Xlib.Display.Display
x11DisplayGetXdisplay display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
result <- gdk_x11_display_get_xdisplay display'
checkUnexpectedReturnNULL "x11DisplayGetXdisplay" result
result' <- (newPtr Xlib.Display.Display) result
touchManagedPtr display
return result'
#if ENABLE_OVERLOADING
data X11DisplayGetXdisplayMethodInfo
instance (signature ~ (m Xlib.Display.Display), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayGetXdisplayMethodInfo a signature where
overloadedMethod _ = x11DisplayGetXdisplay
#endif
foreign import ccall "gdk_x11_display_grab" gdk_x11_display_grab ::
Ptr X11Display ->
IO ()
x11DisplayGrab ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m ()
x11DisplayGrab display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
gdk_x11_display_grab display'
touchManagedPtr display
return ()
#if ENABLE_OVERLOADING
data X11DisplayGrabMethodInfo
instance (signature ~ (m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayGrabMethodInfo a signature where
overloadedMethod _ = x11DisplayGrab
#endif
foreign import ccall "gdk_x11_display_set_cursor_theme" gdk_x11_display_set_cursor_theme ::
Ptr X11Display ->
CString ->
Int32 ->
IO ()
x11DisplaySetCursorTheme ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> Maybe (T.Text)
-> Int32
-> m ()
x11DisplaySetCursorTheme display theme size = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
maybeTheme <- case theme of
Nothing -> return nullPtr
Just jTheme -> do
jTheme' <- textToCString jTheme
return jTheme'
gdk_x11_display_set_cursor_theme display' maybeTheme size
touchManagedPtr display
freeMem maybeTheme
return ()
#if ENABLE_OVERLOADING
data X11DisplaySetCursorThemeMethodInfo
instance (signature ~ (Maybe (T.Text) -> Int32 -> m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplaySetCursorThemeMethodInfo a signature where
overloadedMethod _ = x11DisplaySetCursorTheme
#endif
foreign import ccall "gdk_x11_display_set_startup_notification_id" gdk_x11_display_set_startup_notification_id ::
Ptr X11Display ->
CString ->
IO ()
x11DisplaySetStartupNotificationId ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> T.Text
-> m ()
x11DisplaySetStartupNotificationId display startupId = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
startupId' <- textToCString startupId
gdk_x11_display_set_startup_notification_id display' startupId'
touchManagedPtr display
freeMem startupId'
return ()
#if ENABLE_OVERLOADING
data X11DisplaySetStartupNotificationIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplaySetStartupNotificationIdMethodInfo a signature where
overloadedMethod _ = x11DisplaySetStartupNotificationId
#endif
foreign import ccall "gdk_x11_display_set_window_scale" gdk_x11_display_set_window_scale ::
Ptr X11Display ->
Int32 ->
IO ()
x11DisplaySetWindowScale ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> Int32
-> m ()
x11DisplaySetWindowScale display scale = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
gdk_x11_display_set_window_scale display' scale
touchManagedPtr display
return ()
#if ENABLE_OVERLOADING
data X11DisplaySetWindowScaleMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplaySetWindowScaleMethodInfo a signature where
overloadedMethod _ = x11DisplaySetWindowScale
#endif
#if ENABLE_OVERLOADING
data X11DisplayStringToCompoundTextMethodInfo
instance (p ~ (), o ~ O.MethodResolutionFailed "stringToCompoundText" X11Display) => O.MethodInfo X11DisplayStringToCompoundTextMethodInfo o p where
overloadedMethod _ = undefined
#endif
foreign import ccall "gdk_x11_display_text_property_to_text_list" gdk_x11_display_text_property_to_text_list ::
Ptr X11Display ->
Ptr Gdk.Atom.Atom ->
Int32 ->
Word8 ->
Int32 ->
CString ->
IO Int32
x11DisplayTextPropertyToTextList ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> Gdk.Atom.Atom
-> Int32
-> Word8
-> Int32
-> T.Text
-> m Int32
x11DisplayTextPropertyToTextList display encoding format text length_ list = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
encoding' <- unsafeManagedPtrGetPtr encoding
list' <- textToCString list
result <- gdk_x11_display_text_property_to_text_list display' encoding' format text length_ list'
touchManagedPtr display
touchManagedPtr encoding
freeMem list'
return result
#if ENABLE_OVERLOADING
data X11DisplayTextPropertyToTextListMethodInfo
instance (signature ~ (Gdk.Atom.Atom -> Int32 -> Word8 -> Int32 -> T.Text -> m Int32), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayTextPropertyToTextListMethodInfo a signature where
overloadedMethod _ = x11DisplayTextPropertyToTextList
#endif
foreign import ccall "gdk_x11_display_ungrab" gdk_x11_display_ungrab ::
Ptr X11Display ->
IO ()
x11DisplayUngrab ::
(B.CallStack.HasCallStack, MonadIO m, IsX11Display a) =>
a
-> m ()
x11DisplayUngrab display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
gdk_x11_display_ungrab display'
touchManagedPtr display
return ()
#if ENABLE_OVERLOADING
data X11DisplayUngrabMethodInfo
instance (signature ~ (m ()), MonadIO m, IsX11Display a) => O.MethodInfo X11DisplayUngrabMethodInfo a signature where
overloadedMethod _ = x11DisplayUngrab
#endif
#if ENABLE_OVERLOADING
data X11DisplayUtf8ToCompoundTextMethodInfo
instance (p ~ (), o ~ O.MethodResolutionFailed "utf8ToCompoundText" X11Display) => O.MethodInfo X11DisplayUtf8ToCompoundTextMethodInfo o p where
overloadedMethod _ = undefined
#endif
foreign import ccall "gdk_x11_display_get_glx_version" gdk_x11_display_get_glx_version ::
Ptr Gdk.Display.Display ->
Ptr Int32 ->
Ptr Int32 ->
IO CInt
x11DisplayGetGlxVersion ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Display.IsDisplay a) =>
a
-> m ((Bool, Int32, Int32))
x11DisplayGetGlxVersion display = liftIO $ do
display' <- unsafeManagedPtrCastPtr display
major <- allocMem :: IO (Ptr Int32)
minor <- allocMem :: IO (Ptr Int32)
result <- gdk_x11_display_get_glx_version display' major minor
let result' = (/= 0) result
major' <- peek major
minor' <- peek minor
touchManagedPtr display
freeMem major
freeMem minor
return (result', major', minor')
#if ENABLE_OVERLOADING
#endif