-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Parse files conforming to the xdg desktop entry spec
--   
--   Parse files conforming to the xdg desktop entry spec
@package xdg-desktop-entry
@version 0.1.1.1

-- | Implementation of version 1.2 of the freedesktop "Desktop Entry
--   specification", see
--   https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.2.html.
module System.Environment.XDG.DesktopEntry

-- | Desktop Entry. All attributes (key-value-pairs) are stored in an
--   association list.
data DesktopEntry
DesktopEntry :: DesktopEntryType -> FilePath -> [(String, String)] -> DesktopEntry
[deType] :: DesktopEntry -> DesktopEntryType

-- | unqualified filename, e.g. "firefox.desktop"
[deFilename] :: DesktopEntry -> FilePath

-- | Key-value pairs
[deAttributes] :: DesktopEntry -> [(String, String)]

-- | Return the command that should be executed when running this desktop
--   entry.
deCommand :: DesktopEntry -> Maybe String

-- | Return the proper comment of the desktop entry, depending on the list
--   of preferred languages.
deComment :: [String] -> DesktopEntry -> Maybe String

-- | Determine whether the Category attribute of a desktop entry contains a
--   given value.
deHasCategory :: DesktopEntry -> String -> Bool

-- | Return the Icon attribute
deIcon :: DesktopEntry -> Maybe String

-- | Return the proper name of the desktop entry, depending on the list of
--   preferred languages.
deName :: [String] -> DesktopEntry -> String

-- | Return True if the entry must not be displayed
deNoDisplay :: DesktopEntry -> Bool

-- | Return the categories in which the entry shall not be shown
deNotShowIn :: DesktopEntry -> [String]

-- | Return the categories in which the entry shall be shown
deOnlyShowIn :: DesktopEntry -> [String]

-- | Get all the text elements that could be interpreted as class names
--   from a DesktopEntry.
getClassNames :: DesktopEntry -> [String]

-- | Get all instances of DesktopEntry for all desktop entry files
--   that can be found by looking in the directories specified by the XDG
--   specification.
getDirectoryEntriesDefault :: IO [DesktopEntry]

-- | Retrieve a desktop entry with a specific name.
getDirectoryEntry :: [FilePath] -> String -> IO (Maybe DesktopEntry)

-- | Get a desktop entry with a specific name from the default directory
--   entry locations.
getDirectoryEntryDefault :: String -> IO (Maybe DesktopEntry)

-- | Get all of the XDG data directories (both global and user).
getXDGDataDirs :: IO [FilePath]

-- | Construct a Multimap where each DesktopEntry in the
--   provided foldable is indexed by the keys returned from the provided
--   indexing function.
indexDesktopEntriesBy :: Foldable t => (DesktopEntry -> [String]) -> t DesktopEntry -> MultiMap String DesktopEntry

-- | Construct a multimap where desktop entries are indexed by their class
--   names.
indexDesktopEntriesByClassName :: Foldable t => t DesktopEntry -> MultiMap String DesktopEntry

-- | Return a list of all desktop entries in the given directory.
listDesktopEntries :: String -> FilePath -> IO [DesktopEntry]

-- | Read a desktop entry from a file.
readDesktopEntry :: FilePath -> IO (Either (CPErrorData, String) DesktopEntry)
instance GHC.Classes.Eq System.Environment.XDG.DesktopEntry.DesktopEntryType
instance GHC.Show.Show System.Environment.XDG.DesktopEntry.DesktopEntryType
instance GHC.Read.Read System.Environment.XDG.DesktopEntry.DesktopEntryType
instance GHC.Classes.Eq System.Environment.XDG.DesktopEntry.DesktopEntry
instance GHC.Show.Show System.Environment.XDG.DesktopEntry.DesktopEntry
instance GHC.Read.Read System.Environment.XDG.DesktopEntry.DesktopEntry
