00001
00002
00003 #ifndef _LIBGNOMEMM_PROGRAM_H
00004 #define _LIBGNOMEMM_PROGRAM_H
00005
00006 #include <glibmm.h>
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <glibmm/object.h>
00031 #include <glibmm/slisthandle.h>
00032
00033
00034
00035 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00036 typedef struct _GnomeProgram GnomeProgram;
00037 typedef struct _GnomeProgramClass GnomeProgramClass;
00038 #endif
00039
00040
00041 namespace Gnome
00042 { class Program_Class; }
00043 namespace Gnome
00044 {
00045
00046
00052 enum FileDomain
00053 {
00054 FILE_DOMAIN_UNKNOWN,
00055 FILE_DOMAIN_LIBDIR,
00056 FILE_DOMAIN_DATADIR,
00057 FILE_DOMAIN_SOUND,
00058 FILE_DOMAIN_PIXMAP,
00059 FILE_DOMAIN_CONFIG,
00060 FILE_DOMAIN_HELP,
00061 FILE_DOMAIN_APP_LIBDIR,
00062 FILE_DOMAIN_APP_DATADIR,
00063 FILE_DOMAIN_APP_SOUND,
00064 FILE_DOMAIN_APP_PIXMAP,
00065 FILE_DOMAIN_APP_CONFIG,
00066 FILE_DOMAIN_APP_HELP
00067 };
00068
00069 }
00070
00071
00072 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00073 namespace Glib
00074 {
00075
00076 template <>
00077 class Value<Gnome::FileDomain> : public Glib::Value_Enum<Gnome::FileDomain>
00078 {
00079 public:
00080 static GType value_type() G_GNUC_CONST;
00081 };
00082
00083 }
00084 #endif
00085
00086
00087 namespace Gnome
00088 {
00089
00090
00095 class Program : public Glib::Object
00096 {
00097
00098 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00099
00100 public:
00101 typedef Program CppObjectType;
00102 typedef Program_Class CppClassType;
00103 typedef GnomeProgram BaseObjectType;
00104 typedef GnomeProgramClass BaseClassType;
00105
00106 private: friend class Program_Class;
00107 static CppClassType program_class_;
00108
00109 private:
00110
00111 Program(const Program&);
00112 Program& operator=(const Program&);
00113
00114 protected:
00115 explicit Program(const Glib::ConstructParams& construct_params);
00116 explicit Program(GnomeProgram* castitem);
00117
00118 #endif
00119
00120 public:
00121 virtual ~Program();
00122
00123 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00124 static GType get_type() G_GNUC_CONST;
00125 static GType get_base_type() G_GNUC_CONST;
00126 #endif
00127
00129 GnomeProgram* gobj() { return reinterpret_cast<GnomeProgram*>(gobject_); }
00130
00132 const GnomeProgram* gobj() const { return reinterpret_cast<GnomeProgram*>(gobject_); }
00133
00134 GnomeProgram* gobj_copy();
00135
00136 private:
00137
00138 public:
00139
00140
00141 static Glib::RefPtr<Program> get();
00142
00143
00144 Glib::ustring get_human_readable_name() const;
00145
00146 Glib::ustring get_app_id() const;
00147
00148 Glib::ustring get_app_version() const;
00149
00150 Glib::ustring locate_file(FileDomain domain, const Glib::ustring& file_name, bool only_if_exists = true);
00151 Glib::SListHandle<Glib::ustring> locate_file_multiple(FileDomain domain, const Glib::ustring& file_name, bool only_if_exists = true);
00152
00153
00154 public:
00155
00156 public:
00157
00158
00159 protected:
00160
00161
00162
00163
00164
00165 };
00166
00167 }
00168
00169
00170 namespace Glib
00171 {
00173 Glib::RefPtr<Gnome::Program> wrap(GnomeProgram* object, bool take_copy = false);
00174 }
00175
00176
00177 #endif
00178