{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.Native
(
Native(..) ,
IsNative ,
toNative ,
#if defined(ENABLE_OVERLOADING)
ResolveNativeMethod ,
#endif
nativeGetForSurface ,
#if defined(ENABLE_OVERLOADING)
NativeGetRendererMethodInfo ,
#endif
nativeGetRenderer ,
#if defined(ENABLE_OVERLOADING)
NativeGetSurfaceMethodInfo ,
#endif
nativeGetSurface ,
#if defined(ENABLE_OVERLOADING)
NativeGetSurfaceTransformMethodInfo ,
#endif
nativeGetSurfaceTransform ,
#if defined(ENABLE_OVERLOADING)
NativeRealizeMethodInfo ,
#endif
nativeRealize ,
#if defined(ENABLE_OVERLOADING)
NativeUnrealizeMethodInfo ,
#endif
nativeUnrealize ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
#endif
newtype Native = Native (SP.ManagedPtr Native)
deriving (Native -> Native -> Bool
(Native -> Native -> Bool)
-> (Native -> Native -> Bool) -> Eq Native
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Native -> Native -> Bool
== :: Native -> Native -> Bool
$c/= :: Native -> Native -> Bool
/= :: Native -> Native -> Bool
Eq)
instance SP.ManagedPtrNewtype Native where
toManagedPtr :: Native -> ManagedPtr Native
toManagedPtr (Native ManagedPtr Native
p) = ManagedPtr Native
p
foreign import ccall "gtk_native_get_type"
c_gtk_native_get_type :: IO B.Types.GType
instance B.Types.TypedObject Native where
glibType :: IO GType
glibType = IO GType
c_gtk_native_get_type
instance B.Types.GObject Native
class (SP.GObject o, O.IsDescendantOf Native o) => IsNative o
instance (SP.GObject o, O.IsDescendantOf Native o) => IsNative o
instance O.HasParentTypes Native
type instance O.ParentTypes Native = '[Gtk.Widget.Widget, GObject.Object.Object]
toNative :: (MIO.MonadIO m, IsNative o) => o -> m Native
toNative :: forall (m :: * -> *) o. (MonadIO m, IsNative o) => o -> m Native
toNative = IO Native -> m Native
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Native -> m Native) -> (o -> IO Native) -> o -> m Native
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Native -> Native) -> o -> IO Native
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Native -> Native
Native
instance B.GValue.IsGValue (Maybe Native) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_native_get_type
gvalueSet_ :: Ptr GValue -> Maybe Native -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Native
P.Nothing = Ptr GValue -> Ptr Native -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Native
forall a. Ptr a
FP.nullPtr :: FP.Ptr Native)
gvalueSet_ Ptr GValue
gv (P.Just Native
obj) = Native -> (Ptr Native -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Native
obj (Ptr GValue -> Ptr Native -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Native)
gvalueGet_ Ptr GValue
gv = do
Ptr Native
ptr <- Ptr GValue -> IO (Ptr Native)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Native)
if Ptr Native
ptr Ptr Native -> Ptr Native -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Native
forall a. Ptr a
FP.nullPtr
then Native -> Maybe Native
forall a. a -> Maybe a
P.Just (Native -> Maybe Native) -> IO Native -> IO (Maybe Native)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Native -> Native) -> Ptr Native -> IO Native
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Native -> Native
Native Ptr Native
ptr
else Maybe Native -> IO (Maybe Native)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Native
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Native
type instance O.AttributeList Native = NativeAttributeList
type NativeAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveNativeMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveNativeMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveNativeMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveNativeMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveNativeMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveNativeMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveNativeMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveNativeMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveNativeMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveNativeMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveNativeMethod "announce" o = Gtk.Accessible.AccessibleAnnounceMethodInfo
ResolveNativeMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveNativeMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveNativeMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveNativeMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveNativeMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveNativeMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveNativeMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveNativeMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveNativeMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveNativeMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveNativeMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveNativeMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveNativeMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveNativeMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveNativeMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveNativeMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveNativeMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveNativeMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveNativeMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveNativeMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveNativeMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveNativeMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveNativeMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveNativeMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveNativeMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveNativeMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveNativeMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveNativeMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveNativeMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveNativeMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveNativeMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveNativeMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveNativeMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveNativeMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveNativeMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveNativeMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveNativeMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveNativeMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveNativeMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveNativeMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveNativeMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveNativeMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveNativeMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveNativeMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveNativeMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveNativeMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveNativeMethod "realize" o = NativeRealizeMethodInfo
ResolveNativeMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveNativeMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveNativeMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveNativeMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveNativeMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveNativeMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveNativeMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveNativeMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveNativeMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveNativeMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveNativeMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveNativeMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveNativeMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveNativeMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveNativeMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveNativeMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveNativeMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveNativeMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveNativeMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveNativeMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveNativeMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveNativeMethod "unrealize" o = NativeUnrealizeMethodInfo
ResolveNativeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveNativeMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveNativeMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveNativeMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveNativeMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveNativeMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveNativeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveNativeMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveNativeMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveNativeMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveNativeMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveNativeMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveNativeMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveNativeMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveNativeMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveNativeMethod "getBaseline" o = Gtk.Widget.WidgetGetBaselineMethodInfo
ResolveNativeMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveNativeMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveNativeMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveNativeMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveNativeMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveNativeMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveNativeMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveNativeMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveNativeMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveNativeMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveNativeMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveNativeMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveNativeMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveNativeMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveNativeMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveNativeMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveNativeMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveNativeMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveNativeMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveNativeMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveNativeMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveNativeMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveNativeMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveNativeMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveNativeMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveNativeMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveNativeMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveNativeMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveNativeMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveNativeMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveNativeMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveNativeMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveNativeMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveNativeMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveNativeMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveNativeMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveNativeMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveNativeMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveNativeMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveNativeMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveNativeMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveNativeMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveNativeMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveNativeMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveNativeMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveNativeMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveNativeMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveNativeMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveNativeMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveNativeMethod "getRenderer" o = NativeGetRendererMethodInfo
ResolveNativeMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveNativeMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveNativeMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveNativeMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveNativeMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveNativeMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveNativeMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveNativeMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveNativeMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveNativeMethod "getSurface" o = NativeGetSurfaceMethodInfo
ResolveNativeMethod "getSurfaceTransform" o = NativeGetSurfaceTransformMethodInfo
ResolveNativeMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveNativeMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveNativeMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveNativeMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveNativeMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveNativeMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveNativeMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveNativeMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveNativeMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveNativeMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveNativeMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveNativeMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveNativeMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveNativeMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveNativeMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveNativeMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveNativeMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveNativeMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveNativeMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveNativeMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveNativeMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveNativeMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveNativeMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveNativeMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveNativeMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveNativeMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveNativeMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveNativeMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveNativeMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveNativeMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveNativeMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveNativeMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveNativeMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveNativeMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveNativeMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveNativeMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveNativeMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveNativeMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveNativeMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveNativeMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveNativeMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveNativeMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveNativeMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveNativeMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveNativeMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveNativeMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveNativeMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveNativeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveNativeMethod t Native, O.OverloadedMethod info Native p) => OL.IsLabel t (Native -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveNativeMethod t Native, O.OverloadedMethod info Native p, R.HasField t Native p) => R.HasField t Native p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveNativeMethod t Native, O.OverloadedMethodInfo info Native) => OL.IsLabel t (O.MethodProxy info Native) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
foreign import ccall "gtk_native_get_renderer" gtk_native_get_renderer ::
Ptr Native ->
IO (Ptr Gsk.Renderer.Renderer)
nativeGetRenderer ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m (Maybe Gsk.Renderer.Renderer)
nativeGetRenderer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m (Maybe Renderer)
nativeGetRenderer a
self = IO (Maybe Renderer) -> m (Maybe Renderer)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Renderer) -> m (Maybe Renderer))
-> IO (Maybe Renderer) -> m (Maybe Renderer)
forall a b. (a -> b) -> a -> b
$ do
Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Renderer
result <- Ptr Native -> IO (Ptr Renderer)
gtk_native_get_renderer Ptr Native
self'
Maybe Renderer
maybeResult <- Ptr Renderer
-> (Ptr Renderer -> IO Renderer) -> IO (Maybe Renderer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Renderer
result ((Ptr Renderer -> IO Renderer) -> IO (Maybe Renderer))
-> (Ptr Renderer -> IO Renderer) -> IO (Maybe Renderer)
forall a b. (a -> b) -> a -> b
$ \Ptr Renderer
result' -> do
Renderer
result'' <- ((ManagedPtr Renderer -> Renderer) -> Ptr Renderer -> IO Renderer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Renderer -> Renderer
Gsk.Renderer.Renderer) Ptr Renderer
result'
Renderer -> IO Renderer
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Renderer
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Renderer -> IO (Maybe Renderer)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Renderer
maybeResult
#if defined(ENABLE_OVERLOADING)
data NativeGetRendererMethodInfo
instance (signature ~ (m (Maybe Gsk.Renderer.Renderer)), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetRendererMethodInfo a signature where
overloadedMethod = nativeGetRenderer
instance O.OverloadedMethodInfo NativeGetRendererMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Native.nativeGetRenderer",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.11/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetRenderer"
})
#endif
foreign import ccall "gtk_native_get_surface" gtk_native_get_surface ::
Ptr Native ->
IO (Ptr Gdk.Surface.Surface)
nativeGetSurface ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m (Maybe Gdk.Surface.Surface)
nativeGetSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m (Maybe Surface)
nativeGetSurface a
self = IO (Maybe Surface) -> m (Maybe Surface)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Surface) -> m (Maybe Surface))
-> IO (Maybe Surface) -> m (Maybe Surface)
forall a b. (a -> b) -> a -> b
$ do
Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Surface
result <- Ptr Native -> IO (Ptr Surface)
gtk_native_get_surface Ptr Native
self'
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
$ \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
Gdk.Surface.Surface) Ptr Surface
result'
Surface -> IO Surface
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Surface -> IO (Maybe Surface)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Surface
maybeResult
#if defined(ENABLE_OVERLOADING)
data NativeGetSurfaceMethodInfo
instance (signature ~ (m (Maybe Gdk.Surface.Surface)), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetSurfaceMethodInfo a signature where
overloadedMethod = nativeGetSurface
instance O.OverloadedMethodInfo NativeGetSurfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Native.nativeGetSurface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.11/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetSurface"
})
#endif
foreign import ccall "gtk_native_get_surface_transform" gtk_native_get_surface_transform ::
Ptr Native ->
Ptr CDouble ->
Ptr CDouble ->
IO ()
nativeGetSurfaceTransform ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m ((Double, Double))
nativeGetSurfaceTransform :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m (Double, Double)
nativeGetSurfaceTransform a
self = IO (Double, Double) -> m (Double, Double)
forall a. IO a -> m a
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 Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
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 Native -> Ptr CDouble -> Ptr CDouble -> IO ()
gtk_native_get_surface_transform Ptr Native
self' 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
self
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 a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
x'', Double
y'')
#if defined(ENABLE_OVERLOADING)
data NativeGetSurfaceTransformMethodInfo
instance (signature ~ (m ((Double, Double))), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetSurfaceTransformMethodInfo a signature where
overloadedMethod = nativeGetSurfaceTransform
instance O.OverloadedMethodInfo NativeGetSurfaceTransformMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Native.nativeGetSurfaceTransform",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.11/docs/GI-Gtk-Interfaces-Native.html#v:nativeGetSurfaceTransform"
})
#endif
foreign import ccall "gtk_native_realize" gtk_native_realize ::
Ptr Native ->
IO ()
nativeRealize ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m ()
nativeRealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m ()
nativeRealize a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Native -> IO ()
gtk_native_realize Ptr Native
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data NativeRealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNative a) => O.OverloadedMethod NativeRealizeMethodInfo a signature where
overloadedMethod = nativeRealize
instance O.OverloadedMethodInfo NativeRealizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Native.nativeRealize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.11/docs/GI-Gtk-Interfaces-Native.html#v:nativeRealize"
})
#endif
foreign import ccall "gtk_native_unrealize" gtk_native_unrealize ::
Ptr Native ->
IO ()
nativeUnrealize ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m ()
nativeUnrealize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m ()
nativeUnrealize a
self = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Native
self' <- a -> IO (Ptr Native)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Native -> IO ()
gtk_native_unrealize Ptr Native
self'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data NativeUnrealizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNative a) => O.OverloadedMethod NativeUnrealizeMethodInfo a signature where
overloadedMethod = nativeUnrealize
instance O.OverloadedMethodInfo NativeUnrealizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Native.nativeUnrealize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.11/docs/GI-Gtk-Interfaces-Native.html#v:nativeUnrealize"
})
#endif
foreign import ccall "gtk_native_get_for_surface" gtk_native_get_for_surface ::
Ptr Gdk.Surface.Surface ->
IO (Ptr Native)
nativeGetForSurface ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Surface.IsSurface a) =>
a
-> m (Maybe Native)
nativeGetForSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSurface a) =>
a -> m (Maybe Native)
nativeGetForSurface a
surface = IO (Maybe Native) -> m (Maybe Native)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Native) -> m (Maybe Native))
-> IO (Maybe Native) -> m (Maybe Native)
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 Native
result <- Ptr Surface -> IO (Ptr Native)
gtk_native_get_for_surface Ptr Surface
surface'
Maybe Native
maybeResult <- Ptr Native -> (Ptr Native -> IO Native) -> IO (Maybe Native)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Native
result ((Ptr Native -> IO Native) -> IO (Maybe Native))
-> (Ptr Native -> IO Native) -> IO (Maybe Native)
forall a b. (a -> b) -> a -> b
$ \Ptr Native
result' -> do
Native
result'' <- ((ManagedPtr Native -> Native) -> Ptr Native -> IO Native
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Native -> Native
Native) Ptr Native
result'
Native -> IO Native
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Native
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Maybe Native -> IO (Maybe Native)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Native
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Native = NativeSignalList
type NativeSignalList = ('[ '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, DK.Type)])
#endif