Mercurial > audlegacy
annotate src/libeggsmclient/eggdesktopfile.h @ 4650:31a4cc265f31
Removed the deprecated set_eq() function from InputPlugin and other places.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2008 06:37:18 +0300 |
parents | c942eaef7bc6 |
children |
rev | line source |
---|---|
4315
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
1 /* eggdesktopfile.h - Freedesktop.Org Desktop Files |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
2 * Copyright (C) 2007 Novell, Inc. |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
3 * |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
4 * This library is free software; you can redistribute it and/or |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
5 * modify it under the terms of the GNU Lesser General Public License |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
6 * as published by the Free Software Foundation; either version 2 of |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
7 * the License, or (at your option) any later version. |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
8 * |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
9 * This library is distributed in the hope that it will be useful, but |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
10 * WITHOUT ANY WARRANTY; without even the implied warranty of |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
12 * Lesser General Public License for more details. |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
13 * |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU Lesser General Public |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
15 * License along with this library; see the file COPYING.LIB. If not, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
16 * write to the Free Software Foundation, Inc., 59 Temple Place - |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
17 * Suite 330, Boston, MA 02111-1307, USA. |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
18 */ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
19 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
20 #ifndef __EGG_DESKTOP_FILE_H__ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
21 #define __EGG_DESKTOP_FILE_H__ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
22 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
23 #include <glib.h> |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
24 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
25 G_BEGIN_DECLS |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
26 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
27 typedef struct EggDesktopFile EggDesktopFile; |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
28 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
29 typedef enum { |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
30 EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
31 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
32 EGG_DESKTOP_FILE_TYPE_APPLICATION, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
33 EGG_DESKTOP_FILE_TYPE_LINK, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
34 EGG_DESKTOP_FILE_TYPE_DIRECTORY, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
35 } EggDesktopFileType; |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
36 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
37 EggDesktopFile *egg_desktop_file_new (const char *desktop_file_path, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
38 GError **error); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
39 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
40 EggDesktopFile *egg_desktop_file_new_from_data_dirs (const char *desktop_file_path, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
41 GError **error); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
42 EggDesktopFile *egg_desktop_file_new_from_key_file (GKeyFile *desktop, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
43 const char *source, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
44 GError **error); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
45 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
46 void egg_desktop_file_free (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
47 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
48 GKeyFile *egg_desktop_file_get_key_file (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
49 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
50 const char *egg_desktop_file_get_source (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
51 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
52 EggDesktopFileType egg_desktop_file_get_desktop_file_type (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
53 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
54 const char *egg_desktop_file_get_name (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
55 const char *egg_desktop_file_get_icon (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
56 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
57 gboolean egg_desktop_file_can_launch (EggDesktopFile *desktop_file, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
58 const char *desktop_environment); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
59 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
60 gboolean egg_desktop_file_accepts_documents (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
61 gboolean egg_desktop_file_accepts_multiple (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
62 gboolean egg_desktop_file_accepts_uris (EggDesktopFile *desktop_file); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
63 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
64 char *egg_desktop_file_parse_exec (EggDesktopFile *desktop_file, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
65 GSList *documents, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
66 GError **error); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
67 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
68 gboolean egg_desktop_file_launch (EggDesktopFile *desktop_file, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
69 GSList *documents, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
70 GError **error, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
71 ...) G_GNUC_NULL_TERMINATED; |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
72 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
73 typedef enum { |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
74 EGG_DESKTOP_FILE_LAUNCH_CLEARENV = 1, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
75 EGG_DESKTOP_FILE_LAUNCH_PUTENV, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
76 EGG_DESKTOP_FILE_LAUNCH_SCREEN, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
77 EGG_DESKTOP_FILE_LAUNCH_WORKSPACE, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
78 EGG_DESKTOP_FILE_LAUNCH_DIRECTORY, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
79 EGG_DESKTOP_FILE_LAUNCH_TIME, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
80 EGG_DESKTOP_FILE_LAUNCH_FLAGS, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
81 EGG_DESKTOP_FILE_LAUNCH_SETUP_FUNC, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
82 EGG_DESKTOP_FILE_LAUNCH_RETURN_PID, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
83 EGG_DESKTOP_FILE_LAUNCH_RETURN_STDIN_PIPE, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
84 EGG_DESKTOP_FILE_LAUNCH_RETURN_STDOUT_PIPE, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
85 EGG_DESKTOP_FILE_LAUNCH_RETURN_STDERR_PIPE, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
86 EGG_DESKTOP_FILE_LAUNCH_RETURN_STARTUP_ID |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
87 } EggDesktopFileLaunchOption; |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
88 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
89 /* Standard Keys */ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
90 #define EGG_DESKTOP_FILE_GROUP "Desktop Entry" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
91 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
92 #define EGG_DESKTOP_FILE_KEY_TYPE "Type" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
93 #define EGG_DESKTOP_FILE_KEY_VERSION "Version" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
94 #define EGG_DESKTOP_FILE_KEY_NAME "Name" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
95 #define EGG_DESKTOP_FILE_KEY_GENERIC_NAME "GenericName" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
96 #define EGG_DESKTOP_FILE_KEY_NO_DISPLAY "NoDisplay" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
97 #define EGG_DESKTOP_FILE_KEY_COMMENT "Comment" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
98 #define EGG_DESKTOP_FILE_KEY_ICON "Icon" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
99 #define EGG_DESKTOP_FILE_KEY_HIDDEN "Hidden" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
100 #define EGG_DESKTOP_FILE_KEY_ONLY_SHOW_IN "OnlyShowIn" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
101 #define EGG_DESKTOP_FILE_KEY_NOT_SHOW_IN "NotShowIn" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
102 #define EGG_DESKTOP_FILE_KEY_TRY_EXEC "TryExec" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
103 #define EGG_DESKTOP_FILE_KEY_EXEC "Exec" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
104 #define EGG_DESKTOP_FILE_KEY_PATH "Path" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
105 #define EGG_DESKTOP_FILE_KEY_TERMINAL "Terminal" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
106 #define EGG_DESKTOP_FILE_KEY_MIME_TYPE "MimeType" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
107 #define EGG_DESKTOP_FILE_KEY_CATEGORIES "Categories" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
108 #define EGG_DESKTOP_FILE_KEY_STARTUP_NOTIFY "StartupNotify" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
109 #define EGG_DESKTOP_FILE_KEY_STARTUP_WM_CLASS "StartupWMClass" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
110 #define EGG_DESKTOP_FILE_KEY_URL "URL" |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
111 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
112 /* Errors */ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
113 #define EGG_DESKTOP_FILE_ERROR egg_desktop_file_error_quark() |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
114 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
115 GQuark egg_desktop_file_error_quark (void); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
116 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
117 typedef enum { |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
118 EGG_DESKTOP_FILE_ERROR_INVALID, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
119 EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
120 EGG_DESKTOP_FILE_ERROR_UNRECOGNIZED_OPTION, |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
121 } EggDesktopFileError; |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
122 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
123 /* Global application desktop file */ |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
124 void egg_set_desktop_file (const char *desktop_file_path); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
125 EggDesktopFile *egg_get_desktop_file (void); |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
126 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
127 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
128 G_END_DECLS |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
129 |
c942eaef7bc6
Implement session management.
Ivan N. Zlatev <contact@i-nz.net>
parents:
diff
changeset
|
130 #endif /* __EGG_DESKTOP_FILE_H__ */ |