Tizen Native API
4.0
|
The Display API provides functions to control the display status.
#include <device/display.h>
#include <device/callback.h>
The Display API provides the way to get supported display count and the display brightness. It also supports the API to set the display brightness. Application can receive the display event by callback function from the system.
Functions | |
int | device_display_get_numbers (int *device_number) |
Gets the number of display devices. | |
int | device_display_get_max_brightness (int display_index, int *max_brightness) |
Gets the maximum brightness value that can be set. | |
int | device_display_get_brightness (int display_index, int *brightness) |
Gets the display brightness value. | |
int | device_display_set_brightness (int display_index, int brightness) |
Sets the display brightness value. | |
int | device_display_get_state (display_state_e *state) |
Gets the current display state. | |
int | device_display_change_state (display_state_e state) TIZEN_DEPRECATED_API |
Changes the display state by force. |
enum display_state_e |
int device_display_change_state | ( | display_state_e | state | ) |
Changes the display state by force.
[in] | state | The display state |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_PERMISSION_DENIED | Permission denied |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |
... result = device_display_change_state(DISPLAY_STATE_SCREEN_OFF); if (result < 0) dlog_print(DLOG_ERROR, LOG_TAG, "[ERROR] return value result =%d, \n",result); else dlog_print(DLOG_DEBUG, LOG_TAG, "[SUCCESS] return value result =%d \n",result); ...
int device_display_get_brightness | ( | int | display_index, |
int * | brightness | ||
) |
Gets the display brightness value.
[in] | display_index | The index of the display It can be greater than or equal to 0 and less than the number of displays returned by device_display_get_numbers(). The index zero is always assigned to the main display |
[out] | brightness | The current brightness value of the display |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_PERMISSION_DENIED | Permission denied |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |
int device_display_get_max_brightness | ( | int | display_index, |
int * | max_brightness | ||
) |
Gets the maximum brightness value that can be set.
[in] | display_index | The index of the display It can be greater than or equal to 0 and less than the number of displays returned by device_display_get_numbers(). The index zero is always assigned to the main display |
[out] | max_brightness | The maximum brightness value of the display |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_PERMISSION_DENIED | Permission denied |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |
int device_display_get_numbers | ( | int * | device_number | ) |
Gets the number of display devices.
[out] | device_number | The total number of displays |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_PERMISSION_DENIED | Permission denied |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |
int device_display_get_state | ( | display_state_e * | state | ) |
Gets the current display state.
[out] | state | The display state |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |
int device_display_set_brightness | ( | int | display_index, |
int | brightness | ||
) |
Sets the display brightness value.
[in] | display_index | The index of the display It can be greater than or equal to 0 and less than the number of displays returned by device_display_get_numbers(). The index zero is always assigned to the main display |
[in] | brightness | The new brightness value to set The maximum value can be represented by device_display_get_max_brightness() |
0
on success, otherwise a negative error value DEVICE_ERROR_NONE | Successful |
DEVICE_ERROR_INVALID_PARAMETER | Invalid parameter |
DEVICE_ERROR_PERMISSION_DENIED | Permission denied |
DEVICE_ERROR_OPERATION_FAILED | Operation failed |