| Cheese Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#include <cheese/cheese-widget.h>
CheeseWidget;
GtkWidget * cheese_widget_new (void);
void cheese_widget_get_error (CheeseWidget *widget,
GError **error);
enum CheeseWidgetState;
GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkNotebook +----CheeseWidget
CheeseWidget provides a basic photo and video capture widget, for embedding in an application.
GtkWidget * cheese_widget_new (void);
Creates a new CheeseWidget. Make sure that you call gtk_clutter_init() and
clutter_gst_init(), and check for errors during initialization, before
calling this function.
Returns : |
a new CheeseWidget |
void cheese_widget_get_error (CheeseWidget *widget,GError **error);
Listen for notify::state signals and call this when the current state is
CHEESE_WIDGET_STATE_ERROR.
The returned GError will contain more details on what went wrong.
|
a CheeseWidget |
|
return location for the error |
typedef enum {
CHEESE_WIDGET_STATE_NONE,
CHEESE_WIDGET_STATE_READY,
CHEESE_WIDGET_STATE_ERROR
} CheeseWidgetState;
Current CheeseWidget state.
| Default state, camera uninitialized | |
| The camera should be ready and the widget should be displaying the preview | |
An error occurred while setting up the camera, check what went wrong with cheese_widget_get_error()
|
"state" property"state" CheeseWidgetState : Read
Current state of the widget.
Connect to notify::state signal to get notified about state changes. Useful to update other widgets sensitivities when the camera is ready or to handle errors if camera setup fails.
Default value: CHEESE_WIDGET_STATE_NONE