From 4ea2cc3bd4a7d9b1c54a9d33e6a1cf82e7c8c21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 09:06:59 +0200 Subject: Imported Upstream version 0.18.1 --- src/sidebar/Entry.vala | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/sidebar/Entry.vala (limited to 'src/sidebar/Entry.vala') diff --git a/src/sidebar/Entry.vala b/src/sidebar/Entry.vala new file mode 100644 index 0000000..4162f21 --- /dev/null +++ b/src/sidebar/Entry.vala @@ -0,0 +1,70 @@ +/* Copyright 2011-2014 Yorba Foundation + * + * This software is licensed under the GNU Lesser General Public License + * (version 2.1 or later). See the COPYING file in this distribution. + */ + +public interface Sidebar.Entry : Object { + public signal void sidebar_tooltip_changed(string? tooltip); + + public signal void sidebar_icon_changed(Icon? icon); + + public abstract string get_sidebar_name(); + + public abstract string? get_sidebar_tooltip(); + + public abstract Icon? get_sidebar_icon(); + + public abstract string to_string(); + + internal virtual void grafted(Sidebar.Tree tree) { + } + + internal virtual void pruned(Sidebar.Tree tree) { + } +} + +public interface Sidebar.ExpandableEntry : Sidebar.Entry { + public signal void sidebar_open_closed_icons_changed(Icon? open, Icon? closed); + + public abstract Icon? get_sidebar_open_icon(); + + public abstract Icon? get_sidebar_closed_icon(); + + public abstract bool expand_on_select(); +} + +public interface Sidebar.SelectableEntry : Sidebar.Entry { +} + +public interface Sidebar.PageRepresentative : Sidebar.Entry, Sidebar.SelectableEntry { + // Fired after the page has been created + public signal void page_created(Page page); + + // Fired before the page is destroyed. + public signal void destroying_page(Page page); + + public abstract bool has_page(); + + public abstract Page get_page(); +} + +public interface Sidebar.RenameableEntry : Sidebar.Entry { + public signal void sidebar_name_changed(string name); + + public abstract void rename(string new_name); +} + +public interface Sidebar.DestroyableEntry : Sidebar.Entry { + public abstract void destroy_source(); +} + +public interface Sidebar.InternalDropTargetEntry : Sidebar.Entry { + // Returns true if drop was successful + public abstract bool internal_drop_received(Gee.List sources); + public abstract bool internal_drop_received_arbitrary(Gtk.SelectionData data); +} + +public interface Sidebar.InternalDragSourceEntry : Sidebar.Entry { + public abstract void prepare_selection_data(Gtk.SelectionData data); +} -- cgit v1.2.3