{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.Window
(
Window(..) ,
IsWindow ,
toWindow ,
#if defined(ENABLE_OVERLOADING)
ResolveWindowMethod ,
#endif
windowAtPointer ,
#if defined(ENABLE_OVERLOADING)
WindowBeepMethodInfo ,
#endif
windowBeep ,
#if defined(ENABLE_OVERLOADING)
WindowBeginDrawFrameMethodInfo ,
#endif
windowBeginDrawFrame ,
#if defined(ENABLE_OVERLOADING)
WindowBeginMoveDragMethodInfo ,
#endif
windowBeginMoveDrag ,
#if defined(ENABLE_OVERLOADING)
WindowBeginMoveDragForDeviceMethodInfo ,
#endif
windowBeginMoveDragForDevice ,
#if defined(ENABLE_OVERLOADING)
WindowBeginPaintRectMethodInfo ,
#endif
windowBeginPaintRect ,
#if defined(ENABLE_OVERLOADING)
WindowBeginPaintRegionMethodInfo ,
#endif
windowBeginPaintRegion ,
#if defined(ENABLE_OVERLOADING)
WindowBeginResizeDragMethodInfo ,
#endif
windowBeginResizeDrag ,
#if defined(ENABLE_OVERLOADING)
WindowBeginResizeDragForDeviceMethodInfo,
#endif
windowBeginResizeDragForDevice ,
#if defined(ENABLE_OVERLOADING)
WindowConfigureFinishedMethodInfo ,
#endif
windowConfigureFinished ,
windowConstrainSize ,
#if defined(ENABLE_OVERLOADING)
WindowCoordsFromParentMethodInfo ,
#endif
windowCoordsFromParent ,
#if defined(ENABLE_OVERLOADING)
WindowCoordsToParentMethodInfo ,
#endif
windowCoordsToParent ,
#if defined(ENABLE_OVERLOADING)
WindowCreateGlContextMethodInfo ,
#endif
windowCreateGlContext ,
#if defined(ENABLE_OVERLOADING)
WindowCreateSimilarImageSurfaceMethodInfo,
#endif
windowCreateSimilarImageSurface ,
#if defined(ENABLE_OVERLOADING)
WindowCreateSimilarSurfaceMethodInfo ,
#endif
windowCreateSimilarSurface ,
#if defined(ENABLE_OVERLOADING)
WindowDeiconifyMethodInfo ,
#endif
windowDeiconify ,
#if defined(ENABLE_OVERLOADING)
WindowDestroyMethodInfo ,
#endif
windowDestroy ,
#if defined(ENABLE_OVERLOADING)
WindowDestroyNotifyMethodInfo ,
#endif
windowDestroyNotify ,
#if defined(ENABLE_OVERLOADING)
WindowEnableSynchronizedConfigureMethodInfo,
#endif
windowEnableSynchronizedConfigure ,
#if defined(ENABLE_OVERLOADING)
WindowEndDrawFrameMethodInfo ,
#endif
windowEndDrawFrame ,
#if defined(ENABLE_OVERLOADING)
WindowEndPaintMethodInfo ,
#endif
windowEndPaint ,
#if defined(ENABLE_OVERLOADING)
WindowEnsureNativeMethodInfo ,
#endif
windowEnsureNative ,
#if defined(ENABLE_OVERLOADING)
WindowFlushMethodInfo ,
#endif
windowFlush ,
#if defined(ENABLE_OVERLOADING)
WindowFocusMethodInfo ,
#endif
windowFocus ,
#if defined(ENABLE_OVERLOADING)
WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo,
#endif
windowFreezeToplevelUpdatesLibgtkOnly ,
#if defined(ENABLE_OVERLOADING)
WindowFreezeUpdatesMethodInfo ,
#endif
windowFreezeUpdates ,
#if defined(ENABLE_OVERLOADING)
WindowFullscreenMethodInfo ,
#endif
windowFullscreen ,
#if defined(ENABLE_OVERLOADING)
WindowFullscreenOnMonitorMethodInfo ,
#endif
windowFullscreenOnMonitor ,
#if defined(ENABLE_OVERLOADING)
WindowGeometryChangedMethodInfo ,
#endif
windowGeometryChanged ,
#if defined(ENABLE_OVERLOADING)
WindowGetAcceptFocusMethodInfo ,
#endif
windowGetAcceptFocus ,
#if defined(ENABLE_OVERLOADING)
WindowGetBackgroundPatternMethodInfo ,
#endif
windowGetBackgroundPattern ,
#if defined(ENABLE_OVERLOADING)
WindowGetChildrenMethodInfo ,
#endif
windowGetChildren ,
#if defined(ENABLE_OVERLOADING)
WindowGetChildrenWithUserDataMethodInfo ,
#endif
windowGetChildrenWithUserData ,
#if defined(ENABLE_OVERLOADING)
WindowGetClipRegionMethodInfo ,
#endif
windowGetClipRegion ,
#if defined(ENABLE_OVERLOADING)
WindowGetCompositedMethodInfo ,
#endif
windowGetComposited ,
#if defined(ENABLE_OVERLOADING)
WindowGetCursorMethodInfo ,
#endif
windowGetCursor ,
#if defined(ENABLE_OVERLOADING)
WindowGetDecorationsMethodInfo ,
#endif
windowGetDecorations ,
#if defined(ENABLE_OVERLOADING)
WindowGetDeviceCursorMethodInfo ,
#endif
windowGetDeviceCursor ,
#if defined(ENABLE_OVERLOADING)
WindowGetDeviceEventsMethodInfo ,
#endif
windowGetDeviceEvents ,
#if defined(ENABLE_OVERLOADING)
WindowGetDevicePositionMethodInfo ,
#endif
windowGetDevicePosition ,
#if defined(ENABLE_OVERLOADING)
WindowGetDevicePositionDoubleMethodInfo ,
#endif
windowGetDevicePositionDouble ,
#if defined(ENABLE_OVERLOADING)
WindowGetDisplayMethodInfo ,
#endif
windowGetDisplay ,
#if defined(ENABLE_OVERLOADING)
WindowGetDragProtocolMethodInfo ,
#endif
windowGetDragProtocol ,
#if defined(ENABLE_OVERLOADING)
WindowGetEffectiveParentMethodInfo ,
#endif
windowGetEffectiveParent ,
#if defined(ENABLE_OVERLOADING)
WindowGetEffectiveToplevelMethodInfo ,
#endif
windowGetEffectiveToplevel ,
#if defined(ENABLE_OVERLOADING)
WindowGetEventCompressionMethodInfo ,
#endif
windowGetEventCompression ,
#if defined(ENABLE_OVERLOADING)
WindowGetEventsMethodInfo ,
#endif
windowGetEvents ,
#if defined(ENABLE_OVERLOADING)
WindowGetFocusOnMapMethodInfo ,
#endif
windowGetFocusOnMap ,
#if defined(ENABLE_OVERLOADING)
WindowGetFrameClockMethodInfo ,
#endif
windowGetFrameClock ,
#if defined(ENABLE_OVERLOADING)
WindowGetFrameExtentsMethodInfo ,
#endif
windowGetFrameExtents ,
#if defined(ENABLE_OVERLOADING)
WindowGetFullscreenModeMethodInfo ,
#endif
windowGetFullscreenMode ,
#if defined(ENABLE_OVERLOADING)
WindowGetGeometryMethodInfo ,
#endif
windowGetGeometry ,
#if defined(ENABLE_OVERLOADING)
WindowGetGroupMethodInfo ,
#endif
windowGetGroup ,
#if defined(ENABLE_OVERLOADING)
WindowGetHeightMethodInfo ,
#endif
windowGetHeight ,
#if defined(ENABLE_OVERLOADING)
WindowGetModalHintMethodInfo ,
#endif
windowGetModalHint ,
#if defined(ENABLE_OVERLOADING)
WindowGetOriginMethodInfo ,
#endif
windowGetOrigin ,
#if defined(ENABLE_OVERLOADING)
WindowGetParentMethodInfo ,
#endif
windowGetParent ,
#if defined(ENABLE_OVERLOADING)
WindowGetPassThroughMethodInfo ,
#endif
windowGetPassThrough ,
#if defined(ENABLE_OVERLOADING)
WindowGetPointerMethodInfo ,
#endif
windowGetPointer ,
#if defined(ENABLE_OVERLOADING)
WindowGetPositionMethodInfo ,
#endif
windowGetPosition ,
#if defined(ENABLE_OVERLOADING)
WindowGetRootCoordsMethodInfo ,
#endif
windowGetRootCoords ,
#if defined(ENABLE_OVERLOADING)
WindowGetRootOriginMethodInfo ,
#endif
windowGetRootOrigin ,
#if defined(ENABLE_OVERLOADING)
WindowGetScaleFactorMethodInfo ,
#endif
windowGetScaleFactor ,
#if defined(ENABLE_OVERLOADING)
WindowGetScreenMethodInfo ,
#endif
windowGetScreen ,
#if defined(ENABLE_OVERLOADING)
WindowGetSourceEventsMethodInfo ,
#endif
windowGetSourceEvents ,
#if defined(ENABLE_OVERLOADING)
WindowGetStateMethodInfo ,
#endif
windowGetState ,
#if defined(ENABLE_OVERLOADING)
WindowGetSupportMultideviceMethodInfo ,
#endif
windowGetSupportMultidevice ,
#if defined(ENABLE_OVERLOADING)
WindowGetToplevelMethodInfo ,
#endif
windowGetToplevel ,
#if defined(ENABLE_OVERLOADING)
WindowGetTypeHintMethodInfo ,
#endif
windowGetTypeHint ,
#if defined(ENABLE_OVERLOADING)
WindowGetUpdateAreaMethodInfo ,
#endif
windowGetUpdateArea ,
#if defined(ENABLE_OVERLOADING)
WindowGetUserDataMethodInfo ,
#endif
windowGetUserData ,
#if defined(ENABLE_OVERLOADING)
WindowGetVisibleRegionMethodInfo ,
#endif
windowGetVisibleRegion ,
#if defined(ENABLE_OVERLOADING)
WindowGetVisualMethodInfo ,
#endif
windowGetVisual ,
#if defined(ENABLE_OVERLOADING)
WindowGetWidthMethodInfo ,
#endif
windowGetWidth ,
#if defined(ENABLE_OVERLOADING)
WindowGetWindowTypeMethodInfo ,
#endif
windowGetWindowType ,
#if defined(ENABLE_OVERLOADING)
WindowHasNativeMethodInfo ,
#endif
windowHasNative ,
#if defined(ENABLE_OVERLOADING)
WindowHideMethodInfo ,
#endif
windowHide ,
#if defined(ENABLE_OVERLOADING)
WindowIconifyMethodInfo ,
#endif
windowIconify ,
#if defined(ENABLE_OVERLOADING)
WindowInputShapeCombineRegionMethodInfo ,
#endif
windowInputShapeCombineRegion ,
#if defined(ENABLE_OVERLOADING)
WindowInvalidateMaybeRecurseMethodInfo ,
#endif
windowInvalidateMaybeRecurse ,
#if defined(ENABLE_OVERLOADING)
WindowInvalidateRectMethodInfo ,
#endif
windowInvalidateRect ,
#if defined(ENABLE_OVERLOADING)
WindowInvalidateRegionMethodInfo ,
#endif
windowInvalidateRegion ,
#if defined(ENABLE_OVERLOADING)
WindowIsDestroyedMethodInfo ,
#endif
windowIsDestroyed ,
#if defined(ENABLE_OVERLOADING)
WindowIsInputOnlyMethodInfo ,
#endif
windowIsInputOnly ,
#if defined(ENABLE_OVERLOADING)
WindowIsShapedMethodInfo ,
#endif
windowIsShaped ,
#if defined(ENABLE_OVERLOADING)
WindowIsViewableMethodInfo ,
#endif
windowIsViewable ,
#if defined(ENABLE_OVERLOADING)
WindowIsVisibleMethodInfo ,
#endif
windowIsVisible ,
#if defined(ENABLE_OVERLOADING)
WindowLowerMethodInfo ,
#endif
windowLower ,
#if defined(ENABLE_OVERLOADING)
WindowMarkPaintFromClipMethodInfo ,
#endif
windowMarkPaintFromClip ,
#if defined(ENABLE_OVERLOADING)
WindowMaximizeMethodInfo ,
#endif
windowMaximize ,
#if defined(ENABLE_OVERLOADING)
WindowMergeChildInputShapesMethodInfo ,
#endif
windowMergeChildInputShapes ,
#if defined(ENABLE_OVERLOADING)
WindowMergeChildShapesMethodInfo ,
#endif
windowMergeChildShapes ,
#if defined(ENABLE_OVERLOADING)
WindowMoveMethodInfo ,
#endif
windowMove ,
#if defined(ENABLE_OVERLOADING)
WindowMoveRegionMethodInfo ,
#endif
windowMoveRegion ,
#if defined(ENABLE_OVERLOADING)
WindowMoveResizeMethodInfo ,
#endif
windowMoveResize ,
#if defined(ENABLE_OVERLOADING)
WindowMoveToRectMethodInfo ,
#endif
windowMoveToRect ,
windowNew ,
#if defined(ENABLE_OVERLOADING)
WindowPeekChildrenMethodInfo ,
#endif
windowPeekChildren ,
windowProcessAllUpdates ,
#if defined(ENABLE_OVERLOADING)
WindowProcessUpdatesMethodInfo ,
#endif
windowProcessUpdates ,
#if defined(ENABLE_OVERLOADING)
WindowRaiseMethodInfo ,
#endif
windowRaise ,
#if defined(ENABLE_OVERLOADING)
WindowRegisterDndMethodInfo ,
#endif
windowRegisterDnd ,
#if defined(ENABLE_OVERLOADING)
WindowReparentMethodInfo ,
#endif
windowReparent ,
#if defined(ENABLE_OVERLOADING)
WindowResizeMethodInfo ,
#endif
windowResize ,
#if defined(ENABLE_OVERLOADING)
WindowRestackMethodInfo ,
#endif
windowRestack ,
#if defined(ENABLE_OVERLOADING)
WindowScrollMethodInfo ,
#endif
windowScroll ,
#if defined(ENABLE_OVERLOADING)
WindowSetAcceptFocusMethodInfo ,
#endif
windowSetAcceptFocus ,
#if defined(ENABLE_OVERLOADING)
WindowSetBackgroundMethodInfo ,
#endif
windowSetBackground ,
#if defined(ENABLE_OVERLOADING)
WindowSetBackgroundPatternMethodInfo ,
#endif
windowSetBackgroundPattern ,
#if defined(ENABLE_OVERLOADING)
WindowSetBackgroundRgbaMethodInfo ,
#endif
windowSetBackgroundRgba ,
#if defined(ENABLE_OVERLOADING)
WindowSetChildInputShapesMethodInfo ,
#endif
windowSetChildInputShapes ,
#if defined(ENABLE_OVERLOADING)
WindowSetChildShapesMethodInfo ,
#endif
windowSetChildShapes ,
#if defined(ENABLE_OVERLOADING)
WindowSetCompositedMethodInfo ,
#endif
windowSetComposited ,
#if defined(ENABLE_OVERLOADING)
WindowSetCursorMethodInfo ,
#endif
windowSetCursor ,
windowSetDebugUpdates ,
#if defined(ENABLE_OVERLOADING)
WindowSetDecorationsMethodInfo ,
#endif
windowSetDecorations ,
#if defined(ENABLE_OVERLOADING)
WindowSetDeviceCursorMethodInfo ,
#endif
windowSetDeviceCursor ,
#if defined(ENABLE_OVERLOADING)
WindowSetDeviceEventsMethodInfo ,
#endif
windowSetDeviceEvents ,
#if defined(ENABLE_OVERLOADING)
WindowSetEventCompressionMethodInfo ,
#endif
windowSetEventCompression ,
#if defined(ENABLE_OVERLOADING)
WindowSetEventsMethodInfo ,
#endif
windowSetEvents ,
#if defined(ENABLE_OVERLOADING)
WindowSetFocusOnMapMethodInfo ,
#endif
windowSetFocusOnMap ,
#if defined(ENABLE_OVERLOADING)
WindowSetFullscreenModeMethodInfo ,
#endif
windowSetFullscreenMode ,
#if defined(ENABLE_OVERLOADING)
WindowSetFunctionsMethodInfo ,
#endif
windowSetFunctions ,
#if defined(ENABLE_OVERLOADING)
WindowSetGeometryHintsMethodInfo ,
#endif
windowSetGeometryHints ,
#if defined(ENABLE_OVERLOADING)
WindowSetGroupMethodInfo ,
#endif
windowSetGroup ,
#if defined(ENABLE_OVERLOADING)
WindowSetIconListMethodInfo ,
#endif
windowSetIconList ,
#if defined(ENABLE_OVERLOADING)
WindowSetIconNameMethodInfo ,
#endif
windowSetIconName ,
#if defined(ENABLE_OVERLOADING)
WindowSetKeepAboveMethodInfo ,
#endif
windowSetKeepAbove ,
#if defined(ENABLE_OVERLOADING)
WindowSetKeepBelowMethodInfo ,
#endif
windowSetKeepBelow ,
#if defined(ENABLE_OVERLOADING)
WindowSetModalHintMethodInfo ,
#endif
windowSetModalHint ,
#if defined(ENABLE_OVERLOADING)
WindowSetOpacityMethodInfo ,
#endif
windowSetOpacity ,
#if defined(ENABLE_OVERLOADING)
WindowSetOpaqueRegionMethodInfo ,
#endif
windowSetOpaqueRegion ,
#if defined(ENABLE_OVERLOADING)
WindowSetOverrideRedirectMethodInfo ,
#endif
windowSetOverrideRedirect ,
#if defined(ENABLE_OVERLOADING)
WindowSetPassThroughMethodInfo ,
#endif
windowSetPassThrough ,
#if defined(ENABLE_OVERLOADING)
WindowSetRoleMethodInfo ,
#endif
windowSetRole ,
#if defined(ENABLE_OVERLOADING)
WindowSetShadowWidthMethodInfo ,
#endif
windowSetShadowWidth ,
#if defined(ENABLE_OVERLOADING)
WindowSetSkipPagerHintMethodInfo ,
#endif
windowSetSkipPagerHint ,
#if defined(ENABLE_OVERLOADING)
WindowSetSkipTaskbarHintMethodInfo ,
#endif
windowSetSkipTaskbarHint ,
#if defined(ENABLE_OVERLOADING)
WindowSetSourceEventsMethodInfo ,
#endif
windowSetSourceEvents ,
#if defined(ENABLE_OVERLOADING)
WindowSetStartupIdMethodInfo ,
#endif
windowSetStartupId ,
#if defined(ENABLE_OVERLOADING)
WindowSetStaticGravitiesMethodInfo ,
#endif
windowSetStaticGravities ,
#if defined(ENABLE_OVERLOADING)
WindowSetSupportMultideviceMethodInfo ,
#endif
windowSetSupportMultidevice ,
#if defined(ENABLE_OVERLOADING)
WindowSetTitleMethodInfo ,
#endif
windowSetTitle ,
#if defined(ENABLE_OVERLOADING)
WindowSetTransientForMethodInfo ,
#endif
windowSetTransientFor ,
#if defined(ENABLE_OVERLOADING)
WindowSetTypeHintMethodInfo ,
#endif
windowSetTypeHint ,
#if defined(ENABLE_OVERLOADING)
WindowSetUrgencyHintMethodInfo ,
#endif
windowSetUrgencyHint ,
#if defined(ENABLE_OVERLOADING)
WindowSetUserDataMethodInfo ,
#endif
windowSetUserData ,
#if defined(ENABLE_OVERLOADING)
WindowShapeCombineRegionMethodInfo ,
#endif
windowShapeCombineRegion ,
#if defined(ENABLE_OVERLOADING)
WindowShowMethodInfo ,
#endif
windowShow ,
#if defined(ENABLE_OVERLOADING)
WindowShowUnraisedMethodInfo ,
#endif
windowShowUnraised ,
#if defined(ENABLE_OVERLOADING)
WindowShowWindowMenuMethodInfo ,
#endif
windowShowWindowMenu ,
#if defined(ENABLE_OVERLOADING)
WindowStickMethodInfo ,
#endif
windowStick ,
#if defined(ENABLE_OVERLOADING)
WindowThawToplevelUpdatesLibgtkOnlyMethodInfo,
#endif
windowThawToplevelUpdatesLibgtkOnly ,
#if defined(ENABLE_OVERLOADING)
WindowThawUpdatesMethodInfo ,
#endif
windowThawUpdates ,
#if defined(ENABLE_OVERLOADING)
WindowUnfullscreenMethodInfo ,
#endif
windowUnfullscreen ,
#if defined(ENABLE_OVERLOADING)
WindowUnmaximizeMethodInfo ,
#endif
windowUnmaximize ,
#if defined(ENABLE_OVERLOADING)
WindowUnstickMethodInfo ,
#endif
windowUnstick ,
#if defined(ENABLE_OVERLOADING)
WindowWithdrawMethodInfo ,
#endif
windowWithdraw ,
#if defined(ENABLE_OVERLOADING)
WindowCursorPropertyInfo ,
#endif
clearWindowCursor ,
constructWindowCursor ,
getWindowCursor ,
setWindowCursor ,
#if defined(ENABLE_OVERLOADING)
windowCursor ,
#endif
C_WindowCreateSurfaceCallback ,
WindowCreateSurfaceCallback ,
#if defined(ENABLE_OVERLOADING)
WindowCreateSurfaceSignalInfo ,
#endif
afterWindowCreateSurface ,
genClosure_WindowCreateSurface ,
mk_WindowCreateSurfaceCallback ,
noWindowCreateSurfaceCallback ,
onWindowCreateSurface ,
wrap_WindowCreateSurfaceCallback ,
C_WindowFromEmbedderCallback ,
WindowFromEmbedderCallback ,
#if defined(ENABLE_OVERLOADING)
WindowFromEmbedderSignalInfo ,
#endif
afterWindowFromEmbedder ,
genClosure_WindowFromEmbedder ,
mk_WindowFromEmbedderCallback ,
noWindowFromEmbedderCallback ,
onWindowFromEmbedder ,
wrap_WindowFromEmbedderCallback ,
C_WindowMovedToRectCallback ,
WindowMovedToRectCallback ,
#if defined(ENABLE_OVERLOADING)
WindowMovedToRectSignalInfo ,
#endif
afterWindowMovedToRect ,
genClosure_WindowMovedToRect ,
mk_WindowMovedToRectCallback ,
noWindowMovedToRectCallback ,
onWindowMovedToRect ,
wrap_WindowMovedToRectCallback ,
C_WindowPickEmbeddedChildCallback ,
WindowPickEmbeddedChildCallback ,
#if defined(ENABLE_OVERLOADING)
WindowPickEmbeddedChildSignalInfo ,
#endif
afterWindowPickEmbeddedChild ,
genClosure_WindowPickEmbeddedChild ,
mk_WindowPickEmbeddedChildCallback ,
noWindowPickEmbeddedChildCallback ,
onWindowPickEmbeddedChild ,
wrap_WindowPickEmbeddedChildCallback ,
C_WindowToEmbedderCallback ,
WindowToEmbedderCallback ,
#if defined(ENABLE_OVERLOADING)
WindowToEmbedderSignalInfo ,
#endif
afterWindowToEmbedder ,
genClosure_WindowToEmbedder ,
mk_WindowToEmbedderCallback ,
noWindowToEmbedderCallback ,
onWindowToEmbedder ,
wrap_WindowToEmbedderCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.Cairo.Enums as Cairo.Enums
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.Pattern as Cairo.Pattern
import qualified GI.Cairo.Structs.Region as Cairo.Region
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Callbacks as Gdk.Callbacks
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Display as Gdk.Display
import {-# SOURCE #-} qualified GI.Gdk.Objects.DrawingContext as Gdk.DrawingContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import {-# SOURCE #-} qualified GI.Gdk.Objects.GLContext as Gdk.GLContext
import {-# SOURCE #-} qualified GI.Gdk.Objects.Screen as Gdk.Screen
import {-# SOURCE #-} qualified GI.Gdk.Objects.Visual as Gdk.Visual
import {-# SOURCE #-} qualified GI.Gdk.Structs.Color as Gdk.Color
import {-# SOURCE #-} qualified GI.Gdk.Structs.Geometry as Gdk.Geometry
import {-# SOURCE #-} qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import {-# SOURCE #-} qualified GI.Gdk.Structs.WindowAttr as Gdk.WindowAttr
import {-# SOURCE #-} qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
newtype Window = Window (SP.ManagedPtr Window)
deriving (Window -> Window -> Bool
(Window -> Window -> Bool)
-> (Window -> Window -> Bool) -> Eq Window
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Window -> Window -> Bool
$c/= :: Window -> Window -> Bool
== :: Window -> Window -> Bool
$c== :: Window -> Window -> Bool
Eq)
instance SP.ManagedPtrNewtype Window where
toManagedPtr :: Window -> ManagedPtr Window
toManagedPtr (Window ManagedPtr Window
p) = ManagedPtr Window
p
foreign import ccall "gdk_window_get_type"
c_gdk_window_get_type :: IO B.Types.GType
instance B.Types.TypedObject Window where
glibType :: IO GType
glibType = IO GType
c_gdk_window_get_type
instance B.Types.GObject Window
instance B.GValue.IsGValue Window where
toGValue :: Window -> IO GValue
toGValue Window
o = do
GType
gtype <- IO GType
c_gdk_window_get_type
Window -> (Ptr Window -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Window
o (GType -> (GValue -> Ptr Window -> IO ()) -> Ptr Window -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Window -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Window
fromGValue GValue
gv = do
Ptr Window
ptr <- GValue -> IO (Ptr Window)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Window)
(ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Window -> Window
Window Ptr Window
ptr
class (SP.GObject o, O.IsDescendantOf Window o) => IsWindow o
instance (SP.GObject o, O.IsDescendantOf Window o) => IsWindow o
instance O.HasParentTypes Window
type instance O.ParentTypes Window = '[GObject.Object.Object]
toWindow :: (MonadIO m, IsWindow o) => o -> m Window
toWindow :: o -> m Window
toWindow = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> (o -> IO Window) -> o -> m Window
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Window -> Window) -> o -> IO Window
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Window -> Window
Window
#if defined(ENABLE_OVERLOADING)
type family ResolveWindowMethod (t :: Symbol) (o :: *) :: * where
ResolveWindowMethod "beep" o = WindowBeepMethodInfo
ResolveWindowMethod "beginDrawFrame" o = WindowBeginDrawFrameMethodInfo
ResolveWindowMethod "beginMoveDrag" o = WindowBeginMoveDragMethodInfo
ResolveWindowMethod "beginMoveDragForDevice" o = WindowBeginMoveDragForDeviceMethodInfo
ResolveWindowMethod "beginPaintRect" o = WindowBeginPaintRectMethodInfo
ResolveWindowMethod "beginPaintRegion" o = WindowBeginPaintRegionMethodInfo
ResolveWindowMethod "beginResizeDrag" o = WindowBeginResizeDragMethodInfo
ResolveWindowMethod "beginResizeDragForDevice" o = WindowBeginResizeDragForDeviceMethodInfo
ResolveWindowMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWindowMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWindowMethod "configureFinished" o = WindowConfigureFinishedMethodInfo
ResolveWindowMethod "coordsFromParent" o = WindowCoordsFromParentMethodInfo
ResolveWindowMethod "coordsToParent" o = WindowCoordsToParentMethodInfo
ResolveWindowMethod "createGlContext" o = WindowCreateGlContextMethodInfo
ResolveWindowMethod "createSimilarImageSurface" o = WindowCreateSimilarImageSurfaceMethodInfo
ResolveWindowMethod "createSimilarSurface" o = WindowCreateSimilarSurfaceMethodInfo
ResolveWindowMethod "deiconify" o = WindowDeiconifyMethodInfo
ResolveWindowMethod "destroy" o = WindowDestroyMethodInfo
ResolveWindowMethod "destroyNotify" o = WindowDestroyNotifyMethodInfo
ResolveWindowMethod "enableSynchronizedConfigure" o = WindowEnableSynchronizedConfigureMethodInfo
ResolveWindowMethod "endDrawFrame" o = WindowEndDrawFrameMethodInfo
ResolveWindowMethod "endPaint" o = WindowEndPaintMethodInfo
ResolveWindowMethod "ensureNative" o = WindowEnsureNativeMethodInfo
ResolveWindowMethod "flush" o = WindowFlushMethodInfo
ResolveWindowMethod "focus" o = WindowFocusMethodInfo
ResolveWindowMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWindowMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWindowMethod "freezeToplevelUpdatesLibgtkOnly" o = WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo
ResolveWindowMethod "freezeUpdates" o = WindowFreezeUpdatesMethodInfo
ResolveWindowMethod "fullscreen" o = WindowFullscreenMethodInfo
ResolveWindowMethod "fullscreenOnMonitor" o = WindowFullscreenOnMonitorMethodInfo
ResolveWindowMethod "geometryChanged" o = WindowGeometryChangedMethodInfo
ResolveWindowMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWindowMethod "hasNative" o = WindowHasNativeMethodInfo
ResolveWindowMethod "hide" o = WindowHideMethodInfo
ResolveWindowMethod "iconify" o = WindowIconifyMethodInfo
ResolveWindowMethod "inputShapeCombineRegion" o = WindowInputShapeCombineRegionMethodInfo
ResolveWindowMethod "invalidateMaybeRecurse" o = WindowInvalidateMaybeRecurseMethodInfo
ResolveWindowMethod "invalidateRect" o = WindowInvalidateRectMethodInfo
ResolveWindowMethod "invalidateRegion" o = WindowInvalidateRegionMethodInfo
ResolveWindowMethod "isDestroyed" o = WindowIsDestroyedMethodInfo
ResolveWindowMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWindowMethod "isInputOnly" o = WindowIsInputOnlyMethodInfo
ResolveWindowMethod "isShaped" o = WindowIsShapedMethodInfo
ResolveWindowMethod "isViewable" o = WindowIsViewableMethodInfo
ResolveWindowMethod "isVisible" o = WindowIsVisibleMethodInfo
ResolveWindowMethod "lower" o = WindowLowerMethodInfo
ResolveWindowMethod "markPaintFromClip" o = WindowMarkPaintFromClipMethodInfo
ResolveWindowMethod "maximize" o = WindowMaximizeMethodInfo
ResolveWindowMethod "mergeChildInputShapes" o = WindowMergeChildInputShapesMethodInfo
ResolveWindowMethod "mergeChildShapes" o = WindowMergeChildShapesMethodInfo
ResolveWindowMethod "move" o = WindowMoveMethodInfo
ResolveWindowMethod "moveRegion" o = WindowMoveRegionMethodInfo
ResolveWindowMethod "moveResize" o = WindowMoveResizeMethodInfo
ResolveWindowMethod "moveToRect" o = WindowMoveToRectMethodInfo
ResolveWindowMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWindowMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWindowMethod "peekChildren" o = WindowPeekChildrenMethodInfo
ResolveWindowMethod "processUpdates" o = WindowProcessUpdatesMethodInfo
ResolveWindowMethod "raise" o = WindowRaiseMethodInfo
ResolveWindowMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWindowMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWindowMethod "registerDnd" o = WindowRegisterDndMethodInfo
ResolveWindowMethod "reparent" o = WindowReparentMethodInfo
ResolveWindowMethod "resize" o = WindowResizeMethodInfo
ResolveWindowMethod "restack" o = WindowRestackMethodInfo
ResolveWindowMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWindowMethod "scroll" o = WindowScrollMethodInfo
ResolveWindowMethod "shapeCombineRegion" o = WindowShapeCombineRegionMethodInfo
ResolveWindowMethod "show" o = WindowShowMethodInfo
ResolveWindowMethod "showUnraised" o = WindowShowUnraisedMethodInfo
ResolveWindowMethod "showWindowMenu" o = WindowShowWindowMenuMethodInfo
ResolveWindowMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWindowMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWindowMethod "stick" o = WindowStickMethodInfo
ResolveWindowMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWindowMethod "thawToplevelUpdatesLibgtkOnly" o = WindowThawToplevelUpdatesLibgtkOnlyMethodInfo
ResolveWindowMethod "thawUpdates" o = WindowThawUpdatesMethodInfo
ResolveWindowMethod "unfullscreen" o = WindowUnfullscreenMethodInfo
ResolveWindowMethod "unmaximize" o = WindowUnmaximizeMethodInfo
ResolveWindowMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWindowMethod "unstick" o = WindowUnstickMethodInfo
ResolveWindowMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWindowMethod "withdraw" o = WindowWithdrawMethodInfo
ResolveWindowMethod "getAcceptFocus" o = WindowGetAcceptFocusMethodInfo
ResolveWindowMethod "getBackgroundPattern" o = WindowGetBackgroundPatternMethodInfo
ResolveWindowMethod "getChildren" o = WindowGetChildrenMethodInfo
ResolveWindowMethod "getChildrenWithUserData" o = WindowGetChildrenWithUserDataMethodInfo
ResolveWindowMethod "getClipRegion" o = WindowGetClipRegionMethodInfo
ResolveWindowMethod "getComposited" o = WindowGetCompositedMethodInfo
ResolveWindowMethod "getCursor" o = WindowGetCursorMethodInfo
ResolveWindowMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWindowMethod "getDecorations" o = WindowGetDecorationsMethodInfo
ResolveWindowMethod "getDeviceCursor" o = WindowGetDeviceCursorMethodInfo
ResolveWindowMethod "getDeviceEvents" o = WindowGetDeviceEventsMethodInfo
ResolveWindowMethod "getDevicePosition" o = WindowGetDevicePositionMethodInfo
ResolveWindowMethod "getDevicePositionDouble" o = WindowGetDevicePositionDoubleMethodInfo
ResolveWindowMethod "getDisplay" o = WindowGetDisplayMethodInfo
ResolveWindowMethod "getDragProtocol" o = WindowGetDragProtocolMethodInfo
ResolveWindowMethod "getEffectiveParent" o = WindowGetEffectiveParentMethodInfo
ResolveWindowMethod "getEffectiveToplevel" o = WindowGetEffectiveToplevelMethodInfo
ResolveWindowMethod "getEventCompression" o = WindowGetEventCompressionMethodInfo
ResolveWindowMethod "getEvents" o = WindowGetEventsMethodInfo
ResolveWindowMethod "getFocusOnMap" o = WindowGetFocusOnMapMethodInfo
ResolveWindowMethod "getFrameClock" o = WindowGetFrameClockMethodInfo
ResolveWindowMethod "getFrameExtents" o = WindowGetFrameExtentsMethodInfo
ResolveWindowMethod "getFullscreenMode" o = WindowGetFullscreenModeMethodInfo
ResolveWindowMethod "getGeometry" o = WindowGetGeometryMethodInfo
ResolveWindowMethod "getGroup" o = WindowGetGroupMethodInfo
ResolveWindowMethod "getHeight" o = WindowGetHeightMethodInfo
ResolveWindowMethod "getModalHint" o = WindowGetModalHintMethodInfo
ResolveWindowMethod "getOrigin" o = WindowGetOriginMethodInfo
ResolveWindowMethod "getParent" o = WindowGetParentMethodInfo
ResolveWindowMethod "getPassThrough" o = WindowGetPassThroughMethodInfo
ResolveWindowMethod "getPointer" o = WindowGetPointerMethodInfo
ResolveWindowMethod "getPosition" o = WindowGetPositionMethodInfo
ResolveWindowMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWindowMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWindowMethod "getRootCoords" o = WindowGetRootCoordsMethodInfo
ResolveWindowMethod "getRootOrigin" o = WindowGetRootOriginMethodInfo
ResolveWindowMethod "getScaleFactor" o = WindowGetScaleFactorMethodInfo
ResolveWindowMethod "getScreen" o = WindowGetScreenMethodInfo
ResolveWindowMethod "getSourceEvents" o = WindowGetSourceEventsMethodInfo
ResolveWindowMethod "getState" o = WindowGetStateMethodInfo
ResolveWindowMethod "getSupportMultidevice" o = WindowGetSupportMultideviceMethodInfo
ResolveWindowMethod "getToplevel" o = WindowGetToplevelMethodInfo
ResolveWindowMethod "getTypeHint" o = WindowGetTypeHintMethodInfo
ResolveWindowMethod "getUpdateArea" o = WindowGetUpdateAreaMethodInfo
ResolveWindowMethod "getUserData" o = WindowGetUserDataMethodInfo
ResolveWindowMethod "getVisibleRegion" o = WindowGetVisibleRegionMethodInfo
ResolveWindowMethod "getVisual" o = WindowGetVisualMethodInfo
ResolveWindowMethod "getWidth" o = WindowGetWidthMethodInfo
ResolveWindowMethod "getWindowType" o = WindowGetWindowTypeMethodInfo
ResolveWindowMethod "setAcceptFocus" o = WindowSetAcceptFocusMethodInfo
ResolveWindowMethod "setBackground" o = WindowSetBackgroundMethodInfo
ResolveWindowMethod "setBackgroundPattern" o = WindowSetBackgroundPatternMethodInfo
ResolveWindowMethod "setBackgroundRgba" o = WindowSetBackgroundRgbaMethodInfo
ResolveWindowMethod "setChildInputShapes" o = WindowSetChildInputShapesMethodInfo
ResolveWindowMethod "setChildShapes" o = WindowSetChildShapesMethodInfo
ResolveWindowMethod "setComposited" o = WindowSetCompositedMethodInfo
ResolveWindowMethod "setCursor" o = WindowSetCursorMethodInfo
ResolveWindowMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWindowMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWindowMethod "setDecorations" o = WindowSetDecorationsMethodInfo
ResolveWindowMethod "setDeviceCursor" o = WindowSetDeviceCursorMethodInfo
ResolveWindowMethod "setDeviceEvents" o = WindowSetDeviceEventsMethodInfo
ResolveWindowMethod "setEventCompression" o = WindowSetEventCompressionMethodInfo
ResolveWindowMethod "setEvents" o = WindowSetEventsMethodInfo
ResolveWindowMethod "setFocusOnMap" o = WindowSetFocusOnMapMethodInfo
ResolveWindowMethod "setFullscreenMode" o = WindowSetFullscreenModeMethodInfo
ResolveWindowMethod "setFunctions" o = WindowSetFunctionsMethodInfo
ResolveWindowMethod "setGeometryHints" o = WindowSetGeometryHintsMethodInfo
ResolveWindowMethod "setGroup" o = WindowSetGroupMethodInfo
ResolveWindowMethod "setIconList" o = WindowSetIconListMethodInfo
ResolveWindowMethod "setIconName" o = WindowSetIconNameMethodInfo
ResolveWindowMethod "setKeepAbove" o = WindowSetKeepAboveMethodInfo
ResolveWindowMethod "setKeepBelow" o = WindowSetKeepBelowMethodInfo
ResolveWindowMethod "setModalHint" o = WindowSetModalHintMethodInfo
ResolveWindowMethod "setOpacity" o = WindowSetOpacityMethodInfo
ResolveWindowMethod "setOpaqueRegion" o = WindowSetOpaqueRegionMethodInfo
ResolveWindowMethod "setOverrideRedirect" o = WindowSetOverrideRedirectMethodInfo
ResolveWindowMethod "setPassThrough" o = WindowSetPassThroughMethodInfo
ResolveWindowMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWindowMethod "setRole" o = WindowSetRoleMethodInfo
ResolveWindowMethod "setShadowWidth" o = WindowSetShadowWidthMethodInfo
ResolveWindowMethod "setSkipPagerHint" o = WindowSetSkipPagerHintMethodInfo
ResolveWindowMethod "setSkipTaskbarHint" o = WindowSetSkipTaskbarHintMethodInfo
ResolveWindowMethod "setSourceEvents" o = WindowSetSourceEventsMethodInfo
ResolveWindowMethod "setStartupId" o = WindowSetStartupIdMethodInfo
ResolveWindowMethod "setStaticGravities" o = WindowSetStaticGravitiesMethodInfo
ResolveWindowMethod "setSupportMultidevice" o = WindowSetSupportMultideviceMethodInfo
ResolveWindowMethod "setTitle" o = WindowSetTitleMethodInfo
ResolveWindowMethod "setTransientFor" o = WindowSetTransientForMethodInfo
ResolveWindowMethod "setTypeHint" o = WindowSetTypeHintMethodInfo
ResolveWindowMethod "setUrgencyHint" o = WindowSetUrgencyHintMethodInfo
ResolveWindowMethod "setUserData" o = WindowSetUserDataMethodInfo
ResolveWindowMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWindowMethod t Window, O.MethodInfo info Window p) => OL.IsLabel t (Window -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type WindowCreateSurfaceCallback =
Int32
-> Int32
-> IO Cairo.Surface.Surface
noWindowCreateSurfaceCallback :: Maybe WindowCreateSurfaceCallback
noWindowCreateSurfaceCallback :: Maybe WindowCreateSurfaceCallback
noWindowCreateSurfaceCallback = Maybe WindowCreateSurfaceCallback
forall a. Maybe a
Nothing
type C_WindowCreateSurfaceCallback =
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO (Ptr Cairo.Surface.Surface)
foreign import ccall "wrapper"
mk_WindowCreateSurfaceCallback :: C_WindowCreateSurfaceCallback -> IO (FunPtr C_WindowCreateSurfaceCallback)
genClosure_WindowCreateSurface :: MonadIO m => WindowCreateSurfaceCallback -> m (GClosure C_WindowCreateSurfaceCallback)
genClosure_WindowCreateSurface :: WindowCreateSurfaceCallback
-> m (GClosure C_WindowCreateSurfaceCallback)
genClosure_WindowCreateSurface WindowCreateSurfaceCallback
cb = IO (GClosure C_WindowCreateSurfaceCallback)
-> m (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowCreateSurfaceCallback)
-> m (GClosure C_WindowCreateSurfaceCallback))
-> IO (GClosure C_WindowCreateSurfaceCallback)
-> m (GClosure C_WindowCreateSurfaceCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb' IO (FunPtr C_WindowCreateSurfaceCallback)
-> (FunPtr C_WindowCreateSurfaceCallback
-> IO (GClosure C_WindowCreateSurfaceCallback))
-> IO (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowCreateSurfaceCallback
-> IO (GClosure C_WindowCreateSurfaceCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WindowCreateSurfaceCallback ::
WindowCreateSurfaceCallback ->
C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback :: WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
_cb Ptr ()
_ Int32
width Int32
height Ptr ()
_ = do
Surface
result <- WindowCreateSurfaceCallback
_cb Int32
width Int32
height
Ptr Surface
result' <- Surface -> IO (Ptr Surface)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Surface
result
Ptr Surface -> IO (Ptr Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Surface
result'
onWindowCreateSurface :: (IsWindow a, MonadIO m) => a -> WindowCreateSurfaceCallback -> m SignalHandlerId
onWindowCreateSurface :: a -> WindowCreateSurfaceCallback -> m SignalHandlerId
onWindowCreateSurface a
obj WindowCreateSurfaceCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
FunPtr C_WindowCreateSurfaceCallback
cb'' <- C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb'
a
-> Text
-> FunPtr C_WindowCreateSurfaceCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create-surface" FunPtr C_WindowCreateSurfaceCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWindowCreateSurface :: (IsWindow a, MonadIO m) => a -> WindowCreateSurfaceCallback -> m SignalHandlerId
afterWindowCreateSurface :: a -> WindowCreateSurfaceCallback -> m SignalHandlerId
afterWindowCreateSurface a
obj WindowCreateSurfaceCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowCreateSurfaceCallback
cb' = WindowCreateSurfaceCallback -> C_WindowCreateSurfaceCallback
wrap_WindowCreateSurfaceCallback WindowCreateSurfaceCallback
cb
FunPtr C_WindowCreateSurfaceCallback
cb'' <- C_WindowCreateSurfaceCallback
-> IO (FunPtr C_WindowCreateSurfaceCallback)
mk_WindowCreateSurfaceCallback C_WindowCreateSurfaceCallback
cb'
a
-> Text
-> FunPtr C_WindowCreateSurfaceCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"create-surface" FunPtr C_WindowCreateSurfaceCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WindowCreateSurfaceSignalInfo
instance SignalInfo WindowCreateSurfaceSignalInfo where
type HaskellCallbackType WindowCreateSurfaceSignalInfo = WindowCreateSurfaceCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WindowCreateSurfaceCallback cb
cb'' <- mk_WindowCreateSurfaceCallback cb'
connectSignalFunPtr obj "create-surface" cb'' connectMode detail
#endif
type WindowFromEmbedderCallback =
Double
-> Double
-> IO ((Double, Double))
noWindowFromEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowFromEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowFromEmbedderCallback = Maybe WindowFromEmbedderCallback
forall a. Maybe a
Nothing
type C_WindowFromEmbedderCallback =
Ptr () ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WindowFromEmbedderCallback :: C_WindowFromEmbedderCallback -> IO (FunPtr C_WindowFromEmbedderCallback)
genClosure_WindowFromEmbedder :: MonadIO m => WindowFromEmbedderCallback -> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowFromEmbedder :: WindowFromEmbedderCallback
-> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowFromEmbedder WindowFromEmbedderCallback
cb = IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb' IO (FunPtr C_WindowFromEmbedderCallback)
-> (FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WindowFromEmbedderCallback ::
WindowFromEmbedderCallback ->
C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback :: WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
_cb Ptr ()
_ CDouble
embedderX CDouble
embedderY Ptr CDouble
offscreenX Ptr CDouble
offscreenY Ptr ()
_ = do
let embedderX' :: Double
embedderX' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
embedderX
let embedderY' :: Double
embedderY' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
embedderY
(Double
outoffscreenX, Double
outoffscreenY) <- WindowFromEmbedderCallback
_cb Double
embedderX' Double
embedderY'
let outoffscreenX' :: CDouble
outoffscreenX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outoffscreenX
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
offscreenX CDouble
outoffscreenX'
let outoffscreenY' :: CDouble
outoffscreenY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outoffscreenY
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
offscreenY CDouble
outoffscreenY'
onWindowFromEmbedder :: (IsWindow a, MonadIO m) => a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowFromEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowFromEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb'
a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"from-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWindowFromEmbedder :: (IsWindow a, MonadIO m) => a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowFromEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowFromEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowFromEmbedderCallback WindowFromEmbedderCallback
cb
FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowFromEmbedderCallback C_WindowFromEmbedderCallback
cb'
a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"from-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WindowFromEmbedderSignalInfo
instance SignalInfo WindowFromEmbedderSignalInfo where
type HaskellCallbackType WindowFromEmbedderSignalInfo = WindowFromEmbedderCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WindowFromEmbedderCallback cb
cb'' <- mk_WindowFromEmbedderCallback cb'
connectSignalFunPtr obj "from-embedder" cb'' connectMode detail
#endif
type WindowMovedToRectCallback =
Ptr ()
-> Ptr ()
-> Bool
-> Bool
-> IO ()
noWindowMovedToRectCallback :: Maybe WindowMovedToRectCallback
noWindowMovedToRectCallback :: Maybe WindowMovedToRectCallback
noWindowMovedToRectCallback = Maybe WindowMovedToRectCallback
forall a. Maybe a
Nothing
type C_WindowMovedToRectCallback =
Ptr () ->
Ptr () ->
Ptr () ->
CInt ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WindowMovedToRectCallback :: C_WindowMovedToRectCallback -> IO (FunPtr C_WindowMovedToRectCallback)
genClosure_WindowMovedToRect :: MonadIO m => WindowMovedToRectCallback -> m (GClosure C_WindowMovedToRectCallback)
genClosure_WindowMovedToRect :: WindowMovedToRectCallback
-> m (GClosure C_WindowMovedToRectCallback)
genClosure_WindowMovedToRect WindowMovedToRectCallback
cb = IO (GClosure C_WindowMovedToRectCallback)
-> m (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowMovedToRectCallback)
-> m (GClosure C_WindowMovedToRectCallback))
-> IO (GClosure C_WindowMovedToRectCallback)
-> m (GClosure C_WindowMovedToRectCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb' IO (FunPtr C_WindowMovedToRectCallback)
-> (FunPtr C_WindowMovedToRectCallback
-> IO (GClosure C_WindowMovedToRectCallback))
-> IO (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowMovedToRectCallback
-> IO (GClosure C_WindowMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WindowMovedToRectCallback ::
WindowMovedToRectCallback ->
C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback :: WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
_cb Ptr ()
_ Ptr ()
flippedRect Ptr ()
finalRect CInt
flippedX CInt
flippedY Ptr ()
_ = do
let flippedX' :: Bool
flippedX' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flippedX
let flippedY' :: Bool
flippedY' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
flippedY
WindowMovedToRectCallback
_cb Ptr ()
flippedRect Ptr ()
finalRect Bool
flippedX' Bool
flippedY'
onWindowMovedToRect :: (IsWindow a, MonadIO m) => a -> WindowMovedToRectCallback -> m SignalHandlerId
onWindowMovedToRect :: a -> WindowMovedToRectCallback -> m SignalHandlerId
onWindowMovedToRect a
obj WindowMovedToRectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
FunPtr C_WindowMovedToRectCallback
cb'' <- C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb'
a
-> Text
-> FunPtr C_WindowMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"moved-to-rect" FunPtr C_WindowMovedToRectCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWindowMovedToRect :: (IsWindow a, MonadIO m) => a -> WindowMovedToRectCallback -> m SignalHandlerId
afterWindowMovedToRect :: a -> WindowMovedToRectCallback -> m SignalHandlerId
afterWindowMovedToRect a
obj WindowMovedToRectCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowMovedToRectCallback
cb' = WindowMovedToRectCallback -> C_WindowMovedToRectCallback
wrap_WindowMovedToRectCallback WindowMovedToRectCallback
cb
FunPtr C_WindowMovedToRectCallback
cb'' <- C_WindowMovedToRectCallback
-> IO (FunPtr C_WindowMovedToRectCallback)
mk_WindowMovedToRectCallback C_WindowMovedToRectCallback
cb'
a
-> Text
-> FunPtr C_WindowMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"moved-to-rect" FunPtr C_WindowMovedToRectCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WindowMovedToRectSignalInfo
instance SignalInfo WindowMovedToRectSignalInfo where
type HaskellCallbackType WindowMovedToRectSignalInfo = WindowMovedToRectCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WindowMovedToRectCallback cb
cb'' <- mk_WindowMovedToRectCallback cb'
connectSignalFunPtr obj "moved-to-rect" cb'' connectMode detail
#endif
type WindowPickEmbeddedChildCallback =
Double
-> Double
-> IO (Maybe Window)
noWindowPickEmbeddedChildCallback :: Maybe WindowPickEmbeddedChildCallback
noWindowPickEmbeddedChildCallback :: Maybe WindowPickEmbeddedChildCallback
noWindowPickEmbeddedChildCallback = Maybe WindowPickEmbeddedChildCallback
forall a. Maybe a
Nothing
type C_WindowPickEmbeddedChildCallback =
Ptr () ->
CDouble ->
CDouble ->
Ptr () ->
IO (Ptr Window)
foreign import ccall "wrapper"
mk_WindowPickEmbeddedChildCallback :: C_WindowPickEmbeddedChildCallback -> IO (FunPtr C_WindowPickEmbeddedChildCallback)
genClosure_WindowPickEmbeddedChild :: MonadIO m => WindowPickEmbeddedChildCallback -> m (GClosure C_WindowPickEmbeddedChildCallback)
genClosure_WindowPickEmbeddedChild :: WindowPickEmbeddedChildCallback
-> m (GClosure C_WindowPickEmbeddedChildCallback)
genClosure_WindowPickEmbeddedChild WindowPickEmbeddedChildCallback
cb = IO (GClosure C_WindowPickEmbeddedChildCallback)
-> m (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowPickEmbeddedChildCallback)
-> m (GClosure C_WindowPickEmbeddedChildCallback))
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
-> m (GClosure C_WindowPickEmbeddedChildCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb' IO (FunPtr C_WindowPickEmbeddedChildCallback)
-> (FunPtr C_WindowPickEmbeddedChildCallback
-> IO (GClosure C_WindowPickEmbeddedChildCallback))
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowPickEmbeddedChildCallback
-> IO (GClosure C_WindowPickEmbeddedChildCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WindowPickEmbeddedChildCallback ::
WindowPickEmbeddedChildCallback ->
C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback :: WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
_cb Ptr ()
_ CDouble
x CDouble
y Ptr ()
_ = do
let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
Maybe Window
result <- WindowPickEmbeddedChildCallback
_cb Double
x' Double
y'
Ptr Window
-> Maybe Window -> (Window -> IO (Ptr Window)) -> IO (Ptr Window)
forall (m :: * -> *) b a.
Monad m =>
b -> Maybe a -> (a -> m b) -> m b
maybeM Ptr Window
forall a. Ptr a
nullPtr Maybe Window
result ((Window -> IO (Ptr Window)) -> IO (Ptr Window))
-> (Window -> IO (Ptr Window)) -> IO (Ptr Window)
forall a b. (a -> b) -> a -> b
$ \Window
result' -> do
Ptr Window
result'' <- Window -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr Window
result'
Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
result''
onWindowPickEmbeddedChild :: (IsWindow a, MonadIO m) => a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
onWindowPickEmbeddedChild :: a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
onWindowPickEmbeddedChild a
obj WindowPickEmbeddedChildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
FunPtr C_WindowPickEmbeddedChildCallback
cb'' <- C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb'
a
-> Text
-> FunPtr C_WindowPickEmbeddedChildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pick-embedded-child" FunPtr C_WindowPickEmbeddedChildCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWindowPickEmbeddedChild :: (IsWindow a, MonadIO m) => a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
afterWindowPickEmbeddedChild :: a -> WindowPickEmbeddedChildCallback -> m SignalHandlerId
afterWindowPickEmbeddedChild a
obj WindowPickEmbeddedChildCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowPickEmbeddedChildCallback
cb' = WindowPickEmbeddedChildCallback
-> C_WindowPickEmbeddedChildCallback
wrap_WindowPickEmbeddedChildCallback WindowPickEmbeddedChildCallback
cb
FunPtr C_WindowPickEmbeddedChildCallback
cb'' <- C_WindowPickEmbeddedChildCallback
-> IO (FunPtr C_WindowPickEmbeddedChildCallback)
mk_WindowPickEmbeddedChildCallback C_WindowPickEmbeddedChildCallback
cb'
a
-> Text
-> FunPtr C_WindowPickEmbeddedChildCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pick-embedded-child" FunPtr C_WindowPickEmbeddedChildCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WindowPickEmbeddedChildSignalInfo
instance SignalInfo WindowPickEmbeddedChildSignalInfo where
type HaskellCallbackType WindowPickEmbeddedChildSignalInfo = WindowPickEmbeddedChildCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WindowPickEmbeddedChildCallback cb
cb'' <- mk_WindowPickEmbeddedChildCallback cb'
connectSignalFunPtr obj "pick-embedded-child" cb'' connectMode detail
#endif
type WindowToEmbedderCallback =
Double
-> Double
-> IO ((Double, Double))
noWindowToEmbedderCallback :: Maybe WindowToEmbedderCallback
noWindowToEmbedderCallback :: Maybe WindowFromEmbedderCallback
noWindowToEmbedderCallback = Maybe WindowFromEmbedderCallback
forall a. Maybe a
Nothing
type C_WindowToEmbedderCallback =
Ptr () ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_WindowToEmbedderCallback :: C_WindowToEmbedderCallback -> IO (FunPtr C_WindowToEmbedderCallback)
genClosure_WindowToEmbedder :: MonadIO m => WindowToEmbedderCallback -> m (GClosure C_WindowToEmbedderCallback)
genClosure_WindowToEmbedder :: WindowFromEmbedderCallback
-> m (GClosure C_WindowFromEmbedderCallback)
genClosure_WindowToEmbedder WindowFromEmbedderCallback
cb = IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
-> m (GClosure C_WindowFromEmbedderCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb' IO (FunPtr C_WindowFromEmbedderCallback)
-> (FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback))
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_WindowFromEmbedderCallback
-> IO (GClosure C_WindowFromEmbedderCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_WindowToEmbedderCallback ::
WindowToEmbedderCallback ->
C_WindowToEmbedderCallback
wrap_WindowToEmbedderCallback :: WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
_cb Ptr ()
_ CDouble
offscreenX CDouble
offscreenY Ptr CDouble
embedderX Ptr CDouble
embedderY Ptr ()
_ = do
let offscreenX' :: Double
offscreenX' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
offscreenX
let offscreenY' :: Double
offscreenY' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
offscreenY
(Double
outembedderX, Double
outembedderY) <- WindowFromEmbedderCallback
_cb Double
offscreenX' Double
offscreenY'
let outembedderX' :: CDouble
outembedderX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outembedderX
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
embedderX CDouble
outembedderX'
let outembedderY' :: CDouble
outembedderY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
outembedderY
Ptr CDouble -> CDouble -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr CDouble
embedderY CDouble
outembedderY'
onWindowToEmbedder :: (IsWindow a, MonadIO m) => a -> WindowToEmbedderCallback -> m SignalHandlerId
onWindowToEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
onWindowToEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb'
a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"to-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterWindowToEmbedder :: (IsWindow a, MonadIO m) => a -> WindowToEmbedderCallback -> m SignalHandlerId
afterWindowToEmbedder :: a -> WindowFromEmbedderCallback -> m SignalHandlerId
afterWindowToEmbedder a
obj WindowFromEmbedderCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_WindowFromEmbedderCallback
cb' = WindowFromEmbedderCallback -> C_WindowFromEmbedderCallback
wrap_WindowToEmbedderCallback WindowFromEmbedderCallback
cb
FunPtr C_WindowFromEmbedderCallback
cb'' <- C_WindowFromEmbedderCallback
-> IO (FunPtr C_WindowFromEmbedderCallback)
mk_WindowToEmbedderCallback C_WindowFromEmbedderCallback
cb'
a
-> Text
-> FunPtr C_WindowFromEmbedderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"to-embedder" FunPtr C_WindowFromEmbedderCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data WindowToEmbedderSignalInfo
instance SignalInfo WindowToEmbedderSignalInfo where
type HaskellCallbackType WindowToEmbedderSignalInfo = WindowToEmbedderCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_WindowToEmbedderCallback cb
cb'' <- mk_WindowToEmbedderCallback cb'
connectSignalFunPtr obj "to-embedder" cb'' connectMode detail
#endif
getWindowCursor :: (MonadIO m, IsWindow o) => o -> m (Maybe Gdk.Cursor.Cursor)
getWindowCursor :: o -> m (Maybe Cursor)
getWindowCursor o
obj = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Cursor -> Cursor) -> IO (Maybe Cursor)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"cursor" ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor
setWindowCursor :: (MonadIO m, IsWindow o, Gdk.Cursor.IsCursor a) => o -> a -> m ()
setWindowCursor :: o -> a -> m ()
setWindowCursor o
obj a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructWindowCursor :: (IsWindow o, MIO.MonadIO m, Gdk.Cursor.IsCursor a) => a -> m (GValueConstruct o)
constructWindowCursor :: a -> m (GValueConstruct o)
constructWindowCursor a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"cursor" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearWindowCursor :: (MonadIO m, IsWindow o) => o -> m ()
clearWindowCursor :: o -> m ()
clearWindowCursor o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Cursor -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"cursor" (Maybe Cursor
forall a. Maybe a
Nothing :: Maybe Gdk.Cursor.Cursor)
#if defined(ENABLE_OVERLOADING)
data WindowCursorPropertyInfo
instance AttrInfo WindowCursorPropertyInfo where
type AttrAllowedOps WindowCursorPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WindowCursorPropertyInfo = IsWindow
type AttrSetTypeConstraint WindowCursorPropertyInfo = Gdk.Cursor.IsCursor
type AttrTransferTypeConstraint WindowCursorPropertyInfo = Gdk.Cursor.IsCursor
type AttrTransferType WindowCursorPropertyInfo = Gdk.Cursor.Cursor
type AttrGetType WindowCursorPropertyInfo = (Maybe Gdk.Cursor.Cursor)
type AttrLabel WindowCursorPropertyInfo = "cursor"
type AttrOrigin WindowCursorPropertyInfo = Window
attrGet = getWindowCursor
attrSet = setWindowCursor
attrTransfer _ v = do
unsafeCastTo Gdk.Cursor.Cursor v
attrConstruct = constructWindowCursor
attrClear = clearWindowCursor
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Window
type instance O.AttributeList Window = WindowAttributeList
type WindowAttributeList = ('[ '("cursor", WindowCursorPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
windowCursor :: AttrLabelProxy "cursor"
windowCursor = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Window = WindowSignalList
type WindowSignalList = ('[ '("createSurface", WindowCreateSurfaceSignalInfo), '("fromEmbedder", WindowFromEmbedderSignalInfo), '("movedToRect", WindowMovedToRectSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("pickEmbeddedChild", WindowPickEmbeddedChildSignalInfo), '("toEmbedder", WindowToEmbedderSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_window_new" gdk_window_new ::
Ptr Window ->
Ptr Gdk.WindowAttr.WindowAttr ->
CUInt ->
IO (Ptr Window)
windowNew ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
Maybe (a)
-> Gdk.WindowAttr.WindowAttr
-> [Gdk.Flags.WindowAttributesType]
-> m Window
windowNew :: Maybe a -> WindowAttr -> [WindowAttributesType] -> m Window
windowNew Maybe a
parent WindowAttr
attributes [WindowAttributesType]
attributesMask = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
maybeParent <- case Maybe a
parent of
Maybe a
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just a
jParent -> do
Ptr Window
jParent' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jParent
Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr WindowAttr
attributes' <- WindowAttr -> IO (Ptr WindowAttr)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr WindowAttr
attributes
let attributesMask' :: CUInt
attributesMask' = [WindowAttributesType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowAttributesType]
attributesMask
Ptr Window
result <- Ptr Window -> Ptr WindowAttr -> CUInt -> IO (Ptr Window)
gdk_window_new Ptr Window
maybeParent Ptr WindowAttr
attributes' CUInt
attributesMask'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowNew" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Window -> Window
Window) Ptr Window
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
parent a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
WindowAttr -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr WindowAttr
attributes
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_window_beep" gdk_window_beep ::
Ptr Window ->
IO ()
windowBeep ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowBeep :: a -> m ()
windowBeep a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_beep Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeepMethodInfo a signature where
overloadedMethod = windowBeep
#endif
foreign import ccall "gdk_window_begin_draw_frame" gdk_window_begin_draw_frame ::
Ptr Window ->
Ptr Cairo.Region.Region ->
IO (Ptr Gdk.DrawingContext.DrawingContext)
windowBeginDrawFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> m Gdk.DrawingContext.DrawingContext
windowBeginDrawFrame :: a -> Region -> m DrawingContext
windowBeginDrawFrame a
window Region
region = IO DrawingContext -> m DrawingContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DrawingContext -> m DrawingContext)
-> IO DrawingContext -> m DrawingContext
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
Ptr DrawingContext
result <- Ptr Window -> Ptr Region -> IO (Ptr DrawingContext)
gdk_window_begin_draw_frame Ptr Window
window' Ptr Region
region'
Text -> Ptr DrawingContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowBeginDrawFrame" Ptr DrawingContext
result
DrawingContext
result' <- ((ManagedPtr DrawingContext -> DrawingContext)
-> Ptr DrawingContext -> IO DrawingContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DrawingContext -> DrawingContext
Gdk.DrawingContext.DrawingContext) Ptr DrawingContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
DrawingContext -> IO DrawingContext
forall (m :: * -> *) a. Monad m => a -> m a
return DrawingContext
result'
#if defined(ENABLE_OVERLOADING)
data WindowBeginDrawFrameMethodInfo
instance (signature ~ (Cairo.Region.Region -> m Gdk.DrawingContext.DrawingContext), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginDrawFrameMethodInfo a signature where
overloadedMethod = windowBeginDrawFrame
#endif
foreign import ccall "gdk_window_begin_move_drag" gdk_window_begin_move_drag ::
Ptr Window ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
windowBeginMoveDrag ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
windowBeginMoveDrag :: a -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginMoveDrag a
window Int32
button Int32
rootX Int32
rootY Word32
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_move_drag Ptr Window
window' Int32
button Int32
rootX Int32
rootY Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginMoveDragMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginMoveDragMethodInfo a signature where
overloadedMethod = windowBeginMoveDrag
#endif
foreign import ccall "gdk_window_begin_move_drag_for_device" gdk_window_begin_move_drag_for_device ::
Ptr Window ->
Ptr Gdk.Device.Device ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
windowBeginMoveDragForDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
windowBeginMoveDragForDevice :: a -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginMoveDragForDevice a
window b
device Int32
button Int32
rootX Int32
rootY Word32
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Window
-> Ptr Device -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_move_drag_for_device Ptr Window
window' Ptr Device
device' Int32
button Int32
rootX Int32
rootY Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginMoveDragForDeviceMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowBeginMoveDragForDeviceMethodInfo a signature where
overloadedMethod = windowBeginMoveDragForDevice
#endif
foreign import ccall "gdk_window_begin_paint_rect" gdk_window_begin_paint_rect ::
Ptr Window ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
{-# DEPRECATED windowBeginPaintRect ["(Since version 3.22)","Use 'GI.Gdk.Objects.Window.windowBeginDrawFrame' instead"] #-}
windowBeginPaintRect ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Rectangle.Rectangle
-> m ()
windowBeginPaintRect :: a -> Rectangle -> m ()
windowBeginPaintRect a
window Rectangle
rectangle = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Rectangle
rectangle' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rectangle
Ptr Window -> Ptr Rectangle -> IO ()
gdk_window_begin_paint_rect Ptr Window
window' Ptr Rectangle
rectangle'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rectangle
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginPaintRectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginPaintRectMethodInfo a signature where
overloadedMethod = windowBeginPaintRect
#endif
foreign import ccall "gdk_window_begin_paint_region" gdk_window_begin_paint_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
IO ()
{-# DEPRECATED windowBeginPaintRegion ["(Since version 3.22)","Use 'GI.Gdk.Objects.Window.windowBeginDrawFrame' instead"] #-}
windowBeginPaintRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> m ()
windowBeginPaintRegion :: a -> Region -> m ()
windowBeginPaintRegion a
window Region
region = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
Ptr Window -> Ptr Region -> IO ()
gdk_window_begin_paint_region Ptr Window
window' Ptr Region
region'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginPaintRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginPaintRegionMethodInfo a signature where
overloadedMethod = windowBeginPaintRegion
#endif
foreign import ccall "gdk_window_begin_resize_drag" gdk_window_begin_resize_drag ::
Ptr Window ->
CUInt ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
windowBeginResizeDrag ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Enums.WindowEdge
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
windowBeginResizeDrag :: a -> WindowEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginResizeDrag a
window WindowEdge
edge Int32
button Int32
rootX Int32
rootY Word32
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (WindowEdge -> Int) -> WindowEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowEdge -> Int
forall a. Enum a => a -> Int
fromEnum) WindowEdge
edge
Ptr Window -> CUInt -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_window_begin_resize_drag Ptr Window
window' CUInt
edge' Int32
button Int32
rootX Int32
rootY Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginResizeDragMethodInfo
instance (signature ~ (Gdk.Enums.WindowEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowBeginResizeDragMethodInfo a signature where
overloadedMethod = windowBeginResizeDrag
#endif
foreign import ccall "gdk_window_begin_resize_drag_for_device" gdk_window_begin_resize_drag_for_device ::
Ptr Window ->
CUInt ->
Ptr Gdk.Device.Device ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
windowBeginResizeDragForDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> Gdk.Enums.WindowEdge
-> b
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
windowBeginResizeDragForDevice :: a -> WindowEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
windowBeginResizeDragForDevice a
window WindowEdge
edge b
device Int32
button Int32
rootX Int32
rootY Word32
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (WindowEdge -> Int) -> WindowEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowEdge -> Int
forall a. Enum a => a -> Int
fromEnum) WindowEdge
edge
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Window
-> CUInt
-> Ptr Device
-> Int32
-> Int32
-> Int32
-> Word32
-> IO ()
gdk_window_begin_resize_drag_for_device Ptr Window
window' CUInt
edge' Ptr Device
device' Int32
button Int32
rootX Int32
rootY Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowBeginResizeDragForDeviceMethodInfo
instance (signature ~ (Gdk.Enums.WindowEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowBeginResizeDragForDeviceMethodInfo a signature where
overloadedMethod = windowBeginResizeDragForDevice
#endif
foreign import ccall "gdk_window_configure_finished" gdk_window_configure_finished ::
Ptr Window ->
IO ()
{-# DEPRECATED windowConfigureFinished ["(Since version 3.8)","this function is no longer needed"] #-}
windowConfigureFinished ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowConfigureFinished :: a -> m ()
windowConfigureFinished a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_configure_finished Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowConfigureFinishedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowConfigureFinishedMethodInfo a signature where
overloadedMethod = windowConfigureFinished
#endif
foreign import ccall "gdk_window_coords_from_parent" gdk_window_coords_from_parent ::
Ptr Window ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
windowCoordsFromParent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Double
-> Double
-> m ((Double, Double))
windowCoordsFromParent :: a -> Double -> Double -> m (Double, Double)
windowCoordsFromParent a
window Double
parentX Double
parentY = IO (Double, Double) -> m (Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Double, Double) -> m (Double, Double))
-> IO (Double, Double) -> m (Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let parentX' :: CDouble
parentX' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
parentX
let parentY' :: CDouble
parentY' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
parentY
Ptr CDouble
x <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
y <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr Window
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_window_coords_from_parent Ptr Window
window' CDouble
parentX' CDouble
parentY' Ptr CDouble
x Ptr CDouble
y
CDouble
x' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
x
let x'' :: Double
x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
CDouble
y' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
y
let y'' :: Double
y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
(Double, Double) -> IO (Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
x'', Double
y'')
#if defined(ENABLE_OVERLOADING)
data WindowCoordsFromParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsWindow a) => O.MethodInfo WindowCoordsFromParentMethodInfo a signature where
overloadedMethod = windowCoordsFromParent
#endif
foreign import ccall "gdk_window_coords_to_parent" gdk_window_coords_to_parent ::
Ptr Window ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
windowCoordsToParent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Double
-> Double
-> m ((Double, Double))
windowCoordsToParent :: a -> Double -> Double -> m (Double, Double)
windowCoordsToParent a
window Double
x Double
y = IO (Double, Double) -> m (Double, Double)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Double, Double) -> m (Double, Double))
-> IO (Double, Double) -> m (Double, Double)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let x' :: CDouble
x' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
x
let y' :: CDouble
y' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
y
Ptr CDouble
parentX <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
parentY <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr Window
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_window_coords_to_parent Ptr Window
window' CDouble
x' CDouble
y' Ptr CDouble
parentX Ptr CDouble
parentY
CDouble
parentX' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
parentX
let parentX'' :: Double
parentX'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
parentX'
CDouble
parentY' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
parentY
let parentY'' :: Double
parentY'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
parentY'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
parentX
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
parentY
(Double, Double) -> IO (Double, Double)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
parentX'', Double
parentY'')
#if defined(ENABLE_OVERLOADING)
data WindowCoordsToParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsWindow a) => O.MethodInfo WindowCoordsToParentMethodInfo a signature where
overloadedMethod = windowCoordsToParent
#endif
foreign import ccall "gdk_window_create_gl_context" gdk_window_create_gl_context ::
Ptr Window ->
Ptr (Ptr GError) ->
IO (Ptr Gdk.GLContext.GLContext)
windowCreateGlContext ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.GLContext.GLContext
windowCreateGlContext :: a -> m GLContext
windowCreateGlContext a
window = IO GLContext -> m GLContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GLContext -> m GLContext) -> IO GLContext -> m GLContext
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
IO GLContext -> IO () -> IO GLContext
forall a b. IO a -> IO b -> IO a
onException (do
Ptr GLContext
result <- (Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext))
-> (Ptr (Ptr GError) -> IO (Ptr GLContext)) -> IO (Ptr GLContext)
forall a b. (a -> b) -> a -> b
$ Ptr Window -> Ptr (Ptr GError) -> IO (Ptr GLContext)
gdk_window_create_gl_context Ptr Window
window'
Text -> Ptr GLContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateGlContext" Ptr GLContext
result
GLContext
result' <- ((ManagedPtr GLContext -> GLContext)
-> Ptr GLContext -> IO GLContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr GLContext -> GLContext
Gdk.GLContext.GLContext) Ptr GLContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
GLContext -> IO GLContext
forall (m :: * -> *) a. Monad m => a -> m a
return GLContext
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data WindowCreateGlContextMethodInfo
instance (signature ~ (m Gdk.GLContext.GLContext), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateGlContextMethodInfo a signature where
overloadedMethod = windowCreateGlContext
#endif
foreign import ccall "gdk_window_create_similar_image_surface" gdk_window_create_similar_image_surface ::
Ptr Window ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO (Ptr Cairo.Surface.Surface)
windowCreateSimilarImageSurface ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> m Cairo.Surface.Surface
windowCreateSimilarImageSurface :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m Surface
windowCreateSimilarImageSurface a
window Int32
format Int32
width Int32
height Int32
scale = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Surface
result <- Ptr Window -> Int32 -> Int32 -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_window_create_similar_image_surface Ptr Window
window' Int32
format Int32
width Int32
height Int32
scale
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateSimilarImageSurface" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data WindowCreateSimilarImageSurfaceMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m Cairo.Surface.Surface), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateSimilarImageSurfaceMethodInfo a signature where
overloadedMethod = windowCreateSimilarImageSurface
#endif
foreign import ccall "gdk_window_create_similar_surface" gdk_window_create_similar_surface ::
Ptr Window ->
CUInt ->
Int32 ->
Int32 ->
IO (Ptr Cairo.Surface.Surface)
windowCreateSimilarSurface ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Enums.Content
-> Int32
-> Int32
-> m Cairo.Surface.Surface
windowCreateSimilarSurface :: a -> Content -> Int32 -> Int32 -> m Surface
windowCreateSimilarSurface a
window Content
content Int32
width Int32
height = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> IO Surface -> m Surface
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let content' :: CUInt
content' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Content -> Int) -> Content -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Content -> Int
forall a. Enum a => a -> Int
fromEnum) Content
content
Ptr Surface
result <- Ptr Window -> CUInt -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_window_create_similar_surface Ptr Window
window' CUInt
content' Int32
width Int32
height
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowCreateSimilarSurface" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Surface -> Surface
Cairo.Surface.Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data WindowCreateSimilarSurfaceMethodInfo
instance (signature ~ (Cairo.Enums.Content -> Int32 -> Int32 -> m Cairo.Surface.Surface), MonadIO m, IsWindow a) => O.MethodInfo WindowCreateSimilarSurfaceMethodInfo a signature where
overloadedMethod = windowCreateSimilarSurface
#endif
foreign import ccall "gdk_window_deiconify" gdk_window_deiconify ::
Ptr Window ->
IO ()
windowDeiconify ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowDeiconify :: a -> m ()
windowDeiconify a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_deiconify Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowDeiconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDeiconifyMethodInfo a signature where
overloadedMethod = windowDeiconify
#endif
foreign import ccall "gdk_window_destroy" gdk_window_destroy ::
Ptr Window ->
IO ()
windowDestroy ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowDestroy :: a -> m ()
windowDestroy a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_destroy Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowDestroyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDestroyMethodInfo a signature where
overloadedMethod = windowDestroy
#endif
foreign import ccall "gdk_window_destroy_notify" gdk_window_destroy_notify ::
Ptr Window ->
IO ()
windowDestroyNotify ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowDestroyNotify :: a -> m ()
windowDestroyNotify a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_destroy_notify Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowDestroyNotifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowDestroyNotifyMethodInfo a signature where
overloadedMethod = windowDestroyNotify
#endif
foreign import ccall "gdk_window_enable_synchronized_configure" gdk_window_enable_synchronized_configure ::
Ptr Window ->
IO ()
{-# DEPRECATED windowEnableSynchronizedConfigure ["(Since version 3.8)","this function is no longer needed"] #-}
windowEnableSynchronizedConfigure ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowEnableSynchronizedConfigure :: a -> m ()
windowEnableSynchronizedConfigure a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_enable_synchronized_configure Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowEnableSynchronizedConfigureMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowEnableSynchronizedConfigureMethodInfo a signature where
overloadedMethod = windowEnableSynchronizedConfigure
#endif
foreign import ccall "gdk_window_end_draw_frame" gdk_window_end_draw_frame ::
Ptr Window ->
Ptr Gdk.DrawingContext.DrawingContext ->
IO ()
windowEndDrawFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.DrawingContext.IsDrawingContext b) =>
a
-> b
-> m ()
windowEndDrawFrame :: a -> b -> m ()
windowEndDrawFrame a
window b
context = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr DrawingContext
context' <- b -> IO (Ptr DrawingContext)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
context
Ptr Window -> Ptr DrawingContext -> IO ()
gdk_window_end_draw_frame Ptr Window
window' Ptr DrawingContext
context'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowEndDrawFrameMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindow a, Gdk.DrawingContext.IsDrawingContext b) => O.MethodInfo WindowEndDrawFrameMethodInfo a signature where
overloadedMethod = windowEndDrawFrame
#endif
foreign import ccall "gdk_window_end_paint" gdk_window_end_paint ::
Ptr Window ->
IO ()
windowEndPaint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowEndPaint :: a -> m ()
windowEndPaint a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_end_paint Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowEndPaintMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowEndPaintMethodInfo a signature where
overloadedMethod = windowEndPaint
#endif
foreign import ccall "gdk_window_ensure_native" gdk_window_ensure_native ::
Ptr Window ->
IO CInt
windowEnsureNative ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowEnsureNative :: a -> m Bool
windowEnsureNative a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_ensure_native Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowEnsureNativeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowEnsureNativeMethodInfo a signature where
overloadedMethod = windowEnsureNative
#endif
foreign import ccall "gdk_window_flush" gdk_window_flush ::
Ptr Window ->
IO ()
{-# DEPRECATED windowFlush ["(Since version 3.14)"] #-}
windowFlush ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowFlush :: a -> m ()
windowFlush a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_flush Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFlushMethodInfo a signature where
overloadedMethod = windowFlush
#endif
foreign import ccall "gdk_window_focus" gdk_window_focus ::
Ptr Window ->
Word32 ->
IO ()
windowFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Word32
-> m ()
windowFocus :: a -> Word32 -> m ()
windowFocus a
window Word32
timestamp = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Word32 -> IO ()
gdk_window_focus Ptr Window
window' Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFocusMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFocusMethodInfo a signature where
overloadedMethod = windowFocus
#endif
foreign import ccall "gdk_window_freeze_toplevel_updates_libgtk_only" gdk_window_freeze_toplevel_updates_libgtk_only ::
Ptr Window ->
IO ()
{-# DEPRECATED windowFreezeToplevelUpdatesLibgtkOnly ["(Since version 3.16)","This symbol was never meant to be used outside of GTK+"] #-}
windowFreezeToplevelUpdatesLibgtkOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowFreezeToplevelUpdatesLibgtkOnly :: a -> m ()
windowFreezeToplevelUpdatesLibgtkOnly a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_freeze_toplevel_updates_libgtk_only Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFreezeToplevelUpdatesLibgtkOnlyMethodInfo a signature where
overloadedMethod = windowFreezeToplevelUpdatesLibgtkOnly
#endif
foreign import ccall "gdk_window_freeze_updates" gdk_window_freeze_updates ::
Ptr Window ->
IO ()
windowFreezeUpdates ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowFreezeUpdates :: a -> m ()
windowFreezeUpdates a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_freeze_updates Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFreezeUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFreezeUpdatesMethodInfo a signature where
overloadedMethod = windowFreezeUpdates
#endif
foreign import ccall "gdk_window_fullscreen" gdk_window_fullscreen ::
Ptr Window ->
IO ()
windowFullscreen ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowFullscreen :: a -> m ()
windowFullscreen a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_fullscreen Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFullscreenMethodInfo a signature where
overloadedMethod = windowFullscreen
#endif
foreign import ccall "gdk_window_fullscreen_on_monitor" gdk_window_fullscreen_on_monitor ::
Ptr Window ->
Int32 ->
IO ()
windowFullscreenOnMonitor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> m ()
windowFullscreenOnMonitor :: a -> Int32 -> m ()
windowFullscreenOnMonitor a
window Int32
monitor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> IO ()
gdk_window_fullscreen_on_monitor Ptr Window
window' Int32
monitor
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowFullscreenOnMonitorMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowFullscreenOnMonitorMethodInfo a signature where
overloadedMethod = windowFullscreenOnMonitor
#endif
foreign import ccall "gdk_window_geometry_changed" gdk_window_geometry_changed ::
Ptr Window ->
IO ()
windowGeometryChanged ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowGeometryChanged :: a -> m ()
windowGeometryChanged a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_geometry_changed Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowGeometryChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowGeometryChangedMethodInfo a signature where
overloadedMethod = windowGeometryChanged
#endif
foreign import ccall "gdk_window_get_accept_focus" gdk_window_get_accept_focus ::
Ptr Window ->
IO CInt
windowGetAcceptFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetAcceptFocus :: a -> m Bool
windowGetAcceptFocus a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_accept_focus Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetAcceptFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetAcceptFocusMethodInfo a signature where
overloadedMethod = windowGetAcceptFocus
#endif
foreign import ccall "gdk_window_get_background_pattern" gdk_window_get_background_pattern ::
Ptr Window ->
IO (Ptr Cairo.Pattern.Pattern)
{-# DEPRECATED windowGetBackgroundPattern ["(Since version 3.22)","Don\\'t use this function"] #-}
windowGetBackgroundPattern ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m (Maybe Cairo.Pattern.Pattern)
windowGetBackgroundPattern :: a -> m (Maybe Pattern)
windowGetBackgroundPattern a
window = IO (Maybe Pattern) -> m (Maybe Pattern)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Pattern) -> m (Maybe Pattern))
-> IO (Maybe Pattern) -> m (Maybe Pattern)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Pattern
result <- Ptr Window -> IO (Ptr Pattern)
gdk_window_get_background_pattern Ptr Window
window'
Maybe Pattern
maybeResult <- Ptr Pattern -> (Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Pattern
result ((Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern))
-> (Ptr Pattern -> IO Pattern) -> IO (Maybe Pattern)
forall a b. (a -> b) -> a -> b
$ \Ptr Pattern
result' -> do
Pattern
result'' <- ((ManagedPtr Pattern -> Pattern) -> Ptr Pattern -> IO Pattern
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Pattern -> Pattern
Cairo.Pattern.Pattern) Ptr Pattern
result'
Pattern -> IO Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return Pattern
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Pattern -> IO (Maybe Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Pattern
maybeResult
#if defined(ENABLE_OVERLOADING)
data WindowGetBackgroundPatternMethodInfo
instance (signature ~ (m (Maybe Cairo.Pattern.Pattern)), MonadIO m, IsWindow a) => O.MethodInfo WindowGetBackgroundPatternMethodInfo a signature where
overloadedMethod = windowGetBackgroundPattern
#endif
foreign import ccall "gdk_window_get_children" gdk_window_get_children ::
Ptr Window ->
IO (Ptr (GList (Ptr Window)))
windowGetChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m [Window]
windowGetChildren :: a -> m [Window]
windowGetChildren a
window = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr (GList (Ptr Window))
result <- Ptr Window -> IO (Ptr (GList (Ptr Window)))
gdk_window_get_children Ptr Window
window'
[Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
[Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) [Ptr Window]
result'
Ptr (GList (Ptr Window)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Window))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''
#if defined(ENABLE_OVERLOADING)
data WindowGetChildrenMethodInfo
instance (signature ~ (m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetChildrenMethodInfo a signature where
overloadedMethod = windowGetChildren
#endif
foreign import ccall "gdk_window_get_children_with_user_data" gdk_window_get_children_with_user_data ::
Ptr Window ->
Ptr () ->
IO (Ptr (GList (Ptr Window)))
windowGetChildrenWithUserData ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Ptr ()
-> m [Window]
windowGetChildrenWithUserData :: a -> Ptr () -> m [Window]
windowGetChildrenWithUserData a
window Ptr ()
userData = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr (GList (Ptr Window))
result <- Ptr Window -> Ptr () -> IO (Ptr (GList (Ptr Window)))
gdk_window_get_children_with_user_data Ptr Window
window' Ptr ()
userData
[Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
[Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) [Ptr Window]
result'
Ptr (GList (Ptr Window)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Window))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''
#if defined(ENABLE_OVERLOADING)
data WindowGetChildrenWithUserDataMethodInfo
instance (signature ~ (Ptr () -> m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetChildrenWithUserDataMethodInfo a signature where
overloadedMethod = windowGetChildrenWithUserData
#endif
foreign import ccall "gdk_window_get_clip_region" gdk_window_get_clip_region ::
Ptr Window ->
IO (Ptr Cairo.Region.Region)
windowGetClipRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Cairo.Region.Region
windowGetClipRegion :: a -> m Region
windowGetClipRegion a
window = IO Region -> m Region
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
result <- Ptr Window -> IO (Ptr Region)
gdk_window_get_clip_region Ptr Window
window'
Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetClipRegion" Ptr Region
result
Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO Region
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetClipRegionMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetClipRegionMethodInfo a signature where
overloadedMethod = windowGetClipRegion
#endif
foreign import ccall "gdk_window_get_composited" gdk_window_get_composited ::
Ptr Window ->
IO CInt
{-# DEPRECATED windowGetComposited ["(Since version 3.16)","Compositing is an outdated technology that"," only ever worked on X11."] #-}
windowGetComposited ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetComposited :: a -> m Bool
windowGetComposited a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_composited Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetCompositedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetCompositedMethodInfo a signature where
overloadedMethod = windowGetComposited
#endif
foreign import ccall "gdk_window_get_cursor" gdk_window_get_cursor ::
Ptr Window ->
IO (Ptr Gdk.Cursor.Cursor)
windowGetCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m (Maybe Gdk.Cursor.Cursor)
windowGetCursor :: a -> m (Maybe Cursor)
windowGetCursor a
window = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Cursor
result <- Ptr Window -> IO (Ptr Cursor)
gdk_window_get_cursor Ptr Window
window'
Maybe Cursor
maybeResult <- Ptr Cursor -> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Cursor
result ((Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor))
-> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cursor
result' -> do
Cursor
result'' <- ((ManagedPtr Cursor -> Cursor) -> Ptr Cursor -> IO Cursor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor) Ptr Cursor
result'
Cursor -> IO Cursor
forall (m :: * -> *) a. Monad m => a -> m a
return Cursor
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult
#if defined(ENABLE_OVERLOADING)
data WindowGetCursorMethodInfo
instance (signature ~ (m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWindow a) => O.MethodInfo WindowGetCursorMethodInfo a signature where
overloadedMethod = windowGetCursor
#endif
foreign import ccall "gdk_window_get_decorations" gdk_window_get_decorations ::
Ptr Window ->
Ptr CUInt ->
IO CInt
windowGetDecorations ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Bool, [Gdk.Flags.WMDecoration]))
windowGetDecorations :: a -> m (Bool, [WMDecoration])
windowGetDecorations a
window = IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration]))
-> IO (Bool, [WMDecoration]) -> m (Bool, [WMDecoration])
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr CUInt
decorations <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr Window -> Ptr CUInt -> IO CInt
gdk_window_get_decorations Ptr Window
window' Ptr CUInt
decorations
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
decorations' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
decorations
let decorations'' :: [WMDecoration]
decorations'' = CUInt -> [WMDecoration]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
decorations'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
decorations
(Bool, [WMDecoration]) -> IO (Bool, [WMDecoration])
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', [WMDecoration]
decorations'')
#if defined(ENABLE_OVERLOADING)
data WindowGetDecorationsMethodInfo
instance (signature ~ (m ((Bool, [Gdk.Flags.WMDecoration]))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDecorationsMethodInfo a signature where
overloadedMethod = windowGetDecorations
#endif
foreign import ccall "gdk_window_get_device_cursor" gdk_window_get_device_cursor ::
Ptr Window ->
Ptr Gdk.Device.Device ->
IO (Ptr Gdk.Cursor.Cursor)
windowGetDeviceCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> m (Maybe Gdk.Cursor.Cursor)
windowGetDeviceCursor :: a -> b -> m (Maybe Cursor)
windowGetDeviceCursor a
window b
device = IO (Maybe Cursor) -> m (Maybe Cursor)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Cursor) -> m (Maybe Cursor))
-> IO (Maybe Cursor) -> m (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Cursor
result <- Ptr Window -> Ptr Device -> IO (Ptr Cursor)
gdk_window_get_device_cursor Ptr Window
window' Ptr Device
device'
Maybe Cursor
maybeResult <- Ptr Cursor -> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Cursor
result ((Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor))
-> (Ptr Cursor -> IO Cursor) -> IO (Maybe Cursor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cursor
result' -> do
Cursor
result'' <- ((ManagedPtr Cursor -> Cursor) -> Ptr Cursor -> IO Cursor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor) Ptr Cursor
result'
Cursor -> IO Cursor
forall (m :: * -> *) a. Monad m => a -> m a
return Cursor
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult
#if defined(ENABLE_OVERLOADING)
data WindowGetDeviceCursorMethodInfo
instance (signature ~ (b -> m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDeviceCursorMethodInfo a signature where
overloadedMethod = windowGetDeviceCursor
#endif
foreign import ccall "gdk_window_get_device_events" gdk_window_get_device_events ::
Ptr Window ->
Ptr Gdk.Device.Device ->
IO CUInt
windowGetDeviceEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> m [Gdk.Flags.EventMask]
windowGetDeviceEvents :: a -> b -> m [EventMask]
windowGetDeviceEvents a
window b
device = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
CUInt
result <- Ptr Window -> Ptr Device -> IO CUInt
gdk_window_get_device_events Ptr Window
window' Ptr Device
device'
let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
[EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetDeviceEventsMethodInfo
instance (signature ~ (b -> m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDeviceEventsMethodInfo a signature where
overloadedMethod = windowGetDeviceEvents
#endif
foreign import ccall "gdk_window_get_device_position" gdk_window_get_device_position ::
Ptr Window ->
Ptr Gdk.Device.Device ->
Ptr Int32 ->
Ptr Int32 ->
Ptr CUInt ->
IO (Ptr Window)
windowGetDevicePosition ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))
windowGetDevicePosition :: a -> b -> m (Maybe Window, Int32, Int32, [ModifierType])
windowGetDevicePosition a
window b
device = IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType]))
-> IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Window
result <- Ptr Window
-> Ptr Device
-> Ptr Int32
-> Ptr Int32
-> Ptr CUInt
-> IO (Ptr Window)
gdk_window_get_device_position Ptr Window
window' Ptr Device
device' Ptr Int32
x Ptr Int32
y Ptr CUInt
mask
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
(Maybe Window, Int32, Int32, [ModifierType])
-> IO (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Int32
x', Int32
y', [ModifierType]
mask'')
#if defined(ENABLE_OVERLOADING)
data WindowGetDevicePositionMethodInfo
instance (signature ~ (b -> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDevicePositionMethodInfo a signature where
overloadedMethod = windowGetDevicePosition
#endif
foreign import ccall "gdk_window_get_device_position_double" gdk_window_get_device_position_double ::
Ptr Window ->
Ptr Gdk.Device.Device ->
Ptr CDouble ->
Ptr CDouble ->
Ptr CUInt ->
IO (Ptr Window)
windowGetDevicePositionDouble ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> m ((Maybe Window, Double, Double, [Gdk.Flags.ModifierType]))
windowGetDevicePositionDouble :: a -> b -> m (Maybe Window, Double, Double, [ModifierType])
windowGetDevicePositionDouble a
window b
device = IO (Maybe Window, Double, Double, [ModifierType])
-> m (Maybe Window, Double, Double, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Double, Double, [ModifierType])
-> m (Maybe Window, Double, Double, [ModifierType]))
-> IO (Maybe Window, Double, Double, [ModifierType])
-> m (Maybe Window, Double, Double, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr CDouble
x <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CDouble
y <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Window
result <- Ptr Window
-> Ptr Device
-> Ptr CDouble
-> Ptr CDouble
-> Ptr CUInt
-> IO (Ptr Window)
gdk_window_get_device_position_double Ptr Window
window' Ptr Device
device' Ptr CDouble
x Ptr CDouble
y Ptr CUInt
mask
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
CDouble
x' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
x
let x'' :: Double
x'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x'
CDouble
y' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
y
let y'' :: Double
y'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y'
CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
x
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
y
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
(Maybe Window, Double, Double, [ModifierType])
-> IO (Maybe Window, Double, Double, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Double
x'', Double
y'', [ModifierType]
mask'')
#if defined(ENABLE_OVERLOADING)
data WindowGetDevicePositionDoubleMethodInfo
instance (signature ~ (b -> m ((Maybe Window, Double, Double, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowGetDevicePositionDoubleMethodInfo a signature where
overloadedMethod = windowGetDevicePositionDouble
#endif
foreign import ccall "gdk_window_get_display" gdk_window_get_display ::
Ptr Window ->
IO (Ptr Gdk.Display.Display)
windowGetDisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Display.Display
windowGetDisplay :: a -> m Display
windowGetDisplay a
window = IO Display -> m Display
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Display -> m Display) -> IO Display -> m Display
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Display
result <- Ptr Window -> IO (Ptr Display)
gdk_window_get_display Ptr Window
window'
Text -> Ptr Display -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetDisplay" Ptr Display
result
Display
result' <- ((ManagedPtr Display -> Display) -> Ptr Display -> IO Display
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Display -> Display
Gdk.Display.Display) Ptr Display
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDisplayMethodInfo a signature where
overloadedMethod = windowGetDisplay
#endif
foreign import ccall "gdk_window_get_drag_protocol" gdk_window_get_drag_protocol ::
Ptr Window ->
Ptr (Ptr Window) ->
IO CUInt
windowGetDragProtocol ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Gdk.Enums.DragProtocol, Window))
windowGetDragProtocol :: a -> m (DragProtocol, Window)
windowGetDragProtocol a
window = IO (DragProtocol, Window) -> m (DragProtocol, Window)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (DragProtocol, Window) -> m (DragProtocol, Window))
-> IO (DragProtocol, Window) -> m (DragProtocol, Window)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr (Ptr Window)
target <- IO (Ptr (Ptr Window))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Window))
CUInt
result <- Ptr Window -> Ptr (Ptr Window) -> IO CUInt
gdk_window_get_drag_protocol Ptr Window
window' Ptr (Ptr Window)
target
let result' :: DragProtocol
result' = (Int -> DragProtocol
forall a. Enum a => Int -> a
toEnum (Int -> DragProtocol) -> (CUInt -> Int) -> CUInt -> DragProtocol
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
Ptr Window
target' <- Ptr (Ptr Window) -> IO (Ptr Window)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Window)
target
Window
target'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Window -> Window
Window) Ptr Window
target'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr (Ptr Window) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Window)
target
(DragProtocol, Window) -> IO (DragProtocol, Window)
forall (m :: * -> *) a. Monad m => a -> m a
return (DragProtocol
result', Window
target'')
#if defined(ENABLE_OVERLOADING)
data WindowGetDragProtocolMethodInfo
instance (signature ~ (m ((Gdk.Enums.DragProtocol, Window))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetDragProtocolMethodInfo a signature where
overloadedMethod = windowGetDragProtocol
#endif
foreign import ccall "gdk_window_get_effective_parent" gdk_window_get_effective_parent ::
Ptr Window ->
IO (Ptr Window)
windowGetEffectiveParent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Window
windowGetEffectiveParent :: a -> m Window
windowGetEffectiveParent a
window = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_effective_parent Ptr Window
window'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetEffectiveParent" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetEffectiveParentMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEffectiveParentMethodInfo a signature where
overloadedMethod = windowGetEffectiveParent
#endif
foreign import ccall "gdk_window_get_effective_toplevel" gdk_window_get_effective_toplevel ::
Ptr Window ->
IO (Ptr Window)
windowGetEffectiveToplevel ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Window
windowGetEffectiveToplevel :: a -> m Window
windowGetEffectiveToplevel a
window = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_effective_toplevel Ptr Window
window'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetEffectiveToplevel" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetEffectiveToplevelMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEffectiveToplevelMethodInfo a signature where
overloadedMethod = windowGetEffectiveToplevel
#endif
foreign import ccall "gdk_window_get_event_compression" gdk_window_get_event_compression ::
Ptr Window ->
IO CInt
windowGetEventCompression ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetEventCompression :: a -> m Bool
windowGetEventCompression a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_event_compression Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetEventCompressionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEventCompressionMethodInfo a signature where
overloadedMethod = windowGetEventCompression
#endif
foreign import ccall "gdk_window_get_events" gdk_window_get_events ::
Ptr Window ->
IO CUInt
windowGetEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m [Gdk.Flags.EventMask]
windowGetEvents :: a -> m [EventMask]
windowGetEvents a
window = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_events Ptr Window
window'
let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetEventsMethodInfo
instance (signature ~ (m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetEventsMethodInfo a signature where
overloadedMethod = windowGetEvents
#endif
foreign import ccall "gdk_window_get_focus_on_map" gdk_window_get_focus_on_map ::
Ptr Window ->
IO CInt
windowGetFocusOnMap ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetFocusOnMap :: a -> m Bool
windowGetFocusOnMap a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_focus_on_map Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetFocusOnMapMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFocusOnMapMethodInfo a signature where
overloadedMethod = windowGetFocusOnMap
#endif
foreign import ccall "gdk_window_get_frame_clock" gdk_window_get_frame_clock ::
Ptr Window ->
IO (Ptr Gdk.FrameClock.FrameClock)
windowGetFrameClock ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.FrameClock.FrameClock
windowGetFrameClock :: a -> m FrameClock
windowGetFrameClock a
window = IO FrameClock -> m FrameClock
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FrameClock -> m FrameClock) -> IO FrameClock -> m FrameClock
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr FrameClock
result <- Ptr Window -> IO (Ptr FrameClock)
gdk_window_get_frame_clock Ptr Window
window'
Text -> Ptr FrameClock -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetFrameClock" Ptr FrameClock
result
FrameClock
result' <- ((ManagedPtr FrameClock -> FrameClock)
-> Ptr FrameClock -> IO FrameClock
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock) Ptr FrameClock
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
FrameClock -> IO FrameClock
forall (m :: * -> *) a. Monad m => a -> m a
return FrameClock
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetFrameClockMethodInfo
instance (signature ~ (m Gdk.FrameClock.FrameClock), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFrameClockMethodInfo a signature where
overloadedMethod = windowGetFrameClock
#endif
foreign import ccall "gdk_window_get_frame_extents" gdk_window_get_frame_extents ::
Ptr Window ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
windowGetFrameExtents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m (Gdk.Rectangle.Rectangle)
windowGetFrameExtents :: a -> m Rectangle
windowGetFrameExtents a
window = IO Rectangle -> m Rectangle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Rectangle -> m Rectangle) -> IO Rectangle -> m Rectangle
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Rectangle
rect <- Int -> IO (Ptr Rectangle)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
16 :: IO (Ptr Gdk.Rectangle.Rectangle)
Ptr Window -> Ptr Rectangle -> IO ()
gdk_window_get_frame_extents Ptr Window
window' Ptr Rectangle
rect
Rectangle
rect' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Rectangle -> Rectangle
Gdk.Rectangle.Rectangle) Ptr Rectangle
rect
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
rect'
#if defined(ENABLE_OVERLOADING)
data WindowGetFrameExtentsMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFrameExtentsMethodInfo a signature where
overloadedMethod = windowGetFrameExtents
#endif
foreign import ccall "gdk_window_get_fullscreen_mode" gdk_window_get_fullscreen_mode ::
Ptr Window ->
IO CUInt
windowGetFullscreenMode ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Enums.FullscreenMode
windowGetFullscreenMode :: a -> m FullscreenMode
windowGetFullscreenMode a
window = IO FullscreenMode -> m FullscreenMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FullscreenMode -> m FullscreenMode)
-> IO FullscreenMode -> m FullscreenMode
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_fullscreen_mode Ptr Window
window'
let result' :: FullscreenMode
result' = (Int -> FullscreenMode
forall a. Enum a => Int -> a
toEnum (Int -> FullscreenMode)
-> (CUInt -> Int) -> CUInt -> FullscreenMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
FullscreenMode -> IO FullscreenMode
forall (m :: * -> *) a. Monad m => a -> m a
return FullscreenMode
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetFullscreenModeMethodInfo
instance (signature ~ (m Gdk.Enums.FullscreenMode), MonadIO m, IsWindow a) => O.MethodInfo WindowGetFullscreenModeMethodInfo a signature where
overloadedMethod = windowGetFullscreenMode
#endif
foreign import ccall "gdk_window_get_geometry" gdk_window_get_geometry ::
Ptr Window ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
windowGetGeometry ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Int32, Int32, Int32, Int32))
windowGetGeometry :: a -> m (Int32, Int32, Int32, Int32)
windowGetGeometry a
window = IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32, Int32) -> m (Int32, Int32, Int32, Int32))
-> IO (Int32, Int32, Int32, Int32)
-> m (Int32, Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
width <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
height <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Window
-> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_geometry Ptr Window
window' Ptr Int32
x Ptr Int32
y Ptr Int32
width Ptr Int32
height
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
Int32
width' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
width
Int32
height' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
height
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
width
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
height
(Int32, Int32, Int32, Int32) -> IO (Int32, Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y', Int32
width', Int32
height')
#if defined(ENABLE_OVERLOADING)
data WindowGetGeometryMethodInfo
instance (signature ~ (m ((Int32, Int32, Int32, Int32))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetGeometryMethodInfo a signature where
overloadedMethod = windowGetGeometry
#endif
foreign import ccall "gdk_window_get_group" gdk_window_get_group ::
Ptr Window ->
IO (Ptr Window)
windowGetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Window
windowGetGroup :: a -> m Window
windowGetGroup a
window = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_group Ptr Window
window'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetGroup" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetGroupMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetGroupMethodInfo a signature where
overloadedMethod = windowGetGroup
#endif
foreign import ccall "gdk_window_get_height" gdk_window_get_height ::
Ptr Window ->
IO Int32
windowGetHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Int32
windowGetHeight :: a -> m Int32
windowGetHeight a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Int32
result <- Ptr Window -> IO Int32
gdk_window_get_height Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data WindowGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWindow a) => O.MethodInfo WindowGetHeightMethodInfo a signature where
overloadedMethod = windowGetHeight
#endif
foreign import ccall "gdk_window_get_modal_hint" gdk_window_get_modal_hint ::
Ptr Window ->
IO CInt
windowGetModalHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetModalHint :: a -> m Bool
windowGetModalHint a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_modal_hint Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetModalHintMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetModalHintMethodInfo a signature where
overloadedMethod = windowGetModalHint
#endif
foreign import ccall "gdk_window_get_origin" gdk_window_get_origin ::
Ptr Window ->
Ptr Int32 ->
Ptr Int32 ->
IO Int32
windowGetOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Int32, Int32, Int32))
windowGetOrigin :: a -> m (Int32, Int32, Int32)
windowGetOrigin a
window = IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32))
-> IO (Int32, Int32, Int32) -> m (Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Int32
result <- Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO Int32
gdk_window_get_origin Ptr Window
window' Ptr Int32
x Ptr Int32
y
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
(Int32, Int32, Int32) -> IO (Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
result, Int32
x', Int32
y')
#if defined(ENABLE_OVERLOADING)
data WindowGetOriginMethodInfo
instance (signature ~ (m ((Int32, Int32, Int32))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetOriginMethodInfo a signature where
overloadedMethod = windowGetOrigin
#endif
foreign import ccall "gdk_window_get_parent" gdk_window_get_parent ::
Ptr Window ->
IO (Ptr Window)
windowGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Window
windowGetParent :: a -> m Window
windowGetParent a
window = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_parent Ptr Window
window'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetParent" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetParentMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetParentMethodInfo a signature where
overloadedMethod = windowGetParent
#endif
foreign import ccall "gdk_window_get_pass_through" gdk_window_get_pass_through ::
Ptr Window ->
IO CInt
windowGetPassThrough ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetPassThrough :: a -> m Bool
windowGetPassThrough a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_pass_through Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetPassThroughMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPassThroughMethodInfo a signature where
overloadedMethod = windowGetPassThrough
#endif
foreign import ccall "gdk_window_get_pointer" gdk_window_get_pointer ::
Ptr Window ->
Ptr Int32 ->
Ptr Int32 ->
Ptr CUInt ->
IO (Ptr Window)
{-# DEPRECATED windowGetPointer ["(Since version 3.0)","Use 'GI.Gdk.Objects.Window.windowGetDevicePosition' instead."] #-}
windowGetPointer ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))
windowGetPointer :: a -> m (Maybe Window, Int32, Int32, [ModifierType])
windowGetPointer a
window = IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType]))
-> IO (Maybe Window, Int32, Int32, [ModifierType])
-> m (Maybe Window, Int32, Int32, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr CUInt
mask <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Window
result <- Ptr Window
-> Ptr Int32 -> Ptr Int32 -> Ptr CUInt -> IO (Ptr Window)
gdk_window_get_pointer Ptr Window
window' Ptr Int32
x Ptr Int32
y Ptr CUInt
mask
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result'
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
CUInt
mask' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mask
let mask'' :: [ModifierType]
mask'' = CUInt -> [ModifierType]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
mask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mask
(Maybe Window, Int32, Int32, [ModifierType])
-> IO (Maybe Window, Int32, Int32, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Window
maybeResult, Int32
x', Int32
y', [ModifierType]
mask'')
#if defined(ENABLE_OVERLOADING)
data WindowGetPointerMethodInfo
instance (signature ~ (m ((Maybe Window, Int32, Int32, [Gdk.Flags.ModifierType]))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPointerMethodInfo a signature where
overloadedMethod = windowGetPointer
#endif
foreign import ccall "gdk_window_get_position" gdk_window_get_position ::
Ptr Window ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
windowGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Int32, Int32))
windowGetPosition :: a -> m (Int32, Int32)
windowGetPosition a
window = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_position Ptr Window
window' Ptr Int32
x Ptr Int32
y
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
(Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')
#if defined(ENABLE_OVERLOADING)
data WindowGetPositionMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetPositionMethodInfo a signature where
overloadedMethod = windowGetPosition
#endif
foreign import ccall "gdk_window_get_root_coords" gdk_window_get_root_coords ::
Ptr Window ->
Int32 ->
Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
windowGetRootCoords ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> m ((Int32, Int32))
windowGetRootCoords :: a -> Int32 -> Int32 -> m (Int32, Int32)
windowGetRootCoords a
window Int32
x Int32
y = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
rootX <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
rootY <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Window -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_root_coords Ptr Window
window' Int32
x Int32
y Ptr Int32
rootX Ptr Int32
rootY
Int32
rootX' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
rootX
Int32
rootY' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
rootY
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
rootX
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
rootY
(Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
rootX', Int32
rootY')
#if defined(ENABLE_OVERLOADING)
data WindowGetRootCoordsMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ((Int32, Int32))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetRootCoordsMethodInfo a signature where
overloadedMethod = windowGetRootCoords
#endif
foreign import ccall "gdk_window_get_root_origin" gdk_window_get_root_origin ::
Ptr Window ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
windowGetRootOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Int32, Int32))
windowGetRootOrigin :: a -> m (Int32, Int32)
windowGetRootOrigin a
window = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Int32
x <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
y <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Window -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_get_root_origin Ptr Window
window' Ptr Int32
x Ptr Int32
y
Int32
x' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
x
Int32
y' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
x
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
y
(Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
x', Int32
y')
#if defined(ENABLE_OVERLOADING)
data WindowGetRootOriginMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetRootOriginMethodInfo a signature where
overloadedMethod = windowGetRootOrigin
#endif
foreign import ccall "gdk_window_get_scale_factor" gdk_window_get_scale_factor ::
Ptr Window ->
IO Int32
windowGetScaleFactor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Int32
windowGetScaleFactor :: a -> m Int32
windowGetScaleFactor a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Int32
result <- Ptr Window -> IO Int32
gdk_window_get_scale_factor Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data WindowGetScaleFactorMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWindow a) => O.MethodInfo WindowGetScaleFactorMethodInfo a signature where
overloadedMethod = windowGetScaleFactor
#endif
foreign import ccall "gdk_window_get_screen" gdk_window_get_screen ::
Ptr Window ->
IO (Ptr Gdk.Screen.Screen)
windowGetScreen ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Screen.Screen
windowGetScreen :: a -> m Screen
windowGetScreen a
window = IO Screen -> m Screen
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Screen -> m Screen) -> IO Screen -> m Screen
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Screen
result <- Ptr Window -> IO (Ptr Screen)
gdk_window_get_screen Ptr Window
window'
Text -> Ptr Screen -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetScreen" Ptr Screen
result
Screen
result' <- ((ManagedPtr Screen -> Screen) -> Ptr Screen -> IO Screen
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Screen -> Screen
Gdk.Screen.Screen) Ptr Screen
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Screen -> IO Screen
forall (m :: * -> *) a. Monad m => a -> m a
return Screen
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetScreenMethodInfo
instance (signature ~ (m Gdk.Screen.Screen), MonadIO m, IsWindow a) => O.MethodInfo WindowGetScreenMethodInfo a signature where
overloadedMethod = windowGetScreen
#endif
foreign import ccall "gdk_window_get_source_events" gdk_window_get_source_events ::
Ptr Window ->
CUInt ->
IO CUInt
windowGetSourceEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Enums.InputSource
-> m [Gdk.Flags.EventMask]
windowGetSourceEvents :: a -> InputSource -> m [EventMask]
windowGetSourceEvents a
window InputSource
source = IO [EventMask] -> m [EventMask]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [EventMask] -> m [EventMask])
-> IO [EventMask] -> m [EventMask]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let source' :: CUInt
source' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (InputSource -> Int) -> InputSource -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. InputSource -> Int
forall a. Enum a => a -> Int
fromEnum) InputSource
source
CUInt
result <- Ptr Window -> CUInt -> IO CUInt
gdk_window_get_source_events Ptr Window
window' CUInt
source'
let result' :: [EventMask]
result' = CUInt -> [EventMask]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[EventMask] -> IO [EventMask]
forall (m :: * -> *) a. Monad m => a -> m a
return [EventMask]
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetSourceEventsMethodInfo
instance (signature ~ (Gdk.Enums.InputSource -> m [Gdk.Flags.EventMask]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetSourceEventsMethodInfo a signature where
overloadedMethod = windowGetSourceEvents
#endif
foreign import ccall "gdk_window_get_state" gdk_window_get_state ::
Ptr Window ->
IO CUInt
windowGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m [Gdk.Flags.WindowState]
windowGetState :: a -> m [WindowState]
windowGetState a
window = IO [WindowState] -> m [WindowState]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [WindowState] -> m [WindowState])
-> IO [WindowState] -> m [WindowState]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_state Ptr Window
window'
let result' :: [WindowState]
result' = CUInt -> [WindowState]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[WindowState] -> IO [WindowState]
forall (m :: * -> *) a. Monad m => a -> m a
return [WindowState]
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetStateMethodInfo
instance (signature ~ (m [Gdk.Flags.WindowState]), MonadIO m, IsWindow a) => O.MethodInfo WindowGetStateMethodInfo a signature where
overloadedMethod = windowGetState
#endif
foreign import ccall "gdk_window_get_support_multidevice" gdk_window_get_support_multidevice ::
Ptr Window ->
IO CInt
windowGetSupportMultidevice ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowGetSupportMultidevice :: a -> m Bool
windowGetSupportMultidevice a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_get_support_multidevice Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetSupportMultideviceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowGetSupportMultideviceMethodInfo a signature where
overloadedMethod = windowGetSupportMultidevice
#endif
foreign import ccall "gdk_window_get_toplevel" gdk_window_get_toplevel ::
Ptr Window ->
IO (Ptr Window)
windowGetToplevel ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Window
windowGetToplevel :: a -> m Window
windowGetToplevel a
window = IO Window -> m Window
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
result <- Ptr Window -> IO (Ptr Window)
gdk_window_get_toplevel Ptr Window
window'
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetToplevel" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Window -> IO Window
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetToplevelMethodInfo
instance (signature ~ (m Window), MonadIO m, IsWindow a) => O.MethodInfo WindowGetToplevelMethodInfo a signature where
overloadedMethod = windowGetToplevel
#endif
foreign import ccall "gdk_window_get_type_hint" gdk_window_get_type_hint ::
Ptr Window ->
IO CUInt
windowGetTypeHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Enums.WindowTypeHint
windowGetTypeHint :: a -> m WindowTypeHint
windowGetTypeHint a
window = IO WindowTypeHint -> m WindowTypeHint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WindowTypeHint -> m WindowTypeHint)
-> IO WindowTypeHint -> m WindowTypeHint
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_type_hint Ptr Window
window'
let result' :: WindowTypeHint
result' = (Int -> WindowTypeHint
forall a. Enum a => Int -> a
toEnum (Int -> WindowTypeHint)
-> (CUInt -> Int) -> CUInt -> WindowTypeHint
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
WindowTypeHint -> IO WindowTypeHint
forall (m :: * -> *) a. Monad m => a -> m a
return WindowTypeHint
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetTypeHintMethodInfo
instance (signature ~ (m Gdk.Enums.WindowTypeHint), MonadIO m, IsWindow a) => O.MethodInfo WindowGetTypeHintMethodInfo a signature where
overloadedMethod = windowGetTypeHint
#endif
foreign import ccall "gdk_window_get_update_area" gdk_window_get_update_area ::
Ptr Window ->
IO (Ptr Cairo.Region.Region)
windowGetUpdateArea ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Cairo.Region.Region
windowGetUpdateArea :: a -> m Region
windowGetUpdateArea a
window = IO Region -> m Region
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
result <- Ptr Window -> IO (Ptr Region)
gdk_window_get_update_area Ptr Window
window'
Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetUpdateArea" Ptr Region
result
Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO Region
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetUpdateAreaMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetUpdateAreaMethodInfo a signature where
overloadedMethod = windowGetUpdateArea
#endif
foreign import ccall "gdk_window_get_user_data" gdk_window_get_user_data ::
Ptr Window ->
Ptr (Ptr ()) ->
IO ()
windowGetUserData ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ((Ptr ()))
windowGetUserData :: a -> m (Ptr ())
windowGetUserData a
window = IO (Ptr ()) -> m (Ptr ())
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ())
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr (Ptr ())
data_ <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr ()))
Ptr Window -> Ptr (Ptr ()) -> IO ()
gdk_window_get_user_data Ptr Window
window' Ptr (Ptr ())
data_
Ptr ()
data_' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
data_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
data_
Ptr () -> IO (Ptr ())
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ()
data_'
#if defined(ENABLE_OVERLOADING)
data WindowGetUserDataMethodInfo
instance (signature ~ (m ((Ptr ()))), MonadIO m, IsWindow a) => O.MethodInfo WindowGetUserDataMethodInfo a signature where
overloadedMethod = windowGetUserData
#endif
foreign import ccall "gdk_window_get_visible_region" gdk_window_get_visible_region ::
Ptr Window ->
IO (Ptr Cairo.Region.Region)
windowGetVisibleRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Cairo.Region.Region
windowGetVisibleRegion :: a -> m Region
windowGetVisibleRegion a
window = IO Region -> m Region
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Region -> m Region) -> IO Region -> m Region
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
result <- Ptr Window -> IO (Ptr Region)
gdk_window_get_visible_region Ptr Window
window'
Text -> Ptr Region -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetVisibleRegion" Ptr Region
result
Region
result' <- ((ManagedPtr Region -> Region) -> Ptr Region -> IO Region
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Region -> Region
Cairo.Region.Region) Ptr Region
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO Region
forall (m :: * -> *) a. Monad m => a -> m a
return Region
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetVisibleRegionMethodInfo
instance (signature ~ (m Cairo.Region.Region), MonadIO m, IsWindow a) => O.MethodInfo WindowGetVisibleRegionMethodInfo a signature where
overloadedMethod = windowGetVisibleRegion
#endif
foreign import ccall "gdk_window_get_visual" gdk_window_get_visual ::
Ptr Window ->
IO (Ptr Gdk.Visual.Visual)
windowGetVisual ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Visual.Visual
windowGetVisual :: a -> m Visual
windowGetVisual a
window = IO Visual -> m Visual
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Visual -> m Visual) -> IO Visual -> m Visual
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Visual
result <- Ptr Window -> IO (Ptr Visual)
gdk_window_get_visual Ptr Window
window'
Text -> Ptr Visual -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowGetVisual" Ptr Visual
result
Visual
result' <- ((ManagedPtr Visual -> Visual) -> Ptr Visual -> IO Visual
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Visual -> Visual
Gdk.Visual.Visual) Ptr Visual
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Visual -> IO Visual
forall (m :: * -> *) a. Monad m => a -> m a
return Visual
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetVisualMethodInfo
instance (signature ~ (m Gdk.Visual.Visual), MonadIO m, IsWindow a) => O.MethodInfo WindowGetVisualMethodInfo a signature where
overloadedMethod = windowGetVisual
#endif
foreign import ccall "gdk_window_get_width" gdk_window_get_width ::
Ptr Window ->
IO Int32
windowGetWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Int32
windowGetWidth :: a -> m Int32
windowGetWidth a
window = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Int32
result <- Ptr Window -> IO Int32
gdk_window_get_width Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data WindowGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsWindow a) => O.MethodInfo WindowGetWidthMethodInfo a signature where
overloadedMethod = windowGetWidth
#endif
foreign import ccall "gdk_window_get_window_type" gdk_window_get_window_type ::
Ptr Window ->
IO CUInt
windowGetWindowType ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Gdk.Enums.WindowType
windowGetWindowType :: a -> m WindowType
windowGetWindowType a
window = IO WindowType -> m WindowType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WindowType -> m WindowType) -> IO WindowType -> m WindowType
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CUInt
result <- Ptr Window -> IO CUInt
gdk_window_get_window_type Ptr Window
window'
let result' :: WindowType
result' = (Int -> WindowType
forall a. Enum a => Int -> a
toEnum (Int -> WindowType) -> (CUInt -> Int) -> CUInt -> WindowType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
WindowType -> IO WindowType
forall (m :: * -> *) a. Monad m => a -> m a
return WindowType
result'
#if defined(ENABLE_OVERLOADING)
data WindowGetWindowTypeMethodInfo
instance (signature ~ (m Gdk.Enums.WindowType), MonadIO m, IsWindow a) => O.MethodInfo WindowGetWindowTypeMethodInfo a signature where
overloadedMethod = windowGetWindowType
#endif
foreign import ccall "gdk_window_has_native" gdk_window_has_native ::
Ptr Window ->
IO CInt
windowHasNative ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowHasNative :: a -> m Bool
windowHasNative a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_has_native Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowHasNativeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowHasNativeMethodInfo a signature where
overloadedMethod = windowHasNative
#endif
foreign import ccall "gdk_window_hide" gdk_window_hide ::
Ptr Window ->
IO ()
windowHide ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowHide :: a -> m ()
windowHide a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_hide Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowHideMethodInfo a signature where
overloadedMethod = windowHide
#endif
foreign import ccall "gdk_window_iconify" gdk_window_iconify ::
Ptr Window ->
IO ()
windowIconify ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowIconify :: a -> m ()
windowIconify a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_iconify Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowIconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowIconifyMethodInfo a signature where
overloadedMethod = windowIconify
#endif
foreign import ccall "gdk_window_input_shape_combine_region" gdk_window_input_shape_combine_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
Int32 ->
Int32 ->
IO ()
windowInputShapeCombineRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> Int32
-> Int32
-> m ()
windowInputShapeCombineRegion :: a -> Region -> Int32 -> Int32 -> m ()
windowInputShapeCombineRegion a
window Region
shapeRegion Int32
offsetX Int32
offsetY = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
shapeRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
shapeRegion
Ptr Window -> Ptr Region -> Int32 -> Int32 -> IO ()
gdk_window_input_shape_combine_region Ptr Window
window' Ptr Region
shapeRegion' Int32
offsetX Int32
offsetY
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
shapeRegion
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowInputShapeCombineRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInputShapeCombineRegionMethodInfo a signature where
overloadedMethod = windowInputShapeCombineRegion
#endif
foreign import ccall "gdk_window_invalidate_maybe_recurse" gdk_window_invalidate_maybe_recurse ::
Ptr Window ->
Ptr Cairo.Region.Region ->
FunPtr Gdk.Callbacks.C_WindowChildFunc ->
Ptr () ->
IO ()
windowInvalidateMaybeRecurse ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> Maybe (Gdk.Callbacks.WindowChildFunc)
-> m ()
windowInvalidateMaybeRecurse :: a -> Region -> Maybe WindowChildFunc -> m ()
windowInvalidateMaybeRecurse a
window Region
region Maybe WindowChildFunc
childFunc = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
FunPtr C_WindowChildFunc
maybeChildFunc <- case Maybe WindowChildFunc
childFunc of
Maybe WindowChildFunc
Nothing -> FunPtr C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_WindowChildFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just WindowChildFunc
jChildFunc -> do
FunPtr C_WindowChildFunc
jChildFunc' <- C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
Gdk.Callbacks.mk_WindowChildFunc (Maybe (Ptr (FunPtr C_WindowChildFunc))
-> WindowChildFunc_WithClosures -> C_WindowChildFunc
Gdk.Callbacks.wrap_WindowChildFunc Maybe (Ptr (FunPtr C_WindowChildFunc))
forall a. Maybe a
Nothing (WindowChildFunc -> WindowChildFunc_WithClosures
Gdk.Callbacks.drop_closures_WindowChildFunc WindowChildFunc
jChildFunc))
FunPtr C_WindowChildFunc -> IO (FunPtr C_WindowChildFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_WindowChildFunc
jChildFunc'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr Window
-> Ptr Region -> FunPtr C_WindowChildFunc -> Ptr () -> IO ()
gdk_window_invalidate_maybe_recurse Ptr Window
window' Ptr Region
region' FunPtr C_WindowChildFunc
maybeChildFunc Ptr ()
forall a. Ptr a
userData
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_WindowChildFunc -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_WindowChildFunc
maybeChildFunc
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowInvalidateMaybeRecurseMethodInfo
instance (signature ~ (Cairo.Region.Region -> Maybe (Gdk.Callbacks.WindowChildFunc) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInvalidateMaybeRecurseMethodInfo a signature where
overloadedMethod = windowInvalidateMaybeRecurse
#endif
foreign import ccall "gdk_window_invalidate_rect" gdk_window_invalidate_rect ::
Ptr Window ->
Ptr Gdk.Rectangle.Rectangle ->
CInt ->
IO ()
windowInvalidateRect ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Maybe (Gdk.Rectangle.Rectangle)
-> Bool
-> m ()
windowInvalidateRect :: a -> Maybe Rectangle -> Bool -> m ()
windowInvalidateRect a
window Maybe Rectangle
rect Bool
invalidateChildren = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Rectangle
maybeRect <- case Maybe Rectangle
rect of
Maybe Rectangle
Nothing -> Ptr Rectangle -> IO (Ptr Rectangle)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Rectangle
forall a. Ptr a
nullPtr
Just Rectangle
jRect -> do
Ptr Rectangle
jRect' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
jRect
Ptr Rectangle -> IO (Ptr Rectangle)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Rectangle
jRect'
let invalidateChildren' :: CInt
invalidateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
invalidateChildren
Ptr Window -> Ptr Rectangle -> CInt -> IO ()
gdk_window_invalidate_rect Ptr Window
window' Ptr Rectangle
maybeRect CInt
invalidateChildren'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Rectangle -> (Rectangle -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Rectangle
rect Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowInvalidateRectMethodInfo
instance (signature ~ (Maybe (Gdk.Rectangle.Rectangle) -> Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInvalidateRectMethodInfo a signature where
overloadedMethod = windowInvalidateRect
#endif
foreign import ccall "gdk_window_invalidate_region" gdk_window_invalidate_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
CInt ->
IO ()
windowInvalidateRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> Bool
-> m ()
windowInvalidateRegion :: a -> Region -> Bool -> m ()
windowInvalidateRegion a
window Region
region Bool
invalidateChildren = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
let invalidateChildren' :: CInt
invalidateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
invalidateChildren
Ptr Window -> Ptr Region -> CInt -> IO ()
gdk_window_invalidate_region Ptr Window
window' Ptr Region
region' CInt
invalidateChildren'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowInvalidateRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowInvalidateRegionMethodInfo a signature where
overloadedMethod = windowInvalidateRegion
#endif
foreign import ccall "gdk_window_is_destroyed" gdk_window_is_destroyed ::
Ptr Window ->
IO CInt
windowIsDestroyed ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowIsDestroyed :: a -> m Bool
windowIsDestroyed a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_is_destroyed Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowIsDestroyedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsDestroyedMethodInfo a signature where
overloadedMethod = windowIsDestroyed
#endif
foreign import ccall "gdk_window_is_input_only" gdk_window_is_input_only ::
Ptr Window ->
IO CInt
windowIsInputOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowIsInputOnly :: a -> m Bool
windowIsInputOnly a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_is_input_only Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowIsInputOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsInputOnlyMethodInfo a signature where
overloadedMethod = windowIsInputOnly
#endif
foreign import ccall "gdk_window_is_shaped" gdk_window_is_shaped ::
Ptr Window ->
IO CInt
windowIsShaped ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowIsShaped :: a -> m Bool
windowIsShaped a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_is_shaped Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowIsShapedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsShapedMethodInfo a signature where
overloadedMethod = windowIsShaped
#endif
foreign import ccall "gdk_window_is_viewable" gdk_window_is_viewable ::
Ptr Window ->
IO CInt
windowIsViewable ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowIsViewable :: a -> m Bool
windowIsViewable a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_is_viewable Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowIsViewableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsViewableMethodInfo a signature where
overloadedMethod = windowIsViewable
#endif
foreign import ccall "gdk_window_is_visible" gdk_window_is_visible ::
Ptr Window ->
IO CInt
windowIsVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m Bool
windowIsVisible :: a -> m Bool
windowIsVisible a
window = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
CInt
result <- Ptr Window -> IO CInt
gdk_window_is_visible Ptr Window
window'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowIsVisibleMethodInfo a signature where
overloadedMethod = windowIsVisible
#endif
foreign import ccall "gdk_window_lower" gdk_window_lower ::
Ptr Window ->
IO ()
windowLower ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowLower :: a -> m ()
windowLower a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_lower Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowLowerMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowLowerMethodInfo a signature where
overloadedMethod = windowLower
#endif
foreign import ccall "gdk_window_mark_paint_from_clip" gdk_window_mark_paint_from_clip ::
Ptr Window ->
Ptr Cairo.Context.Context ->
IO ()
windowMarkPaintFromClip ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Context.Context
-> m ()
windowMarkPaintFromClip :: a -> Context -> m ()
windowMarkPaintFromClip a
window Context
cr = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Context
cr' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
cr
Ptr Window -> Ptr Context -> IO ()
gdk_window_mark_paint_from_clip Ptr Window
window' Ptr Context
cr'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
cr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMarkPaintFromClipMethodInfo
instance (signature ~ (Cairo.Context.Context -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMarkPaintFromClipMethodInfo a signature where
overloadedMethod = windowMarkPaintFromClip
#endif
foreign import ccall "gdk_window_maximize" gdk_window_maximize ::
Ptr Window ->
IO ()
windowMaximize ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowMaximize :: a -> m ()
windowMaximize a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_maximize Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMaximizeMethodInfo a signature where
overloadedMethod = windowMaximize
#endif
foreign import ccall "gdk_window_merge_child_input_shapes" gdk_window_merge_child_input_shapes ::
Ptr Window ->
IO ()
windowMergeChildInputShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowMergeChildInputShapes :: a -> m ()
windowMergeChildInputShapes a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_merge_child_input_shapes Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMergeChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMergeChildInputShapesMethodInfo a signature where
overloadedMethod = windowMergeChildInputShapes
#endif
foreign import ccall "gdk_window_merge_child_shapes" gdk_window_merge_child_shapes ::
Ptr Window ->
IO ()
windowMergeChildShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowMergeChildShapes :: a -> m ()
windowMergeChildShapes a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_merge_child_shapes Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMergeChildShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMergeChildShapesMethodInfo a signature where
overloadedMethod = windowMergeChildShapes
#endif
foreign import ccall "gdk_window_move" gdk_window_move ::
Ptr Window ->
Int32 ->
Int32 ->
IO ()
windowMove ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> m ()
windowMove :: a -> Int32 -> Int32 -> m ()
windowMove a
window Int32
x Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> IO ()
gdk_window_move Ptr Window
window' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMoveMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveMethodInfo a signature where
overloadedMethod = windowMove
#endif
foreign import ccall "gdk_window_move_region" gdk_window_move_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
Int32 ->
Int32 ->
IO ()
windowMoveRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Cairo.Region.Region
-> Int32
-> Int32
-> m ()
windowMoveRegion :: a -> Region -> Int32 -> Int32 -> m ()
windowMoveRegion a
window Region
region Int32
dx Int32
dy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
region' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
region
Ptr Window -> Ptr Region -> Int32 -> Int32 -> IO ()
gdk_window_move_region Ptr Window
window' Ptr Region
region' Int32
dx Int32
dy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Region
region
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMoveRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveRegionMethodInfo a signature where
overloadedMethod = windowMoveRegion
#endif
foreign import ccall "gdk_window_move_resize" gdk_window_move_resize ::
Ptr Window ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
windowMoveResize ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
windowMoveResize :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
windowMoveResize a
window Int32
x Int32
y Int32
width Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
gdk_window_move_resize Ptr Window
window' Int32
x Int32
y Int32
width Int32
height
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMoveResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveResizeMethodInfo a signature where
overloadedMethod = windowMoveResize
#endif
foreign import ccall "gdk_window_move_to_rect" gdk_window_move_to_rect ::
Ptr Window ->
Ptr Gdk.Rectangle.Rectangle ->
CUInt ->
CUInt ->
CUInt ->
Int32 ->
Int32 ->
IO ()
windowMoveToRect ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Rectangle.Rectangle
-> Gdk.Enums.Gravity
-> Gdk.Enums.Gravity
-> [Gdk.Flags.AnchorHints]
-> Int32
-> Int32
-> m ()
windowMoveToRect :: a
-> Rectangle
-> Gravity
-> Gravity
-> [AnchorHints]
-> Int32
-> Int32
-> m ()
windowMoveToRect a
window Rectangle
rect Gravity
rectAnchor Gravity
windowAnchor [AnchorHints]
anchorHints Int32
rectAnchorDx Int32
rectAnchorDy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Rectangle
rect' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
rect
let rectAnchor' :: CUInt
rectAnchor' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Gravity -> Int) -> Gravity -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Gravity -> Int
forall a. Enum a => a -> Int
fromEnum) Gravity
rectAnchor
let windowAnchor' :: CUInt
windowAnchor' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Gravity -> Int) -> Gravity -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Gravity -> Int
forall a. Enum a => a -> Int
fromEnum) Gravity
windowAnchor
let anchorHints' :: CUInt
anchorHints' = [AnchorHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AnchorHints]
anchorHints
Ptr Window
-> Ptr Rectangle
-> CUInt
-> CUInt
-> CUInt
-> Int32
-> Int32
-> IO ()
gdk_window_move_to_rect Ptr Window
window' Ptr Rectangle
rect' CUInt
rectAnchor' CUInt
windowAnchor' CUInt
anchorHints' Int32
rectAnchorDx Int32
rectAnchorDy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
rect
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowMoveToRectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Gdk.Enums.Gravity -> Gdk.Enums.Gravity -> [Gdk.Flags.AnchorHints] -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowMoveToRectMethodInfo a signature where
overloadedMethod = windowMoveToRect
#endif
foreign import ccall "gdk_window_peek_children" gdk_window_peek_children ::
Ptr Window ->
IO (Ptr (GList (Ptr Window)))
windowPeekChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m [Window]
windowPeekChildren :: a -> m [Window]
windowPeekChildren a
window = IO [Window] -> m [Window]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr (GList (Ptr Window))
result <- Ptr Window -> IO (Ptr (GList (Ptr Window)))
gdk_window_peek_children Ptr Window
window'
[Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
[Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) [Ptr Window]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
[Window] -> IO [Window]
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''
#if defined(ENABLE_OVERLOADING)
data WindowPeekChildrenMethodInfo
instance (signature ~ (m [Window]), MonadIO m, IsWindow a) => O.MethodInfo WindowPeekChildrenMethodInfo a signature where
overloadedMethod = windowPeekChildren
#endif
foreign import ccall "gdk_window_process_updates" gdk_window_process_updates ::
Ptr Window ->
CInt ->
IO ()
{-# DEPRECATED windowProcessUpdates ["(Since version 3.22)"] #-}
windowProcessUpdates ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowProcessUpdates :: a -> Bool -> m ()
windowProcessUpdates a
window Bool
updateChildren = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let updateChildren' :: CInt
updateChildren' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
updateChildren
Ptr Window -> CInt -> IO ()
gdk_window_process_updates Ptr Window
window' CInt
updateChildren'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowProcessUpdatesMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowProcessUpdatesMethodInfo a signature where
overloadedMethod = windowProcessUpdates
#endif
foreign import ccall "gdk_window_raise" gdk_window_raise ::
Ptr Window ->
IO ()
windowRaise ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowRaise :: a -> m ()
windowRaise a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_raise Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowRaiseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowRaiseMethodInfo a signature where
overloadedMethod = windowRaise
#endif
foreign import ccall "gdk_window_register_dnd" gdk_window_register_dnd ::
Ptr Window ->
IO ()
windowRegisterDnd ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowRegisterDnd :: a -> m ()
windowRegisterDnd a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_register_dnd Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowRegisterDndMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowRegisterDndMethodInfo a signature where
overloadedMethod = windowRegisterDnd
#endif
foreign import ccall "gdk_window_reparent" gdk_window_reparent ::
Ptr Window ->
Ptr Window ->
Int32 ->
Int32 ->
IO ()
windowReparent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
a
-> b
-> Int32
-> Int32
-> m ()
windowReparent :: a -> b -> Int32 -> Int32 -> m ()
windowReparent a
window b
newParent Int32
x Int32
y = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
newParent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
newParent
Ptr Window -> Ptr Window -> Int32 -> Int32 -> IO ()
gdk_window_reparent Ptr Window
window' Ptr Window
newParent' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
newParent
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowReparentMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowReparentMethodInfo a signature where
overloadedMethod = windowReparent
#endif
foreign import ccall "gdk_window_resize" gdk_window_resize ::
Ptr Window ->
Int32 ->
Int32 ->
IO ()
windowResize ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> m ()
windowResize :: a -> Int32 -> Int32 -> m ()
windowResize a
window Int32
width Int32
height = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> IO ()
gdk_window_resize Ptr Window
window' Int32
width Int32
height
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowResizeMethodInfo a signature where
overloadedMethod = windowResize
#endif
foreign import ccall "gdk_window_restack" gdk_window_restack ::
Ptr Window ->
Ptr Window ->
CInt ->
IO ()
windowRestack ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
a
-> Maybe (b)
-> Bool
-> m ()
windowRestack :: a -> Maybe b -> Bool -> m ()
windowRestack a
window Maybe b
sibling Bool
above = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
maybeSibling <- case Maybe b
sibling of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just b
jSibling -> do
Ptr Window
jSibling' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSibling
Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jSibling'
let above' :: CInt
above' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
above
Ptr Window -> Ptr Window -> CInt -> IO ()
gdk_window_restack Ptr Window
window' Ptr Window
maybeSibling CInt
above'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
sibling b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowRestackMethodInfo
instance (signature ~ (Maybe (b) -> Bool -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowRestackMethodInfo a signature where
overloadedMethod = windowRestack
#endif
foreign import ccall "gdk_window_scroll" gdk_window_scroll ::
Ptr Window ->
Int32 ->
Int32 ->
IO ()
windowScroll ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> m ()
windowScroll :: a -> Int32 -> Int32 -> m ()
windowScroll a
window Int32
dx Int32
dy = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> IO ()
gdk_window_scroll Ptr Window
window' Int32
dx Int32
dy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowScrollMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowScrollMethodInfo a signature where
overloadedMethod = windowScroll
#endif
foreign import ccall "gdk_window_set_accept_focus" gdk_window_set_accept_focus ::
Ptr Window ->
CInt ->
IO ()
windowSetAcceptFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetAcceptFocus :: a -> Bool -> m ()
windowSetAcceptFocus a
window Bool
acceptFocus = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let acceptFocus' :: CInt
acceptFocus' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
acceptFocus
Ptr Window -> CInt -> IO ()
gdk_window_set_accept_focus Ptr Window
window' CInt
acceptFocus'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetAcceptFocusMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetAcceptFocusMethodInfo a signature where
overloadedMethod = windowSetAcceptFocus
#endif
foreign import ccall "gdk_window_set_background" gdk_window_set_background ::
Ptr Window ->
Ptr Gdk.Color.Color ->
IO ()
{-# DEPRECATED windowSetBackground ["(Since version 3.4)","Don\\'t use this function"] #-}
windowSetBackground ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Color.Color
-> m ()
windowSetBackground :: a -> Color -> m ()
windowSetBackground a
window Color
color = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Color
color' <- Color -> IO (Ptr Color)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Color
color
Ptr Window -> Ptr Color -> IO ()
gdk_window_set_background Ptr Window
window' Ptr Color
color'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Color -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Color
color
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetBackgroundMethodInfo
instance (signature ~ (Gdk.Color.Color -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetBackgroundMethodInfo a signature where
overloadedMethod = windowSetBackground
#endif
foreign import ccall "gdk_window_set_background_pattern" gdk_window_set_background_pattern ::
Ptr Window ->
Ptr Cairo.Pattern.Pattern ->
IO ()
{-# DEPRECATED windowSetBackgroundPattern ["(Since version 3.22)","Don\\'t use this function"] #-}
windowSetBackgroundPattern ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Maybe (Cairo.Pattern.Pattern)
-> m ()
windowSetBackgroundPattern :: a -> Maybe Pattern -> m ()
windowSetBackgroundPattern a
window Maybe Pattern
pattern = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Pattern
maybePattern <- case Maybe Pattern
pattern of
Maybe Pattern
Nothing -> Ptr Pattern -> IO (Ptr Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pattern
forall a. Ptr a
nullPtr
Just Pattern
jPattern -> do
Ptr Pattern
jPattern' <- Pattern -> IO (Ptr Pattern)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Pattern
jPattern
Ptr Pattern -> IO (Ptr Pattern)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Pattern
jPattern'
Ptr Window -> Ptr Pattern -> IO ()
gdk_window_set_background_pattern Ptr Window
window' Ptr Pattern
maybePattern
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Pattern -> (Pattern -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Pattern
pattern Pattern -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetBackgroundPatternMethodInfo
instance (signature ~ (Maybe (Cairo.Pattern.Pattern) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetBackgroundPatternMethodInfo a signature where
overloadedMethod = windowSetBackgroundPattern
#endif
foreign import ccall "gdk_window_set_background_rgba" gdk_window_set_background_rgba ::
Ptr Window ->
Ptr Gdk.RGBA.RGBA ->
IO ()
{-# DEPRECATED windowSetBackgroundRgba ["(Since version 3.22)","Don\\'t use this function"] #-}
windowSetBackgroundRgba ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.RGBA.RGBA
-> m ()
windowSetBackgroundRgba :: a -> RGBA -> m ()
windowSetBackgroundRgba a
window RGBA
rgba = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr RGBA
rgba' <- RGBA -> IO (Ptr RGBA)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr RGBA
rgba
Ptr Window -> Ptr RGBA -> IO ()
gdk_window_set_background_rgba Ptr Window
window' Ptr RGBA
rgba'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
RGBA -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr RGBA
rgba
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetBackgroundRgbaMethodInfo
instance (signature ~ (Gdk.RGBA.RGBA -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetBackgroundRgbaMethodInfo a signature where
overloadedMethod = windowSetBackgroundRgba
#endif
foreign import ccall "gdk_window_set_child_input_shapes" gdk_window_set_child_input_shapes ::
Ptr Window ->
IO ()
windowSetChildInputShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowSetChildInputShapes :: a -> m ()
windowSetChildInputShapes a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_set_child_input_shapes Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetChildInputShapesMethodInfo a signature where
overloadedMethod = windowSetChildInputShapes
#endif
foreign import ccall "gdk_window_set_child_shapes" gdk_window_set_child_shapes ::
Ptr Window ->
IO ()
windowSetChildShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowSetChildShapes :: a -> m ()
windowSetChildShapes a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_set_child_shapes Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetChildShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetChildShapesMethodInfo a signature where
overloadedMethod = windowSetChildShapes
#endif
foreign import ccall "gdk_window_set_composited" gdk_window_set_composited ::
Ptr Window ->
CInt ->
IO ()
{-# DEPRECATED windowSetComposited ["(Since version 3.16)","Compositing is an outdated technology that"," only ever worked on X11."] #-}
windowSetComposited ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetComposited :: a -> Bool -> m ()
windowSetComposited a
window Bool
composited = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let composited' :: CInt
composited' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
composited
Ptr Window -> CInt -> IO ()
gdk_window_set_composited Ptr Window
window' CInt
composited'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetCompositedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetCompositedMethodInfo a signature where
overloadedMethod = windowSetComposited
#endif
foreign import ccall "gdk_window_set_cursor" gdk_window_set_cursor ::
Ptr Window ->
Ptr Gdk.Cursor.Cursor ->
IO ()
windowSetCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Cursor.IsCursor b) =>
a
-> Maybe (b)
-> m ()
windowSetCursor :: a -> Maybe b -> m ()
windowSetCursor a
window Maybe b
cursor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Cursor
maybeCursor <- case Maybe b
cursor of
Maybe b
Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
nullPtr
Just b
jCursor -> do
Ptr Cursor
jCursor' <- b -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCursor
Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
jCursor'
Ptr Window -> Ptr Cursor -> IO ()
gdk_window_set_cursor Ptr Window
window' Ptr Cursor
maybeCursor
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cursor b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetCursorMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, Gdk.Cursor.IsCursor b) => O.MethodInfo WindowSetCursorMethodInfo a signature where
overloadedMethod = windowSetCursor
#endif
foreign import ccall "gdk_window_set_decorations" gdk_window_set_decorations ::
Ptr Window ->
CUInt ->
IO ()
windowSetDecorations ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> [Gdk.Flags.WMDecoration]
-> m ()
windowSetDecorations :: a -> [WMDecoration] -> m ()
windowSetDecorations a
window [WMDecoration]
decorations = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let decorations' :: CUInt
decorations' = [WMDecoration] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMDecoration]
decorations
Ptr Window -> CUInt -> IO ()
gdk_window_set_decorations Ptr Window
window' CUInt
decorations'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetDecorationsMethodInfo
instance (signature ~ ([Gdk.Flags.WMDecoration] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetDecorationsMethodInfo a signature where
overloadedMethod = windowSetDecorations
#endif
foreign import ccall "gdk_window_set_device_cursor" gdk_window_set_device_cursor ::
Ptr Window ->
Ptr Gdk.Device.Device ->
Ptr Gdk.Cursor.Cursor ->
IO ()
windowSetDeviceCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) =>
a
-> b
-> c
-> m ()
windowSetDeviceCursor :: a -> b -> c -> m ()
windowSetDeviceCursor a
window b
device c
cursor = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Cursor
cursor' <- c -> IO (Ptr Cursor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
cursor
Ptr Window -> Ptr Device -> Ptr Cursor -> IO ()
gdk_window_set_device_cursor Ptr Window
window' Ptr Device
device' Ptr Cursor
cursor'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr c
cursor
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetDeviceCursorMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) => O.MethodInfo WindowSetDeviceCursorMethodInfo a signature where
overloadedMethod = windowSetDeviceCursor
#endif
foreign import ccall "gdk_window_set_device_events" gdk_window_set_device_events ::
Ptr Window ->
Ptr Gdk.Device.Device ->
CUInt ->
IO ()
windowSetDeviceEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gdk.Device.IsDevice b) =>
a
-> b
-> [Gdk.Flags.EventMask]
-> m ()
windowSetDeviceEvents :: a -> b -> [EventMask] -> m ()
windowSetDeviceEvents a
window b
device [EventMask]
eventMask = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
let eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
Ptr Window -> Ptr Device -> CUInt -> IO ()
gdk_window_set_device_events Ptr Window
window' Ptr Device
device' CUInt
eventMask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
device
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetDeviceEventsMethodInfo
instance (signature ~ (b -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a, Gdk.Device.IsDevice b) => O.MethodInfo WindowSetDeviceEventsMethodInfo a signature where
overloadedMethod = windowSetDeviceEvents
#endif
foreign import ccall "gdk_window_set_event_compression" gdk_window_set_event_compression ::
Ptr Window ->
CInt ->
IO ()
windowSetEventCompression ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetEventCompression :: a -> Bool -> m ()
windowSetEventCompression a
window Bool
eventCompression = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let eventCompression' :: CInt
eventCompression' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
eventCompression
Ptr Window -> CInt -> IO ()
gdk_window_set_event_compression Ptr Window
window' CInt
eventCompression'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetEventCompressionMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetEventCompressionMethodInfo a signature where
overloadedMethod = windowSetEventCompression
#endif
foreign import ccall "gdk_window_set_events" gdk_window_set_events ::
Ptr Window ->
CUInt ->
IO ()
windowSetEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> [Gdk.Flags.EventMask]
-> m ()
windowSetEvents :: a -> [EventMask] -> m ()
windowSetEvents a
window [EventMask]
eventMask = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
Ptr Window -> CUInt -> IO ()
gdk_window_set_events Ptr Window
window' CUInt
eventMask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetEventsMethodInfo
instance (signature ~ ([Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetEventsMethodInfo a signature where
overloadedMethod = windowSetEvents
#endif
foreign import ccall "gdk_window_set_focus_on_map" gdk_window_set_focus_on_map ::
Ptr Window ->
CInt ->
IO ()
windowSetFocusOnMap ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetFocusOnMap :: a -> Bool -> m ()
windowSetFocusOnMap a
window Bool
focusOnMap = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let focusOnMap' :: CInt
focusOnMap' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
focusOnMap
Ptr Window -> CInt -> IO ()
gdk_window_set_focus_on_map Ptr Window
window' CInt
focusOnMap'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetFocusOnMapMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFocusOnMapMethodInfo a signature where
overloadedMethod = windowSetFocusOnMap
#endif
foreign import ccall "gdk_window_set_fullscreen_mode" gdk_window_set_fullscreen_mode ::
Ptr Window ->
CUInt ->
IO ()
windowSetFullscreenMode ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Enums.FullscreenMode
-> m ()
windowSetFullscreenMode :: a -> FullscreenMode -> m ()
windowSetFullscreenMode a
window FullscreenMode
mode = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FullscreenMode -> Int) -> FullscreenMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FullscreenMode -> Int
forall a. Enum a => a -> Int
fromEnum) FullscreenMode
mode
Ptr Window -> CUInt -> IO ()
gdk_window_set_fullscreen_mode Ptr Window
window' CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetFullscreenModeMethodInfo
instance (signature ~ (Gdk.Enums.FullscreenMode -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFullscreenModeMethodInfo a signature where
overloadedMethod = windowSetFullscreenMode
#endif
foreign import ccall "gdk_window_set_functions" gdk_window_set_functions ::
Ptr Window ->
CUInt ->
IO ()
windowSetFunctions ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> [Gdk.Flags.WMFunction]
-> m ()
windowSetFunctions :: a -> [WMFunction] -> m ()
windowSetFunctions a
window [WMFunction]
functions = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let functions' :: CUInt
functions' = [WMFunction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMFunction]
functions
Ptr Window -> CUInt -> IO ()
gdk_window_set_functions Ptr Window
window' CUInt
functions'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetFunctionsMethodInfo
instance (signature ~ ([Gdk.Flags.WMFunction] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetFunctionsMethodInfo a signature where
overloadedMethod = windowSetFunctions
#endif
foreign import ccall "gdk_window_set_geometry_hints" gdk_window_set_geometry_hints ::
Ptr Window ->
Ptr Gdk.Geometry.Geometry ->
CUInt ->
IO ()
windowSetGeometryHints ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Geometry.Geometry
-> [Gdk.Flags.WindowHints]
-> m ()
windowSetGeometryHints :: a -> Geometry -> [WindowHints] -> m ()
windowSetGeometryHints a
window Geometry
geometry [WindowHints]
geomMask = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Geometry
geometry' <- Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Geometry
geometry
let geomMask' :: CUInt
geomMask' = [WindowHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowHints]
geomMask
Ptr Window -> Ptr Geometry -> CUInt -> IO ()
gdk_window_set_geometry_hints Ptr Window
window' Ptr Geometry
geometry' CUInt
geomMask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Geometry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Geometry
geometry
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetGeometryHintsMethodInfo
instance (signature ~ (Gdk.Geometry.Geometry -> [Gdk.Flags.WindowHints] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetGeometryHintsMethodInfo a signature where
overloadedMethod = windowSetGeometryHints
#endif
foreign import ccall "gdk_window_set_group" gdk_window_set_group ::
Ptr Window ->
Ptr Window ->
IO ()
windowSetGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
a
-> Maybe (b)
-> m ()
windowSetGroup :: a -> Maybe b -> m ()
windowSetGroup a
window Maybe b
leader = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
maybeLeader <- case Maybe b
leader of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just b
jLeader -> do
Ptr Window
jLeader' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jLeader
Ptr Window -> IO (Ptr Window)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jLeader'
Ptr Window -> Ptr Window -> IO ()
gdk_window_set_group Ptr Window
window' Ptr Window
maybeLeader
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
leader b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetGroupMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowSetGroupMethodInfo a signature where
overloadedMethod = windowSetGroup
#endif
foreign import ccall "gdk_window_set_icon_list" gdk_window_set_icon_list ::
Ptr Window ->
Ptr (GList (Ptr GdkPixbuf.Pixbuf.Pixbuf)) ->
IO ()
windowSetIconList ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, GdkPixbuf.Pixbuf.IsPixbuf b) =>
a
-> [b]
-> m ()
windowSetIconList :: a -> [b] -> m ()
windowSetIconList a
window [b]
pixbufs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
[Ptr Pixbuf]
pixbufs' <- (b -> IO (Ptr Pixbuf)) -> [b] -> IO [Ptr Pixbuf]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM b -> IO (Ptr Pixbuf)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [b]
pixbufs
Ptr (GList (Ptr Pixbuf))
pixbufs'' <- [Ptr Pixbuf] -> IO (Ptr (GList (Ptr Pixbuf)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Pixbuf]
pixbufs'
Ptr Window -> Ptr (GList (Ptr Pixbuf)) -> IO ()
gdk_window_set_icon_list Ptr Window
window' Ptr (GList (Ptr Pixbuf))
pixbufs''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
(b -> IO ()) -> [b] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [b]
pixbufs
Ptr (GList (Ptr Pixbuf)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Pixbuf))
pixbufs''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetIconListMethodInfo
instance (signature ~ ([b] -> m ()), MonadIO m, IsWindow a, GdkPixbuf.Pixbuf.IsPixbuf b) => O.MethodInfo WindowSetIconListMethodInfo a signature where
overloadedMethod = windowSetIconList
#endif
foreign import ccall "gdk_window_set_icon_name" gdk_window_set_icon_name ::
Ptr Window ->
CString ->
IO ()
windowSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Maybe (T.Text)
-> m ()
windowSetIconName :: a -> Maybe Text -> m ()
windowSetIconName a
window Maybe Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr CChar
maybeName <- case Maybe Text
name of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just Text
jName -> do
Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_icon_name Ptr Window
window' Ptr CChar
maybeName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetIconNameMethodInfo a signature where
overloadedMethod = windowSetIconName
#endif
foreign import ccall "gdk_window_set_keep_above" gdk_window_set_keep_above ::
Ptr Window ->
CInt ->
IO ()
windowSetKeepAbove ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetKeepAbove :: a -> Bool -> m ()
windowSetKeepAbove a
window Bool
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
Ptr Window -> CInt -> IO ()
gdk_window_set_keep_above Ptr Window
window' CInt
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetKeepAboveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetKeepAboveMethodInfo a signature where
overloadedMethod = windowSetKeepAbove
#endif
foreign import ccall "gdk_window_set_keep_below" gdk_window_set_keep_below ::
Ptr Window ->
CInt ->
IO ()
windowSetKeepBelow ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetKeepBelow :: a -> Bool -> m ()
windowSetKeepBelow a
window Bool
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
Ptr Window -> CInt -> IO ()
gdk_window_set_keep_below Ptr Window
window' CInt
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetKeepBelowMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetKeepBelowMethodInfo a signature where
overloadedMethod = windowSetKeepBelow
#endif
foreign import ccall "gdk_window_set_modal_hint" gdk_window_set_modal_hint ::
Ptr Window ->
CInt ->
IO ()
windowSetModalHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetModalHint :: a -> Bool -> m ()
windowSetModalHint a
window Bool
modal = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let modal' :: CInt
modal' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
modal
Ptr Window -> CInt -> IO ()
gdk_window_set_modal_hint Ptr Window
window' CInt
modal'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetModalHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetModalHintMethodInfo a signature where
overloadedMethod = windowSetModalHint
#endif
foreign import ccall "gdk_window_set_opacity" gdk_window_set_opacity ::
Ptr Window ->
CDouble ->
IO ()
windowSetOpacity ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Double
-> m ()
windowSetOpacity :: a -> Double -> m ()
windowSetOpacity a
window Double
opacity = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let opacity' :: CDouble
opacity' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
opacity
Ptr Window -> CDouble -> IO ()
gdk_window_set_opacity Ptr Window
window' CDouble
opacity'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetOpacityMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetOpacityMethodInfo a signature where
overloadedMethod = windowSetOpacity
#endif
foreign import ccall "gdk_window_set_opaque_region" gdk_window_set_opaque_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
IO ()
windowSetOpaqueRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Maybe (Cairo.Region.Region)
-> m ()
windowSetOpaqueRegion :: a -> Maybe Region -> m ()
windowSetOpaqueRegion a
window Maybe Region
region = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
maybeRegion <- case Maybe Region
region of
Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
Just Region
jRegion -> do
Ptr Region
jRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
jRegion
Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
jRegion'
Ptr Window -> Ptr Region -> IO ()
gdk_window_set_opaque_region Ptr Window
window' Ptr Region
maybeRegion
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Region -> (Region -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Region
region Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetOpaqueRegionMethodInfo
instance (signature ~ (Maybe (Cairo.Region.Region) -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetOpaqueRegionMethodInfo a signature where
overloadedMethod = windowSetOpaqueRegion
#endif
foreign import ccall "gdk_window_set_override_redirect" gdk_window_set_override_redirect ::
Ptr Window ->
CInt ->
IO ()
windowSetOverrideRedirect ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetOverrideRedirect :: a -> Bool -> m ()
windowSetOverrideRedirect a
window Bool
overrideRedirect = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let overrideRedirect' :: CInt
overrideRedirect' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
overrideRedirect
Ptr Window -> CInt -> IO ()
gdk_window_set_override_redirect Ptr Window
window' CInt
overrideRedirect'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetOverrideRedirectMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetOverrideRedirectMethodInfo a signature where
overloadedMethod = windowSetOverrideRedirect
#endif
foreign import ccall "gdk_window_set_pass_through" gdk_window_set_pass_through ::
Ptr Window ->
CInt ->
IO ()
windowSetPassThrough ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetPassThrough :: a -> Bool -> m ()
windowSetPassThrough a
window Bool
passThrough = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let passThrough' :: CInt
passThrough' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
passThrough
Ptr Window -> CInt -> IO ()
gdk_window_set_pass_through Ptr Window
window' CInt
passThrough'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetPassThroughMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetPassThroughMethodInfo a signature where
overloadedMethod = windowSetPassThrough
#endif
foreign import ccall "gdk_window_set_role" gdk_window_set_role ::
Ptr Window ->
CString ->
IO ()
windowSetRole ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> T.Text
-> m ()
windowSetRole :: a -> Text -> m ()
windowSetRole a
window Text
role = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr CChar
role' <- Text -> IO (Ptr CChar)
textToCString Text
role
Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_role Ptr Window
window' Ptr CChar
role'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
role'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetRoleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetRoleMethodInfo a signature where
overloadedMethod = windowSetRole
#endif
foreign import ccall "gdk_window_set_shadow_width" gdk_window_set_shadow_width ::
Ptr Window ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
windowSetShadowWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
windowSetShadowWidth :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
windowSetShadowWidth a
window Int32
left Int32
right Int32
top Int32
bottom = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> Int32 -> Int32 -> Int32 -> Int32 -> IO ()
gdk_window_set_shadow_width Ptr Window
window' Int32
left Int32
right Int32
top Int32
bottom
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetShadowWidthMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetShadowWidthMethodInfo a signature where
overloadedMethod = windowSetShadowWidth
#endif
foreign import ccall "gdk_window_set_skip_pager_hint" ::
Ptr Window ->
CInt ->
IO ()
windowSetSkipPagerHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
a
window Bool
skipsPager = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let skipsPager' :: CInt
skipsPager' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
skipsPager
Ptr Window -> CInt -> IO ()
gdk_window_set_skip_pager_hint Ptr Window
window' CInt
skipsPager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetSkipPagerHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSkipPagerHintMethodInfo a signature where
overloadedMethod = windowSetSkipPagerHint
#endif
foreign import ccall "gdk_window_set_skip_taskbar_hint" gdk_window_set_skip_taskbar_hint ::
Ptr Window ->
CInt ->
IO ()
windowSetSkipTaskbarHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetSkipTaskbarHint :: a -> Bool -> m ()
windowSetSkipTaskbarHint a
window Bool
skipsTaskbar = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let skipsTaskbar' :: CInt
skipsTaskbar' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
skipsTaskbar
Ptr Window -> CInt -> IO ()
gdk_window_set_skip_taskbar_hint Ptr Window
window' CInt
skipsTaskbar'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetSkipTaskbarHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSkipTaskbarHintMethodInfo a signature where
overloadedMethod = windowSetSkipTaskbarHint
#endif
foreign import ccall "gdk_window_set_source_events" gdk_window_set_source_events ::
Ptr Window ->
CUInt ->
CUInt ->
IO ()
windowSetSourceEvents ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Enums.InputSource
-> [Gdk.Flags.EventMask]
-> m ()
windowSetSourceEvents :: a -> InputSource -> [EventMask] -> m ()
windowSetSourceEvents a
window InputSource
source [EventMask]
eventMask = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let source' :: CUInt
source' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (InputSource -> Int) -> InputSource -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. InputSource -> Int
forall a. Enum a => a -> Int
fromEnum) InputSource
source
let eventMask' :: CUInt
eventMask' = [EventMask] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [EventMask]
eventMask
Ptr Window -> CUInt -> CUInt -> IO ()
gdk_window_set_source_events Ptr Window
window' CUInt
source' CUInt
eventMask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetSourceEventsMethodInfo
instance (signature ~ (Gdk.Enums.InputSource -> [Gdk.Flags.EventMask] -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSourceEventsMethodInfo a signature where
overloadedMethod = windowSetSourceEvents
#endif
foreign import ccall "gdk_window_set_startup_id" gdk_window_set_startup_id ::
Ptr Window ->
CString ->
IO ()
windowSetStartupId ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> T.Text
-> m ()
windowSetStartupId :: a -> Text -> m ()
windowSetStartupId a
window Text
startupId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr CChar
startupId' <- Text -> IO (Ptr CChar)
textToCString Text
startupId
Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_startup_id Ptr Window
window' Ptr CChar
startupId'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
startupId'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetStartupIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetStartupIdMethodInfo a signature where
overloadedMethod = windowSetStartupId
#endif
foreign import ccall "gdk_window_set_static_gravities" gdk_window_set_static_gravities ::
Ptr Window ->
CInt ->
IO CInt
{-# DEPRECATED windowSetStaticGravities ["(Since version 3.16)","static gravities haven\\'t worked on anything but X11"," for a long time."] #-}
windowSetStaticGravities ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m Bool
windowSetStaticGravities :: a -> Bool -> m Bool
windowSetStaticGravities a
window Bool
useStatic = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let useStatic' :: CInt
useStatic' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
useStatic
CInt
result <- Ptr Window -> CInt -> IO CInt
gdk_window_set_static_gravities Ptr Window
window' CInt
useStatic'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowSetStaticGravitiesMethodInfo
instance (signature ~ (Bool -> m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowSetStaticGravitiesMethodInfo a signature where
overloadedMethod = windowSetStaticGravities
#endif
foreign import ccall "gdk_window_set_support_multidevice" gdk_window_set_support_multidevice ::
Ptr Window ->
CInt ->
IO ()
windowSetSupportMultidevice ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetSupportMultidevice :: a -> Bool -> m ()
windowSetSupportMultidevice a
window Bool
supportMultidevice = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let supportMultidevice' :: CInt
supportMultidevice' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
supportMultidevice
Ptr Window -> CInt -> IO ()
gdk_window_set_support_multidevice Ptr Window
window' CInt
supportMultidevice'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetSupportMultideviceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetSupportMultideviceMethodInfo a signature where
overloadedMethod = windowSetSupportMultidevice
#endif
foreign import ccall "gdk_window_set_title" gdk_window_set_title ::
Ptr Window ->
CString ->
IO ()
windowSetTitle ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> T.Text
-> m ()
windowSetTitle :: a -> Text -> m ()
windowSetTitle a
window Text
title = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr CChar
title' <- Text -> IO (Ptr CChar)
textToCString Text
title
Ptr Window -> Ptr CChar -> IO ()
gdk_window_set_title Ptr Window
window' Ptr CChar
title'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
title'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetTitleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetTitleMethodInfo a signature where
overloadedMethod = windowSetTitle
#endif
foreign import ccall "gdk_window_set_transient_for" gdk_window_set_transient_for ::
Ptr Window ->
Ptr Window ->
IO ()
windowSetTransientFor ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, IsWindow b) =>
a
-> b
-> m ()
windowSetTransientFor :: a -> b -> m ()
windowSetTransientFor a
window b
parent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window
parent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
Ptr Window -> Ptr Window -> IO ()
gdk_window_set_transient_for Ptr Window
window' Ptr Window
parent'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
parent
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetTransientForMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsWindow a, IsWindow b) => O.MethodInfo WindowSetTransientForMethodInfo a signature where
overloadedMethod = windowSetTransientFor
#endif
foreign import ccall "gdk_window_set_type_hint" gdk_window_set_type_hint ::
Ptr Window ->
CUInt ->
IO ()
windowSetTypeHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Enums.WindowTypeHint
-> m ()
windowSetTypeHint :: a -> WindowTypeHint -> m ()
windowSetTypeHint a
window WindowTypeHint
hint = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let hint' :: CUInt
hint' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (WindowTypeHint -> Int) -> WindowTypeHint -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. WindowTypeHint -> Int
forall a. Enum a => a -> Int
fromEnum) WindowTypeHint
hint
Ptr Window -> CUInt -> IO ()
gdk_window_set_type_hint Ptr Window
window' CUInt
hint'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetTypeHintMethodInfo
instance (signature ~ (Gdk.Enums.WindowTypeHint -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetTypeHintMethodInfo a signature where
overloadedMethod = windowSetTypeHint
#endif
foreign import ccall "gdk_window_set_urgency_hint" gdk_window_set_urgency_hint ::
Ptr Window ->
CInt ->
IO ()
windowSetUrgencyHint ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Bool
-> m ()
windowSetUrgencyHint :: a -> Bool -> m ()
windowSetUrgencyHint a
window Bool
urgent = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
let urgent' :: CInt
urgent' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
urgent
Ptr Window -> CInt -> IO ()
gdk_window_set_urgency_hint Ptr Window
window' CInt
urgent'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetUrgencyHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowSetUrgencyHintMethodInfo a signature where
overloadedMethod = windowSetUrgencyHint
#endif
foreign import ccall "gdk_window_set_user_data" gdk_window_set_user_data ::
Ptr Window ->
Ptr GObject.Object.Object ->
IO ()
windowSetUserData ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, GObject.Object.IsObject b) =>
a
-> Maybe (b)
-> m ()
windowSetUserData :: a -> Maybe b -> m ()
windowSetUserData a
window Maybe b
userData = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Object
maybeUserData <- case Maybe b
userData of
Maybe b
Nothing -> Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
forall a. Ptr a
nullPtr
Just b
jUserData -> do
Ptr Object
jUserData' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jUserData
Ptr Object -> IO (Ptr Object)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Object
jUserData'
Ptr Window -> Ptr Object -> IO ()
gdk_window_set_user_data Ptr Window
window' Ptr Object
maybeUserData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
userData b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetUserDataMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, GObject.Object.IsObject b) => O.MethodInfo WindowSetUserDataMethodInfo a signature where
overloadedMethod = windowSetUserData
#endif
foreign import ccall "gdk_window_shape_combine_region" gdk_window_shape_combine_region ::
Ptr Window ->
Ptr Cairo.Region.Region ->
Int32 ->
Int32 ->
IO ()
windowShapeCombineRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Maybe (Cairo.Region.Region)
-> Int32
-> Int32
-> m ()
windowShapeCombineRegion :: a -> Maybe Region -> Int32 -> Int32 -> m ()
windowShapeCombineRegion a
window Maybe Region
shapeRegion Int32
offsetX Int32
offsetY = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Region
maybeShapeRegion <- case Maybe Region
shapeRegion of
Maybe Region
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
Just Region
jShapeRegion -> do
Ptr Region
jShapeRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
jShapeRegion
Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
jShapeRegion'
Ptr Window -> Ptr Region -> Int32 -> Int32 -> IO ()
gdk_window_shape_combine_region Ptr Window
window' Ptr Region
maybeShapeRegion Int32
offsetX Int32
offsetY
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Maybe Region -> (Region -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Region
shapeRegion Region -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowShapeCombineRegionMethodInfo
instance (signature ~ (Maybe (Cairo.Region.Region) -> Int32 -> Int32 -> m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowShapeCombineRegionMethodInfo a signature where
overloadedMethod = windowShapeCombineRegion
#endif
foreign import ccall "gdk_window_show" gdk_window_show ::
Ptr Window ->
IO ()
windowShow ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowShow :: a -> m ()
windowShow a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_show Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowShowMethodInfo a signature where
overloadedMethod = windowShow
#endif
foreign import ccall "gdk_window_show_unraised" gdk_window_show_unraised ::
Ptr Window ->
IO ()
windowShowUnraised ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowShowUnraised :: a -> m ()
windowShowUnraised a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_show_unraised Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowShowUnraisedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowShowUnraisedMethodInfo a signature where
overloadedMethod = windowShowUnraised
#endif
foreign import ccall "gdk_window_show_window_menu" ::
Ptr Window ->
Ptr Gdk.Event.Event ->
IO CInt
windowShowWindowMenu ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> Gdk.Event.Event
-> m Bool
a
window Event
event = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Event
event' <- Event -> IO (Ptr Event)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Event
event
CInt
result <- Ptr Window -> Ptr Event -> IO CInt
gdk_window_show_window_menu Ptr Window
window' Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
Event -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Event
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data WindowShowWindowMenuMethodInfo
instance (signature ~ (Gdk.Event.Event -> m Bool), MonadIO m, IsWindow a) => O.MethodInfo WindowShowWindowMenuMethodInfo a signature where
overloadedMethod = windowShowWindowMenu
#endif
foreign import ccall "gdk_window_stick" gdk_window_stick ::
Ptr Window ->
IO ()
windowStick ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowStick :: a -> m ()
windowStick a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_stick Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowStickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowStickMethodInfo a signature where
overloadedMethod = windowStick
#endif
foreign import ccall "gdk_window_thaw_toplevel_updates_libgtk_only" gdk_window_thaw_toplevel_updates_libgtk_only ::
Ptr Window ->
IO ()
{-# DEPRECATED windowThawToplevelUpdatesLibgtkOnly ["(Since version 3.16)","This symbol was never meant to be used outside of GTK+"] #-}
windowThawToplevelUpdatesLibgtkOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowThawToplevelUpdatesLibgtkOnly :: a -> m ()
windowThawToplevelUpdatesLibgtkOnly a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_thaw_toplevel_updates_libgtk_only Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowThawToplevelUpdatesLibgtkOnlyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowThawToplevelUpdatesLibgtkOnlyMethodInfo a signature where
overloadedMethod = windowThawToplevelUpdatesLibgtkOnly
#endif
foreign import ccall "gdk_window_thaw_updates" gdk_window_thaw_updates ::
Ptr Window ->
IO ()
windowThawUpdates ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowThawUpdates :: a -> m ()
windowThawUpdates a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_thaw_updates Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowThawUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowThawUpdatesMethodInfo a signature where
overloadedMethod = windowThawUpdates
#endif
foreign import ccall "gdk_window_unfullscreen" gdk_window_unfullscreen ::
Ptr Window ->
IO ()
windowUnfullscreen ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowUnfullscreen :: a -> m ()
windowUnfullscreen a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_unfullscreen Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowUnfullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnfullscreenMethodInfo a signature where
overloadedMethod = windowUnfullscreen
#endif
foreign import ccall "gdk_window_unmaximize" gdk_window_unmaximize ::
Ptr Window ->
IO ()
windowUnmaximize ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowUnmaximize :: a -> m ()
windowUnmaximize a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_unmaximize Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowUnmaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnmaximizeMethodInfo a signature where
overloadedMethod = windowUnmaximize
#endif
foreign import ccall "gdk_window_unstick" gdk_window_unstick ::
Ptr Window ->
IO ()
windowUnstick ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowUnstick :: a -> m ()
windowUnstick a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_unstick Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowUnstickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowUnstickMethodInfo a signature where
overloadedMethod = windowUnstick
#endif
foreign import ccall "gdk_window_withdraw" gdk_window_withdraw ::
Ptr Window ->
IO ()
windowWithdraw ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m ()
windowWithdraw :: a -> m ()
windowWithdraw a
window = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
window' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
window
Ptr Window -> IO ()
gdk_window_withdraw Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
window
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowWithdrawMethodInfo
instance (signature ~ (m ()), MonadIO m, IsWindow a) => O.MethodInfo WindowWithdrawMethodInfo a signature where
overloadedMethod = windowWithdraw
#endif
foreign import ccall "gdk_window_at_pointer" gdk_window_at_pointer ::
Ptr Int32 ->
Ptr Int32 ->
IO (Ptr Window)
{-# DEPRECATED windowAtPointer ["(Since version 3.0)","Use 'GI.Gdk.Objects.Device.deviceGetWindowAtPosition' instead."] #-}
windowAtPointer ::
(B.CallStack.HasCallStack, MonadIO m) =>
m ((Window, Int32, Int32))
windowAtPointer :: m (Window, Int32, Int32)
windowAtPointer = IO (Window, Int32, Int32) -> m (Window, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Window, Int32, Int32) -> m (Window, Int32, Int32))
-> IO (Window, Int32, Int32) -> m (Window, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Int32
winX <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
winY <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Window
result <- Ptr Int32 -> Ptr Int32 -> IO (Ptr Window)
gdk_window_at_pointer Ptr Int32
winX Ptr Int32
winY
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowAtPointer" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
Int32
winX' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
winX
Int32
winY' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
winY
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
winX
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
winY
(Window, Int32, Int32) -> IO (Window, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Window
result', Int32
winX', Int32
winY')
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_window_constrain_size" gdk_window_constrain_size ::
Ptr Gdk.Geometry.Geometry ->
CUInt ->
Int32 ->
Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
windowConstrainSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gdk.Geometry.Geometry
-> [Gdk.Flags.WindowHints]
-> Int32
-> Int32
-> m ((Int32, Int32))
windowConstrainSize :: Geometry -> [WindowHints] -> Int32 -> Int32 -> m (Int32, Int32)
windowConstrainSize Geometry
geometry [WindowHints]
flags Int32
width Int32
height = IO (Int32, Int32) -> m (Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Int32, Int32) -> m (Int32, Int32))
-> IO (Int32, Int32) -> m (Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Geometry
geometry' <- Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Geometry
geometry
let flags' :: CUInt
flags' = [WindowHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WindowHints]
flags
Ptr Int32
newWidth <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
newHeight <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Geometry
-> CUInt -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_window_constrain_size Ptr Geometry
geometry' CUInt
flags' Int32
width Int32
height Ptr Int32
newWidth Ptr Int32
newHeight
Int32
newWidth' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
newWidth
Int32
newHeight' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
newHeight
Geometry -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Geometry
geometry
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
newWidth
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
newHeight
(Int32, Int32) -> IO (Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Int32
newWidth', Int32
newHeight')
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_window_process_all_updates" gdk_window_process_all_updates ::
IO ()
{-# DEPRECATED windowProcessAllUpdates ["(Since version 3.22)"] #-}
windowProcessAllUpdates ::
(B.CallStack.HasCallStack, MonadIO m) =>
m ()
windowProcessAllUpdates :: m ()
windowProcessAllUpdates = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
IO ()
gdk_window_process_all_updates
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_window_set_debug_updates" gdk_window_set_debug_updates ::
CInt ->
IO ()
{-# DEPRECATED windowSetDebugUpdates ["(Since version 3.22)"] #-}
windowSetDebugUpdates ::
(B.CallStack.HasCallStack, MonadIO m) =>
Bool
-> m ()
windowSetDebugUpdates :: Bool -> m ()
windowSetDebugUpdates Bool
setting = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
let setting' :: CInt
setting' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
setting
CInt -> IO ()
gdk_window_set_debug_updates CInt
setting'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
#endif