Position sort docs enhanced + warning fixed.
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 3 Dec 2014 10:31:10 +0000 (11:31 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 3 Dec 2014 10:31:10 +0000 (11:31 +0100)
include/position_sort.h
src/position_sort.c

index 64d3e50..9f9bbda 100644 (file)
@@ -8,6 +8,28 @@
 /**
  * @brief Sort objects by position they appear on screen
  *
+ *  example:
+ *
+ *  ------------------------------
+ *  |                   _______  |
+ *  |  _______          |     |  |
+ *  |  |     |  ______  |     |  |
+ *  |  |  A  |  |    |  |     |  |
+ *  |  |_____|  | B  |  |  C  |  |
+ *  |           |    |  |     |  |
+ *  |           |____|  |     |  |
+ *  |   _____           |     |  |             line 0: A, B, C
+ *  |   |   |           |_____|  |             line 1: D
+ *  |   | D |                    |    ====>    line 2: F
+ *  |   |___| _____              |             line 3: G
+ *  |         |   |              |
+ *  |         | F | _____        |
+ *  |         |___| |   |        |
+ *  |               | G |        |
+ *  |               |___|        |
+ *  |                            |
+ *  ------------------------------
+ *
  * @ret list List of lists
  */
 Eina_List *position_sort(const Eina_List *obj);
index 7dacd27..5525569 100644 (file)
@@ -46,7 +46,8 @@ _sort_by_x_cb(const void *a, const void *b)
 static Eina_List*
 _get_zones(const Eina_List *objs)
 {
-   Eina_List *candidates = NULL, *l;
+   Eina_List *candidates = NULL;
+   const Eina_List *l;
    AtspiAccessible *obj;
    AtspiComponent *comp;
    const ObjectCache *oc;
@@ -81,7 +82,8 @@ _get_zones(const Eina_List *objs)
 static Eina_List*
 _get_lines(const Eina_List *objs)
 {
-   Eina_List *l, *line = NULL, *lines = NULL;
+   Eina_List *line = NULL, *lines = NULL;
+   const Eina_List *l;
    AtspiAccessible *obj;
    const ObjectCache *line_beg;