2 * By Tony Houghton, <h@realh.co.uk>.
25 /* Returns FALSE if invalid; you should then call desktop_entry_free/delete */
26 gboolean
desktop_entry_load(DesktopEntry
*, const char *pathname
,
27 const char *basename
, gboolean keep_keyfile
, gboolean savable
);
29 /* Fills in some of the fields from the (already open) keyfile */
30 void desktop_entry_read_keyfile(DesktopEntry
*);
32 /* Doesn't free the top-level struct */
33 void desktop_entry_free(DesktopEntry
*);
35 /* Does free the top-level struct */
36 void desktop_entry_delete(DesktopEntry
*);
38 /* Closes keyfile once loaded (read-only) */
39 DesktopEntry
*desktop_entry_new(const char *pathname
, const char *basename
,
42 /* desktop_entry_new() can be used as a constructor */
43 typedef DesktopEntry
*(DesktopEntryConstructor
)
44 (const char *pathname
, const char *basename
, gboolean savable
);
46 /* Whether (copy of) s is in v */
47 gboolean
desktop_entry_str_in_strv(char **v
, const char *s
);
49 /* Returns whether entry should be started in environ
50 * based on OnlyShowIn and NotShowIn */
51 gboolean
desktop_entry_get_show_in_environ(const DesktopEntry
*,
54 inline static gboolean
desktop_entry_get_show_in_rox(const DesktopEntry
*de
)
56 return desktop_entry_get_show_in_environ(de
, "ROX");
59 /* Also checks Exec and TryExec */
60 gboolean
desktop_entry_can_start_in_rox(const DesktopEntry
*);
63 /* Scans XDG autostart directories for desktop files;
64 * ctor should be similar to desktop_entry_new() */
65 GList
*get_desktop_entries(DesktopEntryConstructor ctor
);
67 inline static gboolean
str_is_empty(const char *s
)
72 gboolean
str_v_is_empty(char **sv
);
74 #endif /* XDGAUTOSTART_H */