efl_ui_text: apply new theme logic and use constructor/destructor
authorYoungbok Shin <youngb.shin@samsung.com>
Wed, 6 Dec 2017 08:33:03 +0000 (17:33 +0900)
committerSungtaek Hong <sth253.hong@samsung.com>
Fri, 8 Dec 2017 07:02:24 +0000 (16:02 +0900)
Summary:
It removes legacy aliases from efl_ui_text's theme.
And it also move all code from group add/del overriding functions to
constructor/destructor.
@fix

Test Plan: N/A

Reviewers: jpeg, taxi2se

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5601

data/elementary/themes/edc/efl/text.edc
data/elementary/themes/edc/elm/entry.edc
src/lib/elementary/efl_ui_text.c
src/lib/elementary/efl_ui_text.eo
src/lib/elementary/efl_ui_text_async.eo

index 5ee4227..728c905 100644 (file)
 group { "efl/text/scroller";
-   inherit: "elm/scroller/entry/default";
+   inherit: "elm/scroller/base/default";
+   image: "bg_glow_in.png" COMP;
+   parts {
+      part { name: "elm.swallow.background"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            rel1.offset: 1 1;
+            rel2.offset: -2 -2;
+         }
+      }
+      part { name: "validation_glow";
+         type: RECT;
+         insert_before: "bg";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "pass" 0.0;
+            color: 0 255 0 90;
+         }
+         description { state: "fail" 0.0;
+            color: 255 0 0 90;
+         }
+      }
+      part { name: "bg";
+         description { state: "default" 0.0;
+            color: DARK_GREY_BG_COLOR;
+         }
+      }
+      part { name: "elm.swallow.content";
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.icon";
+            rel1.relative: 1.0 0.0;
+            rel1.offset: 0 0;
+            rel2.to: "elm.swallow.end";
+            rel2.relative: 0.0 1.0;
+            rel2.offset: -1 -1;
+         }
+      }
+      part { name: "elm.swallow.icon"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.to: "clipper";
+            rel1.offset: 1 1;
+            rel2.to: "clipper";
+            rel2.offset: 1 -2;
+            rel2.relative: 0.0 1.0;
+            visible: 0;
+            align: 1.0 0.0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            align: 0.0 0.0;
+         }
+      }
+      program {
+         signal: "elm,action,show,icon"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.swallow.icon";
+      }
+      program {
+         signal: "elm,action,hide,icon"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.icon";
+      }
+      part { name: "elm.swallow.end"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.to: "clipper";
+            rel1.offset: -2 1;
+            rel1.relative: 1.0 0.0;
+            rel2.to: "clipper";
+            rel2.offset: -2 -2;
+            visible: 0;
+            align: 0.0 0.0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            align: 1.0 0.0;
+         }
+      }
+      program {
+         signal: "elm,action,show,end"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.swallow.end";
+      }
+      program {
+         signal: "elm,action,hide,end"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.end";
+      }
+      part { name: "glow";
+         insert_after: "shadow";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "bg";
+            rel2.to: "bg";
+            image.normal: "bg_glow_in.png";
+            image.border: 7 7 7 7;
+            image.middle: 0;
+            fill.smooth: 0;
+            color: 255 255 255 0;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "focused2" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 64;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "elm,action,focus_highlight,show"; source: "elm";
+         action: STATE_SET "focused" 0.0;
+         target: "glow";
+         after: "focus_in2";
+      }
+      program { name: "focus_in2";
+         action: STATE_SET "focused2" 0.0;
+         transition: DECELERATE 0.5;
+         target: "glow";
+      }
+      program {
+         signal: "elm,action,focus_highlight,hide"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         transition: DECELERATE 0.3;
+         target: "glow";
+      }
+      program { name: "validation_fail";
+         signal: "validation,default,fail";
+         source: "elm";
+         action: STATE_SET "fail" 0.0;
+         target: "validation_glow";
+      }
+      program { name: "validation_pass";
+         signal: "validation,default,pass";
+         source: "elm";
+         action: STATE_SET "pass" 0.0;
+         target: "validation_glow";
+      }
+      program { name: "validation_off";
+         signal: "validation,default";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "validation_glow";
+      }
+   }
 }
 
 group { "efl/text/single/scroller";
-   inherit: "elm/scroller/entry_single/default";
+   images.image: "bevel_in.png" COMP;
+   images.image: "inset_shadow.png" COMP;
+   image: "bg_glow_in.png" COMP;
+   data.item: "focus_highlight" "on";
+   parts {
+      part { name: "validation_glow";
+         type: RECT;
+         insert_before: "bg";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+         }
+         description { state: "pass" 0.0;
+            color: 0 255 0 90;
+         }
+         description { state: "fail" 0.0;
+            color: 255 0 0 90;
+         }
+      }
+      part { name: "sb_vbar_base"; type: RECT;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel2.relative: 1.0 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "elm.dragable.vbar"; type: RECT;
+         dragable.x: 0 0 0;
+         dragable.y: 1 1 0;
+         dragable.confine: "sb_vbar_base";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.relative: 0.5  0.5;
+            rel1.to: "sb_vbar_base";
+            rel2.relative: 0.5  0.5;
+            rel2.to: "sb_vbar_base";
+            visible: 0;
+         }
+      }
+      part { name: "sb_hbar_base"; type: RECT;
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.relative: 1.0 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "elm.dragable.hbar"; type: RECT;
+         dragable.x: 1 1 0;
+         dragable.y: 0 0 0;
+         dragable.confine: "sb_hbar_base";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.relative: 0.5  0.5;
+            rel1.to: "sb_hbar_base";
+            rel2.relative: 0.5  0.5;
+            rel2.to: "sb_hbar_base";
+            visible: 0;
+         }
+      }
+      part { name: "bg"; type: RECT;
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.background";
+            rel2.to: "elm.swallow.background";
+            color: DARK_GREY_BG_COLOR;
+            color_class: "scroller_bg";
+         }
+      }
+      part { name: "clipper"; type: RECT;
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.background";
+            rel2.to: "elm.swallow.background";
+         }
+      }
+      part { name: "elm.swallow.background"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            rel1.offset: 1 1;
+            rel2.offset: -2 -2;
+         }
+      }
+      part { name: "elm.swallow.content"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            rel1.to: "elm.swallow.icon";
+            rel1.relative: 1.0 0.0;
+            rel2.to: "elm.swallow.end";
+            rel2.relative: 0.0 1.0;
+         }
+      }
+      part { name: "elm.swallow.icon"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.offset: 1 1;
+            rel2.offset: 1 -2;
+            rel2.relative: 0.0 1.0;
+            visible: 0;
+            align: 1.0 0.5;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            align: 0.0 0.5;
+         }
+      }
+      program {
+         signal: "elm,action,show,icon"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.swallow.icon";
+      }
+      program {
+         signal: "elm,action,hide,icon"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.icon";
+      }
+      part { name: "elm.swallow.end"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            fixed: 1 1;
+            rel1.offset: -2 1;
+            rel1.relative: 1.0 0.0;
+            rel2.offset: -2 -2;
+            visible: 0;
+            align: 0.0 0.5;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+            align: 1.0 0.5;
+         }
+      }
+      program {
+         signal: "elm,action,show,end"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "elm.swallow.end";
+      }
+      program {
+         signal: "elm,action,hide,end"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.end";
+      }
+      part { name: "inset"; mouse_events: 0;
+         description { state: "default" 0.0;
+            image.normal: "bevel_in.png";
+            image.border: 1 1 1 1;
+            image.middle: 0;
+            rel1.to: "bg";
+            rel1.offset: -1 -1;
+            rel2.to: "bg";
+            rel2.offset: 0 0;
+            fill.smooth: 0;
+         }
+      }
+      part { name: "shadow"; mouse_events: 0;
+         description { state: "default" 0.0;
+            image.normal: "inset_shadow.png";
+            image.border: 5 5 7 3;
+            image.middle: 0;
+            rel1.to: "bg";
+            rel2.to: "bg";
+            fill.smooth: 0;
+            color: 255 255 255 128;
+         }
+      }
+      part { name: "elm.swallow.overlay"; type: SWALLOW;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            rel1.offset: 1 1;
+            rel2.offset: -2 -2;
+         }
+      }
+      part { name: "glow";
+         mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.to: "bg";
+            rel2.to: "bg";
+            image.normal: "bg_glow_in.png";
+            image.border: 7 7 7 7;
+            image.middle: 0;
+            fill.smooth: 0;
+            color: 255 255 255 0;
+         }
+         description { state: "focused" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 255;
+         }
+         description { state: "focused2" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 64;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "elm,action,focus_highlight,show"; source: "elm";
+         action: STATE_SET "focused" 0.0;
+         target: "glow";
+         after: "focus_in2";
+      }
+      program { name: "focus_in2";
+         action: STATE_SET "focused2" 0.0;
+         transition: DECELERATE 0.5;
+         target: "glow";
+      }
+      program {
+         signal: "elm,action,focus_highlight,hide"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         transition: DECELERATE 0.3;
+         target: "glow";
+      }
+      program { name: "validation_fail";
+         signal: "validation,default,fail";
+         source: "elm";
+         action: STATE_SET "fail" 0.0;
+         target: "validation_glow";
+      }
+      program { name: "validation_pass";
+         signal: "validation,default,pass";
+         source: "elm";
+         action: STATE_SET "pass" 0.0;
+         target: "validation_glow";
+      }
+      program { name: "validation_off";
+         signal: "validation,default";
+         source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "validation_glow";
+      }
+   }
 }
 
 group { "efl/text/cursor";
-   inherit: "elm/entry/cursor/default";
-   alias: "efl/text/single/cursor";
-   alias: "efl/text/charwrap/cursor";
-   alias: "efl/text/mixedwrap/cursor";
-   alias: "efl/text/nowrap/cursor";
-   alias: "efl/text/noedit/cursor";
-   alias: "efl/text/single-noedit/cursor";
-   alias: "efl/text/noedit-charwrap/cursor";
-   alias: "efl/text/noedit-mixedwrap/cursor";
-   alias: "efl/text/nowrap-noedit/cursor";
+   min: 1 0;
+   images.image: "white_bar_vert_glow.png" COMP;
+   parts {
+      part { name: "cursor"; mouse_events: 0;
+         clip_to: "clipper";
+         description { state: "default" 0.0;
+            rel1.offset: -4 -4;
+            rel2.offset: 3 3;
+            image.normal: "white_bar_vert_glow.png";
+            image.border: 4 4 4 4;
+            fill.smooth: 0;
+            color: 255 255 255 0;
+            color_class: "entry_cursor";
+            min: 9 10;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 255;
+         }
+      }
+      part { name: "clipper"; type: RECT;
+         description { state: "default" 0.0;
+            rel1.to: "cursor";
+            rel2.to: "cursor";
+            fixed: 1 1;
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "selection,changed"; source: "elm.text";
+         action: STATE_SET "hidden" 0.0;
+         target: "clipper";
+      }
+      program {
+         signal: "selection,cleared"; source: "elm.text";
+         action: STATE_SET "default" 0.0;
+         target: "clipper";
+      }
+      program {
+         signal: "selection,reset"; source: "elm.text";
+         action: STATE_SET "default" 0.0;
+         target: "clipper";
+      }
+      program {
+         signal: "elm,action,focus"; source: "elm";
+         action: ACTION_STOP;
+         target: "cursor_show";
+         target: "cursor_hide";
+         target: "cursor_show_timer";
+         target: "cursor_hide_timer";
+         after: "cursor_show";
+      }
+      program {
+         signal: "elm,action,unfocus"; source: "elm";
+         action: ACTION_STOP;
+         target: "cursor_show";
+         target: "cursor_hide";
+         target: "cursor_show_timer";
+         target: "cursor_hide_timer";
+         after: "cursor_hide_stop";
+      }
+      program {
+         signal: "elm,action,show,cursor"; source: "elm";
+         action: ACTION_STOP;
+         target: "cursor_show";
+         target: "cursor_hide";
+         target: "cursor_show_timer";
+         target: "cursor_hide_timer";
+         after: "cursor_show";
+      }
+      program { name: "cursor_hide_stop";
+         action: STATE_SET "default" 0.0;
+         target: "cursor";
+      }
+      program { name: "cursor_show";
+         action: STATE_SET "visible" 0.0;
+         target: "cursor";
+         after: "cursor_show_timer";
+      }
+      program { name: "cursor_hide";
+         action: STATE_SET "default" 0.0;
+         target: "cursor";
+         transition: SINUSOIDAL 0.2;
+         after: "cursor_hide_timer";
+      }
+      program { name: "cursor_show_timer";
+         in: 0.5 0.0;
+         after: "cursor_hide";
+      }
+      program { name: "cursor_hide_timer";
+         in: 0.2 0.0;
+         after: "cursor_show";
+      }
+   }
 }
 
 group { "efl/text/selection";
-   inherit: "elm/entry/selection/default";
-   alias: "efl/text/single/selection";
-   alias: "efl/text/charwrap/selection";
-   alias: "efl/text/mixedwrap/selection";
-   alias: "efl/text/nowrap/selection";
-   alias: "efl/text/noedit/selection";
-   alias: "efl/text/single-noedit/selection";
-   alias: "efl/text/noedit-charwrap/selection";
-   alias: "efl/text/noedit-mixedwrap/selection";
-   alias: "efl/text/nowrap-noedit/selection";
+   parts {
+      part { name: "base"; type: RECT;
+         description { state: "default" 0.0;
+            color: 51 153 255 255;
+         }
+      }
+   }
 }
 
 group { "efl/text/anchor";
-   inherit: "elm/entry/anchor/default";
-   alias: "efl/text/single/anchor";
-   alias: "efl/text/charwrap/anchor";
-   alias: "efl/text/mixedwrap/anchor";
-   alias: "efl/text/nowrap/anchor";
-   alias: "efl/text/noedit/anchor";
-   alias: "efl/text/single-noedit/anchor";
-   alias: "efl/text/noedit-charwrap/anchor";
-   alias: "efl/text/noedit-mixedwrap/anchor";
-   alias: "efl/text/nowrap-noedit/anchor";
+   images.image: "horizontal_separated_bar_small_glow.png" COMP;
+   parts {
+      part { name: "bar";
+         description { state: "default" 0.0;
+            image.normal: "horizontal_separated_bar_small_glow.png";
+            image.border: 4 4 4 4;
+            fill.smooth: 0;
+            fixed: 0 1;
+            rel1.relative: 0.0 1.0;
+            rel1.offset: -3 -5;
+            rel2.offset: 2 4;
+         }
+      }
+   }
 }
 
 group { "efl/text";
-   inherit: "elm/entry/base/default";
-   alias: "efl/text/mixedwrap";
-   alias: "efl/text/charwrap";
-   alias: "efl/text/nowrap";
-   alias: "efl/text/single";
-   alias: "efl/text/single-noedit";
-   alias: "efl/text/noedit";
-   alias: "efl/text/noedit-mixedwrap";
-   alias: "efl/text/noedit-charwrap";
-   alias: "efl/text/nowrap-noedit";
-   alias: "efl/text/password";
    sounds {
       sample { name: "key-tap1" LOSSY 64;
          source: "kbd-tap.wav";
@@ -74,8 +534,12 @@ group { "efl/text";
          source: "kbd-tap5.wav";
       }
    }
-
-//   data.item: "context_menu_orientation" "horizontal";
+   styles {
+      style { name: "efl_ui_text_guide_style";
+         base: "font="FN" font_size=10 color=#000000 style=shadow,bottom shadow_color=#ffffff19 wrap=word text_class=entry_guide_text color_class=entry_guide_text left_margin=2 right_margin=2 ellipsis=0.0";
+         DISABLED_TEXTBLOCK_TAGS
+      }
+   }
    parts {
       part { name: "elm.swallow.background"; type: SWALLOW;
          description { state: "default" 0.0;
@@ -83,19 +547,23 @@ group { "efl/text";
             rel2.offset: -2 -2;
          }
       }
+      part { name: "elm.guide"; type: TEXTBLOCK; mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            rel1.to: "elm.text";
+            rel2.to: "elm.text";
+            text { style: "efl_ui_text_guide_style";
+               min: 0 1;
+               align: 0.0 0.0;
+            }
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
       part { name: "elm.text"; type: SWALLOW;
          scale: 1;
-         entry_mode: EDITABLE;
-         select_mode: DEFAULT;
-//         select_mode: EXPLICIT;
-         cursor_mode: BEFORE;
-         multiline: 1;
-         source: "efl/text/selection"; // selection under
-//         source2: "X"; // selection over
-//         source3: "X"; // cursor under
-         source4: "efl/text/cursor"; // cursorover
-//         source5: "efl/text/anchor"; // anchor under
-         source6: "efl/text/anchor"; // anchor over
          description { state: "default" 0.0;
             /* we gotta use 0 0 here, because of scrolled entries */
             fixed: 0 0;
@@ -162,44 +630,164 @@ group { "efl/text";
 }
 
 group { "efl/text/magnifier";
-   inherit: "elm/entry/magnifier/default";
-   alias: "efl/text/single/magnifier";
-   alias: "efl/text/charwrap/magnifier";
-   alias: "efl/text/mixedwrap/magnifier";
-   alias: "efl/text/nowrap/magnifier";
-   alias: "efl/text/noedit/magnifier";
-   alias: "efl/text/single-noedit/magnifier";
-   alias: "efl/text/noedit-charwrap/magnifier";
-   alias: "efl/text/noedit-mixedwrap/magnifier";
-   alias: "efl/text/nowrap-noedit/magnifier";
+   images.image: "frame_rounded.png" COMP;
+   parts {
+      part { name: "bg"; type: RECT; mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.offset: 10 10;
+            rel1.to: "over";
+            rel2.offset: -11 -11;
+            rel2.to: "over";
+            color: 48 48 48 255;
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "elm.swallow.content"; type: SWALLOW; mouse_events: 0;
+         description { state: "default" 0.0;
+            rel1.offset: 10 10;
+            rel1.to: "over";
+            rel2.offset: -11 -11;
+            rel2.to: "over";
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+      part { name: "over"; mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 128 64;
+            align: 0 0;
+            image.normal: "frame_rounded.png";
+            image.border: 14 14 14 14;
+            image.middle: 0;
+            fill.smooth: 0;
+         }
+         description { state: "hidden" 0.0;
+            inherit: "default" 0.0;
+            visible: 0;
+         }
+      }
+   }
+   programs {
+      program { name: "magnifier_show";
+         signal: "elm,action,show,magnifier"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "elm.swallow.content";
+         target: "bg";
+         target: "over";
+      }
+      program { name: "magnifier_hide";
+         signal: "elm,action,hide,magnifier"; source: "elm";
+         action: STATE_SET "hidden" 0.0;
+         target: "elm.swallow.content";
+         target: "bg";
+         target: "over";
+      }
+   }
 }
 
 group { "efl/text/handler/start";
-   inherit: "elm/entry/handler/start/default";
-   alias: "efl/text/single/handler/start";
-   alias: "efl/text/charwrap/handler/start";
-   alias: "efl/text/mixedwrap/handler/start";
-   alias: "efl/text/nowrap/handler/start";
-   alias: "efl/text/noedit/handler/start";
-   alias: "efl/text/single-noedit/handler/start";
-   alias: "efl/text/noedit-charwrap/handler/start";
-   alias: "efl/text/noedit-mixedwrap/handler/start";
-   alias: "efl/text/nowrap-noedit/handler/start";
+   images.image: "handle_pick_up_left.png" COMP;
+   parts {
+      part { name: "base"; mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 21 27; // 42 54
+            image.normal: "handle_pick_up_left.png";
+            align: (29/42) (11/54);
+            color_class: "entry_selection_handler";
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "event"; type: RECT;
+         scale: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+            rel1.to: "base";
+            rel2.to: "base";
+            min: 32 32;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "elm,handler,show"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "base";
+         target: "event";
+      }
+      program {
+         signal: "elm,handler,hide"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "base";
+         target: "event";
+      }
+   }
 }
 
 group { "efl/text/handler/end";
-   inherit: "elm/entry/handler/end/default";
-   alias: "efl/text/single/handler/end";
-   alias: "efl/text/charwrap/handler/end";
-   alias: "efl/text/mixedwrap/handler/end";
-   alias: "efl/text/nowrap/handler/end";
-   alias: "efl/text/noedit/handler/end";
-   alias: "efl/text/single-noedit/handler/end";
-   alias: "efl/text/noedit-charwrap/handler/end";
-   alias: "efl/text/noedit-mixedwrap/handler/end";
-   alias: "efl/text/nowrap-noedit/handler/end";
+   images.image: "handle_pick_up_right.png" COMP;
+   parts {
+      part { name: "base"; mouse_events: 0;
+         scale: 1;
+         description { state: "default" 0.0;
+            min: 21 27; // 42 54
+            image.normal: "handle_pick_up_right.png";
+            align: (12/42) (11/54);
+            color_class: "entry_selection_handler";
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+      part { name: "event"; type: RECT;
+         scale: 1;
+         description { state: "default" 0.0;
+            color: 0 0 0 0;
+            rel1.to: "base";
+            rel2.to: "base";
+            min: 32 32;
+            visible: 0;
+         }
+         description { state: "visible" 0.0;
+            inherit: "default" 0.0;
+            visible: 1;
+         }
+      }
+   }
+   programs {
+      program {
+         signal: "elm,handler,show"; source: "elm";
+         action: STATE_SET "visible" 0.0;
+         target: "base";
+         target: "event";
+      }
+      program {
+         signal: "elm,handler,hide"; source: "elm";
+         action: STATE_SET "default" 0.0;
+         target: "base";
+         target: "event";
+      }
+   }
 }
 
+
 ///////////////////////////////////////////////////////////////////////////////
 // emoticon images from:
 // Tanya - Latvia
index bf881da..189bf96 100644 (file)
@@ -519,7 +519,7 @@ group { name: "elm/entry/anchor/default";
 }
 
 group { name: "elm/entry/base/default";
-   sounds {   
+   sounds {
       sample { name: "key-tap1" LOSSY 64;
          source: "kbd-tap.wav";
       }
@@ -1194,110 +1194,6 @@ group { name: "elm/entry/handler/end/default";
    }
 }
 
-group { name: "elm/efl_ui_text/base/default";
-   sounds {   
-      sample { name: "key-tap1" LOSSY 64;
-         source: "kbd-tap.wav";
-      }
-      sample { name: "key-tap2" LOSSY 64;
-         source: "kbd-tap2.wav";
-      }
-      sample { name: "key-tap3" LOSSY 64;
-         source: "kbd-tap3.wav";
-      }
-      sample { name: "key-tap4" LOSSY 64;
-         source: "kbd-tap4.wav";
-      }
-      sample { name: "key-tap5" LOSSY 64;
-         source: "kbd-tap5.wav";
-      }
-   }
-   
-//   data.item: "context_menu_orientation" "horizontal";
-   parts {
-      part { name: "elm.swallow.background"; type: SWALLOW;
-         description { state: "default" 0.0;
-            rel1.offset: 1 1;
-            rel2.offset: -2 -2;
-         }
-      }
-      part { name: "elm.text"; type: SWALLOW;
-         scale: 1;
-         entry_mode: EDITABLE;
-         select_mode: DEFAULT;
-//         select_mode: EXPLICIT;
-         cursor_mode: BEFORE;
-         multiline: 1;
-         source: "elm/entry/selection/default"; // selection under
-//         source2: "X"; // selection over
-//         source3: "X"; // cursor under
-         source4: "elm/entry/cursor/default"; // cursorover
-//         source5: "elm/entry/anchor/default"; // anchor under
-         source6: "elm/entry/anchor/default"; // anchor over
-         description { state: "default" 0.0;
-            /* we gotta use 0 0 here, because of scrolled entries */
-            fixed: 0 0;
-            rel1.offset: 2 2;
-            rel2.offset: -3 -3;
-         }
-         description { state: "disabled" 0.0;
-            inherit: "default" 0.0;
-         }
-      }
-   }
-   programs {
-      program {
-         signal: "load"; source: "";
-         action: FOCUS_SET;
-         target: "elm.text";
-      }
-      program {
-         signal: "elm,state,disabled"; source: "elm";
-         action: STATE_SET "disabled" 0.0;
-         target: "elm.text";
-      }
-      program {
-         signal: "elm,state,enabled"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "elm.text";
-      }
-      #if 0
-      program {
-         signal: "elm,guide,disabled"; source: "elm";
-         action: STATE_SET "hidden" 0.0;
-         target: "elm.guide";
-      }
-      program {
-         signal: "elm,guide,enabled"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "elm.guide";
-      }
-      #endif
-      program { name: "key-down";
-         signal: "entry,keydown"; source: "elm.text";
-         script {
-            new buf[32];
-            snprintf(buf, 31, "key-down%i", (rand() % 5) + 1);
-            run_program(get_program_id(buf));
-         }
-      }
-      program { name: "key-down1";
-         action: PLAY_SAMPLE "key-tap1" 1.0 INPUT;
-      }
-      program { name: "key-down2";
-         action: PLAY_SAMPLE "key-tap2" 1.0 INPUT;
-      }
-      program { name: "key-down3";
-         action: PLAY_SAMPLE "key-tap3" 1.0 INPUT;
-      }
-      program { name: "key-down4";
-         action: PLAY_SAMPLE "key-tap4" 1.0 INPUT;
-      }
-      program { name: "key-down5";
-         action: PLAY_SAMPLE "key-tap5" 1.0 INPUT;
-      }
-   }
-}
 ///////////////////////////////////////////////////////////////////////////////
 // emoticon images from:
 // Tanya - Latvia
index 434a4fd..6224676 100644 (file)
@@ -657,52 +657,6 @@ _update_selection_handler(Eo *obj)
      }
 }
 
-static const char *
-_efl_ui_text_theme_group_get(Evas_Object *obj)
-{
-   EFL_UI_TEXT_DATA_GET(obj, sd);
-
-   if (sd->password) return "password";
-   if (sd->editable)
-     {
-        if (sd->single_line) return "single";
-        switch (sd->line_wrap)
-          {
-            case ELM_WRAP_CHAR:
-              return "charwrap";
-
-            case ELM_WRAP_WORD:
-              return "base";
-
-            case ELM_WRAP_MIXED:
-              return "mixedwrap";
-
-            case ELM_WRAP_NONE:
-            default:
-              return "nowrap";
-          }
-     }
-   else
-     {
-        if (sd->single_line) return "single-noedit";
-        switch (sd->line_wrap)
-          {
-            case ELM_WRAP_CHAR:
-              return "noedit-charwrap";
-
-            case ELM_WRAP_WORD:
-              return "noedit";
-
-            case ELM_WRAP_MIXED:
-              return "noedit-mixedwrap";
-
-            case ELM_WRAP_NONE:
-            default:
-              return "nowrap-noedit";
-          }
-     }
-}
-
 static void
 _edje_entry_user_insert(Evas_Object *obj, const char *data)
 {
@@ -921,7 +875,7 @@ _efl_ui_text_elm_widget_theme_apply(Eo *obj, Efl_Ui_Text_Data *sd)
    _mirrored_set(obj, efl_ui_mirrored_get(obj));
 
    elm_widget_element_update(obj, sd->entry_edje,
-                                   _efl_ui_text_theme_group_get(obj));
+                                   elm_widget_theme_element_get(obj));
 
    if (elm_widget_disabled_get(obj))
      edje_object_signal_emit(sd->entry_edje, "elm,state,disabled", "elm");
@@ -2970,58 +2924,160 @@ _end_handler_mouse_move_cb(void *data,
      _magnifier_move(data);
 }
 
+static void
+_create_selection_handlers(Evas_Object *obj, Efl_Ui_Text_Data *sd)
+{
+   Evas_Object *handle;
+
+   handle = _decoration_create(obj, sd, PART_NAME_HANDLER_START, EINA_TRUE);
+   evas_object_pass_events_set(handle, EINA_FALSE);
+   sd->start_handler = handle;
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_DOWN,
+                                  _start_handler_mouse_down_cb, obj);
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_MOVE,
+                                  _start_handler_mouse_move_cb, obj);
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_UP,
+                                  _start_handler_mouse_up_cb, obj);
+   evas_object_show(handle);
+
+   handle = _decoration_create(obj, sd, PART_NAME_HANDLER_END, EINA_TRUE);
+   evas_object_pass_events_set(handle, EINA_FALSE);
+   sd->end_handler = handle;
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_DOWN,
+                                  _end_handler_mouse_down_cb, obj);
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_MOVE,
+                                  _end_handler_mouse_move_cb, obj);
+   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_UP,
+                                  _end_handler_mouse_up_cb, obj);
+   evas_object_show(handle);
+}
+
 EOLIAN static void
-_efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv)
+_efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Position2D pos)
 {
-   Eo *text_obj;
+   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
+     return;
 
-   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+   efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
+   efl_gfx_position_set(sd->hit_rect, pos);
 
-   text_obj = efl_add(EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS, obj);
+   if (sd->hoversel) _hoversel_position(obj);
 
-   efl_composite_attach(obj, text_obj);
-   priv->text_obj = text_obj;
+   _update_selection_handler(obj);
+}
 
-   // FIXME: use the theme, when a proper theming option is available
-   //  (possibly, text_classes).
-   // For now, set this for easier setup
-   efl_text_font_set(text_obj, "Sans", 12);
-   efl_text_normal_color_set(text_obj, 255, 255, 255, 255);
+EOLIAN static void
+_efl_ui_text_efl_gfx_size_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Size2D sz)
+{
+   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
+     return;
+
+   efl_gfx_size_set(sd->hit_rect, sz);
+   _update_selection_handler(obj);
+
+   efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
+}
+
+EOLIAN static void
+_efl_ui_text_efl_gfx_visible_set(Eo *obj, Efl_Ui_Text_Data *sd EINA_UNUSED, Eina_Bool vis)
+{
+   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
+     return;
+
+   efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis);
+   if (vis) _update_selection_handler(obj);
+}
+
+EOLIAN static void
+_efl_ui_text_efl_canvas_group_group_member_add(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Object *member)
+{
+   efl_canvas_group_member_add(efl_super(obj, MY_CLASS), member);
+
+   if (sd->hit_rect)
+     evas_object_raise(sd->hit_rect);
+}
+
+static void
+_cb_added(void *data EINA_UNUSED, const Efl_Event *ev)
+{
+   const Efl_Callback_Array_Item *event = ev->info;
+
+   EFL_UI_TEXT_DATA_GET(ev->object, sd);
+   if (event->desc == EFL_UI_TEXT_EVENT_VALIDATE)
+     sd->validators++;
+}
+
+static void
+_cb_deleted(void *data EINA_UNUSED, const Efl_Event *ev)
+{
+   const Efl_Callback_Array_Item *event = ev->info;
+
+   EFL_UI_TEXT_DATA_GET(ev->object, sd);
+   if (event->desc == EFL_UI_TEXT_EVENT_VALIDATE)
+     sd->validators--;
+   return;
+
+}
+
+EOLIAN static Eo *
+_efl_ui_text_efl_object_constructor(Eo *obj, Efl_Ui_Text_Data *sd)
+{
+   Eo *text_obj;
+
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
+
+   if (!elm_widget_theme_klass_get(obj))
+     elm_widget_theme_klass_set(obj, "text");
+   obj = efl_constructor(efl_super(obj, MY_CLASS));
 
-   efl_canvas_group_add(efl_super(obj, MY_CLASS));
    elm_widget_sub_object_parent_add(obj);
 
-   priv->entry_edje = wd->resize_obj;
+   evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
+   efl_access_role_set(obj, EFL_ACCESS_ROLE_ENTRY);
+   efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _cb_added, NULL);
+   efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _cb_deleted, NULL);
 
