{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Adw.Objects.Window
(
Window(..) ,
IsWindow ,
toWindow ,
#if defined(ENABLE_OVERLOADING)
ResolveWindowMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
WindowGetContentMethodInfo ,
#endif
windowGetContent ,
windowNew ,
#if defined(ENABLE_OVERLOADING)
WindowSetContentMethodInfo ,
#endif
windowSetContent ,
#if defined(ENABLE_OVERLOADING)
WindowContentPropertyInfo ,
#endif
clearWindowContent ,
constructWindowContent ,
getWindowContent ,
setWindowContent ,
#if defined(ENABLE_OVERLOADING)
windowContent ,
#endif
) 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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import qualified GI.Gtk.Interfaces.Native as Gtk.Native
import qualified GI.Gtk.Interfaces.Root as Gtk.Root
import qualified GI.Gtk.Interfaces.ShortcutManager as Gtk.ShortcutManager
import qualified GI.Gtk.Objects.Widget as Gtk.Widget
import qualified GI.Gtk.Objects.Window as Gtk.Window
newtype Window = Window (SP.ManagedPtr Window)
deriving (Window -> Window -> Bool
(Window -> Window -> Bool)
-> (Window -> Window -> Bool) -> Eq Window
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Window -> Window -> Bool
== :: Window -> Window -> Bool
$c/= :: Window -> Window -> Bool
/= :: Window -> Window -> Bool
Eq)
instance SP.ManagedPtrNewtype Window where
toManagedPtr :: Window -> ManagedPtr Window
toManagedPtr (Window ManagedPtr Window
p) = ManagedPtr Window
p
foreign import ccall "adw_window_get_type"
c_adw_window_get_type :: IO B.Types.GType
instance B.Types.TypedObject Window where
glibType :: IO GType
glibType = IO GType
c_adw_window_get_type
instance B.Types.GObject Window
class (SP.GObject o, O.IsDescendantOf Window o) => IsWindow o
instance (SP.GObject o, O.IsDescendantOf Window o) => IsWindow o
instance O.HasParentTypes Window
type instance O.ParentTypes Window = '[Gtk.Window.Window, Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget, Gtk.Native.Native, Gtk.Root.Root, Gtk.ShortcutManager.ShortcutManager]
toWindow :: (MIO.MonadIO m, IsWindow o) => o -> m Window
toWindow :: forall (m :: * -> *) o. (MonadIO m, IsWindow o) => o -> m Window
toWindow = IO Window -> m Window
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Window -> m Window) -> (o -> IO Window) -> o -> m Window
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Window -> Window) -> o -> IO Window
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Window -> Window
Window
instance B.GValue.IsGValue (Maybe Window) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_window_get_type
gvalueSet_ :: Ptr GValue -> Maybe Window -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Window
P.Nothing = Ptr GValue -> Ptr Window -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Window
forall a. Ptr a
FP.nullPtr :: FP.Ptr Window)
gvalueSet_ Ptr GValue
gv (P.Just Window
obj) = Window -> (Ptr Window -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Window
obj (Ptr GValue -> Ptr Window -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Window)
gvalueGet_ Ptr GValue
gv = do
Ptr Window
ptr <- Ptr GValue -> IO (Ptr Window)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Window)
if Ptr Window
ptr Ptr Window -> Ptr Window -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Window
forall a. Ptr a
FP.nullPtr
then Window -> Maybe Window
forall a. a -> Maybe a
P.Just (Window -> Maybe Window) -> IO Window -> IO (Maybe Window)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Window -> Window
Window Ptr Window
ptr
else Maybe Window -> IO (Maybe Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWindowMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveWindowMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveWindowMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveWindowMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveWindowMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveWindowMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveWindowMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveWindowMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveWindowMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveWindowMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveWindowMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWindowMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWindowMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveWindowMethod "close" o = Gtk.Window.WindowCloseMethodInfo
ResolveWindowMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveWindowMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveWindowMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveWindowMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveWindowMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveWindowMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveWindowMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveWindowMethod "destroy" o = Gtk.Window.WindowDestroyMethodInfo
ResolveWindowMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveWindowMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveWindowMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveWindowMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWindowMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWindowMethod "fullscreen" o = Gtk.Window.WindowFullscreenMethodInfo
ResolveWindowMethod "fullscreenOnMonitor" o = Gtk.Window.WindowFullscreenOnMonitorMethodInfo
ResolveWindowMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWindowMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveWindowMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveWindowMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveWindowMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveWindowMethod "hasGroup" o = Gtk.Window.WindowHasGroupMethodInfo
ResolveWindowMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveWindowMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveWindowMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveWindowMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveWindowMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveWindowMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveWindowMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveWindowMethod "isActive" o = Gtk.Window.WindowIsActiveMethodInfo
ResolveWindowMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveWindowMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveWindowMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWindowMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveWindowMethod "isFullscreen" o = Gtk.Window.WindowIsFullscreenMethodInfo
ResolveWindowMethod "isMaximized" o = Gtk.Window.WindowIsMaximizedMethodInfo
ResolveWindowMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveWindowMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveWindowMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveWindowMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveWindowMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveWindowMethod "maximize" o = Gtk.Window.WindowMaximizeMethodInfo
ResolveWindowMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveWindowMethod "minimize" o = Gtk.Window.WindowMinimizeMethodInfo
ResolveWindowMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveWindowMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWindowMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWindowMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveWindowMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveWindowMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveWindowMethod "present" o = Gtk.Window.WindowPresentMethodInfo
ResolveWindowMethod "presentWithTime" o = Gtk.Window.WindowPresentWithTimeMethodInfo
ResolveWindowMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveWindowMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveWindowMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveWindowMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveWindowMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWindowMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWindowMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveWindowMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveWindowMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveWindowMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveWindowMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveWindowMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveWindowMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveWindowMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWindowMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveWindowMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveWindowMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveWindowMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveWindowMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWindowMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWindowMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWindowMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveWindowMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveWindowMethod "unfullscreen" o = Gtk.Window.WindowUnfullscreenMethodInfo
ResolveWindowMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveWindowMethod "unmaximize" o = Gtk.Window.WindowUnmaximizeMethodInfo
ResolveWindowMethod "unminimize" o = Gtk.Window.WindowUnminimizeMethodInfo
ResolveWindowMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveWindowMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveWindowMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWindowMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveWindowMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveWindowMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveWindowMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveWindowMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveWindowMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWindowMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveWindowMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveWindowMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveWindowMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveWindowMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveWindowMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveWindowMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveWindowMethod "getApplication" o = Gtk.Window.WindowGetApplicationMethodInfo
ResolveWindowMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveWindowMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveWindowMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveWindowMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveWindowMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveWindowMethod "getChild" o = Gtk.Window.WindowGetChildMethodInfo
ResolveWindowMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveWindowMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveWindowMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveWindowMethod "getContent" o = WindowGetContentMethodInfo
ResolveWindowMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveWindowMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveWindowMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveWindowMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWindowMethod "getDecorated" o = Gtk.Window.WindowGetDecoratedMethodInfo
ResolveWindowMethod "getDefaultSize" o = Gtk.Window.WindowGetDefaultSizeMethodInfo
ResolveWindowMethod "getDefaultWidget" o = Gtk.Window.WindowGetDefaultWidgetMethodInfo
ResolveWindowMethod "getDeletable" o = Gtk.Window.WindowGetDeletableMethodInfo
ResolveWindowMethod "getDestroyWithParent" o = Gtk.Window.WindowGetDestroyWithParentMethodInfo
ResolveWindowMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveWindowMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveWindowMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveWindowMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveWindowMethod "getFocus" o = Gtk.Window.WindowGetFocusMethodInfo
ResolveWindowMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveWindowMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveWindowMethod "getFocusVisible" o = Gtk.Window.WindowGetFocusVisibleMethodInfo
ResolveWindowMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveWindowMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveWindowMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveWindowMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveWindowMethod "getGroup" o = Gtk.Window.WindowGetGroupMethodInfo
ResolveWindowMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveWindowMethod "getHandleMenubarAccel" o = Gtk.Window.WindowGetHandleMenubarAccelMethodInfo
ResolveWindowMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveWindowMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveWindowMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveWindowMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveWindowMethod "getHideOnClose" o = Gtk.Window.WindowGetHideOnCloseMethodInfo
ResolveWindowMethod "getIconName" o = Gtk.Window.WindowGetIconNameMethodInfo
ResolveWindowMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveWindowMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveWindowMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveWindowMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveWindowMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveWindowMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveWindowMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveWindowMethod "getMnemonicsVisible" o = Gtk.Window.WindowGetMnemonicsVisibleMethodInfo
ResolveWindowMethod "getModal" o = Gtk.Window.WindowGetModalMethodInfo
ResolveWindowMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveWindowMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveWindowMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveWindowMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveWindowMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveWindowMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveWindowMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveWindowMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveWindowMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveWindowMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveWindowMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveWindowMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveWindowMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWindowMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWindowMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveWindowMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveWindowMethod "getRenderer" o = Gtk.Native.NativeGetRendererMethodInfo
ResolveWindowMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveWindowMethod "getResizable" o = Gtk.Window.WindowGetResizableMethodInfo
ResolveWindowMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveWindowMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveWindowMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveWindowMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveWindowMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveWindowMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveWindowMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveWindowMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveWindowMethod "getSurface" o = Gtk.Native.NativeGetSurfaceMethodInfo
ResolveWindowMethod "getSurfaceTransform" o = Gtk.Native.NativeGetSurfaceTransformMethodInfo
ResolveWindowMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveWindowMethod "getTitle" o = Gtk.Window.WindowGetTitleMethodInfo
ResolveWindowMethod "getTitlebar" o = Gtk.Window.WindowGetTitlebarMethodInfo
ResolveWindowMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveWindowMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveWindowMethod "getTransientFor" o = Gtk.Window.WindowGetTransientForMethodInfo
ResolveWindowMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveWindowMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveWindowMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveWindowMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveWindowMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveWindowMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveWindowMethod "setApplication" o = Gtk.Window.WindowSetApplicationMethodInfo
ResolveWindowMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveWindowMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveWindowMethod "setChild" o = Gtk.Window.WindowSetChildMethodInfo
ResolveWindowMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveWindowMethod "setContent" o = WindowSetContentMethodInfo
ResolveWindowMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveWindowMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveWindowMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveWindowMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWindowMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWindowMethod "setDecorated" o = Gtk.Window.WindowSetDecoratedMethodInfo
ResolveWindowMethod "setDefaultSize" o = Gtk.Window.WindowSetDefaultSizeMethodInfo
ResolveWindowMethod "setDefaultWidget" o = Gtk.Window.WindowSetDefaultWidgetMethodInfo
ResolveWindowMethod "setDeletable" o = Gtk.Window.WindowSetDeletableMethodInfo
ResolveWindowMethod "setDestroyWithParent" o = Gtk.Window.WindowSetDestroyWithParentMethodInfo
ResolveWindowMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveWindowMethod "setDisplay" o = Gtk.Window.WindowSetDisplayMethodInfo
ResolveWindowMethod "setFocus" o = Gtk.Window.WindowSetFocusMethodInfo
ResolveWindowMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveWindowMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveWindowMethod "setFocusVisible" o = Gtk.Window.WindowSetFocusVisibleMethodInfo
ResolveWindowMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveWindowMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveWindowMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveWindowMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveWindowMethod "setHandleMenubarAccel" o = Gtk.Window.WindowSetHandleMenubarAccelMethodInfo
ResolveWindowMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveWindowMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveWindowMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveWindowMethod "setHideOnClose" o = Gtk.Window.WindowSetHideOnCloseMethodInfo
ResolveWindowMethod "setIconName" o = Gtk.Window.WindowSetIconNameMethodInfo
ResolveWindowMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveWindowMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveWindowMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveWindowMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveWindowMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveWindowMethod "setMnemonicsVisible" o = Gtk.Window.WindowSetMnemonicsVisibleMethodInfo
ResolveWindowMethod "setModal" o = Gtk.Window.WindowSetModalMethodInfo
ResolveWindowMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveWindowMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveWindowMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveWindowMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveWindowMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWindowMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveWindowMethod "setResizable" o = Gtk.Window.WindowSetResizableMethodInfo
ResolveWindowMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveWindowMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveWindowMethod "setStartupId" o = Gtk.Window.WindowSetStartupIdMethodInfo
ResolveWindowMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveWindowMethod "setTitle" o = Gtk.Window.WindowSetTitleMethodInfo
ResolveWindowMethod "setTitlebar" o = Gtk.Window.WindowSetTitlebarMethodInfo
ResolveWindowMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveWindowMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveWindowMethod "setTransientFor" o = Gtk.Window.WindowSetTransientForMethodInfo
ResolveWindowMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveWindowMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveWindowMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveWindowMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveWindowMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWindowMethod t Window, O.OverloadedMethod info Window p) => OL.IsLabel t (Window -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWindowMethod t Window, O.OverloadedMethod info Window p, R.HasField t Window p) => R.HasField t Window p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveWindowMethod t Window, O.OverloadedMethodInfo info Window) => OL.IsLabel t (O.MethodProxy info Window) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getWindowContent :: (MonadIO m, IsWindow o) => o -> m (Maybe Gtk.Widget.Widget)
getWindowContent :: forall (m :: * -> *) o.
(MonadIO m, IsWindow o) =>
o -> m (Maybe Widget)
getWindowContent o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"content" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
setWindowContent :: (MonadIO m, IsWindow o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setWindowContent :: forall (m :: * -> *) o a.
(MonadIO m, IsWindow o, IsWidget a) =>
o -> a -> m ()
setWindowContent o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"content" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructWindowContent :: (IsWindow o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructWindowContent :: forall o (m :: * -> *) a.
(IsWindow o, MonadIO m, IsWidget a) =>
a -> m (GValueConstruct o)
constructWindowContent a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"content" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearWindowContent :: (MonadIO m, IsWindow o) => o -> m ()
clearWindowContent :: forall (m :: * -> *) o. (MonadIO m, IsWindow o) => o -> m ()
clearWindowContent o
obj = 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
$ o -> String -> Maybe Widget -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"content" (Maybe Widget
forall a. Maybe a
Nothing :: Maybe Gtk.Widget.Widget)
#if defined(ENABLE_OVERLOADING)
data WindowContentPropertyInfo
instance AttrInfo WindowContentPropertyInfo where
type AttrAllowedOps WindowContentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WindowContentPropertyInfo = IsWindow
type AttrSetTypeConstraint WindowContentPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint WindowContentPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType WindowContentPropertyInfo = Gtk.Widget.Widget
type AttrGetType WindowContentPropertyInfo = (Maybe Gtk.Widget.Widget)
type AttrLabel WindowContentPropertyInfo = "content"
type AttrOrigin WindowContentPropertyInfo = Window
attrGet = getWindowContent
attrSet = setWindowContent
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructWindowContent
attrClear = clearWindowContent
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Window.content"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.5/docs/GI-Adw-Objects-Window.html#g:attr:content"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Window
type instance O.AttributeList Window = WindowAttributeList
type WindowAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("application", Gtk.Window.WindowApplicationPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("child", Gtk.Window.WindowChildPropertyInfo), '("content", WindowContentPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("decorated", Gtk.Window.WindowDecoratedPropertyInfo), '("defaultHeight", Gtk.Window.WindowDefaultHeightPropertyInfo), '("defaultWidget", Gtk.Window.WindowDefaultWidgetPropertyInfo), '("defaultWidth", Gtk.Window.WindowDefaultWidthPropertyInfo), '("deletable", Gtk.Window.WindowDeletablePropertyInfo), '("destroyWithParent", Gtk.Window.WindowDestroyWithParentPropertyInfo), '("display", Gtk.Window.WindowDisplayPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusVisible", Gtk.Window.WindowFocusVisiblePropertyInfo), '("focusWidget", Gtk.Window.WindowFocusWidgetPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("fullscreened", Gtk.Window.WindowFullscreenedPropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("handleMenubarAccel", Gtk.Window.WindowHandleMenubarAccelPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("hideOnClose", Gtk.Window.WindowHideOnClosePropertyInfo), '("iconName", Gtk.Window.WindowIconNamePropertyInfo), '("isActive", Gtk.Window.WindowIsActivePropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("maximized", Gtk.Window.WindowMaximizedPropertyInfo), '("mnemonicsVisible", Gtk.Window.WindowMnemonicsVisiblePropertyInfo), '("modal", Gtk.Window.WindowModalPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("resizable", Gtk.Window.WindowResizablePropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("startupId", Gtk.Window.WindowStartupIdPropertyInfo), '("title", Gtk.Window.WindowTitlePropertyInfo), '("titlebar", Gtk.Window.WindowTitlebarPropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("transientFor", Gtk.Window.WindowTransientForPropertyInfo), '("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)
windowContent :: AttrLabelProxy "content"
windowContent = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Window = WindowSignalList
type WindowSignalList = ('[ '("activateDefault", Gtk.Window.WindowActivateDefaultSignalInfo), '("activateFocus", Gtk.Window.WindowActivateFocusSignalInfo), '("closeRequest", Gtk.Window.WindowCloseRequestSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("enableDebugging", Gtk.Window.WindowEnableDebuggingSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("keysChanged", Gtk.Window.WindowKeysChangedSignalInfo), '("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
foreign import ccall "adw_window_new" adw_window_new ::
IO (Ptr Window)
windowNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Window
windowNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Window
windowNew = IO Window -> m Window
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Window -> m Window) -> IO Window -> m Window
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
result <- IO (Ptr Window)
adw_window_new
Text -> Ptr Window -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"windowNew" Ptr Window
result
Window
result' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Window) Ptr Window
result
Window -> IO Window
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "adw_window_get_content" adw_window_get_content ::
Ptr Window ->
IO (Ptr Gtk.Widget.Widget)
windowGetContent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a) =>
a
-> m (Maybe Gtk.Widget.Widget)
windowGetContent :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWindow a) =>
a -> m (Maybe Widget)
windowGetContent a
self = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr Window
self' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Widget
result <- Ptr Window -> IO (Ptr Widget)
adw_window_get_content Ptr Window
self'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
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'
Widget -> IO Widget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data WindowGetContentMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsWindow a) => O.OverloadedMethod WindowGetContentMethodInfo a signature where
overloadedMethod = windowGetContent
instance O.OverloadedMethodInfo WindowGetContentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Window.windowGetContent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.5/docs/GI-Adw-Objects-Window.html#v:windowGetContent"
})
#endif
foreign import ccall "adw_window_set_content" adw_window_set_content ::
Ptr Window ->
Ptr Gtk.Widget.Widget ->
IO ()
windowSetContent ::
(B.CallStack.HasCallStack, MonadIO m, IsWindow a, Gtk.Widget.IsWidget b) =>
a
-> Maybe (b)
-> m ()
windowSetContent :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWindow a, IsWidget b) =>
a -> Maybe b -> m ()
windowSetContent a
self Maybe b
content = 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 Window
self' <- a -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Widget
maybeContent <- case Maybe b
content of
Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
Just b
jContent -> do
Ptr Widget
jContent' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jContent
Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jContent'
Ptr Window -> Ptr Widget -> IO ()
adw_window_set_content Ptr Window
self' Ptr Widget
maybeContent
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
content b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data WindowSetContentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsWindow a, Gtk.Widget.IsWidget b) => O.OverloadedMethod WindowSetContentMethodInfo a signature where
overloadedMethod = windowSetContent
instance O.OverloadedMethodInfo WindowSetContentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.Window.windowSetContent",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.5/docs/GI-Adw-Objects-Window.html#v:windowSetContent"
})
#endif