module GI.Gdk.Objects.DragContext
(
DragContext(..) ,
IsDragContext ,
toDragContext ,
noDragContext ,
DragContextGetActionsMethodInfo ,
dragContextGetActions ,
DragContextGetDestWindowMethodInfo ,
dragContextGetDestWindow ,
DragContextGetDeviceMethodInfo ,
dragContextGetDevice ,
DragContextGetDragWindowMethodInfo ,
dragContextGetDragWindow ,
DragContextGetProtocolMethodInfo ,
dragContextGetProtocol ,
DragContextGetSelectedActionMethodInfo ,
dragContextGetSelectedAction ,
DragContextGetSourceWindowMethodInfo ,
dragContextGetSourceWindow ,
DragContextGetSuggestedActionMethodInfo ,
dragContextGetSuggestedAction ,
DragContextListTargetsMethodInfo ,
dragContextListTargets ,
DragContextManageDndMethodInfo ,
dragContextManageDnd ,
DragContextSetDeviceMethodInfo ,
dragContextSetDevice ,
DragContextSetHotspotMethodInfo ,
dragContextSetHotspot ,
C_DragContextActionChangedCallback ,
DragContextActionChangedCallback ,
DragContextActionChangedSignalInfo ,
afterDragContextActionChanged ,
genClosure_DragContextActionChanged ,
mk_DragContextActionChangedCallback ,
noDragContextActionChangedCallback ,
onDragContextActionChanged ,
wrap_DragContextActionChangedCallback ,
C_DragContextCancelCallback ,
DragContextCancelCallback ,
DragContextCancelSignalInfo ,
afterDragContextCancel ,
genClosure_DragContextCancel ,
mk_DragContextCancelCallback ,
noDragContextCancelCallback ,
onDragContextCancel ,
wrap_DragContextCancelCallback ,
C_DragContextDndFinishedCallback ,
DragContextDndFinishedCallback ,
DragContextDndFinishedSignalInfo ,
afterDragContextDndFinished ,
genClosure_DragContextDndFinished ,
mk_DragContextDndFinishedCallback ,
noDragContextDndFinishedCallback ,
onDragContextDndFinished ,
wrap_DragContextDndFinishedCallback ,
C_DragContextDropPerformedCallback ,
DragContextDropPerformedCallback ,
DragContextDropPerformedSignalInfo ,
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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Enums as Gdk.Enums
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Window as Gdk.Window
import qualified GI.Gdk.Structs.Atom as Gdk.Atom
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
class GObject o => IsDragContext o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError DragContext a) =>
IsDragContext a
#endif
instance IsDragContext DragContext
instance GObject.Object.IsObject DragContext
toDragContext :: IsDragContext o => o -> IO DragContext
toDragContext = unsafeCastTo DragContext
noDragContext :: Maybe DragContext
noDragContext = Nothing
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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveDragContextMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
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) => O.IsLabelProxy t (DragContext -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDragContextMethod t DragContext, O.MethodInfo info DragContext p) => O.IsLabel t (DragContext -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
type DragContextActionChangedCallback =
[Gdk.Flags.DragAction] ->
IO ()
noDragContextActionChangedCallback :: Maybe DragContextActionChangedCallback
noDragContextActionChangedCallback = Nothing
type C_DragContextActionChangedCallback =
Ptr () ->
CUInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DragContextActionChangedCallback :: C_DragContextActionChangedCallback -> IO (FunPtr C_DragContextActionChangedCallback)
genClosure_DragContextActionChanged :: DragContextActionChangedCallback -> IO Closure
genClosure_DragContextActionChanged cb = do
let cb' = wrap_DragContextActionChangedCallback cb
mk_DragContextActionChangedCallback cb' >>= newCClosure
wrap_DragContextActionChangedCallback ::
DragContextActionChangedCallback ->
Ptr () ->
CUInt ->
Ptr () ->
IO ()
wrap_DragContextActionChangedCallback _cb _ action _ = do
let action' = wordToGFlags action
_cb action'
onDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
onDragContextActionChanged obj cb = liftIO $ connectDragContextActionChanged obj cb SignalConnectBefore
afterDragContextActionChanged :: (GObject a, MonadIO m) => a -> DragContextActionChangedCallback -> m SignalHandlerId
afterDragContextActionChanged obj cb = connectDragContextActionChanged obj cb SignalConnectAfter
connectDragContextActionChanged :: (GObject a, MonadIO m) =>
a -> DragContextActionChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectDragContextActionChanged obj cb after = liftIO $ do
let cb' = wrap_DragContextActionChangedCallback cb
cb'' <- mk_DragContextActionChangedCallback cb'
connectSignalFunPtr obj "action-changed" cb'' after
type DragContextCancelCallback =
Gdk.Enums.DragCancelReason ->
IO ()
noDragContextCancelCallback :: Maybe DragContextCancelCallback
noDragContextCancelCallback = Nothing
type C_DragContextCancelCallback =
Ptr () ->
CUInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DragContextCancelCallback :: C_DragContextCancelCallback -> IO (FunPtr C_DragContextCancelCallback)
genClosure_DragContextCancel :: DragContextCancelCallback -> IO Closure
genClosure_DragContextCancel cb = do
let cb' = wrap_DragContextCancelCallback cb
mk_DragContextCancelCallback cb' >>= newCClosure
wrap_DragContextCancelCallback ::
DragContextCancelCallback ->
Ptr () ->
CUInt ->
Ptr () ->
IO ()
wrap_DragContextCancelCallback _cb _ reason _ = do
let reason' = (toEnum . fromIntegral) reason
_cb reason'
onDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
onDragContextCancel obj cb = liftIO $ connectDragContextCancel obj cb SignalConnectBefore
afterDragContextCancel :: (GObject a, MonadIO m) => a -> DragContextCancelCallback -> m SignalHandlerId
afterDragContextCancel obj cb = connectDragContextCancel obj cb SignalConnectAfter
connectDragContextCancel :: (GObject a, MonadIO m) =>
a -> DragContextCancelCallback -> SignalConnectMode -> m SignalHandlerId
connectDragContextCancel obj cb after = liftIO $ do
let cb' = wrap_DragContextCancelCallback cb
cb'' <- mk_DragContextCancelCallback cb'
connectSignalFunPtr obj "cancel" cb'' after
type DragContextDndFinishedCallback =
IO ()
noDragContextDndFinishedCallback :: Maybe DragContextDndFinishedCallback
noDragContextDndFinishedCallback = Nothing
type C_DragContextDndFinishedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DragContextDndFinishedCallback :: C_DragContextDndFinishedCallback -> IO (FunPtr C_DragContextDndFinishedCallback)
genClosure_DragContextDndFinished :: DragContextDndFinishedCallback -> IO Closure
genClosure_DragContextDndFinished cb = do
let cb' = wrap_DragContextDndFinishedCallback cb
mk_DragContextDndFinishedCallback cb' >>= newCClosure
wrap_DragContextDndFinishedCallback ::
DragContextDndFinishedCallback ->
Ptr () ->
Ptr () ->
IO ()
wrap_DragContextDndFinishedCallback _cb _ _ = do
_cb
onDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
onDragContextDndFinished obj cb = liftIO $ connectDragContextDndFinished obj cb SignalConnectBefore
afterDragContextDndFinished :: (GObject a, MonadIO m) => a -> DragContextDndFinishedCallback -> m SignalHandlerId
afterDragContextDndFinished obj cb = connectDragContextDndFinished obj cb SignalConnectAfter
connectDragContextDndFinished :: (GObject a, MonadIO m) =>
a -> DragContextDndFinishedCallback -> SignalConnectMode -> m SignalHandlerId
connectDragContextDndFinished obj cb after = liftIO $ do
let cb' = wrap_DragContextDndFinishedCallback cb
cb'' <- mk_DragContextDndFinishedCallback cb'
connectSignalFunPtr obj "dnd-finished" cb'' after
type DragContextDropPerformedCallback =
Int32 ->
IO ()
noDragContextDropPerformedCallback :: Maybe DragContextDropPerformedCallback
noDragContextDropPerformedCallback = Nothing
type C_DragContextDropPerformedCallback =
Ptr () ->
Int32 ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DragContextDropPerformedCallback :: C_DragContextDropPerformedCallback -> IO (FunPtr C_DragContextDropPerformedCallback)
genClosure_DragContextDropPerformed :: DragContextDropPerformedCallback -> IO Closure
genClosure_DragContextDropPerformed cb = do
let cb' = wrap_DragContextDropPerformedCallback cb
mk_DragContextDropPerformedCallback cb' >>= newCClosure
wrap_DragContextDropPerformedCallback ::
DragContextDropPerformedCallback ->
Ptr () ->
Int32 ->
Ptr () ->
IO ()
wrap_DragContextDropPerformedCallback _cb _ time _ = do
_cb time
onDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
onDragContextDropPerformed obj cb = liftIO $ connectDragContextDropPerformed obj cb SignalConnectBefore
afterDragContextDropPerformed :: (GObject a, MonadIO m) => a -> DragContextDropPerformedCallback -> m SignalHandlerId
afterDragContextDropPerformed obj cb = connectDragContextDropPerformed obj cb SignalConnectAfter
connectDragContextDropPerformed :: (GObject a, MonadIO m) =>
a -> DragContextDropPerformedCallback -> SignalConnectMode -> m SignalHandlerId
connectDragContextDropPerformed obj cb after = liftIO $ do
let cb' = wrap_DragContextDropPerformedCallback cb
cb'' <- mk_DragContextDropPerformedCallback cb'
connectSignalFunPtr obj "drop-performed" cb'' after
instance O.HasAttributeList DragContext
type instance O.AttributeList DragContext = DragContextAttributeList
type DragContextAttributeList = ('[ ] :: [(Symbol, *)])
data DragContextActionChangedSignalInfo
instance SignalInfo DragContextActionChangedSignalInfo where
type HaskellCallbackType DragContextActionChangedSignalInfo = DragContextActionChangedCallback
connectSignal _ = connectDragContextActionChanged
data DragContextCancelSignalInfo
instance SignalInfo DragContextCancelSignalInfo where
type HaskellCallbackType DragContextCancelSignalInfo = DragContextCancelCallback
connectSignal _ = connectDragContextCancel
data DragContextDndFinishedSignalInfo
instance SignalInfo DragContextDndFinishedSignalInfo where
type HaskellCallbackType DragContextDndFinishedSignalInfo = DragContextDndFinishedCallback
connectSignal _ = connectDragContextDndFinished
data DragContextDropPerformedSignalInfo
instance SignalInfo DragContextDropPerformedSignalInfo where
type HaskellCallbackType DragContextDropPerformedSignalInfo = DragContextDropPerformedCallback
connectSignal _ = connectDragContextDropPerformed
type instance O.SignalList DragContext = DragContextSignalList
type DragContextSignalList = ('[ '("actionChanged", DragContextActionChangedSignalInfo), '("cancel", DragContextCancelSignalInfo), '("dndFinished", DragContextDndFinishedSignalInfo), '("dropPerformed", DragContextDropPerformedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gdk_drag_context_get_actions" gdk_drag_context_get_actions ::
Ptr DragContext ->
IO CUInt
dragContextGetActions ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m [Gdk.Flags.DragAction]
dragContextGetActions context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_actions context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
data DragContextGetActionsMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetActionsMethodInfo a signature where
overloadedMethod _ = dragContextGetActions
foreign import ccall "gdk_drag_context_get_dest_window" gdk_drag_context_get_dest_window ::
Ptr DragContext ->
IO (Ptr Gdk.Window.Window)
dragContextGetDestWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m Gdk.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'
data DragContextGetDestWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDestWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetDestWindow
foreign import ccall "gdk_drag_context_get_device" gdk_drag_context_get_device ::
Ptr DragContext ->
IO (Ptr Gdk.Device.Device)
dragContextGetDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m Gdk.Device.Device
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'
data DragContextGetDeviceMethodInfo
instance (signature ~ (m Gdk.Device.Device), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDeviceMethodInfo a signature where
overloadedMethod _ = dragContextGetDevice
foreign import ccall "gdk_drag_context_get_drag_window" gdk_drag_context_get_drag_window ::
Ptr DragContext ->
IO (Ptr Gdk.Window.Window)
dragContextGetDragWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m (Maybe Gdk.Window.Window)
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
data DragContextGetDragWindowMethodInfo
instance (signature ~ (m (Maybe Gdk.Window.Window)), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetDragWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetDragWindow
foreign import ccall "gdk_drag_context_get_protocol" gdk_drag_context_get_protocol ::
Ptr DragContext ->
IO CUInt
dragContextGetProtocol ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m Gdk.Enums.DragProtocol
dragContextGetProtocol context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_protocol context'
let result' = (toEnum . fromIntegral) result
touchManagedPtr context
return result'
data DragContextGetProtocolMethodInfo
instance (signature ~ (m Gdk.Enums.DragProtocol), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetProtocolMethodInfo a signature where
overloadedMethod _ = dragContextGetProtocol
foreign import ccall "gdk_drag_context_get_selected_action" gdk_drag_context_get_selected_action ::
Ptr DragContext ->
IO CUInt
dragContextGetSelectedAction ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m [Gdk.Flags.DragAction]
dragContextGetSelectedAction context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_selected_action context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
data DragContextGetSelectedActionMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSelectedActionMethodInfo a signature where
overloadedMethod _ = dragContextGetSelectedAction
foreign import ccall "gdk_drag_context_get_source_window" gdk_drag_context_get_source_window ::
Ptr DragContext ->
IO (Ptr Gdk.Window.Window)
dragContextGetSourceWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m Gdk.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'
data DragContextGetSourceWindowMethodInfo
instance (signature ~ (m Gdk.Window.Window), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSourceWindowMethodInfo a signature where
overloadedMethod _ = dragContextGetSourceWindow
foreign import ccall "gdk_drag_context_get_suggested_action" gdk_drag_context_get_suggested_action ::
Ptr DragContext ->
IO CUInt
dragContextGetSuggestedAction ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m [Gdk.Flags.DragAction]
dragContextGetSuggestedAction context = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
result <- gdk_drag_context_get_suggested_action context'
let result' = wordToGFlags result
touchManagedPtr context
return result'
data DragContextGetSuggestedActionMethodInfo
instance (signature ~ (m [Gdk.Flags.DragAction]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextGetSuggestedActionMethodInfo a signature where
overloadedMethod _ = dragContextGetSuggestedAction
foreign import ccall "gdk_drag_context_list_targets" gdk_drag_context_list_targets ::
Ptr DragContext ->
IO (Ptr (GList (Ptr Gdk.Atom.Atom)))
dragContextListTargets ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> m [Gdk.Atom.Atom]
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''
data DragContextListTargetsMethodInfo
instance (signature ~ (m [Gdk.Atom.Atom]), MonadIO m, IsDragContext a) => O.MethodInfo DragContextListTargetsMethodInfo a signature where
overloadedMethod _ = dragContextListTargets
foreign import ccall "gdk_drag_context_manage_dnd" gdk_drag_context_manage_dnd ::
Ptr DragContext ->
Ptr Gdk.Window.Window ->
CUInt ->
IO CInt
dragContextManageDnd ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a, Gdk.Window.IsWindow b) =>
a
-> b
-> [Gdk.Flags.DragAction]
-> m Bool
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'
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
foreign import ccall "gdk_drag_context_set_device" gdk_drag_context_set_device ::
Ptr DragContext ->
Ptr Gdk.Device.Device ->
IO ()
dragContextSetDevice ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a, Gdk.Device.IsDevice b) =>
a
-> b
-> m ()
dragContextSetDevice context device = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
device' <- unsafeManagedPtrCastPtr device
gdk_drag_context_set_device context' device'
touchManagedPtr context
touchManagedPtr device
return ()
data DragContextSetDeviceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDragContext a, Gdk.Device.IsDevice b) => O.MethodInfo DragContextSetDeviceMethodInfo a signature where
overloadedMethod _ = dragContextSetDevice
foreign import ccall "gdk_drag_context_set_hotspot" gdk_drag_context_set_hotspot ::
Ptr DragContext ->
Int32 ->
Int32 ->
IO ()
dragContextSetHotspot ::
(B.CallStack.HasCallStack, MonadIO m, IsDragContext a) =>
a
-> Int32
-> Int32
-> m ()
dragContextSetHotspot context hotX hotY = liftIO $ do
context' <- unsafeManagedPtrCastPtr context
gdk_drag_context_set_hotspot context' hotX hotY
touchManagedPtr context
return ()
data DragContextSetHotspotMethodInfo
instance (signature ~ (Int32 -> Int32 -> m ()), MonadIO m, IsDragContext a) => O.MethodInfo DragContextSetHotspotMethodInfo a signature where
overloadedMethod _ = dragContextSetHotspot