Ardour  8.7-14-g57a6773833
colormap.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_COLORMAP_H
4 #define _GDKMM_COLORMAP_H
5 
6 #include <gdkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* $Id: colormap.hg,v 1.7 2006/04/12 11:11:24 murrayc Exp $ */
13 
14 /* box.h
15  *
16  * Copyright (C) 1998-2002 The gtkmm Development Team
17  *
18  * This library is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU Lesser General Public
20  * License as published by the Free Software Foundation; either
21  * version 2.1 of the License, or (at your option) any later version.
22  *
23  * This library is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26  * Lesser General Public License for more details.
27  *
28  * You should have received a copy of the GNU Lesser General Public
29  * License along with this library; if not, write to the Free
30  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31  */
32 
33 // This is for including the config header before any code (such as
34 // the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
35 
36 
37 #include <glibmm/object.h>
38 #include <gdkmm/visual.h>
39 #include <gdkmm/color.h>
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 typedef struct _GdkColormap GdkColormap;
44 typedef struct _GdkColormapClass GdkColormapClass;
45 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
46 
47 
48 #ifndef DOXYGEN_SHOULD_SKIP_THIS
49 namespace Gdk
50 { class Colormap_Class; } // namespace Gdk
51 #endif //DOXYGEN_SHOULD_SKIP_THIS
52 
53 namespace Gdk
54 {
55 
66 class Colormap : public Glib::Object
67 {
68 
69 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 
71 public:
72  typedef Colormap CppObjectType;
73  typedef Colormap_Class CppClassType;
74  typedef GdkColormap BaseObjectType;
75  typedef GdkColormapClass BaseClassType;
76 
77 private: friend class Colormap_Class;
78  static CppClassType colormap_class_;
79 
80 private:
81  // noncopyable
82  Colormap(const Colormap&);
83  Colormap& operator=(const Colormap&);
84 
85 protected:
86  explicit Colormap(const Glib::ConstructParams& construct_params);
87  explicit Colormap(GdkColormap* castitem);
88 
89 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
90 
91 public:
92  virtual ~Colormap();
93 
96  static GType get_type() G_GNUC_CONST;
97 
98 #ifndef DOXYGEN_SHOULD_SKIP_THIS
99 
100 
101  static GType get_base_type() G_GNUC_CONST;
102 #endif
103 
105  GdkColormap* gobj() { return reinterpret_cast<GdkColormap*>(gobject_); }
106 
108  const GdkColormap* gobj() const { return reinterpret_cast<GdkColormap*>(gobject_); }
109 
112 
113 private:
114 
115 
116 protected:
117  explicit Colormap(const Glib::RefPtr<Visual>& visual, bool allocate);
118 
119 public:
120 
121 
122  static Glib::RefPtr<Colormap> create(const Glib::RefPtr<Visual>& visual, bool allocate);
123 
124 
130  static Glib::RefPtr<Colormap> get_system();
131 
132  //_WRAP_METHOD(void change(int ncolors), gdk_colormap_change)
133 
134  #ifndef GDKMM_DISABLE_DEPRECATED
135 
137  int alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle<bool>& success);
138 
139 
141  void free_colors(Color& colors, int ncolors);
142 
143  #endif // GDKMM_DISABLE_DEPRECATED
144 
145 
158  bool alloc_color(Color& color, bool writeable = false, bool best_match = true);
160 
161 
176  void query_color(gulong pixel, Color& result);
177 
178 
183  Glib::RefPtr<Visual> get_visual();
184 
189  Glib::RefPtr<const Visual> get_visual() const;
190 
191 
196  Glib::RefPtr<Screen> get_screen();
197 
202  Glib::RefPtr<const Screen> get_screen() const;
203 
204 
205 public:
206 
207 public:
208  //C++ methods used to invoke GTK+ virtual functions:
209 
210 protected:
211  //GTK+ Virtual Functions (override these to change behaviour):
212 
213  //Default Signal Handlers::
214 
215 
216 };
217 
218 } /* namespace Gdk */
219 
220 
221 namespace Glib
222 {
231  Glib::RefPtr<Gdk::Colormap> wrap(GdkColormap* object, bool take_copy = false);
232 }
233 
234 
235 #endif /* _GDKMM_COLORMAP_H */
236 
static GType get_type() G_GNUC_CONST
Glib::RefPtr< Screen > get_screen()
Glib::RefPtr< const Screen > get_screen() const
Glib::RefPtr< const Visual > get_visual() const
virtual ~Colormap()
int alloc_colors(ArrayHandle_Color &colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle< bool > &success)
Glib::RefPtr< Gdk::Colormap > wrap(GdkColormap *object, bool take_copy=false)
static Glib::RefPtr< Colormap > get_system()
bool alloc_color(Color &color, bool writeable=false, bool best_match=true)
void free_colors(Color &colors, int ncolors)
GdkColormap * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
GdkColormap * gobj()
Provides access to the underlying C GObject.
Definition: colormap.h:105
Glib::RefPtr< Visual > get_visual()
static Glib::RefPtr< Colormap > create(const Glib::RefPtr< Visual > &visual, bool allocate)
void free_color(Color &color)
const GdkColormap * gobj() const
Provides access to the underlying C GObject.
Definition: colormap.h:108
Colormap(const Glib::RefPtr< Visual > &visual, bool allocate)
void query_color(gulong pixel, Color &result)
PBD::PropertyDescriptor< uint32_t > color
Glib::ArrayHandle< Color, ColorTraits > ArrayHandle_Color
Definition: color.h:242