/*******************************************************************************
* This file was generated by UI Builder.
* User should hand edit this file.
********************************************************************************/

#include "app_main.h"
#include "uib_app_manager.h"
#include "uib_views.h"
#include "uib_views_inc.h"

/**
 * @brief the user clicked the button (press/release).
 *
 * @param vc - A context of the generated view.
 * @param obj - A UI component itself that emits the event signal.
 * @param event_info - Information about the event signal. The default value is NULL.
 * 		event_info is NULL
 *
 */
//void user_view_button_onclicked(uib_view_context *vc, Evas_Object *obj, void *event_info) {
//	//Switch to view1
//    uib_util_push_view("view1");
//}


/**
 * @brief When the user view is shown, this function will be call
 *
 * @param win_obj - A window object which contains elementary window, bg, conformant naviframe(built-in view manager), and etc. 
 * @param vc - A context of the generated view.
 *
 */
void uib_uview_${user_view_name}_create_cb(window_obj* win_obj, uib_view_context* vc) {
	/* initialize elm_win rotation. */

	if (elm_win_wm_rotation_supported_get(win_obj->win)) {
		int rots[4] = { 0, 90, 180, 270 };
		elm_win_wm_rotation_available_rotations_set(win_obj->win, (const int *)(&rots), 4);
	}
	/* initialize indicator of elm_win. */
	elm_win_indicator_mode_set(win_obj->win, ELM_WIN_INDICATOR_SHOW);
	elm_win_indicator_opacity_set(win_obj->win, ELM_WIN_INDICATOR_OPAQUE);

  // TODO: User-define codes
  /* // Example of hand coding
     // * Please connect the top-level UI component of the a view based by your EFL code to the parent Evas_Object provided by UI Builder View System.
	Evas_Object* button = elm_button_add(vc->parent);
	if (button) {
		evas_object_size_hint_align_set(button, -1.0, -1.0);
		evas_object_size_hint_weight_set(button, 1.0, 1.0);
		elm_object_text_set(button,_UIB_LOCALE("<align=center>Hello Tizen User View1</align>"));
		elm_object_style_set(button,"dropdown");
		evas_object_show(button);
	}

	// evas_object_smart_callback_add(button, "clicked", (Evas_Smart_Cb)user_view_button_onclicked, vc); // Add event handler

	// * Please assign the top-level UI component of view based by your EFL code to the root UI component of the UI Builder View System. 
	vc->root_container = button;
	*/
}