wrapped more Theme List functions with new Einaxx::List interface

SVN revision: 79402
This commit is contained in:
Andreas Volz 2012-11-16 21:54:41 +00:00
parent ac63ca43e8
commit 11c1ed3663
2 changed files with 39 additions and 31 deletions

View File

@ -8,6 +8,9 @@
#include <Elementary.h>
/* ELFxx */
#include "einaxx/Einaxx.h"
/* local */
#include "Object.h"
namespace Elmxx {
@ -49,6 +52,17 @@ public:
* @ingroup Theme
*/
void delOverlay(const std::string& item);
/**
* Get the list of registered overlays for the given theme
*
* @return List of theme overlays. Do not free it.
*
* @see elm_theme_overlay_add()
*
* @ingroup Theme
*/
Eflxx::CountedPtr <Einaxx::List<Theme*> > getOverlayList ();
/**
* Appends a theme extension to the list of extensions.
@ -83,6 +97,17 @@ public:
*/
void delExtension (const std::string& item);
/**
* Get the list of registered extensions for the given theme
*
* @return List of theme extensions. Do not free it.
*
* @see addExtension()
*
* @ingroup Theme
*/
Eflxx::CountedPtr <Einaxx::List<Theme*> > getExtensionList ();
/**
* Set the theme search order for the given theme
*
@ -209,33 +234,6 @@ EAPI void elm_theme_ref_set(Elm_Theme *th, Elm_Theme *thref);
EAPI Elm_Theme *elm_theme_ref_get(Elm_Theme *th);
/**
* Get the list of registered overlays for the given theme
*
* @param th The theme from which to get the overlays
* @return List of theme overlays. Do not free it.
*
* @see elm_theme_overlay_add()
*
* @ingroup Theme
*/
EAPI const Eina_List *elm_theme_overlay_list_get(const Elm_Theme *th);
/**
* Get the list of registered extensions for the given theme
*
* @param th The theme from which to get the extensions
* @return List of theme extensions. Do not free it.
*
* @see elm_theme_extension_add()
*
* @ingroup Theme
*/
EAPI const Eina_List *elm_theme_extension_list_get(const Elm_Theme *th);
/**
* Return a list of theme elements to be used in a theme.
*
@ -259,10 +257,6 @@ EAPI const Eina_List *elm_theme_extension_list_get(const Elm_Theme *th);
*/
EAPI const Eina_List *elm_theme_list_get(const Elm_Theme *th);
/**
* Return a list of theme elements in the theme search path
*

View File

@ -43,6 +43,13 @@ void Theme::delOverlay(const std::string& item)
elm_theme_overlay_del(mTheme, item.c_str());
}
Eflxx::CountedPtr <Einaxx::List<Theme*> > Theme::getOverlayList ()
{
Eina_List *list = const_cast <Eina_List*> (elm_theme_overlay_list_get(mTheme));
return Eflxx::CountedPtr <Einaxx::List<Theme*> > (Einaxx::List<Theme*>::wrap (list));
}
void Theme::addExtension (const std::string& item)
{
elm_theme_extension_add(mTheme, item.c_str());
@ -53,6 +60,13 @@ void Theme::delExtension (const std::string& item)
elm_theme_extension_del(mTheme, item.c_str());
}
Eflxx::CountedPtr <Einaxx::List<Theme*> > Theme::getExtensionList ()
{
Eina_List *list = const_cast <Eina_List*> (elm_theme_extension_list_get(mTheme));
return Eflxx::CountedPtr <Einaxx::List<Theme*> > (Einaxx::List<Theme*>::wrap (list));
}
void Theme::setTheme (const std::string &theme)
{
elm_theme_set(mTheme, theme.c_str());