{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gdk.Objects.Surface
(
Surface(..) ,
IsSurface ,
toSurface ,
noSurface ,
#if defined(ENABLE_OVERLOADING)
ResolveSurfaceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
SurfaceBeepMethodInfo ,
#endif
surfaceBeep ,
#if defined(ENABLE_OVERLOADING)
SurfaceBeginMoveDragMethodInfo ,
#endif
surfaceBeginMoveDrag ,
#if defined(ENABLE_OVERLOADING)
SurfaceBeginMoveDragForDeviceMethodInfo ,
#endif
surfaceBeginMoveDragForDevice ,
#if defined(ENABLE_OVERLOADING)
SurfaceBeginResizeDragMethodInfo ,
#endif
surfaceBeginResizeDrag ,
#if defined(ENABLE_OVERLOADING)
SurfaceBeginResizeDragForDeviceMethodInfo,
#endif
surfaceBeginResizeDragForDevice ,
surfaceConstrainSize ,
#if defined(ENABLE_OVERLOADING)
SurfaceCoordsFromParentMethodInfo ,
#endif
surfaceCoordsFromParent ,
#if defined(ENABLE_OVERLOADING)
SurfaceCoordsToParentMethodInfo ,
#endif
surfaceCoordsToParent ,
#if defined(ENABLE_OVERLOADING)
SurfaceCreateCairoContextMethodInfo ,
#endif
surfaceCreateCairoContext ,
#if defined(ENABLE_OVERLOADING)
SurfaceCreateGlContextMethodInfo ,
#endif
surfaceCreateGlContext ,
#if defined(ENABLE_OVERLOADING)
SurfaceCreateSimilarSurfaceMethodInfo ,
#endif
surfaceCreateSimilarSurface ,
#if defined(ENABLE_OVERLOADING)
SurfaceCreateVulkanContextMethodInfo ,
#endif
surfaceCreateVulkanContext ,
#if defined(ENABLE_OVERLOADING)
SurfaceDeiconifyMethodInfo ,
#endif
surfaceDeiconify ,
#if defined(ENABLE_OVERLOADING)
SurfaceDestroyMethodInfo ,
#endif
surfaceDestroy ,
#if defined(ENABLE_OVERLOADING)
SurfaceFocusMethodInfo ,
#endif
surfaceFocus ,
#if defined(ENABLE_OVERLOADING)
SurfaceFreezeUpdatesMethodInfo ,
#endif
surfaceFreezeUpdates ,
#if defined(ENABLE_OVERLOADING)
SurfaceFullscreenMethodInfo ,
#endif
surfaceFullscreen ,
#if defined(ENABLE_OVERLOADING)
SurfaceFullscreenOnMonitorMethodInfo ,
#endif
surfaceFullscreenOnMonitor ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetAcceptFocusMethodInfo ,
#endif
surfaceGetAcceptFocus ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetChildrenMethodInfo ,
#endif
surfaceGetChildren ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetCursorMethodInfo ,
#endif
surfaceGetCursor ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetDecorationsMethodInfo ,
#endif
surfaceGetDecorations ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetDeviceCursorMethodInfo ,
#endif
surfaceGetDeviceCursor ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetDevicePositionMethodInfo ,
#endif
surfaceGetDevicePosition ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetDisplayMethodInfo ,
#endif
surfaceGetDisplay ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetFocusOnMapMethodInfo ,
#endif
surfaceGetFocusOnMap ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetFrameClockMethodInfo ,
#endif
surfaceGetFrameClock ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetFrameExtentsMethodInfo ,
#endif
surfaceGetFrameExtents ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetFullscreenModeMethodInfo ,
#endif
surfaceGetFullscreenMode ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetGeometryMethodInfo ,
#endif
surfaceGetGeometry ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetHeightMethodInfo ,
#endif
surfaceGetHeight ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetModalHintMethodInfo ,
#endif
surfaceGetModalHint ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetOriginMethodInfo ,
#endif
surfaceGetOrigin ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetParentMethodInfo ,
#endif
surfaceGetParent ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetPassThroughMethodInfo ,
#endif
surfaceGetPassThrough ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetPositionMethodInfo ,
#endif
surfaceGetPosition ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetRootCoordsMethodInfo ,
#endif
surfaceGetRootCoords ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetRootOriginMethodInfo ,
#endif
surfaceGetRootOrigin ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetScaleFactorMethodInfo ,
#endif
surfaceGetScaleFactor ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetStateMethodInfo ,
#endif
surfaceGetState ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetSupportMultideviceMethodInfo ,
#endif
surfaceGetSupportMultidevice ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetSurfaceTypeMethodInfo ,
#endif
surfaceGetSurfaceType ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetToplevelMethodInfo ,
#endif
surfaceGetToplevel ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetTypeHintMethodInfo ,
#endif
surfaceGetTypeHint ,
#if defined(ENABLE_OVERLOADING)
SurfaceGetWidthMethodInfo ,
#endif
surfaceGetWidth ,
#if defined(ENABLE_OVERLOADING)
SurfaceHasNativeMethodInfo ,
#endif
surfaceHasNative ,
#if defined(ENABLE_OVERLOADING)
SurfaceHideMethodInfo ,
#endif
surfaceHide ,
#if defined(ENABLE_OVERLOADING)
SurfaceIconifyMethodInfo ,
#endif
surfaceIconify ,
#if defined(ENABLE_OVERLOADING)
SurfaceInputShapeCombineRegionMethodInfo,
#endif
surfaceInputShapeCombineRegion ,
#if defined(ENABLE_OVERLOADING)
SurfaceIsDestroyedMethodInfo ,
#endif
surfaceIsDestroyed ,
#if defined(ENABLE_OVERLOADING)
SurfaceIsInputOnlyMethodInfo ,
#endif
surfaceIsInputOnly ,
#if defined(ENABLE_OVERLOADING)
SurfaceIsViewableMethodInfo ,
#endif
surfaceIsViewable ,
#if defined(ENABLE_OVERLOADING)
SurfaceIsVisibleMethodInfo ,
#endif
surfaceIsVisible ,
#if defined(ENABLE_OVERLOADING)
SurfaceLowerMethodInfo ,
#endif
surfaceLower ,
#if defined(ENABLE_OVERLOADING)
SurfaceMaximizeMethodInfo ,
#endif
surfaceMaximize ,
#if defined(ENABLE_OVERLOADING)
SurfaceMergeChildInputShapesMethodInfo ,
#endif
surfaceMergeChildInputShapes ,
#if defined(ENABLE_OVERLOADING)
SurfaceMoveMethodInfo ,
#endif
surfaceMove ,
#if defined(ENABLE_OVERLOADING)
SurfaceMoveResizeMethodInfo ,
#endif
surfaceMoveResize ,
#if defined(ENABLE_OVERLOADING)
SurfaceMoveToRectMethodInfo ,
#endif
surfaceMoveToRect ,
surfaceNewChild ,
surfaceNewPopup ,
surfaceNewTemp ,
surfaceNewToplevel ,
#if defined(ENABLE_OVERLOADING)
SurfacePeekChildrenMethodInfo ,
#endif
surfacePeekChildren ,
#if defined(ENABLE_OVERLOADING)
SurfaceQueueExposeMethodInfo ,
#endif
surfaceQueueExpose ,
#if defined(ENABLE_OVERLOADING)
SurfaceRaiseMethodInfo ,
#endif
surfaceRaise ,
#if defined(ENABLE_OVERLOADING)
SurfaceRegisterDndMethodInfo ,
#endif
surfaceRegisterDnd ,
#if defined(ENABLE_OVERLOADING)
SurfaceResizeMethodInfo ,
#endif
surfaceResize ,
#if defined(ENABLE_OVERLOADING)
SurfaceRestackMethodInfo ,
#endif
surfaceRestack ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetAcceptFocusMethodInfo ,
#endif
surfaceSetAcceptFocus ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetChildInputShapesMethodInfo ,
#endif
surfaceSetChildInputShapes ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetCursorMethodInfo ,
#endif
surfaceSetCursor ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetDecorationsMethodInfo ,
#endif
surfaceSetDecorations ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetDeviceCursorMethodInfo ,
#endif
surfaceSetDeviceCursor ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetFocusOnMapMethodInfo ,
#endif
surfaceSetFocusOnMap ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetFullscreenModeMethodInfo ,
#endif
surfaceSetFullscreenMode ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetFunctionsMethodInfo ,
#endif
surfaceSetFunctions ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetGeometryHintsMethodInfo ,
#endif
surfaceSetGeometryHints ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetIconListMethodInfo ,
#endif
surfaceSetIconList ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetIconNameMethodInfo ,
#endif
surfaceSetIconName ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetKeepAboveMethodInfo ,
#endif
surfaceSetKeepAbove ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetKeepBelowMethodInfo ,
#endif
surfaceSetKeepBelow ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetModalHintMethodInfo ,
#endif
surfaceSetModalHint ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetOpacityMethodInfo ,
#endif
surfaceSetOpacity ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetOpaqueRegionMethodInfo ,
#endif
surfaceSetOpaqueRegion ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetPassThroughMethodInfo ,
#endif
surfaceSetPassThrough ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetShadowWidthMethodInfo ,
#endif
surfaceSetShadowWidth ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetStartupIdMethodInfo ,
#endif
surfaceSetStartupId ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetSupportMultideviceMethodInfo ,
#endif
surfaceSetSupportMultidevice ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetTitleMethodInfo ,
#endif
surfaceSetTitle ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetTransientForMethodInfo ,
#endif
surfaceSetTransientFor ,
#if defined(ENABLE_OVERLOADING)
SurfaceSetTypeHintMethodInfo ,
#endif
surfaceSetTypeHint ,
#if defined(ENABLE_OVERLOADING)
SurfaceShowMethodInfo ,
#endif
surfaceShow ,
#if defined(ENABLE_OVERLOADING)
SurfaceShowUnraisedMethodInfo ,
#endif
surfaceShowUnraised ,
#if defined(ENABLE_OVERLOADING)
SurfaceShowWindowMenuMethodInfo ,
#endif
surfaceShowWindowMenu ,
#if defined(ENABLE_OVERLOADING)
SurfaceStickMethodInfo ,
#endif
surfaceStick ,
#if defined(ENABLE_OVERLOADING)
SurfaceThawUpdatesMethodInfo ,
#endif
surfaceThawUpdates ,
#if defined(ENABLE_OVERLOADING)
SurfaceUnfullscreenMethodInfo ,
#endif
surfaceUnfullscreen ,
#if defined(ENABLE_OVERLOADING)
SurfaceUnmaximizeMethodInfo ,
#endif
surfaceUnmaximize ,
#if defined(ENABLE_OVERLOADING)
SurfaceUnstickMethodInfo ,
#endif
surfaceUnstick ,
#if defined(ENABLE_OVERLOADING)
SurfaceCursorPropertyInfo ,
#endif
clearSurfaceCursor ,
constructSurfaceCursor ,
getSurfaceCursor ,
setSurfaceCursor ,
#if defined(ENABLE_OVERLOADING)
surfaceCursor ,
#endif
#if defined(ENABLE_OVERLOADING)
SurfaceDisplayPropertyInfo ,
#endif
constructSurfaceDisplay ,
getSurfaceDisplay ,
#if defined(ENABLE_OVERLOADING)
surfaceDisplay ,
#endif
#if defined(ENABLE_OVERLOADING)
SurfaceFrameClockPropertyInfo ,
#endif
constructSurfaceFrameClock ,
getSurfaceFrameClock ,
#if defined(ENABLE_OVERLOADING)
surfaceFrameClock ,
#endif
#if defined(ENABLE_OVERLOADING)
SurfaceMappedPropertyInfo ,
#endif
getSurfaceMapped ,
#if defined(ENABLE_OVERLOADING)
surfaceMapped ,
#endif
#if defined(ENABLE_OVERLOADING)
SurfaceStatePropertyInfo ,
#endif
getSurfaceState ,
#if defined(ENABLE_OVERLOADING)
surfaceState ,
#endif
C_SurfaceEventCallback ,
SurfaceEventCallback ,
#if defined(ENABLE_OVERLOADING)
SurfaceEventSignalInfo ,
#endif
afterSurfaceEvent ,
genClosure_SurfaceEvent ,
mk_SurfaceEventCallback ,
noSurfaceEventCallback ,
onSurfaceEvent ,
wrap_SurfaceEventCallback ,
C_SurfaceMovedToRectCallback ,
SurfaceMovedToRectCallback ,
#if defined(ENABLE_OVERLOADING)
SurfaceMovedToRectSignalInfo ,
#endif
afterSurfaceMovedToRect ,
genClosure_SurfaceMovedToRect ,
mk_SurfaceMovedToRectCallback ,
noSurfaceMovedToRectCallback ,
onSurfaceMovedToRect ,
wrap_SurfaceMovedToRectCallback ,
C_SurfaceRenderCallback ,
SurfaceRenderCallback ,
#if defined(ENABLE_OVERLOADING)
SurfaceRenderSignalInfo ,
#endif
afterSurfaceRender ,
genClosure_SurfaceRender ,
mk_SurfaceRenderCallback ,
noSurfaceRenderCallback ,
onSurfaceRender ,
wrap_SurfaceRenderCallback ,
C_SurfaceSizeChangedCallback ,
SurfaceSizeChangedCallback ,
#if defined(ENABLE_OVERLOADING)
SurfaceSizeChangedSignalInfo ,
#endif
afterSurfaceSizeChanged ,
genClosure_SurfaceSizeChanged ,
mk_SurfaceSizeChangedCallback ,
noSurfaceSizeChangedCallback ,
onSurfaceSizeChanged ,
wrap_SurfaceSizeChangedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
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.Region as Cairo.Region
import qualified GI.Cairo.Structs.Surface as Cairo.Surface
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.CairoContext as Gdk.CairoContext
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.Event as Gdk.Event
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.Monitor as Gdk.Monitor
import {-# SOURCE #-} qualified GI.Gdk.Objects.Texture as Gdk.Texture
import {-# SOURCE #-} qualified GI.Gdk.Objects.VulkanContext as Gdk.VulkanContext
import {-# SOURCE #-} qualified GI.Gdk.Structs.Geometry as Gdk.Geometry
import {-# SOURCE #-} qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
newtype Surface = Surface (ManagedPtr Surface)
deriving (Surface -> Surface -> Bool
(Surface -> Surface -> Bool)
-> (Surface -> Surface -> Bool) -> Eq Surface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Surface -> Surface -> Bool
$c/= :: Surface -> Surface -> Bool
== :: Surface -> Surface -> Bool
$c== :: Surface -> Surface -> Bool
Eq)
foreign import ccall "gdk_surface_get_type"
c_gdk_surface_get_type :: IO GType
instance GObject Surface where
gobjectType :: IO GType
gobjectType = IO GType
c_gdk_surface_get_type
instance B.GValue.IsGValue Surface where
toGValue :: Surface -> IO GValue
toGValue o :: Surface
o = do
GType
gtype <- IO GType
c_gdk_surface_get_type
Surface -> (Ptr Surface -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Surface
o (GType
-> (GValue -> Ptr Surface -> IO ()) -> Ptr Surface -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Surface -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Surface
fromGValue gv :: GValue
gv = do
Ptr Surface
ptr <- GValue -> IO (Ptr Surface)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Surface)
(ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Surface -> Surface
Surface Ptr Surface
ptr
class (GObject o, O.IsDescendantOf Surface o) => IsSurface o
instance (GObject o, O.IsDescendantOf Surface o) => IsSurface o
instance O.HasParentTypes Surface
type instance O.ParentTypes Surface = '[GObject.Object.Object]
toSurface :: (MonadIO m, IsSurface o) => o -> m Surface
toSurface :: o -> m Surface
toSurface = IO Surface -> m Surface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Surface -> m Surface) -> (o -> IO Surface) -> o -> m Surface
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Surface -> Surface) -> o -> IO Surface
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Surface -> Surface
Surface
noSurface :: Maybe Surface
noSurface :: Maybe Surface
noSurface = Maybe Surface
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveSurfaceMethod (t :: Symbol) (o :: *) :: * where
ResolveSurfaceMethod "beep" o = SurfaceBeepMethodInfo
ResolveSurfaceMethod "beginMoveDrag" o = SurfaceBeginMoveDragMethodInfo
ResolveSurfaceMethod "beginMoveDragForDevice" o = SurfaceBeginMoveDragForDeviceMethodInfo
ResolveSurfaceMethod "beginResizeDrag" o = SurfaceBeginResizeDragMethodInfo
ResolveSurfaceMethod "beginResizeDragForDevice" o = SurfaceBeginResizeDragForDeviceMethodInfo
ResolveSurfaceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSurfaceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSurfaceMethod "coordsFromParent" o = SurfaceCoordsFromParentMethodInfo
ResolveSurfaceMethod "coordsToParent" o = SurfaceCoordsToParentMethodInfo
ResolveSurfaceMethod "createCairoContext" o = SurfaceCreateCairoContextMethodInfo
ResolveSurfaceMethod "createGlContext" o = SurfaceCreateGlContextMethodInfo
ResolveSurfaceMethod "createSimilarSurface" o = SurfaceCreateSimilarSurfaceMethodInfo
ResolveSurfaceMethod "createVulkanContext" o = SurfaceCreateVulkanContextMethodInfo
ResolveSurfaceMethod "deiconify" o = SurfaceDeiconifyMethodInfo
ResolveSurfaceMethod "destroy" o = SurfaceDestroyMethodInfo
ResolveSurfaceMethod "focus" o = SurfaceFocusMethodInfo
ResolveSurfaceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSurfaceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSurfaceMethod "freezeUpdates" o = SurfaceFreezeUpdatesMethodInfo
ResolveSurfaceMethod "fullscreen" o = SurfaceFullscreenMethodInfo
ResolveSurfaceMethod "fullscreenOnMonitor" o = SurfaceFullscreenOnMonitorMethodInfo
ResolveSurfaceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSurfaceMethod "hasNative" o = SurfaceHasNativeMethodInfo
ResolveSurfaceMethod "hide" o = SurfaceHideMethodInfo
ResolveSurfaceMethod "iconify" o = SurfaceIconifyMethodInfo
ResolveSurfaceMethod "inputShapeCombineRegion" o = SurfaceInputShapeCombineRegionMethodInfo
ResolveSurfaceMethod "isDestroyed" o = SurfaceIsDestroyedMethodInfo
ResolveSurfaceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSurfaceMethod "isInputOnly" o = SurfaceIsInputOnlyMethodInfo
ResolveSurfaceMethod "isViewable" o = SurfaceIsViewableMethodInfo
ResolveSurfaceMethod "isVisible" o = SurfaceIsVisibleMethodInfo
ResolveSurfaceMethod "lower" o = SurfaceLowerMethodInfo
ResolveSurfaceMethod "maximize" o = SurfaceMaximizeMethodInfo
ResolveSurfaceMethod "mergeChildInputShapes" o = SurfaceMergeChildInputShapesMethodInfo
ResolveSurfaceMethod "move" o = SurfaceMoveMethodInfo
ResolveSurfaceMethod "moveResize" o = SurfaceMoveResizeMethodInfo
ResolveSurfaceMethod "moveToRect" o = SurfaceMoveToRectMethodInfo
ResolveSurfaceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSurfaceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSurfaceMethod "peekChildren" o = SurfacePeekChildrenMethodInfo
ResolveSurfaceMethod "queueExpose" o = SurfaceQueueExposeMethodInfo
ResolveSurfaceMethod "raise" o = SurfaceRaiseMethodInfo
ResolveSurfaceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSurfaceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSurfaceMethod "registerDnd" o = SurfaceRegisterDndMethodInfo
ResolveSurfaceMethod "resize" o = SurfaceResizeMethodInfo
ResolveSurfaceMethod "restack" o = SurfaceRestackMethodInfo
ResolveSurfaceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSurfaceMethod "show" o = SurfaceShowMethodInfo
ResolveSurfaceMethod "showUnraised" o = SurfaceShowUnraisedMethodInfo
ResolveSurfaceMethod "showWindowMenu" o = SurfaceShowWindowMenuMethodInfo
ResolveSurfaceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSurfaceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSurfaceMethod "stick" o = SurfaceStickMethodInfo
ResolveSurfaceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSurfaceMethod "thawUpdates" o = SurfaceThawUpdatesMethodInfo
ResolveSurfaceMethod "unfullscreen" o = SurfaceUnfullscreenMethodInfo
ResolveSurfaceMethod "unmaximize" o = SurfaceUnmaximizeMethodInfo
ResolveSurfaceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSurfaceMethod "unstick" o = SurfaceUnstickMethodInfo
ResolveSurfaceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSurfaceMethod "getAcceptFocus" o = SurfaceGetAcceptFocusMethodInfo
ResolveSurfaceMethod "getChildren" o = SurfaceGetChildrenMethodInfo
ResolveSurfaceMethod "getCursor" o = SurfaceGetCursorMethodInfo
ResolveSurfaceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSurfaceMethod "getDecorations" o = SurfaceGetDecorationsMethodInfo
ResolveSurfaceMethod "getDeviceCursor" o = SurfaceGetDeviceCursorMethodInfo
ResolveSurfaceMethod "getDevicePosition" o = SurfaceGetDevicePositionMethodInfo
ResolveSurfaceMethod "getDisplay" o = SurfaceGetDisplayMethodInfo
ResolveSurfaceMethod "getFocusOnMap" o = SurfaceGetFocusOnMapMethodInfo
ResolveSurfaceMethod "getFrameClock" o = SurfaceGetFrameClockMethodInfo
ResolveSurfaceMethod "getFrameExtents" o = SurfaceGetFrameExtentsMethodInfo
ResolveSurfaceMethod "getFullscreenMode" o = SurfaceGetFullscreenModeMethodInfo
ResolveSurfaceMethod "getGeometry" o = SurfaceGetGeometryMethodInfo
ResolveSurfaceMethod "getHeight" o = SurfaceGetHeightMethodInfo
ResolveSurfaceMethod "getModalHint" o = SurfaceGetModalHintMethodInfo
ResolveSurfaceMethod "getOrigin" o = SurfaceGetOriginMethodInfo
ResolveSurfaceMethod "getParent" o = SurfaceGetParentMethodInfo
ResolveSurfaceMethod "getPassThrough" o = SurfaceGetPassThroughMethodInfo
ResolveSurfaceMethod "getPosition" o = SurfaceGetPositionMethodInfo
ResolveSurfaceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSurfaceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSurfaceMethod "getRootCoords" o = SurfaceGetRootCoordsMethodInfo
ResolveSurfaceMethod "getRootOrigin" o = SurfaceGetRootOriginMethodInfo
ResolveSurfaceMethod "getScaleFactor" o = SurfaceGetScaleFactorMethodInfo
ResolveSurfaceMethod "getState" o = SurfaceGetStateMethodInfo
ResolveSurfaceMethod "getSupportMultidevice" o = SurfaceGetSupportMultideviceMethodInfo
ResolveSurfaceMethod "getSurfaceType" o = SurfaceGetSurfaceTypeMethodInfo
ResolveSurfaceMethod "getToplevel" o = SurfaceGetToplevelMethodInfo
ResolveSurfaceMethod "getTypeHint" o = SurfaceGetTypeHintMethodInfo
ResolveSurfaceMethod "getWidth" o = SurfaceGetWidthMethodInfo
ResolveSurfaceMethod "setAcceptFocus" o = SurfaceSetAcceptFocusMethodInfo
ResolveSurfaceMethod "setChildInputShapes" o = SurfaceSetChildInputShapesMethodInfo
ResolveSurfaceMethod "setCursor" o = SurfaceSetCursorMethodInfo
ResolveSurfaceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSurfaceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveSurfaceMethod "setDecorations" o = SurfaceSetDecorationsMethodInfo
ResolveSurfaceMethod "setDeviceCursor" o = SurfaceSetDeviceCursorMethodInfo
ResolveSurfaceMethod "setFocusOnMap" o = SurfaceSetFocusOnMapMethodInfo
ResolveSurfaceMethod "setFullscreenMode" o = SurfaceSetFullscreenModeMethodInfo
ResolveSurfaceMethod "setFunctions" o = SurfaceSetFunctionsMethodInfo
ResolveSurfaceMethod "setGeometryHints" o = SurfaceSetGeometryHintsMethodInfo
ResolveSurfaceMethod "setIconList" o = SurfaceSetIconListMethodInfo
ResolveSurfaceMethod "setIconName" o = SurfaceSetIconNameMethodInfo
ResolveSurfaceMethod "setKeepAbove" o = SurfaceSetKeepAboveMethodInfo
ResolveSurfaceMethod "setKeepBelow" o = SurfaceSetKeepBelowMethodInfo
ResolveSurfaceMethod "setModalHint" o = SurfaceSetModalHintMethodInfo
ResolveSurfaceMethod "setOpacity" o = SurfaceSetOpacityMethodInfo
ResolveSurfaceMethod "setOpaqueRegion" o = SurfaceSetOpaqueRegionMethodInfo
ResolveSurfaceMethod "setPassThrough" o = SurfaceSetPassThroughMethodInfo
ResolveSurfaceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSurfaceMethod "setShadowWidth" o = SurfaceSetShadowWidthMethodInfo
ResolveSurfaceMethod "setStartupId" o = SurfaceSetStartupIdMethodInfo
ResolveSurfaceMethod "setSupportMultidevice" o = SurfaceSetSupportMultideviceMethodInfo
ResolveSurfaceMethod "setTitle" o = SurfaceSetTitleMethodInfo
ResolveSurfaceMethod "setTransientFor" o = SurfaceSetTransientForMethodInfo
ResolveSurfaceMethod "setTypeHint" o = SurfaceSetTypeHintMethodInfo
ResolveSurfaceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSurfaceMethod t Surface, O.MethodInfo info Surface p) => OL.IsLabel t (Surface -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type SurfaceEventCallback =
Gdk.Event.Event
-> IO Bool
noSurfaceEventCallback :: Maybe SurfaceEventCallback
noSurfaceEventCallback :: Maybe SurfaceEventCallback
noSurfaceEventCallback = Maybe SurfaceEventCallback
forall a. Maybe a
Nothing
type C_SurfaceEventCallback =
Ptr () ->
Ptr Gdk.Event.Event ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_SurfaceEventCallback :: C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback)
genClosure_SurfaceEvent :: MonadIO m => SurfaceEventCallback -> m (GClosure C_SurfaceEventCallback)
genClosure_SurfaceEvent :: SurfaceEventCallback -> m (GClosure C_SurfaceEventCallback)
genClosure_SurfaceEvent cb :: SurfaceEventCallback
cb = IO (GClosure C_SurfaceEventCallback)
-> m (GClosure C_SurfaceEventCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SurfaceEventCallback)
-> m (GClosure C_SurfaceEventCallback))
-> IO (GClosure C_SurfaceEventCallback)
-> m (GClosure C_SurfaceEventCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SurfaceEventCallback
cb' = SurfaceEventCallback -> C_SurfaceEventCallback
wrap_SurfaceEventCallback SurfaceEventCallback
cb
C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback)
mk_SurfaceEventCallback C_SurfaceEventCallback
cb' IO (FunPtr C_SurfaceEventCallback)
-> (FunPtr C_SurfaceEventCallback
-> IO (GClosure C_SurfaceEventCallback))
-> IO (GClosure C_SurfaceEventCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SurfaceEventCallback
-> IO (GClosure C_SurfaceEventCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SurfaceEventCallback ::
SurfaceEventCallback ->
C_SurfaceEventCallback
wrap_SurfaceEventCallback :: SurfaceEventCallback -> C_SurfaceEventCallback
wrap_SurfaceEventCallback _cb :: SurfaceEventCallback
_cb _ event :: Ptr Event
event _ = do
Event
event' <- ((ManagedPtr Event -> Event) -> Ptr Event -> IO Event
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Event -> Event
Gdk.Event.Event) Ptr Event
event
Bool
result <- SurfaceEventCallback
_cb Event
event'
let result' :: CInt
result' = (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
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId
onSurfaceEvent :: a -> SurfaceEventCallback -> m SignalHandlerId
onSurfaceEvent obj :: a
obj cb :: SurfaceEventCallback
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_SurfaceEventCallback
cb' = SurfaceEventCallback -> C_SurfaceEventCallback
wrap_SurfaceEventCallback SurfaceEventCallback
cb
FunPtr C_SurfaceEventCallback
cb'' <- C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback)
mk_SurfaceEventCallback C_SurfaceEventCallback
cb'
a
-> Text
-> FunPtr C_SurfaceEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "event" FunPtr C_SurfaceEventCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSurfaceEvent :: (IsSurface a, MonadIO m) => a -> SurfaceEventCallback -> m SignalHandlerId
afterSurfaceEvent :: a -> SurfaceEventCallback -> m SignalHandlerId
afterSurfaceEvent obj :: a
obj cb :: SurfaceEventCallback
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_SurfaceEventCallback
cb' = SurfaceEventCallback -> C_SurfaceEventCallback
wrap_SurfaceEventCallback SurfaceEventCallback
cb
FunPtr C_SurfaceEventCallback
cb'' <- C_SurfaceEventCallback -> IO (FunPtr C_SurfaceEventCallback)
mk_SurfaceEventCallback C_SurfaceEventCallback
cb'
a
-> Text
-> FunPtr C_SurfaceEventCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "event" FunPtr C_SurfaceEventCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SurfaceEventSignalInfo
instance SignalInfo SurfaceEventSignalInfo where
type HaskellCallbackType SurfaceEventSignalInfo = SurfaceEventCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SurfaceEventCallback cb
cb'' <- mk_SurfaceEventCallback cb'
connectSignalFunPtr obj "event" cb'' connectMode detail
#endif
type SurfaceMovedToRectCallback =
Ptr ()
-> Ptr ()
-> Bool
-> Bool
-> IO ()
noSurfaceMovedToRectCallback :: Maybe SurfaceMovedToRectCallback
noSurfaceMovedToRectCallback :: Maybe SurfaceMovedToRectCallback
noSurfaceMovedToRectCallback = Maybe SurfaceMovedToRectCallback
forall a. Maybe a
Nothing
type C_SurfaceMovedToRectCallback =
Ptr () ->
Ptr () ->
Ptr () ->
CInt ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SurfaceMovedToRectCallback :: C_SurfaceMovedToRectCallback -> IO (FunPtr C_SurfaceMovedToRectCallback)
genClosure_SurfaceMovedToRect :: MonadIO m => SurfaceMovedToRectCallback -> m (GClosure C_SurfaceMovedToRectCallback)
genClosure_SurfaceMovedToRect :: SurfaceMovedToRectCallback
-> m (GClosure C_SurfaceMovedToRectCallback)
genClosure_SurfaceMovedToRect cb :: SurfaceMovedToRectCallback
cb = IO (GClosure C_SurfaceMovedToRectCallback)
-> m (GClosure C_SurfaceMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SurfaceMovedToRectCallback)
-> m (GClosure C_SurfaceMovedToRectCallback))
-> IO (GClosure C_SurfaceMovedToRectCallback)
-> m (GClosure C_SurfaceMovedToRectCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SurfaceMovedToRectCallback
cb' = SurfaceMovedToRectCallback -> C_SurfaceMovedToRectCallback
wrap_SurfaceMovedToRectCallback SurfaceMovedToRectCallback
cb
C_SurfaceMovedToRectCallback
-> IO (FunPtr C_SurfaceMovedToRectCallback)
mk_SurfaceMovedToRectCallback C_SurfaceMovedToRectCallback
cb' IO (FunPtr C_SurfaceMovedToRectCallback)
-> (FunPtr C_SurfaceMovedToRectCallback
-> IO (GClosure C_SurfaceMovedToRectCallback))
-> IO (GClosure C_SurfaceMovedToRectCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SurfaceMovedToRectCallback
-> IO (GClosure C_SurfaceMovedToRectCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SurfaceMovedToRectCallback ::
SurfaceMovedToRectCallback ->
C_SurfaceMovedToRectCallback
wrap_SurfaceMovedToRectCallback :: SurfaceMovedToRectCallback -> C_SurfaceMovedToRectCallback
wrap_SurfaceMovedToRectCallback _cb :: SurfaceMovedToRectCallback
_cb _ flippedRect :: Ptr ()
flippedRect finalRect :: Ptr ()
finalRect flippedX :: CInt
flippedX flippedY :: CInt
flippedY _ = do
let flippedX' :: Bool
flippedX' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
flippedX
let flippedY' :: Bool
flippedY' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
flippedY
SurfaceMovedToRectCallback
_cb Ptr ()
flippedRect Ptr ()
finalRect Bool
flippedX' Bool
flippedY'
onSurfaceMovedToRect :: (IsSurface a, MonadIO m) => a -> SurfaceMovedToRectCallback -> m SignalHandlerId
onSurfaceMovedToRect :: a -> SurfaceMovedToRectCallback -> m SignalHandlerId
onSurfaceMovedToRect obj :: a
obj cb :: SurfaceMovedToRectCallback
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_SurfaceMovedToRectCallback
cb' = SurfaceMovedToRectCallback -> C_SurfaceMovedToRectCallback
wrap_SurfaceMovedToRectCallback SurfaceMovedToRectCallback
cb
FunPtr C_SurfaceMovedToRectCallback
cb'' <- C_SurfaceMovedToRectCallback
-> IO (FunPtr C_SurfaceMovedToRectCallback)
mk_SurfaceMovedToRectCallback C_SurfaceMovedToRectCallback
cb'
a
-> Text
-> FunPtr C_SurfaceMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "moved-to-rect" FunPtr C_SurfaceMovedToRectCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSurfaceMovedToRect :: (IsSurface a, MonadIO m) => a -> SurfaceMovedToRectCallback -> m SignalHandlerId
afterSurfaceMovedToRect :: a -> SurfaceMovedToRectCallback -> m SignalHandlerId
afterSurfaceMovedToRect obj :: a
obj cb :: SurfaceMovedToRectCallback
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_SurfaceMovedToRectCallback
cb' = SurfaceMovedToRectCallback -> C_SurfaceMovedToRectCallback
wrap_SurfaceMovedToRectCallback SurfaceMovedToRectCallback
cb
FunPtr C_SurfaceMovedToRectCallback
cb'' <- C_SurfaceMovedToRectCallback
-> IO (FunPtr C_SurfaceMovedToRectCallback)
mk_SurfaceMovedToRectCallback C_SurfaceMovedToRectCallback
cb'
a
-> Text
-> FunPtr C_SurfaceMovedToRectCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "moved-to-rect" FunPtr C_SurfaceMovedToRectCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SurfaceMovedToRectSignalInfo
instance SignalInfo SurfaceMovedToRectSignalInfo where
type HaskellCallbackType SurfaceMovedToRectSignalInfo = SurfaceMovedToRectCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SurfaceMovedToRectCallback cb
cb'' <- mk_SurfaceMovedToRectCallback cb'
connectSignalFunPtr obj "moved-to-rect" cb'' connectMode detail
#endif
type SurfaceRenderCallback =
Cairo.Region.Region
-> IO Bool
noSurfaceRenderCallback :: Maybe SurfaceRenderCallback
noSurfaceRenderCallback :: Maybe SurfaceRenderCallback
noSurfaceRenderCallback = Maybe SurfaceRenderCallback
forall a. Maybe a
Nothing
type C_SurfaceRenderCallback =
Ptr () ->
Ptr Cairo.Region.Region ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_SurfaceRenderCallback :: C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback)
genClosure_SurfaceRender :: MonadIO m => SurfaceRenderCallback -> m (GClosure C_SurfaceRenderCallback)
genClosure_SurfaceRender :: SurfaceRenderCallback -> m (GClosure C_SurfaceRenderCallback)
genClosure_SurfaceRender cb :: SurfaceRenderCallback
cb = IO (GClosure C_SurfaceRenderCallback)
-> m (GClosure C_SurfaceRenderCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SurfaceRenderCallback)
-> m (GClosure C_SurfaceRenderCallback))
-> IO (GClosure C_SurfaceRenderCallback)
-> m (GClosure C_SurfaceRenderCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SurfaceRenderCallback
cb' = SurfaceRenderCallback -> C_SurfaceRenderCallback
wrap_SurfaceRenderCallback SurfaceRenderCallback
cb
C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback)
mk_SurfaceRenderCallback C_SurfaceRenderCallback
cb' IO (FunPtr C_SurfaceRenderCallback)
-> (FunPtr C_SurfaceRenderCallback
-> IO (GClosure C_SurfaceRenderCallback))
-> IO (GClosure C_SurfaceRenderCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SurfaceRenderCallback
-> IO (GClosure C_SurfaceRenderCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SurfaceRenderCallback ::
SurfaceRenderCallback ->
C_SurfaceRenderCallback
wrap_SurfaceRenderCallback :: SurfaceRenderCallback -> C_SurfaceRenderCallback
wrap_SurfaceRenderCallback _cb :: SurfaceRenderCallback
_cb _ region :: Ptr Region
region _ = do
(ManagedPtr Region -> Region)
-> Ptr Region -> (Region -> IO CInt) -> IO CInt
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
(ManagedPtr a -> a) -> Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient ManagedPtr Region -> Region
Cairo.Region.Region Ptr Region
region ((Region -> IO CInt) -> IO CInt) -> (Region -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \region' :: Region
region' -> do
Bool
result <- SurfaceRenderCallback
_cb Region
region'
let result' :: CInt
result' = (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
result
CInt -> IO CInt
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId
onSurfaceRender :: a -> SurfaceRenderCallback -> m SignalHandlerId
onSurfaceRender obj :: a
obj cb :: SurfaceRenderCallback
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_SurfaceRenderCallback
cb' = SurfaceRenderCallback -> C_SurfaceRenderCallback
wrap_SurfaceRenderCallback SurfaceRenderCallback
cb
FunPtr C_SurfaceRenderCallback
cb'' <- C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback)
mk_SurfaceRenderCallback C_SurfaceRenderCallback
cb'
a
-> Text
-> FunPtr C_SurfaceRenderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "render" FunPtr C_SurfaceRenderCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSurfaceRender :: (IsSurface a, MonadIO m) => a -> SurfaceRenderCallback -> m SignalHandlerId
afterSurfaceRender :: a -> SurfaceRenderCallback -> m SignalHandlerId
afterSurfaceRender obj :: a
obj cb :: SurfaceRenderCallback
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_SurfaceRenderCallback
cb' = SurfaceRenderCallback -> C_SurfaceRenderCallback
wrap_SurfaceRenderCallback SurfaceRenderCallback
cb
FunPtr C_SurfaceRenderCallback
cb'' <- C_SurfaceRenderCallback -> IO (FunPtr C_SurfaceRenderCallback)
mk_SurfaceRenderCallback C_SurfaceRenderCallback
cb'
a
-> Text
-> FunPtr C_SurfaceRenderCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "render" FunPtr C_SurfaceRenderCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SurfaceRenderSignalInfo
instance SignalInfo SurfaceRenderSignalInfo where
type HaskellCallbackType SurfaceRenderSignalInfo = SurfaceRenderCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SurfaceRenderCallback cb
cb'' <- mk_SurfaceRenderCallback cb'
connectSignalFunPtr obj "render" cb'' connectMode detail
#endif
type SurfaceSizeChangedCallback =
Int32
-> Int32
-> IO ()
noSurfaceSizeChangedCallback :: Maybe SurfaceSizeChangedCallback
noSurfaceSizeChangedCallback :: Maybe SurfaceSizeChangedCallback
noSurfaceSizeChangedCallback = Maybe SurfaceSizeChangedCallback
forall a. Maybe a
Nothing
type C_SurfaceSizeChangedCallback =
Ptr () ->
Int32 ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_SurfaceSizeChangedCallback :: C_SurfaceSizeChangedCallback -> IO (FunPtr C_SurfaceSizeChangedCallback)
genClosure_SurfaceSizeChanged :: MonadIO m => SurfaceSizeChangedCallback -> m (GClosure C_SurfaceSizeChangedCallback)
genClosure_SurfaceSizeChanged :: SurfaceSizeChangedCallback
-> m (GClosure C_SurfaceSizeChangedCallback)
genClosure_SurfaceSizeChanged cb :: SurfaceSizeChangedCallback
cb = IO (GClosure C_SurfaceSizeChangedCallback)
-> m (GClosure C_SurfaceSizeChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_SurfaceSizeChangedCallback)
-> m (GClosure C_SurfaceSizeChangedCallback))
-> IO (GClosure C_SurfaceSizeChangedCallback)
-> m (GClosure C_SurfaceSizeChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_SurfaceSizeChangedCallback
cb' = SurfaceSizeChangedCallback -> C_SurfaceSizeChangedCallback
wrap_SurfaceSizeChangedCallback SurfaceSizeChangedCallback
cb
C_SurfaceSizeChangedCallback
-> IO (FunPtr C_SurfaceSizeChangedCallback)
mk_SurfaceSizeChangedCallback C_SurfaceSizeChangedCallback
cb' IO (FunPtr C_SurfaceSizeChangedCallback)
-> (FunPtr C_SurfaceSizeChangedCallback
-> IO (GClosure C_SurfaceSizeChangedCallback))
-> IO (GClosure C_SurfaceSizeChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_SurfaceSizeChangedCallback
-> IO (GClosure C_SurfaceSizeChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_SurfaceSizeChangedCallback ::
SurfaceSizeChangedCallback ->
C_SurfaceSizeChangedCallback
wrap_SurfaceSizeChangedCallback :: SurfaceSizeChangedCallback -> C_SurfaceSizeChangedCallback
wrap_SurfaceSizeChangedCallback _cb :: SurfaceSizeChangedCallback
_cb _ width :: Int32
width height :: Int32
height _ = do
SurfaceSizeChangedCallback
_cb Int32
width Int32
height
onSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId
onSurfaceSizeChanged :: a -> SurfaceSizeChangedCallback -> m SignalHandlerId
onSurfaceSizeChanged obj :: a
obj cb :: SurfaceSizeChangedCallback
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_SurfaceSizeChangedCallback
cb' = SurfaceSizeChangedCallback -> C_SurfaceSizeChangedCallback
wrap_SurfaceSizeChangedCallback SurfaceSizeChangedCallback
cb
FunPtr C_SurfaceSizeChangedCallback
cb'' <- C_SurfaceSizeChangedCallback
-> IO (FunPtr C_SurfaceSizeChangedCallback)
mk_SurfaceSizeChangedCallback C_SurfaceSizeChangedCallback
cb'
a
-> Text
-> FunPtr C_SurfaceSizeChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "size-changed" FunPtr C_SurfaceSizeChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterSurfaceSizeChanged :: (IsSurface a, MonadIO m) => a -> SurfaceSizeChangedCallback -> m SignalHandlerId
afterSurfaceSizeChanged :: a -> SurfaceSizeChangedCallback -> m SignalHandlerId
afterSurfaceSizeChanged obj :: a
obj cb :: SurfaceSizeChangedCallback
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_SurfaceSizeChangedCallback
cb' = SurfaceSizeChangedCallback -> C_SurfaceSizeChangedCallback
wrap_SurfaceSizeChangedCallback SurfaceSizeChangedCallback
cb
FunPtr C_SurfaceSizeChangedCallback
cb'' <- C_SurfaceSizeChangedCallback
-> IO (FunPtr C_SurfaceSizeChangedCallback)
mk_SurfaceSizeChangedCallback C_SurfaceSizeChangedCallback
cb'
a
-> Text
-> FunPtr C_SurfaceSizeChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "size-changed" FunPtr C_SurfaceSizeChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data SurfaceSizeChangedSignalInfo
instance SignalInfo SurfaceSizeChangedSignalInfo where
type HaskellCallbackType SurfaceSizeChangedSignalInfo = SurfaceSizeChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_SurfaceSizeChangedCallback cb
cb'' <- mk_SurfaceSizeChangedCallback cb'
connectSignalFunPtr obj "size-changed" cb'' connectMode detail
#endif
getSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m (Maybe Gdk.Cursor.Cursor)
getSurfaceCursor :: o -> m (Maybe Cursor)
getSurfaceCursor obj :: 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 "cursor" ManagedPtr Cursor -> Cursor
Gdk.Cursor.Cursor
setSurfaceCursor :: (MonadIO m, IsSurface o, Gdk.Cursor.IsCursor a) => o -> a -> m ()
setSurfaceCursor :: o -> a -> m ()
setSurfaceCursor obj :: o
obj val :: 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 "cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructSurfaceCursor :: (IsSurface o, Gdk.Cursor.IsCursor a) => a -> IO (GValueConstruct o)
constructSurfaceCursor :: a -> IO (GValueConstruct o)
constructSurfaceCursor val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "cursor" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
clearSurfaceCursor :: (MonadIO m, IsSurface o) => o -> m ()
clearSurfaceCursor :: o -> m ()
clearSurfaceCursor obj :: 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 "cursor" (Maybe Cursor
forall a. Maybe a
Nothing :: Maybe Gdk.Cursor.Cursor)
#if defined(ENABLE_OVERLOADING)
data SurfaceCursorPropertyInfo
instance AttrInfo SurfaceCursorPropertyInfo where
type AttrAllowedOps SurfaceCursorPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SurfaceCursorPropertyInfo = IsSurface
type AttrSetTypeConstraint SurfaceCursorPropertyInfo = Gdk.Cursor.IsCursor
type AttrTransferTypeConstraint SurfaceCursorPropertyInfo = Gdk.Cursor.IsCursor
type AttrTransferType SurfaceCursorPropertyInfo = Gdk.Cursor.Cursor
type AttrGetType SurfaceCursorPropertyInfo = (Maybe Gdk.Cursor.Cursor)
type AttrLabel SurfaceCursorPropertyInfo = "cursor"
type AttrOrigin SurfaceCursorPropertyInfo = Surface
attrGet = getSurfaceCursor
attrSet = setSurfaceCursor
attrTransfer _ v = do
unsafeCastTo Gdk.Cursor.Cursor v
attrConstruct = constructSurfaceCursor
attrClear = clearSurfaceCursor
#endif
getSurfaceDisplay :: (MonadIO m, IsSurface o) => o -> m Gdk.Display.Display
getSurfaceDisplay :: o -> m Display
getSurfaceDisplay obj :: o
obj = 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
$ Text -> IO (Maybe Display) -> IO Display
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getSurfaceDisplay" (IO (Maybe Display) -> IO Display)
-> IO (Maybe Display) -> IO Display
forall a b. (a -> b) -> a -> b
$ o
-> String -> (ManagedPtr Display -> Display) -> IO (Maybe Display)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "display" ManagedPtr Display -> Display
Gdk.Display.Display
constructSurfaceDisplay :: (IsSurface o, Gdk.Display.IsDisplay a) => a -> IO (GValueConstruct o)
constructSurfaceDisplay :: a -> IO (GValueConstruct o)
constructSurfaceDisplay val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "display" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
#if defined(ENABLE_OVERLOADING)
data SurfaceDisplayPropertyInfo
instance AttrInfo SurfaceDisplayPropertyInfo where
type AttrAllowedOps SurfaceDisplayPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SurfaceDisplayPropertyInfo = IsSurface
type AttrSetTypeConstraint SurfaceDisplayPropertyInfo = Gdk.Display.IsDisplay
type AttrTransferTypeConstraint SurfaceDisplayPropertyInfo = Gdk.Display.IsDisplay
type AttrTransferType SurfaceDisplayPropertyInfo = Gdk.Display.Display
type AttrGetType SurfaceDisplayPropertyInfo = Gdk.Display.Display
type AttrLabel SurfaceDisplayPropertyInfo = "display"
type AttrOrigin SurfaceDisplayPropertyInfo = Surface
attrGet = getSurfaceDisplay
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gdk.Display.Display v
attrConstruct = constructSurfaceDisplay
attrClear = undefined
#endif
getSurfaceFrameClock :: (MonadIO m, IsSurface o) => o -> m Gdk.FrameClock.FrameClock
getSurfaceFrameClock :: o -> m FrameClock
getSurfaceFrameClock obj :: o
obj = 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
$ Text -> IO (Maybe FrameClock) -> IO FrameClock
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing "getSurfaceFrameClock" (IO (Maybe FrameClock) -> IO FrameClock)
-> IO (Maybe FrameClock) -> IO FrameClock
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr FrameClock -> FrameClock)
-> IO (Maybe FrameClock)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj "frame-clock" ManagedPtr FrameClock -> FrameClock
Gdk.FrameClock.FrameClock
constructSurfaceFrameClock :: (IsSurface o, Gdk.FrameClock.IsFrameClock a) => a -> IO (GValueConstruct o)
constructSurfaceFrameClock :: a -> IO (GValueConstruct o)
constructSurfaceFrameClock val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "frame-clock" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
#if defined(ENABLE_OVERLOADING)
data SurfaceFrameClockPropertyInfo
instance AttrInfo SurfaceFrameClockPropertyInfo where
type AttrAllowedOps SurfaceFrameClockPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint SurfaceFrameClockPropertyInfo = IsSurface
type AttrSetTypeConstraint SurfaceFrameClockPropertyInfo = Gdk.FrameClock.IsFrameClock
type AttrTransferTypeConstraint SurfaceFrameClockPropertyInfo = Gdk.FrameClock.IsFrameClock
type AttrTransferType SurfaceFrameClockPropertyInfo = Gdk.FrameClock.FrameClock
type AttrGetType SurfaceFrameClockPropertyInfo = Gdk.FrameClock.FrameClock
type AttrLabel SurfaceFrameClockPropertyInfo = "frame-clock"
type AttrOrigin SurfaceFrameClockPropertyInfo = Surface
attrGet = getSurfaceFrameClock
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gdk.FrameClock.FrameClock v
attrConstruct = constructSurfaceFrameClock
attrClear = undefined
#endif
getSurfaceMapped :: (MonadIO m, IsSurface o) => o -> m Bool
getSurfaceMapped :: o -> m Bool
getSurfaceMapped obj :: o
obj = 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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "mapped"
#if defined(ENABLE_OVERLOADING)
data SurfaceMappedPropertyInfo
instance AttrInfo SurfaceMappedPropertyInfo where
type AttrAllowedOps SurfaceMappedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint SurfaceMappedPropertyInfo = IsSurface
type AttrSetTypeConstraint SurfaceMappedPropertyInfo = (~) ()
type AttrTransferTypeConstraint SurfaceMappedPropertyInfo = (~) ()
type AttrTransferType SurfaceMappedPropertyInfo = ()
type AttrGetType SurfaceMappedPropertyInfo = Bool
type AttrLabel SurfaceMappedPropertyInfo = "mapped"
type AttrOrigin SurfaceMappedPropertyInfo = Surface
attrGet = getSurfaceMapped
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
getSurfaceState :: (MonadIO m, IsSurface o) => o -> m [Gdk.Flags.SurfaceState]
getSurfaceState :: o -> m [SurfaceState]
getSurfaceState obj :: o
obj = IO [SurfaceState] -> m [SurfaceState]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SurfaceState] -> m [SurfaceState])
-> IO [SurfaceState] -> m [SurfaceState]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [SurfaceState]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj "state"
#if defined(ENABLE_OVERLOADING)
data SurfaceStatePropertyInfo
instance AttrInfo SurfaceStatePropertyInfo where
type AttrAllowedOps SurfaceStatePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint SurfaceStatePropertyInfo = IsSurface
type AttrSetTypeConstraint SurfaceStatePropertyInfo = (~) ()
type AttrTransferTypeConstraint SurfaceStatePropertyInfo = (~) ()
type AttrTransferType SurfaceStatePropertyInfo = ()
type AttrGetType SurfaceStatePropertyInfo = [Gdk.Flags.SurfaceState]
type AttrLabel SurfaceStatePropertyInfo = "state"
type AttrOrigin SurfaceStatePropertyInfo = Surface
attrGet = getSurfaceState
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Surface
type instance O.AttributeList Surface = SurfaceAttributeList
type SurfaceAttributeList = ('[ '("cursor", SurfaceCursorPropertyInfo), '("display", SurfaceDisplayPropertyInfo), '("frameClock", SurfaceFrameClockPropertyInfo), '("mapped", SurfaceMappedPropertyInfo), '("state", SurfaceStatePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
surfaceCursor :: AttrLabelProxy "cursor"
surfaceCursor = AttrLabelProxy
surfaceDisplay :: AttrLabelProxy "display"
surfaceDisplay = AttrLabelProxy
surfaceFrameClock :: AttrLabelProxy "frameClock"
surfaceFrameClock = AttrLabelProxy
surfaceMapped :: AttrLabelProxy "mapped"
surfaceMapped = AttrLabelProxy
surfaceState :: AttrLabelProxy "state"
surfaceState = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Surface = SurfaceSignalList
type SurfaceSignalList = ('[ '("event", SurfaceEventSignalInfo), '("movedToRect", SurfaceMovedToRectSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("render", SurfaceRenderSignalInfo), '("sizeChanged", SurfaceSizeChangedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gdk_surface_new_child" gdk_surface_new_child ::
Ptr Surface ->
Ptr Gdk.Rectangle.Rectangle ->
IO (Ptr Surface)
surfaceNewChild ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Rectangle.Rectangle
-> m Surface
surfaceNewChild :: a -> Rectangle -> m Surface
surfaceNewChild parent :: a
parent position :: Rectangle
position = 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 Surface
parent' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
parent
Ptr Rectangle
position' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
position
Ptr Surface
result <- Ptr Surface -> Ptr Rectangle -> IO (Ptr Surface)
gdk_surface_new_child Ptr Surface
parent' Ptr Rectangle
position'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceNewChild" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
parent
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
position
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_surface_new_popup" ::
Ptr Gdk.Display.Display ->
Ptr Gdk.Rectangle.Rectangle ->
IO (Ptr Surface)
surfaceNewPopup ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Display.IsDisplay a) =>
a
-> Gdk.Rectangle.Rectangle
-> m Surface
display :: a
display position :: Rectangle
position = 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 Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Rectangle
position' <- Rectangle -> IO (Ptr Rectangle)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Rectangle
position
Ptr Surface
result <- Ptr Display -> Ptr Rectangle -> IO (Ptr Surface)
gdk_surface_new_popup Ptr Display
display' Ptr Rectangle
position'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceNewPopup" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Rectangle -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Rectangle
position
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_surface_new_temp" gdk_surface_new_temp ::
Ptr Gdk.Display.Display ->
IO (Ptr Surface)
surfaceNewTemp ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Display.IsDisplay a) =>
a
-> m Surface
surfaceNewTemp :: a -> m Surface
surfaceNewTemp display :: a
display = 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 Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Surface
result <- Ptr Display -> IO (Ptr Surface)
gdk_surface_new_temp Ptr Display
display'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceNewTemp" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_surface_new_toplevel" gdk_surface_new_toplevel ::
Ptr Gdk.Display.Display ->
Int32 ->
Int32 ->
IO (Ptr Surface)
surfaceNewToplevel ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Display.IsDisplay a) =>
a
-> Int32
-> Int32
-> m Surface
surfaceNewToplevel :: a -> Int32 -> Int32 -> m Surface
surfaceNewToplevel display :: a
display width :: Int32
width height :: 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 Display
display' <- a -> IO (Ptr Display)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
display
Ptr Surface
result <- Ptr Display -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_surface_new_toplevel Ptr Display
display' Int32
width Int32
height
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceNewToplevel" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
display
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gdk_surface_beep" gdk_surface_beep ::
Ptr Surface ->
IO ()
surfaceBeep ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceBeep :: a -> m ()
surfaceBeep surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_beep Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceBeepMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceBeepMethodInfo a signature where
overloadedMethod = surfaceBeep
#endif
foreign import ccall "gdk_surface_begin_move_drag" gdk_surface_begin_move_drag ::
Ptr Surface ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
surfaceBeginMoveDrag ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
surfaceBeginMoveDrag :: a -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
surfaceBeginMoveDrag surface :: a
surface button :: Int32
button x :: Int32
x y :: Int32
y timestamp :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_surface_begin_move_drag Ptr Surface
surface' Int32
button Int32
x Int32
y Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceBeginMoveDragMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceBeginMoveDragMethodInfo a signature where
overloadedMethod = surfaceBeginMoveDrag
#endif
foreign import ccall "gdk_surface_begin_move_drag_for_device" gdk_surface_begin_move_drag_for_device ::
Ptr Surface ->
Ptr Gdk.Device.Device ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
surfaceBeginMoveDragForDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Device.IsDevice b) =>
a
-> b
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
surfaceBeginMoveDragForDevice :: a -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
surfaceBeginMoveDragForDevice surface :: a
surface device :: b
device button :: Int32
button x :: Int32
x y :: Int32
y timestamp :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Surface
-> Ptr Device -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_surface_begin_move_drag_for_device Ptr Surface
surface' Ptr Device
device' Int32
button Int32
x Int32
y Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceBeginMoveDragForDeviceMethodInfo
instance (signature ~ (b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsSurface a, Gdk.Device.IsDevice b) => O.MethodInfo SurfaceBeginMoveDragForDeviceMethodInfo a signature where
overloadedMethod = surfaceBeginMoveDragForDevice
#endif
foreign import ccall "gdk_surface_begin_resize_drag" gdk_surface_begin_resize_drag ::
Ptr Surface ->
CUInt ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
surfaceBeginResizeDrag ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Enums.SurfaceEdge
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
surfaceBeginResizeDrag :: a -> SurfaceEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
surfaceBeginResizeDrag surface :: a
surface edge :: SurfaceEdge
edge button :: Int32
button x :: Int32
x y :: Int32
y timestamp :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SurfaceEdge -> Int) -> SurfaceEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SurfaceEdge -> Int
forall a. Enum a => a -> Int
fromEnum) SurfaceEdge
edge
Ptr Surface -> CUInt -> Int32 -> Int32 -> Int32 -> Word32 -> IO ()
gdk_surface_begin_resize_drag Ptr Surface
surface' CUInt
edge' Int32
button Int32
x Int32
y Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceBeginResizeDragMethodInfo
instance (signature ~ (Gdk.Enums.SurfaceEdge -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceBeginResizeDragMethodInfo a signature where
overloadedMethod = surfaceBeginResizeDrag
#endif
foreign import ccall "gdk_surface_begin_resize_drag_for_device" gdk_surface_begin_resize_drag_for_device ::
Ptr Surface ->
CUInt ->
Ptr Gdk.Device.Device ->
Int32 ->
Int32 ->
Int32 ->
Word32 ->
IO ()
surfaceBeginResizeDragForDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Device.IsDevice b) =>
a
-> Gdk.Enums.SurfaceEdge
-> b
-> Int32
-> Int32
-> Int32
-> Word32
-> m ()
surfaceBeginResizeDragForDevice :: a -> SurfaceEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()
surfaceBeginResizeDragForDevice surface :: a
surface edge :: SurfaceEdge
edge device :: b
device button :: Int32
button x :: Int32
x y :: Int32
y timestamp :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let edge' :: CUInt
edge' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (SurfaceEdge -> Int) -> SurfaceEdge -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SurfaceEdge -> Int
forall a. Enum a => a -> Int
fromEnum) SurfaceEdge
edge
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Surface
-> CUInt
-> Ptr Device
-> Int32
-> Int32
-> Int32
-> Word32
-> IO ()
gdk_surface_begin_resize_drag_for_device Ptr Surface
surface' CUInt
edge' Ptr Device
device' Int32
button Int32
x Int32
y Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceBeginResizeDragForDeviceMethodInfo
instance (signature ~ (Gdk.Enums.SurfaceEdge -> b -> Int32 -> Int32 -> Int32 -> Word32 -> m ()), MonadIO m, IsSurface a, Gdk.Device.IsDevice b) => O.MethodInfo SurfaceBeginResizeDragForDeviceMethodInfo a signature where
overloadedMethod = surfaceBeginResizeDragForDevice
#endif
foreign import ccall "gdk_surface_coords_from_parent" gdk_surface_coords_from_parent ::
Ptr Surface ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
surfaceCoordsFromParent ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Double
-> Double
-> m ((Double, Double))
surfaceCoordsFromParent :: a -> Double -> Double -> m (Double, Double)
surfaceCoordsFromParent surface :: a
surface parentX :: Double
parentX parentY :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_surface_coords_from_parent Ptr Surface
surface' 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
surface
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 SurfaceCoordsFromParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCoordsFromParentMethodInfo a signature where
overloadedMethod = surfaceCoordsFromParent
#endif
foreign import ccall "gdk_surface_coords_to_parent" gdk_surface_coords_to_parent ::
Ptr Surface ->
CDouble ->
CDouble ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
surfaceCoordsToParent ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Double
-> Double
-> m ((Double, Double))
surfaceCoordsToParent :: a -> Double -> Double -> m (Double, Double)
surfaceCoordsToParent surface :: a
surface x :: Double
x y :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface
-> CDouble -> CDouble -> Ptr CDouble -> Ptr CDouble -> IO ()
gdk_surface_coords_to_parent Ptr Surface
surface' 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
surface
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 SurfaceCoordsToParentMethodInfo
instance (signature ~ (Double -> Double -> m ((Double, Double))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCoordsToParentMethodInfo a signature where
overloadedMethod = surfaceCoordsToParent
#endif
foreign import ccall "gdk_surface_create_cairo_context" gdk_surface_create_cairo_context ::
Ptr Surface ->
IO (Ptr Gdk.CairoContext.CairoContext)
surfaceCreateCairoContext ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.CairoContext.CairoContext
surfaceCreateCairoContext :: a -> m CairoContext
surfaceCreateCairoContext surface :: a
surface = IO CairoContext -> m CairoContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO CairoContext -> m CairoContext)
-> IO CairoContext -> m CairoContext
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr CairoContext
result <- Ptr Surface -> IO (Ptr CairoContext)
gdk_surface_create_cairo_context Ptr Surface
surface'
Text -> Ptr CairoContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceCreateCairoContext" Ptr CairoContext
result
CairoContext
result' <- ((ManagedPtr CairoContext -> CairoContext)
-> Ptr CairoContext -> IO CairoContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr CairoContext -> CairoContext
Gdk.CairoContext.CairoContext) Ptr CairoContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
CairoContext -> IO CairoContext
forall (m :: * -> *) a. Monad m => a -> m a
return CairoContext
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceCreateCairoContextMethodInfo
instance (signature ~ (m Gdk.CairoContext.CairoContext), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCreateCairoContextMethodInfo a signature where
overloadedMethod = surfaceCreateCairoContext
#endif
foreign import ccall "gdk_surface_create_gl_context" gdk_surface_create_gl_context ::
Ptr Surface ->
Ptr (Ptr GError) ->
IO (Ptr Gdk.GLContext.GLContext)
surfaceCreateGlContext ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.GLContext.GLContext
surfaceCreateGlContext :: a -> m GLContext
surfaceCreateGlContext surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Ptr (Ptr GError) -> IO (Ptr GLContext)
gdk_surface_create_gl_context Ptr Surface
surface'
Text -> Ptr GLContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceCreateGlContext" 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
surface
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 SurfaceCreateGlContextMethodInfo
instance (signature ~ (m Gdk.GLContext.GLContext), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCreateGlContextMethodInfo a signature where
overloadedMethod = surfaceCreateGlContext
#endif
foreign import ccall "gdk_surface_create_similar_surface" gdk_surface_create_similar_surface ::
Ptr Surface ->
CUInt ->
Int32 ->
Int32 ->
IO (Ptr Cairo.Surface.Surface)
surfaceCreateSimilarSurface ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Cairo.Enums.Content
-> Int32
-> Int32
-> m Cairo.Surface.Surface
surfaceCreateSimilarSurface :: a -> Content -> Int32 -> Int32 -> m Surface
surfaceCreateSimilarSurface surface :: a
surface content :: Content
content width :: Int32
width height :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CUInt -> Int32 -> Int32 -> IO (Ptr Surface)
gdk_surface_create_similar_surface Ptr Surface
surface' CUInt
content' Int32
width Int32
height
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceCreateSimilarSurface" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a.
(HasCallStack, BoxedObject 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
surface
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceCreateSimilarSurfaceMethodInfo
instance (signature ~ (Cairo.Enums.Content -> Int32 -> Int32 -> m Cairo.Surface.Surface), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCreateSimilarSurfaceMethodInfo a signature where
overloadedMethod = surfaceCreateSimilarSurface
#endif
foreign import ccall "gdk_surface_create_vulkan_context" gdk_surface_create_vulkan_context ::
Ptr Surface ->
Ptr (Ptr GError) ->
IO (Ptr Gdk.VulkanContext.VulkanContext)
surfaceCreateVulkanContext ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.VulkanContext.VulkanContext
surfaceCreateVulkanContext :: a -> m VulkanContext
surfaceCreateVulkanContext surface :: a
surface = IO VulkanContext -> m VulkanContext
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VulkanContext -> m VulkanContext)
-> IO VulkanContext -> m VulkanContext
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
IO VulkanContext -> IO () -> IO VulkanContext
forall a b. IO a -> IO b -> IO a
onException (do
Ptr VulkanContext
result <- (Ptr (Ptr GError) -> IO (Ptr VulkanContext))
-> IO (Ptr VulkanContext)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr VulkanContext))
-> IO (Ptr VulkanContext))
-> (Ptr (Ptr GError) -> IO (Ptr VulkanContext))
-> IO (Ptr VulkanContext)
forall a b. (a -> b) -> a -> b
$ Ptr Surface -> Ptr (Ptr GError) -> IO (Ptr VulkanContext)
gdk_surface_create_vulkan_context Ptr Surface
surface'
Text -> Ptr VulkanContext -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceCreateVulkanContext" Ptr VulkanContext
result
VulkanContext
result' <- ((ManagedPtr VulkanContext -> VulkanContext)
-> Ptr VulkanContext -> IO VulkanContext
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr VulkanContext -> VulkanContext
Gdk.VulkanContext.VulkanContext) Ptr VulkanContext
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
VulkanContext -> IO VulkanContext
forall (m :: * -> *) a. Monad m => a -> m a
return VulkanContext
result'
) (do
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data SurfaceCreateVulkanContextMethodInfo
instance (signature ~ (m Gdk.VulkanContext.VulkanContext), MonadIO m, IsSurface a) => O.MethodInfo SurfaceCreateVulkanContextMethodInfo a signature where
overloadedMethod = surfaceCreateVulkanContext
#endif
foreign import ccall "gdk_surface_deiconify" gdk_surface_deiconify ::
Ptr Surface ->
IO ()
surfaceDeiconify ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceDeiconify :: a -> m ()
surfaceDeiconify surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_deiconify Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceDeiconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceDeiconifyMethodInfo a signature where
overloadedMethod = surfaceDeiconify
#endif
foreign import ccall "gdk_surface_destroy" gdk_surface_destroy ::
Ptr Surface ->
IO ()
surfaceDestroy ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceDestroy :: a -> m ()
surfaceDestroy surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_destroy Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceDestroyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceDestroyMethodInfo a signature where
overloadedMethod = surfaceDestroy
#endif
foreign import ccall "gdk_surface_focus" gdk_surface_focus ::
Ptr Surface ->
Word32 ->
IO ()
surfaceFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Word32
-> m ()
surfaceFocus :: a -> Word32 -> m ()
surfaceFocus surface :: a
surface timestamp :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> Word32 -> IO ()
gdk_surface_focus Ptr Surface
surface' Word32
timestamp
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceFocusMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceFocusMethodInfo a signature where
overloadedMethod = surfaceFocus
#endif
foreign import ccall "gdk_surface_freeze_updates" gdk_surface_freeze_updates ::
Ptr Surface ->
IO ()
surfaceFreezeUpdates ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceFreezeUpdates :: a -> m ()
surfaceFreezeUpdates surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_freeze_updates Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceFreezeUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceFreezeUpdatesMethodInfo a signature where
overloadedMethod = surfaceFreezeUpdates
#endif
foreign import ccall "gdk_surface_fullscreen" gdk_surface_fullscreen ::
Ptr Surface ->
IO ()
surfaceFullscreen ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceFullscreen :: a -> m ()
surfaceFullscreen surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_fullscreen Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceFullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceFullscreenMethodInfo a signature where
overloadedMethod = surfaceFullscreen
#endif
foreign import ccall "gdk_surface_fullscreen_on_monitor" gdk_surface_fullscreen_on_monitor ::
Ptr Surface ->
Ptr Gdk.Monitor.Monitor ->
IO ()
surfaceFullscreenOnMonitor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Monitor.IsMonitor b) =>
a
-> b
-> m ()
surfaceFullscreenOnMonitor :: a -> b -> m ()
surfaceFullscreenOnMonitor surface :: a
surface monitor :: b
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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Monitor
monitor' <- b -> IO (Ptr Monitor)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
monitor
Ptr Surface -> Ptr Monitor -> IO ()
gdk_surface_fullscreen_on_monitor Ptr Surface
surface' Ptr Monitor
monitor'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
monitor
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceFullscreenOnMonitorMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSurface a, Gdk.Monitor.IsMonitor b) => O.MethodInfo SurfaceFullscreenOnMonitorMethodInfo a signature where
overloadedMethod = surfaceFullscreenOnMonitor
#endif
foreign import ccall "gdk_surface_get_accept_focus" gdk_surface_get_accept_focus ::
Ptr Surface ->
IO CInt
surfaceGetAcceptFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceGetAcceptFocus :: a -> m Bool
surfaceGetAcceptFocus surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_get_accept_focus Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetAcceptFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetAcceptFocusMethodInfo a signature where
overloadedMethod = surfaceGetAcceptFocus
#endif
foreign import ccall "gdk_surface_get_children" gdk_surface_get_children ::
Ptr Surface ->
IO (Ptr (GList (Ptr Surface)))
surfaceGetChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m [Surface]
surfaceGetChildren :: a -> m [Surface]
surfaceGetChildren surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr (GList (Ptr Surface))
result <- Ptr Surface -> IO (Ptr (GList (Ptr Surface)))
gdk_surface_get_children Ptr Surface
surface'
[Ptr Surface]
result' <- Ptr (GList (Ptr Surface)) -> IO [Ptr Surface]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Surface))
result
[Surface]
result'' <- (Ptr Surface -> IO Surface) -> [Ptr Surface] -> IO [Surface]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Surface) [Ptr Surface]
result'
Ptr (GList (Ptr Surface)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Surface))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
[Surface] -> IO [Surface]
forall (m :: * -> *) a. Monad m => a -> m a
return [Surface]
result''
#if defined(ENABLE_OVERLOADING)
data SurfaceGetChildrenMethodInfo
instance (signature ~ (m [Surface]), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetChildrenMethodInfo a signature where
overloadedMethod = surfaceGetChildren
#endif
foreign import ccall "gdk_surface_get_cursor" gdk_surface_get_cursor ::
Ptr Surface ->
IO (Ptr Gdk.Cursor.Cursor)
surfaceGetCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m (Maybe Gdk.Cursor.Cursor)
surfaceGetCursor :: a -> m (Maybe Cursor)
surfaceGetCursor surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Cursor
result <- Ptr Surface -> IO (Ptr Cursor)
gdk_surface_get_cursor Ptr Surface
surface'
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
$ \result' :: 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
surface
Maybe Cursor -> IO (Maybe Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Cursor
maybeResult
#if defined(ENABLE_OVERLOADING)
data SurfaceGetCursorMethodInfo
instance (signature ~ (m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetCursorMethodInfo a signature where
overloadedMethod = surfaceGetCursor
#endif
foreign import ccall "gdk_surface_get_decorations" gdk_surface_get_decorations ::
Ptr Surface ->
Ptr CUInt ->
IO CInt
surfaceGetDecorations ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ((Bool, [Gdk.Flags.WMDecoration]))
surfaceGetDecorations :: a -> m (Bool, [WMDecoration])
surfaceGetDecorations surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr CUInt
decorations <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr Surface -> Ptr CUInt -> IO CInt
gdk_surface_get_decorations Ptr Surface
surface' Ptr CUInt
decorations
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 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
surface
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 SurfaceGetDecorationsMethodInfo
instance (signature ~ (m ((Bool, [Gdk.Flags.WMDecoration]))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetDecorationsMethodInfo a signature where
overloadedMethod = surfaceGetDecorations
#endif
foreign import ccall "gdk_surface_get_device_cursor" gdk_surface_get_device_cursor ::
Ptr Surface ->
Ptr Gdk.Device.Device ->
IO (Ptr Gdk.Cursor.Cursor)
surfaceGetDeviceCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Device.IsDevice b) =>
a
-> b
-> m (Maybe Gdk.Cursor.Cursor)
surfaceGetDeviceCursor :: a -> b -> m (Maybe Cursor)
surfaceGetDeviceCursor surface :: a
surface device :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Device
device' <- b -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
device
Ptr Cursor
result <- Ptr Surface -> Ptr Device -> IO (Ptr Cursor)
gdk_surface_get_device_cursor Ptr Surface
surface' 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
$ \result' :: 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
surface
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 SurfaceGetDeviceCursorMethodInfo
instance (signature ~ (b -> m (Maybe Gdk.Cursor.Cursor)), MonadIO m, IsSurface a, Gdk.Device.IsDevice b) => O.MethodInfo SurfaceGetDeviceCursorMethodInfo a signature where
overloadedMethod = surfaceGetDeviceCursor
#endif
foreign import ccall "gdk_surface_get_device_position" gdk_surface_get_device_position ::
Ptr Surface ->
Ptr Gdk.Device.Device ->
Ptr CDouble ->
Ptr CDouble ->
Ptr CUInt ->
IO (Ptr Surface)
surfaceGetDevicePosition ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Device.IsDevice b) =>
a
-> b
-> m ((Maybe Surface, Double, Double, [Gdk.Flags.ModifierType]))
surfaceGetDevicePosition :: a -> b -> m (Maybe Surface, Double, Double, [ModifierType])
surfaceGetDevicePosition surface :: a
surface device :: b
device = IO (Maybe Surface, Double, Double, [ModifierType])
-> m (Maybe Surface, Double, Double, [ModifierType])
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Surface, Double, Double, [ModifierType])
-> m (Maybe Surface, Double, Double, [ModifierType]))
-> IO (Maybe Surface, Double, Double, [ModifierType])
-> m (Maybe Surface, Double, Double, [ModifierType])
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface
result <- Ptr Surface
-> Ptr Device
-> Ptr CDouble
-> Ptr CDouble
-> Ptr CUInt
-> IO (Ptr Surface)
gdk_surface_get_device_position Ptr Surface
surface' Ptr Device
device' Ptr CDouble
x Ptr CDouble
y Ptr CUInt
mask
Maybe Surface
maybeResult <- Ptr Surface -> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Surface
result ((Ptr Surface -> IO Surface) -> IO (Maybe Surface))
-> (Ptr Surface -> IO Surface) -> IO (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr Surface
result' -> do
Surface
result'' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result'
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
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
surface
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 Surface, Double, Double, [ModifierType])
-> IO (Maybe Surface, Double, Double, [ModifierType])
forall (m :: * -> *) a. Monad m => a -> m a
return (Maybe Surface
maybeResult, Double
x'', Double
y'', [ModifierType]
mask'')
#if defined(ENABLE_OVERLOADING)
data SurfaceGetDevicePositionMethodInfo
instance (signature ~ (b -> m ((Maybe Surface, Double, Double, [Gdk.Flags.ModifierType]))), MonadIO m, IsSurface a, Gdk.Device.IsDevice b) => O.MethodInfo SurfaceGetDevicePositionMethodInfo a signature where
overloadedMethod = surfaceGetDevicePosition
#endif
foreign import ccall "gdk_surface_get_display" gdk_surface_get_display ::
Ptr Surface ->
IO (Ptr Gdk.Display.Display)
surfaceGetDisplay ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.Display.Display
surfaceGetDisplay :: a -> m Display
surfaceGetDisplay surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Display
result <- Ptr Surface -> IO (Ptr Display)
gdk_surface_get_display Ptr Surface
surface'
Text -> Ptr Display -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceGetDisplay" 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
surface
Display -> IO Display
forall (m :: * -> *) a. Monad m => a -> m a
return Display
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetDisplayMethodInfo
instance (signature ~ (m Gdk.Display.Display), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetDisplayMethodInfo a signature where
overloadedMethod = surfaceGetDisplay
#endif
foreign import ccall "gdk_surface_get_focus_on_map" gdk_surface_get_focus_on_map ::
Ptr Surface ->
IO CInt
surfaceGetFocusOnMap ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceGetFocusOnMap :: a -> m Bool
surfaceGetFocusOnMap surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_get_focus_on_map Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetFocusOnMapMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetFocusOnMapMethodInfo a signature where
overloadedMethod = surfaceGetFocusOnMap
#endif
foreign import ccall "gdk_surface_get_frame_clock" gdk_surface_get_frame_clock ::
Ptr Surface ->
IO (Ptr Gdk.FrameClock.FrameClock)
surfaceGetFrameClock ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.FrameClock.FrameClock
surfaceGetFrameClock :: a -> m FrameClock
surfaceGetFrameClock surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr FrameClock
result <- Ptr Surface -> IO (Ptr FrameClock)
gdk_surface_get_frame_clock Ptr Surface
surface'
Text -> Ptr FrameClock -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceGetFrameClock" 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
surface
FrameClock -> IO FrameClock
forall (m :: * -> *) a. Monad m => a -> m a
return FrameClock
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetFrameClockMethodInfo
instance (signature ~ (m Gdk.FrameClock.FrameClock), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetFrameClockMethodInfo a signature where
overloadedMethod = surfaceGetFrameClock
#endif
foreign import ccall "gdk_surface_get_frame_extents" gdk_surface_get_frame_extents ::
Ptr Surface ->
Ptr Gdk.Rectangle.Rectangle ->
IO ()
surfaceGetFrameExtents ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m (Gdk.Rectangle.Rectangle)
surfaceGetFrameExtents :: a -> m Rectangle
surfaceGetFrameExtents surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Rectangle
rect <- Int -> IO (Ptr Rectangle)
forall a. BoxedObject a => Int -> IO (Ptr a)
callocBoxedBytes 16 :: IO (Ptr Gdk.Rectangle.Rectangle)
Ptr Surface -> Ptr Rectangle -> IO ()
gdk_surface_get_frame_extents Ptr Surface
surface' Ptr Rectangle
rect
Rectangle
rect' <- ((ManagedPtr Rectangle -> Rectangle)
-> Ptr Rectangle -> IO Rectangle
forall a.
(HasCallStack, BoxedObject 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
surface
Rectangle -> IO Rectangle
forall (m :: * -> *) a. Monad m => a -> m a
return Rectangle
rect'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetFrameExtentsMethodInfo
instance (signature ~ (m (Gdk.Rectangle.Rectangle)), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetFrameExtentsMethodInfo a signature where
overloadedMethod = surfaceGetFrameExtents
#endif
foreign import ccall "gdk_surface_get_fullscreen_mode" gdk_surface_get_fullscreen_mode ::
Ptr Surface ->
IO CUInt
surfaceGetFullscreenMode ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.Enums.FullscreenMode
surfaceGetFullscreenMode :: a -> m FullscreenMode
surfaceGetFullscreenMode surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CUInt
result <- Ptr Surface -> IO CUInt
gdk_surface_get_fullscreen_mode Ptr Surface
surface'
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
surface
FullscreenMode -> IO FullscreenMode
forall (m :: * -> *) a. Monad m => a -> m a
return FullscreenMode
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetFullscreenModeMethodInfo
instance (signature ~ (m Gdk.Enums.FullscreenMode), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetFullscreenModeMethodInfo a signature where
overloadedMethod = surfaceGetFullscreenMode
#endif
foreign import ccall "gdk_surface_get_geometry" gdk_surface_get_geometry ::
Ptr Surface ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
surfaceGetGeometry ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ((Int32, Int32, Int32, Int32))
surfaceGetGeometry :: a -> m (Int32, Int32, Int32, Int32)
surfaceGetGeometry surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface
-> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_surface_get_geometry Ptr Surface
surface' 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
surface
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 SurfaceGetGeometryMethodInfo
instance (signature ~ (m ((Int32, Int32, Int32, Int32))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetGeometryMethodInfo a signature where
overloadedMethod = surfaceGetGeometry
#endif
foreign import ccall "gdk_surface_get_height" gdk_surface_get_height ::
Ptr Surface ->
IO Int32
surfaceGetHeight ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Int32
surfaceGetHeight :: a -> m Int32
surfaceGetHeight surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Int32
result <- Ptr Surface -> IO Int32
gdk_surface_get_height Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SurfaceGetHeightMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetHeightMethodInfo a signature where
overloadedMethod = surfaceGetHeight
#endif
foreign import ccall "gdk_surface_get_modal_hint" gdk_surface_get_modal_hint ::
Ptr Surface ->
IO CInt
surfaceGetModalHint ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceGetModalHint :: a -> m Bool
surfaceGetModalHint surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_get_modal_hint Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetModalHintMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetModalHintMethodInfo a signature where
overloadedMethod = surfaceGetModalHint
#endif
foreign import ccall "gdk_surface_get_origin" gdk_surface_get_origin ::
Ptr Surface ->
Ptr Int32 ->
Ptr Int32 ->
IO Int32
surfaceGetOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ((Int32, Int32, Int32))
surfaceGetOrigin :: a -> m (Int32, Int32, Int32)
surfaceGetOrigin surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Ptr Int32 -> Ptr Int32 -> IO Int32
gdk_surface_get_origin Ptr Surface
surface' 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
surface
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 SurfaceGetOriginMethodInfo
instance (signature ~ (m ((Int32, Int32, Int32))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetOriginMethodInfo a signature where
overloadedMethod = surfaceGetOrigin
#endif
foreign import ccall "gdk_surface_get_parent" gdk_surface_get_parent ::
Ptr Surface ->
IO (Ptr Surface)
surfaceGetParent ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Surface
surfaceGetParent :: a -> m Surface
surfaceGetParent surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
result <- Ptr Surface -> IO (Ptr Surface)
gdk_surface_get_parent Ptr Surface
surface'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceGetParent" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetParentMethodInfo
instance (signature ~ (m Surface), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetParentMethodInfo a signature where
overloadedMethod = surfaceGetParent
#endif
foreign import ccall "gdk_surface_get_pass_through" gdk_surface_get_pass_through ::
Ptr Surface ->
IO CInt
surfaceGetPassThrough ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceGetPassThrough :: a -> m Bool
surfaceGetPassThrough surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_get_pass_through Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetPassThroughMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetPassThroughMethodInfo a signature where
overloadedMethod = surfaceGetPassThrough
#endif
foreign import ccall "gdk_surface_get_position" gdk_surface_get_position ::
Ptr Surface ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
surfaceGetPosition ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ((Int32, Int32))
surfaceGetPosition :: a -> m (Int32, Int32)
surfaceGetPosition surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_surface_get_position Ptr Surface
surface' 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
surface
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 SurfaceGetPositionMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetPositionMethodInfo a signature where
overloadedMethod = surfaceGetPosition
#endif
foreign import ccall "gdk_surface_get_root_coords" gdk_surface_get_root_coords ::
Ptr Surface ->
Int32 ->
Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
surfaceGetRootCoords ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> m ((Int32, Int32))
surfaceGetRootCoords :: a -> Int32 -> Int32 -> m (Int32, Int32)
surfaceGetRootCoords surface :: a
surface x :: Int32
x y :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_surface_get_root_coords Ptr Surface
surface' 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
surface
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 SurfaceGetRootCoordsMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ((Int32, Int32))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetRootCoordsMethodInfo a signature where
overloadedMethod = surfaceGetRootCoords
#endif
foreign import ccall "gdk_surface_get_root_origin" gdk_surface_get_root_origin ::
Ptr Surface ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
surfaceGetRootOrigin ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ((Int32, Int32))
surfaceGetRootOrigin :: a -> m (Int32, Int32)
surfaceGetRootOrigin surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Ptr Int32 -> Ptr Int32 -> IO ()
gdk_surface_get_root_origin Ptr Surface
surface' 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
surface
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 SurfaceGetRootOriginMethodInfo
instance (signature ~ (m ((Int32, Int32))), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetRootOriginMethodInfo a signature where
overloadedMethod = surfaceGetRootOrigin
#endif
foreign import ccall "gdk_surface_get_scale_factor" gdk_surface_get_scale_factor ::
Ptr Surface ->
IO Int32
surfaceGetScaleFactor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Int32
surfaceGetScaleFactor :: a -> m Int32
surfaceGetScaleFactor surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Int32
result <- Ptr Surface -> IO Int32
gdk_surface_get_scale_factor Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SurfaceGetScaleFactorMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetScaleFactorMethodInfo a signature where
overloadedMethod = surfaceGetScaleFactor
#endif
foreign import ccall "gdk_surface_get_state" gdk_surface_get_state ::
Ptr Surface ->
IO CUInt
surfaceGetState ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m [Gdk.Flags.SurfaceState]
surfaceGetState :: a -> m [SurfaceState]
surfaceGetState surface :: a
surface = IO [SurfaceState] -> m [SurfaceState]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [SurfaceState] -> m [SurfaceState])
-> IO [SurfaceState] -> m [SurfaceState]
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CUInt
result <- Ptr Surface -> IO CUInt
gdk_surface_get_state Ptr Surface
surface'
let result' :: [SurfaceState]
result' = CUInt -> [SurfaceState]
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
surface
[SurfaceState] -> IO [SurfaceState]
forall (m :: * -> *) a. Monad m => a -> m a
return [SurfaceState]
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetStateMethodInfo
instance (signature ~ (m [Gdk.Flags.SurfaceState]), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetStateMethodInfo a signature where
overloadedMethod = surfaceGetState
#endif
foreign import ccall "gdk_surface_get_support_multidevice" gdk_surface_get_support_multidevice ::
Ptr Surface ->
IO CInt
surfaceGetSupportMultidevice ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceGetSupportMultidevice :: a -> m Bool
surfaceGetSupportMultidevice surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_get_support_multidevice Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetSupportMultideviceMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetSupportMultideviceMethodInfo a signature where
overloadedMethod = surfaceGetSupportMultidevice
#endif
foreign import ccall "gdk_surface_get_surface_type" gdk_surface_get_surface_type ::
Ptr Surface ->
IO CUInt
surfaceGetSurfaceType ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.Enums.SurfaceType
surfaceGetSurfaceType :: a -> m SurfaceType
surfaceGetSurfaceType surface :: a
surface = IO SurfaceType -> m SurfaceType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceType -> m SurfaceType)
-> IO SurfaceType -> m SurfaceType
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CUInt
result <- Ptr Surface -> IO CUInt
gdk_surface_get_surface_type Ptr Surface
surface'
let result' :: SurfaceType
result' = (Int -> SurfaceType
forall a. Enum a => Int -> a
toEnum (Int -> SurfaceType) -> (CUInt -> Int) -> CUInt -> SurfaceType
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
surface
SurfaceType -> IO SurfaceType
forall (m :: * -> *) a. Monad m => a -> m a
return SurfaceType
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetSurfaceTypeMethodInfo
instance (signature ~ (m Gdk.Enums.SurfaceType), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetSurfaceTypeMethodInfo a signature where
overloadedMethod = surfaceGetSurfaceType
#endif
foreign import ccall "gdk_surface_get_toplevel" gdk_surface_get_toplevel ::
Ptr Surface ->
IO (Ptr Surface)
surfaceGetToplevel ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Surface
surfaceGetToplevel :: a -> m Surface
surfaceGetToplevel surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
result <- Ptr Surface -> IO (Ptr Surface)
gdk_surface_get_toplevel Ptr Surface
surface'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "surfaceGetToplevel" Ptr Surface
result
Surface
result' <- ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetToplevelMethodInfo
instance (signature ~ (m Surface), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetToplevelMethodInfo a signature where
overloadedMethod = surfaceGetToplevel
#endif
foreign import ccall "gdk_surface_get_type_hint" gdk_surface_get_type_hint ::
Ptr Surface ->
IO CUInt
surfaceGetTypeHint ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Gdk.Enums.SurfaceTypeHint
surfaceGetTypeHint :: a -> m SurfaceTypeHint
surfaceGetTypeHint surface :: a
surface = IO SurfaceTypeHint -> m SurfaceTypeHint
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SurfaceTypeHint -> m SurfaceTypeHint)
-> IO SurfaceTypeHint -> m SurfaceTypeHint
forall a b. (a -> b) -> a -> b
$ do
Ptr Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CUInt
result <- Ptr Surface -> IO CUInt
gdk_surface_get_type_hint Ptr Surface
surface'
let result' :: SurfaceTypeHint
result' = (Int -> SurfaceTypeHint
forall a. Enum a => Int -> a
toEnum (Int -> SurfaceTypeHint)
-> (CUInt -> Int) -> CUInt -> SurfaceTypeHint
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
surface
SurfaceTypeHint -> IO SurfaceTypeHint
forall (m :: * -> *) a. Monad m => a -> m a
return SurfaceTypeHint
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceGetTypeHintMethodInfo
instance (signature ~ (m Gdk.Enums.SurfaceTypeHint), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetTypeHintMethodInfo a signature where
overloadedMethod = surfaceGetTypeHint
#endif
foreign import ccall "gdk_surface_get_width" gdk_surface_get_width ::
Ptr Surface ->
IO Int32
surfaceGetWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Int32
surfaceGetWidth :: a -> m Int32
surfaceGetWidth surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Int32
result <- Ptr Surface -> IO Int32
gdk_surface_get_width Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data SurfaceGetWidthMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsSurface a) => O.MethodInfo SurfaceGetWidthMethodInfo a signature where
overloadedMethod = surfaceGetWidth
#endif
foreign import ccall "gdk_surface_has_native" gdk_surface_has_native ::
Ptr Surface ->
IO CInt
surfaceHasNative ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceHasNative :: a -> m Bool
surfaceHasNative surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_has_native Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceHasNativeMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceHasNativeMethodInfo a signature where
overloadedMethod = surfaceHasNative
#endif
foreign import ccall "gdk_surface_hide" gdk_surface_hide ::
Ptr Surface ->
IO ()
surfaceHide ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceHide :: a -> m ()
surfaceHide surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_hide Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceHideMethodInfo a signature where
overloadedMethod = surfaceHide
#endif
foreign import ccall "gdk_surface_iconify" gdk_surface_iconify ::
Ptr Surface ->
IO ()
surfaceIconify ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceIconify :: a -> m ()
surfaceIconify surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_iconify Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceIconifyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceIconifyMethodInfo a signature where
overloadedMethod = surfaceIconify
#endif
foreign import ccall "gdk_surface_input_shape_combine_region" gdk_surface_input_shape_combine_region ::
Ptr Surface ->
Ptr Cairo.Region.Region ->
Int32 ->
Int32 ->
IO ()
surfaceInputShapeCombineRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Cairo.Region.Region
-> Int32
-> Int32
-> m ()
surfaceInputShapeCombineRegion :: a -> Region -> Int32 -> Int32 -> m ()
surfaceInputShapeCombineRegion surface :: a
surface shapeRegion :: Region
shapeRegion offsetX :: Int32
offsetX offsetY :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Region
shapeRegion' <- Region -> IO (Ptr Region)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Region
shapeRegion
Ptr Surface -> Ptr Region -> SurfaceSizeChangedCallback
gdk_surface_input_shape_combine_region Ptr Surface
surface' Ptr Region
shapeRegion' Int32
offsetX Int32
offsetY
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceInputShapeCombineRegionMethodInfo
instance (signature ~ (Cairo.Region.Region -> Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceInputShapeCombineRegionMethodInfo a signature where
overloadedMethod = surfaceInputShapeCombineRegion
#endif
foreign import ccall "gdk_surface_is_destroyed" gdk_surface_is_destroyed ::
Ptr Surface ->
IO CInt
surfaceIsDestroyed ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceIsDestroyed :: a -> m Bool
surfaceIsDestroyed surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_is_destroyed Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceIsDestroyedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceIsDestroyedMethodInfo a signature where
overloadedMethod = surfaceIsDestroyed
#endif
foreign import ccall "gdk_surface_is_input_only" gdk_surface_is_input_only ::
Ptr Surface ->
IO CInt
surfaceIsInputOnly ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceIsInputOnly :: a -> m Bool
surfaceIsInputOnly surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_is_input_only Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceIsInputOnlyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceIsInputOnlyMethodInfo a signature where
overloadedMethod = surfaceIsInputOnly
#endif
foreign import ccall "gdk_surface_is_viewable" gdk_surface_is_viewable ::
Ptr Surface ->
IO CInt
surfaceIsViewable ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceIsViewable :: a -> m Bool
surfaceIsViewable surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_is_viewable Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceIsViewableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceIsViewableMethodInfo a signature where
overloadedMethod = surfaceIsViewable
#endif
foreign import ccall "gdk_surface_is_visible" gdk_surface_is_visible ::
Ptr Surface ->
IO CInt
surfaceIsVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m Bool
surfaceIsVisible :: a -> m Bool
surfaceIsVisible surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
CInt
result <- Ptr Surface -> IO CInt
gdk_surface_is_visible Ptr Surface
surface'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsSurface a) => O.MethodInfo SurfaceIsVisibleMethodInfo a signature where
overloadedMethod = surfaceIsVisible
#endif
foreign import ccall "gdk_surface_lower" gdk_surface_lower ::
Ptr Surface ->
IO ()
surfaceLower ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceLower :: a -> m ()
surfaceLower surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_lower Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceLowerMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceLowerMethodInfo a signature where
overloadedMethod = surfaceLower
#endif
foreign import ccall "gdk_surface_maximize" gdk_surface_maximize ::
Ptr Surface ->
IO ()
surfaceMaximize ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceMaximize :: a -> m ()
surfaceMaximize surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_maximize Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceMaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceMaximizeMethodInfo a signature where
overloadedMethod = surfaceMaximize
#endif
foreign import ccall "gdk_surface_merge_child_input_shapes" gdk_surface_merge_child_input_shapes ::
Ptr Surface ->
IO ()
surfaceMergeChildInputShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceMergeChildInputShapes :: a -> m ()
surfaceMergeChildInputShapes surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_merge_child_input_shapes Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceMergeChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceMergeChildInputShapesMethodInfo a signature where
overloadedMethod = surfaceMergeChildInputShapes
#endif
foreign import ccall "gdk_surface_move" gdk_surface_move ::
Ptr Surface ->
Int32 ->
Int32 ->
IO ()
surfaceMove ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> m ()
surfaceMove :: a -> Int32 -> Int32 -> m ()
surfaceMove surface :: a
surface x :: Int32
x y :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> SurfaceSizeChangedCallback
gdk_surface_move Ptr Surface
surface' Int32
x Int32
y
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceMoveMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceMoveMethodInfo a signature where
overloadedMethod = surfaceMove
#endif
foreign import ccall "gdk_surface_move_resize" gdk_surface_move_resize ::
Ptr Surface ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
surfaceMoveResize ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
surfaceMoveResize :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
surfaceMoveResize surface :: a
surface x :: Int32
x y :: Int32
y width :: Int32
width height :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> Int32 -> Int32 -> SurfaceSizeChangedCallback
gdk_surface_move_resize Ptr Surface
surface' Int32
x Int32
y Int32
width Int32
height
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceMoveResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceMoveResizeMethodInfo a signature where
overloadedMethod = surfaceMoveResize
#endif
foreign import ccall "gdk_surface_move_to_rect" gdk_surface_move_to_rect ::
Ptr Surface ->
Ptr Gdk.Rectangle.Rectangle ->
CUInt ->
CUInt ->
CUInt ->
Int32 ->
Int32 ->
IO ()
surfaceMoveToRect ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Rectangle.Rectangle
-> Gdk.Enums.Gravity
-> Gdk.Enums.Gravity
-> [Gdk.Flags.AnchorHints]
-> Int32
-> Int32
-> m ()
surfaceMoveToRect :: a
-> Rectangle
-> Gravity
-> Gravity
-> [AnchorHints]
-> Int32
-> Int32
-> m ()
surfaceMoveToRect surface :: a
surface rect :: Rectangle
rect rectAnchor :: Gravity
rectAnchor surfaceAnchor :: Gravity
surfaceAnchor anchorHints :: [AnchorHints]
anchorHints rectAnchorDx :: Int32
rectAnchorDx rectAnchorDy :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 surfaceAnchor' :: CUInt
surfaceAnchor' = (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
surfaceAnchor
let anchorHints' :: CUInt
anchorHints' = [AnchorHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [AnchorHints]
anchorHints
Ptr Surface
-> Ptr Rectangle
-> CUInt
-> CUInt
-> CUInt
-> SurfaceSizeChangedCallback
gdk_surface_move_to_rect Ptr Surface
surface' Ptr Rectangle
rect' CUInt
rectAnchor' CUInt
surfaceAnchor' CUInt
anchorHints' Int32
rectAnchorDx Int32
rectAnchorDy
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceMoveToRectMethodInfo
instance (signature ~ (Gdk.Rectangle.Rectangle -> Gdk.Enums.Gravity -> Gdk.Enums.Gravity -> [Gdk.Flags.AnchorHints] -> Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceMoveToRectMethodInfo a signature where
overloadedMethod = surfaceMoveToRect
#endif
foreign import ccall "gdk_surface_peek_children" gdk_surface_peek_children ::
Ptr Surface ->
IO (Ptr (GList (Ptr Surface)))
surfacePeekChildren ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m [Surface]
surfacePeekChildren :: a -> m [Surface]
surfacePeekChildren surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr (GList (Ptr Surface))
result <- Ptr Surface -> IO (Ptr (GList (Ptr Surface)))
gdk_surface_peek_children Ptr Surface
surface'
[Ptr Surface]
result' <- Ptr (GList (Ptr Surface)) -> IO [Ptr Surface]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Surface))
result
[Surface]
result'' <- (Ptr Surface -> IO Surface) -> [Ptr Surface] -> IO [Surface]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Surface -> Surface) -> Ptr Surface -> IO Surface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Surface -> Surface
Surface) [Ptr Surface]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
[Surface] -> IO [Surface]
forall (m :: * -> *) a. Monad m => a -> m a
return [Surface]
result''
#if defined(ENABLE_OVERLOADING)
data SurfacePeekChildrenMethodInfo
instance (signature ~ (m [Surface]), MonadIO m, IsSurface a) => O.MethodInfo SurfacePeekChildrenMethodInfo a signature where
overloadedMethod = surfacePeekChildren
#endif
foreign import ccall "gdk_surface_queue_expose" gdk_surface_queue_expose ::
Ptr Surface ->
IO ()
surfaceQueueExpose ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceQueueExpose :: a -> m ()
surfaceQueueExpose surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_queue_expose Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceQueueExposeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceQueueExposeMethodInfo a signature where
overloadedMethod = surfaceQueueExpose
#endif
foreign import ccall "gdk_surface_raise" gdk_surface_raise ::
Ptr Surface ->
IO ()
surfaceRaise ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceRaise :: a -> m ()
surfaceRaise surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_raise Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceRaiseMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceRaiseMethodInfo a signature where
overloadedMethod = surfaceRaise
#endif
foreign import ccall "gdk_surface_register_dnd" gdk_surface_register_dnd ::
Ptr Surface ->
IO ()
surfaceRegisterDnd ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceRegisterDnd :: a -> m ()
surfaceRegisterDnd surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_register_dnd Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceRegisterDndMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceRegisterDndMethodInfo a signature where
overloadedMethod = surfaceRegisterDnd
#endif
foreign import ccall "gdk_surface_resize" gdk_surface_resize ::
Ptr Surface ->
Int32 ->
Int32 ->
IO ()
surfaceResize ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> m ()
surfaceResize :: a -> Int32 -> Int32 -> m ()
surfaceResize surface :: a
surface width :: Int32
width height :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> SurfaceSizeChangedCallback
gdk_surface_resize Ptr Surface
surface' Int32
width Int32
height
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceResizeMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceResizeMethodInfo a signature where
overloadedMethod = surfaceResize
#endif
foreign import ccall "gdk_surface_restack" gdk_surface_restack ::
Ptr Surface ->
Ptr Surface ->
CInt ->
IO ()
surfaceRestack ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, IsSurface b) =>
a
-> Maybe (b)
-> Bool
-> m ()
surfaceRestack :: a -> Maybe b -> Bool -> m ()
surfaceRestack surface :: a
surface sibling :: Maybe b
sibling above :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
maybeSibling <- case Maybe b
sibling of
Nothing -> Ptr Surface -> IO (Ptr Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Surface
forall a. Ptr a
nullPtr
Just jSibling :: b
jSibling -> do
Ptr Surface
jSibling' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jSibling
Ptr Surface -> IO (Ptr Surface)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Surface
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 Surface -> Ptr Surface -> CInt -> IO ()
gdk_surface_restack Ptr Surface
surface' Ptr Surface
maybeSibling CInt
above'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceRestackMethodInfo
instance (signature ~ (Maybe (b) -> Bool -> m ()), MonadIO m, IsSurface a, IsSurface b) => O.MethodInfo SurfaceRestackMethodInfo a signature where
overloadedMethod = surfaceRestack
#endif
foreign import ccall "gdk_surface_set_accept_focus" gdk_surface_set_accept_focus ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetAcceptFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetAcceptFocus :: a -> Bool -> m ()
surfaceSetAcceptFocus surface :: a
surface acceptFocus :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_accept_focus Ptr Surface
surface' CInt
acceptFocus'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetAcceptFocusMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetAcceptFocusMethodInfo a signature where
overloadedMethod = surfaceSetAcceptFocus
#endif
foreign import ccall "gdk_surface_set_child_input_shapes" gdk_surface_set_child_input_shapes ::
Ptr Surface ->
IO ()
surfaceSetChildInputShapes ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceSetChildInputShapes :: a -> m ()
surfaceSetChildInputShapes surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_set_child_input_shapes Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetChildInputShapesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetChildInputShapesMethodInfo a signature where
overloadedMethod = surfaceSetChildInputShapes
#endif
foreign import ccall "gdk_surface_set_cursor" gdk_surface_set_cursor ::
Ptr Surface ->
Ptr Gdk.Cursor.Cursor ->
IO ()
surfaceSetCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Cursor.IsCursor b) =>
a
-> Maybe (b)
-> m ()
surfaceSetCursor :: a -> Maybe b -> m ()
surfaceSetCursor surface :: a
surface cursor :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Cursor
maybeCursor <- case Maybe b
cursor of
Nothing -> Ptr Cursor -> IO (Ptr Cursor)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cursor
forall a. Ptr a
nullPtr
Just jCursor :: 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 Surface -> Ptr Cursor -> IO ()
gdk_surface_set_cursor Ptr Surface
surface' Ptr Cursor
maybeCursor
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetCursorMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsSurface a, Gdk.Cursor.IsCursor b) => O.MethodInfo SurfaceSetCursorMethodInfo a signature where
overloadedMethod = surfaceSetCursor
#endif
foreign import ccall "gdk_surface_set_decorations" gdk_surface_set_decorations ::
Ptr Surface ->
CUInt ->
IO ()
surfaceSetDecorations ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> [Gdk.Flags.WMDecoration]
-> m ()
surfaceSetDecorations :: a -> [WMDecoration] -> m ()
surfaceSetDecorations surface :: a
surface decorations :: [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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let decorations' :: CUInt
decorations' = [WMDecoration] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMDecoration]
decorations
Ptr Surface -> CUInt -> IO ()
gdk_surface_set_decorations Ptr Surface
surface' CUInt
decorations'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetDecorationsMethodInfo
instance (signature ~ ([Gdk.Flags.WMDecoration] -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetDecorationsMethodInfo a signature where
overloadedMethod = surfaceSetDecorations
#endif
foreign import ccall "gdk_surface_set_device_cursor" gdk_surface_set_device_cursor ::
Ptr Surface ->
Ptr Gdk.Device.Device ->
Ptr Gdk.Cursor.Cursor ->
IO ()
surfaceSetDeviceCursor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) =>
a
-> b
-> c
-> m ()
surfaceSetDeviceCursor :: a -> b -> c -> m ()
surfaceSetDeviceCursor surface :: a
surface device :: b
device cursor :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> Ptr Device -> Ptr Cursor -> IO ()
gdk_surface_set_device_cursor Ptr Surface
surface' Ptr Device
device' Ptr Cursor
cursor'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetDeviceCursorMethodInfo
instance (signature ~ (b -> c -> m ()), MonadIO m, IsSurface a, Gdk.Device.IsDevice b, Gdk.Cursor.IsCursor c) => O.MethodInfo SurfaceSetDeviceCursorMethodInfo a signature where
overloadedMethod = surfaceSetDeviceCursor
#endif
foreign import ccall "gdk_surface_set_focus_on_map" gdk_surface_set_focus_on_map ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetFocusOnMap ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetFocusOnMap :: a -> Bool -> m ()
surfaceSetFocusOnMap surface :: a
surface focusOnMap :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_focus_on_map Ptr Surface
surface' CInt
focusOnMap'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetFocusOnMapMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetFocusOnMapMethodInfo a signature where
overloadedMethod = surfaceSetFocusOnMap
#endif
foreign import ccall "gdk_surface_set_fullscreen_mode" gdk_surface_set_fullscreen_mode ::
Ptr Surface ->
CUInt ->
IO ()
surfaceSetFullscreenMode ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Enums.FullscreenMode
-> m ()
surfaceSetFullscreenMode :: a -> FullscreenMode -> m ()
surfaceSetFullscreenMode surface :: a
surface mode :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CUInt -> IO ()
gdk_surface_set_fullscreen_mode Ptr Surface
surface' CUInt
mode'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetFullscreenModeMethodInfo
instance (signature ~ (Gdk.Enums.FullscreenMode -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetFullscreenModeMethodInfo a signature where
overloadedMethod = surfaceSetFullscreenMode
#endif
foreign import ccall "gdk_surface_set_functions" gdk_surface_set_functions ::
Ptr Surface ->
CUInt ->
IO ()
surfaceSetFunctions ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> [Gdk.Flags.WMFunction]
-> m ()
surfaceSetFunctions :: a -> [WMFunction] -> m ()
surfaceSetFunctions surface :: a
surface functions :: [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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let functions' :: CUInt
functions' = [WMFunction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [WMFunction]
functions
Ptr Surface -> CUInt -> IO ()
gdk_surface_set_functions Ptr Surface
surface' CUInt
functions'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetFunctionsMethodInfo
instance (signature ~ ([Gdk.Flags.WMFunction] -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetFunctionsMethodInfo a signature where
overloadedMethod = surfaceSetFunctions
#endif
foreign import ccall "gdk_surface_set_geometry_hints" gdk_surface_set_geometry_hints ::
Ptr Surface ->
Ptr Gdk.Geometry.Geometry ->
CUInt ->
IO ()
surfaceSetGeometryHints ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Geometry.Geometry
-> [Gdk.Flags.SurfaceHints]
-> m ()
surfaceSetGeometryHints :: a -> Geometry -> [SurfaceHints] -> m ()
surfaceSetGeometryHints surface :: a
surface geometry :: Geometry
geometry geomMask :: [SurfaceHints]
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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Geometry
geometry' <- Geometry -> IO (Ptr Geometry)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Geometry
geometry
let geomMask' :: CUInt
geomMask' = [SurfaceHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SurfaceHints]
geomMask
Ptr Surface -> Ptr Geometry -> CUInt -> IO ()
gdk_surface_set_geometry_hints Ptr Surface
surface' Ptr Geometry
geometry' CUInt
geomMask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetGeometryHintsMethodInfo
instance (signature ~ (Gdk.Geometry.Geometry -> [Gdk.Flags.SurfaceHints] -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetGeometryHintsMethodInfo a signature where
overloadedMethod = surfaceSetGeometryHints
#endif
foreign import ccall "gdk_surface_set_icon_list" gdk_surface_set_icon_list ::
Ptr Surface ->
Ptr (GList (Ptr Gdk.Texture.Texture)) ->
IO ()
surfaceSetIconList ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Texture.IsTexture b) =>
a
-> [b]
-> m ()
surfaceSetIconList :: a -> [b] -> m ()
surfaceSetIconList surface :: a
surface surfaces :: [b]
surfaces = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
[Ptr Texture]
surfaces' <- (b -> IO (Ptr Texture)) -> [b] -> IO [Ptr Texture]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM b -> IO (Ptr Texture)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [b]
surfaces
Ptr (GList (Ptr Texture))
surfaces'' <- [Ptr Texture] -> IO (Ptr (GList (Ptr Texture)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr Texture]
surfaces'
Ptr Surface -> Ptr (GList (Ptr Texture)) -> IO ()
gdk_surface_set_icon_list Ptr Surface
surface' Ptr (GList (Ptr Texture))
surfaces''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
(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]
surfaces
Ptr (GList (Ptr Texture)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr Texture))
surfaces''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetIconListMethodInfo
instance (signature ~ ([b] -> m ()), MonadIO m, IsSurface a, Gdk.Texture.IsTexture b) => O.MethodInfo SurfaceSetIconListMethodInfo a signature where
overloadedMethod = surfaceSetIconList
#endif
foreign import ccall "gdk_surface_set_icon_name" gdk_surface_set_icon_name ::
Ptr Surface ->
CString ->
IO ()
surfaceSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Maybe (T.Text)
-> m ()
surfaceSetIconName :: a -> Maybe Text -> m ()
surfaceSetIconName surface :: a
surface name :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr CChar
maybeName <- case Maybe Text
name of
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just jName :: 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 Surface -> Ptr CChar -> IO ()
gdk_surface_set_icon_name Ptr Surface
surface' Ptr CChar
maybeName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetIconNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetIconNameMethodInfo a signature where
overloadedMethod = surfaceSetIconName
#endif
foreign import ccall "gdk_surface_set_keep_above" gdk_surface_set_keep_above ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetKeepAbove ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetKeepAbove :: a -> Bool -> m ()
surfaceSetKeepAbove surface :: a
surface setting :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_keep_above Ptr Surface
surface' CInt
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetKeepAboveMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetKeepAboveMethodInfo a signature where
overloadedMethod = surfaceSetKeepAbove
#endif
foreign import ccall "gdk_surface_set_keep_below" gdk_surface_set_keep_below ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetKeepBelow ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetKeepBelow :: a -> Bool -> m ()
surfaceSetKeepBelow surface :: a
surface setting :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_keep_below Ptr Surface
surface' CInt
setting'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetKeepBelowMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetKeepBelowMethodInfo a signature where
overloadedMethod = surfaceSetKeepBelow
#endif
foreign import ccall "gdk_surface_set_modal_hint" gdk_surface_set_modal_hint ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetModalHint ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetModalHint :: a -> Bool -> m ()
surfaceSetModalHint surface :: a
surface modal :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_modal_hint Ptr Surface
surface' CInt
modal'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetModalHintMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetModalHintMethodInfo a signature where
overloadedMethod = surfaceSetModalHint
#endif
foreign import ccall "gdk_surface_set_opacity" gdk_surface_set_opacity ::
Ptr Surface ->
CDouble ->
IO ()
surfaceSetOpacity ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Double
-> m ()
surfaceSetOpacity :: a -> Double -> m ()
surfaceSetOpacity surface :: a
surface opacity :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let opacity' :: CDouble
opacity' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
opacity
Ptr Surface -> CDouble -> IO ()
gdk_surface_set_opacity Ptr Surface
surface' CDouble
opacity'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetOpacityMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetOpacityMethodInfo a signature where
overloadedMethod = surfaceSetOpacity
#endif
foreign import ccall "gdk_surface_set_opaque_region" gdk_surface_set_opaque_region ::
Ptr Surface ->
Ptr Cairo.Region.Region ->
IO ()
surfaceSetOpaqueRegion ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Maybe (Cairo.Region.Region)
-> m ()
surfaceSetOpaqueRegion :: a -> Maybe Region -> m ()
surfaceSetOpaqueRegion surface :: a
surface region :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Region
maybeRegion <- case Maybe Region
region of
Nothing -> Ptr Region -> IO (Ptr Region)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Region
forall a. Ptr a
nullPtr
Just jRegion :: 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 Surface -> Ptr Region -> IO ()
gdk_surface_set_opaque_region Ptr Surface
surface' Ptr Region
maybeRegion
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetOpaqueRegionMethodInfo
instance (signature ~ (Maybe (Cairo.Region.Region) -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetOpaqueRegionMethodInfo a signature where
overloadedMethod = surfaceSetOpaqueRegion
#endif
foreign import ccall "gdk_surface_set_pass_through" gdk_surface_set_pass_through ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetPassThrough ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetPassThrough :: a -> Bool -> m ()
surfaceSetPassThrough surface :: a
surface passThrough :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_pass_through Ptr Surface
surface' CInt
passThrough'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetPassThroughMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetPassThroughMethodInfo a signature where
overloadedMethod = surfaceSetPassThrough
#endif
foreign import ccall "gdk_surface_set_shadow_width" gdk_surface_set_shadow_width ::
Ptr Surface ->
Int32 ->
Int32 ->
Int32 ->
Int32 ->
IO ()
surfaceSetShadowWidth ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Int32
-> Int32
-> Int32
-> Int32
-> m ()
surfaceSetShadowWidth :: a -> Int32 -> Int32 -> Int32 -> Int32 -> m ()
surfaceSetShadowWidth surface :: a
surface left :: Int32
left right :: Int32
right top :: Int32
top bottom :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> Int32 -> Int32 -> SurfaceSizeChangedCallback
gdk_surface_set_shadow_width Ptr Surface
surface' Int32
left Int32
right Int32
top Int32
bottom
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetShadowWidthMethodInfo
instance (signature ~ (Int32 -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetShadowWidthMethodInfo a signature where
overloadedMethod = surfaceSetShadowWidth
#endif
foreign import ccall "gdk_surface_set_startup_id" gdk_surface_set_startup_id ::
Ptr Surface ->
CString ->
IO ()
surfaceSetStartupId ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> T.Text
-> m ()
surfaceSetStartupId :: a -> Text -> m ()
surfaceSetStartupId surface :: a
surface startupId :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr CChar
startupId' <- Text -> IO (Ptr CChar)
textToCString Text
startupId
Ptr Surface -> Ptr CChar -> IO ()
gdk_surface_set_startup_id Ptr Surface
surface' Ptr CChar
startupId'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetStartupIdMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetStartupIdMethodInfo a signature where
overloadedMethod = surfaceSetStartupId
#endif
foreign import ccall "gdk_surface_set_support_multidevice" gdk_surface_set_support_multidevice ::
Ptr Surface ->
CInt ->
IO ()
surfaceSetSupportMultidevice ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Bool
-> m ()
surfaceSetSupportMultidevice :: a -> Bool -> m ()
surfaceSetSupportMultidevice surface :: a
surface supportMultidevice :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
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 Surface -> CInt -> IO ()
gdk_surface_set_support_multidevice Ptr Surface
surface' CInt
supportMultidevice'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetSupportMultideviceMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetSupportMultideviceMethodInfo a signature where
overloadedMethod = surfaceSetSupportMultidevice
#endif
foreign import ccall "gdk_surface_set_title" gdk_surface_set_title ::
Ptr Surface ->
CString ->
IO ()
surfaceSetTitle ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> T.Text
-> m ()
surfaceSetTitle :: a -> Text -> m ()
surfaceSetTitle surface :: a
surface title :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr CChar
title' <- Text -> IO (Ptr CChar)
textToCString Text
title
Ptr Surface -> Ptr CChar -> IO ()
gdk_surface_set_title Ptr Surface
surface' Ptr CChar
title'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetTitleMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetTitleMethodInfo a signature where
overloadedMethod = surfaceSetTitle
#endif
foreign import ccall "gdk_surface_set_transient_for" gdk_surface_set_transient_for ::
Ptr Surface ->
Ptr Surface ->
IO ()
surfaceSetTransientFor ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, IsSurface b) =>
a
-> b
-> m ()
surfaceSetTransientFor :: a -> b -> m ()
surfaceSetTransientFor surface :: a
surface parent :: 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface
parent' <- b -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
parent
Ptr Surface -> Ptr Surface -> IO ()
gdk_surface_set_transient_for Ptr Surface
surface' Ptr Surface
parent'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
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 SurfaceSetTransientForMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsSurface a, IsSurface b) => O.MethodInfo SurfaceSetTransientForMethodInfo a signature where
overloadedMethod = surfaceSetTransientFor
#endif
foreign import ccall "gdk_surface_set_type_hint" gdk_surface_set_type_hint ::
Ptr Surface ->
CUInt ->
IO ()
surfaceSetTypeHint ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> Gdk.Enums.SurfaceTypeHint
-> m ()
surfaceSetTypeHint :: a -> SurfaceTypeHint -> m ()
surfaceSetTypeHint surface :: a
surface hint :: SurfaceTypeHint
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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
let hint' :: CUInt
hint' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (SurfaceTypeHint -> Int) -> SurfaceTypeHint -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. SurfaceTypeHint -> Int
forall a. Enum a => a -> Int
fromEnum) SurfaceTypeHint
hint
Ptr Surface -> CUInt -> IO ()
gdk_surface_set_type_hint Ptr Surface
surface' CUInt
hint'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceSetTypeHintMethodInfo
instance (signature ~ (Gdk.Enums.SurfaceTypeHint -> m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceSetTypeHintMethodInfo a signature where
overloadedMethod = surfaceSetTypeHint
#endif
foreign import ccall "gdk_surface_show" gdk_surface_show ::
Ptr Surface ->
IO ()
surfaceShow ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceShow :: a -> m ()
surfaceShow surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_show Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceShowMethodInfo a signature where
overloadedMethod = surfaceShow
#endif
foreign import ccall "gdk_surface_show_unraised" gdk_surface_show_unraised ::
Ptr Surface ->
IO ()
surfaceShowUnraised ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceShowUnraised :: a -> m ()
surfaceShowUnraised surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_show_unraised Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceShowUnraisedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceShowUnraisedMethodInfo a signature where
overloadedMethod = surfaceShowUnraised
#endif
foreign import ccall "gdk_surface_show_window_menu" ::
Ptr Surface ->
Ptr Gdk.Event.Event ->
IO CInt
surfaceShowWindowMenu ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a, Gdk.Event.IsEvent b) =>
a
-> b
-> m Bool
surface :: a
surface event :: b
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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Event
event' <- b -> IO (Ptr Event)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
event
CInt
result <- Ptr Surface -> Ptr Event -> IO CInt
gdk_surface_show_window_menu Ptr Surface
surface' Ptr Event
event'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
event
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data SurfaceShowWindowMenuMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsSurface a, Gdk.Event.IsEvent b) => O.MethodInfo SurfaceShowWindowMenuMethodInfo a signature where
overloadedMethod = surfaceShowWindowMenu
#endif
foreign import ccall "gdk_surface_stick" gdk_surface_stick ::
Ptr Surface ->
IO ()
surfaceStick ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceStick :: a -> m ()
surfaceStick surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_stick Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceStickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceStickMethodInfo a signature where
overloadedMethod = surfaceStick
#endif
foreign import ccall "gdk_surface_thaw_updates" gdk_surface_thaw_updates ::
Ptr Surface ->
IO ()
surfaceThawUpdates ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceThawUpdates :: a -> m ()
surfaceThawUpdates surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_thaw_updates Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceThawUpdatesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceThawUpdatesMethodInfo a signature where
overloadedMethod = surfaceThawUpdates
#endif
foreign import ccall "gdk_surface_unfullscreen" gdk_surface_unfullscreen ::
Ptr Surface ->
IO ()
surfaceUnfullscreen ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceUnfullscreen :: a -> m ()
surfaceUnfullscreen surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_unfullscreen Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceUnfullscreenMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceUnfullscreenMethodInfo a signature where
overloadedMethod = surfaceUnfullscreen
#endif
foreign import ccall "gdk_surface_unmaximize" gdk_surface_unmaximize ::
Ptr Surface ->
IO ()
surfaceUnmaximize ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceUnmaximize :: a -> m ()
surfaceUnmaximize surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_unmaximize Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceUnmaximizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceUnmaximizeMethodInfo a signature where
overloadedMethod = surfaceUnmaximize
#endif
foreign import ccall "gdk_surface_unstick" gdk_surface_unstick ::
Ptr Surface ->
IO ()
surfaceUnstick ::
(B.CallStack.HasCallStack, MonadIO m, IsSurface a) =>
a
-> m ()
surfaceUnstick :: a -> m ()
surfaceUnstick surface :: a
surface = 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 Surface
surface' <- a -> IO (Ptr Surface)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
surface
Ptr Surface -> IO ()
gdk_surface_unstick Ptr Surface
surface'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data SurfaceUnstickMethodInfo
instance (signature ~ (m ()), MonadIO m, IsSurface a) => O.MethodInfo SurfaceUnstickMethodInfo a signature where
overloadedMethod = surfaceUnstick
#endif
foreign import ccall "gdk_surface_constrain_size" gdk_surface_constrain_size ::
Ptr Gdk.Geometry.Geometry ->
CUInt ->
Int32 ->
Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
surfaceConstrainSize ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gdk.Geometry.Geometry
-> [Gdk.Flags.SurfaceHints]
-> Int32
-> Int32
-> m ((Int32, Int32))
surfaceConstrainSize :: Geometry -> [SurfaceHints] -> Int32 -> Int32 -> m (Int32, Int32)
surfaceConstrainSize geometry :: Geometry
geometry flags :: [SurfaceHints]
flags width :: Int32
width height :: 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' = [SurfaceHints] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SurfaceHints]
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_surface_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