{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.FileLauncher
(
FileLauncher(..) ,
IsFileLauncher ,
toFileLauncher ,
#if defined(ENABLE_OVERLOADING)
ResolveFileLauncherMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FileLauncherGetAlwaysAskMethodInfo ,
#endif
fileLauncherGetAlwaysAsk ,
#if defined(ENABLE_OVERLOADING)
FileLauncherGetFileMethodInfo ,
#endif
fileLauncherGetFile ,
#if defined(ENABLE_OVERLOADING)
FileLauncherGetWritableMethodInfo ,
#endif
fileLauncherGetWritable ,
#if defined(ENABLE_OVERLOADING)
FileLauncherLaunchMethodInfo ,
#endif
fileLauncherLaunch ,
#if defined(ENABLE_OVERLOADING)
FileLauncherLaunchFinishMethodInfo ,
#endif
fileLauncherLaunchFinish ,
fileLauncherNew ,
#if defined(ENABLE_OVERLOADING)
FileLauncherOpenContainingFolderMethodInfo,
#endif
fileLauncherOpenContainingFolder ,
#if defined(ENABLE_OVERLOADING)
FileLauncherOpenContainingFolderFinishMethodInfo,
#endif
fileLauncherOpenContainingFolderFinish ,
#if defined(ENABLE_OVERLOADING)
FileLauncherSetAlwaysAskMethodInfo ,
#endif
fileLauncherSetAlwaysAsk ,
#if defined(ENABLE_OVERLOADING)
FileLauncherSetFileMethodInfo ,
#endif
fileLauncherSetFile ,
#if defined(ENABLE_OVERLOADING)
FileLauncherSetWritableMethodInfo ,
#endif
fileLauncherSetWritable ,
#if defined(ENABLE_OVERLOADING)
FileLauncherAlwaysAskPropertyInfo ,
#endif
constructFileLauncherAlwaysAsk ,
#if defined(ENABLE_OVERLOADING)
fileLauncherAlwaysAsk ,
#endif
getFileLauncherAlwaysAsk ,
setFileLauncherAlwaysAsk ,
#if defined(ENABLE_OVERLOADING)
FileLauncherFilePropertyInfo ,
#endif
clearFileLauncherFile ,
constructFileLauncherFile ,
#if defined(ENABLE_OVERLOADING)
fileLauncherFile ,
#endif
getFileLauncherFile ,
setFileLauncherFile ,
#if defined(ENABLE_OVERLOADING)
FileLauncherWritablePropertyInfo ,
#endif
constructFileLauncherWritable ,
#if defined(ENABLE_OVERLOADING)
fileLauncherWritable ,
#endif
getFileLauncherWritable ,
setFileLauncherWritable ,
) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.ActionMap as Gio.ActionMap
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Gio.Objects.Application as Gio.Application
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.Menu as Gio.Menu
import qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
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.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ShortcutManager as Gtk.ShortcutManager
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Application as Gtk.Application
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
import {-# SOURCE #-} qualified GI.Gtk.Objects.WindowGroup as Gtk.WindowGroup
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
#endif
newtype FileLauncher = FileLauncher (SP.ManagedPtr FileLauncher)
deriving (FileLauncher -> FileLauncher -> Bool
(FileLauncher -> FileLauncher -> Bool)
-> (FileLauncher -> FileLauncher -> Bool) -> Eq FileLauncher
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FileLauncher -> FileLauncher -> Bool
== :: FileLauncher -> FileLauncher -> Bool
$c/= :: FileLauncher -> FileLauncher -> Bool
/= :: FileLauncher -> FileLauncher -> Bool
Eq)
instance SP.ManagedPtrNewtype FileLauncher where
toManagedPtr :: FileLauncher -> ManagedPtr FileLauncher
toManagedPtr (FileLauncher ManagedPtr FileLauncher
p) = ManagedPtr FileLauncher
p
foreign import ccall "gtk_file_launcher_get_type"
c_gtk_file_launcher_get_type :: IO B.Types.GType
instance B.Types.TypedObject FileLauncher where
glibType :: IO GType
glibType = IO GType
c_gtk_file_launcher_get_type
instance B.Types.GObject FileLauncher
class (SP.GObject o, O.IsDescendantOf FileLauncher o) => IsFileLauncher o
instance (SP.GObject o, O.IsDescendantOf FileLauncher o) => IsFileLauncher o
instance O.HasParentTypes FileLauncher
type instance O.ParentTypes FileLauncher = '[GObject.Object.Object]
toFileLauncher :: (MIO.MonadIO m, IsFileLauncher o) => o -> m FileLauncher
toFileLauncher :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> m FileLauncher
toFileLauncher = IO FileLauncher -> m FileLauncher
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO FileLauncher -> m FileLauncher)
-> (o -> IO FileLauncher) -> o -> m FileLauncher
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FileLauncher -> FileLauncher) -> o -> IO FileLauncher
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr FileLauncher -> FileLauncher
FileLauncher
instance B.GValue.IsGValue (Maybe FileLauncher) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_file_launcher_get_type
gvalueSet_ :: Ptr GValue -> Maybe FileLauncher -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FileLauncher
P.Nothing = Ptr GValue -> Ptr FileLauncher -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr FileLauncher
forall a. Ptr a
FP.nullPtr :: FP.Ptr FileLauncher)
gvalueSet_ Ptr GValue
gv (P.Just FileLauncher
obj) = FileLauncher -> (Ptr FileLauncher -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileLauncher
obj (Ptr GValue -> Ptr FileLauncher -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FileLauncher)
gvalueGet_ Ptr GValue
gv = do
Ptr FileLauncher
ptr <- Ptr GValue -> IO (Ptr FileLauncher)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr FileLauncher)
if Ptr FileLauncher
ptr Ptr FileLauncher -> Ptr FileLauncher -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr FileLauncher
forall a. Ptr a
FP.nullPtr
then FileLauncher -> Maybe FileLauncher
forall a. a -> Maybe a
P.Just (FileLauncher -> Maybe FileLauncher)
-> IO FileLauncher -> IO (Maybe FileLauncher)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr FileLauncher -> FileLauncher)
-> Ptr FileLauncher -> IO FileLauncher
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FileLauncher -> FileLauncher
FileLauncher Ptr FileLauncher
ptr
else Maybe FileLauncher -> IO (Maybe FileLauncher)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe FileLauncher
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveFileLauncherMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveFileLauncherMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFileLauncherMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFileLauncherMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFileLauncherMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFileLauncherMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFileLauncherMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFileLauncherMethod "launch" o = FileLauncherLaunchMethodInfo
ResolveFileLauncherMethod "launchFinish" o = FileLauncherLaunchFinishMethodInfo
ResolveFileLauncherMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFileLauncherMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFileLauncherMethod "openContainingFolder" o = FileLauncherOpenContainingFolderMethodInfo
ResolveFileLauncherMethod "openContainingFolderFinish" o = FileLauncherOpenContainingFolderFinishMethodInfo
ResolveFileLauncherMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFileLauncherMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFileLauncherMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFileLauncherMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFileLauncherMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFileLauncherMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFileLauncherMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFileLauncherMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFileLauncherMethod "getAlwaysAsk" o = FileLauncherGetAlwaysAskMethodInfo
ResolveFileLauncherMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFileLauncherMethod "getFile" o = FileLauncherGetFileMethodInfo
ResolveFileLauncherMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFileLauncherMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFileLauncherMethod "getWritable" o = FileLauncherGetWritableMethodInfo
ResolveFileLauncherMethod "setAlwaysAsk" o = FileLauncherSetAlwaysAskMethodInfo
ResolveFileLauncherMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFileLauncherMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFileLauncherMethod "setFile" o = FileLauncherSetFileMethodInfo
ResolveFileLauncherMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFileLauncherMethod "setWritable" o = FileLauncherSetWritableMethodInfo
ResolveFileLauncherMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileLauncherMethod t FileLauncher, O.OverloadedMethod info FileLauncher p) => OL.IsLabel t (FileLauncher -> 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 ~ ResolveFileLauncherMethod t FileLauncher, O.OverloadedMethod info FileLauncher p, R.HasField t FileLauncher p) => R.HasField t FileLauncher p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFileLauncherMethod t FileLauncher, O.OverloadedMethodInfo info FileLauncher) => OL.IsLabel t (O.MethodProxy info FileLauncher) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getFileLauncherAlwaysAsk :: (MonadIO m, IsFileLauncher o) => o -> m Bool
getFileLauncherAlwaysAsk :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> m Bool
getFileLauncherAlwaysAsk o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"always-ask"
setFileLauncherAlwaysAsk :: (MonadIO m, IsFileLauncher o) => o -> Bool -> m ()
setFileLauncherAlwaysAsk :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> Bool -> m ()
setFileLauncherAlwaysAsk o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"always-ask" Bool
val
constructFileLauncherAlwaysAsk :: (IsFileLauncher o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileLauncherAlwaysAsk :: forall o (m :: * -> *).
(IsFileLauncher o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructFileLauncherAlwaysAsk Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"always-ask" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileLauncherAlwaysAskPropertyInfo
instance AttrInfo FileLauncherAlwaysAskPropertyInfo where
type AttrAllowedOps FileLauncherAlwaysAskPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileLauncherAlwaysAskPropertyInfo = IsFileLauncher
type AttrSetTypeConstraint FileLauncherAlwaysAskPropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileLauncherAlwaysAskPropertyInfo = (~) Bool
type AttrTransferType FileLauncherAlwaysAskPropertyInfo = Bool
type AttrGetType FileLauncherAlwaysAskPropertyInfo = Bool
type AttrLabel FileLauncherAlwaysAskPropertyInfo = "always-ask"
type AttrOrigin FileLauncherAlwaysAskPropertyInfo = FileLauncher
attrGet = getFileLauncherAlwaysAsk
attrSet = setFileLauncherAlwaysAsk
attrTransfer _ v = do
return v
attrConstruct = constructFileLauncherAlwaysAsk
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.alwaysAsk"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#g:attr:alwaysAsk"
})
#endif
getFileLauncherFile :: (MonadIO m, IsFileLauncher o) => o -> m (Maybe Gio.File.File)
getFileLauncherFile :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> m (Maybe File)
getFileLauncherFile o
obj = IO (Maybe File) -> m (Maybe File)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr File -> File) -> IO (Maybe File)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"file" ManagedPtr File -> File
Gio.File.File
setFileLauncherFile :: (MonadIO m, IsFileLauncher o, Gio.File.IsFile a) => o -> a -> m ()
setFileLauncherFile :: forall (m :: * -> *) o a.
(MonadIO m, IsFileLauncher o, IsFile a) =>
o -> a -> m ()
setFileLauncherFile o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"file" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructFileLauncherFile :: (IsFileLauncher o, MIO.MonadIO m, Gio.File.IsFile a) => a -> m (GValueConstruct o)
constructFileLauncherFile :: forall o (m :: * -> *) a.
(IsFileLauncher o, MonadIO m, IsFile a) =>
a -> m (GValueConstruct o)
constructFileLauncherFile a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"file" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearFileLauncherFile :: (MonadIO m, IsFileLauncher o) => o -> m ()
clearFileLauncherFile :: forall (m :: * -> *) o. (MonadIO m, IsFileLauncher o) => o -> m ()
clearFileLauncherFile o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe File -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"file" (Maybe File
forall a. Maybe a
Nothing :: Maybe Gio.File.File)
#if defined(ENABLE_OVERLOADING)
data FileLauncherFilePropertyInfo
instance AttrInfo FileLauncherFilePropertyInfo where
type AttrAllowedOps FileLauncherFilePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint FileLauncherFilePropertyInfo = IsFileLauncher
type AttrSetTypeConstraint FileLauncherFilePropertyInfo = Gio.File.IsFile
type AttrTransferTypeConstraint FileLauncherFilePropertyInfo = Gio.File.IsFile
type AttrTransferType FileLauncherFilePropertyInfo = Gio.File.File
type AttrGetType FileLauncherFilePropertyInfo = (Maybe Gio.File.File)
type AttrLabel FileLauncherFilePropertyInfo = "file"
type AttrOrigin FileLauncherFilePropertyInfo = FileLauncher
attrGet = getFileLauncherFile
attrSet = setFileLauncherFile
attrTransfer _ v = do
unsafeCastTo Gio.File.File v
attrConstruct = constructFileLauncherFile
attrClear = clearFileLauncherFile
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.file"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#g:attr:file"
})
#endif
getFileLauncherWritable :: (MonadIO m, IsFileLauncher o) => o -> m Bool
getFileLauncherWritable :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> m Bool
getFileLauncherWritable o
obj = IO Bool -> m Bool
forall a. IO a -> m a
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
"writable"
setFileLauncherWritable :: (MonadIO m, IsFileLauncher o) => o -> Bool -> m ()
setFileLauncherWritable :: forall (m :: * -> *) o.
(MonadIO m, IsFileLauncher o) =>
o -> Bool -> m ()
setFileLauncherWritable o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"writable" Bool
val
constructFileLauncherWritable :: (IsFileLauncher o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructFileLauncherWritable :: forall o (m :: * -> *).
(IsFileLauncher o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructFileLauncherWritable Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"writable" Bool
val
#if defined(ENABLE_OVERLOADING)
data FileLauncherWritablePropertyInfo
instance AttrInfo FileLauncherWritablePropertyInfo where
type AttrAllowedOps FileLauncherWritablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint FileLauncherWritablePropertyInfo = IsFileLauncher
type AttrSetTypeConstraint FileLauncherWritablePropertyInfo = (~) Bool
type AttrTransferTypeConstraint FileLauncherWritablePropertyInfo = (~) Bool
type AttrTransferType FileLauncherWritablePropertyInfo = Bool
type AttrGetType FileLauncherWritablePropertyInfo = Bool
type AttrLabel FileLauncherWritablePropertyInfo = "writable"
type AttrOrigin FileLauncherWritablePropertyInfo = FileLauncher
attrGet = getFileLauncherWritable
attrSet = setFileLauncherWritable
attrTransfer _ v = do
return v
attrConstruct = constructFileLauncherWritable
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.writable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#g:attr:writable"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileLauncher
type instance O.AttributeList FileLauncher = FileLauncherAttributeList
type FileLauncherAttributeList = ('[ '("alwaysAsk", FileLauncherAlwaysAskPropertyInfo), '("file", FileLauncherFilePropertyInfo), '("writable", FileLauncherWritablePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
fileLauncherAlwaysAsk :: AttrLabelProxy "alwaysAsk"
fileLauncherAlwaysAsk = AttrLabelProxy
fileLauncherFile :: AttrLabelProxy "file"
fileLauncherFile = AttrLabelProxy
fileLauncherWritable :: AttrLabelProxy "writable"
fileLauncherWritable = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FileLauncher = FileLauncherSignalList
type FileLauncherSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_file_launcher_new" gtk_file_launcher_new ::
Ptr Gio.File.File ->
IO (Ptr FileLauncher)
fileLauncherNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.File.IsFile a) =>
Maybe (a)
-> m FileLauncher
fileLauncherNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFile a) =>
Maybe a -> m FileLauncher
fileLauncherNew Maybe a
file = IO FileLauncher -> m FileLauncher
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileLauncher -> m FileLauncher)
-> IO FileLauncher -> m FileLauncher
forall a b. (a -> b) -> a -> b
$ do
Ptr File
maybeFile <- case Maybe a
file of
Maybe a
Nothing -> Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just a
jFile -> do
Ptr File
jFile' <- a -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jFile
Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
Ptr FileLauncher
result <- Ptr File -> IO (Ptr FileLauncher)
gtk_file_launcher_new Ptr File
maybeFile
Text -> Ptr FileLauncher -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileLauncherNew" Ptr FileLauncher
result
FileLauncher
result' <- ((ManagedPtr FileLauncher -> FileLauncher)
-> Ptr FileLauncher -> IO FileLauncher
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FileLauncher -> FileLauncher
FileLauncher) Ptr FileLauncher
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
file a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
FileLauncher -> IO FileLauncher
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FileLauncher
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_file_launcher_get_always_ask" gtk_file_launcher_get_always_ask ::
Ptr FileLauncher ->
IO CInt
fileLauncherGetAlwaysAsk ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a) =>
a
-> m Bool
fileLauncherGetAlwaysAsk :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileLauncher a) =>
a -> m Bool
fileLauncherGetAlwaysAsk a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr FileLauncher -> IO CInt
gtk_file_launcher_get_always_ask Ptr FileLauncher
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileLauncherGetAlwaysAskMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileLauncher a) => O.OverloadedMethod FileLauncherGetAlwaysAskMethodInfo a signature where
overloadedMethod = fileLauncherGetAlwaysAsk
instance O.OverloadedMethodInfo FileLauncherGetAlwaysAskMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherGetAlwaysAsk",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherGetAlwaysAsk"
})
#endif
foreign import ccall "gtk_file_launcher_get_file" gtk_file_launcher_get_file ::
Ptr FileLauncher ->
IO (Ptr Gio.File.File)
fileLauncherGetFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a) =>
a
-> m (Maybe Gio.File.File)
fileLauncherGetFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileLauncher a) =>
a -> m (Maybe File)
fileLauncherGetFile a
self = IO (Maybe File) -> m (Maybe File)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe File) -> m (Maybe File))
-> IO (Maybe File) -> m (Maybe File)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
result <- Ptr FileLauncher -> IO (Ptr File)
gtk_file_launcher_get_file Ptr FileLauncher
self'
Maybe File
maybeResult <- Ptr File -> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr File
result ((Ptr File -> IO File) -> IO (Maybe File))
-> (Ptr File -> IO File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
result' -> do
File
result'' <- ((ManagedPtr File -> File) -> Ptr File -> IO File
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr File -> File
Gio.File.File) Ptr File
result'
File -> IO File
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return File
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe File -> IO (Maybe File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe File
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileLauncherGetFileMethodInfo
instance (signature ~ (m (Maybe Gio.File.File)), MonadIO m, IsFileLauncher a) => O.OverloadedMethod FileLauncherGetFileMethodInfo a signature where
overloadedMethod = fileLauncherGetFile
instance O.OverloadedMethodInfo FileLauncherGetFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherGetFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherGetFile"
})
#endif
foreign import ccall "gtk_file_launcher_get_writable" gtk_file_launcher_get_writable ::
Ptr FileLauncher ->
IO CInt
fileLauncherGetWritable ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a) =>
a
-> m Bool
fileLauncherGetWritable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileLauncher a) =>
a -> m Bool
fileLauncherGetWritable a
self = IO Bool -> m Bool
forall a. IO a -> m a
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 FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr FileLauncher -> IO CInt
gtk_file_launcher_get_writable Ptr FileLauncher
self'
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
self
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileLauncherGetWritableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileLauncher a) => O.OverloadedMethod FileLauncherGetWritableMethodInfo a signature where
overloadedMethod = fileLauncherGetWritable
instance O.OverloadedMethodInfo FileLauncherGetWritableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherGetWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherGetWritable"
})
#endif
foreign import ccall "gtk_file_launcher_launch" gtk_file_launcher_launch ::
Ptr FileLauncher ->
Ptr Gtk.Window.Window ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
fileLauncherLaunch ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a, Gtk.Window.IsWindow b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
fileLauncherLaunch :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsFileLauncher a, IsWindow b,
IsCancellable c) =>
a -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
fileLauncherLaunch a
self Maybe b
parent Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Window
maybeParent <- case Maybe b
parent of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just b
jParent -> do
Ptr Window
jParent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jParent
Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr FileLauncher
-> Ptr Window
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
gtk_file_launcher_launch Ptr FileLauncher
self' Ptr Window
maybeParent Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
parent b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileLauncherLaunchMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsFileLauncher a, Gtk.Window.IsWindow b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod FileLauncherLaunchMethodInfo a signature where
overloadedMethod = fileLauncherLaunch
instance O.OverloadedMethodInfo FileLauncherLaunchMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherLaunch",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherLaunch"
})
#endif
foreign import ccall "gtk_file_launcher_launch_finish" gtk_file_launcher_launch_finish ::
Ptr FileLauncher ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
fileLauncherLaunchFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
fileLauncherLaunchFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileLauncher a, IsAsyncResult b) =>
a -> b -> m ()
fileLauncherLaunchFinish a
self b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileLauncher -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
gtk_file_launcher_launch_finish Ptr FileLauncher
self' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data FileLauncherLaunchFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileLauncher a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod FileLauncherLaunchFinishMethodInfo a signature where
overloadedMethod = fileLauncherLaunchFinish
instance O.OverloadedMethodInfo FileLauncherLaunchFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherLaunchFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherLaunchFinish"
})
#endif
foreign import ccall "gtk_file_launcher_open_containing_folder" gtk_file_launcher_open_containing_folder ::
Ptr FileLauncher ->
Ptr Gtk.Window.Window ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
fileLauncherOpenContainingFolder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a, Gtk.Window.IsWindow b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
fileLauncherOpenContainingFolder :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsFileLauncher a, IsWindow b,
IsCancellable c) =>
a -> Maybe b -> Maybe c -> Maybe AsyncReadyCallback -> m ()
fileLauncherOpenContainingFolder a
self Maybe b
parent Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Window
maybeParent <- case Maybe b
parent of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
nullPtr
Just b
jParent -> do
Ptr Window
jParent' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jParent
Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jParent'
Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
Just c
jCancellable -> do
Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
Just AsyncReadyCallback
jCallback -> do
Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
Ptr FileLauncher
-> Ptr Window
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
gtk_file_launcher_open_containing_folder Ptr FileLauncher
self' Ptr Window
maybeParent Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
parent b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileLauncherOpenContainingFolderMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsFileLauncher a, Gtk.Window.IsWindow b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod FileLauncherOpenContainingFolderMethodInfo a signature where
overloadedMethod = fileLauncherOpenContainingFolder
instance O.OverloadedMethodInfo FileLauncherOpenContainingFolderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherOpenContainingFolder",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherOpenContainingFolder"
})
#endif
foreign import ccall "gtk_file_launcher_open_containing_folder_finish" gtk_file_launcher_open_containing_folder_finish ::
Ptr FileLauncher ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
fileLauncherOpenContainingFolderFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
fileLauncherOpenContainingFolderFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileLauncher a, IsAsyncResult b) =>
a -> b -> m ()
fileLauncherOpenContainingFolderFinish a
self b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr FileLauncher -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
gtk_file_launcher_open_containing_folder_finish Ptr FileLauncher
self' Ptr AsyncResult
result_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
) (do
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
)
#if defined(ENABLE_OVERLOADING)
data FileLauncherOpenContainingFolderFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileLauncher a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod FileLauncherOpenContainingFolderFinishMethodInfo a signature where
overloadedMethod = fileLauncherOpenContainingFolderFinish
instance O.OverloadedMethodInfo FileLauncherOpenContainingFolderFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherOpenContainingFolderFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherOpenContainingFolderFinish"
})
#endif
foreign import ccall "gtk_file_launcher_set_always_ask" gtk_file_launcher_set_always_ask ::
Ptr FileLauncher ->
CInt ->
IO ()
fileLauncherSetAlwaysAsk ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a) =>
a
-> Bool
-> m ()
fileLauncherSetAlwaysAsk :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileLauncher a) =>
a -> Bool -> m ()
fileLauncherSetAlwaysAsk a
self Bool
alwaysAsk = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let alwaysAsk' :: CInt
alwaysAsk' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
alwaysAsk
Ptr FileLauncher -> CInt -> IO ()
gtk_file_launcher_set_always_ask Ptr FileLauncher
self' CInt
alwaysAsk'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileLauncherSetAlwaysAskMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileLauncher a) => O.OverloadedMethod FileLauncherSetAlwaysAskMethodInfo a signature where
overloadedMethod = fileLauncherSetAlwaysAsk
instance O.OverloadedMethodInfo FileLauncherSetAlwaysAskMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherSetAlwaysAsk",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherSetAlwaysAsk"
})
#endif
foreign import ccall "gtk_file_launcher_set_file" gtk_file_launcher_set_file ::
Ptr FileLauncher ->
Ptr Gio.File.File ->
IO ()
fileLauncherSetFile ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a, Gio.File.IsFile b) =>
a
-> Maybe (b)
-> m ()
fileLauncherSetFile :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileLauncher a, IsFile b) =>
a -> Maybe b -> m ()
fileLauncherSetFile a
self Maybe b
file = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr File
maybeFile <- case Maybe b
file of
Maybe b
Nothing -> Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
forall a. Ptr a
nullPtr
Just b
jFile -> do
Ptr File
jFile' <- b -> IO (Ptr File)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFile
Ptr File -> IO (Ptr File)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr File
jFile'
Ptr FileLauncher -> Ptr File -> IO ()
gtk_file_launcher_set_file Ptr FileLauncher
self' Ptr File
maybeFile
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
file b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileLauncherSetFileMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsFileLauncher a, Gio.File.IsFile b) => O.OverloadedMethod FileLauncherSetFileMethodInfo a signature where
overloadedMethod = fileLauncherSetFile
instance O.OverloadedMethodInfo FileLauncherSetFileMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherSetFile",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherSetFile"
})
#endif
foreign import ccall "gtk_file_launcher_set_writable" gtk_file_launcher_set_writable ::
Ptr FileLauncher ->
CInt ->
IO ()
fileLauncherSetWritable ::
(B.CallStack.HasCallStack, MonadIO m, IsFileLauncher a) =>
a
-> Bool
-> m ()
fileLauncherSetWritable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileLauncher a) =>
a -> Bool -> m ()
fileLauncherSetWritable a
self Bool
writable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileLauncher
self' <- a -> IO (Ptr FileLauncher)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let writable' :: CInt
writable' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
writable
Ptr FileLauncher -> CInt -> IO ()
gtk_file_launcher_set_writable Ptr FileLauncher
self' CInt
writable'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileLauncherSetWritableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileLauncher a) => O.OverloadedMethod FileLauncherSetWritableMethodInfo a signature where
overloadedMethod = fileLauncherSetWritable
instance O.OverloadedMethodInfo FileLauncherSetWritableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.FileLauncher.fileLauncherSetWritable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-FileLauncher.html#v:fileLauncherSetWritable"
})
#endif