jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=76d2778177681cd170dfce4575a0e4c7c2385771

commit 76d2778177681cd170dfce4575a0e4c7c2385771
Author: Ji-Youn Park <[email protected]>
Date:   Fri Jun 17 10:30:22 2016 +0830

    efl_ui_win: add some evas feature(pointer, cache ) to efl.canvas and 
efl_ui_win
    
    evas will be internal, so APIs need to open public are moved efl.canvas eo
    and efl_ui_win.
---
 src/lib/efl/interfaces/efl_canvas.eo | 92 ++++++++++++++++++++++++++++++++++++
 src/lib/elementary/efl_ui_win.c      | 48 +++++++++++++++++++
 src/lib/elementary/efl_ui_win.eo     |  8 ++++
 3 files changed, 148 insertions(+)

diff --git a/src/lib/efl/interfaces/efl_canvas.eo 
b/src/lib/efl/interfaces/efl_canvas.eo
index 8d0230e..1cbbb79 100644
--- a/src/lib/efl/interfaces/efl_canvas.eo
+++ b/src/lib/efl/interfaces/efl_canvas.eo
@@ -1,6 +1,98 @@
 interface Efl.Canvas ()
 {
    [[Common interface for Window and some internal classes in EFL.]]
+   methods {
+      @property pointer_canvas_xy {
+         get {
+            [[This function returns the current known pointer coordinates
+
+              This function returns the current known canvas unit
+              coordinates of the mouse pointer and sets the contents of
+              the Evas_Coords pointed to by $x and $y to contain these
+              coordinates. If $e is not a valid canvas the results of
+              this function are undefined.
+            ]]
+         }
+         values {
+            x: int; [[The pointer to hold the return value of pointer's x 
position.]]
+            y: int; [[The pointer to hold the return value of pointer's y 
position.]]
+         }
+      }
+      @property pointer_inside {
+         get {
+            [[Returns whether the mouse pointer is logically inside the
+              canvas.
+
+              When this function is called it will return a value of either
+              $false or $true, depending on if event_feed_mouse_in or
+              event_feed_mouse_out have been called to feed in a  mouse
+              enter event into the canvas.
+
+              A return value of $true indicates the mouse is logically
+              inside the canvas, and $false implies it is logically
+              outside the canvas.
+
+              A canvas begins with the mouse being assumed outside ($false).
+
+              If $e is not a valid canvas, the return value is undefined.
+            ]]
+            return: bool @warn_unused;
+         }
+      }
+      @property image_max_size {
+         get {
+            [[Get the maximum image size evas can possibly handle.
+
+              This function returns the largest image or surface size that
+              evas can handle in pixels, and if there is one, returns $true.
+              It returns $false if no extra constraint on maximum image
+              size exists. You still should check the return values of
+              $maxw and $maxh as there may still be a limit, just a
+              much higher one.
+
+            ]]
+            return: bool;
+         }
+         values {
+            maxw: int; [[Pointer to hold the return value in pixels of the 
maximum width.]]
+            maxh: int; [[Pointer to hold the return value in pixels of the 
maximum height.]]
+         }
+      }
+      @property image_cache {
+         set {
+            [[Set the image cache.
+
+              This function sets the image cache of canvas in bytes.
+            ]]
+         }
+         get {
+            [[Get the image cache.
+
+              This function returns the image cache size of canvas in bytes.
+            ]]
+         }
+         values {
+            size: int; [[The cache size.]]
+         }
+      }
+      @property font_cache {
+         set {
+            [[Changes the size of font cache of the given evas.]]
+         }
+         get {
+            [[Get the size of font cache of the given evas in bytes.]]
+         }
+         values {
+            size: int; [[The size in bytes.]]
+         }
+      }
+      smart_objects_calculate {
+         [[Call user-provided $calculate smart functions and unset the
+           flag signalling that the object needs to get recalculated to
+           all smart objects in the canvas.
+         ]]
+      }
+   }
    events {
       focus,in;
       focus,out;
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index a037fc5..0256465 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2148,6 +2148,54 @@ _efl_ui_win_evas_object_smart_hide(Eo *obj, 
Efl_Ui_Win_Data *sd)
      _elm_win_flush_cache_and_exit(obj);
 }
 
+EOLIAN static void
+_efl_ui_win_efl_canvas_pointer_canvas_xy_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd, int *x, int *y)
+{
+   evas_pointer_canvas_xy_get(sd->evas, x, y);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_win_efl_canvas_pointer_inside_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd)
+{
+   return evas_pointer_inside_get(sd->evas);
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_win_efl_canvas_image_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd, int *maxw, int *maxh)
+{
+   return evas_image_max_size_get(sd->evas, maxw, maxh);
+}
+
+EOLIAN static void
+_efl_ui_win_efl_canvas_image_cache_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd, int size)
+{
+   evas_image_cache_set(sd->evas, size);
+}
+
+EOLIAN static int
+_efl_ui_win_efl_canvas_image_cache_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd)
+{
+   return evas_image_cache_get(sd->evas);
+}
+
+EOLIAN static void
+_efl_ui_win_efl_canvas_font_cache_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data 
*sd, int size)
+{
+   evas_font_cache_set(sd->evas, size);
+}
+
+EOLIAN static int
+_efl_ui_win_efl_canvas_font_cache_get(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+{
+   return evas_font_cache_get(sd->evas);
+}
+
+EOLIAN static void
+_efl_ui_win_efl_canvas_smart_objects_calculate(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
+{
+   evas_smart_objects_calculate(sd->evas);
+}
+
 static void
 _elm_win_on_parent_del(void *data,
                        Evas *e EINA_UNUSED,
diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo
index 085d450..3ed902e 100644
--- a/src/lib/elementary/efl_ui_win.eo
+++ b/src/lib/elementary/efl_ui_win.eo
@@ -798,6 +798,14 @@ class Efl.Ui.Win (Elm.Widget, Efl.Canvas, 
Elm.Interface.Atspi.Window,
       Efl.Gfx.Size.Hint.hint_aspect.get;
       Efl.Text.text.set;
       Efl.Text.text.get;
+      Efl.Canvas.pointer_canvas_xy.get;
+      Efl.Canvas.pointer_inside.get;
+      Efl.Canvas.image_max_size.get;
+      Efl.Canvas.image_cache.get;
+      Efl.Canvas.image_cache.set;
+      Efl.Canvas.font_cache.get;
+      Efl.Canvas.font_cache.set;
+      Efl.Canvas.smart_objects_calculate;
    }
    constructors {
       .name;

-- 


Reply via email to