[gtkmm] Fix the build with latest gtk+.



commit 364602b8afcf4b93fdec67dfdf052c0f83c5c471
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Aug 30 15:18:53 2010 +0200

    Fix the build with latest gtk+.
    
      * gdk/src/bitmap.[hg|ccg]: Remove the constructors, because they use
      functions removed from GTK+. This whole class will be removed soon, when
      it is removed from GTK+ soon.
      * gdk/src/pixmap.[hg|ccg]: Remove some constructors, because they use
      functions removed from GTK+. This whole class may be removed soon, if
      it is removed from GTK+ soon.
      * gdk/src/color.[hg|ccg]: rgb_find_color(): Remove this because it was
      removed from GTK+.
      * gdk/src/drawable.[hg|ccg]: Removed draw_pixbuf().
    * gdk/gdkmm/rgb.[h|cc]:
    * gdk/src/rgbcmap.[hg|ccg]: Removed because these APIs were removed from
      GTK+.
      * gtk/src/image.[hg|ccg]: Removed get_image() and set(Gdk::Image) because
      they were removed from GTK+.
      * gtk/src/style.[hg|ccg]: Remove get*_gc() because the struct fields were
      removed from GTK+. Likewise removed paint_polygon().

 ChangeLog             |   43 +++++++++++----
 gdk/gdkmm.h           |    4 +-
 gdk/gdkmm/filelist.am |    4 +-
 gdk/gdkmm/rgb.cc      |   43 ---------------
 gdk/gdkmm/rgb.h       |   55 -------------------
 gdk/src/bitmap.ccg    |   11 ----
 gdk/src/bitmap.hg     |    8 ---
 gdk/src/color.ccg     |    8 +---
 gdk/src/color.hg      |   14 +-----
 gdk/src/drawable.ccg  |    7 ---
 gdk/src/drawable.hg   |   39 --------------
 gdk/src/filelist.am   |    1 -
 gdk/src/pixmap.ccg    |  140 -------------------------------------------------
 gdk/src/pixmap.hg     |   51 ------------------
 gdk/src/rgbcmap.ccg   |   54 -------------------
 gdk/src/rgbcmap.hg    |   65 -----------------------
 gtk/src/image.ccg     |   14 +-----
 gtk/src/image.hg      |   27 +++------
 gtk/src/style.ccg     |  103 ++----------------------------------
 gtk/src/style.hg      |   52 ++----------------
 20 files changed, 57 insertions(+), 686 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e958ef4..d086e00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,25 @@
-2010-08-29  Murray Cumming  <murrayc murrayc const>
+2010-08-30  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with latest gtk+.
+
+  * gdk/src/bitmap.[hg|ccg]: Remove the constructors, because they use
+  functions removed from GTK+. This whole class will be removed soon, when
+  it is removed from GTK+ soon.
+  * gdk/src/pixmap.[hg|ccg]: Remove some constructors, because they use
+  functions removed from GTK+. This whole class may be removed soon, if
+  it is removed from GTK+ soon.
+  * gdk/src/color.[hg|ccg]: rgb_find_color(): Remove this because it was
+  removed from GTK+.
+  * gdk/src/drawable.[hg|ccg]: Removed draw_pixbuf().
+	* gdk/gdkmm/rgb.[h|cc]:
+	* gdk/src/rgbcmap.[hg|ccg]: Removed because these APIs were removed from
+  GTK+.
+  * gtk/src/image.[hg|ccg]: Removed get_image() and set(Gdk::Image) because
+  they were removed from GTK+.
+  * gtk/src/style.[hg|ccg]: Remove get*_gc() because the struct fields were
+  removed from GTK+. Likewise removed paint_polygon().
+
+2010-08-29  Murray Cumming  <murrayc murrayc com>
 
 	Device: const correction.
 
@@ -9,7 +30,7 @@
 	Partially fix the build after large GDK changes in GTK+.
 
 	* gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
-	* tools/extra_defs_gen/generate_defs_gtk.cc: Removed GDK_TYPE_GC and 
+	* tools/extra_defs_gen/generate_defs_gtk.cc: Removed GDK_TYPE_GC and
 	GDK_TYPE_IMAGE because they were removed from GTK+.
 	* gdk/src/filelist.am:
 	* gdk/src/gc.[hg|ccg]:
@@ -17,14 +38,14 @@
 	* gdk/gdkmm.h:
 	* gdk/src/style.hg: Remove includes of gc.h.
 	* gdk/src/drawable.[hg|ccg]: Removed draw_*() methods that were removed from GTK+.
-	* gdk/src/pixbuf.[hg|ccg]: Remove constructors and create*() methods that 
+	* gdk/src/pixbuf.[hg|ccg]: Remove constructors and create*() methods that
 	took a Gdk::Image.
 
 2010-08-05  Murray Cumming  <murrayc murrayc-x61>
 
 	DeviceManager: Fixed a typo to avoid duplicate GType registration.
 
