summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-06-13 08:02:55 +0100
committerTom Hacohen <tom@stosb.com>2016-06-13 08:10:24 +0100
commit121e586ca0f65bf5fb2e38ad8019645c1709768b (patch)
tree74aa95f0ea19bc55ff041451599b1923b4162eba
parent3a965274314a8605f3811ca69d2a13aaa852d7ba (diff)
downloadefl-121e586ca0f65bf5fb2e38ad8019645c1709768b.tar.gz
Ui text interactive: Move to elementary and add "selection,changed".
This is useful for implementing selection handlers. We had to move it to elementary because we started referencing cursors.
-rw-r--r--src/Makefile_Efl.am1
-rw-r--r--src/Makefile_Elementary.am1
-rw-r--r--src/lib/efl/Efl.h1
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
-rw-r--r--src/lib/elementary/Elementary.h.in1
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c1
-rw-r--r--src/lib/elementary/efl_ui_text_interactive.eo (renamed from src/lib/efl/interfaces/efl_ui_text_interactive.eo)14
7 files changed, 17 insertions, 3 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index e27967bbf6..d9119eb2cf 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -40,7 +40,6 @@ efl_eolian_files = \
lib/efl/interfaces/efl_vpath_file_core.eo \
lib/efl/interfaces/efl_ui_spin.eo \
lib/efl/interfaces/efl_ui_progress.eo \
- lib/efl/interfaces/efl_ui_text_interactive.eo \
lib/efl/interfaces/efl_event.eo \
lib/efl/interfaces/efl_input_interface.eo \
lib/efl/interfaces/efl_input_state.eo \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 32295ca40d..f49d5f846c 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -136,6 +136,7 @@ elm_public_eolian_files = \
lib/elementary/elm_popup_internal_part.eo \
lib/elementary/elm_scroller_internal_part.eo \
lib/elementary/efl_ui_text.eo \
+ lib/elementary/efl_ui_text_interactive.eo \
$(NULL)
# Private classes (not exposed or shipped)
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 5e131f2983..cca5614895 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -80,7 +80,6 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_flipable.eo.h"
#include "interfaces/efl_ui_spin.eo.h"
#include "interfaces/efl_ui_progress.eo.h"
-#include "interfaces/efl_ui_text_interactive.eo.h"
#include "interfaces/efl_screen.eo.h"
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 32d25a452f..10ae01a0e7 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -51,7 +51,6 @@ EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED =
#include "interfaces/efl_flipable.eo.c"
#include "interfaces/efl_ui_spin.eo.c"
#include "interfaces/efl_ui_progress.eo.c"
-#include "interfaces/efl_ui_text_interactive.eo.c"
#include "interfaces/efl_event.eo.c"
#include "interfaces/efl_input_state.eo.c"
diff --git a/src/lib/elementary/Elementary.h.in b/src/lib/elementary/Elementary.h.in
index ab8f5c9329..23281d6009 100644
--- a/src/lib/elementary/Elementary.h.in
+++ b/src/lib/elementary/Elementary.h.in
@@ -273,6 +273,7 @@ EAPI extern Elm_Version *elm_version;
# include <efl_ui_grid.eo.h>
# include <efl_ui_image.eo.h>
# include <efl_ui_text.eo.h>
+# include <efl_ui_text_interactive.eo.h>
#endif
/* include deprecated calls last of all */
diff --git a/src/lib/elementary/efl_ui_internal_text_interactive.c b/src/lib/elementary/efl_ui_internal_text_interactive.c
index 5d735117c5..76d0c93c47 100644
--- a/src/lib/elementary/efl_ui_internal_text_interactive.c
+++ b/src/lib/elementary/efl_ui_internal_text_interactive.c
@@ -1536,3 +1536,4 @@ _efl_ui_internal_text_interactive_efl_ui_text_interactive_multiline_get(Eo *obj
#include "efl_ui_internal_text_interactive.eo.c"
+#include "efl_ui_text_interactive.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_text_interactive.eo b/src/lib/elementary/efl_ui_text_interactive.eo
index 8720b29f6d..892de599d7 100644
--- a/src/lib/efl/interfaces/efl_ui_text_interactive.eo
+++ b/src/lib/elementary/efl_ui_text_interactive.eo
@@ -10,6 +10,19 @@ struct Efl.Ui.Text.Interactive.Change_Info {
merge: bool; [[$true if can be merged with the previous one. Used for example with insertion when something is already selected]]
}
+struct Efl.Ui.Text.Interactive.Selection_Info {
+ [[This structure includes information for the selection,changed event
+
+ If start and end are $null, it means that there's no selection, otherwise,
+ they indicate the start and end of the selection resepectively.
+
+ Note: $start is not necessarily $before end in the text. It's where the
+ selection has started from.
+ ]]
+ start: Efl.Canvas.Text.Cursor; [[The start of the selection]]
+ end: Efl.Canvas.Text.Cursor; [[The end of the selection]]
+}
+
interface Efl.Ui.Text.Interactive ()
{
[[This is an interface interactive text inputs should implement]]
@@ -33,5 +46,6 @@ interface Efl.Ui.Text.Interactive ()
}
events {
changed,user: Efl.Ui.Text.Interactive.Change_Info; [[The text object has changed due to user interaction]]
+ selection,changed: Efl.Ui.Text.Interactive.Selection_Info; [[The selection on the object has changed]]
}
}