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
This commit is contained in:
Doyoun Kang 2015-05-14 20:54:32 +09:00 committed by ChunEon Park
parent 490bfc9f5c
commit e09d649592
2 changed files with 63 additions and 0 deletions

View File

@ -835,6 +835,29 @@ EAPI Eina_Bool ecore_evas_aux_hint_del(Ecore_Evas *ee, const int id);
* @since 1.10.0
*/
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
*

View File

@ -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)
{