[caribou: 8/15] Introduce scannable interfaces.



commit 19a05548084b345c96fe910442d89978e8bbcb2a
Author: Eitan Isaacson <eitan monotonous org>
Date:   Sat May 28 13:04:56 2011 -0700

    Introduce scannable interfaces.

 libcaribou/Makefile.am           |    4 +++-
 libcaribou/iscannable-group.vala |   23 +++++++++++++++++++++++
 libcaribou/iscannable-item.vala  |    6 ++++++
 3 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/libcaribou/Makefile.am b/libcaribou/Makefile.am
index ad7af54..d8e1664 100644
--- a/libcaribou/Makefile.am
+++ b/libcaribou/Makefile.am
@@ -39,7 +39,9 @@ libcaribou_la_SOURCES = \
 	key-model.vala \
 	column-model.vala \
 	util.vala \
-	json-deserializer.vala
+	json-deserializer.vala \
+	iscannable-item.vala \
+	iscannable-group.vala
 
 EXTRA_DIST = \
 	external-libs.vapi \
diff --git a/libcaribou/iscannable-group.vala b/libcaribou/iscannable-group.vala
new file mode 100644
index 0000000..44f3979
--- /dev/null
+++ b/libcaribou/iscannable-group.vala
@@ -0,0 +1,23 @@
+namespace Caribou {
+    public interface IScannableGroup : Object {
+        public abstract IScannableItem? child_select ();
+        public abstract void scan_reset ();
+        public abstract IScannableItem[] get_scan_children ();
+        public abstract IScannableItem? child_step (int cycles);
+        public abstract IScannableItem[] get_step_path ();
+        public abstract IScannableItem[] get_selected_path ();
+
+        public abstract ScanGrouping scan_grouping { get; set; }
+
+        public signal void selected_item_changed (IScannableItem? selected_item);
+        public signal void step_item_changed (IScannableItem? step_item);
+        public signal void scan_cleared ();
+    }
+
+    public enum ScanGrouping {
+        NONE,
+        SUBGROUPS,
+        ROWS,
+        LINEAR
+    }
+}
\ No newline at end of file
diff --git a/libcaribou/iscannable-item.vala b/libcaribou/iscannable-item.vala
new file mode 100644
index 0000000..7ce78a9
--- /dev/null
+++ b/libcaribou/iscannable-item.vala
@@ -0,0 +1,6 @@
+namespace Caribou {
+    public interface IScannableItem : Object {
+        public abstract bool scan_stepping { get; set; }
+        public abstract bool scan_selected { get; set; }
+    }
+}
\ No newline at end of file



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]