Tizen Native API  5.5
Display

The Display API provides functions to control display.

Required Header

#include <camera.h>

Overview

The Display API allows you to manage display for the camera. This API provides you with functions that set and get various display properties :

  • rotation
  • display visibility
  • display mode

Related Features

This API is related with the following features:

It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.

Functions

int camera_set_display_rotation (camera_h camera, camera_rotation_e rotation)
 Sets the display rotation.
int camera_get_display_rotation (camera_h camera, camera_rotation_e *rotation)
 Gets the display rotation.
int camera_set_display_flip (camera_h camera, camera_flip_e flip)
 Sets the display flip.
int camera_get_display_flip (camera_h camera, camera_flip_e *flip)
 Gets the display flip.
int camera_set_display_visible (camera_h camera, bool visible)
 Sets the visible property for display.
int camera_is_display_visible (camera_h camera, bool *visible)
 Gets the visible property of display.
int camera_set_display_mode (camera_h camera, camera_display_mode_e mode)
 Sets the display mode.
int camera_get_display_mode (camera_h camera, camera_display_mode_e *mode)
 Gets the display mode.

Enumeration Type Documentation

Enumeration for the camera display mode.

Since :
2.3
Enumerator:
CAMERA_DISPLAY_MODE_LETTER_BOX 

Letter box

CAMERA_DISPLAY_MODE_ORIGIN_SIZE 

Origin size

CAMERA_DISPLAY_MODE_FULL 

Full screen

CAMERA_DISPLAY_MODE_CROPPED_FULL 

Cropped full screen

CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX 

Original size or letter box (Since 3.0)

CAMERA_DISPLAY_MODE_CUSTOM_ROI 

Custom ROI (Since 3.0)


Function Documentation

int camera_get_display_flip ( camera_h  camera,
camera_flip_e flip 
)

Gets the display flip.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[out]flipThe display flip
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_set_display_flip()

Gets the display mode.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[out]modeThe display mode
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_set_display_mode()
int camera_get_display_rotation ( camera_h  camera,
camera_rotation_e rotation 
)

Gets the display rotation.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[out]rotationThe display rotation
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_set_display_rotation()
int camera_is_display_visible ( camera_h  camera,
bool *  visible 
)

Gets the visible property of display.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[out]visibletrue if camera display is visible, otherwise false
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_set_display_visible()
int camera_set_display_flip ( camera_h  camera,
camera_flip_e  flip 
)

Sets the display flip.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[in]flipThe display flip
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_INVALID_STATEInvalid state
CAMERA_ERROR_INVALID_OPERATIONDisplay type is incorrect
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_get_display_flip()

Sets the display mode.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[in]modeThe display mode
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_get_display_mode()
int camera_set_display_rotation ( camera_h  camera,
camera_rotation_e  rotation 
)

Sets the display rotation.

Since :
2.3
Remarks:
This function should be called before previewing (see camera_start_preview())
Parameters:
[in]cameraThe handle to the camera
[in]rotationThe display rotation
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_INVALID_STATEInvalid state
CAMERA_ERROR_INVALID_OPERATIONDisplay type is incorrect
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_start_preview()
camera_get_display_rotation()
int camera_set_display_visible ( camera_h  camera,
bool  visible 
)

Sets the visible property for display.

Since :
2.3
Parameters:
[in]cameraThe handle to the camera
[in]visibleThe display visibility property
Returns:
0 on success, otherwise a negative error value
Return values:
CAMERA_ERROR_NONESuccessful
CAMERA_ERROR_INVALID_PARAMETERInvalid parameter
CAMERA_ERROR_PERMISSION_DENIEDThe access to the resources can not be granted
CAMERA_ERROR_NOT_SUPPORTEDThe feature is not supported
CAMERA_ERROR_SERVICE_DISCONNECTEDThe socket to multimedia server is disconnected
See also:
camera_is_display_visible()