-	* gdk/src/devicemanager.hg: Don't derive from the GdkDevice type. Use 
+	* gdk/src/devicemanager.hg: Don't derive from the GdkDevice type. Use
 	GdkDeviceManager instead.
 
 2010-08-04  Armin Burgmeier  <armin arbur net>
@@ -58,10 +79,10 @@
 
 	* gdk/src/cursor.hg: Added get_cursor_type().
 	* gdk/src/device.[hg|ccg]: Added get_key(), get_axis_use(), get_n_axes(),
-	get_axis_value(), get_display(), get_associated_device(), get_device_type(), 
+	get_axis_value(), get_display(), get_associated_device(), get_device_type(),
 	grab(), ungrab().
-	* gdk/src/display[hg|ccg]: Added device_is_grabbed(), get_device_state(), 
-	get_window_at_device_position(), warp_device(), set_device_hooks(), 
+	* gdk/src/display[hg|ccg]: Added device_is_grabbed(), get_device_state(),
+	get_window_at_device_position(), warp_device(), set_device_hooks(),
 	get_device_manager()
 	* gdk/src/filelist.am:
 	* gdk/src/devicemanager.[hg|ccg]: New files, adding DeviceManager.
@@ -76,7 +97,7 @@
 
 	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
 	* gtk/src/application.[hg|ccg]: Added get_windows.
-	Added a create() overload without the argc and argv parameters, because 
+	Added a create() overload without the argc and argv parameters, because
 	they may be NULL.
 	* tools/extra_defs_gen/generate_defs_gtk.cc: Added GtkApplication.
 
@@ -85,7 +106,7 @@
 	Added Gtk::Application.
 
 	* gtk/src/filelist.am:
-	* gtk/src/application.[hg|ccg]: Added the beginnings of Gtk::Application, 
+	* gtk/src/application.[hg|ccg]: Added the beginnings of Gtk::Application,
 	wrapping GtkApplication, using Gio::Application that I just added in glibmm.
 	* gtk/gtkmm.h: Include the new header.
 
@@ -94,7 +115,7 @@
 	MenuShell: Remove items().
 
 	* gtk/gtkmm/menu_elems.[h|cc]: Remove these files.
-	* gtk/src/menushell.[hg|ccg]: Remove the items() method and the list type and 
+	* gtk/src/menushell.[hg|ccg]: Remove the items() method and the list type and
 	helper classes that it uses, because GtkMenuShell::items is GSEALed.
 
 2010-07-15  Murray Cumming  <murrayc murrayc com>
@@ -103,7 +124,7 @@
 
 	* gtk/src/gtk_methods.defs:
 	* gtk/src/gtk_signals.defs:
-	* gtk/src/recentmanager.hg: Remove this API that wrapped the API recently 
+	* gtk/src/recentmanager.hg: Remove this API that wrapped the API recently
 	removed from GTK+.
 
 2010-07-14  Murray Cumming  <murrayc murrayc com>
diff --git a/gdk/gdkmm.h b/gdk/gdkmm.h
index afa9043..92bf0cf 100644
--- a/gdk/gdkmm.h
+++ b/gdk/gdkmm.h
@@ -1,6 +1,6 @@
 // This is -*- C++ -*-
 
-/* 
+/*
  * gdkmm.h
  *
  * Copyright 2002 The gtkmm Development Team
@@ -40,7 +40,5 @@
 #include <gdkmm/displaymanager.h>
 #include <gdkmm/screen.h>
 #include <gdkmm/general.h>
-#include <gdkmm/rgb.h>
 
 #endif /* _GDKMM_GDKMM_H_ */
-
diff --git a/gdk/gdkmm/filelist.am b/gdk/gdkmm/filelist.am
index e92264d..dcc7540 100644
--- a/gdk/gdkmm/filelist.am
+++ b/gdk/gdkmm/filelist.am
@@ -4,6 +4,6 @@ gdkmm_files_built_cc = $(gdkmm_files_hg:.hg=.cc) wrap_init.cc
 gdkmm_files_built_h  = $(gdkmm_files_hg:.hg=.h)
 gdkmm_files_built_ph = $(patsubst %.hg,private/%_p.h,$(gdkmm_files_hg))
 
-gdkmm_files_extra_cc = general.cc rgb.cc
-gdkmm_files_extra_h  = general.h list.h rgb.h wrap_init.h
+gdkmm_files_extra_cc = general.cc
+gdkmm_files_extra_h  = general.h list.h wrap_init.h
 gdkmm_files_extra_ph =
diff --git a/gdk/src/bitmap.ccg b/gdk/src/bitmap.ccg
index 364fe26..e6c75bf 100644
--- a/gdk/src/bitmap.ccg
+++ b/gdk/src/bitmap.ccg
@@ -30,15 +30,4 @@ Bitmap::Bitmap(GdkBitmap* castitem)
   Pixmap((GdkPixmap*) castitem)
 {}
 
