Ardour  8.7-14-g57a6773833
icontheme.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_ICONTHEME_H
4 #define _GTKMM_ICONTHEME_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* Copyright (C) 2003 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26 
27 #include <gdkmm/pixbuf.h>
28 #include <gdkmm/screen.h>
29 
30 #include <gtkmm/iconinfo.h>
31 #include <giomm/icon.h>
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkIconTheme GtkIconTheme;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 namespace Gtk
42 { class IconTheme_Class; } // namespace Gtk
43 #endif //DOXYGEN_SHOULD_SKIP_THIS
44 
45 namespace Gtk
46 {
47 
63 {
68  ICON_LOOKUP_FORCE_SIZE = 1 << 4
69 };
70 
73  { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
74 
77  { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
78 
81  { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
82 
85  { return static_cast<IconLookupFlags>(~static_cast<unsigned>(flags)); }
86 
89  { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
90 
93  { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
94 
97  { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
98 
99 
102 class IconThemeError : public Glib::Error
103 {
104 public:
107  enum Code
108  {
111  };
112 
113  IconThemeError(Code error_code, const Glib::ustring& error_message);
114  explicit IconThemeError(GError* gobject);
115  Code code() const;
116 
117 #ifndef DOXYGEN_SHOULD_SKIP_THIS
118 private:
119 
120  static void throw_func(GError* gobject);
121 
122  friend void wrap_init(); // uses throw_func()
123 
124  #endif //DOXYGEN_SHOULD_SKIP_THIS
125 };
126 
127 } // namespace Gtk
128 
129 #ifndef DOXYGEN_SHOULD_SKIP_THIS
130 namespace Glib
131 {
132 
133 template <>
134 class Value<Gtk::IconThemeError::Code> : public Glib::Value_Enum<Gtk::IconThemeError::Code>
135 {
136 public:
137  static GType value_type() G_GNUC_CONST;
138 };
139 
140 } // namespace Glib
141 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
142 
143 
144 namespace Gtk
145 {
146 
147 
148 class IconTheme : public Glib::Object
149 {
150 
151 #ifndef DOXYGEN_SHOULD_SKIP_THIS
152 
153 public:
154  typedef IconTheme CppObjectType;
155  typedef IconTheme_Class CppClassType;
156  typedef GtkIconTheme BaseObjectType;
157  typedef GtkIconThemeClass BaseClassType;
158 
159 private: friend class IconTheme_Class;
160  static CppClassType icontheme_class_;
161 
162 private:
163  // noncopyable
164  IconTheme(const IconTheme&);
165  IconTheme& operator=(const IconTheme&);
166 
167 protected:
168  explicit IconTheme(const Glib::ConstructParams& construct_params);
169  explicit IconTheme(GtkIconTheme* castitem);
170 
171 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
172 
173 public:
174  virtual ~IconTheme();
175 
178  static GType get_type() G_GNUC_CONST;
179 
180 #ifndef DOXYGEN_SHOULD_SKIP_THIS
181 
182 
183  static GType get_base_type() G_GNUC_CONST;
184 #endif
185 
187  GtkIconTheme* gobj() { return reinterpret_cast<GtkIconTheme*>(gobject_); }
188 
190  const GtkIconTheme* gobj() const { return reinterpret_cast<GtkIconTheme*>(gobject_); }
191 
194 
195 private:
196 
197 
198 protected:
200 public:
201 
202  static Glib::RefPtr<IconTheme> create();
203 
204 
213  static Glib::RefPtr<IconTheme> get_default();
214 
230  static Glib::RefPtr<IconTheme> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen);
231 
238  void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
239  void set_search_path(const Glib::ArrayHandle<Glib::ustring>& path);
240  Glib::ArrayHandle<Glib::ustring> get_search_path() const;
241 
247  void append_search_path(const Glib::ustring& path);
248 
254  void prepend_search_path(const Glib::ustring& path);
255 
264  void set_custom_theme(const Glib::ustring& theme_name);
265 
273  bool has_icon(const Glib::ustring& icon_name) const;
274 
275  Glib::ArrayHandle<int> get_icon_sizes(const Glib::ustring& icon_name) const;
276 
277 
291  IconInfo lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const;
292 
293 
306  IconInfo lookup_icon(const Glib::RefPtr<const Gio::Icon>& icon, int size, IconLookupFlags flags) const;
307 
308 
326  IconInfo choose_icon(const Glib::StringArrayHandle& icon_names, int size, IconLookupFlags flags);
327 
328 
350  Glib::RefPtr<Gdk::Pixbuf> load_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags = (IconLookupFlags)0) const;
351 
352 
362  Glib::ListHandle<Glib::ustring> list_icons(const Glib::ustring& context) const;
363 
369  Glib::ListHandle<Glib::ustring> list_icons() const;
370 
371 
378  Glib::ListHandle<Glib::ustring> list_contexts() const;
379 
380 
385  Glib::ustring get_example_icon_name() const;
386 
395 
417  static void add_builtin_icon(const Glib::ustring& icon_name, int size, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
418 
419 
426  Glib::SignalProxy0< void > signal_changed();
427 
428 
429 public:
430 
431 public:
432  //C++ methods used to invoke GTK+ virtual functions:
433 
434 protected:
435  //GTK+ Virtual Functions (override these to change behaviour):
436 
437  //Default Signal Handlers::
439  virtual void on_changed();
440 
441 
442 };
443 
444 } // namespace Gtk
445 
446 
447 namespace Glib
448 {
457  Glib::RefPtr<Gtk::IconTheme> wrap(GtkIconTheme* object, bool take_copy = false);
458 }
459 
460 
461 #endif /* _GTKMM_ICONTHEME_H */
462 
Code code() const
IconThemeError(GError *gobject)
IconThemeError(Code error_code, const Glib::ustring &error_message)
void set_screen(const Glib::RefPtr< Gdk::Screen > &screen)
Glib::ArrayHandle< int > get_icon_sizes(const Glib::ustring &icon_name) const
void prepend_search_path(const Glib::ustring &path)
static Glib::RefPtr< IconTheme > get_default()
IconInfo lookup_icon(const Glib::ustring &icon_name, int size, IconLookupFlags flags) const
IconInfo lookup_icon(const Glib::RefPtr< const Gio::Icon > &icon, int size, IconLookupFlags flags) const
IconInfo choose_icon(const Glib::StringArrayHandle &icon_names, int size, IconLookupFlags flags)
GtkIconTheme * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::ListHandle< Glib::ustring > list_icons(const Glib::ustring &context) const
virtual ~IconTheme()
Glib::RefPtr< Gtk::IconTheme > wrap(GtkIconTheme *object, bool take_copy=false)
void set_search_path(const Glib::ArrayHandle< Glib::ustring > &path)
bool rescan_if_needed()
Glib::ListHandle< Glib::ustring > list_icons() const
bool has_icon(const Glib::ustring &icon_name) const
void append_search_path(const Glib::ustring &path)
static GType get_type() G_GNUC_CONST
const GtkIconTheme * gobj() const
Provides access to the underlying C GObject.
Definition: icontheme.h:190
Glib::RefPtr< Gdk::Pixbuf > load_icon(const Glib::ustring &icon_name, int size, IconLookupFlags flags=(IconLookupFlags) 0) const
GtkIconTheme * gobj()
Provides access to the underlying C GObject.
Definition: icontheme.h:187
Glib::SignalProxy0< void > signal_changed()
static Glib::RefPtr< IconTheme > create()
Glib::ListHandle< Glib::ustring > list_contexts() const
void set_custom_theme(const Glib::ustring &theme_name)
Glib::ustring get_example_icon_name() const
virtual void on_changed()
This is a default handler for the signal signal_changed().
static Glib::RefPtr< IconTheme > get_for_screen(const Glib::RefPtr< Gdk::Screen > &screen)
static void add_builtin_icon(const Glib::ustring &icon_name, int size, const Glib::RefPtr< Gdk::Pixbuf > &pixbuf)
Glib::ArrayHandle< Glib::ustring > get_search_path() const
CellRendererState & operator|=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:86
CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:74
CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:78
CellRendererState operator~(CellRendererState flags)
Definition: cellrenderer.h:82
IconLookupFlags
Definition: icontheme.h:63
CellRendererState & operator&=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:90
CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
Definition: cellrenderer.h:70
CellRendererState & operator^=(CellRendererState &lhs, CellRendererState rhs)
Definition: cellrenderer.h:94
@ ICON_LOOKUP_USE_BUILTIN
Definition: icontheme.h:66
@ ICON_LOOKUP_FORCE_SVG
Definition: icontheme.h:65
@ ICON_LOOKUP_NO_SVG
Definition: icontheme.h:64
@ ICON_LOOKUP_FORCE_SIZE
Definition: icontheme.h:68
@ ICON_LOOKUP_GENERIC_FALLBACK
Definition: icontheme.h:67
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
Definition: ardour_ui.h:188
void wrap_init()
Definition: lobject.h:100