{-# 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.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
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
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
/= :: Native -> Native -> Bool
$c/= :: Native -> Native -> Bool
== :: Native -> Native -> Bool
$c== :: 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 (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 (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, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveNativeMethod (t :: Symbol) (o :: *) :: * 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 "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 "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 "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveNativeMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveNativeMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveNativeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
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 "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 "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 "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 "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 "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 "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 Gsk.Renderer.Renderer
nativeGetRenderer :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m Renderer
nativeGetRenderer a
self = IO Renderer -> m Renderer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Renderer -> m Renderer) -> IO Renderer -> m 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'
Text -> Ptr Renderer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetRenderer" Ptr Renderer
result
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Renderer -> IO Renderer
forall (m :: * -> *) a. Monad m => a -> m a
return Renderer
result'
#if defined(ENABLE_OVERLOADING)
data NativeGetRendererMethodInfo
instance (signature ~ (m Gsk.Renderer.Renderer), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetRendererMethodInfo a signature where
overloadedMethod = nativeGetRenderer
instance O.OverloadedMethodInfo NativeGetRendererMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetRenderer",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/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 Gdk.Surface.Surface
nativeGetSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNative a) =>
a -> m Surface
nativeGetSurface a
self = 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 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'
Text -> Ptr Surface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetSurface" 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
Gdk.Surface.Surface) Ptr Surface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Surface -> IO Surface
forall (m :: * -> *) a. Monad m => a -> m a
return Surface
result'
#if defined(ENABLE_OVERLOADING)
data NativeGetSurfaceMethodInfo
instance (signature ~ (m Gdk.Surface.Surface), MonadIO m, IsNative a) => O.OverloadedMethod NativeGetSurfaceMethodInfo a signature where
overloadedMethod = nativeGetSurface
instance O.OverloadedMethodInfo NativeGetSurfaceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetSurface",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/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 (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 (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 = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeGetSurfaceTransform",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/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 (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 (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 = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeRealize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/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 (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 (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 = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Interfaces.Native.nativeUnrealize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/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 Native
nativeGetForSurface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsSurface a) =>
a -> m Native
nativeGetForSurface a
surface = IO Native -> m Native
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Native -> m Native) -> IO Native -> m 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'
Text -> Ptr Native -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetForSurface" Ptr Native
result
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Native -> IO Native
forall (m :: * -> *) a. Monad m => a -> m a
return Native
result'
#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, *)])
#endif