-Bitmap::Bitmap(const char* data, int width, int height)
-:
-  Pixmap((GdkPixmap*) gdk_bitmap_create_from_data(0, data, width, height))
-{}
-
-Bitmap::Bitmap(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height)
-:
-  Pixmap((GdkPixmap*) gdk_bitmap_create_from_data(Glib::unwrap(drawable), data, width, height))
-{}
-
 } // namespace Gdk
-
diff --git a/gdk/src/bitmap.hg b/gdk/src/bitmap.hg
index c858277..cc8ca54 100644
--- a/gdk/src/bitmap.hg
+++ b/gdk/src/bitmap.hg
@@ -46,15 +46,7 @@ protected:
   friend class Gdk::Pixmap_Class;
 #endif
 
-  Bitmap(const char* data, int width, int height);
-
-  Bitmap(const Glib::RefPtr<Gdk::Drawable>& drawable, const char* data, int width, int height);
-
 public:
-  _WRAP_CREATE(const char* data, int width, int height)
-
-  _WRAP_CREATE(const Glib::RefPtr<Gdk::Drawable>& drawable, const char* data, int width, int height)
 };
 
 } // namespace Gdk
-
diff --git a/gdk/src/color.ccg b/gdk/src/color.ccg
index 26edc5e..856177f 100644
--- a/gdk/src/color.ccg
+++ b/gdk/src/color.ccg
@@ -67,7 +67,7 @@ void Color::set_rgb_p(double red_, double green_, double blue_)
 void Color::set_hsv(double h, double s, double v)
 {
   //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
-  
+
   h /= 60.0;
   int i = (int)h;
   double p = v * (1 - s);
@@ -175,11 +175,6 @@ void Color::set_blue(gushort value)
   gobject_->blue = value;
 }
 
-void Color::rgb_find_color(const Glib::RefPtr<Gdk::Colormap>& map)
-{
-  gdk_rgb_find_color(Glib::unwrap(map), gobj());
-}
-
 guint Color::get_pixel() const
 {
   return gobject_->pixel;
@@ -206,4 +201,3 @@ Glib::ustring Color::to_string() const
 }
 
 } //namespace Gdk
-
diff --git a/gdk/src/color.hg b/gdk/src/color.hg
index 7797a21..4d6d333 100644
--- a/gdk/src/color.hg
+++ b/gdk/src/color.hg
@@ -120,17 +120,6 @@ public:
    */
   void set_blue(gushort value);
 
-  /** This will fill in the pixel field with the best matching pixel from a color cube.
-   * The color is then ready to be used for drawing, e.g. you can call Gdk::GC::set_foreground() which expects pixel to be initialized.
-   * Call this after setting the red, green, and blue fields.
-   *
-   * In many cases, you can avoid this whole issue by calling Gdk::GC::set_rgb_fg_color() or Gdk::GC::set_rgb_bg_color(),
-   * which do not expect pixels to be initialized in advance. If you use those methods, there's no need for this method().
-   *
-   * @param map The colormap for the graphics context and drawable you're using to draw. If you're drawing to a Gtk::Widget, call Gtk::Widget::get_colormap().
-   */
-  void rgb_find_color(const Glib::RefPtr<Gdk::Colormap>& map);
-
   /** Get the pixel value, for allocated colors.
    * @result For allocated colors, the value used to draw this color on the screen.
    */
@@ -151,7 +140,7 @@ public:
    */
   double get_blue_p() const;
 