-   priv->cnp_mode = ELM_CNP_MODE_PLAINTEXT;
-   priv->line_wrap = ELM_WRAP_WORD;
-   priv->context_menu = EINA_TRUE;
-   priv->auto_save = EINA_TRUE;
-   priv->editable = EINA_TRUE;
-   priv->sel_allow = EINA_TRUE;
+   sd->entry_edje = wd->resize_obj;
 
-   priv->single_line = !efl_text_multiline_get(text_obj);
+   sd->cnp_mode = ELM_CNP_MODE_PLAINTEXT;
+   sd->line_wrap = ELM_WRAP_WORD;
+   sd->context_menu = EINA_TRUE;
+   sd->auto_save = EINA_TRUE;
+   sd->editable = EINA_TRUE;
+   sd->sel_allow = EINA_TRUE;
 
-   priv->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
-   elm_drop_target_add(obj, priv->drop_format,
+   sd->drop_format = ELM_SEL_FORMAT_MARKUP | ELM_SEL_FORMAT_IMAGE;
+   elm_drop_target_add(obj, sd->drop_format,
                        _dnd_enter_cb, NULL,
                        _dnd_leave_cb, NULL,
                        _dnd_pos_cb, NULL,
                        _dnd_drop_cb, NULL);
 
-   if (!elm_widget_theme_klass_get(obj))
-     elm_widget_theme_klass_set(obj, "text");
    if (!elm_widget_theme_object_set(obj, wd->resize_obj,
                                        elm_widget_theme_klass_get(obj),
-                                       _efl_ui_text_theme_group_get(obj),
+                                       elm_widget_theme_element_get(obj),
                                        elm_widget_theme_style_get(obj)))
-     CRI("Failed to set layout!");
+     CRI("Failed tp set layout!");
+
+   text_obj = efl_add(EFL_UI_INTERNAL_TEXT_INTERACTIVE_CLASS, obj);
 
-   edje_object_part_swallow(priv->entry_edje, "elm.text", text_obj);
+   efl_composite_attach(obj, text_obj);
+   sd->text_obj = text_obj;
+
+   // FIXME: use the theme, when a proper theming option is available
+   //  (possibly, text_classes).
+   // For now, set this for easier setup
+   efl_text_font_set(text_obj, "Sans", 12);
+   efl_text_normal_color_set(text_obj, 255, 255, 255, 255);
+   efl_ui_text_interactive_editable_set(obj, EINA_FALSE);
+
+   sd->single_line = !efl_text_multiline_get(text_obj);
+
+   edje_object_part_swallow(sd->entry_edje, "elm.text", text_obj);
    evas_object_size_hint_weight_set
-      (priv->entry_edje, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+      (sd->entry_edje, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set
-      (priv->entry_edje, EVAS_HINT_FILL, EVAS_HINT_FILL);
+      (sd->entry_edje, EVAS_HINT_FILL, EVAS_HINT_FILL);
    efl_event_callback_add(text_obj, EFL_UI_TEXT_INTERACTIVE_EVENT_CHANGED_USER,
          _efl_ui_text_changed_cb, obj);
    efl_event_callback_add(text_obj, EFL_CANVAS_TEXT_EVENT_CHANGED,
@@ -3030,11 +3086,11 @@ _efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv)
          _efl_ui_text_selection_changed_cb, obj);
    efl_event_callback_add(text_obj, EFL_CANVAS_TEXT_EVENT_CURSOR_CHANGED,
          _efl_ui_text_cursor_changed_cb, obj);
-   evas_object_event_callback_add(priv->entry_edje, EVAS_CALLBACK_MOVE,
+   evas_object_event_callback_add(sd->entry_edje, EVAS_CALLBACK_MOVE,
          _efl_ui_text_move_cb, obj);
 
    /* Async layout */
-   if (priv->async.enabled)
+   if (sd->async.enabled)
      {
 #if 0
         efl_event_callback_add(text_obj,
@@ -3043,120 +3099,118 @@ _efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv)
 #endif
      }
 
-   priv->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));
-   evas_object_data_set(priv->hit_rect, "_elm_leaveme", obj);
+   sd->hit_rect = evas_object_rectangle_add(evas_object_evas_get(obj));
+   evas_object_data_set(sd->hit_rect, "_elm_leaveme", obj);
 
-   Evas_Object* clip = evas_object_clip_get(priv->entry_edje);
-   evas_object_clip_set(priv->hit_rect, clip);
+   Evas_Object* clip = evas_object_clip_get(sd->entry_edje);
+   evas_object_clip_set(sd->hit_rect, clip);
 
-   evas_object_smart_member_add(priv->hit_rect, obj);
-   elm_widget_sub_object_add(obj, priv->hit_rect);
+   evas_object_smart_member_add(sd->hit_rect, obj);
+   elm_widget_sub_object_add(obj, sd->hit_rect);
 
    /* common scroller hit rectangle setup */
-   evas_object_color_set(priv->hit_rect, 0, 0, 0, 0);
-   evas_object_show(priv->hit_rect);
-   evas_object_repeat_events_set(priv->hit_rect, EINA_TRUE);
+   evas_object_color_set(sd->hit_rect, 0, 0, 0, 0);
+   evas_object_show(sd->hit_rect);
+   evas_object_repeat_events_set(sd->hit_rect, EINA_TRUE);
 
-   elm_interface_scrollable_objects_set(obj, priv->entry_edje, priv->hit_rect);
+   elm_interface_scrollable_objects_set(obj, sd->entry_edje, sd->hit_rect);
 
    edje_object_text_markup_filter_callback_add
-     (priv->entry_edje, "elm.text", _markup_filter_cb, obj);
+     (sd->entry_edje, "elm.text", _markup_filter_cb, obj);
 
    evas_object_event_callback_add
-     (priv->entry_edje, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, obj);
+     (sd->entry_edje, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, obj);
    evas_object_event_callback_add
-     (priv->entry_edje, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj);
+     (sd->entry_edje, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj);
    evas_object_event_callback_add
-     (priv->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
+     (sd->entry_edje, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj);
    evas_object_event_callback_add
-     (priv->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj);
+     (sd->entry_edje, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, obj);
 
    /* this code can't go in smart_resize. sizing gets wrong */
    evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize_cb, obj);
 
    edje_object_signal_callback_add
-     (priv->entry_edje, "entry,changed,user", "elm.text",
+     (sd->entry_edje, "entry,changed,user", "elm.text",
      _entry_changed_user_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "preedit,changed", "elm.text",
+     (sd->entry_edje, "preedit,changed", "elm.text",
      _entry_preedit_changed_signal_cb, obj);
 
    edje_object_signal_callback_add
-     (priv->entry_edje, "cursor,changed", "elm.text",
+     (sd->entry_edje, "cursor,changed", "elm.text",
      _entry_cursor_changed_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "cursor,changed,manual", "elm.text",
+     (sd->entry_edje, "cursor,changed,manual", "elm.text",
      _entry_cursor_changed_manual_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "anchor,mouse,down,*", "elm.text",
+     (sd->entry_edje, "anchor,mouse,down,*", "elm.text",
      _entry_anchor_down_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "anchor,mouse,up,*", "elm.text",
+     (sd->entry_edje, "anchor,mouse,up,*", "elm.text",
      _entry_anchor_up_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "anchor,mouse,move,*", "elm.text",
+     (sd->entry_edje, "anchor,mouse,move,*", "elm.text",
      _entry_anchor_move_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "anchor,mouse,in,*", "elm.text",
+     (sd->entry_edje, "anchor,mouse,in,*", "elm.text",
      _entry_anchor_in_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "anchor,mouse,out,*", "elm.text",
+     (sd->entry_edje, "anchor,mouse,out,*", "elm.text",
      _entry_anchor_out_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "entry,key,enter", "elm.text",
+     (sd->entry_edje, "entry,key,enter", "elm.text",
      _entry_key_enter_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "entry,key,escape", "elm.text",
+     (sd->entry_edje, "entry,key,escape", "elm.text",
      _entry_key_escape_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "mouse,down,1", "elm.text",
+     (sd->entry_edje, "mouse,down,1", "elm.text",
      _entry_mouse_down_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "mouse,clicked,1", "elm.text",
+     (sd->entry_edje, "mouse,clicked,1", "elm.text",
      _entry_mouse_clicked_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "mouse,down,1,double", "elm.text",
+     (sd->entry_edje, "mouse,down,1,double", "elm.text",
      _entry_mouse_double_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "mouse,down,1,triple", "elm.text",
+     (sd->entry_edje, "mouse,down,1,triple", "elm.text",
      _entry_mouse_triple_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "entry,undo,request", "elm.text",
+     (sd->entry_edje, "entry,undo,request", "elm.text",
      _entry_undo_request_signal_cb, obj);
    edje_object_signal_callback_add
-     (priv->entry_edje, "entry,redo,request", "elm.text",
+     (sd->entry_edje, "entry,redo,request", "elm.text",
      _entry_redo_request_signal_cb, obj);
 
-   efl_text_set(priv->text_obj, "");
+   efl_text_set(sd->text_obj, "");
 
    elm_object_sub_cursor_set
      (wd->resize_obj, obj, ELM_CURSOR_XTERM);
    elm_widget_can_focus_set(obj, EINA_TRUE);
    if (_elm_config->desktop_entry)
      edje_object_part_text_select_allow_set
-       (priv->entry_edje, "elm.text", EINA_TRUE);
-
-   //elm_layout_sizing_eval(obj);
+       (sd->entry_edje, "elm.text", EINA_TRUE);
 
    efl_ui_text_input_panel_layout_set(obj, ELM_INPUT_PANEL_LAYOUT_NORMAL);
    efl_ui_text_input_panel_enabled_set(obj, EINA_TRUE);
    efl_ui_text_prediction_allow_set(obj, EINA_TRUE);
    efl_ui_text_input_hint_set(obj, ELM_INPUT_HINT_AUTO_COMPLETE);
 
-   priv->autocapital_type = (Elm_Autocapital_Type)edje_object_part_text_autocapital_type_get
-       (priv->entry_edje, "elm.text");
+   sd->autocapital_type = (Elm_Autocapital_Type)edje_object_part_text_autocapital_type_get
+       (sd->entry_edje, "elm.text");
 
    entries = eina_list_prepend(entries, obj);
 
    // module - find module for entry
-   priv->api = _module_find(obj);
+   sd->api = _module_find(obj);
    // if found - hook in
-   if ((priv->api) && (priv->api->obj_hook)) priv->api->obj_hook(obj);
+   if ((sd->api) && (sd->api->obj_hook)) sd->api->obj_hook(obj);
 
    _mirrored_set(obj, efl_ui_mirrored_get(obj));
 
    // access
-   _elm_access_object_register(obj, priv->entry_edje);
+   _elm_access_object_register(obj, sd->entry_edje);
    _elm_access_text_set
      (_elm_access_info_get(obj), ELM_ACCESS_TYPE, E_("Entry"));
    _elm_access_callback_set
@@ -3165,41 +3219,15 @@ _efl_ui_text_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Text_Data *priv)
      (_elm_access_info_get(obj), ELM_ACCESS_STATE, _access_state_cb, NULL);
 
    if (_elm_config->desktop_entry)
-     priv->sel_handler_disabled = EINA_TRUE;
+     sd->sel_handler_disabled = EINA_TRUE;
 
-   _create_text_cursors(obj, priv);
-}
+   _create_text_cursors(obj, sd);
 
-static void
-_create_selection_handlers(Evas_Object *obj, Efl_Ui_Text_Data *sd)
-{
-   Evas_Object *handle;
-
-   handle = _decoration_create(obj, sd, PART_NAME_HANDLER_START, EINA_TRUE);
-   evas_object_pass_events_set(handle, EINA_FALSE);
-   sd->start_handler = handle;
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_DOWN,
-                                  _start_handler_mouse_down_cb, obj);
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_MOVE,
-                                  _start_handler_mouse_move_cb, obj);
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_UP,
-                                  _start_handler_mouse_up_cb, obj);
-   evas_object_show(handle);
-
-   handle = _decoration_create(obj, sd, PART_NAME_HANDLER_END, EINA_TRUE);
-   evas_object_pass_events_set(handle, EINA_FALSE);
-   sd->end_handler = handle;
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_DOWN,
-                                  _end_handler_mouse_down_cb, obj);
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_MOVE,
-                                  _end_handler_mouse_move_cb, obj);
-   evas_object_event_callback_add(handle, EVAS_CALLBACK_MOUSE_UP,
-                                  _end_handler_mouse_up_cb, obj);
-   evas_object_show(handle);
+   return obj;
 }
 
 EOLIAN static void
-_efl_ui_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Text_Data *sd)
+_efl_ui_text_efl_object_destructor(Eo *obj, Efl_Ui_Text_Data *sd)
 {
    Elm_Entry_Context_Menu_Item *it;
    Elm_Entry_Item_Provider *ip;
@@ -3288,95 +3316,10 @@ _efl_ui_text_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Text_Data *sd)
    // a specific behavior of SWALLOW parts.
    efl_del(sd->text_obj);
    sd->text_obj = NULL;
-   efl_canvas_group_del(efl_super(obj, MY_CLASS));
-}
-
-EOLIAN static void
-_efl_ui_text_efl_gfx_position_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Position2D pos)
-{
-   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, pos.x, pos.y))
-     return;
-
-   efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
-   efl_gfx_position_set(sd->hit_rect, pos);
-
-   if (sd->hoversel) _hoversel_position(obj);
-
-   _update_selection_handler(obj);
-}
 
-EOLIAN static void
-_efl_ui_text_efl_gfx_size_set(Eo *obj, Efl_Ui_Text_Data *sd, Eina_Size2D sz)
-{
-   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_RESIZE, 0, sz.w, sz.h))
-     return;
-
-   efl_gfx_size_set(sd->hit_rect, sz);
-   _update_selection_handler(obj);
-
-   efl_gfx_size_set(efl_super(obj, MY_CLASS), sz);
-}
-
-EOLIAN static void
-_efl_ui_text_efl_gfx_visible_set(Eo *obj, Efl_Ui_Text_Data *sd EINA_UNUSED, Eina_Bool vis)
-{
-   if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_VISIBLE, 0, vis))
-     return;
-
-   efl_gfx_visible_set(efl_super(obj, MY_CLASS), vis);
-   if (vis) _update_selection_handler(obj);
-}
-
-EOLIAN static void
-_efl_ui_text_efl_canvas_group_group_member_add(Eo *obj, Efl_Ui_Text_Data *sd, Evas_Object *member)
-{
-   efl_canvas_group_member_add(efl_super(obj, MY_CLASS), member);
-
-   if (sd->hit_rect)
-     evas_object_raise(sd->hit_rect);
-}
-
-static void
-_cb_added(void *data EINA_UNUSED, const Efl_Event *ev)
-{
-   const Efl_Callback_Array_Item *event = ev->info;
-
-   EFL_UI_TEXT_DATA_GET(ev->object, sd);
-   if (event->desc == EFL_UI_TEXT_EVENT_VALIDATE)
-     sd->validators++;
-}
-
-static void
-_cb_deleted(void *data EINA_UNUSED, const Efl_Event *ev)
-{
-   const Efl_Callback_Array_Item *event = ev->info;
-
-   EFL_UI_TEXT_DATA_GET(ev->object, sd);
-   if (event->desc == EFL_UI_TEXT_EVENT_VALIDATE)
-     sd->validators--;
-   return;
-
-}
-
-EOLIAN static Eo *
-_efl_ui_text_efl_object_constructor(Eo *obj, Efl_Ui_Text_Data *pd EINA_UNUSED)
-{
-   obj = efl_constructor(efl_super(obj, MY_CLASS));
-   efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
-   evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
-   efl_access_role_set(obj, EFL_ACCESS_ROLE_ENTRY);
-   efl_event_callback_add(obj, EFL_EVENT_CALLBACK_ADD, _cb_added, NULL);
-   efl_event_callback_add(obj, EFL_EVENT_CALLBACK_DEL, _cb_deleted, NULL);
-   efl_ui_text_interactive_editable_set(obj, EINA_FALSE);
-
-   return obj;
-}
+   ecore_job_del(sd->deferred_decoration_job);
+   sd->deferred_decoration_job = NULL;
 
-EOLIAN static void
-_efl_ui_text_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Text_Data *pd)
-{
-   ecore_job_del(pd->deferred_decoration_job);
-   pd->deferred_decoration_job = NULL;
    efl_destructor(efl_super(obj, MY_CLASS));
 }
 
@@ -4050,12 +3993,6 @@ _efl_ui_text_elm_widget_on_access_activate(Eo *obj, Efl_Ui_Text_Data *_pd EINA_U
    return EINA_TRUE;
 }
 
-static void
-_efl_ui_text_class_constructor(Efl_Class *klass)
-{
-   evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
-}
-
 // ATSPI Accessibility
 
 EOLIAN static Eina_Unicode
@@ -5362,31 +5299,28 @@ ELM_PART_OVERRIDE_CONTENT_UNSET(elm_entry, EFL_UI_TEXT, Efl_Ui_Text_Data)
 
 /* Internal EO APIs and hidden overrides */
 
-ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
+//ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX)
 
 #define EFL_UI_TEXT_EXTRA_OPS \
-   EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_text), \
    ELM_LAYOUT_SIZING_EVAL_OPS(efl_ui_text), \
