{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.MenuButton
(
MenuButton(..) ,
IsMenuButton ,
toMenuButton ,
#if defined(ENABLE_OVERLOADING)
ResolveMenuButtonMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
MenuButtonGetDirectionMethodInfo ,
#endif
menuButtonGetDirection ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetHasFrameMethodInfo ,
#endif
menuButtonGetHasFrame ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetIconNameMethodInfo ,
#endif
menuButtonGetIconName ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetLabelMethodInfo ,
#endif
menuButtonGetLabel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetMenuModelMethodInfo ,
#endif
menuButtonGetMenuModel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetPopoverMethodInfo ,
#endif
menuButtonGetPopover ,
#if defined(ENABLE_OVERLOADING)
MenuButtonGetUseUnderlineMethodInfo ,
#endif
menuButtonGetUseUnderline ,
menuButtonNew ,
#if defined(ENABLE_OVERLOADING)
MenuButtonPopdownMethodInfo ,
#endif
menuButtonPopdown ,
#if defined(ENABLE_OVERLOADING)
MenuButtonPopupMethodInfo ,
#endif
menuButtonPopup ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetCreatePopupFuncMethodInfo ,
#endif
menuButtonSetCreatePopupFunc ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetDirectionMethodInfo ,
#endif
menuButtonSetDirection ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetHasFrameMethodInfo ,
#endif
menuButtonSetHasFrame ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetIconNameMethodInfo ,
#endif
menuButtonSetIconName ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetLabelMethodInfo ,
#endif
menuButtonSetLabel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetMenuModelMethodInfo ,
#endif
menuButtonSetMenuModel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetPopoverMethodInfo ,
#endif
menuButtonSetPopover ,
#if defined(ENABLE_OVERLOADING)
MenuButtonSetUseUnderlineMethodInfo ,
#endif
menuButtonSetUseUnderline ,
#if defined(ENABLE_OVERLOADING)
MenuButtonDirectionPropertyInfo ,
#endif
constructMenuButtonDirection ,
getMenuButtonDirection ,
#if defined(ENABLE_OVERLOADING)
menuButtonDirection ,
#endif
setMenuButtonDirection ,
#if defined(ENABLE_OVERLOADING)
MenuButtonHasFramePropertyInfo ,
#endif
constructMenuButtonHasFrame ,
getMenuButtonHasFrame ,
#if defined(ENABLE_OVERLOADING)
menuButtonHasFrame ,
#endif
setMenuButtonHasFrame ,
#if defined(ENABLE_OVERLOADING)
MenuButtonIconNamePropertyInfo ,
#endif
constructMenuButtonIconName ,
getMenuButtonIconName ,
#if defined(ENABLE_OVERLOADING)
menuButtonIconName ,
#endif
setMenuButtonIconName ,
#if defined(ENABLE_OVERLOADING)
MenuButtonLabelPropertyInfo ,
#endif
constructMenuButtonLabel ,
getMenuButtonLabel ,
#if defined(ENABLE_OVERLOADING)
menuButtonLabel ,
#endif
setMenuButtonLabel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonMenuModelPropertyInfo ,
#endif
clearMenuButtonMenuModel ,
constructMenuButtonMenuModel ,
getMenuButtonMenuModel ,
#if defined(ENABLE_OVERLOADING)
menuButtonMenuModel ,
#endif
setMenuButtonMenuModel ,
#if defined(ENABLE_OVERLOADING)
MenuButtonPopoverPropertyInfo ,
#endif
clearMenuButtonPopover ,
constructMenuButtonPopover ,
getMenuButtonPopover ,
#if defined(ENABLE_OVERLOADING)
menuButtonPopover ,
#endif
setMenuButtonPopover ,
#if defined(ENABLE_OVERLOADING)
MenuButtonUseUnderlinePropertyInfo ,
#endif
constructMenuButtonUseUnderline ,
getMenuButtonUseUnderline ,
#if defined(ENABLE_OVERLOADING)
menuButtonUseUnderline ,
#endif
setMenuButtonUseUnderline ,
) 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.GLib.Callbacks as GLib.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Popover as Gtk.Popover
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype = (SP.ManagedPtr MenuButton)
deriving (MenuButton -> MenuButton -> Bool
(MenuButton -> MenuButton -> Bool)
-> (MenuButton -> MenuButton -> Bool) -> Eq MenuButton
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MenuButton -> MenuButton -> Bool
$c/= :: MenuButton -> MenuButton -> Bool
== :: MenuButton -> MenuButton -> Bool
$c== :: MenuButton -> MenuButton -> Bool
Eq)
instance SP.ManagedPtrNewtype MenuButton where
toManagedPtr :: MenuButton -> ManagedPtr MenuButton
toManagedPtr (MenuButton ManagedPtr MenuButton
p) = ManagedPtr MenuButton
p
foreign import ccall "gtk_menu_button_get_type"
:: IO B.Types.GType
instance B.Types.TypedObject MenuButton where
glibType :: IO GType
glibType = IO GType
c_gtk_menu_button_get_type
instance B.Types.GObject MenuButton
class (SP.GObject o, O.IsDescendantOf MenuButton o) => o
instance (SP.GObject o, O.IsDescendantOf MenuButton o) => IsMenuButton o
instance O.HasParentTypes MenuButton
type instance O.ParentTypes MenuButton = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]
toMenuButton :: (MIO.MonadIO m, IsMenuButton o) => o -> m MenuButton
= IO MenuButton -> m MenuButton
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO MenuButton -> m MenuButton)
-> (o -> IO MenuButton) -> o -> m MenuButton
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr MenuButton -> MenuButton) -> o -> IO MenuButton
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr MenuButton -> MenuButton
MenuButton
instance B.GValue.IsGValue (Maybe MenuButton) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_menu_button_get_type
gvalueSet_ :: Ptr GValue -> Maybe MenuButton -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MenuButton
P.Nothing = Ptr GValue -> Ptr MenuButton -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr MenuButton
forall a. Ptr a
FP.nullPtr :: FP.Ptr MenuButton)
gvalueSet_ Ptr GValue
gv (P.Just MenuButton
obj) = MenuButton -> (Ptr MenuButton -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MenuButton
obj (Ptr GValue -> Ptr MenuButton -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe MenuButton)
gvalueGet_ Ptr GValue
gv = do
Ptr MenuButton
ptr <- Ptr GValue -> IO (Ptr MenuButton)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr MenuButton)
if Ptr MenuButton
ptr Ptr MenuButton -> Ptr MenuButton -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr MenuButton
forall a. Ptr a
FP.nullPtr
then MenuButton -> Maybe MenuButton
forall a. a -> Maybe a
P.Just (MenuButton -> Maybe MenuButton)
-> IO MenuButton -> IO (Maybe MenuButton)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr MenuButton -> MenuButton)
-> Ptr MenuButton -> IO MenuButton
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr MenuButton -> MenuButton
MenuButton Ptr MenuButton
ptr
else Maybe MenuButton -> IO (Maybe MenuButton)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MenuButton
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveMenuButtonMethod (t :: Symbol) (o :: *) :: * where
ResolveMenuButtonMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveMenuButtonMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveMenuButtonMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveMenuButtonMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveMenuButtonMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveMenuButtonMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveMenuButtonMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveMenuButtonMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveMenuButtonMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveMenuButtonMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMenuButtonMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMenuButtonMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveMenuButtonMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveMenuButtonMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveMenuButtonMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveMenuButtonMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveMenuButtonMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveMenuButtonMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveMenuButtonMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveMenuButtonMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveMenuButtonMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveMenuButtonMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMenuButtonMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMenuButtonMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMenuButtonMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveMenuButtonMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveMenuButtonMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveMenuButtonMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveMenuButtonMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveMenuButtonMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveMenuButtonMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveMenuButtonMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveMenuButtonMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveMenuButtonMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveMenuButtonMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveMenuButtonMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveMenuButtonMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveMenuButtonMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMenuButtonMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveMenuButtonMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveMenuButtonMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveMenuButtonMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveMenuButtonMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveMenuButtonMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveMenuButtonMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveMenuButtonMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveMenuButtonMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMenuButtonMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMenuButtonMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveMenuButtonMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveMenuButtonMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveMenuButtonMethod "popdown" o = MenuButtonPopdownMethodInfo
ResolveMenuButtonMethod "popup" o = MenuButtonPopupMethodInfo
ResolveMenuButtonMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveMenuButtonMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveMenuButtonMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveMenuButtonMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveMenuButtonMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMenuButtonMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMenuButtonMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveMenuButtonMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveMenuButtonMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveMenuButtonMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveMenuButtonMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveMenuButtonMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveMenuButtonMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveMenuButtonMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMenuButtonMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveMenuButtonMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveMenuButtonMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveMenuButtonMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveMenuButtonMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMenuButtonMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMenuButtonMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMenuButtonMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveMenuButtonMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveMenuButtonMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveMenuButtonMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveMenuButtonMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveMenuButtonMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMenuButtonMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveMenuButtonMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveMenuButtonMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveMenuButtonMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveMenuButtonMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMenuButtonMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveMenuButtonMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveMenuButtonMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveMenuButtonMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveMenuButtonMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveMenuButtonMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveMenuButtonMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveMenuButtonMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveMenuButtonMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveMenuButtonMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveMenuButtonMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveMenuButtonMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveMenuButtonMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveMenuButtonMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveMenuButtonMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMenuButtonMethod "getDirection" o = MenuButtonGetDirectionMethodInfo
ResolveMenuButtonMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveMenuButtonMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveMenuButtonMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveMenuButtonMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveMenuButtonMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveMenuButtonMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveMenuButtonMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveMenuButtonMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveMenuButtonMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveMenuButtonMethod "getHasFrame" o = MenuButtonGetHasFrameMethodInfo
ResolveMenuButtonMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveMenuButtonMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveMenuButtonMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveMenuButtonMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveMenuButtonMethod "getIconName" o = MenuButtonGetIconNameMethodInfo
ResolveMenuButtonMethod "getLabel" o = MenuButtonGetLabelMethodInfo
ResolveMenuButtonMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveMenuButtonMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveMenuButtonMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveMenuButtonMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveMenuButtonMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveMenuButtonMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveMenuButtonMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveMenuButtonMethod "getMenuModel" o = MenuButtonGetMenuModelMethodInfo
ResolveMenuButtonMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveMenuButtonMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveMenuButtonMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveMenuButtonMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveMenuButtonMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveMenuButtonMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveMenuButtonMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveMenuButtonMethod "getPopover" o = MenuButtonGetPopoverMethodInfo
ResolveMenuButtonMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveMenuButtonMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveMenuButtonMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveMenuButtonMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMenuButtonMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMenuButtonMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveMenuButtonMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveMenuButtonMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveMenuButtonMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveMenuButtonMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveMenuButtonMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveMenuButtonMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveMenuButtonMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveMenuButtonMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveMenuButtonMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveMenuButtonMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveMenuButtonMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveMenuButtonMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveMenuButtonMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveMenuButtonMethod "getUseUnderline" o = MenuButtonGetUseUnderlineMethodInfo
ResolveMenuButtonMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveMenuButtonMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveMenuButtonMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveMenuButtonMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveMenuButtonMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveMenuButtonMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveMenuButtonMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveMenuButtonMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveMenuButtonMethod "setCreatePopupFunc" o = MenuButtonSetCreatePopupFuncMethodInfo
ResolveMenuButtonMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveMenuButtonMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveMenuButtonMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveMenuButtonMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMenuButtonMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMenuButtonMethod "setDirection" o = MenuButtonSetDirectionMethodInfo
ResolveMenuButtonMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveMenuButtonMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveMenuButtonMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveMenuButtonMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveMenuButtonMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveMenuButtonMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveMenuButtonMethod "setHasFrame" o = MenuButtonSetHasFrameMethodInfo
ResolveMenuButtonMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveMenuButtonMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveMenuButtonMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveMenuButtonMethod "setIconName" o = MenuButtonSetIconNameMethodInfo
ResolveMenuButtonMethod "setLabel" o = MenuButtonSetLabelMethodInfo
ResolveMenuButtonMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveMenuButtonMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveMenuButtonMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveMenuButtonMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveMenuButtonMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveMenuButtonMethod "setMenuModel" o = MenuButtonSetMenuModelMethodInfo
ResolveMenuButtonMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveMenuButtonMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveMenuButtonMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveMenuButtonMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveMenuButtonMethod "setPopover" o = MenuButtonSetPopoverMethodInfo
ResolveMenuButtonMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMenuButtonMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveMenuButtonMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveMenuButtonMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveMenuButtonMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveMenuButtonMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveMenuButtonMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveMenuButtonMethod "setUseUnderline" o = MenuButtonSetUseUnderlineMethodInfo
ResolveMenuButtonMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveMenuButtonMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveMenuButtonMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveMenuButtonMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveMenuButtonMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMenuButtonMethod t MenuButton, O.OverloadedMethod info MenuButton p) => OL.IsLabel t (MenuButton -> 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 ~ ResolveMenuButtonMethod t MenuButton, O.OverloadedMethod info MenuButton p, R.HasField t MenuButton p) => R.HasField t MenuButton p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveMenuButtonMethod t MenuButton, O.OverloadedMethodInfo info MenuButton) => OL.IsLabel t (O.MethodProxy info MenuButton) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getMenuButtonDirection :: (MonadIO m, IsMenuButton o) => o -> m Gtk.Enums.ArrowType
o
obj = IO ArrowType -> m ArrowType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ArrowType -> m ArrowType) -> IO ArrowType -> m ArrowType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ArrowType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"direction"
setMenuButtonDirection :: (MonadIO m, IsMenuButton o) => o -> Gtk.Enums.ArrowType -> m ()
o
obj ArrowType
val = IO () -> m ()
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 -> ArrowType -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"direction" ArrowType
val
constructMenuButtonDirection :: (IsMenuButton o, MIO.MonadIO m) => Gtk.Enums.ArrowType -> m (GValueConstruct o)
ArrowType
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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 -> ArrowType -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"direction" ArrowType
val
#if defined(ENABLE_OVERLOADING)
data MenuButtonDirectionPropertyInfo
instance AttrInfo MenuButtonDirectionPropertyInfo where
type AttrAllowedOps MenuButtonDirectionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MenuButtonDirectionPropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonDirectionPropertyInfo = (~) Gtk.Enums.ArrowType
type AttrTransferTypeConstraint MenuButtonDirectionPropertyInfo = (~) Gtk.Enums.ArrowType
type AttrTransferType MenuButtonDirectionPropertyInfo = Gtk.Enums.ArrowType
type AttrGetType MenuButtonDirectionPropertyInfo = Gtk.Enums.ArrowType
type AttrLabel MenuButtonDirectionPropertyInfo = "direction"
type AttrOrigin MenuButtonDirectionPropertyInfo = MenuButton
attrGet = getMenuButtonDirection
attrSet = setMenuButtonDirection
attrTransfer _ v = do
return v
attrConstruct = constructMenuButtonDirection
attrClear = undefined
#endif
getMenuButtonHasFrame :: (MonadIO m, IsMenuButton o) => o -> m Bool
o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"has-frame"
setMenuButtonHasFrame :: (MonadIO m, IsMenuButton o) => o -> Bool -> m ()
o
obj Bool
val = IO () -> m ()
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"has-frame" Bool
val
constructMenuButtonHasFrame :: (IsMenuButton o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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 -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"has-frame" Bool
val
#if defined(ENABLE_OVERLOADING)
data MenuButtonHasFramePropertyInfo
instance AttrInfo MenuButtonHasFramePropertyInfo where
type AttrAllowedOps MenuButtonHasFramePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MenuButtonHasFramePropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonHasFramePropertyInfo = (~) Bool
type AttrTransferTypeConstraint MenuButtonHasFramePropertyInfo = (~) Bool
type AttrTransferType MenuButtonHasFramePropertyInfo = Bool
type AttrGetType MenuButtonHasFramePropertyInfo = Bool
type AttrLabel MenuButtonHasFramePropertyInfo = "has-frame"
type AttrOrigin MenuButtonHasFramePropertyInfo = MenuButton
attrGet = getMenuButtonHasFrame
attrSet = setMenuButtonHasFrame
attrTransfer _ v = do
return v
attrConstruct = constructMenuButtonHasFrame
attrClear = undefined
#endif
getMenuButtonIconName :: (MonadIO m, IsMenuButton o) => o -> m T.Text
o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMenuButtonIconName" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"icon-name"
setMenuButtonIconName :: (MonadIO m, IsMenuButton o) => o -> T.Text -> m ()
o
obj Text
val = IO () -> m ()
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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructMenuButtonIconName :: (IsMenuButton o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data MenuButtonIconNamePropertyInfo
instance AttrInfo MenuButtonIconNamePropertyInfo where
type AttrAllowedOps MenuButtonIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MenuButtonIconNamePropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonIconNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint MenuButtonIconNamePropertyInfo = (~) T.Text
type AttrTransferType MenuButtonIconNamePropertyInfo = T.Text
type AttrGetType MenuButtonIconNamePropertyInfo = T.Text
type AttrLabel MenuButtonIconNamePropertyInfo = "icon-name"
type AttrOrigin MenuButtonIconNamePropertyInfo = MenuButton
attrGet = getMenuButtonIconName
attrSet = setMenuButtonIconName
attrTransfer _ v = do
return v
attrConstruct = constructMenuButtonIconName
attrClear = undefined
#endif
getMenuButtonLabel :: (MonadIO m, IsMenuButton o) => o -> m T.Text
o
obj = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getMenuButtonLabel" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"label"
setMenuButtonLabel :: (MonadIO m, IsMenuButton o) => o -> T.Text -> m ()
o
obj Text
val = IO () -> m ()
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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"label" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructMenuButtonLabel :: (IsMenuButton o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"label" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data MenuButtonLabelPropertyInfo
instance AttrInfo MenuButtonLabelPropertyInfo where
type AttrAllowedOps MenuButtonLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MenuButtonLabelPropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonLabelPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint MenuButtonLabelPropertyInfo = (~) T.Text
type AttrTransferType MenuButtonLabelPropertyInfo = T.Text
type AttrGetType MenuButtonLabelPropertyInfo = T.Text
type AttrLabel MenuButtonLabelPropertyInfo = "label"
type AttrOrigin MenuButtonLabelPropertyInfo = MenuButton
attrGet = getMenuButtonLabel
attrSet = setMenuButtonLabel
attrTransfer _ v = do
return v
attrConstruct = constructMenuButtonLabel
attrClear = undefined
#endif
getMenuButtonMenuModel :: (MonadIO m, IsMenuButton o) => o -> m (Maybe Gio.MenuModel.MenuModel)
o
obj = IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe MenuModel) -> m (Maybe MenuModel))
-> IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MenuModel -> MenuModel)
-> IO (Maybe MenuModel)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"menu-model" ManagedPtr MenuModel -> MenuModel
Gio.MenuModel.MenuModel
setMenuButtonMenuModel :: (MonadIO m, IsMenuButton o, Gio.MenuModel.IsMenuModel a) => o -> a -> m ()
o
obj a
val = IO () -> m ()
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
"menu-model" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructMenuButtonMenuModel :: (IsMenuButton o, MIO.MonadIO m, Gio.MenuModel.IsMenuModel a) => a -> m (GValueConstruct o)
a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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
"menu-model" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearMenuButtonMenuModel :: (MonadIO m, IsMenuButton o) => o -> m ()
o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe MenuModel -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"menu-model" (Maybe MenuModel
forall a. Maybe a
Nothing :: Maybe Gio.MenuModel.MenuModel)
#if defined(ENABLE_OVERLOADING)
data MenuButtonMenuModelPropertyInfo
instance AttrInfo MenuButtonMenuModelPropertyInfo where
type AttrAllowedOps MenuButtonMenuModelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MenuButtonMenuModelPropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonMenuModelPropertyInfo = Gio.MenuModel.IsMenuModel
type AttrTransferTypeConstraint MenuButtonMenuModelPropertyInfo = Gio.MenuModel.IsMenuModel
type AttrTransferType MenuButtonMenuModelPropertyInfo = Gio.MenuModel.MenuModel
type AttrGetType MenuButtonMenuModelPropertyInfo = (Maybe Gio.MenuModel.MenuModel)
type AttrLabel MenuButtonMenuModelPropertyInfo = "menu-model"
type AttrOrigin MenuButtonMenuModelPropertyInfo = MenuButton
attrGet = getMenuButtonMenuModel
attrSet = setMenuButtonMenuModel
attrTransfer _ v = do
unsafeCastTo Gio.MenuModel.MenuModel v
attrConstruct = constructMenuButtonMenuModel
attrClear = clearMenuButtonMenuModel
#endif
getMenuButtonPopover :: (MonadIO m, IsMenuButton o) => o -> m (Maybe Gtk.Popover.Popover)
o
obj = IO (Maybe Popover) -> m (Maybe Popover)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Popover) -> m (Maybe Popover))
-> IO (Maybe Popover) -> m (Maybe Popover)
forall a b. (a -> b) -> a -> b
$ o
-> String -> (ManagedPtr Popover -> Popover) -> IO (Maybe Popover)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"popover" ManagedPtr Popover -> Popover
Gtk.Popover.Popover
setMenuButtonPopover :: (MonadIO m, IsMenuButton o, Gtk.Popover.IsPopover a) => o -> a -> m ()
o
obj a
val = IO () -> m ()
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
"popover" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructMenuButtonPopover :: (IsMenuButton o, MIO.MonadIO m, Gtk.Popover.IsPopover a) => a -> m (GValueConstruct o)
a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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
"popover" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearMenuButtonPopover :: (MonadIO m, IsMenuButton o) => o -> m ()
o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Popover -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"popover" (Maybe Popover
forall a. Maybe a
Nothing :: Maybe Gtk.Popover.Popover)
#if defined(ENABLE_OVERLOADING)
data MenuButtonPopoverPropertyInfo
instance AttrInfo MenuButtonPopoverPropertyInfo where
type AttrAllowedOps MenuButtonPopoverPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint MenuButtonPopoverPropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonPopoverPropertyInfo = Gtk.Popover.IsPopover
type AttrTransferTypeConstraint MenuButtonPopoverPropertyInfo = Gtk.Popover.IsPopover
type AttrTransferType MenuButtonPopoverPropertyInfo = Gtk.Popover.Popover
type AttrGetType MenuButtonPopoverPropertyInfo = (Maybe Gtk.Popover.Popover)
type AttrLabel MenuButtonPopoverPropertyInfo = "popover"
type AttrOrigin MenuButtonPopoverPropertyInfo = MenuButton
attrGet = getMenuButtonPopover
attrSet = setMenuButtonPopover
attrTransfer _ v = do
unsafeCastTo Gtk.Popover.Popover v
attrConstruct = constructMenuButtonPopover
attrClear = clearMenuButtonPopover
#endif
getMenuButtonUseUnderline :: (MonadIO m, IsMenuButton o) => o -> m Bool
o
obj = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"use-underline"
setMenuButtonUseUnderline :: (MonadIO m, IsMenuButton o) => o -> Bool -> m ()
o
obj Bool
val = IO () -> m ()
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"use-underline" Bool
val
constructMenuButtonUseUnderline :: (IsMenuButton o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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 -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"use-underline" Bool
val
#if defined(ENABLE_OVERLOADING)
data MenuButtonUseUnderlinePropertyInfo
instance AttrInfo MenuButtonUseUnderlinePropertyInfo where
type AttrAllowedOps MenuButtonUseUnderlinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint MenuButtonUseUnderlinePropertyInfo = IsMenuButton
type AttrSetTypeConstraint MenuButtonUseUnderlinePropertyInfo = (~) Bool
type AttrTransferTypeConstraint MenuButtonUseUnderlinePropertyInfo = (~) Bool
type AttrTransferType MenuButtonUseUnderlinePropertyInfo = Bool
type AttrGetType MenuButtonUseUnderlinePropertyInfo = Bool
type AttrLabel MenuButtonUseUnderlinePropertyInfo = "use-underline"
type AttrOrigin MenuButtonUseUnderlinePropertyInfo = MenuButton
attrGet = getMenuButtonUseUnderline
attrSet = setMenuButtonUseUnderline
attrTransfer _ v = do
return v
attrConstruct = constructMenuButtonUseUnderline
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MenuButton
type instance O.AttributeList MenuButton = MenuButtonAttributeList
type MenuButtonAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("direction", MenuButtonDirectionPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasFrame", MenuButtonHasFramePropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("iconName", MenuButtonIconNamePropertyInfo), '("label", MenuButtonLabelPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("menuModel", MenuButtonMenuModelPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("popover", MenuButtonPopoverPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("useUnderline", MenuButtonUseUnderlinePropertyInfo), '("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)
menuButtonDirection :: AttrLabelProxy "direction"
menuButtonDirection = AttrLabelProxy
menuButtonHasFrame :: AttrLabelProxy "hasFrame"
menuButtonHasFrame = AttrLabelProxy
menuButtonIconName :: AttrLabelProxy "iconName"
menuButtonIconName = AttrLabelProxy
menuButtonLabel :: AttrLabelProxy "label"
menuButtonLabel = AttrLabelProxy
menuButtonMenuModel :: AttrLabelProxy "menuModel"
menuButtonMenuModel = AttrLabelProxy
menuButtonPopover :: AttrLabelProxy "popover"
menuButtonPopover = AttrLabelProxy
menuButtonUseUnderline :: AttrLabelProxy "useUnderline"
menuButtonUseUnderline = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList MenuButton = MenuButtonSignalList
type MenuButtonSignalList = ('[ '("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
foreign import ccall "gtk_menu_button_new" ::
IO (Ptr MenuButton)
menuButtonNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m MenuButton
= IO MenuButton -> m MenuButton
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MenuButton -> m MenuButton) -> IO MenuButton -> m MenuButton
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
result <- IO (Ptr MenuButton)
gtk_menu_button_new
Text -> Ptr MenuButton -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"menuButtonNew" Ptr MenuButton
result
MenuButton
result' <- ((ManagedPtr MenuButton -> MenuButton)
-> Ptr MenuButton -> IO MenuButton
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr MenuButton -> MenuButton
MenuButton) Ptr MenuButton
result
MenuButton -> IO MenuButton
forall (m :: * -> *) a. Monad m => a -> m a
return MenuButton
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_menu_button_get_direction" ::
Ptr MenuButton ->
IO CUInt
menuButtonGetDirection ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m Gtk.Enums.ArrowType
a
menuButton = IO ArrowType -> m ArrowType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ArrowType -> m ArrowType) -> IO ArrowType -> m ArrowType
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CUInt
result <- Ptr MenuButton -> IO CUInt
gtk_menu_button_get_direction Ptr MenuButton
menuButton'
let result' :: ArrowType
result' = (Int -> ArrowType
forall a. Enum a => Int -> a
toEnum (Int -> ArrowType) -> (CUInt -> Int) -> CUInt -> ArrowType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
ArrowType -> IO ArrowType
forall (m :: * -> *) a. Monad m => a -> m a
return ArrowType
result'
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetDirectionMethodInfo
instance (signature ~ (m Gtk.Enums.ArrowType), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetDirectionMethodInfo a signature where
overloadedMethod = menuButtonGetDirection
instance O.OverloadedMethodInfo MenuButtonGetDirectionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetDirection",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetDirection"
}
#endif
foreign import ccall "gtk_menu_button_get_has_frame" ::
Ptr MenuButton ->
IO CInt
menuButtonGetHasFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m Bool
a
menuButton = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CInt
result <- Ptr MenuButton -> IO CInt
gtk_menu_button_get_has_frame Ptr MenuButton
menuButton'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetHasFrameMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetHasFrameMethodInfo a signature where
overloadedMethod = menuButtonGetHasFrame
instance O.OverloadedMethodInfo MenuButtonGetHasFrameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetHasFrame",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetHasFrame"
}
#endif
foreign import ccall "gtk_menu_button_get_icon_name" ::
Ptr MenuButton ->
IO CString
menuButtonGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m T.Text
a
menuButton = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CString
result <- Ptr MenuButton -> IO CString
gtk_menu_button_get_icon_name Ptr MenuButton
menuButton'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"menuButtonGetIconName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetIconNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetIconNameMethodInfo a signature where
overloadedMethod = menuButtonGetIconName
instance O.OverloadedMethodInfo MenuButtonGetIconNameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetIconName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetIconName"
}
#endif
foreign import ccall "gtk_menu_button_get_label" ::
Ptr MenuButton ->
IO CString
menuButtonGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m T.Text
a
menuButton = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CString
result <- Ptr MenuButton -> IO CString
gtk_menu_button_get_label Ptr MenuButton
menuButton'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"menuButtonGetLabel" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetLabelMethodInfo a signature where
overloadedMethod = menuButtonGetLabel
instance O.OverloadedMethodInfo MenuButtonGetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetLabel"
}
#endif
foreign import ccall "gtk_menu_button_get_menu_model" ::
Ptr MenuButton ->
IO (Ptr Gio.MenuModel.MenuModel)
menuButtonGetMenuModel ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m (Maybe Gio.MenuModel.MenuModel)
a
menuButton = IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MenuModel) -> m (Maybe MenuModel))
-> IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr MenuModel
result <- Ptr MenuButton -> IO (Ptr MenuModel)
gtk_menu_button_get_menu_model Ptr MenuButton
menuButton'
Maybe MenuModel
maybeResult <- Ptr MenuModel
-> (Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr MenuModel
result ((Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel))
-> (Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ \Ptr MenuModel
result' -> do
MenuModel
result'' <- ((ManagedPtr MenuModel -> MenuModel)
-> Ptr MenuModel -> IO MenuModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr MenuModel -> MenuModel
Gio.MenuModel.MenuModel) Ptr MenuModel
result'
MenuModel -> IO MenuModel
forall (m :: * -> *) a. Monad m => a -> m a
return MenuModel
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Maybe MenuModel -> IO (Maybe MenuModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MenuModel
maybeResult
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetMenuModelMethodInfo
instance (signature ~ (m (Maybe Gio.MenuModel.MenuModel)), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetMenuModelMethodInfo a signature where
overloadedMethod = menuButtonGetMenuModel
instance O.OverloadedMethodInfo MenuButtonGetMenuModelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetMenuModel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetMenuModel"
}
#endif
foreign import ccall "gtk_menu_button_get_popover" ::
Ptr MenuButton ->
IO (Ptr Gtk.Popover.Popover)
menuButtonGetPopover ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m (Maybe Gtk.Popover.Popover)
a
menuButton = IO (Maybe Popover) -> m (Maybe Popover)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Popover) -> m (Maybe Popover))
-> IO (Maybe Popover) -> m (Maybe Popover)
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr Popover
result <- Ptr MenuButton -> IO (Ptr Popover)
gtk_menu_button_get_popover Ptr MenuButton
menuButton'
Maybe Popover
maybeResult <- Ptr Popover -> (Ptr Popover -> IO Popover) -> IO (Maybe Popover)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Popover
result ((Ptr Popover -> IO Popover) -> IO (Maybe Popover))
-> (Ptr Popover -> IO Popover) -> IO (Maybe Popover)
forall a b. (a -> b) -> a -> b
$ \Ptr Popover
result' -> do
Popover
result'' <- ((ManagedPtr Popover -> Popover) -> Ptr Popover -> IO Popover
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Popover -> Popover
Gtk.Popover.Popover) Ptr Popover
result'
Popover -> IO Popover
forall (m :: * -> *) a. Monad m => a -> m a
return Popover
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Maybe Popover -> IO (Maybe Popover)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Popover
maybeResult
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetPopoverMethodInfo
instance (signature ~ (m (Maybe Gtk.Popover.Popover)), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetPopoverMethodInfo a signature where
overloadedMethod = menuButtonGetPopover
instance O.OverloadedMethodInfo MenuButtonGetPopoverMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetPopover",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetPopover"
}
#endif
foreign import ccall "gtk_menu_button_get_use_underline" ::
Ptr MenuButton ->
IO CInt
menuButtonGetUseUnderline ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m Bool
a
menuButton = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CInt
result <- Ptr MenuButton -> IO CInt
gtk_menu_button_get_use_underline Ptr MenuButton
menuButton'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data MenuButtonGetUseUnderlineMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonGetUseUnderlineMethodInfo a signature where
overloadedMethod = menuButtonGetUseUnderline
instance O.OverloadedMethodInfo MenuButtonGetUseUnderlineMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonGetUseUnderline",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonGetUseUnderline"
}
#endif
foreign import ccall "gtk_menu_button_popdown" ::
Ptr MenuButton ->
IO ()
menuButtonPopdown ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m ()
a
menuButton = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr MenuButton -> IO ()
gtk_menu_button_popdown Ptr MenuButton
menuButton'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonPopdownMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonPopdownMethodInfo a signature where
overloadedMethod = menuButtonPopdown
instance O.OverloadedMethodInfo MenuButtonPopdownMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonPopdown",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonPopdown"
}
#endif
foreign import ccall "gtk_menu_button_popup" ::
Ptr MenuButton ->
IO ()
menuButtonPopup ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> m ()
a
menuButton = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr MenuButton -> IO ()
gtk_menu_button_popup Ptr MenuButton
menuButton'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonPopupMethodInfo
instance (signature ~ (m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonPopupMethodInfo a signature where
overloadedMethod = menuButtonPopup
instance O.OverloadedMethodInfo MenuButtonPopupMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonPopup",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonPopup"
}
#endif
foreign import ccall "gtk_menu_button_set_create_popup_func" ::
Ptr MenuButton ->
FunPtr Gtk.Callbacks.C_MenuButtonCreatePopupFunc ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO ()
menuButtonSetCreatePopupFunc ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> Maybe (Gtk.Callbacks.MenuButtonCreatePopupFunc)
-> m ()
a
menuButton Maybe MenuButtonCreatePopupFunc
func = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
FunPtr C_MenuButtonCreatePopupFunc
maybeFunc <- case Maybe MenuButtonCreatePopupFunc
func of
Maybe MenuButtonCreatePopupFunc
Nothing -> FunPtr C_MenuButtonCreatePopupFunc
-> IO (FunPtr C_MenuButtonCreatePopupFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_MenuButtonCreatePopupFunc
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just MenuButtonCreatePopupFunc
jFunc -> do
FunPtr C_MenuButtonCreatePopupFunc
jFunc' <- C_MenuButtonCreatePopupFunc
-> IO (FunPtr C_MenuButtonCreatePopupFunc)
Gtk.Callbacks.mk_MenuButtonCreatePopupFunc (Maybe (Ptr (FunPtr C_MenuButtonCreatePopupFunc))
-> MenuButtonCreatePopupFunc_WithClosures
-> C_MenuButtonCreatePopupFunc
Gtk.Callbacks.wrap_MenuButtonCreatePopupFunc Maybe (Ptr (FunPtr C_MenuButtonCreatePopupFunc))
forall a. Maybe a
Nothing (MenuButtonCreatePopupFunc -> MenuButtonCreatePopupFunc_WithClosures
Gtk.Callbacks.drop_closures_MenuButtonCreatePopupFunc MenuButtonCreatePopupFunc
jFunc))
FunPtr C_MenuButtonCreatePopupFunc
-> IO (FunPtr C_MenuButtonCreatePopupFunc)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_MenuButtonCreatePopupFunc
jFunc'
let userData :: Ptr ()
userData = FunPtr C_MenuButtonCreatePopupFunc -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_MenuButtonCreatePopupFunc
maybeFunc
let destroyNotify :: FunPtr (Ptr a -> IO ())
destroyNotify = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
Ptr MenuButton
-> FunPtr C_MenuButtonCreatePopupFunc
-> Ptr ()
-> FunPtr C_DestroyNotify
-> IO ()
gtk_menu_button_set_create_popup_func Ptr MenuButton
menuButton' FunPtr C_MenuButtonCreatePopupFunc
maybeFunc Ptr ()
userData FunPtr C_DestroyNotify
forall a. FunPtr (Ptr a -> IO ())
destroyNotify
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetCreatePopupFuncMethodInfo
instance (signature ~ (Maybe (Gtk.Callbacks.MenuButtonCreatePopupFunc) -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetCreatePopupFuncMethodInfo a signature where
overloadedMethod = menuButtonSetCreatePopupFunc
instance O.OverloadedMethodInfo MenuButtonSetCreatePopupFuncMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetCreatePopupFunc",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetCreatePopupFunc"
}
#endif
foreign import ccall "gtk_menu_button_set_direction" ::
Ptr MenuButton ->
CUInt ->
IO ()
menuButtonSetDirection ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> Gtk.Enums.ArrowType
-> m ()
a
menuButton ArrowType
direction = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
let direction' :: CUInt
direction' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ArrowType -> Int) -> ArrowType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ArrowType -> Int
forall a. Enum a => a -> Int
fromEnum) ArrowType
direction
Ptr MenuButton -> CUInt -> IO ()
gtk_menu_button_set_direction Ptr MenuButton
menuButton' CUInt
direction'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetDirectionMethodInfo
instance (signature ~ (Gtk.Enums.ArrowType -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetDirectionMethodInfo a signature where
overloadedMethod = menuButtonSetDirection
instance O.OverloadedMethodInfo MenuButtonSetDirectionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetDirection",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetDirection"
}
#endif
foreign import ccall "gtk_menu_button_set_has_frame" ::
Ptr MenuButton ->
CInt ->
IO ()
menuButtonSetHasFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> Bool
-> m ()
a
menuButton Bool
hasFrame = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
let hasFrame' :: CInt
hasFrame' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
hasFrame
Ptr MenuButton -> CInt -> IO ()
gtk_menu_button_set_has_frame Ptr MenuButton
menuButton' CInt
hasFrame'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetHasFrameMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetHasFrameMethodInfo a signature where
overloadedMethod = menuButtonSetHasFrame
instance O.OverloadedMethodInfo MenuButtonSetHasFrameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetHasFrame",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetHasFrame"
}
#endif
foreign import ccall "gtk_menu_button_set_icon_name" ::
Ptr MenuButton ->
CString ->
IO ()
menuButtonSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> T.Text
-> m ()
a
menuButton Text
iconName = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CString
iconName' <- Text -> IO CString
textToCString Text
iconName
Ptr MenuButton -> CString -> IO ()
gtk_menu_button_set_icon_name Ptr MenuButton
menuButton' CString
iconName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
iconName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetIconNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetIconNameMethodInfo a signature where
overloadedMethod = menuButtonSetIconName
instance O.OverloadedMethodInfo MenuButtonSetIconNameMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetIconName",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetIconName"
}
#endif
foreign import ccall "gtk_menu_button_set_label" ::
Ptr MenuButton ->
CString ->
IO ()
menuButtonSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> T.Text
-> m ()
a
menuButton Text
label = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
CString
label' <- Text -> IO CString
textToCString Text
label
Ptr MenuButton -> CString -> IO ()
gtk_menu_button_set_label Ptr MenuButton
menuButton' CString
label'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetLabelMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetLabelMethodInfo a signature where
overloadedMethod = menuButtonSetLabel
instance O.OverloadedMethodInfo MenuButtonSetLabelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetLabel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetLabel"
}
#endif
foreign import ccall "gtk_menu_button_set_menu_model" ::
Ptr MenuButton ->
Ptr Gio.MenuModel.MenuModel ->
IO ()
menuButtonSetMenuModel ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a, Gio.MenuModel.IsMenuModel b) =>
a
-> Maybe (b)
-> m ()
a
menuButton Maybe b
menuModel = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr MenuModel
maybeMenuModel <- case Maybe b
menuModel of
Maybe b
Nothing -> Ptr MenuModel -> IO (Ptr MenuModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MenuModel
forall a. Ptr a
nullPtr
Just b
jMenuModel -> do
Ptr MenuModel
jMenuModel' <- b -> IO (Ptr MenuModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jMenuModel
Ptr MenuModel -> IO (Ptr MenuModel)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MenuModel
jMenuModel'
Ptr MenuButton -> Ptr MenuModel -> IO ()
gtk_menu_button_set_menu_model Ptr MenuButton
menuButton' Ptr MenuModel
maybeMenuModel
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
menuModel b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetMenuModelMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsMenuButton a, Gio.MenuModel.IsMenuModel b) => O.OverloadedMethod MenuButtonSetMenuModelMethodInfo a signature where
overloadedMethod = menuButtonSetMenuModel
instance O.OverloadedMethodInfo MenuButtonSetMenuModelMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetMenuModel",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetMenuModel"
}
#endif
foreign import ccall "gtk_menu_button_set_popover" ::
Ptr MenuButton ->
Ptr Gtk.Widget.Widget ->
IO ()
menuButtonSetPopover ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a, Gtk.Widget.IsWidget b) =>
a
-> Maybe (b)
-> m ()
a
menuButton Maybe b
popover = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
Ptr Widget
maybePopover <- case Maybe b
popover of
Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
Just b
jPopover -> do
Ptr Widget
jPopover' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jPopover
Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jPopover'
Ptr MenuButton -> Ptr Widget -> IO ()
gtk_menu_button_set_popover Ptr MenuButton
menuButton' Ptr Widget
maybePopover
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
popover b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetPopoverMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsMenuButton a, Gtk.Widget.IsWidget b) => O.OverloadedMethod MenuButtonSetPopoverMethodInfo a signature where
overloadedMethod = menuButtonSetPopover
instance O.OverloadedMethodInfo MenuButtonSetPopoverMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetPopover",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetPopover"
}
#endif
foreign import ccall "gtk_menu_button_set_use_underline" ::
Ptr MenuButton ->
CInt ->
IO ()
menuButtonSetUseUnderline ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuButton a) =>
a
-> Bool
-> m ()
a
menuButton Bool
useUnderline = 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 MenuButton
menuButton' <- a -> IO (Ptr MenuButton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
menuButton
let useUnderline' :: CInt
useUnderline' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
useUnderline
Ptr MenuButton -> CInt -> IO ()
gtk_menu_button_set_use_underline Ptr MenuButton
menuButton' CInt
useUnderline'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
menuButton
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data MenuButtonSetUseUnderlineMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsMenuButton a) => O.OverloadedMethod MenuButtonSetUseUnderlineMethodInfo a signature where
overloadedMethod = menuButtonSetUseUnderline
instance O.OverloadedMethodInfo MenuButtonSetUseUnderlineMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.MenuButton.menuButtonSetUseUnderline",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-MenuButton.html#v:menuButtonSetUseUnderline"
}
#endif