-  /** Get a textual specification of color in the hexadecimal form #rrrrggggbbbb, 
+  /** Get a textual specification of color in the hexadecimal form #rrrrggggbbbb,
    * where r, g and b are hex digits representing the red, green and blue components respectively.
    *
    * @result The string representation.
@@ -185,4 +174,3 @@ struct ColorTraits
 typedef Glib::ArrayHandle<Color,ColorTraits> ArrayHandle_Color;
 
 } // namespace Gdk
-
diff --git a/gdk/src/drawable.ccg b/gdk/src/drawable.ccg
index 94371a5..3ed64e6 100644
--- a/gdk/src/drawable.ccg
+++ b/gdk/src/drawable.ccg
@@ -25,11 +25,4 @@
 namespace Gdk
 {
 
-void Drawable::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)
-{
-gdk_draw_pixbuf(gobj(), 0, Glib::unwrap(pixbuf), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither); 
-}
-
-
 } // namespace Gdk
-
diff --git a/gdk/src/drawable.hg b/gdk/src/drawable.hg
index 0c72d06..5fed9c9 100644
--- a/gdk/src/drawable.hg
+++ b/gdk/src/drawable.hg
@@ -38,8 +38,6 @@ _PINCLUDE(glibmm/private/object_p.h)
 namespace Gdk
 {
 
-_WRAP_ENUM(RgbDither, GdkRgbDither)
-
 class Pixbuf;
 
 /** Drawing Primitives.
@@ -74,43 +72,6 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Colormap> get_colormap(), gdk_drawable_get_colormap, refreturn)
   _WRAP_METHOD(Glib::RefPtr<Visual> get_visual(), gdk_drawable_get_visual, refreturn)
 
-  _WRAP_METHOD(void draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const 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), gdk_draw_pixbuf)
-
-  /** Renders a rectangular portion of a pixbuf to a drawable.  The destination
-   * drawable must have a colormap. All windows have a colormap, however, pixmaps
-   * only have colormap by default if they were created with a non-<tt>0</tt> window
-   * argument. Otherwise a colormap must be set on them with
-   * Gdk::Drawable::set_colormap().
-   *
-   * On older X servers, rendering pixbufs with an alpha channel involves round
-   * trips to the X server, and may be somewhat slow.
-   *
-   * If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
-   * function is accelerated using mediaLib, which provides hardware
-   * acceleration on Intel, AMD, and Sparc chipsets.  If desired, mediaLib
-   * support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
-   * variable.
-   *
-   * @newin{2,16}
-   * @param pixbuf A Gdk::Pixbuf.
-   * @param src_x Source X coordinate within pixbuf.
-   * @param src_y Source Y coordinates within pixbuf.
-   * @param dest_x Destination X coordinate within drawable.
-   * @param dest_y Destination Y coordinate within drawable.
-   * @param width Width of region to render, in pixels, or -1 to use pixbuf width.
-   * @param height Height of region to render, in pixels, or -1 to use pixbuf height.
-   * @param dither Dithering mode for Gdk::RGB.
-   * @param x_dither X offset for dither.
-   * @param y_dither Y offset for dither.
-   */
-  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);
-
  #m4 _CONVERSION(`cairo_region_t*',`Cairo::RefPtr<Cairo::Region>',`Cairo::RefPtr<Cairo::Region>(new Cairo::Region($3, true /* do not take ref */))')
 
   //This is const because it returns a copy (though that is not very clear from the C documentation)
diff --git a/gdk/src/filelist.am b/gdk/src/filelist.am
index ce64065..ba71303 100644
--- a/gdk/src/filelist.am
+++ b/gdk/src/filelist.am
@@ -30,7 +30,6 @@ gdkmm_files_hg =		\
 	pixbufloader.hg		\
 	pixmap.hg		\
 	rectangle.hg		\
-	rgbcmap.hg		\
 	screen.hg		\
 	types.hg		\
 	visual.hg		\
diff --git a/gdk/src/pixmap.ccg b/gdk/src/pixmap.ccg
index 6176e7b..07ff85b 100644
--- a/gdk/src/pixmap.ccg
+++ b/gdk/src/pixmap.ccg
@@ -54,17 +54,6 @@ Pixmap::Pixmap(const Glib::RefPtr<Drawable>& drawable, int width, int height, in
   //so we can't really derived a new GType for GdkPixmap.
 }
 
-Pixmap::Pixmap(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height, int depth,
-               const Color& fg, const Color& bg)
-:
-  Drawable((GdkDrawable*) gdk_pixmap_create_from_data(
-      Glib::unwrap(drawable), data, width, height, depth,
-      const_cast<GdkColor*>(fg.gobj()), const_cast<GdkColor*>(bg.gobj())))
-{
-  //gdk_pixmap_new() is implemented differently for x11, win32, etc,
-  //so we can't really derived a new GType for GdkPixmap.
-}
-
 Pixmap::Pixmap(const Glib::RefPtr<Display>& display, NativeWindow anid)
 :
   Drawable( (GdkDrawable*) gdk_pixmap_foreign_new_for_display(Glib::unwrap(display), anid) )
@@ -73,133 +62,4 @@ Pixmap::Pixmap(const Glib::RefPtr<Display>& display, NativeWindow anid)
   //so we can't really derived a new GType for GdkPixmap.
 }
 
