{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.NothingAction
(
NothingAction(..) ,
IsNothingAction ,
toNothingAction ,
#if defined(ENABLE_OVERLOADING)
ResolveNothingActionMethod ,
#endif
nothingActionGet ,
) 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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.ShortcutAction as Gtk.ShortcutAction
newtype NothingAction = NothingAction (SP.ManagedPtr NothingAction)
deriving (NothingAction -> NothingAction -> Bool
(NothingAction -> NothingAction -> Bool)
-> (NothingAction -> NothingAction -> Bool) -> Eq NothingAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NothingAction -> NothingAction -> Bool
$c/= :: NothingAction -> NothingAction -> Bool
== :: NothingAction -> NothingAction -> Bool
$c== :: NothingAction -> NothingAction -> Bool
Eq)
instance SP.ManagedPtrNewtype NothingAction where
toManagedPtr :: NothingAction -> ManagedPtr NothingAction
toManagedPtr (NothingAction ManagedPtr NothingAction
p) = ManagedPtr NothingAction
p
foreign import ccall "gtk_nothing_action_get_type"
c_gtk_nothing_action_get_type :: IO B.Types.GType
instance B.Types.TypedObject NothingAction where
glibType :: IO GType
glibType = IO GType
c_gtk_nothing_action_get_type
instance B.Types.GObject NothingAction
instance B.GValue.IsGValue NothingAction where
toGValue :: NothingAction -> IO GValue
toGValue NothingAction
o = do
GType
gtype <- IO GType
c_gtk_nothing_action_get_type
NothingAction -> (Ptr NothingAction -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr NothingAction
o (GType
-> (GValue -> Ptr NothingAction -> IO ())
-> Ptr NothingAction
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr NothingAction -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO NothingAction
fromGValue GValue
gv = do
Ptr NothingAction
ptr <- GValue -> IO (Ptr NothingAction)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr NothingAction)
(ManagedPtr NothingAction -> NothingAction)
-> Ptr NothingAction -> IO NothingAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr NothingAction -> NothingAction
NothingAction Ptr NothingAction
ptr
class (SP.GObject o, O.IsDescendantOf NothingAction o) => IsNothingAction o
instance (SP.GObject o, O.IsDescendantOf NothingAction o) => IsNothingAction o
instance O.HasParentTypes NothingAction
type instance O.ParentTypes NothingAction = '[Gtk.ShortcutAction.ShortcutAction, GObject.Object.Object]
toNothingAction :: (MonadIO m, IsNothingAction o) => o -> m NothingAction
toNothingAction :: o -> m NothingAction
toNothingAction = IO NothingAction -> m NothingAction
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NothingAction -> m NothingAction)
-> (o -> IO NothingAction) -> o -> m NothingAction
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr NothingAction -> NothingAction)
-> o -> IO NothingAction
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr NothingAction -> NothingAction
NothingAction
#if defined(ENABLE_OVERLOADING)
type family ResolveNothingActionMethod (t :: Symbol) (o :: *) :: * where
ResolveNothingActionMethod "activate" o = Gtk.ShortcutAction.ShortcutActionActivateMethodInfo
ResolveNothingActionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveNothingActionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveNothingActionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveNothingActionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveNothingActionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveNothingActionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveNothingActionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveNothingActionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveNothingActionMethod "print" o = Gtk.ShortcutAction.ShortcutActionPrintMethodInfo
ResolveNothingActionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveNothingActionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveNothingActionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveNothingActionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveNothingActionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveNothingActionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveNothingActionMethod "toString" o = Gtk.ShortcutAction.ShortcutActionToStringMethodInfo
ResolveNothingActionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveNothingActionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveNothingActionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveNothingActionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveNothingActionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveNothingActionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveNothingActionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveNothingActionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveNothingActionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveNothingActionMethod t NothingAction, O.MethodInfo info NothingAction p) => OL.IsLabel t (NothingAction -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList NothingAction
type instance O.AttributeList NothingAction = NothingActionAttributeList
type NothingActionAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList NothingAction = NothingActionSignalList
type NothingActionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_nothing_action_get" gtk_nothing_action_get ::
IO (Ptr Gtk.ShortcutAction.ShortcutAction)
nothingActionGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Gtk.ShortcutAction.ShortcutAction
nothingActionGet :: m ShortcutAction
nothingActionGet = IO ShortcutAction -> m ShortcutAction
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ShortcutAction -> m ShortcutAction)
-> IO ShortcutAction -> m ShortcutAction
forall a b. (a -> b) -> a -> b
$ do
Ptr ShortcutAction
result <- IO (Ptr ShortcutAction)
gtk_nothing_action_get
Text -> Ptr ShortcutAction -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"nothingActionGet" Ptr ShortcutAction
result
ShortcutAction
result' <- ((ManagedPtr ShortcutAction -> ShortcutAction)
-> Ptr ShortcutAction -> IO ShortcutAction
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ShortcutAction -> ShortcutAction
Gtk.ShortcutAction.ShortcutAction) Ptr ShortcutAction
result
ShortcutAction -> IO ShortcutAction
forall (m :: * -> *) a. Monad m => a -> m a
return ShortcutAction
result'
#if defined(ENABLE_OVERLOADING)
#endif