[gtkmm] Fix build when _WRAP_ENUM generates enum class



commit e6e4de8bcd69e92a4836956e6fdfc66b54c6174c
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Apr 11 19:55:23 2017 +0200

    Fix build when _WRAP_ENUM generates enum class
    
    Bug 86864

 gdk/src/gdk_docs_override.xml |   48 ++++++++++++++
 gdk/src/window.hg             |    4 +-
 gtk/gtkmm/listviewtext.h      |    2 +-
 gtk/src/application.hg        |    4 +-
 gtk/src/aspectframe.hg        |    2 +-
 gtk/src/bin.ccg               |    6 +-
 gtk/src/bin.hg                |    6 +-
 gtk/src/box.hg                |    2 +-
 gtk/src/button.ccg            |    2 +-
 gtk/src/button.hg             |    2 +-
 gtk/src/buttonbox.hg          |    2 +-
 gtk/src/calendar.ccg          |    2 +-
 gtk/src/cellareabox.hg        |    4 +-
 gtk/src/colorchooser.hg       |    2 +-
 gtk/src/dialog.hg             |   52 ++++++++++++---
 gtk/src/entry.hg              |   40 ++++++------
 gtk/src/enums.ccg             |   10 +--
 gtk/src/enums.hg              |    4 +-
 gtk/src/filechooserbutton.hg  |    6 +-
 gtk/src/filechooserdialog.hg  |    4 +-
 gtk/src/flowbox.hg            |    2 +-
 gtk/src/frame.hg              |   14 ++--
 gtk/src/grid.hg               |    2 +-
 gtk/src/gtk_docs_override.xml |  143 ++++++++++++++++++++++++++++++++++++++---
 gtk/src/iconview.hg           |    6 +-
 gtk/src/label.hg              |    4 +-
 gtk/src/menuitem.ccg          |    4 +-
 gtk/src/messagedialog.hg      |    4 +-
 gtk/src/notebook.hg           |    4 +-
 gtk/src/paned.hg              |    2 +-
 gtk/src/placessidebar.hg      |    2 +-
 gtk/src/popover.hg            |    2 +-
 gtk/src/printoperation.ccg    |    2 +-
 gtk/src/printoperation.hg     |    2 +-
 gtk/src/recentfilter.ccg      |    2 +-
 gtk/src/scale.hg              |    2 +-
 gtk/src/scrollbar.hg          |    2 +-
 gtk/src/separator.hg          |    2 +-
 gtk/src/toolpalette.hg        |    4 +-
 gtk/src/treeview.hg           |   12 ++--
 gtk/src/widget.hg             |    4 +-
 gtk/src/window.hg             |    2 +-
 tools/m4/convert_gdk.m4       |    4 +-
 43 files changed, 316 insertions(+), 115 deletions(-)
---
diff --git a/gdk/src/gdk_docs_override.xml b/gdk/src/gdk_docs_override.xml
index 6b16b6d..5a23ae0 100644
--- a/gdk/src/gdk_docs_override.xml
+++ b/gdk/src/gdk_docs_override.xml
@@ -1,4 +1,52 @@
 <root>
+<substitute_type_name from="GIcon" to="Gio::Icon" />
+<substitute_type_name from="GAppInfo" to="Gio::AppInfo" />
+<substitute_type_name from="GSettings" to="Gio::Settings" />
+<substitute_type_name from="GInputStream" to="Gio::InputStream" />
+<substitute_type_name from="GCancellable" to="Gio::Cancellable" />
+
+<substitute_enumerator_name from_prefix="GDK_TOUCH_" to_prefix="Gdk::EventType::TOUCH_" />
+<substitute_enumerator_name from_prefix="GDK_DEVICE_TYPE_" to_prefix="Gdk::DeviceType::" />
+<substitute_enumerator_name from_prefix="GDK_ACTION_" to_prefix="Gdk::DragAction::" />
+<substitute_enumerator_name from_prefix="GDK_WINDOW_" to_prefix="Gdk::WindowType::" />
+<substitute_enumerator_name from_prefix="GDK_PIXBUF_ALPHA_" to_prefix="Gdk::PixbufAlphaMode::" />
+<substitute_enumerator_name from_prefix="G_IO_ERROR_" to_prefix="Gio::Error::" />
+<substitute_enumerator_name from_prefix="GDK_INTERP_" to_prefix="Gdk::InterpType::" />
+<substitute_enumerator_name from_prefix="GDK_SEAT_CAPABILITY_" to_prefix="Gdk::SeatCapabilities::" />
+<substitute_enumerator_name from_prefix="GDK_GRAB_" to_prefix="Gdk::GrabStatus::" />
+<substitute_enumerator_name from_prefix="GDK_MODIFIER_RESERVED_" 
to_prefix="Gdk::ModifierType::MODIFIER_RESERVED_" />
+<substitute_enumerator_name from_prefix="GDK_ANCHOR_" to_prefix="Gdk::AnchorHints::" />
+<substitute_enumerator_name from_prefix="GDK_GRAVITY_" to_prefix="Gdk::Gravity::" />
+<substitute_enumerator_name from_prefix="GDK_DECOR_" to_prefix="Gdk::WMDecoration::" />
+<substitute_enumerator_name from_prefix="GDK_FUNC_" to_prefix="Gdk::WMFunction::" />
+<substitute_enumerator_name from_prefix="GDK_FULLSCREEN_" to_prefix="Gdk::FullscreenMode::" />
+<substitute_enumerator_name from_prefix="GDK_VISUAL_" to_prefix="Gdk::VisualType::" />
+<!-- Some enums have enumerators without unique prefixes. Handle these enumerators individually. -->
+<substitute_enumerator_name from="GDK_POINTER_MOTION_HINT_MASK" 
to="Gdk::EventMask::POINTER_MOTION_HINT_MASK" />
+<substitute_enumerator_name from="GDK_MOTION_NOTIFY" to="Gdk::EventType::MOTION_NOTIFY" />
+<substitute_enumerator_name from="GDK_POINTER_MOTION_HINT_MASK" 
to="Gdk::EventMask::POINTER_MOTION_HINT_MASK" />
+<substitute_enumerator_name from="GDK_TOUCH_MASK" to="Gdk::EventMask::TOUCH_MASK" />
+<substitute_enumerator_name from="GDK_2BUTTON_PRESS" to="Gdk::EventType::2BUTTON_PRESS" />
+<substitute_enumerator_name from="GDK_3BUTTON_PRESS" to="Gdk::EventType::3BUTTON_PRESS" />
+<substitute_enumerator_name from="GDK_DOUBLE_BUTTON_PRESS" to="Gdk::EventType::DOUBLE_BUTTON_PRESS" />
+<substitute_enumerator_name from="GDK_TRIPLE_BUTTON_PRESS" to="Gdk::EventType::TRIPLE_BUTTON_PRESS" />
+<substitute_enumerator_name from="GDK_BUTTON_PRESS" to="Gdk::EventType::BUTTON_PRESS" />
+<substitute_enumerator_name from="GDK_BUTTON_PRESS_MASK" to="Gdk::EventMask::BUTTON_PRESS_MASK" />
+<substitute_enumerator_name from="GDK_SUPER_MASK" to="Gdk::ModifierType::SUPER_MASK" />
+<substitute_enumerator_name from="GDK_HYPER_MASK" to="Gdk::ModifierType::HYPER_MASK" />
+<substitute_enumerator_name from="GDK_META_MASK" to="Gdk::ModifierType::META_MASK" />
+<substitute_enumerator_name from="GDK_MODIFIER_MASK" to="Gdk::ModifierType::MODIFIER_MASK" />
+<substitute_enumerator_name from="GDK_BUTTON4_MASK" to="Gdk::ModifierType::BUTTON4_MASK" />
+<substitute_enumerator_name from="GDK_BUTTON5_MASK" to="Gdk::ModifierType::BUTTON5_MASK" />
+<substitute_enumerator_name from="GDK_CONTROL_MASK" to="Gdk::ModifierType::CONTROL_MASK" />
+<substitute_enumerator_name from="GDK_MOD2_MASK" to="Gdk::ModifierType::MOD2_MASK" />
+<substitute_enumerator_name from="GDK_BLANK_CURSOR" to="Gdk::CursorType::BLANK_CURSOR" />
+<!-- These are preprocessor defines. Don't substitute. -->
+<substitute_enumerator_name from="GDK_NONE" to="GDK_NONE" />
+<substitute_enumerator_name from="GDK_CURRENT_TIME" to="GDK_CURRENT_TIME" />
+<substitute_enumerator_name from="GDK_PIXBUF_ERROR" to="GDK_PIXBUF_ERROR" />
+<substitute_enumerator_name from="G_FILE_ERROR" to="G_FILE_ERROR" />
+<substitute_enumerator_name from="G_IO_ERROR" to="G_IO_ERROR" />
 
 <function name="gdk_display_manager_list_displays">
 <return> a list of #GdkDisplay objects.
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index 0760a13..1342acf 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -43,7 +43,9 @@ _WRAP_ENUM(WMFunction, GdkWMFunction)
 _WRAP_ENUM(WindowEdge, GdkWindowEdge)
 _WRAP_ENUM(Gravity, GdkGravity)
 _WRAP_ENUM(AnchorHints, GdkAnchorHints)
