diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-10-18 05:54:51 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-10-18 05:54:51 +0800 |
commit | c4f0f138e21b189ce04cfe07ccbd5184205c8df9 (patch) | |
tree | 3828a447111acba02a1dbd59e0cf9c1c61a7d6f0 /lib/egg/eggdesktopfile.h | |
parent | efbf42491d8a8c99db911be9c20cba68424c0b3f (diff) | |
download | gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar.gz gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar.bz2 gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar.lz gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar.xz gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.tar.zst gsoc2013-epiphany-c4f0f138e21b189ce04cfe07ccbd5184205c8df9.zip |
Update from libegg
svn path=/trunk/; revision=8584
Diffstat (limited to 'lib/egg/eggdesktopfile.h')
-rw-r--r-- | lib/egg/eggdesktopfile.h | 43 |
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 */ |