-   ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX), \
 
 #include "efl_ui_text.eo.c"
 
-EOLIAN static void
-_efl_ui_text_async_efl_canvas_group_group_add(Eo *obj, void *_pd EINA_UNUSED)
+EOLIAN static Eo *
+_efl_ui_text_async_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
 {
    EFL_UI_TEXT_DATA_GET(obj, sd);
+
    sd->async.enabled = EINA_TRUE;
-   efl_canvas_group_add(efl_super(obj, EFL_UI_TEXT_ASYNC_CLASS));
-}
 
-EOLIAN static void
-_efl_ui_text_async_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED)
-{
-   efl_canvas_group_del(efl_super(obj, EFL_UI_TEXT_ASYNC_CLASS));
-}
+   // FIXME: should we have to keep this efl_ui_text_xxx classes?
+   // Then, going to make new theme for these classes? ex) efl/text_async?
+   if (!elm_widget_theme_klass_get(obj))
+     elm_widget_theme_klass_set(obj, "text");
+   obj = efl_constructor(efl_super(obj, EFL_UI_TEXT_ASYNC_CLASS));
 
-#define EFL_UI_TEXT_ASYNC_EXTRA_OPS \
-   EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_text_async)
+   return obj;
+}
 
 #include "efl_ui_text_async.eo.c"
 