-_WRAP_ENUM(FullscreenMode, GdkFullscreenMode)
+_WRAP_ENUM(FullscreenMode, GdkFullscreenMode,
+  s#^CURRENT_MONITOR$#ON_CURRENT_MONITOR#,
+  s#^ALL_MONITORS$#ON_ALL_MONITORS#)
 
 class Cursor;
 class Pixbuf;
diff --git a/gtk/gtkmm/listviewtext.h b/gtk/gtkmm/listviewtext.h
index 9f29694..3d4807f 100644
--- a/gtk/gtkmm/listviewtext.h
+++ b/gtk/gtkmm/listviewtext.h
@@ -42,7 +42,7 @@ class ListViewText : public Gtk::TreeView
 {
 public:
 
-  ListViewText(guint columns_count, bool editable = false, Gtk::SelectionMode mode = Gtk::SELECTION_SINGLE);
+  ListViewText(guint columns_count, bool editable = false, Gtk::SelectionMode mode = 
Gtk::SelectionMode::SINGLE);
   ~ListViewText() noexcept override;
 
   /** Adds a title to column @a column.
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index d68c0e1..f349601 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -114,7 +114,7 @@ protected:
    *
    * @newin{3,4}
    */
-  explicit Application(const Glib::ustring& application_id = Glib::ustring(), Gio::ApplicationFlags flags = 
Gio::APPLICATION_FLAGS_NONE);
+  explicit Application(const Glib::ustring& application_id = Glib::ustring(), Gio::ApplicationFlags flags = 
Gio::ApplicationFlags::NONE);
   _IGNORE(gtk_application_new)
   _IGNORE(gtk_application_window_new)
 
@@ -137,7 +137,7 @@ public:
    *
    * @newin{3,4}
    */
-  static Glib::RefPtr<Application> create(const Glib::ustring& application_id = Glib::ustring(), 
Gio::ApplicationFlags flags = Gio::APPLICATION_FLAGS_NONE);
+  static Glib::RefPtr<Application> create(const Glib::ustring& application_id = Glib::ustring(), 
Gio::ApplicationFlags flags = Gio::ApplicationFlags::NONE);
 
 #m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3, 
Glib::OWNERSHIP_NONE)')
   _WRAP_METHOD(std::vector<Window*> get_windows(), gtk_application_get_windows)
diff --git a/gtk/src/aspectframe.hg b/gtk/src/aspectframe.hg
index e2a009b..b4a9529 100644
--- a/gtk/src/aspectframe.hg
+++ b/gtk/src/aspectframe.hg
@@ -51,7 +51,7 @@ public:
    * is taken from the requisition of the child.
    */
   _WRAP_CTOR(AspectFrame(const Glib::ustring& label = Glib::ustring(),
-    Align xalign = Gtk::ALIGN_CENTER, Align yalign = Gtk::ALIGN_CENTER,
+    Align xalign = Gtk::Align::CENTER, Align yalign = Gtk::Align::CENTER,
     float ratio = 1.0, bool obey_child = false), gtk_aspect_frame_new)
 
   /** Constructor to create a new AspectFrame object.
diff --git a/gtk/src/bin.ccg b/gtk/src/bin.ccg
index 7e256d5..023c301 100644
--- a/gtk/src/bin.ccg
+++ b/gtk/src/bin.ccg
@@ -35,7 +35,7 @@ Bin::remove()
 
 void
 Bin::add_label(const Glib::ustring& str, bool mnemonic,
-              Align x_align, Align y_align /* = ALIGN_CENTER */)
+              Align x_align, Align y_align /* = Align::CENTER */)
 {
   auto label = manage(new Label(str, x_align, y_align, mnemonic));
   add(*label);
@@ -45,14 +45,14 @@ Bin::add_label(const Glib::ustring& str, bool mnemonic,
 void
 Bin::add_pixlabel(const std::string& pixfile,
       const Glib::ustring& str,
-      Align x_align, Align y_align /* = ALIGN_CENTER */)
+      Align x_align, Align y_align /* = Align::CENTER */)
 {
   //Create Image and Label widgets:
   auto pmap = manage(new Image(pixfile));
   auto label = manage(new Label(str, x_align, y_align));
 
   //Put them in a Box:
-  auto hbox = manage(new Box(ORIENTATION_HORIZONTAL, 5));
+  auto hbox = manage(new Box(Orientation::HORIZONTAL, 5));
   hbox->pack_start(*pmap, PACK_SHRINK);
   hbox->pack_start(*label);
 
diff --git a/gtk/src/bin.hg b/gtk/src/bin.hg
index f3a6967..195222d 100644
--- a/gtk/src/bin.hg
+++ b/gtk/src/bin.hg
@@ -73,7 +73,7 @@ public:
    * values, see Gtk::Align.
    */
   void add_label(const Glib::ustring& label, bool mnemonic = false,
-    Align x_align = ALIGN_CENTER, Align y_align = ALIGN_CENTER);
+    Align x_align = Align::CENTER, Align y_align = Align::CENTER);
 
   //TODO: Change this to Pixbuf?
   /* Add Image and Label objects.
@@ -91,7 +91,7 @@ public:
   void add_pixlabel(const Glib::RefPtr<Gdk::Pixmap>& pixmap,
                     const Glib::RefPtr<Gdk::Bitmap>& mask,
                     const Glib::ustring& label,
-                    Align x_align = ALIGN_CENTER, Align y_align = ALIGN_CENTER);
+                    Align x_align = Align::CENTER, Align y_align = Align::CENTER);
   */
 
   /** Add Image and Label objects.
@@ -108,7 +108,7 @@ public:
    */
   void add_pixlabel(const std::string& pixfile,
                     const Glib::ustring& label,
-                    Align x_align = ALIGN_CENTER, Align y_align = ALIGN_CENTER);
+                    Align x_align = Align::CENTER, Align y_align = Align::CENTER);
 };
 
 }  //namespace Gtk
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 5bf1a72..e64e488 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -88,7 +88,7 @@ public:
    * @param orientation The box's orientation.
    * @param spacing Determines the space in pixels between child widgets.
    */
-  _WRAP_CTOR(Box(Orientation orientation = ORIENTATION_HORIZONTAL, int spacing = 0), gtk_box_new)
+  _WRAP_CTOR(Box(Orientation orientation = Orientation::HORIZONTAL, int spacing = 0), gtk_box_new)
 
   _WRAP_METHOD(void pack_start(Widget& child, bool expand, bool fill), gtk_box_pack_start)
 
diff --git a/gtk/src/button.ccg b/gtk/src/button.ccg
index 116b836..e3571f4 100644
--- a/gtk/src/button.ccg
+++ b/gtk/src/button.ccg
@@ -34,7 +34,7 @@ void Button::set_image_from_icon_name(const Glib::ustring& icon_name, IconSize s
   // appropriately for a button with an icon.
 
   set_icon_name(icon_name);
-  if (size == ICON_SIZE_BUTTON && !use_fallback)
+  if (size == static_cast<int>(BuiltinIconSize::BUTTON) && !use_fallback)
     return;
 
   auto image = dynamic_cast<Image*>(get_child());
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index f52c829..ed4f019 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -95,7 +95,7 @@ public:
    * @newin{3,12}
    */
   void set_image_from_icon_name(const Glib::ustring& icon_name,
-    IconSize size = ICON_SIZE_BUTTON, bool use_fallback = false);
+    IconSize size = BuiltinIconSize::BUTTON, bool use_fallback = false);
 
   _WRAP_SIGNAL(void clicked(), "clicked")
   _IGNORE_SIGNAL("activate") // Action signal
diff --git a/gtk/src/buttonbox.hg b/gtk/src/buttonbox.hg
index 365fd26..89e3122 100644
--- a/gtk/src/buttonbox.hg
+++ b/gtk/src/buttonbox.hg
@@ -56,7 +56,7 @@ class ButtonBox
   _CLASS_GTKOBJECT(ButtonBox,GtkButtonBox,GTK_BUTTON_BOX,Gtk::Box,GtkBox)
 public:
   //Note that we try to use the same defaul parameter value as the default property value.
-  _WRAP_CTOR(ButtonBox(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_button_box_new)
+  _WRAP_CTOR(ButtonBox(Orientation orientation = Orientation::HORIZONTAL), gtk_button_box_new)
 
   _WRAP_METHOD(ButtonBoxStyle get_layout() const, gtk_button_box_get_layout)
   _WRAP_METHOD(void set_layout(ButtonBoxStyle layout_style), gtk_button_box_set_layout)
diff --git a/gtk/src/calendar.ccg b/gtk/src/calendar.ccg
index 1d0711f..f3773b4 100644
--- a/gtk/src/calendar.ccg
+++ b/gtk/src/calendar.ccg
@@ -59,7 +59,7 @@ void Calendar::get_date(Glib::Date& date) const
   get_date(year, month, day);
 
   date.set_year(year);
-  date.set_month(static_cast<Glib::Date::Month>(Glib::Date::JANUARY + month)); // Month from 1 to 12 instead 
from 0 to 11
+  date.set_month(static_cast<Glib::Date::Month>(month + 1)); // Month from 1 to 12 instead from 0 to 11
   date.set_day(day);
 }
 