-Glib::RefPtr<Pixmap> Pixmap::create_from_data(const Glib::RefPtr<const Drawable>& drawable,
-                                              const char* data, int width, int height, int depth,
-                                              const Color& fg, const Color& bg)
-{
-  GdkPixmap *const pixmap = gdk_pixmap_create_from_data(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
-      const_cast<char*>(data), width, height, depth,
-      const_cast<GdkColor*>(fg.gobj()),
-      const_cast<GdkColor*>(bg.gobj()));
-
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                             const Color& transparent_color,
-                                             const std::string& filename)
-{
-  GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)), 0,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char*>(filename.c_str()));
-
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const Color& transparent_color,
-                                             const std::string& filename)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)), &bitmap,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char*>(filename.c_str()));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                             const Glib::RefPtr<Colormap>& colormap,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const Color& transparent_color,
-                                             const std::string& filename)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
-      Glib::unwrap(colormap), &bitmap,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char*>(filename.c_str()));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const Color& transparent_color,
-                                             const char* const* data)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm_d(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
-      &bitmap,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char**>(data));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                             const Glib::RefPtr<Colormap>& colormap,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const Color& transparent_color,
-                                             const char* const* data)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
-      const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
-      Glib::unwrap(colormap), &bitmap,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char**>(data));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const Color& transparent_color,
-                                             const char* const* data)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
-      0, // drawable
-      Glib::unwrap(colormap), &bitmap,
-      const_cast<GdkColor*>(transparent_color.gobj()),
-      const_cast<char**>(data));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
-Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
-                                             Glib::RefPtr<Bitmap>& mask,
-                                             const char* const* data)
-{
-  GdkBitmap* bitmap = 0;
-
-  GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
-      0, // drawable
-      Glib::unwrap(colormap), &bitmap,
-      0, // transparent_color
-      const_cast<char**>(data));
-
-  mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
-  return Glib::wrap((GdkPixmapObject*) pixmap);
-}
-
 } // namespace Gdk
diff --git a/gdk/src/pixmap.hg b/gdk/src/pixmap.hg
index 9c7a79f..7f04f0c 100644
--- a/gdk/src/pixmap.hg
+++ b/gdk/src/pixmap.hg
@@ -56,65 +56,14 @@ protected:
 
   Pixmap(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth = -1);
 
-  /// Initialize a Pixmap from data.
-  Pixmap(const Glib::RefPtr<Drawable>& drawable,
-         const char* data, int width, int height, int depth,
-         const Color& fg, const Color& bg);
-
   Pixmap(const Glib::RefPtr<Display>& display, NativeWindow anid);
 
 public:
 
   _WRAP_CREATE(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth = -1)
-  _WRAP_CREATE(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg)
 
   _WRAP_CREATE(const Glib::RefPtr<Display>& display, NativeWindow anid)
   _IGNORE(gdk_pixmap_foreign_new_for_display)
-  
-  static Glib::RefPtr<Pixmap> create_from_data(const Glib::RefPtr<const Drawable>& drawable,
-                                               const char* data, int width, int height, int depth,
-                                               const Color& fg, const Color& bg);
-
-  /// Create a Pixmap from a xpm file.
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                              const Color& transparent_color,
-                                              const std::string& filename);
-
-  // Create a Pixmap from a xpm file.
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const Color& transparent_color,
-                                              const std::string& filename);
-
-  /// Create a Pixmap from a xpm file with colormap.
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                              const Glib::RefPtr<Colormap>& colormap,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const Color& transparent_color,
-                                              const std::string& filename);
-
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const Color& transparent_color,
-                                              const char* const* data);
-
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
-                                              const Glib::RefPtr<Colormap>& colormap,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const Color& transparent_color,
-                                              const char* const* data);
-
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const Color& transparent_color,
-                                              const char* const* data);
-
-  static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
-                                              Glib::RefPtr<Bitmap>& mask,
-                                              const char* const* data);
-
-
 };
 
 } // namespace Gdk
-
diff --git a/gtk/src/image.ccg b/gtk/src/image.ccg
index 208603a..adb53b9 100644
--- a/gtk/src/image.ccg
+++ b/gtk/src/image.ccg
@@ -1,7 +1,7 @@
 // -*- c++ -*-
 /* $Id: image.ccg,v 1.3 2005/07/10 19:24:22 murrayc Exp $ */
 
