{- | 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.WebKit2.Objects.ContextMenu ( -- * Exported types ContextMenu(..) , ContextMenuK , toContextMenu , noContextMenu , -- * Methods -- ** contextMenuAppend contextMenuAppend , -- ** contextMenuFirst contextMenuFirst , -- ** contextMenuGetItemAtPosition contextMenuGetItemAtPosition , -- ** contextMenuGetItems contextMenuGetItems , -- ** contextMenuGetNItems contextMenuGetNItems , -- ** contextMenuGetUserData contextMenuGetUserData , -- ** contextMenuInsert contextMenuInsert , -- ** contextMenuLast contextMenuLast , -- ** contextMenuMoveItem contextMenuMoveItem , -- ** contextMenuNew contextMenuNew , -- ** contextMenuNewWithItems contextMenuNewWithItems , -- ** contextMenuPrepend contextMenuPrepend , -- ** contextMenuRemove contextMenuRemove , -- ** contextMenuRemoveAll contextMenuRemoveAll , -- ** contextMenuSetUserData contextMenuSetUserData , ) 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.WebKit2.Types import GI.WebKit2.Callbacks import qualified GI.GObject as GObject newtype ContextMenu = ContextMenu (ForeignPtr ContextMenu) foreign import ccall "webkit_context_menu_get_type" c_webkit_context_menu_get_type :: IO GType type instance ParentTypes ContextMenu = ContextMenuParentTypes type ContextMenuParentTypes = '[GObject.Object] instance GObject ContextMenu where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_webkit_context_menu_get_type class GObject o => ContextMenuK o instance (GObject o, IsDescendantOf ContextMenu o) => ContextMenuK o toContextMenu :: ContextMenuK o => o -> IO ContextMenu toContextMenu = unsafeCastTo ContextMenu noContextMenu :: Maybe ContextMenu noContextMenu = Nothing type instance AttributeList ContextMenu = ContextMenuAttributeList type ContextMenuAttributeList = ('[ ] :: [(Symbol, *)]) type instance SignalList ContextMenu = ContextMenuSignalList type ContextMenuSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method ContextMenu::new -- method type : Constructor -- Args : [] -- Lengths : [] -- hInArgs : [] -- returnType : TInterface "WebKit2" "ContextMenu" -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_new" webkit_context_menu_new :: IO (Ptr ContextMenu) contextMenuNew :: (MonadIO m) => m ContextMenu contextMenuNew = liftIO $ do result <- webkit_context_menu_new checkUnexpectedReturnNULL "webkit_context_menu_new" result result' <- (wrapObject ContextMenu) result return result' -- method ContextMenu::new_with_items -- method type : Constructor -- Args : [Arg {argName = "items", argType = TGList (TInterface "WebKit2" "ContextMenuItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "items", argType = TGList (TInterface "WebKit2" "ContextMenuItem"), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit2" "ContextMenu" -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_new_with_items" webkit_context_menu_new_with_items :: Ptr (GList (Ptr ContextMenuItem)) -> -- items : TGList (TInterface "WebKit2" "ContextMenuItem") IO (Ptr ContextMenu) contextMenuNewWithItems :: (MonadIO m, ContextMenuItemK a) => [a] -> -- items m ContextMenu contextMenuNewWithItems items = liftIO $ do let items' = map unsafeManagedPtrCastPtr items items'' <- packGList items' result <- webkit_context_menu_new_with_items items'' checkUnexpectedReturnNULL "webkit_context_menu_new_with_items" result result' <- (wrapObject ContextMenu) result mapM_ touchManagedPtr items g_list_free items'' return result' -- method ContextMenu::append -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_append" webkit_context_menu_append :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr ContextMenuItem -> -- item : TInterface "WebKit2" "ContextMenuItem" IO () contextMenuAppend :: (MonadIO m, ContextMenuK a, ContextMenuItemK b) => a -> -- _obj b -> -- item m () contextMenuAppend _obj item = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let item' = unsafeManagedPtrCastPtr item webkit_context_menu_append _obj' item' touchManagedPtr _obj touchManagedPtr item return () -- method ContextMenu::first -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit2" "ContextMenuItem" -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_first" webkit_context_menu_first :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO (Ptr ContextMenuItem) contextMenuFirst :: (MonadIO m, ContextMenuK a) => a -> -- _obj m ContextMenuItem contextMenuFirst _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_first _obj' checkUnexpectedReturnNULL "webkit_context_menu_first" result result' <- (newObject ContextMenuItem) result touchManagedPtr _obj return result' -- method ContextMenu::get_item_at_position -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit2" "ContextMenuItem" -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_get_item_at_position" webkit_context_menu_get_item_at_position :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Word32 -> -- position : TBasicType TUInt32 IO (Ptr ContextMenuItem) contextMenuGetItemAtPosition :: (MonadIO m, ContextMenuK a) => a -> -- _obj Word32 -> -- position m ContextMenuItem contextMenuGetItemAtPosition _obj position = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_get_item_at_position _obj' position checkUnexpectedReturnNULL "webkit_context_menu_get_item_at_position" result result' <- (newObject ContextMenuItem) result touchManagedPtr _obj return result' -- method ContextMenu::get_items -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TGList (TInterface "WebKit2" "ContextMenuItem") -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_get_items" webkit_context_menu_get_items :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO (Ptr (GList (Ptr ContextMenuItem))) contextMenuGetItems :: (MonadIO m, ContextMenuK a) => a -> -- _obj m [ContextMenuItem] contextMenuGetItems _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_get_items _obj' checkUnexpectedReturnNULL "webkit_context_menu_get_items" result result' <- unpackGList result result'' <- mapM (newObject ContextMenuItem) result' touchManagedPtr _obj return result'' -- method ContextMenu::get_n_items -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_get_n_items" webkit_context_menu_get_n_items :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO Word32 contextMenuGetNItems :: (MonadIO m, ContextMenuK a) => a -> -- _obj m Word32 contextMenuGetNItems _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_get_n_items _obj' touchManagedPtr _obj return result -- method ContextMenu::get_user_data -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TVariant -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_get_user_data" webkit_context_menu_get_user_data :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO (Ptr GVariant) contextMenuGetUserData :: (MonadIO m, ContextMenuK a) => a -> -- _obj m GVariant contextMenuGetUserData _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_get_user_data _obj' checkUnexpectedReturnNULL "webkit_context_menu_get_user_data" result result' <- newGVariantFromPtr result touchManagedPtr _obj return result' -- method ContextMenu::insert -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_insert" webkit_context_menu_insert :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr ContextMenuItem -> -- item : TInterface "WebKit2" "ContextMenuItem" Int32 -> -- position : TBasicType TInt32 IO () contextMenuInsert :: (MonadIO m, ContextMenuK a, ContextMenuItemK b) => a -> -- _obj b -> -- item Int32 -> -- position m () contextMenuInsert _obj item position = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let item' = unsafeManagedPtrCastPtr item webkit_context_menu_insert _obj' item' position touchManagedPtr _obj touchManagedPtr item return () -- method ContextMenu::last -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "WebKit2" "ContextMenuItem" -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_last" webkit_context_menu_last :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO (Ptr ContextMenuItem) contextMenuLast :: (MonadIO m, ContextMenuK a) => a -> -- _obj m ContextMenuItem contextMenuLast _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- webkit_context_menu_last _obj' checkUnexpectedReturnNULL "webkit_context_menu_last" result result' <- (newObject ContextMenuItem) result touchManagedPtr _obj return result' -- method ContextMenu::move_item -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "position", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_move_item" webkit_context_menu_move_item :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr ContextMenuItem -> -- item : TInterface "WebKit2" "ContextMenuItem" Int32 -> -- position : TBasicType TInt32 IO () contextMenuMoveItem :: (MonadIO m, ContextMenuK a, ContextMenuItemK b) => a -> -- _obj b -> -- item Int32 -> -- position m () contextMenuMoveItem _obj item position = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let item' = unsafeManagedPtrCastPtr item webkit_context_menu_move_item _obj' item' position touchManagedPtr _obj touchManagedPtr item return () -- method ContextMenu::prepend -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_prepend" webkit_context_menu_prepend :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr ContextMenuItem -> -- item : TInterface "WebKit2" "ContextMenuItem" IO () contextMenuPrepend :: (MonadIO m, ContextMenuK a, ContextMenuItemK b) => a -> -- _obj b -> -- item m () contextMenuPrepend _obj item = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let item' = unsafeManagedPtrCastPtr item webkit_context_menu_prepend _obj' item' touchManagedPtr _obj touchManagedPtr item return () -- method ContextMenu::remove -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "item", argType = TInterface "WebKit2" "ContextMenuItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_remove" webkit_context_menu_remove :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr ContextMenuItem -> -- item : TInterface "WebKit2" "ContextMenuItem" IO () contextMenuRemove :: (MonadIO m, ContextMenuK a, ContextMenuItemK b) => a -> -- _obj b -> -- item m () contextMenuRemove _obj item = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let item' = unsafeManagedPtrCastPtr item webkit_context_menu_remove _obj' item' touchManagedPtr _obj touchManagedPtr item return () -- method ContextMenu::remove_all -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_remove_all" webkit_context_menu_remove_all :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" IO () contextMenuRemoveAll :: (MonadIO m, ContextMenuK a) => a -> -- _obj m () contextMenuRemoveAll _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj webkit_context_menu_remove_all _obj' touchManagedPtr _obj return () -- method ContextMenu::set_user_data -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2" "ContextMenu", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "user_data", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "webkit_context_menu_set_user_data" webkit_context_menu_set_user_data :: Ptr ContextMenu -> -- _obj : TInterface "WebKit2" "ContextMenu" Ptr GVariant -> -- user_data : TVariant IO () contextMenuSetUserData :: (MonadIO m, ContextMenuK a) => a -> -- _obj GVariant -> -- user_data m () contextMenuSetUserData _obj user_data = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let user_data' = unsafeManagedPtrGetPtr user_data webkit_context_menu_set_user_data _obj' user_data' touchManagedPtr _obj return ()