diff --git a/gtk/src/cellareabox.hg b/gtk/src/cellareabox.hg
index 09146f9..3d05afb 100644
--- a/gtk/src/cellareabox.hg
+++ b/gtk/src/cellareabox.hg
@@ -30,9 +30,9 @@ namespace Gtk
  * refers to adding cell renderers with reference to a particular position
  * in a CellAreaBox. There are two reference positions: the
  * start and the end of the box.
- * When the CellAreaBox is oriented in the Gtk::ORIENTATION_VERTICAL
+ * When the CellAreaBox is oriented in the Gtk::Orientation::VERTICAL
  * orientation, the start is defined as the top of the box and the end is
- * defined as the bottom. In the  Gtk::ORIENTATION_HORIZONTAL orientation
+ * defined as the bottom. In the  Gtk::Orientation::HORIZONTAL orientation
  * start is defined as the left side and the end is defined as the right
  * side.
  *
diff --git a/gtk/src/colorchooser.hg b/gtk/src/colorchooser.hg
index dfc040d..c980b34 100644
--- a/gtk/src/colorchooser.hg
+++ b/gtk/src/colorchooser.hg
@@ -72,7 +72,7 @@ public:
   * side effect of removing the default color and gray palettes
   * from the color chooser.
   *
-  * @param orientation ORIENTATION_HORIZONTAL if the palette should be displayed in rows, or 
ORIENTATION_VERTICAL for columns
+  * @param orientation Orientation::HORIZONTAL if the palette should be displayed in rows, or 
Orientation::VERTICAL for columns
   * @param colors_per_line The number of colors to show in each row/column.
   * @param colors The colors of the palette.
   *
diff --git a/gtk/src/dialog.hg b/gtk/src/dialog.hg
index d3c13d5..ec06627 100644
--- a/gtk/src/dialog.hg
+++ b/gtk/src/dialog.hg
@@ -36,6 +36,25 @@ namespace Gtk
 _CC_INCLUDE(gtk/gtk.h)
 _WRAP_ENUM(ResponseType, GtkResponseType)
 
+// A response ID can be either a ResponseType or an int.
+// Allow comparison between ResponseType and int.
+
+/// @relates Gtk::Dialog
+inline bool operator==(int lhs, ResponseType rhs)
+{ return lhs == static_cast<int>(rhs); }
+
+/// @relates Gtk::Dialog
+inline bool operator==(ResponseType lhs, int rhs)
+{ return static_cast<int>(lhs) == rhs; }
+
+/// @relates Gtk::Dialog
+inline bool operator!=(int lhs, ResponseType rhs)
+{ return !(lhs == rhs); }
+
+/// @relates Gtk::Dialog
+inline bool operator!=(ResponseType lhs, int rhs)
+{ return !(lhs == rhs); }
+
 /** Create popup windows.
  *
  * Dialog boxes are a convenient way to prompt the user for a small amount
@@ -56,7 +75,7 @@ _WRAP_ENUM(ResponseType, GtkResponseType)
  * signal_response() with a "response id" you specified. You are encouraged
  * to use the Gtk::ResponseType enum. If a dialog receives a delete event,
  * the "response" signal will be emitted with a response id of
- * Gtk::RESPONSE_DELETE_EVENT.
+ * Gtk::ResponseType::DELETE_EVENT.
  *
  * If you want to block waiting for a dialog to return before returning control
  * flow to your code, you can call run(). This function enters a
@@ -71,24 +90,35 @@ class Dialog : public Window
   _UNMANAGEABLE
   _IGNORE(gtk_dialog_add_buttons)
 public:
+  /// Helper class for implicit conversion from ResponseType to int in some situations.
+  class ResponseTypeOrInt
+  {
+    int m_response_id;
+  public:
+    ResponseTypeOrInt(int response_id) : m_response_id(response_id) {}
+    ResponseTypeOrInt(ResponseType response_id) : m_response_id(static_cast<int>(response_id)) {}
+    operator int() { return m_response_id; }
+  };
+
   _CTOR_DEFAULT()
   explicit Dialog(const Glib::ustring& title, bool modal = false, bool use_header_bar = false);
   Dialog(const Glib::ustring& title, Gtk::Window& parent, bool modal = false, bool use_header_bar = false);
 
-  _WRAP_METHOD(void add_action_widget(Widget& child, int response_id), gtk_dialog_add_action_widget)
-  _WRAP_METHOD(Button* add_button(const Glib::ustring& button_text, int response_id), gtk_dialog_add_button)
-  _WRAP_METHOD(void set_response_sensitive(int response_id, bool setting = true), 
gtk_dialog_set_response_sensitive)
-  _WRAP_METHOD(void set_default_response(int response_id), gtk_dialog_set_default_response)
-  _WRAP_METHOD(Widget* get_widget_for_response(int response_id), gtk_dialog_get_widget_for_response)
-  _WRAP_METHOD(const Widget* get_widget_for_response(int response_id) const, 
gtk_dialog_get_widget_for_response, constversion)
+#m4 _CONVERSION(`ResponseTypeOrInt',`gint',`$3')
+  _WRAP_METHOD(void add_action_widget(Widget& child, ResponseTypeOrInt response_id), 
gtk_dialog_add_action_widget)
+  _WRAP_METHOD(Button* add_button(const Glib::ustring& button_text, ResponseTypeOrInt response_id), 
gtk_dialog_add_button)
+  _WRAP_METHOD(void set_response_sensitive(ResponseTypeOrInt response_id, bool setting = true), 
gtk_dialog_set_response_sensitive)
+  _WRAP_METHOD(void set_default_response(ResponseTypeOrInt response_id), gtk_dialog_set_default_response)
+  _WRAP_METHOD(Widget* get_widget_for_response(ResponseTypeOrInt response_id), 
gtk_dialog_get_widget_for_response)
+  _WRAP_METHOD(const Widget* get_widget_for_response(ResponseTypeOrInt response_id) const, 
gtk_dialog_get_widget_for_response, constversion)
   _WRAP_METHOD(int get_response_for_widget(const Gtk::Widget& widget) const, 
gtk_dialog_get_response_for_widget)
 
-  _WRAP_METHOD(void response(int response_id), gtk_dialog_response)
+  _WRAP_METHOD(void response(ResponseTypeOrInt response_id), gtk_dialog_response)
 
   /** Blocks in a recursive main loop until the dialog either emits the
    * Gtk::Dialog::signal_response() signal, or is destroyed. If the dialog is
    * destroyed during the call to run(), run() returns
-   * Gtk::RESPONSE_NONE. Otherwise, it returns the response ID from the
+   * Gtk::ResponseType::NONE. Otherwise, it returns the response ID from the
    * signal_response() signal emission.
    *
    * Before entering the recursive main loop, run() calls
@@ -98,7 +128,7 @@ public:
    * During run(), the default behavior of Gtk::Widget::signal_delete_event()
    * is disabled; if the dialog receives the signal_delete_event() signal, it will not be
    * destroyed as windows usually are, and run() will return
-   * Gtk::RESPONSE_DELETE_EVENT. Also, during run() the dialog
+   * Gtk::ResponseType::DELETE_EVENT. Also, during run() the dialog
    * will be modal. You can force run() to return at any time by
    * calling response() to emit the signal_response() signal. Destroying
    * the dialog during run() is a very bad idea, because your
@@ -112,7 +142,7 @@ public:
    * int result = dialog.run();
    * switch (result)
    * {
-   * case Gtk::RESPONSE_ACCEPT:
+   * case static_cast<int>(Gtk::ResponseType::ACCEPT):
    *   do_application_specific_something();
    *   break;
    * default:
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index ae00c9b..af7e4ec 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -116,15 +116,15 @@ public:
 
   //We hand-code these so we can change the parameter order, so we can have a default parameter value:
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_from_pixbuf)
-  void set_icon_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, EntryIconPosition icon_pos = 
ENTRY_ICON_PRIMARY);
+  void set_icon_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_from_pixbuf)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_from_icon_name)
-  void set_icon_from_icon_name(const Glib::ustring& icon_name, EntryIconPosition icon_pos = 
ENTRY_ICON_PRIMARY);
+  void set_icon_from_icon_name(const Glib::ustring& icon_name, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_from_icon_name)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_from_gicon)
-  void set_icon_from_gicon(const Glib::RefPtr<Gio::Icon>& icon, EntryIconPosition icon_pos = 
ENTRY_ICON_PRIMARY);
+  void set_icon_from_gicon(const Glib::RefPtr<Gio::Icon>& icon, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_from_gicon)
 
   /** Do not show any icon in the specified position.
@@ -134,38 +134,38 @@ public:
    *
    * @newin{3,0}
    */
-  void unset_icon(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY);
+  void unset_icon(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY);
 
