[gtkmm] Gtk::MenuButton: wrap new symbols as of 3.11.7
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::MenuButton: wrap new symbols as of 3.11.7
- Date: Thu, 20 Feb 2014 19:21:56 +0000 (UTC)
commit 5e28db687285b7e57549e3b301cc45562e59ba4d
Author: Juan R. GarcĂa Blanco <juanrgar gmail com>
Date: Mon Feb 17 02:27:23 2014 +0100
Gtk::MenuButton: wrap new symbols as of 3.11.7
* Wrap ::use-popover object property
* Wrap ::use-popover getter/setter
* Wrap gtk_menu_button_get/set_popover object methods
* Added various needed Popover conversions
* Regenerate gtk_methods.defs and gtk_signals.defs to
include these new symbols
gtk/src/gtk_methods.defs | 131 +++++++++++++++++++++++++++++++++++++---------
gtk/src/gtk_signals.defs | 77 +++++++++++++++------------
gtk/src/menubutton.ccg | 5 ++
gtk/src/menubutton.hg | 15 +++++
tools/m4/convert_gtk.m4 | 2 +
5 files changed, 171 insertions(+), 59 deletions(-)
---
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 4489817..61ad33e 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -1124,13 +1124,6 @@
(gtype-id "GTK_TYPE_FIXED")
)
-(define-object ActionBar
- (in-module "Gtk")
- (parent "GtkContainer")
- (c-name "GtkActionBar")
- (gtype-id "GTK_TYPE_ACTION_BAR")
-)
-
(define-object Bin
(in-module "Gtk")
(parent "GtkContainer")
@@ -1320,6 +1313,13 @@
(gtype-id "GTK_TYPE_ALIGNMENT")
)
+(define-object ActionBar
+ (in-module "Gtk")
+ (parent "GtkBin")
+ (c-name "GtkActionBar")
+ (gtype-id "GTK_TYPE_ACTION_BAR")
+)
+
(define-object Button
(in-module "Gtk")
(parent "GtkBin")
@@ -6022,6 +6022,21 @@
)
)
+(define-method set_center_widget
+ (of-object "GtkBox")
+ (c-name "gtk_box_set_center_widget")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "widget")
+ )
+)
+
+(define-method get_center_widget
+ (of-object "GtkBox")
+ (c-name "gtk_box_get_center_widget")
+ (return-type "GtkWidget*")
+)
+
;; From gtkboxprivate.h
@@ -10952,6 +10967,21 @@
(return-type "gint")
)
+(define-method set_max_width_chars
+ (of-object "GtkEntry")
+ (c-name "gtk_entry_set_max_width_chars")
+ (return-type "none")
+ (parameters
+ '("gint" "n_chars")
+ )
+)
+
+(define-method get_max_width_chars
+ (of-object "GtkEntry")
+ (c-name "gtk_entry_get_max_width_chars")
+ (return-type "gint")
+)
+
(define-method set_text
(of-object "GtkEntry")
(c-name "gtk_entry_set_text")
@@ -11643,10 +11673,6 @@
-;; From gtkfilechooserdefault.h
-
-
-
;; From gtkfilechooserdialog.h
(define-function gtk_file_chooser_dialog_get_type
@@ -16135,19 +16161,6 @@
(return-type "gboolean")
)
-(define-function gtk_exit
- (c-name "gtk_exit")
- (return-type "none")
- (parameters
- '("gint" "error_code")
- )
-)
-
-(define-function gtk_set_locale
- (c-name "gtk_set_locale")
- (return-type "gchar*")
-)
-
(define-function gtk_main_do_event
(c-name "gtk_main_do_event")
(return-type "none")
@@ -16368,7 +16381,7 @@
(c-name "gtk_menu_button_set_popup")
(return-type "none")
(parameters
- '("GtkWidget*" "popup")
+ '("GtkWidget*" "menu")
)
)
@@ -16378,6 +16391,21 @@
(return-type "GtkMenu*")
)
+(define-method set_popover
+ (of-object "GtkMenuButton")
+ (c-name "gtk_menu_button_set_popover")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "popover")
+ )
+)
+
+(define-method get_popover
+ (of-object "GtkMenuButton")
+ (c-name "gtk_menu_button_get_popover")
+ (return-type "GtkPopover*")
+)
+
(define-method set_direction
(of-object "GtkMenuButton")
(c-name "gtk_menu_button_set_direction")
@@ -16423,6 +16451,21 @@
(return-type "GtkWidget*")
)
+(define-method set_use_popover
+ (of-object "GtkMenuButton")
+ (c-name "gtk_menu_button_set_use_popover")
+ (return-type "none")
+ (parameters
+ '("gboolean" "use_popover")
+ )
+)
+
+(define-method get_use_popover
+ (of-object "GtkMenuButton")
+ (c-name "gtk_menu_button_get_use_popover")
+ (return-type "gboolean")
+)
+
;; From gtkmenubuttonprivate.h
@@ -17287,6 +17330,21 @@
+;; From gtkmodelbutton.h
+
+(define-function gtk_model_button_get_type
+ (c-name "gtk_model_button_get_type")
+ (return-type "GType")
+)
+
+(define-function gtk_model_button_new
+ (c-name "gtk_model_button_new")
+ (is-constructor-of "GtkModelButton")
+ (return-type "GtkWidget*")
+)
+
+
+
;; From gtkmodelmenuitem.h
@@ -18704,6 +18762,15 @@
)
)
+(define-function gtk_popover_new_from_model
+ (c-name "gtk_popover_new_from_model")
+ (return-type "GtkWidget*")
+ (parameters
+ '("GtkWidget*" "relative_to")
+ '("GMenuModel*" "model")
+ )
+)
+
(define-method set_relative_to
(of-object "GtkPopover")
(c-name "gtk_popover_set_relative_to")
@@ -18767,6 +18834,20 @@
(return-type "gboolean")
)
+(define-method bind_model
+ (of-object "GtkPopover")
+ (c-name "gtk_popover_bind_model")
+ (return-type "none")
+ (parameters
+ '("GMenuModel*" "model")
+ '("const-gchar*" "action_namespace")
+ )
+)
+
+
+
+;; From gtkpopoverprivate.h
+
;; From gtkpressandholdprivate.h
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 9a37d69..2e72daa 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -456,24 +456,6 @@
;; From GtkActionBar
-(define-property center-widget
- (of-object "GtkActionBar")
- (prop-type "GParamObject")
- (docs "Widget to display in center")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property spacing
- (of-object "GtkActionBar")
- (prop-type "GParamInt")
- (docs "The amount of space between children")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
;; From GtkActivatable
(define-property related-action
@@ -3017,19 +2999,19 @@
;; From GtkDialog
-(define-signal close
+(define-signal response
(of-object "GtkDialog")
(return-type "void")
(when "last")
+ (parameters
+ '("gint" "p0")
+ )
)
-(define-signal response
+(define-signal close
(of-object "GtkDialog")
(return-type "void")
(when "last")
- (parameters
- '("gint" "p0")
- )
)
(define-property use-header-bar
@@ -3277,6 +3259,15 @@
(construct-only #f)
)
+(define-property max-width-chars
+ (of-object "GtkEntry")
+ (prop-type "GParamInt")
+ (docs "The desired maximum width of the entry, in characters")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
(define-property scroll-offset
(of-object "GtkEntry")
(prop-type "GParamInt")
@@ -4793,19 +4784,19 @@
;; From GtkInfoBar
-(define-signal close
+(define-signal response
(of-object "GtkInfoBar")
(return-type "void")
(when "last")
+ (parameters
+ '("gint" "p0")
+ )
)
-(define-signal response
+(define-signal close
(of-object "GtkInfoBar")
(return-type "void")
(when "last")
- (parameters
- '("gint" "p0")
- )
)
(define-property message-type
@@ -5557,7 +5548,7 @@
(define-property menu-model
(of-object "GtkMenuButton")
(prop-type "GParamObject")
- (docs "The dropdown menu's model.")
+ (docs "The model from which the popup is made.")
(readable #t)
(writable #t)
(construct-only #f)
@@ -5581,6 +5572,24 @@
(construct-only #f)
)
+(define-property use-popover
+ (of-object "GtkMenuButton")
+ (prop-type "GParamBoolean")
+ (docs "Use a popover instead of a menu")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property popover
+ (of-object "GtkMenuButton")
+ (prop-type "GParamObject")
+ (docs "The popover")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GtkMenuItem
(define-signal activate
@@ -7401,19 +7410,19 @@
;; From GtkScaleButton
-(define-signal value-changed
+(define-signal popup
(of-object "GtkScaleButton")
(return-type "void")
(when "last")
- (parameters
- '("gdouble" "p0")
- )
)
-(define-signal popup
+(define-signal value-changed
(of-object "GtkScaleButton")
(return-type "void")
(when "last")
+ (parameters
+ '("gdouble" "p0")
+ )
)
(define-signal popdown
diff --git a/gtk/src/menubutton.ccg b/gtk/src/menubutton.ccg
index dfc969c..3b68a0e 100644
--- a/gtk/src/menubutton.ccg
+++ b/gtk/src/menubutton.ccg
@@ -32,6 +32,11 @@ void MenuButton::unset_popup()
gtk_menu_button_set_popup(gobj(), 0);
}
+void MenuButton::unset_popover()
+{
+ gtk_menu_button_set_popover(gobj(), 0);
+}
+
void MenuButton::unset_menu_model()
{
gtk_menu_button_set_menu_model(gobj(), 0);
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index 8bde0ce..0c87bc7 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -17,6 +17,7 @@
#include <gtkmm/togglebutton.h>
#include <gtkmm/menu.h>
+#include <gtkmm/popover.h>
#include <giomm/menumodel.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/togglebutton_p.h)
@@ -68,6 +69,18 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(const Menu* get_popup() const, gtk_menu_button_get_popup, constversion)
_IGNORE(gtk_menu_button_set_menu)
+ _WRAP_METHOD(void set_popover(Popover& popover), gtk_menu_button_set_popover)
+
+ /** Disables the button.
+ */
+ void unset_popover();
+
+ _WRAP_METHOD(Popover* get_popover(), gtk_menu_button_get_popover)
+ _WRAP_METHOD(const Popover* get_popover() const, gtk_menu_button_get_popover, constversion)
+
+ _WRAP_METHOD(void set_use_popover(bool use_popover = true), gtk_menu_button_set_use_popover)
+ _WRAP_METHOD(bool get_use_popover(), gtk_menu_button_get_use_popover)
+
_WRAP_METHOD(void set_direction(ArrowType direction), gtk_menu_button_set_direction)
_WRAP_METHOD(ArrowType get_direction() const, gtk_menu_button_get_direction)
@@ -113,6 +126,8 @@ _DEPRECATE_IFDEF_END
_WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
_WRAP_PROPERTY("align-widget", Widget*)
_WRAP_PROPERTY("direction", ArrowType)
+ _WRAP_PROPERTY("use-popover", bool)
+ _WRAP_PROPERTY("popover", Popover*)
};
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index cc354ed..ae1e832 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -204,6 +204,7 @@ _CONVERSION(`GtkWidget*',`Widget*',__RP2P)
_CONVERSION(`GtkWindow*',`Window*',__RP2P)
_CONVERSION(`GtkMenu*',`Menu*',__RP2P)
_CONVERSION(`GtkMenu*',`Gtk::Menu*',__RP2P)
+_CONVERSION(`GtkPopover*',`Popover*',__RP2P)
_CONVERSION(`GtkToolItem*',`ToolItem*',__RP2P)
_CONVERSION(`GtkToolItemGroup*',`ToolItemGroup*',__RP2P)
_CONVERSION(`GtkStack*',`Stack*',__RP2P)
@@ -313,6 +314,7 @@ define(`__FR2PD',`($`'3).Gtk::Widget::gobj()')
_CONVERSION(`MenuShell&',`GtkWidget*',__FR2PD)
_CONVERSION(`MenuItem&',`GtkWidget*',__FR2PD)
_CONVERSION(`Menu&',`GtkWidget*',__FR2PD)
+_CONVERSION(`Popover&',`GtkWidget*',__FR2PD)
_CONVERSION(`Gtk::TreeItem&',`GtkWidget*',__FR2PD)
_CONVERSION(`FileChooserDialog&',`GtkWidget*',__FR2PD)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]