-/* 
+/*
  *
  * Copyright 1998-2002 The gtkmm Development Team
  *
@@ -54,17 +54,6 @@ void Image::get_pixmap(Glib::RefPtr<Gdk::Pixmap>& pixmap, Glib::RefPtr<Gdk::Bitm
   mask   = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap, true));
 }
 
-void Image::get_image(Glib::RefPtr<Gdk::Image>& gdk_image, Glib::RefPtr<Gdk::Bitmap>& mask) const
-{
-  GdkImage* pImage = 0;
-  GdkBitmap* pBitmap = 0;
-
-  gtk_image_get_image(const_cast<GtkImage*>(gobj()), &pImage, &pBitmap);
-
-  gdk_image = Glib::wrap(pImage, true);
-  mask = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap, true));
-}
-
 void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
 {
   char* pStockID = 0; // GTK+ iconsistency: although not const, it should not be freed.
@@ -112,4 +101,3 @@ Glib::RefPtr<const Gio::Icon> Image::get_gicon(Gtk::IconSize& icon_size) const
 
 
 } // namespace Gtk
-
diff --git a/gtk/src/image.hg b/gtk/src/image.hg
index d509b88..d0b6672 100644
--- a/gtk/src/image.hg
+++ b/gtk/src/image.hg
@@ -1,7 +1,7 @@
 /* $Id: image.hg,v 1.9 2006/04/12 11:11:25 murrayc Exp $ */
 
 /* image.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@ _WRAP_ENUM(ImageType, GtkImageType)
  *
  * The Gtk::Image widget displays an image. Various kinds of object can be
  * displayed as an image; most typically, you would load a Gdk::Pixbuf ("pixel
- * buffer") from a file, and then display that. 
+ * buffer") from a file, and then display that.
  *
  * Gtk::Image is a subclass of Gtk::Misc, which implies that you can align it
  * (center, left, right) and add padding to it, using Gtk::Misc methods.
@@ -47,7 +47,7 @@ _WRAP_ENUM(ImageType, GtkImageType)
  * Gtk::Image is a "no window" widget (has no Gdk::Window of its own), so by
  * default does not receive events. If you want to receive events on the
  * image, such as button clicks, place the image inside a Gtk::EventBox, then
- * connect to the event signals on the event box. 
+ * connect to the event signals on the event box.
  *
  * The Image widget looks like this:
  * @image html image1.png
@@ -65,24 +65,19 @@ public:
   //TODO: The C documentation says that the constructor parameters can be NULL. Choose sensible method overloads.
 
   /** Creates an Image widget displaying @a pixmap with a @a mask.
-   * A Gdk::Pixmap is a server-side image buffer in the pixel format of the current display. 
+   * A Gdk::Pixmap is a server-side image buffer in the pixel format of the current display.
    *
    * @param pixmap A Gdk::Pixmap
    * @param mask A Gdk::Bitmap
    */
   _WRAP_CTOR(Image(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask), gtk_image_new_from_pixmap)
 
-  /** Creates an Image widget displaying an @a image with a mask.
-   * A Gdk::Image is a client-side image buffer in the pixel format of the current display.
-   */
-  _WRAP_CTOR(Image(const Glib::RefPtr<Gdk::Image>& image, const Glib::RefPtr<Gdk::Bitmap>& mask), gtk_image_new_from_image)
-
   /** Creates an Image widget displaying the file @a filename.
-   * If the file isn't found or can't be loaded, the resulting Gtk::Image will display a "broken image" icon. 
+   * If the file isn't found or can't be loaded, the resulting Gtk::Image will display a "broken image" icon.
    *
    * If the file contains an animation, the image will contain an animation.
    *
-   * If you need to detect failures to load the file, use Gdk::Pixbuf::create_from_file() to load the file yourself, 
+   * If you need to detect failures to load the file, use Gdk::Pixbuf::create_from_file() to load the file yourself,
    * then create the GtkImage from the pixbuf. (Or for animations, use Gdk::PixbufAnimation::create_from_file()).
    *
    * The storage type (get_storage_type()) of the returned image is not defined. It will be whatever is appropriate for displaying the file.
@@ -91,7 +86,7 @@ public:
 
   //TODO: Change this documentation when we have wrapped new_from_icon_set().
   /** Creates a new Image widget displaying @a pixbuf.
-   * Note that this just creates an GtkImage from the pixbuf. The Gtk::Image created will not react to state changes. 
+   * Note that this just creates an GtkImage from the pixbuf. The Gtk::Image created will not react to state changes.
    * Should you want that, you should use new_from_icon_set().
    */
   _WRAP_CTOR(Image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_image_new_from_pixbuf)
@@ -114,7 +109,6 @@ public:
   Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation);
 
   _WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask), gtk_image_set_from_pixmap)
-  _WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Image>& gdk_image, const Glib::RefPtr<Gdk::Bitmap>& mask), gtk_image_set_from_image)
   _WRAP_METHOD(void set(const std::string& filename), gtk_image_set_from_file)
   _WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_image_set_from_pixbuf)
   _WRAP_METHOD(void set(const Gtk::StockID& stock_id, IconSize size), gtk_image_set_from_stock)
@@ -130,7 +124,6 @@ public:
   _WRAP_METHOD(ImageType get_storage_type() const, gtk_image_get_storage_type)
 
   void get_pixmap(Glib::RefPtr<Gdk::Pixmap>& pixmap, Glib::RefPtr<Gdk::Bitmap>& mask) const;
-  void get_image(Glib::RefPtr<Gdk::Image>& gdk_image, Glib::RefPtr<Gdk::Bitmap>& mask) const;
   _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(), gtk_image_get_pixbuf, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const, gtk_image_get_pixbuf, refreturn, constversion)
   void get_stock(Gtk::StockID& stock_id, IconSize& size) const;
@@ -143,7 +136,7 @@ public:
   * IMAGE_GICON (see get_storage_type()).
   *
   * @param icon_size A place to store an icon size.
