gtkmm r1113 - in trunk: . gtk/src



Author: murrayc
Date: Thu Mar 12 15:45:07 2009
New Revision: 1113
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1113&view=rev

Log:
2009-03-12  Murray Cumming  <murrayc murrayc com>

* gtk/src/gtk_methods.defs: Regenerated.
* gtk/src/style.hg: Added get_style_property_value() and 
get_style_property<>().

* gtk/src/gtk_signals.defs: Hand-correct the definitions for the 
GtkEntry::icon-press and icon-release signals.
* gtk/src/entry.hg: Added icon_press and icon_release signals.

Modified:
   trunk/ChangeLog
   trunk/gtk/src/entry.hg
   trunk/gtk/src/gtk_methods.defs
   trunk/gtk/src/gtk_signals.defs
   trunk/gtk/src/style.hg

Modified: trunk/gtk/src/entry.hg
==============================================================================
--- trunk/gtk/src/entry.hg	(original)
+++ trunk/gtk/src/entry.hg	Thu Mar 12 15:45:07 2009
@@ -149,6 +149,9 @@
   // http://mail.gnome.org/archives/gtk-devel-list/2003-January/msg00108.html
   // "activate is probably about the only exception"
   _WRAP_SIGNAL(void activate(), "activate")
+  
+  _WRAP_SIGNAL(void icon_release(EntryIconPosition icon_position, const GdkButtonEvent* event), "icon-release", no_default_handler)
+  _WRAP_SIGNAL(void icon_press(EntryIconPosition icon_position, const GdkButtonEvent* event), "icon-press", no_default_handler)
 
   _IGNORE_SIGNAL("move_cursor")
   _IGNORE_SIGNAL("delete_from_cursor")

Modified: trunk/gtk/src/gtk_methods.defs
==============================================================================
--- trunk/gtk/src/gtk_methods.defs	(original)
+++ trunk/gtk/src/gtk_methods.defs	Thu Mar 12 15:45:07 2009
@@ -23948,9 +23948,9 @@
   (return-type "none")
 )
 
-(define-method get_property
+(define-method get_style_property
   (of-object "GtkStyle")
-  (c-name "gtk_style_get_property")
+  (c-name "gtk_style_get_style_property")
   (return-type "none")
   (parameters
     '("GType" "widget_type")

Modified: trunk/gtk/src/gtk_signals.defs
==============================================================================
--- trunk/gtk/src/gtk_signals.defs	(original)
+++ trunk/gtk/src/gtk_signals.defs	Thu Mar 12 15:45:07 2009
@@ -12711,7 +12711,7 @@
   (when "last")
   (parameters
     '("GtkEntryIconPosition" "p0")
-    '("GdkEvent*" "p1")
+    '("const-GdkButtonEvent*" "p1")
   )
 )
 
@@ -12721,7 +12721,7 @@
   (when "last")
   (parameters
     '("GtkEntryIconPosition" "p0")
-    '("GdkEvent*" "p1")
+    '("const-GdkButtonEvent*" "p1")
   )
 )
 

Modified: trunk/gtk/src/style.hg
==============================================================================
--- trunk/gtk/src/style.hg	(original)
+++ trunk/gtk/src/style.hg	Thu Mar 12 15:45:07 2009
@@ -413,6 +413,22 @@
                                        Gtk::TextDirection direction, Gtk::StateType state, Gtk::IconSize size,
                                        Gtk::Widget& widget, const Glib::ustring& detail), gtk_style_render_icon)
 
+  _IGNORE(gtk_style_get)
+  _WRAP_METHOD(void get_style_property_value(GType widget_type, const Glib::ustring& property_name, Glib::ValueBase& value), tk_style_get_style_property)
+  
+  /** Queries the value of a style property corresponding to a
+   * widget class in the given style.
+   *
+   * @param widget_type the GType of a descendant of GtkWidget.
+   * @param property_name The name of the style property to get.
+   * @param value: An output parameter in which  the value of the property being queried will be stored.
+   *
+   * @newin2p16
+   */
+  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)
@@ -589,5 +605,17 @@
   _WRAP_SIGNAL(void unrealize(), unrealize)
 };
 
+
+template <class PropertyType> inline
+void Style::get_style_property(GType widget_type, const Glib::ustring& property_name, PropertyType& value) const
+{
+  Glib::Value<PropertyType> property_value;
+  property_value.init(Glib::Value<PropertyType>::value_type());
+
+  this->get_style_property_value(widget_type, property_name, property_value);
+
+  value = property_value.get();
+}
+
 } // namespace Gtk
 



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