summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2016-04-07 17:44:12 +0100
committerAndy Williams <andy@andywilliams.me>2016-04-07 17:44:12 +0100
commita1c47c1e9b05deed8b2c3930fd2f338f31485a10 (patch)
tree1e1331bb1daa0ac6ee6aa8a0d084c011d3e6e3de
parentd3ae71510cc166185975dbfaa462a69260156a8e (diff)
downloadefl-a1c47c1e9b05deed8b2c3930fd2f338f31485a10.tar.gz
[help] Stub out a right-click-help UI
Not looking anything up yet but we're getting started
-rw-r--r--legacy/elm_code/src/lib/widget/elm_code_widget.c6
-rw-r--r--legacy/elm_code/src/lib/widget/elm_code_widget.eo10
2 files changed, 14 insertions, 2 deletions
diff --git a/legacy/elm_code/src/lib/widget/elm_code_widget.c b/legacy/elm_code/src/lib/widget/elm_code_widget.c
index 7c4d681ee5..2ce6496028 100644
--- a/legacy/elm_code/src/lib/widget/elm_code_widget.c
+++ b/legacy/elm_code/src/lib/widget/elm_code_widget.c
@@ -603,11 +603,12 @@ _elm_code_widget_cursor_move(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
_elm_code_widget_fill_line(widget, elm_code_file_line_get(pd->code->file, pd->cursor_line));
}
-static Eina_Bool
-_elm_code_widget_position_at_coordinates_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *pd,
+EOLIAN static Eina_Bool
+_elm_code_widget_position_at_coordinates_get(Eo *obj, Elm_Code_Widget_Data *pd,
Evas_Coord x, Evas_Coord y,
unsigned int *row, int *col)
{
+ Elm_Code_Widget *widget;
Eina_List *item;
Elm_Code_Line *line;
Evas_Coord ox, oy, sx, sy, rowy;
@@ -615,6 +616,7 @@ _elm_code_widget_position_at_coordinates_get(Elm_Code_Widget *widget, Elm_Code_W
int cw, ch, gutter;
unsigned int guess, number;
+ widget = (Elm_Code_Widget *)obj;
evas_object_geometry_get(widget, &ox, &oy, NULL, NULL);
elm_scroller_region_get(pd->scroller, &sx, &sy, NULL, NULL);
x = x + sx - ox;
diff --git a/legacy/elm_code/src/lib/widget/elm_code_widget.eo b/legacy/elm_code/src/lib/widget/elm_code_widget.eo
index b55b2fc04d..6354ecdb63 100644
--- a/legacy/elm_code/src/lib/widget/elm_code_widget.eo
+++ b/legacy/elm_code/src/lib/widget/elm_code_widget.eo
@@ -177,6 +177,16 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface_Atspi_Text)
lines_visible_get {
return: uint; [[the number of lines currently visible in the widget.]]
}
+ position_at_coordinates_get {
+ [[get the row, col position for a given coordinate on the widget.]]
+ params {
+ x: Evas_Coord; [[the x coordinate in the widget]]
+ y: Evas_Coord; [[the y coordinate in the widget]]
+ row: uint *; [[the row for the coordinates]]
+ col: int *; [[the column for the coordinates]]
+ }
+ return: bool; [[true if a line exists at these coordinates]]
+ }
//text functions
text_left_gutter_width_get {