@@ -5397,6 +5331,10 @@ _efl_ui_text_async_efl_canvas_group_group_del(Eo *obj, void *_pd EINA_UNUSED)
 EOLIAN static Eo *
 _efl_ui_text_editable_efl_object_constructor(Eo *obj, void *_pd EINA_UNUSED)
 {
+   // FIXME: should we have to keep this efl_ui_text_xxx classes?
+   // Then, going to make new theme for these classes? ex) efl/text_editable?
+   if (!elm_widget_theme_klass_get(obj))
+     elm_widget_theme_klass_set(obj, "text");
    obj = efl_constructor(efl_super(obj, MY_CLASS));
    efl_ui_text_interactive_editable_set(obj, EINA_TRUE);
 
index 567d692..54b6add 100644 (file)
@@ -348,7 +348,6 @@ class Efl.Ui.Text (Efl.Ui.Layout, Elm.Interface_Scrollable, Efl.Ui.Clickable,
       }
    }
    implements {
-      class.constructor;
       Efl.Object.constructor;
       Efl.Object.destructor;
       Efl.Gfx.visible { set; }
index 0f57a87..52061e5 100644 (file)
@@ -6,6 +6,6 @@ class Efl.Ui.Text_Async (Efl.Ui.Text)
    ]]
    data: null;
    implements {
-      //Efl.Object.constructor;
+      Efl.Object.constructor;
    }
 }