Remove appdata structure
[apps/native/sample/sample-core-components.git] / rule / project / src / view.c.tccr
index abdcee0..f250ac0 100644 (file)
 |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| }
 
 /*
@@ -222,19 +224,14 @@ Evas_Object *view_create_layout_for_part(Evas_Object *parent, char *part, char *
 
 |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| }
 
 /*