gi-gdk-3.0.18: GI/Gdk/Objects/DragContext.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
/No description available in the introspection data./
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gdk.Objects.DragContext
(
-- * Exported types
DragContext(..) ,
IsDragContext ,
toDragContext ,
noDragContext ,
-- * Methods
-- ** getActions #method:getActions#
#if ENABLE_OVERLOADING
DragContextGetActionsMethodInfo ,
#endif
dragContextGetActions ,
-- ** getDestWindow #method:getDestWindow#
#if ENABLE_OVERLOADING
DragContextGetDestWindowMethodInfo ,
#endif
dragContextGetDestWindow ,
-- ** getDevice #method:getDevice#
#if ENABLE_OVERLOADING
DragContextGetDeviceMethodInfo ,
#endif
dragContextGetDevice ,
-- ** getDragWindow #method:getDragWindow#
#if ENABLE_OVERLOADING
DragContextGetDragWindowMethodInfo ,
#endif
dragContextGetDragWindow ,
-- ** getProtocol #method:getProtocol#
#if ENABLE_OVERLOADING
DragContextGetProtocolMethodInfo ,
#endif
dragContextGetProtocol ,
-- ** getSelectedAction #method:getSelectedAction#
#if ENABLE_OVERLOADING
DragContextGetSelectedActionMethodInfo ,
#endif
dragContextGetSelectedAction ,
-- ** getSourceWindow #method:getSourceWindow#
#if ENABLE_OVERLOADING
DragContextGetSourceWindowMethodInfo ,
#endif
dragContextGetSourceWindow ,
-- ** getSuggestedAction #method:getSuggestedAction#
#if ENABLE_OVERLOADING
DragContextGetSuggestedActionMethodInfo ,
#endif
dragContextGetSuggestedAction ,
-- ** listTargets #method:listTargets#
#if ENABLE_OVERLOADING
DragContextListTargetsMethodInfo ,
#endif
dragContextListTargets ,
-- ** manageDnd #method:manageDnd#
#if ENABLE_OVERLOADING
DragContextManageDndMethodInfo ,
#endif
dragContextManageDnd ,
-- ** setDevice #method:setDevice#
#if ENABLE_OVERLOADING
DragContextSetDeviceMethodInfo ,
#endif
dragContextSetDevice ,
-- ** setHotspot #method:setHotspot#
#if ENABLE_OVERLOADING
DragContextSetHotspotMethodInfo ,
#endif
dragContextSetHotspot ,
-- * Signals
-- ** actionChanged #signal:actionChanged#
C_DragContextActionChangedCallback ,
DragContextActionChangedCallback ,
#if ENABLE_OVERLOADING
DragContextActionChangedSignalInfo ,
#endif
afterDragContextActionChanged ,
genClosure_DragContextActionChanged ,
mk_DragContextActionChangedCallback ,
noDragContextActionChangedCallback ,
onDragContextActionChanged ,
wrap_DragContextActionChangedCallback ,
-- ** cancel #signal:cancel#
C_DragContextCancelCallback ,
DragContextCancelCallback ,
#if ENABLE_OVERLOADING
DragContextCancelSignalInfo ,
#endif
afterDragContextCancel ,
genClosure_DragContextCancel ,
mk_DragContextCancelCallback ,
noDragContextCancelCallback ,
onDragContextCancel ,
wrap_DragContextCancelCallback ,
-- ** dndFinished #signal:dndFinished#
C_DragContextDndFinishedCallback ,
DragContextDndFinishedCallback ,
#if ENABLE_OVERLOADING
DragContextDndFinishedSignalInfo ,
#endif
afterDragContextDndFinished ,
genClosure_DragContextDndFinished ,
mk_DragContextDndFinishedCallback ,
noDragContextDndFinishedCallback ,
onDragContextDndFinished ,
wrap_DragContextDndFinishedCallback ,
-- ** dropPerformed #signal:dropPerformed#
C_DragContextDropPerformedCallback ,
DragContextDropPerformedCallback ,
#if ENABLE_OVERLOADING
DragContextDropPerformedSignalInfo ,
#endif
afterDragContextDropPerformed ,
genClosure_DragContextDropPerformed ,
mk_DragContextDropPerformedCallback ,
noDragContextDropPerformedCallback ,
onDragContextDropPerformed ,
wrap_DragContextDropPerformedCallback ,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gdk.Enums as Gdk.Enums
import {-# SOURCE #-} qualified GI.Gdk.Flags as Gdk.Flags
import {-# SOURCE #-} qualified GI.Gdk.Objects.Device as Gdk.Device
import {-# SOURCE #-} qualified GI.Gdk.Objects.Window as Gdk.Window
import {-# SOURCE #-} qualified GI.Gdk.Structs.Atom as Gdk.Atom
-- | Memory-managed wrapper type.
newtype DragContext = DragContext (ManagedPtr DragContext)
foreign import ccall "gdk_drag_context_get_type"
c_gdk_drag_context_get_type :: IO GType
instance GObject DragContext where
gobjectType = c_gdk_drag_context_get_type
-- | Type class for types which can be safely cast to `DragContext`, for instance with `toDragContext`.
class (GObject o, O.IsDescendantOf DragContext o) => IsDragContext o
instance (GObject o, O.IsDescendantOf DragContext o) => IsDragContext o
instance O.HasParentTypes DragContext
type instance O.ParentTypes DragContext = '[GObject.Object.Object]
-- | Cast to `DragContext`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDragContext :: (MonadIO m, IsDragContext o) => o -> m DragContext
toDragContext = liftIO . unsafeCastTo DragContext
-- | A convenience alias for `Nothing` :: `Maybe` `DragContext`.
noDragContext :: Maybe DragContext
noDragContext = Nothing
#if ENABLE_OVERLOADING
type family ResolveDragContextMethod (t :: Symbol) (o :: *) :: * where
ResolveDragContextMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDragContextMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDragContextMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDragContextMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDragContextMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDragContextMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDragContextMethod "listTargets" o = DragContextListTargetsMethodInfo
ResolveDragContextMethod "manageDnd" o = DragContextManageDndMethodInfo
ResolveDragContextMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDragContextMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDragContextMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDragContextMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDragContextMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDragContextMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDragContextMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDragContextMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDragContextMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDragContextMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDragContextMethod "getActions" o = DragContextGetActionsMethodInfo
ResolveDragContextMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDragContextMethod "getDestWindow" o = DragContextGetDestWindowMethodInfo
ResolveDragContextMethod "getDevice" o = DragContextGetDeviceMethodInfo
ResolveDragContextMethod "getDragWindow" o = DragContextGetDragWindowMethodInfo
ResolveDragContextMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDragContextMethod "getProtocol" o = DragContextGetProtocolMethodInfo
ResolveDragContextMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDragContextMethod "getSelectedAction" o = DragContextGetSelectedActionMethodInfo
ResolveDragContextMethod "getSourceWindow" o = DragContextGetSourceWindowMethodInfo
ResolveDragContextMethod "getSuggestedAction" o = DragContextGetSuggestedActionMethodInfo
ResolveDragContextMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDragContextMethod "setDevice" o = DragContextSetDeviceMethodInfo
ResolveDragContextMethod "setHotspot" o = DragContextSetHotspotMethodInfo
ResolveDragContextMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDragContextMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDragContextMethod t DragContext, O.MethodInfo info DragContext p) => OL.IsLabel t (DragContext -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
-- signal DragContext::action-changed
{- |
A new action is being chosen for the drag and drop operation.
This signal will only be emitted if the 'GI.Gdk.Objects.DragContext.DragContext' manages
the drag and drop operation. See 'GI.Gdk.Objects.DragContext.dragContextManageDnd'
for more information.
/Since: 3.20/
-}
type DragContextActionChangedCallback =
[Gdk.Flags.DragAction]
{- ^ /@action@/: The action currently chosen -}
-> IO ()
-- | A convenience synonym for @`Nothing` :: `Maybe` `DragContextActionChangedCallback`@.
noDragContextActionChangedCallback :: Maybe DragContextActionChangedCallback
noDragContextActionChangedCallback = Nothing
-- | Type for the callback on the (unwrapped) C side.
type C_DragContextActionChangedCallback =
Ptr () -> -- object
CUInt ->
Ptr () -> -- user_data
IO ()
-- | Generate a function pointer callable from C code, from a `C_DragContextActionChangedCallback`.
foreign import ccall "wrapper"
mk_DragContextActionChangedCallback :: C_DragContextActionChangedCallback -> IO (FunPtr C_DragContextActionChangedCallback)
-- | Wrap the callback into a `GClosure`.
genClosure_DragContextActionChanged :: MonadIO m => DragContextActionChangedCallback -> m (GClosure C_DragContextActionChangedCallback)
genClosure_DragContextActionChanged cb = liftIO $ do
let cb' = wrap_DragContextActionChangedCallback cb
mk_DragContextActionChangedCallback cb' >>= B.GClosure.newGClosure
-- | Wrap a `DragContextActionChangedCallback` into a `C_DragContextActionChangedCallback`.
wrap_DragContextActionChangedCallback ::
DragContextActionChangedCallback ->
C_DragContextActionChangedCallback
wrap_DragContextActionChangedCallback _cb _ action _ = do
let action' = wordToGFlags action
_cb action'
{- |
Connect a signal handler for the “@action-changed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.on' dragContext #actionChanged callback
@
-}
onDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
onDragContextActionChanged obj cb = liftIO $ do
let cb' = wrap_DragContextActionChangedCallback cb
cb'' <- mk_DragContextActionChangedCallback cb'
connectSignalFunPtr obj "action-changed" cb'' SignalConnectBefore
{- |
Connect a signal handler for the “@action-changed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.after' dragContext #actionChanged callback
@
-}
afterDragContextActionChanged :: (IsDragContext a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
afterDragContextActionChanged obj cb = liftIO $ do
let cb' = wrap_DragContextActionChangedCallback cb
cb'' <- mk_DragContextActionChangedCallback cb'
connectSignalFunPtr obj "action-changed" cb'' SignalConnectAfter
-- signal DragContext::cancel
{- |
The drag and drop operation was cancelled.
This signal will only be emitted if the 'GI.Gdk.Objects.DragContext.DragContext' manages
the drag and drop operation. See 'GI.Gdk.Objects.DragContext.dragContextManageDnd'
for more information.
/Since: 3.20/
-}
type DragContextCancelCallback =
Gdk.Enums.DragCancelReason
{- ^ /@reason@/: The reason the context was cancelled -}
-> IO ()
-- | A convenience synonym for @`Nothing` :: `Maybe` `DragContextCancelCallback`@.
noDragContextCancelCallback :: Maybe DragContextCancelCallback
noDragContextCancelCallback = Nothing
-- | Type for the callback on the (unwrapped) C side.
type C_DragContextCancelCallback =
Ptr () -> -- object
CUInt ->
Ptr () -> -- user_data
IO ()
-- | Generate a function pointer callable from C code, from a `C_DragContextCancelCallback`.
foreign import ccall "wrapper"
mk_DragContextCancelCallback :: C_DragContextCancelCallback -> IO (FunPtr C_DragContextCancelCallback)
-- | Wrap the callback into a `GClosure`.
genClosure_DragContextCancel :: MonadIO m => DragContextCancelCallback -> m (GClosure C_DragContextCancelCallback)
genClosure_DragContextCancel cb = liftIO $ do
let cb' = wrap_DragContextCancelCallback cb
mk_DragContextCancelCallback cb' >>= B.GClosure.newGClosure
-- | Wrap a `DragContextCancelCallback` into a `C_DragContextCancelCallback`.
wrap_DragContextCancelCallback ::
DragContextCancelCallback ->
C_DragContextCancelCallback
wrap_DragContextCancelCallback _cb _ reason _ = do
let reason' = (toEnum . fromIntegral) reason
_cb reason'
{- |
Connect a signal handler for the “@cancel@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.on' dragContext #cancel callback
@
-}
onDragContextCancel :: (IsDragContext a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
onDragContextCancel obj cb = liftIO $ do
let cb' = wrap_DragContextCancelCallback cb
cb'' <- mk_DragContextCancelCallback cb'
connectSignalFunPtr obj "cancel" cb'' SignalConnectBefore
{- |
Connect a signal handler for the “@cancel@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.after' dragContext #cancel callback
@
-}
afterDragContextCancel :: (IsDragContext a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
afterDragContextCancel obj cb = liftIO $ do
let cb' = wrap_DragContextCancelCallback cb
cb'' <- mk_DragContextCancelCallback cb'
connectSignalFunPtr obj "cancel" cb'' SignalConnectAfter
-- signal DragContext::dnd-finished
{- |
The drag and drop operation was finished, the drag destination
finished reading all data. The drag source can now free all
miscellaneous data.
This signal will only be emitted if the 'GI.Gdk.Objects.DragContext.DragContext' manages
the drag and drop operation. See 'GI.Gdk.Objects.DragContext.dragContextManageDnd'
for more information.
/Since: 3.20/
-}
type DragContextDndFinishedCallback =
IO ()
-- | A convenience synonym for @`Nothing` :: `Maybe` `DragContextDndFinishedCallback`@.
noDragContextDndFinishedCallback :: Maybe DragContextDndFinishedCallback
noDragContextDndFinishedCallback = Nothing
-- | Type for the callback on the (unwrapped) C side.
type C_DragContextDndFinishedCallback =
Ptr () -> -- object
Ptr () -> -- user_data
IO ()
-- | Generate a function pointer callable from C code, from a `C_DragContextDndFinishedCallback`.
foreign import ccall "wrapper"
mk_DragContextDndFinishedCallback :: C_DragContextDndFinishedCallback -> IO (FunPtr C_DragContextDndFinishedCallback)
-- | Wrap the callback into a `GClosure`.
genClosure_DragContextDndFinished :: MonadIO m => DragContextDndFinishedCallback -> m (GClosure C_DragContextDndFinishedCallback)
genClosure_DragContextDndFinished cb = liftIO $ do
let cb' = wrap_DragContextDndFinishedCallback cb
mk_DragContextDndFinishedCallback cb' >>= B.GClosure.newGClosure
-- | Wrap a `DragContextDndFinishedCallback` into a `C_DragContextDndFinishedCallback`.
wrap_DragContextDndFinishedCallback ::
DragContextDndFinishedCallback ->
C_DragContextDndFinishedCallback
wrap_DragContextDndFinishedCallback _cb _ _ = do
_cb
{- |
Connect a signal handler for the “@dnd-finished@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.on' dragContext #dndFinished callback
@
-}
onDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
onDragContextDndFinished obj cb = liftIO $ do
let cb' = wrap_DragContextDndFinishedCallback cb
cb'' <- mk_DragContextDndFinishedCallback cb'
connectSignalFunPtr obj "dnd-finished" cb'' SignalConnectBefore
{- |
Connect a signal handler for the “@dnd-finished@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.after' dragContext #dndFinished callback
@
-}
afterDragContextDndFinished :: (IsDragContext a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
afterDragContextDndFinished obj cb = liftIO $ do
let cb' = wrap_DragContextDndFinishedCallback cb
cb'' <- mk_DragContextDndFinishedCallback cb'
connectSignalFunPtr obj "dnd-finished" cb'' SignalConnectAfter
-- signal DragContext::drop-performed
{- |
The drag and drop operation was performed on an accepting client.
This signal will only be emitted if the 'GI.Gdk.Objects.DragContext.DragContext' manages
the drag and drop operation. See 'GI.Gdk.Objects.DragContext.dragContextManageDnd'
for more information.
/Since: 3.20/
-}
type DragContextDropPerformedCallback =
Int32
{- ^ /@time@/: the time at which the drop happened. -}
-> IO ()
-- | A convenience synonym for @`Nothing` :: `Maybe` `DragContextDropPerformedCallback`@.
noDragContextDropPerformedCallback :: Maybe DragContextDropPerformedCallback
noDragContextDropPerformedCallback = Nothing
-- | Type for the callback on the (unwrapped) C side.
type C_DragContextDropPerformedCallback =
Ptr () -> -- object
Int32 ->
Ptr () -> -- user_data
IO ()
-- | Generate a function pointer callable from C code, from a `C_DragContextDropPerformedCallback`.
foreign import ccall "wrapper"
mk_DragContextDropPerformedCallback :: C_DragContextDropPerformedCallback -> IO (FunPtr C_DragContextDropPerformedCallback)
-- | Wrap the callback into a `GClosure`.
genClosure_DragContextDropPerformed :: MonadIO m => DragContextDropPerformedCallback -> m (GClosure C_DragContextDropPerformedCallback)
genClosure_DragContextDropPerformed cb = liftIO $ do
let cb' = wrap_DragContextDropPerformedCallback cb
mk_DragContextDropPerformedCallback cb' >>= B.GClosure.newGClosure
-- | Wrap a `DragContextDropPerformedCallback` into a `C_DragContextDropPerformedCallback`.
wrap_DragContextDropPerformedCallback ::
DragContextDropPerformedCallback ->
C_DragContextDropPerformedCallback
wrap_DragContextDropPerformedCallback _cb _ time _ = do
_cb time
{- |
Connect a signal handler for the “@drop-performed@” signal, to be run before the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.on' dragContext #dropPerformed callback
@
-}
onDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
onDragContextDropPerformed obj cb = liftIO $ do
let cb' = wrap_DragContextDropPerformedCallback cb
cb'' <- mk_DragContextDropPerformedCallback cb'
connectSignalFunPtr obj "drop-performed" cb'' SignalConnectBefore
{- |
Connect a signal handler for the “@drop-performed@” signal, to be run after the default handler.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Signals.after' dragContext #dropPerformed callback
@
-}
afterDragContextDropPerformed :: (IsDragContext a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
afterDragContextDropPerformed obj cb = liftIO $ do
let cb' = wrap_DragContextDropPerformedCallback cb
cb'' <- mk_DragContextDropPerformedCallback cb'
connectSignalFunPtr obj "drop-performed" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList DragContext
type instance O.AttributeList DragContext = DragContextAttributeList
type DragContextAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data DragContextActionChangedSignalInfo
instance SignalInfo DragContextActionChangedSignalInfo where
type HaskellCallbackType DragContextActionChangedSignalInfo = DragContextActionChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DragContextActionChangedCallback cb
cb'' <- mk_DragContextActionChangedCallback cb'
connectSignalFunPtr obj "action-changed" cb'' connectMode
data DragContextCancelSignalInfo
instance SignalInfo DragContextCancelSignalInfo where
type HaskellCallbackType DragContextCancelSignalInfo = DragContextCancelCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DragContextCancelCallback cb
cb'' <- mk_DragContextCancelCallback cb'
connectSignalFunPtr obj "cancel" cb'' connectMode
data DragContextDndFinishedSignalInfo
instance SignalInfo DragContextDndFinishedSignalInfo where
type HaskellCallbackType DragContextDndFinishedSignalInfo = DragContextDndFinishedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DragContextDndFinishedCallback cb
cb'' <- mk_DragContextDndFinishedCallback cb'
connectSignalFunPtr obj "dnd-finished" cb'' connectMode
data DragContextDropPerformedSignalInfo
instance SignalInfo DragContextDropPerformedSignalInfo where
type HaskellCallbackType DragContextDropPerformedSignalInfo = DragContextDropPerformedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DragContextDropPerformedCallback cb
cb'' <- mk_DragContextDropPerformedCallback cb'
connectSignalFunPtr obj "drop-performed" cb'' connectMode
type instance O.SignalList DragContext = DragContextSignalList
type DragContextSignalList = ('[ '("actionChanged", DragContextActionChangedSignalInfo), '("cancel", DragContextCancelSignalInfo), '("dndFinished", DragContextDndFinishedSignalInfo), '("dropPerformed", DragContextDropPerformedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
-- method DragContext::get_actions
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "DragAction"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_actions" gdk_drag_context_get_actions ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO CUInt
{- |
Determines the bitmask of actions proposed by the source if
'GI.Gdk.Objects.DragContext.dragContextGetSuggestedAction' returns 'GI.Gdk.Flags.DragActionAsk'.
/Since: 2.22/
-}
dragContextGetActions ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m [Gdk.Flags.DragAction]
{- ^ __Returns:__ the 'GI.Gdk.Flags.DragAction' flags -}
dragContextGetActions context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_actions context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetActionsMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetActionsMethodInfo a signature where
overloadedMethod _ = dragContextGetActions
#endif
-- method DragContext::get_dest_window
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_dest_window" gdk_drag_context_get_dest_window ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO (Ptr Gdk.Window.Window)
{- |
Returns the destination window for the DND operation.
/Since: 3.0/
-}
dragContextGetDestWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m Gdk.Window.Window
{- ^ __Returns:__ a 'GI.Gdk.Objects.Window.Window' -}
dragContextGetDestWindow context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_dest_window context'
checkUnexpectedReturnNULL "dragContextGetDestWindow" result
result' <- (newObject Gdk.Window.Window) result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetDestWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDestWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetDestWindow
#endif
-- method DragContext::get_device
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Device"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_device" gdk_drag_context_get_device ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO (Ptr Gdk.Device.Device)
{- |
Returns the 'GI.Gdk.Objects.Device.Device' associated to the drag context.
-}
dragContextGetDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m Gdk.Device.Device
{- ^ __Returns:__ The 'GI.Gdk.Objects.Device.Device' associated to /@context@/. -}
dragContextGetDevice context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_device context'
checkUnexpectedReturnNULL "dragContextGetDevice" result
result' <- (newObject Gdk.Device.Device) result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetDeviceMethodInfo
instance (signature ~ (m Gdk.Device.Device), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDeviceMethodInfo a signature where
overloadedMethod _ = dragContextGetDevice
#endif
-- method DragContext::get_drag_window
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_drag_window" gdk_drag_context_get_drag_window ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO (Ptr Gdk.Window.Window)
{- |
Returns the window on which the drag icon should be rendered
during the drag operation. Note that the window may not be
available until the drag operation has begun. GDK will move
the window in accordance with the ongoing drag operation.
The window is owned by /@context@/ and will be destroyed when
the drag operation is over.
/Since: 3.20/
-}
dragContextGetDragWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m (Maybe Gdk.Window.Window)
{- ^ __Returns:__ the drag window, or 'Nothing' -}
dragContextGetDragWindow context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_drag_window context'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gdk.Window.Window) result'
return result''
touchManagedPtr context
return maybeResult
#if ENABLE_OVERLOADING
data DragContextGetDragWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDragWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetDragWindow
#endif
-- method DragContext::get_protocol
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "DragProtocol"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_protocol" gdk_drag_context_get_protocol ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO CUInt
{- |
Returns the drag protocol that is used by this context.
/Since: 3.0/
-}
dragContextGetProtocol ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m Gdk.Enums.DragProtocol
{- ^ __Returns:__ the drag protocol -}
dragContextGetProtocol context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_protocol context'
let result' = (toEnum . fromIntegral) result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetProtocolMethodInfo
instance (signature ~ (m Gdk.Enums.DragProtocol), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetProtocolMethodInfo a signature where
overloadedMethod _ = dragContextGetProtocol
#endif
-- method DragContext::get_selected_action
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "DragAction"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_selected_action" gdk_drag_context_get_selected_action ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO CUInt
{- |
Determines the action chosen by the drag destination.
/Since: 2.22/
-}
dragContextGetSelectedAction ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m [Gdk.Flags.DragAction]
{- ^ __Returns:__ a 'GI.Gdk.Flags.DragAction' value -}
dragContextGetSelectedAction context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_selected_action context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetSelectedActionMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSelectedActionMethodInfo a signature where
overloadedMethod _ = dragContextGetSelectedAction
#endif
-- method DragContext::get_source_window
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "Window"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_source_window" gdk_drag_context_get_source_window ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO (Ptr Gdk.Window.Window)
{- |
Returns the 'GI.Gdk.Objects.Window.Window' where the DND operation started.
/Since: 2.22/
-}
dragContextGetSourceWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m Gdk.Window.Window
{- ^ __Returns:__ a 'GI.Gdk.Objects.Window.Window' -}
dragContextGetSourceWindow context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_source_window context'
checkUnexpectedReturnNULL "dragContextGetSourceWindow" result
result' <- (newObject Gdk.Window.Window) result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetSourceWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSourceWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetSourceWindow
#endif
-- method DragContext::get_suggested_action
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gdk", name = "DragAction"}))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_get_suggested_action" gdk_drag_context_get_suggested_action ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO CUInt
{- |
Determines the suggested drag action of the context.
/Since: 2.22/
-}
dragContextGetSuggestedAction ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m [Gdk.Flags.DragAction]
{- ^ __Returns:__ a 'GI.Gdk.Flags.DragAction' value -}
dragContextGetSuggestedAction context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_suggested_action context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
#if ENABLE_OVERLOADING
data DragContextGetSuggestedActionMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSuggestedActionMethodInfo a signature where
overloadedMethod _ = dragContextGetSuggestedAction
#endif
-- method DragContext::list_targets
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TGList (TInterface (Name {namespace = "Gdk", name = "Atom"})))
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_list_targets" gdk_drag_context_list_targets ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
IO (Ptr (GList (Ptr Gdk.Atom.Atom)))
{- |
Retrieves the list of targets of the context.
/Since: 2.22/
-}
dragContextListTargets ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> m [Gdk.Atom.Atom]
{- ^ __Returns:__ a 'GI.GLib.Structs.List.List' of targets -}
dragContextListTargets context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_list_targets context'
result' <- unpackGList result
result'' <- mapM (newPtr Gdk.Atom.Atom) result'
touchManagedPtr context
return result''
#if ENABLE_OVERLOADING
data DragContextListTargetsMethodInfo
instance (signature ~ (m [Gdk.Atom.Atom]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextListTargetsMethodInfo a signature where
overloadedMethod _ = dragContextListTargets
#endif
-- method DragContext::manage_dnd
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "ipc_window", argType = TInterface (Name {namespace = "Gdk", name = "Window"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Window to use for IPC messaging/events", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "actions", argType = TInterface (Name {namespace = "Gdk", name = "DragAction"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the actions supported by the drag source", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_manage_dnd" gdk_drag_context_manage_dnd ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
Ptr Gdk.Window.Window -> -- ipc_window : TInterface (Name {namespace = "Gdk", name = "Window"})
CUInt -> -- actions : TInterface (Name {namespace = "Gdk", name = "DragAction"})
IO CInt
{- |
Requests the drag and drop operation to be managed by /@context@/.
When a drag and drop operation becomes managed, the 'GI.Gdk.Objects.DragContext.DragContext'
will internally handle all input and source-side 'GI.Gdk.Structs.EventDND.EventDND' events
as required by the windowing system.
Once the drag and drop operation is managed, the drag context will
emit the following signals:
* The 'GI.Gdk.Objects.DragContext.DragContext'::@/action-changed/@ signal whenever the final action
to be performed by the drag and drop operation changes.
* The 'GI.Gdk.Objects.DragContext.DragContext'::@/drop-performed/@ signal after the user performs
the drag and drop gesture (typically by releasing the mouse button).
* The 'GI.Gdk.Objects.DragContext.DragContext'::@/dnd-finished/@ signal after the drag and drop
operation concludes (after all @/GdkSelection/@ transfers happen).
* The 'GI.Gdk.Objects.DragContext.DragContext'::@/cancel/@ signal if the drag and drop operation is
finished but doesn\'t happen over an accepting destination, or is
cancelled through other means.
/Since: 3.20/
-}
dragContextManageDnd ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a, Gdk.Window.IsWindow b) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> b
{- ^ /@ipcWindow@/: Window to use for IPC messaging\/events -}
-> [Gdk.Flags.DragAction]
{- ^ /@actions@/: the actions supported by the drag source -}
-> m Bool
{- ^ __Returns:__ @/TRUE/@ if the drag and drop operation is managed. -}
dragContextManageDnd context ipcWindow actions = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
ipcWindow' <- unsafeManagedPtrCastPtr ipcWindow
let actions' = gflagsToWord actions
result <- gdk_drag_context_manage_dnd context' ipcWindow' actions'
let result' = (/= 0) result
touchManagedPtr context
touchManagedPtr ipcWindow
return result'
#if ENABLE_OVERLOADING
data DragContextManageDndMethodInfo
instance (signature ~ (b -> [Gdk.Flags.DragAction] -> m Bool), MonadIO m, IsDragContext a, Gdk.Window.IsWindow b) => O.MethodInfo DragContextManageDndMethodInfo a signature where
overloadedMethod _ = dragContextManageDnd
#endif
-- method DragContext::set_device
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "device", argType = TInterface (Name {namespace = "Gdk", name = "Device"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDevice", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_set_device" gdk_drag_context_set_device ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
Ptr Gdk.Device.Device -> -- device : TInterface (Name {namespace = "Gdk", name = "Device"})
IO ()
{- |
Associates a 'GI.Gdk.Objects.Device.Device' to /@context@/, so all Drag and Drop events
for /@context@/ are emitted as if they came from this device.
-}
dragContextSetDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a, Gdk.Device.IsDevice b) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> b
{- ^ /@device@/: a 'GI.Gdk.Objects.Device.Device' -}
-> m ()
dragContextSetDevice context device = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
device' <- unsafeManagedPtrCastPtr device
gdk_drag_context_set_device context' device'
touchManagedPtr context
touchManagedPtr device
return ()
#if ENABLE_OVERLOADING
data DragContextSetDeviceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDragContext a, Gdk.Device.IsDevice b) => O.MethodInfo DragContextSetDeviceMethodInfo a signature where
overloadedMethod _ = dragContextSetDevice
#endif
-- method DragContext::set_hotspot
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "context", argType = TInterface (Name {namespace = "Gdk", name = "DragContext"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GdkDragContext", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hot_x", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "x coordinate of the drag window hotspot", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hot_y", argType = TBasicType TInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "y coordinate of the drag window hotspot", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gdk_drag_context_set_hotspot" gdk_drag_context_set_hotspot ::
Ptr DragContext -> -- context : TInterface (Name {namespace = "Gdk", name = "DragContext"})
Int32 -> -- hot_x : TBasicType TInt
Int32 -> -- hot_y : TBasicType TInt
IO ()
{- |
Sets the position of the drag window that will be kept
under the cursor hotspot. Initially, the hotspot is at the
top left corner of the drag window.
/Since: 3.20/
-}
dragContextSetHotspot ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
{- ^ /@context@/: a 'GI.Gdk.Objects.DragContext.DragContext' -}
-> Int32
{- ^ /@hotX@/: x coordinate of the drag window hotspot -}
-> Int32
{- ^ /@hotY@/: y coordinate of the drag window hotspot -}
-> m ()
dragContextSetHotspot context hotX hotY = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
gdk_drag_context_set_hotspot context' hotX hotY
touchManagedPtr context
return ()
#if ENABLE_OVERLOADING
data DragContextSetHotspotMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsDragContext a) => O.MethodInfo DragContextSetHotspotMethodInfo a signature where
overloadedMethod _ = dragContextSetHotspot
#endif