[gtkmm] Fix the build with latest GTK+ from git master.



commit 096aaef2c693564374cb445a2de697aa42018db7
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 19 11:01:58 2010 +0200

    Fix the build with latest GTK+ from git master.
    
    * gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
    * gtk/src/application.[hg|ccg]: Constructor: Take Gio::ApplicationFlags
    instead of argv and argv.

 ChangeLog                |    8 +++++
 gtk/src/application.ccg  |    7 ----
 gtk/src/application.hg   |    9 ++---
 gtk/src/gtk_methods.defs |   77 +++++++++++++++------------------------------
 4 files changed, 37 insertions(+), 64 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f130d02..49f19df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-19  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with latest GTK+ from git master.
+
+	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+	* gtk/src/application.[hg|ccg]: Constructor: Take Gio::ApplicationFlags
+	instead of argv and argv.
+
 2.91.1:
 
 2010-10-18  Murray Cumming  <murrayc murrayc com>
diff --git a/gtk/src/application.ccg b/gtk/src/application.ccg
index 43b125f..0dc329f 100644
--- a/gtk/src/application.ccg
+++ b/gtk/src/application.ccg
@@ -23,12 +23,5 @@
 namespace Gtk
 {
 
-Glib::RefPtr<Application> Application::create(const Glib::ustring& appid)
-{
-  return Glib::wrap(gtk_application_new(appid.c_str(), 0, 0));
-}
-
-
 
 } // namespace Gtk
-
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index 1104458..d083fd9 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -35,14 +35,11 @@ class Application
 protected:
   _CLASS_GOBJECT(Application, GtkApplication, GTK_APPLICATION, Gio::Application, GApplication)
 
+  //TODO: Constructor?
 public:
 
-#m4 _CONVERSION(`int& ',`gint**',`&($3)')
-#m4 _CONVERSION(`char**&',`gchar***',`&($3)')
-  _WRAP_METHOD(static Glib::RefPtr<Application> create(const Glib::ustring& appid, int& argc, char**& argv), gtk_application_new)
-
-  //TODO: Documentation
-  static Glib::RefPtr<Application> create(const Glib::ustring& appid);
+#m4 _CONVERSION(`Gio::ApplicationFlags',`GApplicationFlags',`(GApplicationFlags)($3)')
+  _WRAP_METHOD(static Glib::RefPtr<Application> create(const Glib::ustring& appid, Gio::ApplicationFlags flags = Gio::APPLICATION_FLAGS_NONE), gtk_application_new)
 
   _WRAP_METHOD(void set_action_group(const Glib::RefPtr<ActionGroup>& group), gtk_application_set_action_group)
 
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index dae3e24..548c029 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -3907,60 +3907,11 @@
   (is-constructor-of "GtkApplication")
   (return-type "GtkApplication*")
   (parameters
-    '("const-gchar*" "appid")
-    '("gint*" "argc")
-    '("gchar***" "argv")
-  )
-)
-
-(define-method set_action_group
-  (of-object "GtkApplication")
-  (c-name "gtk_application_set_action_group")
-  (return-type "none")
-  (parameters
-    '("GtkActionGroup*" "group")
+    '("const-gchar*" "application_id")
+    '("GApplicationFlags" "flags")
   )
 )
 
-(define-method create_window
-  (of-object "GtkApplication")
-  (c-name "gtk_application_create_window")
-  (return-type "GtkWindow*")
-)
-
-(define-method get_window
-  (of-object "GtkApplication")
-  (c-name "gtk_application_get_window")
-  (return-type "GtkWindow*")
-)
-
-(define-method get_windows
-  (of-object "GtkApplication")
-  (c-name "gtk_application_get_windows")
-  (return-type "const-GSList*")
-)
-
-(define-method add_window
-  (of-object "GtkApplication")
-  (c-name "gtk_application_add_window")
-  (return-type "none")
-  (parameters
-    '("GtkWindow*" "window")
-  )
-)
-
-(define-method run
-  (of-object "GtkApplication")
-  (c-name "gtk_application_run")
-  (return-type "none")
-)
-
-(define-method quit
-  (of-object "GtkApplication")
-  (c-name "gtk_application_quit")
-  (return-type "none")
-)
-
 
 
 ;; From gtkarrow.h
@@ -27262,6 +27213,15 @@
   )
 )
 
+(define-method queue_draw_region
+  (of-object "GtkWidget")
+  (c-name "gtk_widget_queue_draw_region")
+  (return-type "none")
+  (parameters
+    '("cairo_region_t*" "region")
+  )
+)
+
 (define-method queue_resize
   (of-object "GtkWidget")
   (c-name "gtk_widget_queue_resize")
@@ -29610,6 +29570,21 @@
   )
 )
 
+(define-method get_application
+  (of-object "GtkWindow")
+  (c-name "gtk_window_get_application")
+  (return-type "GtkApplication*")
+)
+
+(define-method set_application
+  (of-object "GtkWindow")
+  (c-name "gtk_window_set_application")
+  (return-type "none")
+  (parameters
+    '("GtkApplication*" "application")
+  )
+)
+
 (define-method set_has_resize_grip
   (of-object "GtkWindow")
   (c-name "gtk_window_set_has_resize_grip")



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