gi-gtk-0.3.16.12: GI/Gtk/Structs/RecentInfo.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
#GtkRecentInfo-struct contains private data only, and should
be accessed using the provided API.
#GtkRecentInfo constains all the meta-data
associated with an entry in the recently used files list.
-}
module GI.Gtk.Structs.RecentInfo
(
-- * Exported types
RecentInfo(..) ,
noRecentInfo ,
-- * Methods
-- ** recentInfoCreateAppInfo
recentInfoCreateAppInfo ,
-- ** recentInfoExists
recentInfoExists ,
-- ** recentInfoGetAdded
recentInfoGetAdded ,
-- ** recentInfoGetAge
recentInfoGetAge ,
-- ** recentInfoGetApplicationInfo
recentInfoGetApplicationInfo ,
-- ** recentInfoGetApplications
recentInfoGetApplications ,
-- ** recentInfoGetDescription
recentInfoGetDescription ,
-- ** recentInfoGetDisplayName
recentInfoGetDisplayName ,
-- ** recentInfoGetGicon
recentInfoGetGicon ,
-- ** recentInfoGetGroups
recentInfoGetGroups ,
-- ** recentInfoGetIcon
recentInfoGetIcon ,
-- ** recentInfoGetMimeType
recentInfoGetMimeType ,
-- ** recentInfoGetModified
recentInfoGetModified ,
-- ** recentInfoGetPrivateHint
recentInfoGetPrivateHint ,
-- ** recentInfoGetShortName
recentInfoGetShortName ,
-- ** recentInfoGetUri
recentInfoGetUri ,
-- ** recentInfoGetUriDisplay
recentInfoGetUriDisplay ,
-- ** recentInfoGetVisited
recentInfoGetVisited ,
-- ** recentInfoHasApplication
recentInfoHasApplication ,
-- ** recentInfoHasGroup
recentInfoHasGroup ,
-- ** recentInfoIsLocal
recentInfoIsLocal ,
-- ** recentInfoLastApplication
recentInfoLastApplication ,
-- ** recentInfoMatch
recentInfoMatch ,
-- ** recentInfoRef
recentInfoRef ,
-- ** recentInfoUnref
recentInfoUnref ,
) 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
import qualified GI.GdkPixbuf as GdkPixbuf
import qualified GI.Gio as Gio
newtype RecentInfo = RecentInfo (ForeignPtr RecentInfo)
foreign import ccall "gtk_recent_info_get_type" c_gtk_recent_info_get_type ::
IO GType
instance BoxedObject RecentInfo where
boxedType _ = c_gtk_recent_info_get_type
noRecentInfo :: Maybe RecentInfo
noRecentInfo = Nothing
-- method RecentInfo::create_app_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "AppInfo"
-- throws : True
-- Skip return : False
foreign import ccall "gtk_recent_info_create_app_info" gtk_recent_info_create_app_info ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
CString -> -- app_name : TBasicType TUTF8
Ptr (Ptr GError) -> -- error
IO (Ptr Gio.AppInfo)
recentInfoCreateAppInfo ::
(MonadIO m) =>
RecentInfo -> -- _obj
Maybe (T.Text) -> -- app_name
m Gio.AppInfo
recentInfoCreateAppInfo _obj app_name = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
maybeApp_name <- case app_name of
Nothing -> return nullPtr
Just jApp_name -> do
jApp_name' <- textToCString jApp_name
return jApp_name'
onException (do
result <- propagateGError $ gtk_recent_info_create_app_info _obj' maybeApp_name
checkUnexpectedReturnNULL "gtk_recent_info_create_app_info" result
result' <- (wrapObject Gio.AppInfo) result
touchManagedPtr _obj
freeMem maybeApp_name
return result'
) (do
freeMem maybeApp_name
)
-- method RecentInfo::exists
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_exists" gtk_recent_info_exists ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CInt
recentInfoExists ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Bool
recentInfoExists _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_exists _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_added
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_added" gtk_recent_info_get_added ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO Int64
recentInfoGetAdded ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Int64
recentInfoGetAdded _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_added _obj'
touchManagedPtr _obj
return result
-- method RecentInfo::get_age
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_age" gtk_recent_info_get_age ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO Int32
recentInfoGetAge ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Int32
recentInfoGetAge _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_age _obj'
touchManagedPtr _obj
return result
-- method RecentInfo::get_application_info
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_exec", argType = TBasicType TUTF8, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "count", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "time_", argType = TBasicType TInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_application_info" gtk_recent_info_get_application_info ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
CString -> -- app_name : TBasicType TUTF8
Ptr CString -> -- app_exec : TBasicType TUTF8
Ptr Word32 -> -- count : TBasicType TUInt32
Ptr Int64 -> -- time_ : TBasicType TInt64
IO CInt
recentInfoGetApplicationInfo ::
(MonadIO m) =>
RecentInfo -> -- _obj
T.Text -> -- app_name
m (Bool,T.Text,Word32,Int64)
recentInfoGetApplicationInfo _obj app_name = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
app_name' <- textToCString app_name
app_exec <- allocMem :: IO (Ptr CString)
count <- allocMem :: IO (Ptr Word32)
time_ <- allocMem :: IO (Ptr Int64)
result <- gtk_recent_info_get_application_info _obj' app_name' app_exec count time_
let result' = (/= 0) result
app_exec' <- peek app_exec
app_exec'' <- cstringToText app_exec'
count' <- peek count
time_' <- peek time_
touchManagedPtr _obj
freeMem app_name'
freeMem app_exec
freeMem count
freeMem time_
return (result', app_exec'', count', time_')
-- method RecentInfo::get_applications
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) 1 (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_applications" gtk_recent_info_get_applications ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
Ptr Word64 -> -- length : TBasicType TUInt64
IO (Ptr CString)
recentInfoGetApplications ::
(MonadIO m) =>
RecentInfo -> -- _obj
m ([T.Text],Word64)
recentInfoGetApplications _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
length_ <- allocMem :: IO (Ptr Word64)
result <- gtk_recent_info_get_applications _obj' length_
checkUnexpectedReturnNULL "gtk_recent_info_get_applications" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
length_' <- peek length_
touchManagedPtr _obj
freeMem length_
return (result', length_')
-- method RecentInfo::get_description
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_description" gtk_recent_info_get_description ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetDescription ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetDescription _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_description _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_description" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_display_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_display_name" gtk_recent_info_get_display_name ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetDisplayName ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetDisplayName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_display_name _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_display_name" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_gicon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "Icon"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_gicon" gtk_recent_info_get_gicon ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO (Ptr Gio.Icon)
recentInfoGetGicon ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Gio.Icon
recentInfoGetGicon _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_gicon _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_gicon" result
result' <- (wrapObject Gio.Icon) result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_groups
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "length", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TCArray True (-1) 1 (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_groups" gtk_recent_info_get_groups ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
Ptr Word64 -> -- length : TBasicType TUInt64
IO (Ptr CString)
recentInfoGetGroups ::
(MonadIO m) =>
RecentInfo -> -- _obj
m ([T.Text],Word64)
recentInfoGetGroups _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
length_ <- allocMem :: IO (Ptr Word64)
result <- gtk_recent_info_get_groups _obj' length_
checkUnexpectedReturnNULL "gtk_recent_info_get_groups" result
result' <- unpackZeroTerminatedUTF8CArray result
mapZeroTerminatedCArray freeMem result
freeMem result
length_' <- peek length_
touchManagedPtr _obj
freeMem length_
return (result', length_')
-- method RecentInfo::get_icon
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "size", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "GdkPixbuf" "Pixbuf"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_icon" gtk_recent_info_get_icon ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
Int32 -> -- size : TBasicType TInt32
IO (Ptr GdkPixbuf.Pixbuf)
recentInfoGetIcon ::
(MonadIO m) =>
RecentInfo -> -- _obj
Int32 -> -- size
m GdkPixbuf.Pixbuf
recentInfoGetIcon _obj size = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_icon _obj' size
checkUnexpectedReturnNULL "gtk_recent_info_get_icon" result
result' <- (wrapObject GdkPixbuf.Pixbuf) result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_mime_type
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_mime_type" gtk_recent_info_get_mime_type ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetMimeType ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetMimeType _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_mime_type _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_mime_type" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_modified
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_modified" gtk_recent_info_get_modified ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO Int64
recentInfoGetModified ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Int64
recentInfoGetModified _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_modified _obj'
touchManagedPtr _obj
return result
-- method RecentInfo::get_private_hint
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_private_hint" gtk_recent_info_get_private_hint ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CInt
recentInfoGetPrivateHint ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Bool
recentInfoGetPrivateHint _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_private_hint _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_short_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_short_name" gtk_recent_info_get_short_name ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetShortName ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetShortName _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_short_name _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_short_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_uri" gtk_recent_info_get_uri ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetUri ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_uri _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_uri" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_uri_display
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_uri_display" gtk_recent_info_get_uri_display ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoGetUriDisplay ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoGetUriDisplay _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_uri_display _obj'
checkUnexpectedReturnNULL "gtk_recent_info_get_uri_display" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method RecentInfo::get_visited
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt64
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_get_visited" gtk_recent_info_get_visited ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO Int64
recentInfoGetVisited ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Int64
recentInfoGetVisited _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_get_visited _obj'
touchManagedPtr _obj
return result
-- method RecentInfo::has_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "app_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_has_application" gtk_recent_info_has_application ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
CString -> -- app_name : TBasicType TUTF8
IO CInt
recentInfoHasApplication ::
(MonadIO m) =>
RecentInfo -> -- _obj
T.Text -> -- app_name
m Bool
recentInfoHasApplication _obj app_name = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
app_name' <- textToCString app_name
result <- gtk_recent_info_has_application _obj' app_name'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem app_name'
return result'
-- method RecentInfo::has_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "group_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_has_group" gtk_recent_info_has_group ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
CString -> -- group_name : TBasicType TUTF8
IO CInt
recentInfoHasGroup ::
(MonadIO m) =>
RecentInfo -> -- _obj
T.Text -> -- group_name
m Bool
recentInfoHasGroup _obj group_name = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
group_name' <- textToCString group_name
result <- gtk_recent_info_has_group _obj' group_name'
let result' = (/= 0) result
touchManagedPtr _obj
freeMem group_name'
return result'
-- method RecentInfo::is_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_is_local" gtk_recent_info_is_local ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CInt
recentInfoIsLocal ::
(MonadIO m) =>
RecentInfo -> -- _obj
m Bool
recentInfoIsLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_is_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method RecentInfo::last_application
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_last_application" gtk_recent_info_last_application ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO CString
recentInfoLastApplication ::
(MonadIO m) =>
RecentInfo -> -- _obj
m T.Text
recentInfoLastApplication _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_last_application _obj'
checkUnexpectedReturnNULL "gtk_recent_info_last_application" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method RecentInfo::match
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info_b", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "info_b", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_match" gtk_recent_info_match ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
Ptr RecentInfo -> -- info_b : TInterface "Gtk" "RecentInfo"
IO CInt
recentInfoMatch ::
(MonadIO m) =>
RecentInfo -> -- _obj
RecentInfo -> -- info_b
m Bool
recentInfoMatch _obj info_b = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
let info_b' = unsafeManagedPtrGetPtr info_b
result <- gtk_recent_info_match _obj' info_b'
let result' = (/= 0) result
touchManagedPtr _obj
touchManagedPtr info_b
return result'
-- method RecentInfo::ref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RecentInfo"
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_ref" gtk_recent_info_ref ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO (Ptr RecentInfo)
recentInfoRef ::
(MonadIO m) =>
RecentInfo -> -- _obj
m RecentInfo
recentInfoRef _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
result <- gtk_recent_info_ref _obj'
checkUnexpectedReturnNULL "gtk_recent_info_ref" result
result' <- (wrapBoxed RecentInfo) result
touchManagedPtr _obj
return result'
-- method RecentInfo::unref
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RecentInfo", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False
foreign import ccall "gtk_recent_info_unref" gtk_recent_info_unref ::
Ptr RecentInfo -> -- _obj : TInterface "Gtk" "RecentInfo"
IO ()
recentInfoUnref ::
(MonadIO m) =>
RecentInfo -> -- _obj
m ()
recentInfoUnref _obj = liftIO $ do
let _obj' = unsafeManagedPtrGetPtr _obj
gtk_recent_info_unref _obj'
touchManagedPtr _obj
return ()