-  * 
+  *
   * @newin{2,14}
   */
   Glib::RefPtr<Gio::Icon> get_gicon(Gtk::IconSize& icon_size);
@@ -153,7 +146,7 @@ public:
   * IMAGE_GICON (see get_storage_type()).
   *
   * @param icon_size A place to store an icon size.
-  * 
+  *
   * @newin{2,14}
   */
   Glib::RefPtr<const Gio::Icon> get_gicon(Gtk::IconSize& icon_size) const;
@@ -168,7 +161,6 @@ public:
 
   _WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
   _WRAP_PROPERTY("pixmap", Glib::RefPtr<Gdk::Pixmap>)
-  _WRAP_PROPERTY("image", Glib::RefPtr<Gdk::Image>)
   _WRAP_PROPERTY("mask", Glib::RefPtr<Gdk::Pixmap>)
   _WRAP_PROPERTY("file", Glib::ustring)
   _WRAP_PROPERTY("stock", Glib::ustring)
@@ -180,4 +172,3 @@ public:
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/style.ccg b/gtk/src/style.ccg
index 12d89c1..2833610 100644
--- a/gtk/src/style.ccg
+++ b/gtk/src/style.ccg
@@ -26,17 +26,17 @@
 namespace Gtk
 {
 
-/* 
+/*
 Design notes:
 
 Okay these are my notes on how a GtkStyle works.
 They are not meant to be taken as documentation as I didn't
-write the code.  
+write the code.
 
 styles keeps a copy of itself for each color depth.  Thus
 changing a style after it has been attached wont work!
 
-At allocation time a Gtk Style has 
+At allocation time a Gtk Style has
   - all GC set to 0 as they will be allocated later
   - has all color values set to default values.
   - a ref count of 1 and an attach count of 0 (floating?)
@@ -49,7 +49,7 @@ all widgets.
 
 Attach acts to sink the object removing it from the floating state.
 
-attaching a style for the first time initializes it. 
+attaching a style for the first time initializes it.
 Initializing a style
   - sets the colormap and depth.
   - sets the mid colors. (thus allowing user to set these would be pointless)
@@ -58,7 +58,7 @@ Initializing a style
   - uses gtk_gc_get to share a gc if there is a matching one.
 
 Conclusions, we need to rework the concept of Gdk to allow
-for const objects.  
+for const objects.
 
 */
 
@@ -78,76 +78,6 @@ Pango::FontDescription Style::get_font() const
   return Pango::FontDescription(gobj()->font_desc, true); // true = make a copy.
 }
 
-Glib::RefPtr<Gdk::GC> Style::get_fg_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->fg_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_fg_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->fg_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_bg_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->bg_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_bg_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->bg_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_light_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->light_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_light_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->light_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_dark_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->dark_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_dark_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->dark_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_mid_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->mid_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_mid_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->mid_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_text_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->text_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_text_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->text_gc[state_type], true);
-}
-
-Glib::RefPtr<Gdk::GC> Style::get_base_gc(StateType state_type)
-{
-  return Glib::wrap(gobj()->base_gc[state_type], true);
-}
-
-Glib::RefPtr<const Gdk::GC> Style::get_base_gc(StateType state_type) const
-{
-  return Glib::wrap(gobj()->base_gc[state_type], true);
-}
-
 void Style::set_bg_pixmap(StateType state_type, const Glib::RefPtr<const Gdk::Pixmap>& pixmap)
 {
   GdkPixmap *const old_pixmap = gobj()->bg_pixmap[state_type];
@@ -178,28 +108,6 @@ void Style::set_ythickness(int ythickness)
   gobj()->ythickness = ythickness;
 }
 
-void Style::paint_polygon(const Glib::RefPtr<Gdk::Window>&      window,
-                          StateType                             state_type,
-                          ShadowType                            shadow_type,
-                          const Gdk::Rectangle&                 area,
-                          Widget&                               widget,
-                          const Glib::ustring&                  detail,
-                          const Glib::ArrayHandle<Gdk::Point>&  points,
-                          bool                                  fill) const
-{
-  gtk_paint_polygon(
-      const_cast<GtkStyle*>(gobj()),
-      Glib::unwrap(window),
-      (GtkStateType) state_type,
-      (GtkShadowType) shadow_type,
-      const_cast<GdkRectangle*>(area.gobj()),
-      widget.gobj(),
-      detail.c_str(),
-      reinterpret_cast<GdkPoint*>(const_cast<Gdk::Point*>(points.data())),
-      points.size(),
-      fill);
-}
-
 IconSet Style::lookup_icon_set(const Gtk::StockID& stock_id)
 {
   GtkIconSet* pIconSet = gtk_style_lookup_icon_set(gobj(), stock_id.get_c_str());
@@ -208,4 +116,3 @@ IconSet Style::lookup_icon_set(const Gtk::StockID& stock_id)
 }
 
 } // namespace Gtk
