From: Ryan Lortie Date: Fri, 3 Feb 2012 16:09:36 +0000 (-0500) Subject: gtk+-3.0: some updates X-Git-Tag: 0.15.2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fd65c164eb5631fed0cf6c68c68a896496a9223;p=thirdparty%2Fvala.git 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() --- diff --git a/vapi/gtk+-3.0.vapi b/vapi/gtk+-3.0.vapi index 3eb839b19..807d86397 100644 --- a/vapi/gtk+-3.0.vapi +++ b/vapi/gtk+-3.0.vapi @@ -575,8 +575,10 @@ namespace Gtk { public unowned GLib.List 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? 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? 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 46a8b9862..046eb8cb8 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 @@ - + - + + + @@ -7350,6 +7352,7 @@ + @@ -9208,6 +9211,7 @@ + @@ -9535,6 +9539,7 @@ + @@ -12054,6 +12059,7 @@ + @@ -14510,6 +14516,7 @@ + @@ -14736,6 +14743,7 @@ + @@ -14875,6 +14883,12 @@ + + + + + + @@ -15013,6 +15027,12 @@ + + + + + + @@ -15384,6 +15404,7 @@ + @@ -17544,6 +17565,7 @@ + @@ -17686,6 +17708,7 @@ + @@ -18437,6 +18460,7 @@ + @@ -20520,6 +20544,7 @@ + @@ -22577,6 +22602,7 @@ + @@ -22654,6 +22680,7 @@ + @@ -22690,6 +22717,7 @@ + @@ -25597,6 +25625,7 @@ + @@ -28366,14 +28395,6 @@ - - - - - - - - @@ -28494,6 +28515,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -30824,12 +30918,12 @@ - + - +