xartigas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=368db272fd0bfdc2215ea19ac0ce3b62fc9fd177

commit 368db272fd0bfdc2215ea19ac0ce3b62fc9fd177
Author: Xavi Artigas <[email protected]>
Date:   Mon Oct 28 16:05:08 2019 +0100

    docs: Improve documentation on cache-related classes
    
    Also, code comments and typos.
---
 src/lib/efl/interfaces/efl_cached_item.eo    | 17 ++++++++++++++---
 src/lib/elementary/efl_ui_caching_factory.c  |  4 ++--
 src/lib/elementary/efl_ui_caching_factory.eo |  7 ++++---
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/lib/efl/interfaces/efl_cached_item.eo 
b/src/lib/efl/interfaces/efl_cached_item.eo
index 533d0faa49..427f75972e 100644
--- a/src/lib/efl/interfaces/efl_cached_item.eo
+++ b/src/lib/efl/interfaces/efl_cached_item.eo
@@ -1,13 +1,24 @@
 interface @beta Efl.Cached.Item
 {
-   [[Efl Cached Item interface]]
+   [[Interface for objects which can be cached in memory.
+
+     Since memory is a limited resource, it is interesting to know how much of 
it an object
+     requires. This interface provides a read-only property for objects to 
report their
+     memory consumption.
+
+     Keep in mind that this should not only take into account by the object 
structure
+     itself, but any dynamic memory it might allocate.
+
+     This is used by @Efl.Ui.Caching_Factory, for example, to keep track of 
the total
+     amount of memory used by the objects the factory creates.
+   ]]
    methods {
       @property memory_size {
-         [[The memory size associated with an object.]]
+         [[The amount of memory currently used by this object.]]
          get {
          }
          values {
-            consumed: uint; [[Bytes of memory consumed by this object.]]
+            consumed: uint; [[Bytes of memory.]]
          }
       }
    }
diff --git a/src/lib/elementary/efl_ui_caching_factory.c 
b/src/lib/elementary/efl_ui_caching_factory.c
index 5c714d99b8..1ec9bd19c3 100644
--- a/src/lib/elementary/efl_ui_caching_factory.c
+++ b/src/lib/elementary/efl_ui_caching_factory.c
@@ -438,8 +438,8 @@ _efl_ui_caching_factory_pause(void *data, const Efl_Event 
*event EINA_UNUSED)
    Efl_Ui_Caching_Factory_Data *pd = data;
    Efl_Gfx_Entity *entity;
 
-   // Application is going into background, let's free ressource
-   // Possible improvement would be to delay that by a few second.
+   // Application is going into background, let's free resources.
+   // Possible improvement would be to delay that by a few seconds.
    EINA_LIST_FREE(pd->cache, entity)
      efl_del(entity);
 
diff --git a/src/lib/elementary/efl_ui_caching_factory.eo 
b/src/lib/elementary/efl_ui_caching_factory.eo
index 9907da7e05..e3a6c6b7b7 100644
--- a/src/lib/elementary/efl_ui_caching_factory.eo
+++ b/src/lib/elementary/efl_ui_caching_factory.eo
@@ -1,3 +1,5 @@
+parse efl_app;
+
 class @beta Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory
 {
    [[Efl UI Factory that provides object caching.
@@ -6,14 +8,13 @@ class @beta Efl.Ui.Caching_Factory extends 
Efl.Ui.Widget_Factory
      defined.
      This factory will rely on its parent class @Efl.Ui.Widget_Factory for 
creating the subset of class that match the
      @Efl.Ui.Widget interface.
-     The factory will automatically empties the cache when the application 
goes into pause.
+     The factory will automatically empty the cache when the application goes 
into the background
+     (@[Efl.App.pause] event).
 
      Creating objects is costly and time consuming, keeping a few on hand for 
when you next will need them helps a lot.
      This is what this factory caching infrastructure provides. It will create 
the object from the class defined on it
      and set the parent and the model as needed for all created items. The 
View has to release the Item using the
      release function of the Factory interface for all of this to work 
properly.
-
-     The cache might decide to flush itself when the application event pause 
is triggered.
    ]]
    methods {
       @property memory_limit {

-- 


Reply via email to