hermet pushed a commit to branch master.

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

commit e09d64959289bb573b6d099393666561c6f3f9af
Author: Doyoun Kang <doyoun.k...@samsung.com>
Date:   Thu May 14 20:54:32 2015 +0900

    ecore-evas: Added support for getting window auxiliary hint ID and value
    
    Summary:
    There are no APIs for getting window auxiliary hint ID and value which was 
set by a user.
    
    Below API can get the ID of the window auxiliary hint.
    - ecore_evas_aux_hint_id_get
    
    Below API can get the value of the window auxiliary hint id.
    - ecore_evas_aux_hint_val_get
    
    Test Plan: N/A
    
    Reviewers: seoz, bryceharrington, ManMower, devilhorns, cedric, raster, 
Hermet
    
    Reviewed By: Hermet
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2493
---
 src/lib/ecore_evas/Ecore_Evas.h | 23 +++++++++++++++++++++++
 src/lib/ecore_evas/ecore_evas.c | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 464c470..22ebe6f 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -836,6 +836,29 @@ EAPI Eina_Bool        ecore_evas_aux_hint_del(Ecore_Evas 
*ee, const int id);
  */
 EAPI Eina_Bool        ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int 
id, const char *val);
 /**
+ * @brief Get a value of the auxiliary hint.
+ *
+ * @param ee The Ecore_Evas
+ * @param id The auxiliary hint ID.
+ * @return The string value of the auxiliary hint ID, or NULL if none exists
+ * @warning Support for this depends on the underlying windowing system.
+ *
+ * @since 1.15
+ */
+EAPI const char      *ecore_evas_aux_hint_val_get(const Ecore_Evas *ee, int 
id);
+/**
+ * @brief Get a ID of the auxiliary hint string.
+ *
+ * @param ee The Ecore_Evas
+ * @param hint The auxiliary hint string.
+ * @return The ID of the auxiliary hint string, or -1 if none exists
+ * @warning Support for this depends on the underlying windowing system.
+ *
+ * @since 1.15
+ */
+EAPI int              ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const 
char *hint);
+
+/**
  * @brief Send message to parent ecore
  *
  * @param ee The Ecore_Evas to set
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index c65ae97..a47c90e 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2324,6 +2324,46 @@ ecore_evas_aux_hint_val_set(Ecore_Evas *ee, const int 
id, const char *val)
    return EINA_TRUE;
 }
 
+EAPI const char *
+ecore_evas_aux_hint_val_get(const Ecore_Evas *ee, int id)
+{
+   if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+                         "ecore_evas_aux_hint_val_get");
+        return NULL;
+     }
+
+   Eina_List *ll;
+   Ecore_Evas_Aux_Hint *aux;
+   EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
+     {
+        if (id == aux->id) return aux->val;
+     }
+
+   return NULL;
+}
+
+EAPI int
+ecore_evas_aux_hint_id_get(const Ecore_Evas *ee, const char *hint)
+{
+   if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+                         "ecore_evas_aux_hint_id_get");
+        return -1;
+     }
+
+   Eina_List *ll;
+   Ecore_Evas_Aux_Hint *aux;
+   EINA_LIST_FOREACH(ee->prop.aux_hint.hints, ll, aux)
+     {
+        if (!strcmp(hint,aux->hint)) return aux->id;
+     }
+
+   return -1;
+}
+
 EAPI void
 ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
 {

-- 


Reply via email to