{-# 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
#if defined(ENABLE_OVERLOADING)
NativeCheckResizeMethodInfo ,
#endif
nativeCheckResize ,
nativeGetForSurface ,
#if defined(ENABLE_OVERLOADING)
NativeGetRendererMethodInfo ,
#endif
nativeGetRenderer ,
#if defined(ENABLE_OVERLOADING)
NativeGetSurfaceMethodInfo ,
#endif
nativeGetSurface ,
#if defined(ENABLE_OVERLOADING)
NativeGetSurfaceTransformMethodInfo ,
#endif
nativeGetSurfaceTransform ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.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.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
instance B.GValue.IsGValue Native where
toGValue :: Native -> IO GValue
toGValue Native
o = do
GType
gtype <- IO GType
c_gtk_native_get_type
Native -> (Ptr Native -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Native
o (GType -> (GValue -> Ptr Native -> IO ()) -> Ptr Native -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Native -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Native
fromGValue GValue
gv = do
Ptr Native
ptr <- GValue -> IO (Ptr Native)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Native)
(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
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 :: (MonadIO m, IsNative o) => o -> m Native
toNative :: o -> m Native
toNative = IO Native -> m Native
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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'
unsafeCastTo ManagedPtr Native -> Native
Native
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Native
type instance O.AttributeList Native = NativeAttributeList
type NativeAttributeList = ('[ '("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 "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
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 "checkResize" o = NativeCheckResizeMethodInfo
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 "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveNativeMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveNativeMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveNativeMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveNativeMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveNativeMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveNativeMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveNativeMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
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 "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
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 = Gtk.Widget.WidgetRealizeMethodInfo
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 "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 = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveNativeMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveNativeMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveNativeMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveNativeMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
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 "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 "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
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 "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveNativeMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveNativeMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveNativeMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
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 "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
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 "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
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.MethodInfo 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
#endif
foreign import ccall "gtk_native_check_resize" gtk_native_check_resize ::
Ptr Native ->
IO ()
nativeCheckResize ::
(B.CallStack.HasCallStack, MonadIO m, IsNative a) =>
a
-> m ()
nativeCheckResize :: a -> m ()
nativeCheckResize 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_check_resize 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 NativeCheckResizeMethodInfo
instance (signature ~ (m ()), MonadIO m, IsNative a) => O.MethodInfo NativeCheckResizeMethodInfo a signature where
overloadedMethod = nativeCheckResize
#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 :: 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.MethodInfo NativeGetRendererMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo NativeGetSurfaceMethodInfo a signature where
overloadedMethod = 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 :: 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.MethodInfo NativeGetSurfaceTransformMethodInfo a signature where
overloadedMethod = nativeGetSurfaceTransform
#endif
foreign import ccall "gtk_native_get_for_surface" gtk_native_get_for_surface ::
Ptr Gdk.Surface.Surface ->
IO (Ptr Gtk.Widget.Widget)
nativeGetForSurface ::
(B.CallStack.HasCallStack, MonadIO m, Gdk.Surface.IsSurface a) =>
a
-> m Gtk.Widget.Widget
nativeGetForSurface :: a -> m Widget
nativeGetForSurface a
surface = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
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 Widget
result <- Ptr Surface -> IO (Ptr Widget)
gtk_native_get_for_surface Ptr Surface
surface'
Text -> Ptr Widget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nativeGetForSurface" Ptr Widget
result
Widget
result' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
surface
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
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), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("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