-  _WRAP_METHOD(ImageType get_icon_storage_type(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const, 
gtk_entry_get_icon_storage_type)
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_icon_pixbuf(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY), 
gtk_entry_get_icon_pixbuf, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_icon_pixbuf(EntryIconPosition icon_pos = 
ENTRY_ICON_PRIMARY) const, gtk_entry_get_icon_pixbuf, refreturn, constversion)
-  _WRAP_METHOD(Glib::ustring get_icon_name(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const, 
gtk_entry_get_icon_name)
-  _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon_gicon(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY), 
gtk_entry_get_icon_gicon, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_icon_gicon(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) 
const, gtk_entry_get_icon_gicon, refreturn, constversion)
+  _WRAP_METHOD(ImageType get_icon_storage_type(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY) 
const, gtk_entry_get_icon_storage_type)
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_icon_pixbuf(EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY), gtk_entry_get_icon_pixbuf, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_icon_pixbuf(EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY) const, gtk_entry_get_icon_pixbuf, refreturn, constversion)
+  _WRAP_METHOD(Glib::ustring get_icon_name(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY) const, 
gtk_entry_get_icon_name)
+  _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon_gicon(EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY), gtk_entry_get_icon_gicon, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_icon_gicon(EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY) const, gtk_entry_get_icon_gicon, refreturn, constversion)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_activatable)
-  void set_icon_activatable(bool activatable = true, EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY);
+  void set_icon_activatable(bool activatable = true, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_activatable)
 
-  _WRAP_METHOD(bool get_icon_activatable(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const, 
gtk_entry_get_icon_activatable)
-  _WRAP_METHOD(void set_icon_sensitive(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY, bool sensitive = 
true), gtk_entry_set_icon_sensitive)
-  _WRAP_METHOD(bool get_icon_sensitive(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY), 
gtk_entry_get_icon_sensitive)
+  _WRAP_METHOD(bool get_icon_activatable(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY) const, 
gtk_entry_get_icon_activatable)
+  _WRAP_METHOD(void set_icon_sensitive(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY, bool 
sensitive = true), gtk_entry_set_icon_sensitive)
+  _WRAP_METHOD(bool get_icon_sensitive(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY), 
gtk_entry_get_icon_sensitive)
   _WRAP_METHOD(int get_icon_at_pos(int x, int y) const, gtk_entry_get_icon_at_pos)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_tooltip_text)
-  void set_icon_tooltip_text(const Glib::ustring& tooltip, EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY);
+  void set_icon_tooltip_text(const Glib::ustring& tooltip, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_tooltip_text)
 
-  _WRAP_METHOD(Glib::ustring get_icon_tooltip_text(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const, 
gtk_entry_get_icon_tooltip_text)
+  _WRAP_METHOD(Glib::ustring get_icon_tooltip_text(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY) 
const, gtk_entry_get_icon_tooltip_text)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_tooltip_markup)
-  void set_icon_tooltip_markup(const Glib::ustring& tooltip, EntryIconPosition icon_pos = 
ENTRY_ICON_PRIMARY);
+  void set_icon_tooltip_markup(const Glib::ustring& tooltip, EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_tooltip_markup)
 
-  _WRAP_METHOD(Glib::ustring get_icon_tooltip_markup(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const, 
gtk_entry_get_icon_tooltip_markup)
+  _WRAP_METHOD(Glib::ustring get_icon_tooltip_markup(EntryIconPosition icon_pos = 
EntryIconPosition::PRIMARY) const, gtk_entry_get_icon_tooltip_markup)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_drag_source)
-  void set_icon_drag_source(const Glib::RefPtr<TargetList>& target_list, Gdk::DragAction actions = 
Gdk::ACTION_COPY, EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY);
+  void set_icon_drag_source(const Glib::RefPtr<TargetList>& target_list, Gdk::DragAction actions = 
Gdk::DragAction::COPY, EntryIconPosition icon_pos = EntryIconPosition::PRIMARY);
   _IGNORE(gtk_entry_set_icon_drag_source)
 
   /** Returns the area where entry's icon at @a icon_pos is drawn.
@@ -177,7 +177,7 @@ public:
    *
    * @newin{3,0}
    */
-  Gdk::Rectangle get_icon_area(EntryIconPosition icon_pos = ENTRY_ICON_PRIMARY) const;
+  Gdk::Rectangle get_icon_area(EntryIconPosition icon_pos = EntryIconPosition::PRIMARY) const;
   _IGNORE(gtk_entry_get_icon_area)
 
   _WRAP_METHOD(int get_current_icon_drag_source(), gtk_entry_get_current_icon_drag_source)
diff --git a/gtk/src/enums.ccg b/gtk/src/enums.ccg
index 2373ee4..d6325f1 100644
--- a/gtk/src/enums.ccg
+++ b/gtk/src/enums.ccg
@@ -38,17 +38,15 @@ float _gtkmm_align_float_from_enum(Align value)
   //Choose the float alignment value appropriate for this human-readable enum value:
   switch(value)
   {
-    case ALIGN_START:
+    case Align::START:
       return 0.0; break;
-    case ALIGN_CENTER:
+    case Align::CENTER:
       return 0.5; break;
-    case ALIGN_END:
+    case Align::END:
       return 1.0; break;
     default:
-      return _gtkmm_align_float_from_enum(ALIGN_START); break;
+      return _gtkmm_align_float_from_enum(Align::START); break;
   }
 }
 
 } //namespace Gtk
-
-
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index f2bc482..1d2842a 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -84,8 +84,8 @@ private:
   int size_;
 
 public:
-  IconSize()                     : size_ (0)    {}
-  IconSize(BuiltinIconSize size) : size_ (size) {}
+  IconSize()                     : size_(0) {}
+  IconSize(BuiltinIconSize size) : size_(static_cast<int>(size)) {}
 
   // Behave like an ordinary enum.
   explicit IconSize(int size) : size_ (size) {}
diff --git a/gtk/src/filechooserbutton.hg b/gtk/src/filechooserbutton.hg
index 300e518..3a80674 100644
--- a/gtk/src/filechooserbutton.hg
+++ b/gtk/src/filechooserbutton.hg
@@ -31,7 +31,7 @@ namespace Gtk
  * button to bring up a FileChooserDialog. The user can then use that dialog to change the file associated 
with that
  * button. This widget does not support setting the "select_multiple" property to true.
  *
- * The FileChooserButton supports the FileChooserActions FILE_CHOOSER_ACTION_OPEN and 
FILE_CHOOSER_ACTION_SELECT_FOLDER.
+ * The FileChooserButton supports the FileChooserActions FileChooserAction::OPEN and 
FileChooserAction::SELECT_FOLDER.
  *
  * The FileChooserButton will ellipsize the label, and will thus request little horizontal space. To give 
the button more
  * space, you should call size_request(), set_width_chars(), or pack the button in such a way that other 
interface
@@ -53,14 +53,14 @@ public:
   /** Creates a new file-selecting button widget with the default title.
    * @param action The open mode for the widget.
    */
-  explicit FileChooserButton(FileChooserAction action = FILE_CHOOSER_ACTION_OPEN);
+  explicit FileChooserButton(FileChooserAction action = FileChooserAction::OPEN);
 
   /** Creates a new file-selecting button widget.
    *
    * @param title The title of the browse dialog.
    * @param action The open mode for the widget.
    */
-  _WRAP_CTOR(FileChooserButton(const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN), gtk_file_chooser_button_new)
+  _WRAP_CTOR(FileChooserButton(const Glib::ustring& title, FileChooserAction action = 
FileChooserAction::OPEN), gtk_file_chooser_button_new)
 
   /** Creates a new file-selecting button widget which uses dialog as its file-picking window.
    *
diff --git a/gtk/src/filechooserdialog.hg b/gtk/src/filechooserdialog.hg
index 2d18ab3..bd13472 100644
--- a/gtk/src/filechooserdialog.hg
+++ b/gtk/src/filechooserdialog.hg
@@ -41,8 +41,8 @@ class FileChooserDialog
   _UNMANAGEABLE
 public:
   _IGNORE(gtk_file_chooser_dialog_new)
-  FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN, bool use_header_bar = false);
-  explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action = 
FILE_CHOOSER_ACTION_OPEN, bool use_header_bar = false);
+  FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action = 
FileChooserAction::OPEN, bool use_header_bar = false);
+  explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action = FileChooserAction::OPEN, 
bool use_header_bar = false);
 };
 
 } // namespace Gtk
diff --git a/gtk/src/flowbox.hg b/gtk/src/flowbox.hg
index 7048357..289d9ae 100644
--- a/gtk/src/flowbox.hg
+++ b/gtk/src/flowbox.hg
@@ -158,7 +158,7 @@ public:
   _WRAP_METHOD(void select_all(), gtk_flow_box_select_all)
   _WRAP_METHOD(void unselect_all(), gtk_flow_box_unselect_all)
 
-  _WRAP_METHOD(void set_selection_mode(SelectionMode mode = SELECTION_NONE), gtk_flow_box_set_selection_mode)
+  _WRAP_METHOD(void set_selection_mode(SelectionMode mode = SelectionMode::NONE), 
gtk_flow_box_set_selection_mode)
   _WRAP_METHOD(SelectionMode get_selection_mode() const, gtk_flow_box_get_selection_mode)
 
   _WRAP_METHOD(void set_hadjustment(const Glib::RefPtr<Adjustment>& adjustment), 
gtk_flow_box_set_hadjustment)
diff --git a/gtk/src/frame.hg b/gtk/src/frame.hg
index a6aceea..b1e8d7d 100644
--- a/gtk/src/frame.hg
+++ b/gtk/src/frame.hg
@@ -60,17 +60,17 @@ public:
 
   _WRAP_METHOD(void set_label_align(float xalign = 0.0, float yalign = 0.5), gtk_frame_set_label_align)
   /** Sets the alignment of the frame widget’s label. The
-   * default values for a newly created frame are Gtk::ALIGN_START and Gtk::ALIGN_CENTER.
+   * default values for a newly created frame are Gtk::Align::START and Gtk::Align::CENTER.
    *
    * @param xalign The position of the label along the top edge
-   * of the widget. A value of Gtk::ALIGN_START represents left alignment;
-   * Gtk::ALIGN_END represents right alignment.
-   * @param yalign The y alignment of the label. A value of Gtk::ALIGN_START aligns under 
-   * the frame; Gtk::ALIGN_END aligns above the frame. If the values are
-   * Gtk::ALIGN_START or Gtk::ALIGN_END the gap in the frame won’t be painted because the label
+   * of the widget. A value of Gtk::Align::START represents left alignment;
+   * Gtk::Align::END represents right alignment.
+   * @param yalign The y alignment of the label. A value of Gtk::Align::START aligns under
+   * the frame; Gtk::Align::END aligns above the frame. If the values are
+   * Gtk::Align::START or Gtk::Align::END the gap in the frame won’t be painted because the label
    * will be completely above or below the frame.
    */
