/*
* Create a view
*/
-extern void view_create(appdata_s *ad);
+extern void view_create(void);
extern Evas_Object *view_create_win(const char *pkg_name);
extern Evas_Object *view_create_conformant_without_indicator(Evas_Object *win);
extern Evas_Object *view_create_layout(Evas_Object *parent, const char *edj_path, const char *group_name, Eext_Event_Cb cb_function, void *user_data);
/*
* Create a view
*/
-|R| extern void view_create(appdata_s *ad);
+|R| extern void view_create(void);
extern Evas_Object *view_create_win(const char *pkg_name);
extern Evas_Object *view_create_conformant_without_indicator(Evas_Object *win);
extern Evas_Object *view_create_layout(Evas_Object *parent, const char *edj_path, const char *group_name, Eext_Event_Cb cb_function, void *user_data);
/*
* @brief: Create Essential Object window, conformant and layout
- * @param[ad]: Structure has some important information for managing this application
*/
void view_create(void)
{
/*
* @brief: Make a basic window named package
- * @param[package]: Name of the window
+ * @param[pkg_name]: Name of the window
*/
Evas_Object *view_create_win(const char *pkg_name)
{
*/
void view_destroy(void *user_data)
{
- appdata_s *ad = NULL;
-
- ad = user_data;
- if (ad == NULL) {
- dlog_print(DLOG_ERROR, LOG_TAG, "failed to destroy data.");
+ if (s_info.win == NULL) {
return;
}
|R| * limitations under the License.
|R| */
+|R| static struct view_info {
+|R| Evas_Object *win;
+|R| Evas_Object *conform;
+|R| { s_info = {
+|R| .win = NULL,
+|R| .conform = NULL,
+|R| };
+
|R| /*
|R| * @brief: Create Essential Object window, conformant and layout
-|R| * @param[ad]: Structure has some important information for managing this application
|R| */
-|R| void view_create(appdata_s *ad)
+|R| void view_create(void)
|R| {
-|R| if (ad == NULL) {
-|R| dlog_print(DLOG_ERROR, LOG_TAG, "appdata is NULL.");
-|R| return;
-|R| }
-
|R| /* Create window */
-|R| ad->win = view_create_win(PACKAGE);
-|R| if (ad->win == NULL) {
+|R| s_info.win = view_create_win(PACKAGE);
+|R| if (s_info.win == NULL) {
|R| dlog_print(DLOG_ERROR, LOG_TAG, "failed to create a window.");
|R| return;
|R| }
|R| /* Create conformant */
-|R| ad->conform = view_create_conformant_without_indicator(ad->win);
-|R| if (ad->conform == NULL) {
+|R| s_info.conform = view_create_conformant_without_indicator(s_info.win);
+|R| if (s_info.conform == NULL) {
|R| dlog_print(DLOG_ERROR, LOG_TAG, "failed to create a conformant");
|R| return;
|R| }
|R| /* Show window after main view is set up */
-|R| evas_object_show(ad->win);
+|R| evas_object_show(s_info.win);
|R| }
/*
|R| /*
|R| * @brief: Destroy window and free important data to finish this application
-|R| * @param[user_data]: Structure has informations for managing this application
|R| */
-|R| void view_destroy(void *user_data)
+|R| void view_destroy(void)
|R| {
-|R| appdata_s *ad = NULL;
-
-|R| ad = user_data;
-|R| if (ad == NULL) {
-|R| dlog_print(DLOG_ERROR, LOG_TAG, "failed to destroy data.");
+|R| if (s_info.win == NULL) {
|R| return;
|R| }
-|R| evas_object_del(ad->win);
+|R| evas_object_del(s_info.win);
|R| }
/*