[vala] gtk+-3.0: some updates
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gtk+-3.0: some updates
- Date: Fri, 3 Feb 2012 16:15:10 +0000 (UTC)
commit 9fd65c164eb5631fed0cf6c68c68a896496a9223
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Feb 3 11:09:36 2012 -0500
gtk+-3.0: some updates
- complete the move of the app-menu and menubar properties into
GtkApplication
- add GtkActionable interface and its implementations
- add gtk_menu_(bar_)new_from_model() APIs
- drop a premature add of gtk_window_setup_persistent_state()
vapi/gtk+-3.0.vapi | 53 +++++++++++------
vapi/packages/gtk+-3.0/gtk+-3.0.gi | 118 ++++++++++++++++++++++++++++++++----
2 files changed, 141 insertions(+), 30 deletions(-)
---
diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi
index 3eb839b..807d863 100644
--- a/vapi/gtk+-3.0.vapi
+++ b/vapi/gtk+-3.0.vapi
@@ -575,8 +575,10 @@ namespace Gtk {
public unowned GLib.List<weak Gtk.Window> get_windows ();
public void remove_accelerator (string action_name, GLib.Variant parameter);
public void remove_window (Gtk.Window window);
- public void set_app_menu (GLib.MenuModel model);
- public void set_menubar (GLib.MenuModel model);
+ public void set_app_menu (GLib.MenuModel app_menu);
+ public void set_menubar (GLib.MenuModel menubar);
+ public GLib.MenuModel app_menu { get; set; }
+ public GLib.MenuModel menubar { get; set; }
public virtual signal void window_added (Gtk.Window window);
public virtual signal void window_removed (Gtk.Window window);
}
@@ -731,7 +733,7 @@ namespace Gtk {
public string translation_domain { get; set; }
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class Button : Gtk.Bin, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class Button : Gtk.Bin, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public Button ();
[CCode (has_construct_function = false, type = "GtkWidget*")]
@@ -1245,7 +1247,7 @@ namespace Gtk {
public Gtk.TreeModel model { get; set; }
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class CheckButton : Gtk.ToggleButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class CheckButton : Gtk.ToggleButton, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public CheckButton ();
[NoWrapper]
@@ -1314,7 +1316,7 @@ namespace Gtk {
public virtual signal void owner_change (Gdk.Event p0);
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class ColorButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class ColorButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public ColorButton ();
public uint16 get_alpha ();
@@ -1919,7 +1921,7 @@ namespace Gtk {
public int y;
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class FontButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.FontChooser {
+ public class FontButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable, Gtk.FontChooser {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public FontButton ();
public unowned string get_font_name ();
@@ -2531,7 +2533,7 @@ namespace Gtk {
public uint width { get; set; }
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class LinkButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class LinkButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public LinkButton (string uri);
public unowned string get_uri ();
@@ -2573,7 +2575,7 @@ namespace Gtk {
public void swap (Gtk.TreeIter a, Gtk.TreeIter b);
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class LockButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class LockButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public LockButton (GLib.Permission permission);
public unowned GLib.Permission get_permission ();
@@ -2613,6 +2615,8 @@ namespace Gtk {
public void attach (Gtk.Widget child, uint left_attach, uint right_attach, uint top_attach, uint bottom_attach);
public void attach_to_widget (Gtk.Widget attach_widget, Gtk.MenuDetachFunc? detacher);
public void detach ();
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public Menu.from_model (GLib.MenuModel model);
public unowned Gtk.AccelGroup get_accel_group ();
public unowned string get_accel_path ();
public unowned Gtk.Widget get_active ();
@@ -2651,6 +2655,8 @@ namespace Gtk {
public class MenuBar : Gtk.MenuShell, Atk.Implementor, Gtk.Buildable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public MenuBar ();
+ [CCode (has_construct_function = false, type = "GtkWidget*")]
+ public MenuBar.from_model (GLib.MenuModel model);
public Gtk.PackDirection get_child_pack_direction ();
public Gtk.PackDirection get_pack_direction ();
public void set_child_pack_direction (Gtk.PackDirection child_pack_dir);
@@ -2723,7 +2729,7 @@ namespace Gtk {
public virtual signal void selection_done ();
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class MenuToolButton : Gtk.ToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class MenuToolButton : Gtk.ToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Actionable {
[CCode (has_construct_function = false, type = "GtkToolItem*")]
public MenuToolButton (Gtk.Widget? icon_widget, string? label);
[CCode (has_construct_function = false, type = "GtkToolItem*")]
@@ -3217,7 +3223,7 @@ namespace Gtk {
public virtual signal void changed (Gtk.RadioAction current);
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class RadioButton : Gtk.CheckButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class RadioButton : Gtk.CheckButton, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public RadioButton (GLib.SList<Gtk.RadioButton>? group);
[CCode (has_construct_function = false, type = "GtkWidget*")]
@@ -3257,7 +3263,7 @@ namespace Gtk {
public virtual signal void group_changed ();
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class RadioToolButton : Gtk.ToggleToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class RadioToolButton : Gtk.ToggleToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Actionable {
[CCode (has_construct_function = false, type = "GtkToolItem*")]
public RadioToolButton (GLib.SList<Gtk.RadioToolButton>? group);
[CCode (has_construct_function = false, type = "GtkToolItem*")]
@@ -3516,7 +3522,7 @@ namespace Gtk {
public virtual signal string format_value (double value);
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class ScaleButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Orientable {
+ public class ScaleButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable, Gtk.Orientable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public ScaleButton (Gtk.IconSize size, double min, double max, double step, [CCode (array_length = false)] string[] icons);
public unowned Gtk.Adjustment get_adjustment ();
@@ -4155,7 +4161,7 @@ namespace Gtk {
public void unset_property (string property, Gtk.StateFlags state);
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class Switch : Gtk.Widget, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class Switch : Gtk.Widget, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public Switch ();
public bool get_active ();
@@ -4754,7 +4760,7 @@ namespace Gtk {
public virtual signal void toggled ();
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class ToggleButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class ToggleButton : Gtk.Button, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public ToggleButton ();
public bool get_active ();
@@ -4775,7 +4781,7 @@ namespace Gtk {
public virtual signal void toggled ();
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class ToggleToolButton : Gtk.ToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class ToggleToolButton : Gtk.ToolButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Actionable {
[CCode (has_construct_function = false, type = "GtkToolItem*")]
public ToggleToolButton ();
[CCode (has_construct_function = false, type = "GtkToolItem*")]
@@ -4786,7 +4792,7 @@ namespace Gtk {
public virtual signal void toggled ();
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class ToolButton : Gtk.ToolItem, Atk.Implementor, Gtk.Buildable, Gtk.Activatable {
+ public class ToolButton : Gtk.ToolItem, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Actionable {
[CCode (has_construct_function = false, type = "GtkToolItem*")]
public ToolButton (Gtk.Widget? icon_widget, string? label);
[CCode (has_construct_function = false, type = "GtkToolItem*")]
@@ -5372,7 +5378,7 @@ namespace Gtk {
public Gtk.ShadowType shadow_type { get; set; }
}
[CCode (cheader_filename = "gtk/gtk.h")]
- public class VolumeButton : Gtk.ScaleButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable, Gtk.Orientable {
+ public class VolumeButton : Gtk.ScaleButton, Atk.Implementor, Gtk.Buildable, Gtk.Actionable, Gtk.Activatable, Gtk.Orientable {
[CCode (has_construct_function = false, type = "GtkWidget*")]
public VolumeButton ();
[NoAccessorMethod]
@@ -5864,7 +5870,6 @@ namespace Gtk {
public void set_type_hint (Gdk.WindowTypeHint hint);
public void set_urgency_hint (bool setting);
public void set_wmclass (string wmclass_name, string wmclass_class);
- public void setup_persistent_state (GLib.Settings settings, string child_name);
public void stick ();
public void unfullscreen ();
public void unmaximize ();
@@ -5933,6 +5938,18 @@ namespace Gtk {
public void remove_window (Gtk.Window window);
}
[CCode (cheader_filename = "gtk/gtk.h")]
+ public interface Actionable : Gtk.Widget {
+ public abstract unowned string get_action_name ();
+ public abstract unowned GLib.Variant get_action_target_value ();
+ public abstract void set_action_name (string action_name);
+ public void set_action_target (string format_string);
+ public abstract void set_action_target_value (GLib.Variant target_value);
+ public void set_detailed_action_name (string detailed_action_name);
+ public string action_name { get; set; }
+ [NoAccessorMethod]
+ public GLib.Variant action_target { owned get; set; }
+ }
+ [CCode (cheader_filename = "gtk/gtk.h")]
public interface Activatable : GLib.Object {
public void do_set_related_action (Gtk.Action action);
public unowned Gtk.Action get_related_action ();
diff --git a/vapi/packages/gtk+-3.0/gtk+-3.0.gi b/vapi/packages/gtk+-3.0/gtk+-3.0.gi
index 46a8b98..046eb8c 100644
--- a/vapi/packages/gtk+-3.0/gtk+-3.0.gi
+++ b/vapi/packages/gtk+-3.0/gtk+-3.0.gi
@@ -6805,16 +6805,18 @@
<return-type type="void"/>
<parameters>
<parameter name="application" type="GtkApplication*"/>
- <parameter name="model" type="GMenuModel*"/>
+ <parameter name="app_menu" type="GMenuModel*"/>
</parameters>
</method>
<method name="set_menubar" symbol="gtk_application_set_menubar">
<return-type type="void"/>
<parameters>
<parameter name="application" type="GtkApplication*"/>
- <parameter name="model" type="GMenuModel*"/>
+ <parameter name="menubar" type="GMenuModel*"/>
</parameters>
</method>
+ <property name="app-menu" type="GMenuModel*" readable="1" writable="1" construct="0" construct-only="0"/>
+ <property name="menubar" type="GMenuModel*" readable="1" writable="1" construct="0" construct-only="0"/>
<signal name="window-added" when="FIRST">
<return-type type="void"/>
<parameters>
@@ -7350,6 +7352,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="clicked" symbol="gtk_button_clicked">
@@ -9208,6 +9211,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<constructor name="new" symbol="gtk_check_button_new">
@@ -9535,6 +9539,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_alpha" symbol="gtk_color_button_get_alpha">
@@ -12054,6 +12059,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
<interface name="GtkFontChooser"/>
</implements>
@@ -14510,6 +14516,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_uri" symbol="gtk_link_button_get_uri">
@@ -14736,6 +14743,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_permission" symbol="gtk_lock_button_get_permission">
@@ -14875,6 +14883,12 @@
<constructor name="new" symbol="gtk_menu_new">
<return-type type="GtkWidget*"/>
</constructor>
+ <constructor name="new_from_model" symbol="gtk_menu_new_from_model">
+ <return-type type="GtkWidget*"/>
+ <parameters>
+ <parameter name="model" type="GMenuModel*"/>
+ </parameters>
+ </constructor>
<method name="popdown" symbol="gtk_menu_popdown">
<return-type type="void"/>
<parameters>
@@ -15013,6 +15027,12 @@
<constructor name="new" symbol="gtk_menu_bar_new">
<return-type type="GtkWidget*"/>
</constructor>
+ <constructor name="new_from_model" symbol="gtk_menu_bar_new_from_model">
+ <return-type type="GtkWidget*"/>
+ <parameters>
+ <parameter name="model" type="GMenuModel*"/>
+ </parameters>
+ </constructor>
<method name="set_child_pack_direction" symbol="gtk_menu_bar_set_child_pack_direction">
<return-type type="void"/>
<parameters>
@@ -15384,6 +15404,7 @@
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
<interface name="GtkActivatable"/>
+ <interface name="GtkActionable"/>
</implements>
<method name="get_menu" symbol="gtk_menu_tool_button_get_menu">
<return-type type="GtkWidget*"/>
@@ -17544,6 +17565,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_group" symbol="gtk_radio_button_get_group">
@@ -17686,6 +17708,7 @@
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
<interface name="GtkActivatable"/>
+ <interface name="GtkActionable"/>
</implements>
<method name="get_group" symbol="gtk_radio_tool_button_get_group">
<return-type type="GSList*"/>
@@ -18437,6 +18460,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
<interface name="GtkOrientable"/>
</implements>
@@ -20520,6 +20544,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_active" symbol="gtk_switch_get_active">
@@ -22577,6 +22602,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
</implements>
<method name="get_active" symbol="gtk_toggle_button_get_active">
@@ -22654,6 +22680,7 @@
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
<interface name="GtkActivatable"/>
+ <interface name="GtkActionable"/>
</implements>
<method name="get_active" symbol="gtk_toggle_tool_button_get_active">
<return-type type="gboolean"/>
@@ -22690,6 +22717,7 @@
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
<interface name="GtkActivatable"/>
+ <interface name="GtkActionable"/>
</implements>
<method name="get_icon_name" symbol="gtk_tool_button_get_icon_name">
<return-type type="gchar*"/>
@@ -25597,6 +25625,7 @@
<implements>
<interface name="AtkImplementor"/>
<interface name="GtkBuildable"/>
+ <interface name="GtkActionable"/>
<interface name="GtkActivatable"/>
<interface name="GtkOrientable"/>
</implements>
@@ -28366,14 +28395,6 @@
<parameter name="wmclass_class" type="gchar*"/>
</parameters>
</method>
- <method name="setup_persistent_state" symbol="gtk_window_setup_persistent_state">
- <return-type type="void"/>
- <parameters>
- <parameter name="window" type="GtkWindow*"/>
- <parameter name="settings" type="GSettings*"/>
- <parameter name="child_name" type="gchar*"/>
- </parameters>
- </method>
<method name="stick" symbol="gtk_window_stick">
<return-type type="void"/>
<parameters>
@@ -28494,6 +28515,79 @@
</parameters>
</method>
</object>
+ <interface name="GtkActionable" type-name="GtkActionable" get-type="gtk_actionable_get_type">
+ <requires>
+ <interface name="GtkWidget"/>
+ </requires>
+ <method name="get_action_name" symbol="gtk_actionable_get_action_name">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ </parameters>
+ </method>
+ <method name="get_action_target_value" symbol="gtk_actionable_get_action_target_value">
+ <return-type type="GVariant*"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ </parameters>
+ </method>
+ <method name="set_action_name" symbol="gtk_actionable_set_action_name">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="action_name" type="gchar*"/>
+ </parameters>
+ </method>
+ <method name="set_action_target" symbol="gtk_actionable_set_action_target">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="format_string" type="gchar*"/>
+ </parameters>
+ </method>
+ <method name="set_action_target_value" symbol="gtk_actionable_set_action_target_value">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="target_value" type="GVariant*"/>
+ </parameters>
+ </method>
+ <method name="set_detailed_action_name" symbol="gtk_actionable_set_detailed_action_name">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="detailed_action_name" type="gchar*"/>
+ </parameters>
+ </method>
+ <property name="action-name" type="char*" readable="1" writable="1" construct="0" construct-only="0"/>
+ <property name="action-target" type="GVariant" readable="1" writable="1" construct="0" construct-only="0"/>
+ <vfunc name="get_action_name">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ </parameters>
+ </vfunc>
+ <vfunc name="get_action_target_value">
+ <return-type type="GVariant*"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ </parameters>
+ </vfunc>
+ <vfunc name="set_action_name">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="action_name" type="gchar*"/>
+ </parameters>
+ </vfunc>
+ <vfunc name="set_action_target_value">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="actionable" type="GtkActionable*"/>
+ <parameter name="action_target_value" type="GVariant*"/>
+ </parameters>
+ </vfunc>
+ </interface>
<interface name="GtkActivatable" type-name="GtkActivatable" get-type="gtk_activatable_get_type">
<requires>
<interface name="GObject"/>
@@ -30824,12 +30918,12 @@
</parameters>
</vfunc>
</interface>
- <constant name="GTK_BINARY_AGE" type="int" value="306"/>
+ <constant name="GTK_BINARY_AGE" type="int" value="313"/>
<constant name="GTK_INPUT_ERROR" type="int" value="-1"/>
<constant name="GTK_INTERFACE_AGE" type="int" value="0"/>
<constant name="GTK_MAJOR_VERSION" type="int" value="3"/>
<constant name="GTK_MAX_COMPOSE_LEN" type="int" value="7"/>
- <constant name="GTK_MICRO_VERSION" type="int" value="6"/>
+ <constant name="GTK_MICRO_VERSION" type="int" value="13"/>
<constant name="GTK_MINOR_VERSION" type="int" value="3"/>
<constant name="GTK_PAPER_NAME_A3" type="char*" value="iso_a3"/>
<constant name="GTK_PAPER_NAME_A4" type="char*" value="iso_a4"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]