-  _WRAP_METHOD(void set_label_align(Align xalign, Align yalign = Gtk::ALIGN_CENTER), 
gtk_frame_set_label_align)
+  _WRAP_METHOD(void set_label_align(Align xalign, Align yalign = Gtk::Align::CENTER), 
gtk_frame_set_label_align)
 
   _WRAP_METHOD(void get_label_align(float& xalign, float& yalign) const, gtk_frame_get_label_align)
 
diff --git a/gtk/src/grid.hg b/gtk/src/grid.hg
index 49715bb..d4528b7 100644
--- a/gtk/src/grid.hg
+++ b/gtk/src/grid.hg
@@ -54,7 +54,7 @@ class Grid
 public:
   _CTOR_DEFAULT
 
-  //TODO: Add a Grid(Orientation orientation = ORIENTATION_HORIZONTAL) constructor to match the Paned and 
Box ones?
+  //TODO: Add a Grid(Orientation orientation = Orientation::HORIZONTAL) constructor to match the Paned and 
Box ones?
   //Probably not, because a vertical GtkGrid is not very useful. murrayc.
 
   _WRAP_METHOD(void attach(Widget& child, int left, int top, int width = 1, int height = 1), gtk_grid_attach)
diff --git a/gtk/src/gtk_docs_override.xml b/gtk/src/gtk_docs_override.xml
index 91ec87c..3372c95 100644
--- a/gtk/src/gtk_docs_override.xml
+++ b/gtk/src/gtk_docs_override.xml
@@ -1,4 +1,137 @@
 <root>
