Tizen Native API  4.0
UI Viewmgr

This module provides functionalities about ui_viewmgr.

Functions

int ui_viewmgr_push_view (ui_view *view)
 Pushes a new view into ui_viewmgr. This function is used for when application switches a current view to a new one.
int ui_viewmgr_insert_view_before (ui_view *view, ui_view *before)
 Inserts a view in the ui_viewmgr view list. Specifically, insert a given view right before of the given view, before.
int ui_viewmgr_insert_view_after (ui_view *view, ui_view *after)
 Inserts a view in the ui_viewmgr view list. Specifically, insert a given view right after of the given view, after.
int ui_viewmgr_pop_view (void)
 Pops the top(last) view from the ui_viewmgr view list. This function is used when application switches the current view back to the previous view. The top view will be removed from the view stack and then it will be deleted by ui_viewmgr.
int ui_viewmgr_activate (void)
 Activates this view manager.
int ui_viewmgr_deactivate (void)
 Deactivates this view manager.
Elm_Win * ui_viewmgr_get_window (void)
 Gets a window object of ui_viewmgr.
ui_view * ui_viewmgr_get_last_view (void)
 Returns a last(top) view.
ui_view * ui_viewmgr_get_view_by_idx (int idx)
 Returns a view which is matched with the index idx.
ui_view * ui_viewmgr_get_view_by_name (const char *name)
 Returns a view which is matched with the name.
Eo * ui_viewmgr_get_base (void)
 Gets a base object of a ui_viewmgr.
int ui_viewmgr_get_view_index (const ui_view *view)
 Returns a view index(page) number of the given view. You could use this function to query the given view list order.
int ui_viewmgr_get_view_count (void)
 Returns the number of views which of ui_viewmgr.

Function Documentation

int ui_viewmgr_activate ( void  )

Activates this view manager.

Since :
3.0
Remarks:
ui_viewmgr window and views will be shown once this function is called. Usually this should be called after applications set their all views on initialization time.
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESSAlready activated
UI_VIEWMGR_ERROR_NOT_PERMITTEDCan't be activated. (ie, view manager has zero views.)
See also:
ui_viewmgr_deactivate()
int ui_viewmgr_deactivate ( void  )

Deactivates this view manager.

Since :
3.0
Remarks:
ui_viewmgr window and views will be hidden once this function is called. this behavior is up ui system, but usually it hides(unmap) current window in order that application go background.
Returns:
0 on success, otherwise a negative error value.
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESSAlready deactivated
See also:
ui_viewmgr_activate()
Eo* ui_viewmgr_get_base ( void  )

Gets a base object of a ui_viewmgr.

Since :
3.0
Remarks:
Normally, a base object can be used for adding additional objects.
Returns:
The base object of ui_viewmgr
ui_view* ui_viewmgr_get_last_view ( void  )

Returns a last(top) view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Returns:
The view which is last view of the ui_viewmgr view list. NULL on error
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_NOT_PERMITTEDviewmgr has no view
See also:
get_last_result()
ui_view* ui_viewmgr_get_view_by_idx ( int  idx)

Returns a view which is matched with the index idx.

Since :
3.0
Remarks:
You could use the index as the page numbers of the views. the index number of views are variable since the view list is variable. The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]idxA index of the view which you are looking for
Returns:
The view which index is matched with idx If there were no views with index idx, NULL will be returned
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERWrong index
See also:
ui_viewmgr_get_view_index()
ui_viewmgr_get_view_count()
get_last_result()
ui_view* ui_viewmgr_get_view_by_name ( const char *  name)

Returns a view which is matched with the name.

Since :
3.0
Remarks:
Every view have their names as their own identifiers. The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]nameThe name of the view which you are looking for
Returns:
The view which name is matched with name If there were no views name matched, NULL will be returned
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERname is NULL, otherwise there is no matched name
See also:
ui_view_create()
ui_standard_view_create()
get_last_result()
int ui_viewmgr_get_view_count ( void  )

Returns the number of views which of ui_viewmgr.

Since :
3.0
Returns:
The count of views
int ui_viewmgr_get_view_index ( const ui_view *  view)

Returns a view index(page) number of the given view. You could use this function to query the given view list order.

Since :
3.0
Remarks:
The index number of views are variable since the view list is variable
Parameters:
[in]viewAn ui_view to query the index.
Returns:
An index of the given view on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is not valid
Elm_Win* ui_viewmgr_get_window ( void  )

Gets a window object of ui_viewmgr.

Since :
3.0
Returns:
The window object of ui_viewmgr
int ui_viewmgr_insert_view_after ( ui_view *  view,
ui_view *  after 
)

Inserts a view in the ui_viewmgr view list. Specifically, insert a given view right after of the given view, after.

Since :
3.0
Parameters:
[in]viewAn ui_view to insert in the ui_viewmgr view list
[in]afterAn ui_view that will be just inserted before the view. If you pass NULL, view will be inserted at the end of the view list
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_NOT_PERMITTEDview was already inserted
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is not valid
See also:
ui_viewmgr_insert_view_before()
int ui_viewmgr_insert_view_before ( ui_view *  view,
ui_view *  before 
)

Inserts a view in the ui_viewmgr view list. Specifically, insert a given view right before of the given view, before.

Since :
3.0
Parameters:
[in]viewAn ui_view to insert in the ui_viewmgr view list
[in]beforeAn ui_view that will be just inserted after view. If you pass NULL, view will be inserted at the front of the view list
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_NOT_PERMITTEDview was already inserted
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is not valid
See also:
ui_viewmgr_insert_view_after()
int ui_viewmgr_pop_view ( void  )

Pops the top(last) view from the ui_viewmgr view list. This function is used when application switches the current view back to the previous view. The top view will be removed from the view stack and then it will be deleted by ui_viewmgr.

Since :
3.0
Remarks:
If the view is just one left, then ui_viewmgr would be deactivated automatically since the ui application might be invalid anymore. Otherwise, the application will be terminated. It's up to system configuration.
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_NOT_PERMITTEDNo more views to pop
UI_VIEWMGR_ERROR_ALREADY_IN_PROGRESSOn a certain profile, it may not allow to pop multiple views at the same time
See also:
ui_viewmgr_deactivate()
ui_viewmgr_push_view()
int ui_viewmgr_push_view ( ui_view *  view)

Pushes a new view into ui_viewmgr. This function is used for when application switches a current view to a new one.

Normally, the current view will be hidden by a new view. In default, when user calls this API, view will be switched to view instantly, only when ui_viewmgr state is activated. Otherwise, the view will be shown later when ui_viewmgr is activated. ui_viewmgr_view_push() is designed for providing view transition effect. If you want push view instantly without any transition, you could use ui_viewmgr_view_push_insert_before() or ui_viewmgr_view_push_insert_after(). If you want to pop the current view, the please use ui_viewmgr_view_pop().

Since :
3.0
Parameters:
[in]viewAn ui_view to insert in the ui_viewmgr view list
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is not valid
UI_VIEWMGR_ERROR_NOT_PERMITTEDview was already inserted
See also:
ui_viewmgr_activate()
ui_viewmgr_insert_view_before()
ui_viewmgr_insert_view_after()
ui_viewmgr_pop_view()