{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.DropTarget
(
DropTarget(..) ,
IsDropTarget ,
toDropTarget ,
#if defined(ENABLE_OVERLOADING)
ResolveDropTargetMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DropTargetGetActionsMethodInfo ,
#endif
dropTargetGetActions ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetCurrentDropMethodInfo ,
#endif
dropTargetGetCurrentDrop ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetDropMethodInfo ,
#endif
dropTargetGetDrop ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetFormatsMethodInfo ,
#endif
dropTargetGetFormats ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetGtypesMethodInfo ,
#endif
dropTargetGetGtypes ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetPreloadMethodInfo ,
#endif
dropTargetGetPreload ,
#if defined(ENABLE_OVERLOADING)
DropTargetGetValueMethodInfo ,
#endif
dropTargetGetValue ,
dropTargetNew ,
#if defined(ENABLE_OVERLOADING)
DropTargetRejectMethodInfo ,
#endif
dropTargetReject ,
#if defined(ENABLE_OVERLOADING)
DropTargetSetActionsMethodInfo ,
#endif
dropTargetSetActions ,
#if defined(ENABLE_OVERLOADING)
DropTargetSetGtypesMethodInfo ,
#endif
dropTargetSetGtypes ,
#if defined(ENABLE_OVERLOADING)
DropTargetSetPreloadMethodInfo ,
#endif
dropTargetSetPreload ,
#if defined(ENABLE_OVERLOADING)
DropTargetActionsPropertyInfo ,
#endif
constructDropTargetActions ,
#if defined(ENABLE_OVERLOADING)
dropTargetActions ,
#endif
getDropTargetActions ,
setDropTargetActions ,
#if defined(ENABLE_OVERLOADING)
DropTargetCurrentDropPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dropTargetCurrentDrop ,
#endif
getDropTargetCurrentDrop ,
#if defined(ENABLE_OVERLOADING)
DropTargetFormatsPropertyInfo ,
#endif
constructDropTargetFormats ,
#if defined(ENABLE_OVERLOADING)
dropTargetFormats ,
#endif
getDropTargetFormats ,
#if defined(ENABLE_OVERLOADING)
DropTargetPreloadPropertyInfo ,
#endif
constructDropTargetPreload ,
#if defined(ENABLE_OVERLOADING)
dropTargetPreload ,
#endif
getDropTargetPreload ,
setDropTargetPreload ,
#if defined(ENABLE_OVERLOADING)
DropTargetValuePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dropTargetValue ,
#endif
getDropTargetValue ,
DropTargetAcceptCallback ,
#if defined(ENABLE_OVERLOADING)
DropTargetAcceptSignalInfo ,
#endif
afterDropTargetAccept ,
onDropTargetAccept ,
DropTargetDropCallback ,
#if defined(ENABLE_OVERLOADING)
DropTargetDropSignalInfo ,
#endif
afterDropTargetDrop ,
onDropTargetDrop ,
DropTargetEnterCallback ,
#if defined(ENABLE_OVERLOADING)
DropTargetEnterSignalInfo ,
#endif
afterDropTargetEnter ,
onDropTargetEnter ,
DropTargetLeaveCallback ,
#if defined(ENABLE_OVERLOADING)
DropTargetLeaveSignalInfo ,
#endif
afterDropTargetLeave ,
onDropTargetLeave ,
DropTargetMotionCallback ,
#if defined(ENABLE_OVERLOADING)
DropTargetMotionSignalInfo ,
#endif
afterDropTargetMotion ,
onDropTargetMotion ,
) 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.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Objects.Drop as Gdk.Drop
import qualified GI.Gdk.Structs.ContentFormats as Gdk.ContentFormats
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
newtype DropTarget = DropTarget (SP.ManagedPtr DropTarget)
deriving (DropTarget -> DropTarget -> Bool
(DropTarget -> DropTarget -> Bool)
-> (DropTarget -> DropTarget -> Bool) -> Eq DropTarget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DropTarget -> DropTarget -> Bool
== :: DropTarget -> DropTarget -> Bool
$c/= :: DropTarget -> DropTarget -> Bool
/= :: DropTarget -> DropTarget -> Bool
Eq)
instance SP.ManagedPtrNewtype DropTarget where
toManagedPtr :: DropTarget -> ManagedPtr DropTarget
toManagedPtr (DropTarget ManagedPtr DropTarget
p) = ManagedPtr DropTarget
p
foreign import ccall "gtk_drop_target_get_type"
c_gtk_drop_target_get_type :: IO B.Types.GType
instance B.Types.TypedObject DropTarget where
glibType :: IO GType
glibType = IO GType
c_gtk_drop_target_get_type
instance B.Types.GObject DropTarget
class (SP.GObject o, O.IsDescendantOf DropTarget o) => IsDropTarget o
instance (SP.GObject o, O.IsDescendantOf DropTarget o) => IsDropTarget o
instance O.HasParentTypes DropTarget
type instance O.ParentTypes DropTarget = '[Gtk.EventController.EventController, GObject.Object.Object]
toDropTarget :: (MIO.MonadIO m, IsDropTarget o) => o -> m DropTarget
toDropTarget :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> m DropTarget
toDropTarget = IO DropTarget -> m DropTarget
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DropTarget -> m DropTarget)
-> (o -> IO DropTarget) -> o -> m DropTarget
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DropTarget -> DropTarget) -> o -> IO DropTarget
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DropTarget -> DropTarget
DropTarget
instance B.GValue.IsGValue (Maybe DropTarget) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_drop_target_get_type
gvalueSet_ :: Ptr GValue -> Maybe DropTarget -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DropTarget
P.Nothing = Ptr GValue -> Ptr DropTarget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DropTarget
forall a. Ptr a
FP.nullPtr :: FP.Ptr DropTarget)
gvalueSet_ Ptr GValue
gv (P.Just DropTarget
obj) = DropTarget -> (Ptr DropTarget -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DropTarget
obj (Ptr GValue -> Ptr DropTarget -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DropTarget)
gvalueGet_ Ptr GValue
gv = do
Ptr DropTarget
ptr <- Ptr GValue -> IO (Ptr DropTarget)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DropTarget)
if Ptr DropTarget
ptr Ptr DropTarget -> Ptr DropTarget -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DropTarget
forall a. Ptr a
FP.nullPtr
then DropTarget -> Maybe DropTarget
forall a. a -> Maybe a
P.Just (DropTarget -> Maybe DropTarget)
-> IO DropTarget -> IO (Maybe DropTarget)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DropTarget -> DropTarget)
-> Ptr DropTarget -> IO DropTarget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DropTarget -> DropTarget
DropTarget Ptr DropTarget
ptr
else Maybe DropTarget -> IO (Maybe DropTarget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DropTarget
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDropTargetMethod (t :: Symbol) (o :: *) :: * where
ResolveDropTargetMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDropTargetMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDropTargetMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDropTargetMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDropTargetMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDropTargetMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDropTargetMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDropTargetMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDropTargetMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDropTargetMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDropTargetMethod "reject" o = DropTargetRejectMethodInfo
ResolveDropTargetMethod "reset" o = Gtk.EventController.EventControllerResetMethodInfo
ResolveDropTargetMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDropTargetMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDropTargetMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDropTargetMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDropTargetMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDropTargetMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDropTargetMethod "getActions" o = DropTargetGetActionsMethodInfo
ResolveDropTargetMethod "getCurrentDrop" o = DropTargetGetCurrentDropMethodInfo
ResolveDropTargetMethod "getCurrentEvent" o = Gtk.EventController.EventControllerGetCurrentEventMethodInfo
ResolveDropTargetMethod "getCurrentEventDevice" o = Gtk.EventController.EventControllerGetCurrentEventDeviceMethodInfo
ResolveDropTargetMethod "getCurrentEventState" o = Gtk.EventController.EventControllerGetCurrentEventStateMethodInfo
ResolveDropTargetMethod "getCurrentEventTime" o = Gtk.EventController.EventControllerGetCurrentEventTimeMethodInfo
ResolveDropTargetMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDropTargetMethod "getDrop" o = DropTargetGetDropMethodInfo
ResolveDropTargetMethod "getFormats" o = DropTargetGetFormatsMethodInfo
ResolveDropTargetMethod "getGtypes" o = DropTargetGetGtypesMethodInfo
ResolveDropTargetMethod "getName" o = Gtk.EventController.EventControllerGetNameMethodInfo
ResolveDropTargetMethod "getPreload" o = DropTargetGetPreloadMethodInfo
ResolveDropTargetMethod "getPropagationLimit" o = Gtk.EventController.EventControllerGetPropagationLimitMethodInfo
ResolveDropTargetMethod "getPropagationPhase" o = Gtk.EventController.EventControllerGetPropagationPhaseMethodInfo
ResolveDropTargetMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDropTargetMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDropTargetMethod "getValue" o = DropTargetGetValueMethodInfo
ResolveDropTargetMethod "getWidget" o = Gtk.EventController.EventControllerGetWidgetMethodInfo
ResolveDropTargetMethod "setActions" o = DropTargetSetActionsMethodInfo
ResolveDropTargetMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDropTargetMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDropTargetMethod "setGtypes" o = DropTargetSetGtypesMethodInfo
ResolveDropTargetMethod "setName" o = Gtk.EventController.EventControllerSetNameMethodInfo
ResolveDropTargetMethod "setPreload" o = DropTargetSetPreloadMethodInfo
ResolveDropTargetMethod "setPropagationLimit" o = Gtk.EventController.EventControllerSetPropagationLimitMethodInfo
ResolveDropTargetMethod "setPropagationPhase" o = Gtk.EventController.EventControllerSetPropagationPhaseMethodInfo
ResolveDropTargetMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDropTargetMethod "setStaticName" o = Gtk.EventController.EventControllerSetStaticNameMethodInfo
ResolveDropTargetMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDropTargetMethod t DropTarget, O.OverloadedMethod info DropTarget p) => OL.IsLabel t (DropTarget -> 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 ~ ResolveDropTargetMethod t DropTarget, O.OverloadedMethod info DropTarget p, R.HasField t DropTarget p) => R.HasField t DropTarget p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDropTargetMethod t DropTarget, O.OverloadedMethodInfo info DropTarget) => OL.IsLabel t (O.MethodProxy info DropTarget) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DropTargetAcceptCallback =
Gdk.Drop.Drop
-> IO Bool
type C_DropTargetAcceptCallback =
Ptr DropTarget ->
Ptr Gdk.Drop.Drop ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DropTargetAcceptCallback :: C_DropTargetAcceptCallback -> IO (FunPtr C_DropTargetAcceptCallback)
wrap_DropTargetAcceptCallback ::
GObject a => (a -> DropTargetAcceptCallback) ->
C_DropTargetAcceptCallback
wrap_DropTargetAcceptCallback :: forall a.
GObject a =>
(a -> DropTargetAcceptCallback) -> C_DropTargetAcceptCallback
wrap_DropTargetAcceptCallback a -> DropTargetAcceptCallback
gi'cb Ptr DropTarget
gi'selfPtr Ptr Drop
drop Ptr ()
_ = do
Drop
drop' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
drop
Bool
result <- Ptr DropTarget -> (DropTarget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DropTarget
gi'selfPtr ((DropTarget -> IO Bool) -> IO Bool)
-> (DropTarget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \DropTarget
gi'self -> a -> DropTargetAcceptCallback
gi'cb (DropTarget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DropTarget
gi'self) Drop
drop'
let result' :: CInt
result' = (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
result
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onDropTargetAccept :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetAcceptCallback) -> m SignalHandlerId
onDropTargetAccept :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetAcceptCallback) -> m SignalHandlerId
onDropTargetAccept a
obj (?self::a) => DropTargetAcceptCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetAcceptCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetAcceptCallback
DropTargetAcceptCallback
cb
let wrapped' :: C_DropTargetAcceptCallback
wrapped' = (a -> DropTargetAcceptCallback) -> C_DropTargetAcceptCallback
forall a.
GObject a =>
(a -> DropTargetAcceptCallback) -> C_DropTargetAcceptCallback
wrap_DropTargetAcceptCallback a -> DropTargetAcceptCallback
wrapped
FunPtr C_DropTargetAcceptCallback
wrapped'' <- C_DropTargetAcceptCallback
-> IO (FunPtr C_DropTargetAcceptCallback)
mk_DropTargetAcceptCallback C_DropTargetAcceptCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetAcceptCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accept" FunPtr C_DropTargetAcceptCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDropTargetAccept :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetAcceptCallback) -> m SignalHandlerId
afterDropTargetAccept :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetAcceptCallback) -> m SignalHandlerId
afterDropTargetAccept a
obj (?self::a) => DropTargetAcceptCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetAcceptCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetAcceptCallback
DropTargetAcceptCallback
cb
let wrapped' :: C_DropTargetAcceptCallback
wrapped' = (a -> DropTargetAcceptCallback) -> C_DropTargetAcceptCallback
forall a.
GObject a =>
(a -> DropTargetAcceptCallback) -> C_DropTargetAcceptCallback
wrap_DropTargetAcceptCallback a -> DropTargetAcceptCallback
wrapped
FunPtr C_DropTargetAcceptCallback
wrapped'' <- C_DropTargetAcceptCallback
-> IO (FunPtr C_DropTargetAcceptCallback)
mk_DropTargetAcceptCallback C_DropTargetAcceptCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetAcceptCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"accept" FunPtr C_DropTargetAcceptCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DropTargetAcceptSignalInfo
instance SignalInfo DropTargetAcceptSignalInfo where
type HaskellCallbackType DropTargetAcceptSignalInfo = DropTargetAcceptCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DropTargetAcceptCallback cb
cb'' <- mk_DropTargetAcceptCallback cb'
connectSignalFunPtr obj "accept" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget::accept"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:signal:accept"})
#endif
type DropTargetDropCallback =
GValue
-> Double
-> Double
-> IO Bool
type C_DropTargetDropCallback =
Ptr DropTarget ->
Ptr GValue ->
CDouble ->
CDouble ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DropTargetDropCallback :: C_DropTargetDropCallback -> IO (FunPtr C_DropTargetDropCallback)
wrap_DropTargetDropCallback ::
GObject a => (a -> DropTargetDropCallback) ->
C_DropTargetDropCallback
wrap_DropTargetDropCallback :: forall a.
GObject a =>
(a -> DropTargetDropCallback) -> C_DropTargetDropCallback
wrap_DropTargetDropCallback a -> DropTargetDropCallback
gi'cb Ptr DropTarget
gi'selfPtr Ptr GValue
value CDouble
x CDouble
y Ptr ()
_ = do
GValue
value' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
value
let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
Bool
result <- Ptr DropTarget -> (DropTarget -> IO Bool) -> IO Bool
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DropTarget
gi'selfPtr ((DropTarget -> IO Bool) -> IO Bool)
-> (DropTarget -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \DropTarget
gi'self -> a -> DropTargetDropCallback
gi'cb (DropTarget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DropTarget
gi'self) GValue
value' Double
x' Double
y'
let result' :: CInt
result' = (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
result
CInt -> IO CInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onDropTargetDrop :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetDropCallback) -> m SignalHandlerId
onDropTargetDrop :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetDropCallback) -> m SignalHandlerId
onDropTargetDrop a
obj (?self::a) => DropTargetDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetDropCallback
DropTargetDropCallback
cb
let wrapped' :: C_DropTargetDropCallback
wrapped' = (a -> DropTargetDropCallback) -> C_DropTargetDropCallback
forall a.
GObject a =>
(a -> DropTargetDropCallback) -> C_DropTargetDropCallback
wrap_DropTargetDropCallback a -> DropTargetDropCallback
wrapped
FunPtr C_DropTargetDropCallback
wrapped'' <- C_DropTargetDropCallback -> IO (FunPtr C_DropTargetDropCallback)
mk_DropTargetDropCallback C_DropTargetDropCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drop" FunPtr C_DropTargetDropCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDropTargetDrop :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetDropCallback) -> m SignalHandlerId
afterDropTargetDrop :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetDropCallback) -> m SignalHandlerId
afterDropTargetDrop a
obj (?self::a) => DropTargetDropCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetDropCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetDropCallback
DropTargetDropCallback
cb
let wrapped' :: C_DropTargetDropCallback
wrapped' = (a -> DropTargetDropCallback) -> C_DropTargetDropCallback
forall a.
GObject a =>
(a -> DropTargetDropCallback) -> C_DropTargetDropCallback
wrap_DropTargetDropCallback a -> DropTargetDropCallback
wrapped
FunPtr C_DropTargetDropCallback
wrapped'' <- C_DropTargetDropCallback -> IO (FunPtr C_DropTargetDropCallback)
mk_DropTargetDropCallback C_DropTargetDropCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetDropCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"drop" FunPtr C_DropTargetDropCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DropTargetDropSignalInfo
instance SignalInfo DropTargetDropSignalInfo where
type HaskellCallbackType DropTargetDropSignalInfo = DropTargetDropCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DropTargetDropCallback cb
cb'' <- mk_DropTargetDropCallback cb'
connectSignalFunPtr obj "drop" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget::drop"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:signal:drop"})
#endif
type DropTargetEnterCallback =
Double
-> Double
-> IO [Gdk.Flags.DragAction]
type C_DropTargetEnterCallback =
Ptr DropTarget ->
CDouble ->
CDouble ->
Ptr () ->
IO CUInt
foreign import ccall "wrapper"
mk_DropTargetEnterCallback :: C_DropTargetEnterCallback -> IO (FunPtr C_DropTargetEnterCallback)
wrap_DropTargetEnterCallback ::
GObject a => (a -> DropTargetEnterCallback) ->
C_DropTargetEnterCallback
wrap_DropTargetEnterCallback :: forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetEnterCallback a -> DropTargetEnterCallback
gi'cb Ptr DropTarget
gi'selfPtr CDouble
x CDouble
y Ptr ()
_ = do
let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
[DragAction]
result <- Ptr DropTarget
-> (DropTarget -> IO [DragAction]) -> IO [DragAction]
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DropTarget
gi'selfPtr ((DropTarget -> IO [DragAction]) -> IO [DragAction])
-> (DropTarget -> IO [DragAction]) -> IO [DragAction]
forall a b. (a -> b) -> a -> b
$ \DropTarget
gi'self -> a -> DropTargetEnterCallback
gi'cb (DropTarget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DropTarget
gi'self) Double
x' Double
y'
let result' :: CUInt
result' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
result
CUInt -> IO CUInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
onDropTargetEnter :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetEnterCallback) -> m SignalHandlerId
onDropTargetEnter :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetEnterCallback) -> m SignalHandlerId
onDropTargetEnter a
obj (?self::a) => DropTargetEnterCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetEnterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetEnterCallback
DropTargetEnterCallback
cb
let wrapped' :: C_DropTargetEnterCallback
wrapped' = (a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetEnterCallback a -> DropTargetEnterCallback
wrapped
FunPtr C_DropTargetEnterCallback
wrapped'' <- C_DropTargetEnterCallback -> IO (FunPtr C_DropTargetEnterCallback)
mk_DropTargetEnterCallback C_DropTargetEnterCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetEnterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter" FunPtr C_DropTargetEnterCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDropTargetEnter :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetEnterCallback) -> m SignalHandlerId
afterDropTargetEnter :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetEnterCallback) -> m SignalHandlerId
afterDropTargetEnter a
obj (?self::a) => DropTargetEnterCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetEnterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetEnterCallback
DropTargetEnterCallback
cb
let wrapped' :: C_DropTargetEnterCallback
wrapped' = (a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetEnterCallback a -> DropTargetEnterCallback
wrapped
FunPtr C_DropTargetEnterCallback
wrapped'' <- C_DropTargetEnterCallback -> IO (FunPtr C_DropTargetEnterCallback)
mk_DropTargetEnterCallback C_DropTargetEnterCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetEnterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"enter" FunPtr C_DropTargetEnterCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DropTargetEnterSignalInfo
instance SignalInfo DropTargetEnterSignalInfo where
type HaskellCallbackType DropTargetEnterSignalInfo = DropTargetEnterCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DropTargetEnterCallback cb
cb'' <- mk_DropTargetEnterCallback cb'
connectSignalFunPtr obj "enter" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget::enter"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:signal:enter"})
#endif
type DropTargetLeaveCallback =
IO ()
type C_DropTargetLeaveCallback =
Ptr DropTarget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DropTargetLeaveCallback :: C_DropTargetLeaveCallback -> IO (FunPtr C_DropTargetLeaveCallback)
wrap_DropTargetLeaveCallback ::
GObject a => (a -> DropTargetLeaveCallback) ->
C_DropTargetLeaveCallback
wrap_DropTargetLeaveCallback :: forall a. GObject a => (a -> IO ()) -> C_DropTargetLeaveCallback
wrap_DropTargetLeaveCallback a -> IO ()
gi'cb Ptr DropTarget
gi'selfPtr Ptr ()
_ = do
Ptr DropTarget -> (DropTarget -> IO ()) -> IO ()
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DropTarget
gi'selfPtr ((DropTarget -> IO ()) -> IO ()) -> (DropTarget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \DropTarget
gi'self -> a -> IO ()
gi'cb (DropTarget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DropTarget
gi'self)
onDropTargetLeave :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetLeaveCallback) -> m SignalHandlerId
onDropTargetLeave :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onDropTargetLeave a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DropTargetLeaveCallback
wrapped' = (a -> IO ()) -> C_DropTargetLeaveCallback
forall a. GObject a => (a -> IO ()) -> C_DropTargetLeaveCallback
wrap_DropTargetLeaveCallback a -> IO ()
wrapped
FunPtr C_DropTargetLeaveCallback
wrapped'' <- C_DropTargetLeaveCallback -> IO (FunPtr C_DropTargetLeaveCallback)
mk_DropTargetLeaveCallback C_DropTargetLeaveCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetLeaveCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave" FunPtr C_DropTargetLeaveCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDropTargetLeave :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetLeaveCallback) -> m SignalHandlerId
afterDropTargetLeave :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterDropTargetLeave a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_DropTargetLeaveCallback
wrapped' = (a -> IO ()) -> C_DropTargetLeaveCallback
forall a. GObject a => (a -> IO ()) -> C_DropTargetLeaveCallback
wrap_DropTargetLeaveCallback a -> IO ()
wrapped
FunPtr C_DropTargetLeaveCallback
wrapped'' <- C_DropTargetLeaveCallback -> IO (FunPtr C_DropTargetLeaveCallback)
mk_DropTargetLeaveCallback C_DropTargetLeaveCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetLeaveCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"leave" FunPtr C_DropTargetLeaveCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DropTargetLeaveSignalInfo
instance SignalInfo DropTargetLeaveSignalInfo where
type HaskellCallbackType DropTargetLeaveSignalInfo = DropTargetLeaveCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DropTargetLeaveCallback cb
cb'' <- mk_DropTargetLeaveCallback cb'
connectSignalFunPtr obj "leave" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget::leave"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:signal:leave"})
#endif
type DropTargetMotionCallback =
Double
-> Double
-> IO [Gdk.Flags.DragAction]
type C_DropTargetMotionCallback =
Ptr DropTarget ->
CDouble ->
CDouble ->
Ptr () ->
IO CUInt
foreign import ccall "wrapper"
mk_DropTargetMotionCallback :: C_DropTargetMotionCallback -> IO (FunPtr C_DropTargetMotionCallback)
wrap_DropTargetMotionCallback ::
GObject a => (a -> DropTargetMotionCallback) ->
C_DropTargetMotionCallback
wrap_DropTargetMotionCallback :: forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetMotionCallback a -> DropTargetEnterCallback
gi'cb Ptr DropTarget
gi'selfPtr CDouble
x CDouble
y Ptr ()
_ = do
let x' :: Double
x' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
x
let y' :: Double
y' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
y
[DragAction]
result <- Ptr DropTarget
-> (DropTarget -> IO [DragAction]) -> IO [DragAction]
forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DropTarget
gi'selfPtr ((DropTarget -> IO [DragAction]) -> IO [DragAction])
-> (DropTarget -> IO [DragAction]) -> IO [DragAction]
forall a b. (a -> b) -> a -> b
$ \DropTarget
gi'self -> a -> DropTargetEnterCallback
gi'cb (DropTarget -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DropTarget
gi'self) Double
x' Double
y'
let result' :: CUInt
result' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
result
CUInt -> IO CUInt
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CUInt
result'
onDropTargetMotion :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetMotionCallback) -> m SignalHandlerId
onDropTargetMotion :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetEnterCallback) -> m SignalHandlerId
onDropTargetMotion a
obj (?self::a) => DropTargetEnterCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetEnterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetEnterCallback
DropTargetEnterCallback
cb
let wrapped' :: C_DropTargetEnterCallback
wrapped' = (a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetMotionCallback a -> DropTargetEnterCallback
wrapped
FunPtr C_DropTargetEnterCallback
wrapped'' <- C_DropTargetEnterCallback -> IO (FunPtr C_DropTargetEnterCallback)
mk_DropTargetMotionCallback C_DropTargetEnterCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetEnterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"motion" FunPtr C_DropTargetEnterCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDropTargetMotion :: (IsDropTarget a, MonadIO m) => a -> ((?self :: a) => DropTargetMotionCallback) -> m SignalHandlerId
afterDropTargetMotion :: forall a (m :: * -> *).
(IsDropTarget a, MonadIO m) =>
a -> ((?self::a) => DropTargetEnterCallback) -> m SignalHandlerId
afterDropTargetMotion a
obj (?self::a) => DropTargetEnterCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DropTargetEnterCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DropTargetEnterCallback
DropTargetEnterCallback
cb
let wrapped' :: C_DropTargetEnterCallback
wrapped' = (a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
forall a.
GObject a =>
(a -> DropTargetEnterCallback) -> C_DropTargetEnterCallback
wrap_DropTargetMotionCallback a -> DropTargetEnterCallback
wrapped
FunPtr C_DropTargetEnterCallback
wrapped'' <- C_DropTargetEnterCallback -> IO (FunPtr C_DropTargetEnterCallback)
mk_DropTargetMotionCallback C_DropTargetEnterCallback
wrapped'
a
-> Text
-> FunPtr C_DropTargetEnterCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"motion" FunPtr C_DropTargetEnterCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DropTargetMotionSignalInfo
instance SignalInfo DropTargetMotionSignalInfo where
type HaskellCallbackType DropTargetMotionSignalInfo = DropTargetMotionCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DropTargetMotionCallback cb
cb'' <- mk_DropTargetMotionCallback cb'
connectSignalFunPtr obj "motion" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget::motion"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:signal:motion"})
#endif
getDropTargetActions :: (MonadIO m, IsDropTarget o) => o -> m [Gdk.Flags.DragAction]
getDropTargetActions :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> m [DragAction]
getDropTargetActions o
obj = IO [DragAction] -> m [DragAction]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DragAction] -> m [DragAction])
-> IO [DragAction] -> m [DragAction]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DragAction]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"actions"
setDropTargetActions :: (MonadIO m, IsDropTarget o) => o -> [Gdk.Flags.DragAction] -> m ()
setDropTargetActions :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> [DragAction] -> m ()
setDropTargetActions o
obj [DragAction]
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 -> [DragAction] -> IO ()
forall a b.
(IsGFlag b, BoxedFlags b, GObject a) =>
a -> String -> [b] -> IO ()
B.Properties.setObjectPropertyFlags o
obj String
"actions" [DragAction]
val
constructDropTargetActions :: (IsDropTarget o, MIO.MonadIO m) => [Gdk.Flags.DragAction] -> m (GValueConstruct o)
constructDropTargetActions :: forall o (m :: * -> *).
(IsDropTarget o, MonadIO m) =>
[DragAction] -> m (GValueConstruct o)
constructDropTargetActions [DragAction]
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 -> [DragAction] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"actions" [DragAction]
val
#if defined(ENABLE_OVERLOADING)
data DropTargetActionsPropertyInfo
instance AttrInfo DropTargetActionsPropertyInfo where
type AttrAllowedOps DropTargetActionsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DropTargetActionsPropertyInfo = IsDropTarget
type AttrSetTypeConstraint DropTargetActionsPropertyInfo = (~) [Gdk.Flags.DragAction]
type AttrTransferTypeConstraint DropTargetActionsPropertyInfo = (~) [Gdk.Flags.DragAction]
type AttrTransferType DropTargetActionsPropertyInfo = [Gdk.Flags.DragAction]
type AttrGetType DropTargetActionsPropertyInfo = [Gdk.Flags.DragAction]
type AttrLabel DropTargetActionsPropertyInfo = "actions"
type AttrOrigin DropTargetActionsPropertyInfo = DropTarget
attrGet = getDropTargetActions
attrSet = setDropTargetActions
attrTransfer _ v = do
return v
attrConstruct = constructDropTargetActions
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.actions"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:attr:actions"
})
#endif
getDropTargetCurrentDrop :: (MonadIO m, IsDropTarget o) => o -> m (Maybe Gdk.Drop.Drop)
getDropTargetCurrentDrop :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> m (Maybe Drop)
getDropTargetCurrentDrop o
obj = IO (Maybe Drop) -> m (Maybe Drop)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Drop) -> m (Maybe Drop))
-> IO (Maybe Drop) -> m (Maybe Drop)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Drop -> Drop) -> IO (Maybe Drop)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"current-drop" ManagedPtr Drop -> Drop
Gdk.Drop.Drop
#if defined(ENABLE_OVERLOADING)
data DropTargetCurrentDropPropertyInfo
instance AttrInfo DropTargetCurrentDropPropertyInfo where
type AttrAllowedOps DropTargetCurrentDropPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DropTargetCurrentDropPropertyInfo = IsDropTarget
type AttrSetTypeConstraint DropTargetCurrentDropPropertyInfo = (~) ()
type AttrTransferTypeConstraint DropTargetCurrentDropPropertyInfo = (~) ()
type AttrTransferType DropTargetCurrentDropPropertyInfo = ()
type AttrGetType DropTargetCurrentDropPropertyInfo = (Maybe Gdk.Drop.Drop)
type AttrLabel DropTargetCurrentDropPropertyInfo = "current-drop"
type AttrOrigin DropTargetCurrentDropPropertyInfo = DropTarget
attrGet = getDropTargetCurrentDrop
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.currentDrop"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:attr:currentDrop"
})
#endif
getDropTargetFormats :: (MonadIO m, IsDropTarget o) => o -> m (Maybe Gdk.ContentFormats.ContentFormats)
getDropTargetFormats :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> m (Maybe ContentFormats)
getDropTargetFormats o
obj = IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe ContentFormats) -> m (Maybe ContentFormats))
-> IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ContentFormats -> ContentFormats)
-> IO (Maybe ContentFormats)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"formats" ManagedPtr ContentFormats -> ContentFormats
Gdk.ContentFormats.ContentFormats
constructDropTargetFormats :: (IsDropTarget o, MIO.MonadIO m) => Gdk.ContentFormats.ContentFormats -> m (GValueConstruct o)
constructDropTargetFormats :: forall o (m :: * -> *).
(IsDropTarget o, MonadIO m) =>
ContentFormats -> m (GValueConstruct o)
constructDropTargetFormats ContentFormats
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 ContentFormats -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"formats" (ContentFormats -> Maybe ContentFormats
forall a. a -> Maybe a
P.Just ContentFormats
val)
#if defined(ENABLE_OVERLOADING)
data DropTargetFormatsPropertyInfo
instance AttrInfo DropTargetFormatsPropertyInfo where
type AttrAllowedOps DropTargetFormatsPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DropTargetFormatsPropertyInfo = IsDropTarget
type AttrSetTypeConstraint DropTargetFormatsPropertyInfo = (~) Gdk.ContentFormats.ContentFormats
type AttrTransferTypeConstraint DropTargetFormatsPropertyInfo = (~) Gdk.ContentFormats.ContentFormats
type AttrTransferType DropTargetFormatsPropertyInfo = Gdk.ContentFormats.ContentFormats
type AttrGetType DropTargetFormatsPropertyInfo = (Maybe Gdk.ContentFormats.ContentFormats)
type AttrLabel DropTargetFormatsPropertyInfo = "formats"
type AttrOrigin DropTargetFormatsPropertyInfo = DropTarget
attrGet = getDropTargetFormats
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDropTargetFormats
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.formats"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:attr:formats"
})
#endif
getDropTargetPreload :: (MonadIO m, IsDropTarget o) => o -> m Bool
getDropTargetPreload :: forall (m :: * -> *) o. (MonadIO m, IsDropTarget o) => o -> m Bool
getDropTargetPreload 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
"preload"
setDropTargetPreload :: (MonadIO m, IsDropTarget o) => o -> Bool -> m ()
setDropTargetPreload :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> Bool -> m ()
setDropTargetPreload 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
"preload" Bool
val
constructDropTargetPreload :: (IsDropTarget o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructDropTargetPreload :: forall o (m :: * -> *).
(IsDropTarget o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDropTargetPreload 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
"preload" Bool
val
#if defined(ENABLE_OVERLOADING)
data DropTargetPreloadPropertyInfo
instance AttrInfo DropTargetPreloadPropertyInfo where
type AttrAllowedOps DropTargetPreloadPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DropTargetPreloadPropertyInfo = IsDropTarget
type AttrSetTypeConstraint DropTargetPreloadPropertyInfo = (~) Bool
type AttrTransferTypeConstraint DropTargetPreloadPropertyInfo = (~) Bool
type AttrTransferType DropTargetPreloadPropertyInfo = Bool
type AttrGetType DropTargetPreloadPropertyInfo = Bool
type AttrLabel DropTargetPreloadPropertyInfo = "preload"
type AttrOrigin DropTargetPreloadPropertyInfo = DropTarget
attrGet = getDropTargetPreload
attrSet = setDropTargetPreload
attrTransfer _ v = do
return v
attrConstruct = constructDropTargetPreload
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.preload"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:attr:preload"
})
#endif
getDropTargetValue :: (MonadIO m, IsDropTarget o) => o -> m (Maybe GValue)
getDropTargetValue :: forall (m :: * -> *) o.
(MonadIO m, IsDropTarget o) =>
o -> m (Maybe GValue)
getDropTargetValue o
obj = IO (Maybe GValue) -> m (Maybe GValue)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe GValue) -> m (Maybe GValue))
-> IO (Maybe GValue) -> m (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe GValue)
forall a. GObject a => a -> String -> IO (Maybe GValue)
B.Properties.getObjectPropertyGValue o
obj String
"value"
#if defined(ENABLE_OVERLOADING)
data DropTargetValuePropertyInfo
instance AttrInfo DropTargetValuePropertyInfo where
type AttrAllowedOps DropTargetValuePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DropTargetValuePropertyInfo = IsDropTarget
type AttrSetTypeConstraint DropTargetValuePropertyInfo = (~) ()
type AttrTransferTypeConstraint DropTargetValuePropertyInfo = (~) ()
type AttrTransferType DropTargetValuePropertyInfo = ()
type AttrGetType DropTargetValuePropertyInfo = (Maybe GValue)
type AttrLabel DropTargetValuePropertyInfo = "value"
type AttrOrigin DropTargetValuePropertyInfo = DropTarget
attrGet = getDropTargetValue
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.value"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#g:attr:value"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DropTarget
type instance O.AttributeList DropTarget = DropTargetAttributeList
type DropTargetAttributeList = ('[ '("actions", DropTargetActionsPropertyInfo), '("currentDrop", DropTargetCurrentDropPropertyInfo), '("formats", DropTargetFormatsPropertyInfo), '("name", Gtk.EventController.EventControllerNamePropertyInfo), '("preload", DropTargetPreloadPropertyInfo), '("propagationLimit", Gtk.EventController.EventControllerPropagationLimitPropertyInfo), '("propagationPhase", Gtk.EventController.EventControllerPropagationPhasePropertyInfo), '("value", DropTargetValuePropertyInfo), '("widget", Gtk.EventController.EventControllerWidgetPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
dropTargetActions :: AttrLabelProxy "actions"
dropTargetActions = AttrLabelProxy
dropTargetCurrentDrop :: AttrLabelProxy "currentDrop"
dropTargetCurrentDrop = AttrLabelProxy
dropTargetFormats :: AttrLabelProxy "formats"
dropTargetFormats = AttrLabelProxy
dropTargetPreload :: AttrLabelProxy "preload"
dropTargetPreload = AttrLabelProxy
dropTargetValue :: AttrLabelProxy "value"
dropTargetValue = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DropTarget = DropTargetSignalList
type DropTargetSignalList = ('[ '("accept", DropTargetAcceptSignalInfo), '("drop", DropTargetDropSignalInfo), '("enter", DropTargetEnterSignalInfo), '("leave", DropTargetLeaveSignalInfo), '("motion", DropTargetMotionSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_drop_target_new" gtk_drop_target_new ::
CGType ->
CUInt ->
IO (Ptr DropTarget)
dropTargetNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
GType
-> [Gdk.Flags.DragAction]
-> m DropTarget
dropTargetNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
GType -> [DragAction] -> m DropTarget
dropTargetNew GType
type_ [DragAction]
actions = IO DropTarget -> m DropTarget
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DropTarget -> m DropTarget) -> IO DropTarget -> m DropTarget
forall a b. (a -> b) -> a -> b
$ do
let type_' :: CGType
type_' = GType -> CGType
gtypeToCGType GType
type_
let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
Ptr DropTarget
result <- CGType -> CUInt -> IO (Ptr DropTarget)
gtk_drop_target_new CGType
type_' CUInt
actions'
Text -> Ptr DropTarget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dropTargetNew" Ptr DropTarget
result
DropTarget
result' <- ((ManagedPtr DropTarget -> DropTarget)
-> Ptr DropTarget -> IO DropTarget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DropTarget -> DropTarget
DropTarget) Ptr DropTarget
result
DropTarget -> IO DropTarget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DropTarget
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_drop_target_get_actions" gtk_drop_target_get_actions ::
Ptr DropTarget ->
IO CUInt
dropTargetGetActions ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m [Gdk.Flags.DragAction]
dropTargetGetActions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m [DragAction]
dropTargetGetActions a
self = IO [DragAction] -> m [DragAction]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DragAction] -> m [DragAction])
-> IO [DragAction] -> m [DragAction]
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CUInt
result <- Ptr DropTarget -> IO CUInt
gtk_drop_target_get_actions Ptr DropTarget
self'
let result' :: [DragAction]
result' = CUInt -> [DragAction]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
[DragAction] -> IO [DragAction]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DragAction]
result'
#if defined(ENABLE_OVERLOADING)
data DropTargetGetActionsMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetActionsMethodInfo a signature where
overloadedMethod = dropTargetGetActions
instance O.OverloadedMethodInfo DropTargetGetActionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetActions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetActions"
})
#endif
foreign import ccall "gtk_drop_target_get_current_drop" gtk_drop_target_get_current_drop ::
Ptr DropTarget ->
IO (Ptr Gdk.Drop.Drop)
dropTargetGetCurrentDrop ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m (Maybe Gdk.Drop.Drop)
dropTargetGetCurrentDrop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m (Maybe Drop)
dropTargetGetCurrentDrop a
self = IO (Maybe Drop) -> m (Maybe Drop)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Drop) -> m (Maybe Drop))
-> IO (Maybe Drop) -> m (Maybe Drop)
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Drop
result <- Ptr DropTarget -> IO (Ptr Drop)
gtk_drop_target_get_current_drop Ptr DropTarget
self'
Maybe Drop
maybeResult <- Ptr Drop -> (Ptr Drop -> IO Drop) -> IO (Maybe Drop)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Drop
result ((Ptr Drop -> IO Drop) -> IO (Maybe Drop))
-> (Ptr Drop -> IO Drop) -> IO (Maybe Drop)
forall a b. (a -> b) -> a -> b
$ \Ptr Drop
result' -> do
Drop
result'' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
result'
Drop -> IO Drop
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Drop
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Drop -> IO (Maybe Drop)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Drop
maybeResult
#if defined(ENABLE_OVERLOADING)
data DropTargetGetCurrentDropMethodInfo
instance (signature ~ (m (Maybe Gdk.Drop.Drop)), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetCurrentDropMethodInfo a signature where
overloadedMethod = dropTargetGetCurrentDrop
instance O.OverloadedMethodInfo DropTargetGetCurrentDropMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetCurrentDrop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetCurrentDrop"
})
#endif
foreign import ccall "gtk_drop_target_get_drop" gtk_drop_target_get_drop ::
Ptr DropTarget ->
IO (Ptr Gdk.Drop.Drop)
{-# DEPRECATED dropTargetGetDrop ["(Since version 4.4)","Use 'GI.Gtk.Objects.DropTarget.dropTargetGetCurrentDrop' instead"] #-}
dropTargetGetDrop ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m (Maybe Gdk.Drop.Drop)
dropTargetGetDrop :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m (Maybe Drop)
dropTargetGetDrop a
self = IO (Maybe Drop) -> m (Maybe Drop)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Drop) -> m (Maybe Drop))
-> IO (Maybe Drop) -> m (Maybe Drop)
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Drop
result <- Ptr DropTarget -> IO (Ptr Drop)
gtk_drop_target_get_drop Ptr DropTarget
self'
Maybe Drop
maybeResult <- Ptr Drop -> (Ptr Drop -> IO Drop) -> IO (Maybe Drop)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Drop
result ((Ptr Drop -> IO Drop) -> IO (Maybe Drop))
-> (Ptr Drop -> IO Drop) -> IO (Maybe Drop)
forall a b. (a -> b) -> a -> b
$ \Ptr Drop
result' -> do
Drop
result'' <- ((ManagedPtr Drop -> Drop) -> Ptr Drop -> IO Drop
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Drop -> Drop
Gdk.Drop.Drop) Ptr Drop
result'
Drop -> IO Drop
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Drop
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Drop -> IO (Maybe Drop)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Drop
maybeResult
#if defined(ENABLE_OVERLOADING)
data DropTargetGetDropMethodInfo
instance (signature ~ (m (Maybe Gdk.Drop.Drop)), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetDropMethodInfo a signature where
overloadedMethod = dropTargetGetDrop
instance O.OverloadedMethodInfo DropTargetGetDropMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetDrop",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetDrop"
})
#endif
foreign import ccall "gtk_drop_target_get_formats" gtk_drop_target_get_formats ::
Ptr DropTarget ->
IO (Ptr Gdk.ContentFormats.ContentFormats)
dropTargetGetFormats ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m (Maybe Gdk.ContentFormats.ContentFormats)
dropTargetGetFormats :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m (Maybe ContentFormats)
dropTargetGetFormats a
self = IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ContentFormats) -> m (Maybe ContentFormats))
-> IO (Maybe ContentFormats) -> m (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr ContentFormats
result <- Ptr DropTarget -> IO (Ptr ContentFormats)
gtk_drop_target_get_formats Ptr DropTarget
self'
Maybe ContentFormats
maybeResult <- Ptr ContentFormats
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ContentFormats
result ((Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats))
-> (Ptr ContentFormats -> IO ContentFormats)
-> IO (Maybe ContentFormats)
forall a b. (a -> b) -> a -> b
$ \Ptr ContentFormats
result' -> do
ContentFormats
result'' <- ((ManagedPtr ContentFormats -> ContentFormats)
-> Ptr ContentFormats -> IO ContentFormats
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr ContentFormats -> ContentFormats
Gdk.ContentFormats.ContentFormats) Ptr ContentFormats
result'
ContentFormats -> IO ContentFormats
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ContentFormats
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe ContentFormats -> IO (Maybe ContentFormats)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ContentFormats
maybeResult
#if defined(ENABLE_OVERLOADING)
data DropTargetGetFormatsMethodInfo
instance (signature ~ (m (Maybe Gdk.ContentFormats.ContentFormats)), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetFormatsMethodInfo a signature where
overloadedMethod = dropTargetGetFormats
instance O.OverloadedMethodInfo DropTargetGetFormatsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetFormats",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetFormats"
})
#endif
foreign import ccall "gtk_drop_target_get_gtypes" gtk_drop_target_get_gtypes ::
Ptr DropTarget ->
Ptr Word64 ->
IO (Ptr CGType)
dropTargetGetGtypes ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m (Maybe [GType])
dropTargetGetGtypes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m (Maybe [GType])
dropTargetGetGtypes a
self = IO (Maybe [GType]) -> m (Maybe [GType])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [GType]) -> m (Maybe [GType]))
-> IO (Maybe [GType]) -> m (Maybe [GType])
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CGType
nTypes <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CGType
result <- Ptr DropTarget -> Ptr CGType -> IO (Ptr CGType)
gtk_drop_target_get_gtypes Ptr DropTarget
self' Ptr CGType
nTypes
CGType
nTypes' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
nTypes
Maybe [GType]
maybeResult <- Ptr CGType -> (Ptr CGType -> IO [GType]) -> IO (Maybe [GType])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CGType
result ((Ptr CGType -> IO [GType]) -> IO (Maybe [GType]))
-> (Ptr CGType -> IO [GType]) -> IO (Maybe [GType])
forall a b. (a -> b) -> a -> b
$ \Ptr CGType
result' -> do
[GType]
result'' <- ((CGType -> GType) -> CGType -> Ptr CGType -> IO [GType]
forall a b c.
(Integral a, Storable b) =>
(b -> c) -> a -> Ptr b -> IO [c]
unpackMapStorableArrayWithLength CGType -> GType
GType CGType
nTypes') Ptr CGType
result'
[GType] -> IO [GType]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [GType]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
nTypes
Maybe [GType] -> IO (Maybe [GType])
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [GType]
maybeResult
#if defined(ENABLE_OVERLOADING)
data DropTargetGetGtypesMethodInfo
instance (signature ~ (m (Maybe [GType])), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetGtypesMethodInfo a signature where
overloadedMethod = dropTargetGetGtypes
instance O.OverloadedMethodInfo DropTargetGetGtypesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetGtypes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetGtypes"
})
#endif
foreign import ccall "gtk_drop_target_get_preload" gtk_drop_target_get_preload ::
Ptr DropTarget ->
IO CInt
dropTargetGetPreload ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m Bool
dropTargetGetPreload :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m Bool
dropTargetGetPreload 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 DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr DropTarget -> IO CInt
gtk_drop_target_get_preload Ptr DropTarget
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 DropTargetGetPreloadMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetPreloadMethodInfo a signature where
overloadedMethod = dropTargetGetPreload
instance O.OverloadedMethodInfo DropTargetGetPreloadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetPreload",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetPreload"
})
#endif
foreign import ccall "gtk_drop_target_get_value" gtk_drop_target_get_value ::
Ptr DropTarget ->
IO (Ptr GValue)
dropTargetGetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m (Maybe GValue)
dropTargetGetValue :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m (Maybe GValue)
dropTargetGetValue a
self = IO (Maybe GValue) -> m (Maybe GValue)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GValue) -> m (Maybe GValue))
-> IO (Maybe GValue) -> m (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ do
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr GValue
result <- Ptr DropTarget -> IO (Ptr GValue)
gtk_drop_target_get_value Ptr DropTarget
self'
Maybe GValue
maybeResult <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr GValue
result ((Ptr GValue -> IO GValue) -> IO (Maybe GValue))
-> (Ptr GValue -> IO GValue) -> IO (Maybe GValue)
forall a b. (a -> b) -> a -> b
$ \Ptr GValue
result' -> do
GValue
result'' <- Ptr GValue -> IO GValue
B.GValue.newGValueFromPtr Ptr GValue
result'
GValue -> IO GValue
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GValue
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe GValue -> IO (Maybe GValue)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GValue
maybeResult
#if defined(ENABLE_OVERLOADING)
data DropTargetGetValueMethodInfo
instance (signature ~ (m (Maybe GValue)), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetGetValueMethodInfo a signature where
overloadedMethod = dropTargetGetValue
instance O.OverloadedMethodInfo DropTargetGetValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetGetValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetGetValue"
})
#endif
foreign import ccall "gtk_drop_target_reject" gtk_drop_target_reject ::
Ptr DropTarget ->
IO ()
dropTargetReject ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> m ()
dropTargetReject :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> m ()
dropTargetReject a
self = 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 DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr DropTarget -> IO ()
gtk_drop_target_reject Ptr DropTarget
self'
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 DropTargetRejectMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetRejectMethodInfo a signature where
overloadedMethod = dropTargetReject
instance O.OverloadedMethodInfo DropTargetRejectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetReject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetReject"
})
#endif
foreign import ccall "gtk_drop_target_set_actions" gtk_drop_target_set_actions ::
Ptr DropTarget ->
CUInt ->
IO ()
dropTargetSetActions ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> [Gdk.Flags.DragAction]
-> m ()
dropTargetSetActions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> [DragAction] -> m ()
dropTargetSetActions a
self [DragAction]
actions = 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 DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let actions' :: CUInt
actions' = [DragAction] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DragAction]
actions
Ptr DropTarget -> CUInt -> IO ()
gtk_drop_target_set_actions Ptr DropTarget
self' CUInt
actions'
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 DropTargetSetActionsMethodInfo
instance (signature ~ ([Gdk.Flags.DragAction] -> m ()), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetSetActionsMethodInfo a signature where
overloadedMethod = dropTargetSetActions
instance O.OverloadedMethodInfo DropTargetSetActionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetSetActions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetSetActions"
})
#endif
foreign import ccall "gtk_drop_target_set_gtypes" gtk_drop_target_set_gtypes ::
Ptr DropTarget ->
Ptr CGType ->
Word64 ->
IO ()
dropTargetSetGtypes ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> Maybe ([GType])
-> m ()
dropTargetSetGtypes :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> Maybe [GType] -> m ()
dropTargetSetGtypes a
self Maybe [GType]
types = 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
let nTypes :: CGType
nTypes = case Maybe [GType]
types of
Maybe [GType]
Nothing -> CGType
0
Just [GType]
jTypes -> Int -> CGType
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CGType) -> Int -> CGType
forall a b. (a -> b) -> a -> b
$ [GType] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [GType]
jTypes
Ptr DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr CGType
maybeTypes <- case Maybe [GType]
types of
Maybe [GType]
Nothing -> Ptr CGType -> IO (Ptr CGType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CGType
forall a. Ptr a
nullPtr
Just [GType]
jTypes -> do
Ptr CGType
jTypes' <- ((GType -> CGType) -> [GType] -> IO (Ptr CGType)
forall a b. Storable b => (a -> b) -> [a] -> IO (Ptr b)
packMapStorableArray GType -> CGType
gtypeToCGType) [GType]
jTypes
Ptr CGType -> IO (Ptr CGType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CGType
jTypes'
Ptr DropTarget -> Ptr CGType -> CGType -> IO ()
gtk_drop_target_set_gtypes Ptr DropTarget
self' Ptr CGType
maybeTypes CGType
nTypes
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
maybeTypes
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DropTargetSetGtypesMethodInfo
instance (signature ~ (Maybe ([GType]) -> m ()), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetSetGtypesMethodInfo a signature where
overloadedMethod = dropTargetSetGtypes
instance O.OverloadedMethodInfo DropTargetSetGtypesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetSetGtypes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetSetGtypes"
})
#endif
foreign import ccall "gtk_drop_target_set_preload" gtk_drop_target_set_preload ::
Ptr DropTarget ->
CInt ->
IO ()
dropTargetSetPreload ::
(B.CallStack.HasCallStack, MonadIO m, IsDropTarget a) =>
a
-> Bool
-> m ()
dropTargetSetPreload :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDropTarget a) =>
a -> Bool -> m ()
dropTargetSetPreload a
self Bool
preload = 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 DropTarget
self' <- a -> IO (Ptr DropTarget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let preload' :: CInt
preload' = (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
preload
Ptr DropTarget -> CInt -> IO ()
gtk_drop_target_set_preload Ptr DropTarget
self' CInt
preload'
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 DropTargetSetPreloadMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDropTarget a) => O.OverloadedMethod DropTargetSetPreloadMethodInfo a signature where
overloadedMethod = dropTargetSetPreload
instance O.OverloadedMethodInfo DropTargetSetPreloadMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.DropTarget.dropTargetSetPreload",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.6/docs/GI-Gtk-Objects-DropTarget.html#v:dropTargetSetPreload"
})
#endif