+<substitute_type_name from="GObject" to="Glib::Object" />
+<substitute_type_name from="GClosure" to="GClosure" />
+<substitute_type_name from="GMenu" to="Gio::Menu" />
+<substitute_type_name from="GAction" to="Gio::Action" />
+<substitute_type_name from="GVariant" to="Glib::Variant" />
+<substitute_type_name from="GAppInfo" to="Gio::AppInfo" />
+<substitute_type_name from="GApplication" to="Gio::Application" />
+<substitute_type_name from="GActionGroup" to="Gio::ActionGroup" />
+<substitute_type_name from="GActionMap" to="Gio::ActionMap" />
+<substitute_type_name from="GMenuModel" to="Gio::MenuModel" />
+<substitute_type_name from="GType" to="GType" />
+<substitute_type_name from="GError" to="GError" />
+<substitute_type_name from="GFile" to="Gio::File" />
+<substitute_type_name from="GIcon" to="Gio::Icon" />
+<substitute_type_name from="GPermission" to="Gio::Permission" />
+<substitute_type_name from="GParamSpec" to="GParamSpec" />
+<substitute_type_name from="GResource" to="Gio::Resource" />
+<substitute_type_name from="GAsyncResult" to="Gio::AsyncResult" />
+<substitute_type_name from="GKeyFile" to="Glib::KeyFile" />
+<substitute_type_name from="GVolume" to="Gio::Volume" />
+<substitute_type_name from="GMountOperation" to="Gio::MountOperation" />
+<substitute_type_name from="GFileError" to="Glib::FileError" />
+<substitute_type_name from="GKeyFileError" to="Glib::KeyFileError" />
+
+<substitute_enumerator_name from_prefix="GTK_LICENSE_" to_prefix="Gtk::License::" />
+<substitute_enumerator_name from_prefix="GTK_ASSISTANT_PAGE_" to_prefix="Gtk::AssistantPageType::" />
+<substitute_enumerator_name from_prefix="GTK_PACK_" to_prefix="Gtk::PackType::" />
+<substitute_enumerator_name from_prefix="GTK_PACK_DIRECTION_" to_prefix="Gtk::PackDirection::" />
+<substitute_enumerator_name from_prefix="GTK_RELIEF_" to_prefix="Gtk::ReliefStyle::" />
+<substitute_enumerator_name from_prefix="GTK_ICON_SIZE_" to_prefix="Gtk::BuiltinIconSize::" />
+<substitute_enumerator_name from_prefix="GTK_BUTTONBOX_" to_prefix="Gtk::ButtonBoxStyle::" />
+<substitute_enumerator_name from_prefix="GTK_CELL_RENDERER_MODE_" to_prefix="Gtk::CellRendererMode::" />
+<substitute_enumerator_name from_prefix="PANGO_ELLIPSIZE_" to_prefix="Pango::EllipsizeMode::" />
+<substitute_enumerator_name from_prefix="GTK_SENSITIVITY_" to_prefix="Gtk::SensitivityType::" />
+<substitute_enumerator_name from_prefix="GTK_CSS_SECTION_" to_prefix="Gtk::CssSectionType::" />
+<substitute_enumerator_name from_prefix="GTK_RESPONSE_" to_prefix="Gtk::ResponseType::" />
+<substitute_enumerator_name from_prefix="GTK_INPUT_PURPOSE_" to_prefix="Gtk::InputPurpose::" />
+<substitute_enumerator_name from_prefix="GTK_IMAGE_" to_prefix="Gtk::ImageType::" />
+<substitute_enumerator_name from_prefix="GTK_PLACES_OPEN_" to_prefix="Gtk::PlacesOpenFlags::" />
+<substitute_enumerator_name from_prefix="GTK_SELECTION_" to_prefix="Gtk::SelectionMode::" />
+<substitute_enumerator_name from_prefix="GTK_WIN_POS_" to_prefix="Gtk::WindowPosition::" />
+<substitute_enumerator_name from_prefix="GTK_WINDOW_" to_prefix="Gtk::WindowType::" />
+<substitute_enumerator_name from_prefix="GTK_PHASE_" to_prefix="Gtk::PropagationPhase::" />
+<substitute_enumerator_name from_prefix="GTK_FILE_CHOOSER_ACTION_" to_prefix="Gtk::FileChooserAction::" />
+<substitute_enumerator_name from_prefix="GTK_FILE_CHOOSER_CONFIRMATION_" 
to_prefix="Gtk::FileChooserConfirmation::" />
+<substitute_enumerator_name from_prefix="GTK_EVENT_SEQUENCE_" to_prefix="Gtk::EventSequenceState::" />
+<substitute_enumerator_name from_prefix="GTK_POS_" to_prefix="Gtk::PositionType::" />
+<substitute_enumerator_name from_prefix="GTK_BASELINE_POSITION_" to_prefix="Gtk::BaselinePosition::" />
+<substitute_enumerator_name from_prefix="GTK_ICON_LOOKUP_" to_prefix="Gtk::IconLookupFlags::" />
+<substitute_enumerator_name from_prefix="GTK_JUSTIFY_" to_prefix="Gtk::Justification::" />
+<substitute_enumerator_name from_prefix="PANGO_WRAP_" to_prefix="Pango::WrapMode::" />
+<substitute_enumerator_name from_prefix="GTK_STATE_FLAG_" to_prefix="Gtk::StateFlags::" />
+<substitute_enumerator_name from_prefix="GTK_LEVEL_BAR_MODE_" to_prefix="Gtk::LevelBarMode::" />
+<substitute_enumerator_name from_prefix="GDK_ANCHOR_" to_prefix="Gdk::AnchorHints::" />
+<substitute_enumerator_name from_prefix="GDK_GRAVITY_" to_prefix="Gdk::Gravity::" />
+<substitute_enumerator_name from_prefix="GTK_ARROW_" to_prefix="Gtk::ArrowType::" />
+<substitute_enumerator_name from_prefix="GTK_BUTTONS_" to_prefix="Gtk::ButtonsType::" />
+<substitute_enumerator_name from_prefix="GTK_ALIGN_" to_prefix="Gtk::Align::" />
+<substitute_enumerator_name from_prefix="GTK_UNIT_" to_prefix="Gtk::Unit::" />
+<substitute_enumerator_name from_prefix="GDK_ACTION_" to_prefix="Gdk::DragAction::" />
+<substitute_enumerator_name from_prefix="GTK_PRINT_OPERATION_RESULT_" 
to_prefix="Gtk::PrintOperationResult::" />
+<substitute_enumerator_name from_prefix="GTK_PRINT_STATUS_" to_prefix="Gtk::PrintStatus::" />
+<substitute_enumerator_name from_prefix="GTK_TEXT_DIR_" to_prefix="Gtk::TextDirection::" />
+<substitute_enumerator_name from_prefix="GTK_POLICY_" to_prefix="Gtk::PolicyType::" />
+<substitute_enumerator_name from_prefix="GTK_CORNER_" to_prefix="Gtk::CornerType::" />
+<substitute_enumerator_name from_prefix="GDK_SOURCE_" to_prefix="Gdk::InputSource::" />
+<substitute_enumerator_name from_prefix="GTK_SHORTCUT_" to_prefix="Gtk::ShortcutType::" />
+<substitute_enumerator_name from_prefix="GTK_SIZE_GROUP_" to_prefix="Gtk::SizeGroupMopde::" />
+<substitute_enumerator_name from_prefix="GTK_TEXT_SEARCH_" to_prefix="Gtk::TextSearchFlags::" />
+<substitute_enumerator_name from_prefix="PANGO_UNDERLINE_" to_prefix="Pango::Underline::" />
+<substitute_enumerator_name from_prefix="GTK_TEXT_WINDOW_" to_prefix="Gtk::TextWindowType::" />
+<substitute_enumerator_name from_prefix="GTK_TOOLBAR_" to_prefix="Gtk::ToolbarStyle::" />
+<substitute_enumerator_name from_prefix="GTK_TREE_MODEL_" to_prefix="Gtk::TreeModelFlags::" />
+<substitute_enumerator_name from_prefix="GTK_TREE_VIEW_COLUMN_" to_prefix="Gtk::TreeViewColumnSizing::" />
+<substitute_enumerator_name from_prefix="GTK_ORIENTATION_" to_prefix="Gtk::Orientation::" />
+<substitute_enumerator_name from_prefix="GTK_ACCEL_" to_prefix="Gtk::AccelFlags::" />
+<substitute_enumerator_name from_prefix="GTK_DIR_" to_prefix="Gtk::DirectionType::" />
+<substitute_enumerator_name from_prefix="GTK_DEST_DEFAULT_" to_prefix="Gtk::DestDefaults::" />
+<substitute_enumerator_name from_prefix="GTK_PRINT_CAPABILITY_" to_prefix="Gtk::PrintCapabilities::" />
+<substitute_enumerator_name from_prefix="GTK_PRINT_OPERATION_ACTION_" 
to_prefix="Gtk::PrintOperationAction::" />
+<!-- GdkWindowWindowClass is not wrapped in gtkmm. Don't substitute its enumerator names. -->
+<substitute_enumerator_name from="GDK_INPUT_ONLY" to="GDK_INPUT_ONLY" />
+<substitute_enumerator_name from="GDK_INPUT_OUTPUT" to="GDK_INPUT_OUTPUT" />
+<!-- GSignalFlags is not wrapped in gtkmm. Don't substitute its enumerator names. -->
+<substitute_enumerator_name from_prefix="G_SIGNAL_" to_prefix="G_SIGNAL_" />
+<!-- Some enums have enumerators without unique prefixes. Handle these enumerators individually. -->
+<substitute_enumerator_name from="GDK_CONTROL_MASK" to="Gdk::ModifierType::CONTROL_MASK" />
+<substitute_enumerator_name from="GDK_SHIFT_MASK" to="Gdk::ModifierType::SHIFT_MASK" />
+<substitute_enumerator_name from="GDK_TOUCH_BEGIN" to="Gdk::EventType::TOUCH_BEGIN" />
+<substitute_enumerator_name from="GDK_TOUCH_UPDATE" to="Gdk::EventType::TOUCH_UPDATE" />
+<substitute_enumerator_name from="GDK_TOUCH_END" to="Gdk::EventType::TOUCH_END" />
+<substitute_enumerator_name from="GDK_BUTTON_PRESS_MASK" to="Gdk::EventMask::BUTTON_PRESS_MASK" />
+<substitute_enumerator_name from="GDK_BUTTON_RELEASE_MASK" to="Gdk::EventMask::BUTTON_RELEASE_MASK" />
+<substitute_enumerator_name from="GDK_KEY_PRESS_MASK" to="Gdk::EventMask::KEY_PRESS_MASK" />
+<substitute_enumerator_name from="GDK_KEY_RELEASE_MASK" to="Gdk::EventMask::KEY_RELEASE_MASK" />
+<substitute_enumerator_name from="GDK_SCROLL_MASK" to="Gdk::EventMask::SCROLL_MASK" />
+<substitute_enumerator_name from="GDK_POINTER_MOTION_MASK" to="Gdk::EventMask::POINTER_MOTION_MASK" />
+<substitute_enumerator_name from="GDK_ENTER_NOTIFY_MASK" to="Gdk::EventMask::ENTER_NOTIFY_MASK" />
+<substitute_enumerator_name from="GDK_LEAVE_NOTIFY_MASK" to="Gdk::EventMask::LEAVE_NOTIFY_MASK" />
+<substitute_enumerator_name from="GDK_STRUCTURE_MASK" to="Gdk::EventMask::STRUCTURE_MASK" />
+<substitute_enumerator_name from="GDK_FOCUS_CHANGE_MASK" to="Gdk::EventMask::FOCUS_CHANGE_MASK" />
+<substitute_enumerator_name from="GDK_PROPERTY_CHANGE_MASK" to="Gdk::EventMask::PROPERTY_CHANGE_MASK" />
+<substitute_enumerator_name from="GDK_PROXIMITY_IN_MASK" to="Gdk::EventMask::PROXIMITY_IN_MASK" />
+<substitute_enumerator_name from="GDK_PROXIMITY_OUT_MASK" to="Gdk::EventMask::PROXIMITY_OUT_MASK" />
+<substitute_enumerator_name from="GDK_WINDOW_SUBSURFACE" to="Gdk::WindowType::SUBSURFACE" />
+<!-- These are preprocessor defines. Don't substitute. -->
+<substitute_enumerator_name from="GTK_BUILDER_ERROR" to="GTK_BUILDER_ERROR" />
+<substitute_enumerator_name from="G_MARKUP_ERROR" to="G_MARKUP_ERROR" />
+<substitute_enumerator_name from="G_FILE_ERROR" to="G_FILE_ERROR" />
+<substitute_enumerator_name from="G_RESOURCE_ERROR" to="G_RESOURCE_ERROR" />
+<substitute_enumerator_name from="G_MAXINT" to="G_MAXINT" />
+<substitute_enumerator_name from="GDK_SELECTION_CLIPBOARD" to="GDK_SELECTION_CLIPBOARD" />
+<substitute_enumerator_name from="GDK_SELECTION_PRIMARY" to="GDK_SELECTION_PRIMARY" />
+<substitute_enumerator_name from="GDK_NONE" to="GDK_NONE" />
+<substitute_enumerator_name from="G_TYPE_STRING" to="G_TYPE_STRING" />
+<substitute_enumerator_name from="G_TYPE_INT" to="G_TYPE_INT" />
+<substitute_enumerator_name from="G_TYPE_NONE" to="G_TYPE_NONE" />
+<substitute_enumerator_name from="GTK_CSS_PROVIDER_ERROR" to="GTK_CSS_PROVIDER_ERROR" />
+<substitute_enumerator_name from="GDK_TYPE_PIXBUF" to="GDK_TYPE_PIXBUF" />
+<substitute_enumerator_name from_prefix="GTK_PRINT_SETTINGS_" to_prefix="GTK_PRINT_SETTINGS_" />
+<substitute_enumerator_name from="GTK_RECENT_MANAGER_ERROR" to="GTK_RECENT_MANAGER_ERROR" />
+<substitute_enumerator_name from="G_IO_ERROR" to="G_IO_ERROR" />
+<substitute_enumerator_name from="GDK_EVENT_STOP" to="GDK_EVENT_STOP" />
+<substitute_enumerator_name from="GDK_EVENT_PROPAGATE" to="GDK_EVENT_PROPAGATE" />
+<substitute_enumerator_name from="GTK_INPUT_ERROR" to="GTK_INPUT_ERROR" />
+<substitute_enumerator_name from_prefix="GTK_STYLE_PROVIDER_PRIORITY_" 
to_prefix="GTK_STYLE_PROVIDER_PRIORITY_" />
+<substitute_enumerator_name from="G_PI" to="G_PI" />
+<substitute_enumerator_name from="G_TYPE_BOOLEAN" to="G_TYPE_BOOLEAN" />
+<substitute_enumerator_name from_prefix="GTK_TREE_SORTABLE_" to_prefix="GTK_TREE_SORTABLE_" />
+<substitute_enumerator_name from="GTK_CAN_FOCUS" to="GTK_CAN_FOCUS" />
+<!-- This is the default substitution. Included here to avoid warnings from DocsParser.pm. -->
+<substitute_enumerator_name from="PANGO_SCALE" to="Pango::SCALE" />
+
 <function name="gtk_box_pack_start">
 <description>
 Left side insert a widget to a box.
