aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/eggdesktopfile.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/egg/eggdesktopfile.h')
-rw-r--r--lib/egg/eggdesktopfile.h43
1 files changed, 36 insertions, 7 deletions
diff --git a/lib/egg/eggdesktopfile.h b/lib/egg/eggdesktopfile.h
index f1305413e..f8a3d3e03 100644
--- a/lib/egg/eggdesktopfile.h
+++ b/lib/egg/eggdesktopfile.h
@@ -31,22 +31,23 @@ typedef enum {
EGG_DESKTOP_FILE_TYPE_APPLICATION,
EGG_DESKTOP_FILE_TYPE_LINK,
- EGG_DESKTOP_FILE_TYPE_DIRECTORY,
+ EGG_DESKTOP_FILE_TYPE_DIRECTORY
} EggDesktopFileType;
EggDesktopFile *egg_desktop_file_new (const char *desktop_file_path,
GError **error);
-EggDesktopFile *egg_desktop_file_new_from_data_dirs (const char *desktop_file_path,
- GError **error);
-EggDesktopFile *egg_desktop_file_new_from_key_file (GKeyFile *desktop,
+EggDesktopFile *egg_desktop_file_new_from_data_dirs (const char *desktop_file_path,
+ GError **error);
+EggDesktopFile *egg_desktop_file_new_from_dirs (const char *desktop_file_path,
+ const char **search_dirs,
+ GError **error);
+EggDesktopFile *egg_desktop_file_new_from_key_file (GKeyFile *key_file,
const char *source,
GError **error);
void egg_desktop_file_free (EggDesktopFile *desktop_file);
-GKeyFile *egg_desktop_file_get_key_file (EggDesktopFile *desktop_file);
-
const char *egg_desktop_file_get_source (EggDesktopFile *desktop_file);
EggDesktopFileType egg_desktop_file_get_desktop_file_type (EggDesktopFile *desktop_file);
@@ -109,6 +110,34 @@ typedef enum {
#define EGG_DESKTOP_FILE_KEY_STARTUP_WM_CLASS "StartupWMClass"
#define EGG_DESKTOP_FILE_KEY_URL "URL"
+/* Accessors */
+gboolean egg_desktop_file_has_key (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error);
+char *egg_desktop_file_get_string (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error) G_GNUC_MALLOC;
+char *egg_desktop_file_get_locale_string (EggDesktopFile *desktop_file,
+ const char *key,
+ const char *locale,
+ GError **error) G_GNUC_MALLOC;
+gboolean egg_desktop_file_get_boolean (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error);
+double egg_desktop_file_get_numeric (EggDesktopFile *desktop_file,
+ const char *key,
+ GError **error);
+char **egg_desktop_file_get_string_list (EggDesktopFile *desktop_file,
+ const char *key,
+ gsize *length,
+ GError **error) G_GNUC_MALLOC;
+char **egg_desktop_file_get_locale_string_list (EggDesktopFile *desktop_file,
+ const char *key,
+ const char *locale,
+ gsize *length,
+ GError **error) G_GNUC_MALLOC;
+
+
/* Errors */
#define EGG_DESKTOP_FILE_ERROR egg_desktop_file_error_quark()
@@ -117,7 +146,7 @@ GQuark egg_desktop_file_error_quark (void);
typedef enum {
EGG_DESKTOP_FILE_ERROR_INVALID,
EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE,
- EGG_DESKTOP_FILE_ERROR_UNRECOGNIZED_OPTION,
+ EGG_DESKTOP_FILE_ERROR_UNRECOGNIZED_OPTION
} EggDesktopFileError;
/* Global application desktop file */