Ardour  8.7-14-g57a6773833
drawable.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_DRAWABLE_H
4 #define _GDKMM_DRAWABLE_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: drawable.hg,v 1.12 2006/12/03 17:21:37 murrayc Exp $ */
11 
12 /* Copyright (C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <pangomm/font.h>
30 #include <pangomm/layout.h>
31 #include <pangomm/layoutline.h>
32 #include <pangomm/glyphstring.h>
33 #include <gdkmm/region.h>
34 #include <gdkmm/gc.h>
35 #include <gdkmm/image.h>
36 #include <gdkmm/color.h>
37 #include <gdkmm/rgbcmap.h>
38 #include <gdkmm/types.h>
39 #include <cairomm/context.h>
40 //#include <gdkmm/pixbuf.h>
41 
42 
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 typedef struct _GdkDrawable GdkDrawable;
45 typedef struct _GdkDrawableClass GdkDrawableClass;
46 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
47 
48 
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50 namespace Gdk
51 { class Drawable_Class; } // namespace Gdk
52 #endif //DOXYGEN_SHOULD_SKIP_THIS
53 
54 namespace Gdk
55 {
56 
64 {
68 };
69 
70 } // namespace Gdk
71 
72 
73 #ifndef DOXYGEN_SHOULD_SKIP_THIS
74 namespace Glib
75 {
76 
77 template <>
78 class Value<Gdk::RgbDither> : public Glib::Value_Enum<Gdk::RgbDither>
79 {
80 public:
81  static GType value_type() G_GNUC_CONST;
82 };
83 
84 } // namespace Glib
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86 
87 
88 namespace Gdk
89 {
90 
91 
92 class GC;
93 class Pixbuf;
94 
110 class Drawable : public Glib::Object
111 {
112 
113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
114 
115 public:
116  typedef Drawable CppObjectType;
117  typedef Drawable_Class CppClassType;
118  typedef GdkDrawable BaseObjectType;
119  typedef GdkDrawableClass BaseClassType;
120 
121 private: friend class Drawable_Class;
122  static CppClassType drawable_class_;
123 
124 private:
125  // noncopyable
126  Drawable(const Drawable&);
127  Drawable& operator=(const Drawable&);
128 
129 protected:
130  explicit Drawable(const Glib::ConstructParams& construct_params);
131  explicit Drawable(GdkDrawable* castitem);
132 
133 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
134 
135 public:
136  virtual ~Drawable();
137 
140  static GType get_type() G_GNUC_CONST;
141 
142 #ifndef DOXYGEN_SHOULD_SKIP_THIS
143 
144 
145  static GType get_base_type() G_GNUC_CONST;
146 #endif
147 
149  GdkDrawable* gobj() { return reinterpret_cast<GdkDrawable*>(gobject_); }
150 
152  const GdkDrawable* gobj() const { return reinterpret_cast<GdkDrawable*>(gobject_); }
153 
156 
157 private:
158 
159 
160 protected:
162 
163 public:
164 
165  static Glib::RefPtr<Drawable> create();
166 
167 
168 #ifndef GDKMM_DISABLE_DEPRECATED
169 
185  void get_size(int& width, int& height);
186 #endif // GDKMM_DISABLE_DEPRECATED
187 
188 
189 #ifndef GDKMM_DISABLE_DEPRECATED
190 
204  void get_size(int& width, int& height) const;
205 #endif // GDKMM_DISABLE_DEPRECATED
206 
207 
214  int get_depth() const;
215 
216 
228  void set_colormap(const Glib::RefPtr<Colormap>& colormap);
229 
235  Glib::RefPtr<Colormap> get_colormap();
236 
237 #ifndef GDKMM_DISABLE_DEPRECATED
238 
245  Glib::RefPtr<Visual> get_visual();
246 #endif // GDKMM_DISABLE_DEPRECATED
247 
248 
249 #ifndef GDKMM_DISABLE_DEPRECATED
250 
261  void draw_point(const Glib::RefPtr<const GC>& gc, int x, int y);
262 #endif // GDKMM_DISABLE_DEPRECATED
263 
264 
265  #ifndef GDKMM_DISABLE_DEPRECATED
266 
267  //TODO: Mention C++ API in the deprecation comment.
270  void draw_points(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points);
271  #endif // GDKMM_DISABLE_DEPRECATED
272 
273 
274 #ifndef GDKMM_DISABLE_DEPRECATED
275 
294  void draw_line(const Glib::RefPtr<const GC>& gc, int x1, int y1, int x2, int y2);
295 #endif // GDKMM_DISABLE_DEPRECATED
296 
297 
298  #ifndef GDKMM_DISABLE_DEPRECATED
299 
300  //TODO: Mention C++ API in the deprecation comment.
303  void draw_lines(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points);
304  #endif // GDKMM_DISABLE_DEPRECATED
305 
306 
307 #ifndef GDKMM_DISABLE_DEPRECATED
308 
331  void draw_rectangle(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height);
332 #endif // GDKMM_DISABLE_DEPRECATED
333 
334 
335 #ifndef GDKMM_DISABLE_DEPRECATED
336 
356  void draw_arc(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height, int angle1, int angle2);
357 #endif // GDKMM_DISABLE_DEPRECATED
358 
359 
360  void draw_polygon(const Glib::RefPtr<const GC>& gc, bool filled, const Glib::ArrayHandle<Point>& points);
361 
362 
363 #ifndef GDKMM_DISABLE_DEPRECATED
364 
394  void draw_drawable(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Drawable>& src, int xsrc, int ysrc, int xdest, int ydest, int width = -1, int height = -1);
395 #endif // GDKMM_DISABLE_DEPRECATED
396 
397 
398 #ifndef GDKMM_DISABLE_DEPRECATED
399 
417  void draw_image(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Image>& image, int xsrc, int ysrc, int xdest, int ydest, int width = -1, int height = -1);
418 #endif // GDKMM_DISABLE_DEPRECATED
419 
420 
421  //segs is an array, and this function will be used so little that it doesn't seem worth wrapping it to use a container of C++ types.
422  //Note: The segs parameter was made const in GTK+ 2.16, but we can't change that in our C++ API. TODO: Change it when we can do an ABI break.
423 
424 
425 #ifndef GDKMM_DISABLE_DEPRECATED
426 
439  void draw_segments(const Glib::RefPtr<const GC>& gc, GdkSegment* segs, int n_segs);
440 #endif // GDKMM_DISABLE_DEPRECATED
441 
442  // TODO
443 
444  //glyphs is not an array. I went down to pango_xft_render in pango and saw that PangoGlyphString here is not an array. -Bryan
445 
446 #ifndef GDKMM_DISABLE_DEPRECATED
447 
465  void draw_glyphs(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pango::Font>& font, int x, int y, const Pango::GlyphString& glyphs);
466 #endif // GDKMM_DISABLE_DEPRECATED
467 
468 
469 #ifndef GDKMM_DISABLE_DEPRECATED
470 
483  void draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line);
484 #endif // GDKMM_DISABLE_DEPRECATED
485 
486 
487 #ifndef GDKMM_DISABLE_DEPRECATED
488 
505  void draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line, const Color& foreground, const Color& background);
506 #endif // GDKMM_DISABLE_DEPRECATED
507 
508 
509 #ifndef GDKMM_DISABLE_DEPRECATED
510 
525  void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout);
526 #endif // GDKMM_DISABLE_DEPRECATED
527 
528 
529 #ifndef GDKMM_DISABLE_DEPRECATED
530 
549  void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout, const Color& foreground, const Color& background);
550 #endif // GDKMM_DISABLE_DEPRECATED
551 
552 
553 //Note: The pixbuf parameter was made const in GTK+ 2.16, but we can't change that in our C++ API. TODO: Change it when we can do an ABI break.
554 
555 
556 #ifndef GDKMM_DISABLE_DEPRECATED
557 
588  void draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<Pixbuf>& pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither);
589 #endif // GDKMM_DISABLE_DEPRECATED
590 
591 
592  #ifndef GDKMM_DISABLE_DEPRECATED
593 
594  //TODO: Mention C++ API in the deprecation comment.
624  void draw_pixbuf(const Glib::RefPtr<Pixbuf>& pixbuf,
625  int src_x, int src_y, int dest_x, int dest_y,
626  int width, int height,
627  RgbDither dither, int x_dither, int y_dither);
628  #endif // GDKMM_DISABLE_DEPRECATED
629 
630 
631  // Note: This has no 'refreturn' because get_image() returns a newly created Image object.
632 
669  Glib::RefPtr<Image> get_image(int x, int y, int width, int height) const;
670 
671  // gdk_drawable_copy_to_image() returns a new GdkImage when the image parameter is NULL, but that seems to be much the
672  // same as gdk_drawable_get_image().
673  void copy_to_image(const Glib::RefPtr<Image>& image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const;
674 
675 
687 
697 
698 
699  // **** RGB stuff ****
700 
701 
702 #ifndef GDKMM_DISABLE_DEPRECATED
703 
704  void draw_rgb_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride);
705 #endif // GDKMM_DISABLE_DEPRECATED
706 
707 
708 #ifndef GDKMM_DISABLE_DEPRECATED
709 
710  void draw_rgb_image_dithalign(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, int xdith, int ydith);
711 #endif // GDKMM_DISABLE_DEPRECATED
712 
713 
714 #ifndef GDKMM_DISABLE_DEPRECATED
715 
716  void draw_rgb_32_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride);
717 #endif // GDKMM_DISABLE_DEPRECATED
718 
719 
720 #ifndef GDKMM_DISABLE_DEPRECATED
721 
738  void draw_rgb_32_image_dithalign(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* buf, int rowstride, int xdith, int ydith);
739 #endif // GDKMM_DISABLE_DEPRECATED
740 
741 
742 #ifndef GDKMM_DISABLE_DEPRECATED
743 
744  void draw_gray_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride);
745 #endif // GDKMM_DISABLE_DEPRECATED
746 
747 
748 #ifndef GDKMM_DISABLE_DEPRECATED
749 
750  void draw_indexed_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, const RgbCmap& cmap);
751 #endif // GDKMM_DISABLE_DEPRECATED
752 
753 
754 #ifndef GDKMM_DISABLE_DEPRECATED
755 
762  Glib::RefPtr<Screen> get_screen();
763 #endif // GDKMM_DISABLE_DEPRECATED
764 
765 
766 #ifndef GDKMM_DISABLE_DEPRECATED
767 
774  Glib::RefPtr<const Screen> get_screen() const;
775 #endif // GDKMM_DISABLE_DEPRECATED
776 
777 
778 #ifndef GDKMM_DISABLE_DEPRECATED
779 
786  Glib::RefPtr<Display> get_display();
787 #endif // GDKMM_DISABLE_DEPRECATED
788 
789 
790 #ifndef GDKMM_DISABLE_DEPRECATED
791 
798  Glib::RefPtr<const Display> get_display() const;
799 #endif // GDKMM_DISABLE_DEPRECATED
800 
801 
806  Cairo::RefPtr<Cairo::Context> create_cairo_context();
807 
808 
809 public:
810 
811 public:
812  //C++ methods used to invoke GTK+ virtual functions:
813 
814 protected:
815  //GTK+ Virtual Functions (override these to change behaviour):
816 
817  //Default Signal Handlers::
818 
819 
820 };
821 
822 } // namespace Gdk
823 
824 
825 namespace Glib
826 {
835  Glib::RefPtr<Gdk::Drawable> wrap(GdkDrawable* object, bool take_copy = false);
836 }
837 
838 
839 #endif /* _GDKMM_DRAWABLE_H */
840 
void draw_rgb_image(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *rgb_buf, int rowstride)
void draw_arc(const Glib::RefPtr< const GC > &gc, bool filled, int x, int y, int width, int height, int angle1, int angle2)
void draw_layout(const Glib::RefPtr< const GC > &gc, int x, int y, const Glib::RefPtr< const Pango::Layout > &layout)
void draw_rectangle(const Glib::RefPtr< const GC > &gc, bool filled, int x, int y, int width, int height)
GdkDrawable * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
void draw_rgb_32_image_dithalign(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *buf, int rowstride, int xdith, int ydith)
void draw_rgb_image_dithalign(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *rgb_buf, int rowstride, int xdith, int ydith)
Glib::RefPtr< Visual > get_visual()
void draw_pixbuf(const Glib::RefPtr< Pixbuf > &pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
static GType get_type() G_GNUC_CONST
void draw_lines(const Glib::RefPtr< const GC > &gc, const Glib::ArrayHandle< Point > &points)
void draw_glyphs(const Glib::RefPtr< const GC > &gc, const Glib::RefPtr< const Pango::Font > &font, int x, int y, const Pango::GlyphString &glyphs)
static Glib::RefPtr< Drawable > create()
void draw_rgb_32_image(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *rgb_buf, int rowstride)
Glib::RefPtr< Image > get_image(int x, int y, int width, int height) const
void draw_layout_line(const Glib::RefPtr< const GC > &gc, int x, int y, const Glib::RefPtr< const Pango::LayoutLine > &line)
void copy_to_image(const Glib::RefPtr< Image > &image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const
void set_colormap(const Glib::RefPtr< Colormap > &colormap)
void draw_indexed_image(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *rgb_buf, int rowstride, const RgbCmap &cmap)
Glib::RefPtr< const Display > get_display() const
void draw_line(const Glib::RefPtr< const GC > &gc, int x1, int y1, int x2, int y2)
Glib::RefPtr< const Screen > get_screen() const
void draw_pixbuf(const Glib::RefPtr< const GC > &gc, const Glib::RefPtr< Pixbuf > &pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
Region get_visible_region() const
void draw_layout(const Glib::RefPtr< const GC > &gc, int x, int y, const Glib::RefPtr< const Pango::Layout > &layout, const Color &foreground, const Color &background)
void draw_image(const Glib::RefPtr< const GC > &gc, const Glib::RefPtr< const Image > &image, int xsrc, int ysrc, int xdest, int ydest, int width=-1, int height=-1)
void draw_point(const Glib::RefPtr< const GC > &gc, int x, int y)
Region get_clip_region() const
GdkDrawable * gobj()
Provides access to the underlying C GObject.
Definition: drawable.h:149
void get_size(int &width, int &height)
Cairo::RefPtr< Cairo::Context > create_cairo_context()
Glib::RefPtr< Colormap > get_colormap()
void get_size(int &width, int &height) const
void draw_drawable(const Glib::RefPtr< const GC > &gc, const Glib::RefPtr< const Drawable > &src, int xsrc, int ysrc, int xdest, int ydest, int width=-1, int height=-1)
void draw_points(const Glib::RefPtr< const GC > &gc, const Glib::ArrayHandle< Point > &points)
Glib::RefPtr< Gdk::Drawable > wrap(GdkDrawable *object, bool take_copy=false)
void draw_layout_line(const Glib::RefPtr< const GC > &gc, int x, int y, const Glib::RefPtr< const Pango::LayoutLine > &line, const Color &foreground, const Color &background)
int get_depth() const
virtual ~Drawable()
void draw_polygon(const Glib::RefPtr< const GC > &gc, bool filled, const Glib::ArrayHandle< Point > &points)
Glib::RefPtr< Screen > get_screen()
Glib::RefPtr< Display > get_display()
void draw_segments(const Glib::RefPtr< const GC > &gc, GdkSegment *segs, int n_segs)
void draw_gray_image(const Glib::RefPtr< const GC > &gc, int x, int y, int width, int height, RgbDither dith, const guchar *rgb_buf, int rowstride)
const GdkDrawable * gobj() const
Provides access to the underlying C GObject.
Definition: drawable.h:152
typedefG_BEGIN_DECLS struct _GdkDrawableClass GdkDrawableClass
Definition: gdkdrawable.h:43
RgbDither
Definition: drawable.h:64
@ RGB_DITHER_NORMAL
Definition: drawable.h:66
@ RGB_DITHER_MAX
Definition: drawable.h:67
@ RGB_DITHER_NONE
Definition: drawable.h:65
GtkImageImageData image
Definition: gtkimage.h:1
GtkImagePixbufData pixbuf
Definition: gtkimage.h:2
Definition: lobject.h:100
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1