[gtkmm] Added some StatusBar and TextView methods.



commit 898a5385d8e55d46d874fc5083eabb6297fc764e
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jun 24 09:12:31 2010 +0200

    Added some StatusBar and TextView methods.
    
    * gtk/src/gtk_methods.defs: Regenerated with h2defs.py
    * gtk/src/statusbar.hg: Added remove_all().
    * gtk/src/textview.hg: Added get_hadjustment(), get_vadjustment(),
        im_context_filter_keypress(), and reset_im_context().
    
        These were added in GTK+ 2.22.

 ChangeLog                |   13 +++++-
 gtk/src/gtk_methods.defs |  117 +++++++++++++++++++++++++++++++++++++++++++++-
 gtk/src/statusbar.hg     |    9 +++-
 gtk/src/textview.hg      |   10 ++++
 4 files changed, 145 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 62da373..6abdafc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
+2010-06-24  Murray Cumming  <murrayc murrayc com>
+
+	Added some StatusBar and TextView methods.
+
+	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py
+	* gtk/src/statusbar.hg: Added remove_all().
+	* gtk/src/textview.hg: Added get_hadjustment(), get_vadjustment(),
+    im_context_filter_keypress(), and reset_im_context().
+
+    These were added in GTK+ 2.22.
+
 2010-06-23  Murray Cumming  <murrayc murrayc com>
 
-	Correct that atkmm dependency version.
+	Correct the atkmm dependency version.
 
 	* configure.ac: Correct the required version of atkmm, because I
     corrected it in atkmm.
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 3295e0d..1d797d6 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -285,6 +285,12 @@
   (gtype-id "GTK_TYPE_SIZE_GROUP")
 )
 
+(define-object SizeRequest
+  (in-module "Gtk")
+  (c-name "GtkSizeRequest")
+  (gtype-id "GTK_TYPE_SIZE_REQUEST")
+)
+
 (define-object StatusIcon
   (in-module "Gtk")
   (parent "GObject")
@@ -1291,7 +1297,7 @@
     '("icontheme" "GTK_DEBUG_ICONTHEME")
     '("printing" "GTK_DEBUG_PRINTING")
     '("builder" "GTK_DEBUG_BUILDER")
-    '("extended-layout" "GTK_DEBUG_EXTENDED_LAYOUT")
+    '("size-request" "GTK_DEBUG_SIZE_REQUEST")
   )
 )
 
@@ -2002,6 +2008,16 @@
   )
 )
 
+(define-enum SizeRequestMode
+  (in-module "Gtk")
+  (c-name "GtkSizeRequestMode")
+  (gtype-id "GTK_TYPE_SIZE_REQUEST_MODE")
+  (values
+    '("height-for-width" "GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH")
+    '("width-for-height" "GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT")
+  )
+)
+
 (define-enum FileChooserAction
   (in-module "Gtk")
   (c-name "GtkFileChooserAction")
@@ -3173,6 +3189,15 @@
   (return-type "GType")
 )
 
+(define-method set_widget
+  (of-object "GtkAccessible")
+  (c-name "gtk_accessible_set_widget")
+  (return-type "none")
+  (parameters
+    '("GtkWidget*" "widget")
+  )
+)
+
 (define-method get_widget
   (of-object "GtkAccessible")
   (c-name "gtk_accessible_get_widget")
@@ -3988,6 +4013,12 @@
   )
 )
 
+(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")
@@ -9538,6 +9569,12 @@
   (return-type "GtkWidget*")
 )
 
