1/* Copyright 2016 Software Freedom Conservancy Inc.
2 *
3 * This software is licensed under the GNU Lesser General Public License
4 * (version 2.1 or later).  See the COPYING file in this distribution.
5 */
6
7public interface Sidebar.Entry : Object {
8    public signal void sidebar_tooltip_changed(string? tooltip);
9
10    public signal void sidebar_icon_changed(string? icon);
11
12    public abstract string get_sidebar_name();
13
14    public abstract string? get_sidebar_tooltip();
15
16    public abstract string? get_sidebar_icon();
17
18    public abstract string to_string();
19
20    internal virtual void grafted(Sidebar.Tree tree) {
21    }
22
23    internal virtual void pruned(Sidebar.Tree tree) {
24    }
25}
26
27public interface Sidebar.ExpandableEntry : Sidebar.Entry {
28    public abstract bool expand_on_select();
29}
30
31public interface Sidebar.SelectableEntry : Sidebar.Entry {
32}
33
34public interface Sidebar.PageRepresentative : Sidebar.Entry, Sidebar.SelectableEntry {
35    // Fired after the page has been created
36    public signal void page_created(Page page);
37
38    // Fired before the page is destroyed.
39    public signal void destroying_page(Page page);
40
41    public abstract bool has_page();
42
43    public abstract Page get_page();
44}
45
46public interface Sidebar.RenameableEntry : Sidebar.Entry {
47    public signal void sidebar_name_changed(string name);
48
49    public abstract void rename(string new_name);
50
51    // Return true to allow the user to rename the sidebar entry in the UI.
52    public abstract bool is_user_renameable();
53}
54
55public interface Sidebar.EmphasizableEntry : Sidebar.Entry {
56    public signal void is_emphasized_changed(bool emphasized);
57
58    public abstract bool is_emphasized();
59}
60
61public interface Sidebar.DestroyableEntry : Sidebar.Entry {
62    public abstract void destroy_source();
63}
64
65public interface Sidebar.InternalDropTargetEntry : Sidebar.Entry {
66    // Returns true if drop was successful
67    public abstract bool internal_drop_received(Gee.List<MediaSource> sources);
68    public abstract bool internal_drop_received_arbitrary(Gtk.SelectionData data);
69}
70
71public interface Sidebar.InternalDragSourceEntry : Sidebar.Entry {
72    public abstract void prepare_selection_data(Gtk.SelectionData data);
73}
74