{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gtk.Interfaces.TreeDragSource ( -- * Exported types TreeDragSource(..) , noTreeDragSource , TreeDragSourceK , -- * Methods -- ** treeDragSourceDragDataDelete treeDragSourceDragDataDelete , -- ** treeDragSourceDragDataGet treeDragSourceDragDataGet , -- ** treeDragSourceRowDraggable treeDragSourceRowDraggable , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gtk.Types import GI.Gtk.Callbacks -- interface TreeDragSource newtype TreeDragSource = TreeDragSource (ForeignPtr TreeDragSource) noTreeDragSource :: Maybe TreeDragSource noTreeDragSource = Nothing type instance AttributeList TreeDragSource = TreeDragSourceAttributeList type TreeDragSourceAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList TreeDragSource = TreeDragSourceSignalList type TreeDragSourceSignalList = ('[ ] :: [(Symbol, *)]) class ForeignPtrNewtype a => TreeDragSourceK a instance (ForeignPtrNewtype o, IsDescendantOf TreeDragSource o) => TreeDragSourceK o type instance ParentTypes TreeDragSource = TreeDragSourceParentTypes type TreeDragSourceParentTypes = '[] -- method TreeDragSource::drag_data_delete -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_drag_source_drag_data_delete" gtk_tree_drag_source_drag_data_delete :: Ptr TreeDragSource -> -- _obj : TInterface "Gtk" "TreeDragSource" Ptr TreePath -> -- path : TInterface "Gtk" "TreePath" IO CInt treeDragSourceDragDataDelete :: (MonadIO m, TreeDragSourceK a) => a -> -- _obj TreePath -> -- path m Bool treeDragSourceDragDataDelete _obj path = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let path' = unsafeManagedPtrGetPtr path result <- gtk_tree_drag_source_drag_data_delete _obj' path' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr path return result' -- method TreeDragSource::drag_data_get -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "selection_data", argType = TInterface "Gtk" "SelectionData", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_drag_source_drag_data_get" gtk_tree_drag_source_drag_data_get :: Ptr TreeDragSource -> -- _obj : TInterface "Gtk" "TreeDragSource" Ptr TreePath -> -- path : TInterface "Gtk" "TreePath" Ptr SelectionData -> -- selection_data : TInterface "Gtk" "SelectionData" IO CInt treeDragSourceDragDataGet :: (MonadIO m, TreeDragSourceK a) => a -> -- _obj TreePath -> -- path SelectionData -> -- selection_data m Bool treeDragSourceDragDataGet _obj path selection_data = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let path' = unsafeManagedPtrGetPtr path let selection_data' = unsafeManagedPtrGetPtr selection_data result <- gtk_tree_drag_source_drag_data_get _obj' path' selection_data' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr path touchManagedPtr selection_data return result' -- method TreeDragSource::row_draggable -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "TreeDragSource", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TInterface "Gtk" "TreePath", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_tree_drag_source_row_draggable" gtk_tree_drag_source_row_draggable :: Ptr TreeDragSource -> -- _obj : TInterface "Gtk" "TreeDragSource" Ptr TreePath -> -- path : TInterface "Gtk" "TreePath" IO CInt treeDragSourceRowDraggable :: (MonadIO m, TreeDragSourceK a) => a -> -- _obj TreePath -> -- path m Bool treeDragSourceRowDraggable _obj path = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let path' = unsafeManagedPtrGetPtr path result <- gtk_tree_drag_source_row_draggable _obj' path' let result' = (/= 0) result touchManagedPtr _obj touchManagedPtr path return result'