-
diff --git a/gtk/src/style.hg b/gtk/src/style.hg
index ee5c10b..06e1c42 100644
--- a/gtk/src/style.hg
+++ b/gtk/src/style.hg
@@ -70,7 +70,7 @@ class Style : public Glib::Object
 {
   _CLASS_GOBJECT(Style, GtkStyle, GTK_STYLE, Glib::Object, GObject)
   _IGNORE(gtk_style_ref, gtk_style_unref, gtk_style_get_font, gtk_style_set_font)
- 
+
 protected:
   _CTOR_DEFAULT()
 
@@ -103,30 +103,6 @@ public:
   void set_ythickness(int ythickness);
   _MEMBER_GET(ythickness, ythickness, int, gint)
 
-  Glib::RefPtr<Gdk::GC> get_fg_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_fg_gc(Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_bg_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_bg_gc(Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_light_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_light_gc(Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_dark_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_dark_gc(Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_mid_gc ( Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_mid_gc ( Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_text_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_text_gc(Gtk::StateType state_type) const;
-
-  Glib::RefPtr<Gdk::GC> get_base_gc(Gtk::StateType state_type);
-  Glib::RefPtr<const Gdk::GC> get_base_gc(Gtk::StateType state_type) const;
-
-  _MEMBER_GET_GOBJECT(black_gc, black_gc, Gdk::GC, GdkGC*)
-  _MEMBER_GET_GOBJECT(white_gc, white_gc, Gdk::GC, GdkGC*)
-
   void set_bg_pixmap(Gtk::StateType state_type, const Glib::RefPtr<const Gdk::Pixmap>& pixmap);
 
   Glib::RefPtr<Gdk::Pixmap>       get_bg_pixmap(Gtk::StateType state_type);
@@ -268,16 +244,6 @@ public:
                   int                               width,
                   int                               height) const, gtk_paint_option)
 
-  void paint_polygon(
-                  const Glib::RefPtr<Gdk::Window>&      window,
-                  Gtk::StateType                        state_type,
-                  ShadowType                            shadow_type,
-                  const Gdk::Rectangle&                 area,
-                  Widget&                               widget,
-                  const Glib::ustring&                  detail,
-                  const Glib::ArrayHandle<Gdk::Point>&  points,
-                  bool                                  fill) const;
-
   _WRAP_METHOD(void paint_shadow(
                   const Glib::RefPtr<Gdk::Window>&  window,
                   Gtk::StateType                    state_type,
@@ -330,7 +296,7 @@ public:
                   int                               width,
                   int                               height) const, gtk_paint_tab)
 
-                  
+
   _WRAP_METHOD(void paint_vline(
                   const Glib::RefPtr<Gdk::Window>&  window,
                   Gtk::StateType                    state_type,
@@ -400,7 +366,7 @@ public:
 
   _IGNORE(gtk_style_get, gtk_style_get_valist)
   _WRAP_METHOD(void get_style_property_value(GType widget_type, const Glib::ustring& property_name, Glib::ValueBase& value), gtk_style_get_style_property)
-  
+
   /** Queries the value of a style property corresponding to a
    * widget class in the given style.
    *
@@ -413,7 +379,7 @@ public:
   template <class PropertyType>
   void get_style_property(GType widget_type, const Glib::ustring& property_name, PropertyType& value) const;
 
-  
+
 protected:
   _WRAP_VFUNC(void realize(), realize)
   _WRAP_VFUNC(void unrealize(), unrealize)
@@ -455,13 +421,6 @@ protected:
          Widget* widget,
          const Glib::ustring& detail,
          int x,  int y, int width, int height), draw_shadow)
-  _WRAP_VFUNC(void draw_polygon(const Glib::RefPtr<Gdk::Window>& window,
-         Gtk::StateType state_type,
-         ShadowType shadow_type,
-         const Gdk::Rectangle& area,
-         Widget* widget,
-         const Glib::ustring& detail,
-         GdkPoint* point, int npoints, bool fill), draw_polygon)
   _WRAP_VFUNC(void draw_arrow(const Glib::RefPtr<Gdk::Window>& window,
          Gtk::StateType state_type,
          ShadowType shadow_type,
@@ -592,7 +551,7 @@ void Style::get_style_property(GType widget_type, const Glib::ustring& property_
   property_value.init(Glib::Value<PropertyType>::value_type());
 
   //We cast away the const.
-  //TODO: Either this get_style_property() should be non-const, 
+  //TODO: Either this get_style_property() should be non-const,
   //or get_style_property_value() should be const.
   //We can't really have both const and unconst versions of them because output parameters can't be const.
   //Bug https://bugzilla.gnome.org/show_bug.cgi?id=594171
@@ -603,4 +562,3 @@ void Style::get_style_property(GType widget_type, const Glib::ustring& property_
 }
 
 } // namespace Gtk
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]