@@ -250,16 +383,6 @@ Gets the value set by Gtk::Window::set_default_icon_list().
 
 
 <function name="gtk_window_set_default">
-<description>
-The default widget is the widget that&apos;s activated when the user
-presses Enter in a dialog (for example). This function sets or
-unsets the default widget for a #GtkWindow. When setting
-(rather than unsetting) the default widget it&apos;s generally easier to
-call gtk_widget_grab_focus() on the widget. Before making a widget
-the default widget, you must set the #GTK_CAN_DEFAULT flag on the
-widget you&apos;d like to make the default using Gtk::Widget::set_flags().
-
-</description>
 <parameters>
 <parameter name="window">
 <parameter_description> a #GtkWindow
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index ad6fc99..b5f07ea 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -247,8 +247,8 @@ public:
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
   void enable_model_drag_source(const std::vector<TargetEntry>& targets,
-                                Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK,
-                                Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+                                Gdk::ModifierType start_button_mask = Gdk::ModifierType::MODIFIER_MASK,
+                                Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
   _IGNORE(gtk_icon_view_enable_model_drag_source)
 
   /** Turns the IconView into a drop destination for automatic DND.
@@ -256,7 +256,7 @@ public:
    * @param targets The table of targets that the drag will support.
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
-  void enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions = 
Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+  void enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions = 
Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
   _IGNORE(gtk_icon_view_enable_model_drag_dest)
 
   _WRAP_METHOD(void unset_model_drag_source(), gtk_icon_view_unset_model_drag_source)
diff --git a/gtk/src/label.hg b/gtk/src/label.hg
index bbe752e..d93391c 100644
--- a/gtk/src/label.hg
+++ b/gtk/src/label.hg
@@ -44,7 +44,7 @@ public:
   explicit Label(const Glib::ustring& label, bool mnemonic = false);
 
   /** This constructor is a shortcut to create a Label with Widget
-   * alignment properties different from the default ALIGN_FILL.
+   * alignment properties different from the default Align::FILL.
    * @code
    * Gtk::Label label(text, h, v, mnemonic);
    * @endcode
@@ -55,7 +55,7 @@ public:
    * label.set_valign(v);
    * @endcode
    */
-  Label(const Glib::ustring& label, Align halign, Align valign = ALIGN_CENTER, bool mnemonic = false);
+  Label(const Glib::ustring& label, Align halign, Align valign = Align::CENTER, bool mnemonic = false);
 
 
   /// Doesn't use markup.
diff --git a/gtk/src/menuitem.ccg b/gtk/src/menuitem.ccg
index f1592e3..0d35447 100644
--- a/gtk/src/menuitem.ccg
+++ b/gtk/src/menuitem.ccg
@@ -51,7 +51,7 @@ void MenuItem::add_accel_label(const Glib::ustring& label, bool mnemonic)
   auto pLabel = manage(new AccelLabel(label, mnemonic));
 
   //Labels are centered by default, but in menus they should be left-aligned.
-  pLabel->set_halign(ALIGN_START);
+  pLabel->set_halign(Align::START);
 
   add(*pLabel);
 
@@ -78,7 +78,7 @@ void MenuItem::accelerate(Window& window)
     if(accel_key_.get_path().empty())
     {
       add_accelerator("activate", window.get_accel_group(),
-                      accel_key_.get_key(), accel_key_.get_mod(), ACCEL_VISIBLE);
+                      accel_key_.get_key(), accel_key_.get_mod(), AccelFlags::VISIBLE);
     }
     else
     {
diff --git a/gtk/src/messagedialog.hg b/gtk/src/messagedialog.hg
index c0315d1..82405ee 100644
--- a/gtk/src/messagedialog.hg
+++ b/gtk/src/messagedialog.hg
@@ -47,8 +47,8 @@ class MessageDialog : public Dialog
   _CLASS_GTKOBJECT(MessageDialog, GtkMessageDialog, GTK_MESSAGE_DIALOG, Gtk::Dialog, GtkDialog)
   _UNMANAGEABLE
 public:
-  explicit MessageDialog(const Glib::ustring& message, bool use_markup = false, MessageType type = 
MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
-  MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type 
= MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
+  explicit MessageDialog(const Glib::ustring& message, bool use_markup = false, MessageType type = 
MessageType::INFO, ButtonsType buttons = ButtonsType::OK, bool modal = false);
+  MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type 
= MessageType::INFO, ButtonsType buttons = ButtonsType::OK, bool modal = false);
   _IGNORE(gtk_message_dialog_new, gtk_message_dialog_new_with_markup)
 
   _IGNORE(gtk_message_dialog_set_markup)
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index 748f435..ead986d 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -130,8 +130,8 @@ public:
   _WRAP_METHOD(void set_tab_detachable(Widget& child, bool detachable = true), 
gtk_notebook_set_tab_detachable)
   _WRAP_METHOD(void detach_tab(Widget& child), gtk_notebook_detach_tab)
 
-  _WRAP_METHOD(Widget* get_action_widget(PackType pack_type = PACK_START), gtk_notebook_get_action_widget)
-  _WRAP_METHOD(void set_action_widget(Widget* widget, PackType pack_type = PACK_START), 
gtk_notebook_set_action_widget)
+  _WRAP_METHOD(Widget* get_action_widget(PackType pack_type = PackType::START), 
gtk_notebook_get_action_widget)
+  _WRAP_METHOD(void set_action_widget(Widget* widget, PackType pack_type = PackType::START), 
gtk_notebook_set_action_widget)
 
   _WRAP_SIGNAL(void switch_page(Widget* page, guint page_number), "switch_page")
   _WRAP_SIGNAL(void page_reordered(Widget* page, guint page_num), "page_reordered", no_default_handler)
diff --git a/gtk/src/paned.hg b/gtk/src/paned.hg
index b1ffc85..2a15e98 100644
--- a/gtk/src/paned.hg
+++ b/gtk/src/paned.hg
@@ -68,7 +68,7 @@ class Paned
 public:
 
   //Note that we try to use the same defaul parameter value as the default property value.
-  _WRAP_CTOR(Paned(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_paned_new)
+  _WRAP_CTOR(Paned(Orientation orientation = Orientation::HORIZONTAL), gtk_paned_new)
 
   _WRAP_METHOD(void add1(Widget& child), gtk_paned_add1)
   _WRAP_METHOD(void add2(Widget& child), gtk_paned_add2)
diff --git a/gtk/src/placessidebar.hg b/gtk/src/placessidebar.hg
index 1b59c00..f466bf8 100644
--- a/gtk/src/placessidebar.hg
+++ b/gtk/src/placessidebar.hg
@@ -77,7 +77,7 @@ public:
   _CTOR_DEFAULT
 
 
-  _WRAP_METHOD(void set_open_flags(PlacesOpenFlags flags = PLACES_OPEN_NORMAL), 
gtk_places_sidebar_set_open_flags)
+  _WRAP_METHOD(void set_open_flags(PlacesOpenFlags flags = PlacesOpenFlags::NORMAL), 
gtk_places_sidebar_set_open_flags)
   _WRAP_METHOD(PlacesOpenFlags get_open_flags() const, gtk_places_sidebar_get_open_flags)
 
   _WRAP_METHOD(void set_location(const Glib::RefPtr<const Gio::File>& location), 
gtk_places_sidebar_set_location)
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index e27154d..03857eb 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -112,7 +112,7 @@ public:
 #m4 _CONVERSION(`GdkRectangle*',`Gdk::Rectangle&',`Glib::wrap($3)')
   _WRAP_METHOD(bool get_pointing_to(Gdk::Rectangle& rect) const, gtk_popover_get_pointing_to)
 
-  _WRAP_METHOD(void set_position(PositionType position = POS_TOP), gtk_popover_set_position)
+  _WRAP_METHOD(void set_position(PositionType position = PositionType::TOP), gtk_popover_set_position)
   _WRAP_METHOD(PositionType get_position() const, gtk_popover_get_position)
 
   _WRAP_METHOD(void set_modal(bool modal = true), gtk_popover_set_modal)
diff --git a/gtk/src/printoperation.ccg b/gtk/src/printoperation.ccg
index b1153b1..dc56ae7 100644
--- a/gtk/src/printoperation.ccg
+++ b/gtk/src/printoperation.ccg
@@ -47,7 +47,7 @@ PrintOperation::run(PrintOperationAction action)
   PrintOperationResult res =
     (PrintOperationResult)gtk_print_operation_run(this->gobj(), (GtkPrintOperationAction)action, nullptr, 
&gerror);
 
-  if (res == PRINT_OPERATION_RESULT_ERROR)
+  if (res == PrintOperationResult::ERROR)
   {
     gtk_print_operation_get_error(this->gobj(), &gerror);
     ::Glib::Error::throw_exception(gerror);
diff --git a/gtk/src/printoperation.hg b/gtk/src/printoperation.hg
index 9c973f8..db6454a 100644
--- a/gtk/src/printoperation.hg
+++ b/gtk/src/printoperation.hg
@@ -96,7 +96,7 @@ public:
 
   /** See the run() method that takes both action and parent parameters.
    */
-  PrintOperationResult run(PrintOperationAction action = PRINT_OPERATION_ACTION_PRINT_DIALOG);
+  PrintOperationResult run(PrintOperationAction action = PrintOperationAction::PRINT_DIALOG);
 
   _WRAP_METHOD(PrintOperationResult run(PrintOperationAction action, Window& parent), 
gtk_print_operation_run, errthrow)
 
diff --git a/gtk/src/recentfilter.ccg b/gtk/src/recentfilter.ccg
index 61acfe7..a19a466 100644
--- a/gtk/src/recentfilter.ccg
+++ b/gtk/src/recentfilter.ccg
@@ -65,7 +65,7 @@ namespace Gtk
 {
 
 RecentFilter::Info::Info()
-: contains(Gtk::RECENT_FILTER_MIME_TYPE), //arbitrary default
+: contains(Gtk::RecentFilterFlags::MIME_TYPE), //arbitrary default
   age(0)
 {
 }
diff --git a/gtk/src/scale.hg b/gtk/src/scale.hg
index fd0ad55..bb09d31 100644
--- a/gtk/src/scale.hg
+++ b/gtk/src/scale.hg
@@ -52,7 +52,7 @@ public:
   explicit Scale(Orientation orientation);
 
   //Note that we try to use the same default parameter value as the default property value.
-  explicit Scale(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation = 
ORIENTATION_HORIZONTAL);
+  explicit Scale(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation = 
Orientation::HORIZONTAL);
   _IGNORE(gtk_scale_new)
 
   /** Set the number of decimal digits.
diff --git a/gtk/src/scrollbar.hg b/gtk/src/scrollbar.hg
index 23d5a99..ec287b9 100644
--- a/gtk/src/scrollbar.hg
+++ b/gtk/src/scrollbar.hg
@@ -51,7 +51,7 @@ public:
   _CTOR_DEFAULT()
 
   //Note that we try to use the same defaul parameter value as the default property value.
-  explicit Scrollbar(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation = 
ORIENTATION_HORIZONTAL);
+  explicit Scrollbar(const Glib::RefPtr<Adjustment>& adjustment, Orientation orientation = 
Orientation::HORIZONTAL);
   _IGNORE(gtk_scrollbar_new)
 
 };
diff --git a/gtk/src/separator.hg b/gtk/src/separator.hg
index 9ee3cf9..f34de3a 100644
--- a/gtk/src/separator.hg
+++ b/gtk/src/separator.hg
@@ -42,7 +42,7 @@ class Separator
 public:
 
   //Note that we try to use the same default parameter value as the default property value.
-  _WRAP_CTOR(Separator(Orientation orientation = ORIENTATION_HORIZONTAL), gtk_separator_new)
+  _WRAP_CTOR(Separator(Orientation orientation = Orientation::HORIZONTAL), gtk_separator_new)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/toolpalette.hg b/gtk/src/toolpalette.hg
index 95cf027..fd87c19 100644
--- a/gtk/src/toolpalette.hg
+++ b/gtk/src/toolpalette.hg
@@ -86,8 +86,8 @@ public:
   _WRAP_METHOD(ToolItem* get_drag_item(const SelectionData& selection), gtk_tool_palette_get_drag_item)
   _WRAP_METHOD(const ToolItem* get_drag_item(const SelectionData& selection) const, 
gtk_tool_palette_get_drag_item, constversion)
 
-  _WRAP_METHOD(void set_drag_source(ToolPaletteDragTargets targets = TOOL_PALETTE_DRAG_ITEMS), 
gtk_tool_palette_set_drag_source)
-  _WRAP_METHOD(void add_drag_dest(Gtk::Widget& widget, DestDefaults flags = DEST_DEFAULT_ALL, 
ToolPaletteDragTargets targets = TOOL_PALETTE_DRAG_ITEMS, Gdk::DragAction actions = Gdk::ACTION_COPY), 
gtk_tool_palette_add_drag_dest)
+  _WRAP_METHOD(void set_drag_source(ToolPaletteDragTargets targets = ToolPaletteDragTargets::ITEMS), 
gtk_tool_palette_set_drag_source)
+  _WRAP_METHOD(void add_drag_dest(Gtk::Widget& widget, DestDefaults flags = DestDefaults::ALL, 
ToolPaletteDragTargets targets = ToolPaletteDragTargets::ITEMS, Gdk::DragAction actions = 
Gdk::DragAction::COPY), gtk_tool_palette_add_drag_dest)
 
 #m4 _CONVERSION(`const GtkTargetEntry*',`TargetEntry',`TargetEntry(*$3)')
   _WRAP_METHOD(static TargetEntry get_drag_target_item(), gtk_tool_palette_get_drag_target_item)
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 65b1a7e..1cdeba6 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -563,8 +563,8 @@ public:
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
   void enable_model_drag_source(const std::vector<TargetEntry>& targets,
-                                Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK,
-                                Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+                                Gdk::ModifierType start_button_mask = Gdk::ModifierType::MODIFIER_MASK,
+                                Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
 
   // Uses the default "GTK_TREE_MODEL_ROW" target, which the TreeView can handle automatically.
 
@@ -573,8 +573,8 @@ public:
    * @param start_button_mask Mask of allowed buttons to start drag.
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
-  void enable_model_drag_source(Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK,
-                                Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+  void enable_model_drag_source(Gdk::ModifierType start_button_mask = Gdk::ModifierType::MODIFIER_MASK,
+                                Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
 
   _IGNORE(gtk_tree_view_enable_model_drag_dest)
 
@@ -583,14 +583,14 @@ public:
    * @param targets The table of targets that the drag will support.
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
-  void enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions = 
Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+  void enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions = 
Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
 
   /** Turns the TreeView into a drop destination for automatic DND.  This uses the default
    *  "GTK_TREE_MODEL_ROW" target, which the TreeView can handle automatically.
    *
    * @param actions The bitmask of possible actions for a drag from this widget.
    */
-  void enable_model_drag_dest(Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+  void enable_model_drag_dest(Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
 
   /** Undoes the effect of enable_model_drag_source()
    */
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index e94605e..1fd0a7e 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -426,7 +426,7 @@ public:
 
   //TODO: Change the defaults? Maybe we should use ALL for DestDefaults. See other drag_dest_set() methods 
here and in other widgets.
   void drag_dest_set(DestDefaults flags = DestDefaults(0), Gdk::DragAction actions = Gdk::DragAction(0));
-  void drag_dest_set(const std::vector<TargetEntry>& targets, DestDefaults flags = DEST_DEFAULT_ALL, 
Gdk::DragAction actions = Gdk::ACTION_COPY);
+  void drag_dest_set(const std::vector<TargetEntry>& targets, DestDefaults flags = DestDefaults::ALL, 
Gdk::DragAction actions = Gdk::DragAction::COPY);
   _IGNORE(gtk_drag_dest_set)
 
   _WRAP_METHOD(void drag_dest_unset(), gtk_drag_dest_unset)
@@ -441,7 +441,7 @@ public:
   _WRAP_METHOD(void drag_dest_add_image_targets(), gtk_drag_dest_add_image_targets)
   _WRAP_METHOD(void drag_dest_add_uri_targets(), gtk_drag_dest_add_uri_targets)
 
-  void drag_source_set(const std::vector<TargetEntry>& targets, Gdk::ModifierType start_button_mask = 
Gdk::MODIFIER_MASK, Gdk::DragAction actions = Gdk::ACTION_COPY);
+  void drag_source_set(const std::vector<TargetEntry>& targets, Gdk::ModifierType start_button_mask = 
Gdk::ModifierType::MODIFIER_MASK, Gdk::DragAction actions = Gdk::DragAction::COPY);
   _IGNORE(gtk_drag_source_set)
 
   _WRAP_METHOD(void drag_source_unset(), gtk_drag_source_unset)
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 7a86d75..206bc4a 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -50,7 +50,7 @@ class Window : public Bin
   //TODO: Use gtk_window_set_destroy_with_parent() to allow use of Gtk::manage() with top-level windows, 
using the transient-parent?
 
 public:
-  _WRAP_CTOR(Window(WindowType type = WINDOW_TOPLEVEL), gtk_window_new)
+  _WRAP_CTOR(Window(WindowType type = WindowType::TOPLEVEL), gtk_window_new)
 
   _WRAP_PROPERTY("type", WindowType)
   _WRAP_PROPERTY("title", Glib::ustring)
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 3ebb25f..66cd630 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -76,8 +76,8 @@ _CONV_ENUM(Gdk,GLError)
 
 _CONVERSION(`guint32&',`guint32*',`&($3)')
 
-_CONVERSION(`EventMask',`gint',`$3')
-_CONVERSION(`Gdk::EventMask',`gint',`$3')
+_CONVERSION(`EventMask',`gint',`static_cast<gint>($3)')
+_CONVERSION(`Gdk::EventMask',`gint',`static_cast<gint>($3)')
 _CONVERSION(`gint',`Gdk::EventMask',`static_cast<Gdk::EventMask>($3)')
 _CONVERSION(`ModifierType&',`GdkModifierType*',`(($2) &($3))')
 _CONVERSION(`WMDecoration&',`GdkWMDecoration*',`(($2) &($3))')


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