forked from enlightenment/efl
elementary: initialize emotion when necessary.
SVN revision: 73180
This commit is contained in:
parent
0f101bb5e3
commit
4f3f2480bb
|
@ -255,3 +255,7 @@
|
|||
|
||||
* Add and use elm_widget_item_widget_get()
|
||||
* Fix elm_segment_control to not abuse user's data from item.
|
||||
|
||||
2012-07-3 Cedric Bail
|
||||
|
||||
* Initialize Emotion when necessary.
|
||||
|
|
|
@ -16,6 +16,7 @@ Additions:
|
|||
* Add elm_map_overlay_del_cb_set API function
|
||||
* Add "changed" signal to the progressbar widgets
|
||||
* Use Edje to enable accessibility on TEXTBLOCK.
|
||||
* Initialize Emotion when necessary.
|
||||
|
||||
Fixes:
|
||||
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
# include <Evil.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_EMOTION
|
||||
# include <Emotion.h>
|
||||
#endif
|
||||
|
||||
#include <Elementary.h>
|
||||
#include "elm_priv.h"
|
||||
|
||||
|
@ -84,6 +88,30 @@ _elm_rescale(void)
|
|||
_elm_ews_wm_rescale(NULL, EINA_FALSE);
|
||||
}
|
||||
|
||||
static Eina_Bool _emotion_inited = EINA_FALSE;
|
||||
|
||||
void
|
||||
_elm_emotion_init(void)
|
||||
{
|
||||
if (_emotion_inited) return ;
|
||||
|
||||
#if HAVE_EMOTION
|
||||
emotion_init();
|
||||
_emotion_inited = EINA_TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
_elm_emotion_shutdown(void)
|
||||
{
|
||||
if (!_emotion_inited) return ;
|
||||
|
||||
#if HAVE_EMOTION
|
||||
emotion_shutdown();
|
||||
_emotion_inited = EINA_FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *app_mainfunc = NULL;
|
||||
static const char *app_domain = NULL;
|
||||
static const char *app_checkfile = NULL;
|
||||
|
@ -523,6 +551,9 @@ elm_quicklaunch_shutdown(void)
|
|||
#ifdef HAVE_ELEMENTARY_EMAP
|
||||
emap_shutdown();
|
||||
#endif
|
||||
#ifdef HAVE_EMOTION
|
||||
_elm_emotion_shutdown();
|
||||
#endif
|
||||
|
||||
ecore_shutdown();
|
||||
eet_shutdown();
|
||||
|
|
|
@ -218,6 +218,9 @@ struct _Elm_Datetime_Module_Data
|
|||
const char *(*field_format_get)(Evas_Object * obj, Elm_Datetime_Field_Type field_type);
|
||||
};
|
||||
|
||||
void _elm_emotion_init(void);
|
||||
void _elm_emotion_shutdown(void);
|
||||
|
||||
int _elm_ews_wm_init(void);
|
||||
void _elm_ews_wm_shutdown(void);
|
||||
void _elm_ews_wm_rescale(Elm_Theme *th, Eina_Bool use_theme);
|
||||
|
|
|
@ -343,6 +343,8 @@ elm_video_add(Evas_Object *parent)
|
|||
e = evas_object_evas_get(parent);
|
||||
if (!e) return NULL;
|
||||
|
||||
_elm_emotion_init();
|
||||
|
||||
obj = evas_object_smart_add(e, _elm_video_smart_class_new());
|
||||
|
||||
if (!elm_widget_sub_object_add(parent, obj))
|
||||
|
|
Loading…
Reference in New Issue