+(define-method get_font_selection
+  (of-object "GtkFontSelectionDialog")
+  (c-name "gtk_font_selection_dialog_get_font_selection")
+  (return-type "GtkWidget*")
+)
+
 (define-method get_font_name
   (of-object "GtkFontSelectionDialog")
   (c-name "gtk_font_selection_dialog_get_font_name")
@@ -13526,6 +13563,12 @@
   (varargs #t)
 )
 
+(define-method get_message_area
+  (of-object "GtkMessageDialog")
+  (c-name "gtk_message_dialog_get_message_area")
+  (return-type "GtkWidget*")
+)
+
 
 
 ;; From gtkmisc.h
@@ -18455,6 +18498,73 @@
 
 
 
+;; From gtksizerequest.h
+
+(define-function gtk_size_request_get_type
+  (c-name "gtk_size_request_get_type")
+  (return-type "GType")
+)
+
+(define-method get_request_mode
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_request_mode")
+  (return-type "GtkSizeRequestMode")
+)
+
+(define-method get_width
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_width")
+  (return-type "none")
+  (parameters
+    '("gint*" "minimum_width")
+    '("gint*" "natural_width")
+  )
+)
+
+(define-method get_height_for_width
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_height_for_width")
+  (return-type "none")
+  (parameters
+    '("gint" "width")
+    '("gint*" "minimum_height")
+    '("gint*" "natural_height")
+  )
+)
+
+(define-method get_height
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_height")
+  (return-type "none")
+  (parameters
+    '("gint*" "minimum_height")
+    '("gint*" "natural_height")
+  )
+)
+
+(define-method get_width_for_height
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_width_for_height")
+  (return-type "none")
+  (parameters
+    '("gint" "height")
+    '("gint*" "minimum_width")
+    '("gint*" "natural_width")
+  )
+)
+
+(define-method get_size
+  (of-object "GtkSizeRequest")
+  (c-name "gtk_size_request_get_size")
+  (return-type "none")
+  (parameters
+    '("GtkRequisition*" "minimum_size")
+    '("GtkRequisition*" "natural_size")
+  )
+)
+
+
+
 ;; From gtksocket.h
 
 (define-function gtk_socket_get_type
@@ -26589,6 +26699,11 @@
   (return-type "GType")
 )
 
+(define-function gtk_size_request_mode_get_type
+  (c-name "gtk_size_request_mode_get_type")
+  (return-type "GType")
+)
+
 (define-function gtk_file_chooser_action_get_type
   (c-name "gtk_file_chooser_action_get_type")
   (return-type "GType")
diff --git a/gtk/src/statusbar.hg b/gtk/src/statusbar.hg
index a409fb7..42b0bad 100644
--- a/gtk/src/statusbar.hg
+++ b/gtk/src/statusbar.hg
@@ -1,7 +1,7 @@
 /* $Id: statusbar.hg,v 1.2 2003/10/12 09:38:11 murrayc Exp $ */
 
 /* statusbar.h
- * 
+ *
  * Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -51,7 +51,13 @@ public:
   _WRAP_METHOD(guint get_context_id(const Glib::ustring& context_description), gtk_statusbar_get_context_id)
   guint push(const Glib::ustring& text, guint context_id = 0);
   _WRAP_METHOD(void pop(guint context_id = 0), gtk_statusbar_pop)
+
+  //We don't use _WRAP_METHOD() here because we want to change the parameter order.
+  //TODO: Documentation.
   void remove_message(guint message_id, guint context_id = 0);
+
+  _WRAP_METHOD(void remove_all(guint context_id = 0), gtk_statusbar_remove_all)
+
   _WRAP_METHOD(void set_has_resize_grip(bool setting = true), gtk_statusbar_set_has_resize_grip)
   _WRAP_METHOD(bool get_has_resize_grip() const, gtk_statusbar_get_has_resize_grip)
 
@@ -68,4 +74,3 @@ public:
 };
 
 } /* namespace Gtk */
-
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index d57cf59..aa166bc 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -135,6 +135,13 @@ public:
                                             int window_x, int window_y,
                                             int& buffer_x, int& buffer_y) const, gtk_text_view_window_to_buffer_coords)
 
+
+  _WRAP_METHOD(Adjustment* get_hadjustment(), gtk_text_view_get_hadjustment)
+  _WRAP_METHOD(const Adjustment* get_hadjustment() const, gtk_text_view_get_hadjustment, constversion)
+
+  _WRAP_METHOD(Adjustment* get_vadjustment(), gtk_text_view_get_vadjustment)
+  _WRAP_METHOD(const Adjustment* get_vadjustment() const, gtk_text_view_get_vadjustment, constversion)
+
   _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(TextWindowType win), gtk_text_view_get_window, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const, gtk_text_view_get_window, refreturn, constversion)
   _WRAP_METHOD(TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window), gtk_text_view_get_window_type)
@@ -149,6 +156,9 @@ public:
   _WRAP_METHOD(bool starts_display_line(const TextBuffer::iterator&  iter), gtk_text_view_starts_display_line)
   _WRAP_METHOD(bool move_visually(TextBuffer::iterator& iter, int count), gtk_text_view_move_visually)
 
+  _WRAP_METHOD(bool im_context_filter_keypress(GdkEventKey* event), gtk_text_view_im_context_filter_keypress)
+  _WRAP_METHOD(void reset_im_context(), gtk_text_view_reset_im_context)
+
   _WRAP_METHOD(void add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor), gtk_text_view_add_child_at_anchor)
 
   _WRAP_METHOD(void add_child_in_window(Widget& child, TextWindowType which_window,



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