summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorDaniel Hirt <hirt.danny@gmail.com>2017-09-19 19:36:43 +0300
committerDaniel Hirt <hirt.danny@gmail.com>2017-09-20 09:19:33 +0300
commitd44131a3aa220b6482b3eb62e207c8c05c10e02e (patch)
treefb984d264e99eab2e732383598b896ed477d3483 /src/lib/edje
parent380b3eb09a785bab5d3bbd4921712c103b3cddd4 (diff)
Edje: move selection-related part_text API to legacy
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/Edje_Legacy.h65
-rw-r--r--src/lib/edje/edje_object.eo64
-rw-r--r--src/lib/edje/edje_util.c54
3 files changed, 99 insertions, 84 deletions
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 2e1efc8ed4..7086acb4bc 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -2549,6 +2549,71 @@ EAPI Eina_Bool edje_object_part_text_input_panel_show_on_demand_get(const Edje_O
2549EAPI void edje_object_part_text_prediction_hint_set(Edje_Object *obj, const char *part, const char *prediction_hint); 2549EAPI void edje_object_part_text_prediction_hint_set(Edje_Object *obj, const char *part, const char *prediction_hint);
2550 2550
2551/** 2551/**
2552 * @brief Starts selecting at current cursor position
2553 *
2554 * @param[in] part The part name
2555 *
2556 * @ingroup Edje_Object
2557 */
2558EAPI void edje_object_part_text_select_begin(const Edje_Object *obj, const char *part);
2559
2560/**
2561 * @brief Aborts any selection action on a part.
2562 *
2563 * @param[in] part The part name
2564 *
2565 * @ingroup Edje_Object
2566 */
2567EAPI void edje_object_part_text_select_abort(const Edje_Object *obj, const char *part);
2568
2569/**
2570 * @brief Extends the current selection to the current cursor position
2571 *
2572 * @param[in] part The part name
2573 *
2574 * @ingroup Edje_Object
2575 */
2576EAPI void edje_object_part_text_select_extend(const Edje_Object *obj, const char *part);
2577
2578/**
2579 * @brief Sets the selection to be everything.
2580 *
2581 * This function selects all text of the object of the part.
2582 *
2583 * @param[in] part The part name
2584 *
2585 * @ingroup Edje_Object
2586 */
2587EAPI void edje_object_part_text_select_all(const Edje_Object *obj, const char *part);
2588
2589/**
2590 * @brief Sets the selection to be none.
2591 *
2592 * This function sets the selection text to be none.
2593 *
2594 * @param[in] part The part name
2595 *
2596 * @ingroup Edje_Object
2597 */
2598EAPI void edje_object_part_text_select_none(const Edje_Object *obj, const char *part);
2599
2600/**
2601 * @brief Returns the selection text of the object part.
2602 *
2603 * This function returns selection text of the object part.
2604 *
2605 * See also @ref edje_object_part_text_select_all() and
2606 * @ref edje_object_part_text_select_none()
2607 *
2608 * @param[in] part The part name
2609 *
2610 * @return The text string
2611 *
2612 * @ingroup Edje_Object
2613 */
2614EAPI const char *edje_object_part_text_selection_get(const Edje_Object *obj, const char *part);
2615
2616/**
2552 * @brief Whether this object is playing or not. 2617 * @brief Whether this object is playing or not.
2553 * 2618 *
2554 * This property indicates whether the object is running or not. If stopped (or 2619 * This property indicates whether the object is running or not. If stopped (or
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index 2463b8408e..9c4a84bf56 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -365,70 +365,6 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part,
365 data: void_ptr; [[The data pointer to pass to the func callback]] 365 data: void_ptr; [[The data pointer to pass to the func callback]]
366 } 366 }
367 } 367 }
368 @property part_text_select_allow {
369 set {
370 [[Enables selection if the entry is an EXPLICIT selection mode
371 type.
372
373 The default is to not allow selection. This function only affects user
374 selection, functions such as edje_object_part_text_select_all() and
375 edje_object_part_text_select_none() are not affected.]]
376 legacy: null;
377 }
378 keys {
379 part: string; [[The part name]]
380 }
381 values {
382 allow: bool; [[$true to enable, $false otherwise]]
383 }
384 }
385 part_text_select_begin @const {
386 [[Starts selecting at current cursor position]]
387 params {
388 @in part: string; [[The part name]]
389 }
390 }
391 part_text_select_abort @const {
392 [[Aborts any selection action on a part.]]
393 params {
394 @in part: string; [[The part name]]
395 }
396 }
397 part_text_select_extend @const {
398 [[Extends the current selection to the current cursor position]]
399 params {
400 @in part: string; [[The part name]]
401 }
402 }
403 part_text_select_all @const {
404 [[Sets the selection to be everything.
405
406 This function selects all text of the object of the part.]]
407 params {
408 @in part: string; [[The part name]]
409 }
410 }
411 part_text_select_none @const {
412 [[Sets the selection to be none.
413
414 This function sets the selection text to be none.]]
415 params {
416 @in part: string; [[The part name]]
417 }
418 }
419 @property part_text_selection {
420 get {
421 [[Returns the selection text of the object part.
422
423 This function returns selection text of the object part.
424
425 See also @.part_text_select_all() and @.part_text_select_none()]]
426 return: string; [[The text string]]
427 }
428 keys {
429 part: string; [[The part name]]
430 }
431 }
432 /* TEXT PART APIS END ------------------------------------------------ */ 368 /* TEXT PART APIS END ------------------------------------------------ */
433 369
434 @property seat { 370 @property seat {
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 67c18c6535..e76eb582b2 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -1978,10 +1978,13 @@ _edje_efl_text_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
1978 return NULL; 1978 return NULL;
1979} 1979}
1980 1980
1981EOLIAN const char * 1981EAPI const char *
1982_edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 1982edje_object_part_text_selection_get(const Eo *obj, const char *part)
1983{ 1983{
1984 Edje_Real_Part *rp; 1984 Edje_Real_Part *rp;
1985 Edje *ed;
1986
1987 ed = _edje_fetch(obj);
1985 1988
1986 if ((!ed) || (!part)) return NULL; 1989 if ((!ed) || (!part)) return NULL;
1987 rp = _edje_real_part_recursive_get(&ed, part); 1990 rp = _edje_real_part_recursive_get(&ed, part);
@@ -1992,10 +1995,13 @@ _edje_object_part_text_selection_get(Eo *obj EINA_UNUSED, Edje *ed, const char *
1992 return NULL; 1995 return NULL;
1993} 1996}
1994 1997
1995EOLIAN void 1998EAPI void
1996_edje_object_part_text_select_none(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 1999edje_object_part_text_select_none(const Eo *obj, const char *part)
1997{ 2000{
1998 Edje_Real_Part *rp; 2001 Edje_Real_Part *rp;
2002 Edje *ed;
2003
2004 ed = _edje_fetch(obj);
1999 2005
2000 if ((!ed) || (!part)) return; 2006 if ((!ed) || (!part)) return;
2001 rp = _edje_real_part_recursive_get(&ed, part); 2007 rp = _edje_real_part_recursive_get(&ed, part);
@@ -2004,10 +2010,13 @@ _edje_object_part_text_select_none(Eo *obj EINA_UNUSED, Edje *ed, const char *pa
2004 _edje_entry_select_none(rp); 2010 _edje_entry_select_none(rp);
2005} 2011}
2006 2012
2007EOLIAN void 2013EAPI void
2008_edje_object_part_text_select_all(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 2014edje_object_part_text_select_all(const Eo *obj, const char *part)
2009{ 2015{
2010 Edje_Real_Part *rp; 2016 Edje_Real_Part *rp;
2017 Edje *ed;
2018
2019 ed = _edje_fetch(obj);
2011 2020
2012 if ((!ed) || (!part)) return; 2021 if ((!ed) || (!part)) return;
2013 rp = _edje_real_part_recursive_get(&ed, part); 2022 rp = _edje_real_part_recursive_get(&ed, part);
@@ -2037,16 +2046,12 @@ _edje_object_part_text_cursor_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const
2037} 2046}
2038 2047
2039EAPI void 2048EAPI void
2040edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Eina_Bool allow) 2049edje_object_part_text_select_allow_set(const Eo *obj, const char *part, Eina_Bool allow)
2041{
2042 edje_obj_part_text_select_allow_set((Eo *)obj, part, allow);
2043}
2044
2045
2046EOLIAN void
2047_edje_object_part_text_select_allow_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Eina_Bool allow)
2048{ 2050{
2049 Edje_Real_Part *rp; 2051 Edje_Real_Part *rp;
2052 Edje *ed;
2053
2054 ed = _edje_fetch(obj);
2050 2055
2051 if ((!ed) || (!part)) return; 2056 if ((!ed) || (!part)) return;
2052 rp = _edje_real_part_recursive_get(&ed, part); 2057 rp = _edje_real_part_recursive_get(&ed, part);
@@ -2055,10 +2060,13 @@ _edje_object_part_text_select_allow_set(Eo *obj EINA_UNUSED, Edje *ed, const cha
2055 _edje_entry_select_allow_set(rp, allow); 2060 _edje_entry_select_allow_set(rp, allow);
2056} 2061}
2057 2062
2058EOLIAN void 2063EAPI void
2059_edje_object_part_text_select_abort(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 2064edje_object_part_text_select_abort(const Eo *obj, const char *part)
2060{ 2065{
2061 Edje_Real_Part *rp; 2066 Edje_Real_Part *rp;
2067 Edje *ed;
2068
2069 ed = _edje_fetch(obj);
2062 2070
2063 if ((!ed) || (!part)) return; 2071 if ((!ed) || (!part)) return;
2064 rp = _edje_real_part_recursive_get(&ed, part); 2072 rp = _edje_real_part_recursive_get(&ed, part);
@@ -2067,10 +2075,13 @@ _edje_object_part_text_select_abort(Eo *obj EINA_UNUSED, Edje *ed, const char *p
2067 _edje_entry_select_abort(rp); 2075 _edje_entry_select_abort(rp);
2068} 2076}
2069 2077
2070EOLIAN void 2078EAPI void
2071_edje_object_part_text_select_begin(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 2079edje_object_part_text_select_begin(const Eo *obj, const char *part)
2072{ 2080{
2073 Edje_Real_Part *rp; 2081 Edje_Real_Part *rp;
2082 Edje *ed;
2083
2084 ed = _edje_fetch(obj);
2074 2085
2075 if ((!ed) || (!part)) return; 2086 if ((!ed) || (!part)) return;
2076 rp = _edje_real_part_recursive_get(&ed, part); 2087 rp = _edje_real_part_recursive_get(&ed, part);
@@ -2079,10 +2090,13 @@ _edje_object_part_text_select_begin(Eo *obj EINA_UNUSED, Edje *ed, const char *p
2079 _edje_entry_select_begin(rp); 2090 _edje_entry_select_begin(rp);
2080} 2091}
2081 2092
2082EOLIAN void 2093EAPI void
2083_edje_object_part_text_select_extend(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 2094edje_object_part_text_select_extend(const Eo *obj, const char *part)
2084{ 2095{
2085 Edje_Real_Part *rp; 2096 Edje_Real_Part *rp;
2097 Edje *ed;
2098
2099 ed = _edje_fetch(obj);
2086 2100
2087 if ((!ed) || (!part)) return; 2101 if ((!ed) || (!part)) return;
2088 rp = _edje_real_part_recursive_get(&ed, part); 2102 rp = _edje_real_part_recursive_get(&ed, part);