Ardour  9.0-pre0-582-g084a23a80d
tk/ydkmm/ydkmm/gdkmm/image.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_IMAGE_H
4 #define _GDKMM_IMAGE_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: image.hg,v 1.5 2006/04/12 11:11:24 murrayc Exp $ */
11 
12 /* bitmap.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <glibmm/object.h>
32 #include <gdkmm/visual.h>
33 #include <gdkmm/colormap.h>
34 #include <gdkmm/types.h> //For ByteOrder.
35 
36 
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 typedef struct _GdkImage GdkImage;
39 typedef struct _GdkImageClass GdkImageClass;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 
42 
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 namespace Gdk
45 { class Image_Class; } // namespace Gdk
46 #endif //DOXYGEN_SHOULD_SKIP_THIS
47 
48 namespace Gdk
49 {
50 
58 {
62 };
63 
64 } // namespace Gdk
65 
66 
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68 namespace Glib
69 {
70 
71 template <>
72 class Value<Gdk::ImageType> : public Glib::Value_Enum<Gdk::ImageType>
73 {
74 public:
75  static GType value_type() G_GNUC_CONST;
76 };
77 
78 } // namespace Glib
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80 
81 
82 namespace Gdk
83 {
84 
85 
95 class Image : public Glib::Object
96 {
97 
98 #ifndef DOXYGEN_SHOULD_SKIP_THIS
99 
100 public:
101  typedef Image CppObjectType;
102  typedef Image_Class CppClassType;
103  typedef GdkImage BaseObjectType;
104  typedef GdkImageClass BaseClassType;
105 
106 private: friend class Image_Class;
107  static CppClassType image_class_;
108 
109 private:
110  // noncopyable
111  Image(const Image&);
112  Image& operator=(const Image&);
113 
114 protected:
115  explicit Image(const Glib::ConstructParams& construct_params);
116  explicit Image(GdkImage* castitem);
117 
118 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
119 
120 public:
121  virtual ~Image();
122 
125  static GType get_type() G_GNUC_CONST;
126 
127 #ifndef DOXYGEN_SHOULD_SKIP_THIS
128 
129 
130  static GType get_base_type() G_GNUC_CONST;
131 #endif
132 
134  GdkImage* gobj() { return reinterpret_cast<GdkImage*>(gobject_); }
135 
137  const GdkImage* gobj() const { return reinterpret_cast<GdkImage*>(gobject_); }
138 
141 
142 private:
143 
144 
145 protected:
146 
154  Image(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height);
155 
156 
157 public:
158 
159  static Glib::RefPtr<Image> create(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height);
160 
161 
162  //We ignore gdk_image_new_bitmap() because the documentation says that it is deprecated.
163 
164 
165  void put_pixel(int x, int y, guint32 pixel);
166 
167  guint32 get_pixel(int x, int y) const;
168 
179  void set_colormap(const Glib::RefPtr<Colormap>& colormap);
180 
190  Glib::RefPtr<Colormap> get_colormap();
191 
201  Glib::RefPtr<const Colormap> get_colormap() const;
202 
203 
211 
218  Glib::RefPtr<Visual> get_visual();
219 
226  Glib::RefPtr<const Visual> get_visual() const;
227 
235 
242  int get_width() const;
243 
250  int get_height() const;
251 
258  guint16 get_depth() const;
259 
260 
261 #ifndef GDKMM_DISABLE_DEPRECATED
262 
271  guint16 get_bpp() const;
272 #endif // GDKMM_DISABLE_DEPRECATED
273 
274 
281  guint16 get_bytes_per_pixel() const;
282 
283 
284 #ifndef GDKMM_DISABLE_DEPRECATED
285 
294  guint16 get_bpl() const;
295 #endif // GDKMM_DISABLE_DEPRECATED
296 
297 
304  guint16 get_bytes_per_line() const;
305 
306 
313  guint16 get_bits_per_pixel() const;
314 
315 
322  void* get_pixels();
323 
330  const void* get_pixels() const;
331 
332 #ifndef GDKMM_DISABLE_DEPRECATED
333 
334  //This memory block is not read-only, apparently:
337  void* get_mem();
338  const void* get_mem() const;
339  #endif // GDKMM_DISABLE_DEPRECATED
340 
341 
342  //TODO: This should be const really.
343  void* get_windowing_data() const;
344 
345 
346 public:
347 
348 public:
349  //C++ methods used to invoke GTK+ virtual functions:
350 
351 protected:
352  //GTK+ Virtual Functions (override these to change behaviour):
353 
354  //Default Signal Handlers::
355 
356 
357 };
358 
359 } /* namespace Gdk */
360 
361 
362 namespace Glib
363 {
372  Glib::RefPtr<Gdk::Image> wrap(GdkImage* object, bool take_copy = false);
373 }
374 
375 
376 #endif /* _GDKMM_IMAGE_H */
377 
Glib::RefPtr< const Visual > get_visual() const
void set_colormap(const Glib::RefPtr< Colormap > &colormap)
guint32 get_pixel(int x, int y) const
void * get_windowing_data() const
const GdkImage * gobj() const
Provides access to the underlying C GObject.
Image(ImageType type, const Glib::RefPtr< Visual > &visual, int width, int height)
void put_pixel(int x, int y, guint32 pixel)
ByteOrder get_byte_order() const
int get_height() const
guint16 get_bpl() const
static GType get_type() G_GNUC_CONST
Glib::RefPtr< Gdk::Image > wrap(GdkImage *object, bool take_copy=false)
Glib::RefPtr< const Colormap > get_colormap() const
Glib::RefPtr< Visual > get_visual()
ImageType get_image_type() const
void * get_mem()
Glib::RefPtr< Colormap > get_colormap()
void * get_pixels()
guint16 get_bytes_per_line() const
guint16 get_depth() const
guint16 get_bits_per_pixel() const
guint16 get_bytes_per_pixel() const
guint16 get_bpp() const
GdkImage * gobj()
Provides access to the underlying C GObject.
int get_width() const
const void * get_pixels() const
static Glib::RefPtr< Image > create(ImageType type, const Glib::RefPtr< Visual > &visual, int width, int height)
GdkImage * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
virtual ~Image()
const void * get_mem() const
Definition: lobject.h:100
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1