{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.MenuAccessible
(
MenuAccessible(..) ,
IsMenuAccessible ,
toMenuAccessible ,
#if defined(ENABLE_OVERLOADING)
ResolveMenuAccessibleMethod ,
#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.Atk.Interfaces.Component as Atk.Component
import qualified GI.Atk.Interfaces.Selection as Atk.Selection
import qualified GI.Atk.Objects.Object as Atk.Object
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Objects.ContainerAccessible as Gtk.ContainerAccessible
import {-# SOURCE #-} qualified GI.Gtk.Objects.MenuShellAccessible as Gtk.MenuShellAccessible
import {-# SOURCE #-} qualified GI.Gtk.Objects.WidgetAccessible as Gtk.WidgetAccessible
newtype = (SP.ManagedPtr MenuAccessible)
deriving (MenuAccessible -> MenuAccessible -> Bool
(MenuAccessible -> MenuAccessible -> Bool)
-> (MenuAccessible -> MenuAccessible -> Bool) -> Eq MenuAccessible
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MenuAccessible -> MenuAccessible -> Bool
== :: MenuAccessible -> MenuAccessible -> Bool
$c/= :: MenuAccessible -> MenuAccessible -> Bool
/= :: MenuAccessible -> MenuAccessible -> Bool
Eq)
instance SP.ManagedPtrNewtype MenuAccessible where
toManagedPtr :: MenuAccessible -> ManagedPtr MenuAccessible
toManagedPtr (MenuAccessible ManagedPtr MenuAccessible
p) = ManagedPtr MenuAccessible
p
foreign import ccall "gtk_menu_accessible_get_type"
:: IO B.Types.GType
instance B.Types.TypedObject MenuAccessible where
glibType :: IO GType
glibType = IO GType
c_gtk_menu_accessible_get_type
instance B.Types.GObject MenuAccessible
class (SP.GObject o, O.IsDescendantOf MenuAccessible o) => o
instance (SP.GObject o, O.IsDescendantOf MenuAccessible o) => IsMenuAccessible o
instance O.HasParentTypes MenuAccessible
type instance O.ParentTypes MenuAccessible = '[Gtk.MenuShellAccessible.MenuShellAccessible, Gtk.ContainerAccessible.ContainerAccessible, Gtk.WidgetAccessible.WidgetAccessible, Gtk.Accessible.Accessible, Atk.Object.Object, GObject.Object.Object, Atk.Component.Component, Atk.Selection.Selection]
toMenuAccessible :: (MIO.MonadIO m, IsMenuAccessible o) => o -> m MenuAccessible
= IO MenuAccessible -> m MenuAccessible
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO MenuAccessible -> m MenuAccessible)
-> (o -> IO MenuAccessible) -> o -> m MenuAccessible
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr MenuAccessible -> MenuAccessible)
-> o -> IO MenuAccessible
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr MenuAccessible -> MenuAccessible
MenuAccessible
instance B.GValue.IsGValue (Maybe MenuAccessible) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_menu_accessible_get_type
gvalueSet_ :: Ptr GValue -> Maybe MenuAccessible -> IO ()
gvalueSet_ Ptr GValue
gv Maybe MenuAccessible
P.Nothing = Ptr GValue -> Ptr MenuAccessible -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr MenuAccessible
forall a. Ptr a
FP.nullPtr :: FP.Ptr MenuAccessible)
gvalueSet_ Ptr GValue
gv (P.Just MenuAccessible
obj) = MenuAccessible -> (Ptr MenuAccessible -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr MenuAccessible
obj (Ptr GValue -> Ptr MenuAccessible -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe MenuAccessible)
gvalueGet_ Ptr GValue
gv = do
Ptr MenuAccessible
ptr <- Ptr GValue -> IO (Ptr MenuAccessible)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr MenuAccessible)
if Ptr MenuAccessible
ptr Ptr MenuAccessible -> Ptr MenuAccessible -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr MenuAccessible
forall a. Ptr a
FP.nullPtr
then MenuAccessible -> Maybe MenuAccessible
forall a. a -> Maybe a
P.Just (MenuAccessible -> Maybe MenuAccessible)
-> IO MenuAccessible -> IO (Maybe MenuAccessible)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr MenuAccessible -> MenuAccessible)
-> Ptr MenuAccessible -> IO MenuAccessible
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr MenuAccessible -> MenuAccessible
MenuAccessible Ptr MenuAccessible
ptr
else Maybe MenuAccessible -> IO (Maybe MenuAccessible)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MenuAccessible
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveMenuAccessibleMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveMenuAccessibleMethod "addRelationship" o = Atk.Object.ObjectAddRelationshipMethodInfo
ResolveMenuAccessibleMethod "addSelection" o = Atk.Selection.SelectionAddSelectionMethodInfo
ResolveMenuAccessibleMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMenuAccessibleMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMenuAccessibleMethod "clearSelection" o = Atk.Selection.SelectionClearSelectionMethodInfo
ResolveMenuAccessibleMethod "connectWidgetDestroyed" o = Gtk.Accessible.AccessibleConnectWidgetDestroyedMethodInfo
ResolveMenuAccessibleMethod "contains" o = Atk.Component.ComponentContainsMethodInfo
ResolveMenuAccessibleMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMenuAccessibleMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMenuAccessibleMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMenuAccessibleMethod "grabFocus" o = Atk.Component.ComponentGrabFocusMethodInfo
ResolveMenuAccessibleMethod "initialize" o = Atk.Object.ObjectInitializeMethodInfo
ResolveMenuAccessibleMethod "isChildSelected" o = Atk.Selection.SelectionIsChildSelectedMethodInfo
ResolveMenuAccessibleMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMenuAccessibleMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMenuAccessibleMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMenuAccessibleMethod "notifyStateChange" o = Atk.Object.ObjectNotifyStateChangeMethodInfo
ResolveMenuAccessibleMethod "peekParent" o = Atk.Object.ObjectPeekParentMethodInfo
ResolveMenuAccessibleMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMenuAccessibleMethod "refAccessibleAtPoint" o = Atk.Component.ComponentRefAccessibleAtPointMethodInfo
ResolveMenuAccessibleMethod "refAccessibleChild" o = Atk.Object.ObjectRefAccessibleChildMethodInfo
ResolveMenuAccessibleMethod "refRelationSet" o = Atk.Object.ObjectRefRelationSetMethodInfo
ResolveMenuAccessibleMethod "refSelection" o = Atk.Selection.SelectionRefSelectionMethodInfo
ResolveMenuAccessibleMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMenuAccessibleMethod "refStateSet" o = Atk.Object.ObjectRefStateSetMethodInfo
ResolveMenuAccessibleMethod "removeFocusHandler" o = Atk.Component.ComponentRemoveFocusHandlerMethodInfo
ResolveMenuAccessibleMethod "removePropertyChangeHandler" o = Atk.Object.ObjectRemovePropertyChangeHandlerMethodInfo
ResolveMenuAccessibleMethod "removeRelationship" o = Atk.Object.ObjectRemoveRelationshipMethodInfo
ResolveMenuAccessibleMethod "removeSelection" o = Atk.Selection.SelectionRemoveSelectionMethodInfo
ResolveMenuAccessibleMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMenuAccessibleMethod "scrollTo" o = Atk.Component.ComponentScrollToMethodInfo
ResolveMenuAccessibleMethod "scrollToPoint" o = Atk.Component.ComponentScrollToPointMethodInfo
ResolveMenuAccessibleMethod "selectAllSelection" o = Atk.Selection.SelectionSelectAllSelectionMethodInfo
ResolveMenuAccessibleMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMenuAccessibleMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMenuAccessibleMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMenuAccessibleMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMenuAccessibleMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMenuAccessibleMethod "getAccessibleId" o = Atk.Object.ObjectGetAccessibleIdMethodInfo
ResolveMenuAccessibleMethod "getAlpha" o = Atk.Component.ComponentGetAlphaMethodInfo
ResolveMenuAccessibleMethod "getAttributes" o = Atk.Object.ObjectGetAttributesMethodInfo
ResolveMenuAccessibleMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMenuAccessibleMethod "getDescription" o = Atk.Object.ObjectGetDescriptionMethodInfo
ResolveMenuAccessibleMethod "getExtents" o = Atk.Component.ComponentGetExtentsMethodInfo
ResolveMenuAccessibleMethod "getIndexInParent" o = Atk.Object.ObjectGetIndexInParentMethodInfo
ResolveMenuAccessibleMethod "getLayer" o = Atk.Object.ObjectGetLayerMethodInfo
ResolveMenuAccessibleMethod "getMdiZorder" o = Atk.Object.ObjectGetMdiZorderMethodInfo
ResolveMenuAccessibleMethod "getNAccessibleChildren" o = Atk.Object.ObjectGetNAccessibleChildrenMethodInfo
ResolveMenuAccessibleMethod "getName" o = Atk.Object.ObjectGetNameMethodInfo
ResolveMenuAccessibleMethod "getObjectLocale" o = Atk.Object.ObjectGetObjectLocaleMethodInfo
ResolveMenuAccessibleMethod "getParent" o = Atk.Object.ObjectGetParentMethodInfo
ResolveMenuAccessibleMethod "getPosition" o = Atk.Component.ComponentGetPositionMethodInfo
ResolveMenuAccessibleMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMenuAccessibleMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMenuAccessibleMethod "getRole" o = Atk.Object.ObjectGetRoleMethodInfo
ResolveMenuAccessibleMethod "getSelectionCount" o = Atk.Selection.SelectionGetSelectionCountMethodInfo
ResolveMenuAccessibleMethod "getSize" o = Atk.Component.ComponentGetSizeMethodInfo
ResolveMenuAccessibleMethod "getWidget" o = Gtk.Accessible.AccessibleGetWidgetMethodInfo
ResolveMenuAccessibleMethod "setAccessibleId" o = Atk.Object.ObjectSetAccessibleIdMethodInfo
ResolveMenuAccessibleMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMenuAccessibleMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMenuAccessibleMethod "setDescription" o = Atk.Object.ObjectSetDescriptionMethodInfo
ResolveMenuAccessibleMethod "setExtents" o = Atk.Component.ComponentSetExtentsMethodInfo
ResolveMenuAccessibleMethod "setName" o = Atk.Object.ObjectSetNameMethodInfo
ResolveMenuAccessibleMethod "setParent" o = Atk.Object.ObjectSetParentMethodInfo
ResolveMenuAccessibleMethod "setPosition" o = Atk.Component.ComponentSetPositionMethodInfo
ResolveMenuAccessibleMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMenuAccessibleMethod "setRole" o = Atk.Object.ObjectSetRoleMethodInfo
ResolveMenuAccessibleMethod "setSize" o = Atk.Component.ComponentSetSizeMethodInfo
ResolveMenuAccessibleMethod "setWidget" o = Gtk.Accessible.AccessibleSetWidgetMethodInfo
ResolveMenuAccessibleMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMenuAccessibleMethod t MenuAccessible, O.OverloadedMethod info MenuAccessible p) => OL.IsLabel t (MenuAccessible -> 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 ~ ResolveMenuAccessibleMethod t MenuAccessible, O.OverloadedMethod info MenuAccessible p, R.HasField t MenuAccessible p) => R.HasField t MenuAccessible p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveMenuAccessibleMethod t MenuAccessible, O.OverloadedMethodInfo info MenuAccessible) => OL.IsLabel t (O.MethodProxy info MenuAccessible) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList MenuAccessible
type instance O.AttributeList MenuAccessible = MenuAccessibleAttributeList
type MenuAccessibleAttributeList = ('[ '("accessibleComponentLayer", Atk.Object.ObjectAccessibleComponentLayerPropertyInfo), '("accessibleComponentMdiZorder", Atk.Object.ObjectAccessibleComponentMdiZorderPropertyInfo), '("accessibleDescription", Atk.Object.ObjectAccessibleDescriptionPropertyInfo), '("accessibleHypertextNlinks", Atk.Object.ObjectAccessibleHypertextNlinksPropertyInfo), '("accessibleName", Atk.Object.ObjectAccessibleNamePropertyInfo), '("accessibleParent", Atk.Object.ObjectAccessibleParentPropertyInfo), '("accessibleRole", Atk.Object.ObjectAccessibleRolePropertyInfo), '("accessibleTableCaption", Atk.Object.ObjectAccessibleTableCaptionPropertyInfo), '("accessibleTableCaptionObject", Atk.Object.ObjectAccessibleTableCaptionObjectPropertyInfo), '("accessibleTableColumnDescription", Atk.Object.ObjectAccessibleTableColumnDescriptionPropertyInfo), '("accessibleTableColumnHeader", Atk.Object.ObjectAccessibleTableColumnHeaderPropertyInfo), '("accessibleTableRowDescription", Atk.Object.ObjectAccessibleTableRowDescriptionPropertyInfo), '("accessibleTableRowHeader", Atk.Object.ObjectAccessibleTableRowHeaderPropertyInfo), '("accessibleTableSummary", Atk.Object.ObjectAccessibleTableSummaryPropertyInfo), '("accessibleValue", Atk.Object.ObjectAccessibleValuePropertyInfo), '("widget", Gtk.Accessible.AccessibleWidgetPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList MenuAccessible = MenuAccessibleSignalList
type MenuAccessibleSignalList = ('[ '("activeDescendantChanged", Atk.Object.ObjectActiveDescendantChangedSignalInfo), '("announcement", Atk.Object.ObjectAnnouncementSignalInfo), '("boundsChanged", Atk.Component.ComponentBoundsChangedSignalInfo), '("childrenChanged", Atk.Object.ObjectChildrenChangedSignalInfo), '("focusEvent", Atk.Object.ObjectFocusEventSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("propertyChange", Atk.Object.ObjectPropertyChangeSignalInfo), '("selectionChanged", Atk.Selection.SelectionSelectionChangedSignalInfo), '("stateChange", Atk.Object.ObjectStateChangeSignalInfo), '("visibleDataChanged", Atk.Object.ObjectVisibleDataChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif