Data Structures | |
struct | osso_hw_state_t |
Typedefs | |
typedef void( | osso_hw_cb_f )(osso_hw_state_t *state, gpointer data) |
typedef void( | osso_display_event_cb_f )(osso_display_state_t state, gpointer data) |
Enumerations | |
enum | osso_display_state_t { OSSO_DISPLAY_ON, OSSO_DISPLAY_OFF, OSSO_DISPLAY_DIMMED } |
Functions | |
osso_return_t | osso_display_state_on (osso_context_t *osso) |
osso_return_t | osso_display_blanking_pause (osso_context_t *osso) |
osso_return_t | osso_hw_set_event_cb (osso_context_t *osso, osso_hw_state_t *state, osso_hw_cb_f *cb, gpointer data) |
osso_return_t | osso_hw_unset_event_cb (osso_context_t *osso, osso_hw_state_t *state) |
osso_return_t | osso_hw_set_display_event_cb (osso_context_t *osso, osso_display_event_cb_f *cb, gpointer data) |
typedef void( osso_display_event_cb_f)(osso_display_state_t state, gpointer data) |
typedef void( osso_hw_cb_f)(osso_hw_state_t *state, gpointer data) |
This is the type for the device state callback function.
state | The current state of the device. | |
data | The data that was set with the osso_hw_set_event_cb function. |
enum osso_display_state_t |
osso_return_t osso_display_blanking_pause | ( | osso_context_t * | osso | ) |
Request not to blank the display. This function must be called again within 60 seconds to renew the request. The function is used, for example, by the video player during video playback. Also prevents suspending the device.
osso | The library context as returned by osso_initialize. |
osso_return_t osso_display_state_on | ( | osso_context_t * | osso | ) |
Request to turn on the display as if the user had pressed a key or the touch screen. This can be used after completing a long operation such as downloading a large file or after retrieving e-mails.
osso | The library context as returned by osso_initialize. |
osso_return_t osso_hw_set_display_event_cb | ( | osso_context_t * | osso, | |
osso_display_event_cb_f * | cb, | |||
gpointer | data | |||
) |
This function registers a callback that is called whenever the display state is changed. It is also called once directly after registering it, to tell about the current state.
osso | The library context as returned by osso_initialize. | |
cb | Function that is called when the display state is changed. | |
data | Arbitrary application-specific pointer that will be passed to the callback and ignored by Libosso. |
osso_return_t osso_hw_set_event_cb | ( | osso_context_t * | osso, | |
osso_hw_state_t * | state, | |||
osso_hw_cb_f * | cb, | |||
gpointer | data | |||
) |
This function registers a callback function that is called whenever the state of the device changes. The first call to this function will also check the current state of the device, and if the state is available, the corresponding callback function will be called immediately.
osso | The library context as returned by osso_initialize. | |
state | The states the application is interested in. NULL can be passed here to indicate that all signals are of interest. | |
cb | The callback function. | |
data | Arbitrary application specific pointer that will be passed to the callback and ignored by Libosso. |
osso_return_t osso_hw_unset_event_cb | ( | osso_context_t * | osso, | |
osso_hw_state_t * | state | |||
) |
This function unregisters a device state callback function.
osso | The library context as returned by osso_initialize. | |
state | The states specified when osso_hw_set_event_cb was called. |