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) |
Detailed Description
Functions in this group offer a convenient way to receive device status information from lower levels of the system.
Typedef Documentation
This is the type for the device state callback function.
- Parameters:
-
| state | The current state of the device. |
| data | The data that was set with the osso_hw_set_event_cb function. |
Enumeration Type Documentation
- Enumerator:
OSSO_DISPLAY_ON |
|
OSSO_DISPLAY_OFF |
|
OSSO_DISPLAY_DIMMED |
|
Function Documentation
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.
- Parameters:
-
- Returns:
- OSSO_OK if all goes well, OSSO_ERROR if an error occured, and OSSO_INVALID if the context is not valid.
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.
- Parameters:
-
- Returns:
- OSSO_OK if all goes well, OSSO_ERROR if an error occured, and OSSO_INVALID if the context is not valid.
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.
- Parameters:
-
| 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. |
- Returns:
- OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.
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.
- Parameters:
-
| 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. |
- Returns:
- OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.
This function unregisters a device state callback function.
- Parameters:
-
- Returns:
- OSSO_OK if all goes well, OSSO_ERROR if an error occurred, or OSSO_INVALID if some parameter is invalid.