    {-# LINE 2 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Widget RecentInfo
    --
    -- Author : Andy Stewart
    --
    -- Created: 27 Mar 2010
    --
    -- Copyright (C) 2010 Andy Stewart
    --
    -- This library is free software; you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public
    -- License as published by the Free Software Foundation; either
    -- version 2.1 of the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    --
    module Graphics.UI.Gtk.Recent.RecentInfo (

    -- * Types
      RecentInfo,
      mkRecentInfo,

    -- * Methods
      recentInfoExists,
      recentInfoGetAdded,
      recentInfoGetAge,
      recentInfoGetApplicationInfo,
      recentInfoGetApplications,
      recentInfoGetDescription,
      recentInfoGetDisplayName,
      recentInfoGetGroups,
      recentInfoGetIcon,
      recentInfoGetMimeType,
      recentInfoGetModified,
      recentInfoGetPrivateHint,
      recentInfoGetShortName,
      recentInfoGetURI,
      recentInfoGetURIDisplay,
      recentInfoGetVisited,
      recentInfoHasApplication,
      recentInfoHasGroup,
      recentInfoIsLocal,
      recentInfoLastApplication,
      recentInfoMatch,

      ) where

    import Control.Monad (liftM)

    import System.Glib.FFI
    import System.Glib.UTFString
    import Graphics.UI.Gtk.Types
    {-# LINE 66 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}

    {-# LINE 68 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}

    --------------------
    -- Types
    newtype RecentInfo = RecentInfo (ForeignPtr (RecentInfo))
    {-# LINE 72 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}

    --------------------
    -- Methods

    -- | Helper function for build 'RecentInfo'
    mkRecentInfo :: Ptr RecentInfo -> IO RecentInfo
    mkRecentInfo :: Ptr RecentInfo -> IO RecentInfo
    mkRecentInfo Ptr RecentInfo
    rPtr = do
      info <- Ptr RecentInfo
    -> FinalizerPtr RecentInfo -> IO (ForeignPtr RecentInfo)
    forall a. Ptr a -> FinalizerPtr a -> IO (ForeignPtr a)
    newForeignPtr Ptr RecentInfo
    rPtr FinalizerPtr RecentInfo
    gtk_recent_info_unref
      return (RecentInfo info)

    foreign import ccall unsafe "&gtk_recent_info_unref"
      gtk_recent_info_unref :: FinalizerPtr RecentInfo

    -- | Checks whether the resource pointed by info still exists. At the moment this check is done only on
    -- resources pointing to local files.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoExists :: RecentInfo
                     -> IO Bool -- ^ returns 'True' if the resource exists
    recentInfoExists :: RecentInfo -> IO Bool
    recentInfoExists RecentInfo
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CInt
    gtk_recent_info_exists Ptr RecentInfo
    argPtr1)
    {-# LINE 95 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Gets the timestamp (seconds from system's Epoch) when the resource was added to the recently used
    -- resources list.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetAdded :: RecentInfo
                       -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was added to the list, or -1 on failure.
    recentInfoGetAdded :: RecentInfo -> IO Int
    recentInfoGetAdded RecentInfo
    self =
      (CLong -> Int) -> IO CLong -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CLong -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CLong -> IO Int) -> IO CLong -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CLong) -> IO CLong)
    -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CLong
    gtk_recent_info_get_added Ptr RecentInfo
    argPtr1)
    {-# LINE 107 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Gets the number of days elapsed since the last update of the resource pointed by info.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetAge :: RecentInfo
                     -> IO Int -- ^ returns a positive integer containing the number of days elapsed since the time this resource was last modified.
    recentInfoGetAge :: RecentInfo -> IO Int
    recentInfoGetAge RecentInfo
    self =
      (CInt -> Int) -> IO CInt -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CInt
    gtk_recent_info_get_age Ptr RecentInfo
    argPtr1)
    {-# LINE 118 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Gets the data regarding the application that has registered the resource pointed by info.
    --
    -- If the command line contains any escape characters defined inside the storage specification, they
    -- will be expanded.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetApplicationInfo :: GlibString string => RecentInfo
                                 -> string -- ^ @appName@ the name of the application that has registered this item
                                 -> IO (Maybe ([string], Int, Int))
                                  -- ^ @appExec@ return location for the string containing the command line. transfer none.
                                  -- ^ @count@ return location for the number of times this item was registered. out.
                                  -- ^ @time@ out. out.
    recentInfoGetApplicationInfo :: forall string.
    GlibString string =>
    RecentInfo -> string -> IO (Maybe ([string], Int, Int))
    recentInfoGetApplicationInfo RecentInfo
    self string
    appName =
      (Ptr CUInt -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CUInt -> IO (Maybe ([string], Int, Int)))
     -> IO (Maybe ([string], Int, Int)))
    -> (Ptr CUInt -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr CUInt
    countPtr ->
      (Ptr CLong -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CLong -> IO (Maybe ([string], Int, Int)))
     -> IO (Maybe ([string], Int, Int)))
    -> (Ptr CLong -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr CLong
    timePtr ->
      Int
    -> (Ptr (Ptr CChar) -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. Storable a => Int -> (Ptr a -> IO b) -> IO b
    allocaArray Int
    0 ((Ptr (Ptr CChar) -> IO (Maybe ([string], Int, Int)))
     -> IO (Maybe ([string], Int, Int)))
    -> (Ptr (Ptr CChar) -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr (Ptr CChar)
    execPtr ->
      string
    -> (Ptr CChar -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    appName ((Ptr CChar -> IO (Maybe ([string], Int, Int)))
     -> IO (Maybe ([string], Int, Int)))
    -> (Ptr CChar -> IO (Maybe ([string], Int, Int)))
    -> IO (Maybe ([string], Int, Int))
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    appNamePtr -> do
        success <- (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
                  (\(RecentInfo ForeignPtr RecentInfo
    arg1) Ptr CChar
    arg2 Ptr (Ptr CChar)
    arg3 Ptr CUInt
    arg4 Ptr CLong
    arg5 -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo
    -> Ptr CChar
    -> Ptr (Ptr CChar)
    -> Ptr CUInt
    -> Ptr CLong
    -> IO CInt
    gtk_recent_info_get_application_info Ptr RecentInfo
    argPtr1 Ptr CChar
    arg2 Ptr (Ptr CChar)
    arg3 Ptr CUInt
    arg4 Ptr CLong
    arg5)
    {-# LINE 140 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
                    RecentInfo
    self
                    Ptr CChar
    appNamePtr
                    Ptr (Ptr CChar)
    execPtr
                    Ptr CUInt
    countPtr
                    Ptr CLong
    timePtr
        if success
           then do
             exec <- mapM peekUTFString =<< peekArray 0 execPtr
             count <- peek countPtr
             time <- peek timePtr
             return (Just (exec, fromIntegral count, fromIntegral time))
           else return Nothing

    -- | Retrieves the list of applications that have registered this resource.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetApplications :: GlibString string => RecentInfo -> IO [string]
    recentInfoGetApplications :: forall string. GlibString string => RecentInfo -> IO [string]
    recentInfoGetApplications RecentInfo
    self =
      (Ptr CULong -> IO [string]) -> IO [string]
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CULong -> IO [string]) -> IO [string])
    -> (Ptr CULong -> IO [string]) -> IO [string]
    forall a b. (a -> b) -> a -> b
    $ \Ptr CULong
    lengthPtr -> do
        str <- (\(RecentInfo ForeignPtr RecentInfo
    arg1) Ptr CULong
    arg2 -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar)))
    -> (Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> Ptr CULong -> IO (Ptr (Ptr CChar))
    gtk_recent_info_get_applications Ptr RecentInfo
    argPtr1 Ptr CULong
    arg2) RecentInfo
    self Ptr CULong
    lengthPtr
        length <- peek lengthPtr
        mapM peekUTFString =<< peekArray (fromIntegral length) str

    -- | Gets the (short) description of the resource.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetDescription :: GlibString string => RecentInfo
                             -> IO string -- ^ returns the description of the resource.
    recentInfoGetDescription :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetDescription RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_description Ptr RecentInfo
    argPtr1)
    {-# LINE 172 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Gets the name of the resource. If none has been defined, the basename of the resource is obtained.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetDisplayName :: GlibString string => RecentInfo
                             -> IO string -- ^ returns the display name of the resource.
    recentInfoGetDisplayName :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetDisplayName RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_display_name Ptr RecentInfo
    argPtr1)
    {-# LINE 183 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Returns all groups registered for the recently used item info.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetGroups :: GlibString string => RecentInfo -> IO [string]
    recentInfoGetGroups :: forall string. GlibString string => RecentInfo -> IO [string]
    recentInfoGetGroups RecentInfo
    self =
      (Ptr CULong -> IO [string]) -> IO [string]
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr CULong -> IO [string]) -> IO [string])
    -> (Ptr CULong -> IO [string]) -> IO [string]
    forall a b. (a -> b) -> a -> b
    $ \Ptr CULong
    lengthPtr -> do
        str <- (\(RecentInfo ForeignPtr RecentInfo
    arg1) Ptr CULong
    arg2 -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar)))
    -> (Ptr RecentInfo -> IO (Ptr (Ptr CChar))) -> IO (Ptr (Ptr CChar))
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> Ptr CULong -> IO (Ptr (Ptr CChar))
    gtk_recent_info_get_groups Ptr RecentInfo
    argPtr1 Ptr CULong
    arg2) RecentInfo
    self Ptr CULong
    lengthPtr
        length <- peek lengthPtr
        mapM peekUTFString =<< peekArray (fromIntegral length) str

    -- | Retrieves the icon of size size associated to the resource MIME type.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetIcon :: RecentInfo
                      -> Int -- ^ @size@ the size of the icon in pixels
                      -> IO (Maybe Pixbuf) -- ^ returns a 'Pixbuf' containing the icon, or 'Nothing'
    recentInfoGetIcon :: RecentInfo -> Int -> IO (Maybe Pixbuf)
    recentInfoGetIcon RecentInfo
    self Int
    size =
      (IO (Ptr Pixbuf) -> IO Pixbuf)
    -> IO (Ptr Pixbuf) -> IO (Maybe Pixbuf)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Pixbuf -> Pixbuf, FinalizerPtr Pixbuf)
    -> IO (Ptr Pixbuf) -> IO Pixbuf
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr Pixbuf -> Pixbuf, FinalizerPtr Pixbuf)
    forall {a}. (ForeignPtr Pixbuf -> Pixbuf, FinalizerPtr a)
    mkPixbuf) (IO (Ptr Pixbuf) -> IO (Maybe Pixbuf))
    -> IO (Ptr Pixbuf) -> IO (Maybe Pixbuf)
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) CInt
    arg2 -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf))
    -> (Ptr RecentInfo -> IO (Ptr Pixbuf)) -> IO (Ptr Pixbuf)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> CInt -> IO (Ptr Pixbuf)
    gtk_recent_info_get_icon Ptr RecentInfo
    argPtr1 CInt
    arg2)
    {-# LINE 207 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
        (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    size)

    -- | Gets the MIME type of the resource.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetMimeType :: GlibString string => RecentInfo
                          -> IO string -- ^ returns the MIME type of the resource.
    recentInfoGetMimeType :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetMimeType RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_mime_type Ptr RecentInfo
    argPtr1)
    {-# LINE 218 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Gets the timestamp (seconds from system's Epoch) when the resource was last modified.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetModified :: RecentInfo
                          -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was last modified, or -1 on failure.
    recentInfoGetModified :: RecentInfo -> IO Int
    recentInfoGetModified RecentInfo
    self =
      (CLong -> Int) -> IO CLong -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CLong -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CLong -> IO Int) -> IO CLong -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CLong) -> IO CLong)
    -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CLong
    gtk_recent_info_get_modified Ptr RecentInfo
    argPtr1)
    {-# LINE 230 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Gets the value of the "private" flag. Resources in the recently used list that have this flag set to
    -- 'True' should only be displayed by the applications that have registered them.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetPrivateHint :: RecentInfo
                             -> IO Bool -- ^ returns 'True' if the private flag was found, 'False' otherwise.
    recentInfoGetPrivateHint :: RecentInfo -> IO Bool
    recentInfoGetPrivateHint RecentInfo
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CInt
    gtk_recent_info_get_private_hint Ptr RecentInfo
    argPtr1)
    {-# LINE 242 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Computes a valid UTF-8 string that can be used as the name of the item in a menu or list. For
    -- example, calling this function on an item that refers to \"file:///foo/bar.txt\" will yield \"bar.txt\".
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetShortName :: GlibString string => RecentInfo
                           -> IO string
    recentInfoGetShortName :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetShortName RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_short_name Ptr RecentInfo
    argPtr1)
    {-# LINE 253 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    readUTFString

    -- | Gets the URI of the resource.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetURI :: GlibString string => RecentInfo
                     -> IO string -- ^ returns the URI of the resource.
    recentInfoGetURI :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetURI RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_uri Ptr RecentInfo
    argPtr1)
    {-# LINE 264 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    peekUTFString

    -- | Gets a displayable version of the resource's URI. If the resource is local, it returns a local path;
    -- if the resource is not local, it returns the UTF-8 encoded content of 'recentInfoGetUri'.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetURIDisplay :: GlibString string => RecentInfo -> IO string
    recentInfoGetURIDisplay :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoGetURIDisplay RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_get_uri_display Ptr RecentInfo
    argPtr1)
    {-# LINE 275 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    readUTFString

    -- | Gets the timestamp (seconds from system's Epoch) when the resource was last visited.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoGetVisited :: RecentInfo
                         -> IO Int -- ^ returns the number of seconds elapsed from system's Epoch when the resource was last visited, or -1 on failure.
    recentInfoGetVisited :: RecentInfo -> IO Int
    recentInfoGetVisited RecentInfo
    self =
      (CLong -> Int) -> IO CLong -> IO Int
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CLong -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CLong -> IO Int) -> IO CLong -> IO Int
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CLong) -> IO CLong)
    -> (Ptr RecentInfo -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CLong
    gtk_recent_info_get_visited Ptr RecentInfo
    argPtr1)
    {-# LINE 287 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Checks whether an application registered this resource using @appName@.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoHasApplication :: GlibString string => RecentInfo
                             -> string -- ^ @appName@ a string containing an application name
                             -> IO Bool -- ^ returns 'True' if an application with name @appName@ was found, 'False' otherwise.
    recentInfoHasApplication :: forall string. GlibString string => RecentInfo -> string -> IO Bool
    recentInfoHasApplication RecentInfo
    self string
    appName =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      string -> (Ptr CChar -> IO CInt) -> IO CInt
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    appName ((Ptr CChar -> IO CInt) -> IO CInt)
    -> (Ptr CChar -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    appNamePtr ->
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) Ptr CChar
    arg2 -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> Ptr CChar -> IO CInt
    gtk_recent_info_has_application Ptr RecentInfo
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 300 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
        Ptr CChar
    appNamePtr

    -- | Checks whether @groupName@ appears inside the groups registered for the recently used item info.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoHasGroup :: GlibString string => RecentInfo
                       -> string -- ^ @groupName@ name of a group
                       -> IO Bool -- ^ returns 'True' if the group was found.
    recentInfoHasGroup :: forall string. GlibString string => RecentInfo -> string -> IO Bool
    recentInfoHasGroup RecentInfo
    self string
    groupName =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      string -> (Ptr CChar -> IO CInt) -> IO CInt
    forall a. string -> (Ptr CChar -> IO a) -> IO a
    forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
    withUTFString string
    groupName ((Ptr CChar -> IO CInt) -> IO CInt)
    -> (Ptr CChar -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr CChar
    groupNamePtr ->
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) Ptr CChar
    arg2 -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> Ptr CChar -> IO CInt
    gtk_recent_info_has_group Ptr RecentInfo
    argPtr1 Ptr CChar
    arg2)
    {-# LINE 314 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
        Ptr CChar
    groupNamePtr

    -- | Checks whether the resource is local or not by looking at the scheme of its URI.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoIsLocal :: RecentInfo
                      -> IO Bool -- ^ returns 'True' if the resource is local.
    recentInfoIsLocal :: RecentInfo -> IO Bool
    recentInfoIsLocal RecentInfo
    self =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO CInt
    gtk_recent_info_is_local Ptr RecentInfo
    argPtr1)
    {-# LINE 326 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self

    -- | Gets the name of the last application that have registered the recently used resource represented by
    -- info.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoLastApplication :: GlibString string => RecentInfo
                              -> IO string -- ^ returns an application name.
    recentInfoLastApplication :: forall string. GlibString string => RecentInfo -> IO string
    recentInfoLastApplication RecentInfo
    self =
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) -> ForeignPtr RecentInfo
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar))
    -> (Ptr RecentInfo -> IO (Ptr CChar)) -> IO (Ptr CChar)
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->Ptr RecentInfo -> IO (Ptr CChar)
    gtk_recent_info_last_application Ptr RecentInfo
    argPtr1)
    {-# LINE 337 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
      IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CChar -> IO string
    forall s. GlibString s => Ptr CChar -> IO s
    readUTFString

    -- | Checks whether two 'RecentInfo' structures point to the same resource.
    --
    -- * Available since Gtk+ version 2.10
    --
    recentInfoMatch :: RecentInfo -> RecentInfo
                    -> IO Bool -- ^ returns 'True' if both 'RecentInfo' structures point to se same resource, 'False' otherwise.
    recentInfoMatch :: RecentInfo -> RecentInfo -> IO Bool
    recentInfoMatch RecentInfo
    self RecentInfo
    infoB =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      (\(RecentInfo ForeignPtr RecentInfo
    arg1) (RecentInfo ForeignPtr RecentInfo
    arg2) -> ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg1 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr1 ->ForeignPtr RecentInfo -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr RecentInfo
    arg2 ((Ptr RecentInfo -> IO CInt) -> IO CInt)
    -> (Ptr RecentInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr RecentInfo
    argPtr2 ->Ptr RecentInfo -> Ptr RecentInfo -> IO CInt
    gtk_recent_info_match Ptr RecentInfo
    argPtr1 Ptr RecentInfo
    argPtr2)
    {-# LINE 349 "./Graphics/UI/Gtk/Recent/RecentInfo.chs" #-}
        self
        RecentInfo
    infoB

    foreign import ccall safe "gtk_recent_info_exists"
      gtk_recent_info_exists :: ((Ptr RecentInfo) -> (IO CInt))

    foreign import ccall safe "gtk_recent_info_get_added"
      gtk_recent_info_get_added :: ((Ptr RecentInfo) -> (IO CLong))

    foreign import ccall safe "gtk_recent_info_get_age"
      gtk_recent_info_get_age :: ((Ptr RecentInfo) -> (IO CInt))

    foreign import ccall safe "gtk_recent_info_get_application_info"
      gtk_recent_info_get_application_info :: ((Ptr RecentInfo) -> ((Ptr CChar) -> ((Ptr (Ptr CChar)) -> ((Ptr CUInt) -> ((Ptr CLong) -> (IO CInt))))))

    foreign import ccall safe "gtk_recent_info_get_applications"
      gtk_recent_info_get_applications :: ((Ptr RecentInfo) -> ((Ptr CULong) -> (IO (Ptr (Ptr CChar)))))

    foreign import ccall safe "gtk_recent_info_get_description"
      gtk_recent_info_get_description :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_display_name"
      gtk_recent_info_get_display_name :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_groups"
      gtk_recent_info_get_groups :: ((Ptr RecentInfo) -> ((Ptr CULong) -> (IO (Ptr (Ptr CChar)))))

    foreign import ccall safe "gtk_recent_info_get_icon"
      gtk_recent_info_get_icon :: ((Ptr RecentInfo) -> (CInt -> (IO (Ptr Pixbuf))))

    foreign import ccall safe "gtk_recent_info_get_mime_type"
      gtk_recent_info_get_mime_type :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_modified"
      gtk_recent_info_get_modified :: ((Ptr RecentInfo) -> (IO CLong))

    foreign import ccall safe "gtk_recent_info_get_private_hint"
      gtk_recent_info_get_private_hint :: ((Ptr RecentInfo) -> (IO CInt))

    foreign import ccall safe "gtk_recent_info_get_short_name"
      gtk_recent_info_get_short_name :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_uri"
      gtk_recent_info_get_uri :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_uri_display"
      gtk_recent_info_get_uri_display :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_get_visited"
      gtk_recent_info_get_visited :: ((Ptr RecentInfo) -> (IO CLong))

    foreign import ccall safe "gtk_recent_info_has_application"
      gtk_recent_info_has_application :: ((Ptr RecentInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_recent_info_has_group"
      gtk_recent_info_has_group :: ((Ptr RecentInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "gtk_recent_info_is_local"
      gtk_recent_info_is_local :: ((Ptr RecentInfo) -> (IO CInt))

    foreign import ccall safe "gtk_recent_info_last_application"
      gtk_recent_info_last_application :: ((Ptr RecentInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "gtk_recent_info_match"
      gtk_recent_info_match :: ((Ptr RecentInfo) -> ((Ptr RecentInfo) -> (IO CInt)))