summaryrefslogtreecommitdiffstats
path: root/src/range.h
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-04-15 16:20:17 -0300
committermongo <mongo@iomega>2016-04-15 16:20:17 -0300
commitf686ba184e0af3fd37aa8a743631a7a376f30843 (patch)
treee9a48dc691511a2961f93163944ba0ca1a84e5b3 /src/range.h
parentc0a088d7a4bc61e6e69fa5bd8964c39f68507c71 (diff)
Renamed src.scim2 to src
Diffstat (limited to 'src/range.h')
-rwxr-xr-xsrc/range.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/range.h b/src/range.h
new file mode 100755
index 0000000..5f1641b
--- /dev/null
+++ b/src/range.h
@@ -0,0 +1,36 @@
+#include "sc.h"
+
+struct srange {
+ int tlrow; // top left row
+ int tlcol; // top left col
+ int brrow; // bottom right row
+ int brcol; // bottom right col
+ int orig_row; // original row before starting selection
+ int orig_col; // original col before starting selection
+ int startup_row; // row position before entering visual mode
+ int startup_col; // col position before entering visual mode
+ char marks[2]; // marks used for creating the range
+ int selected;
+ struct srange * pnext;
+};
+typedef struct srange srange;
+
+extern srange * ranges;
+
+srange * create_range(char c, char d, struct ent * tl, struct ent * br);
+int find_range(char * name, int len, struct ent * lmatch, struct ent * rmatch, struct range ** rng);
+
+void unselect_ranges();
+void free_ranges ();
+void del_ranges_by_mark (char c);
+srange * get_range_by_pos(int pos);
+srange * get_range_by_marks (char c, char d);
+int is_range_selected();
+srange * get_selected_range();
+
+srange * create_custom_range(int tlrow, int tlcol, int brrow, int brcol);
+void free_custom_range(srange * sr);
+void clean_range();
+
+void add_range(char * name, struct ent_ptr left, struct ent_ptr right, int is_range);
+void del_range(struct ent * left, struct ent * right);