## CheeseWidget CheeseWidget — A photo/video capture widget |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | cheese_widget_new ()
void | cheese_widget_get_error ()

## Properties

CheeseWidgetState | state | Read

## Types and Values

| CheeseWidget
enum | CheeseWidgetState

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkNotebook
                        ╰── CheeseWidget

## Implemented Interfaces

CheeseWidget implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <cheese/cheese-widget.h>

## Description

CheeseWidget provides a basic photo and video capture widget, for embedding in an application.

## Functions

### cheese_widget_new ()

    GtkWidget *
    cheese_widget_new (void);

Creates a new CheeseWidget. Make sure that you call `cheese_gtk_init()`, and check for errors during initialization, before calling this function.

#### Returns

a new CheeseWidget

### cheese_widget_get_error ()

    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.

#### Parameters

widget | a CheeseWidget |
error | return location for the error |

## Types and Values

### CheeseWidget

    typedef struct _CheeseWidget CheeseWidget;

Use the accessor functions below.

### enum CheeseWidgetState

Current CheeseWidget state.

#### Members

CHEESE_WIDGET_STATE_NONE | Default state, camera uninitialized |
CHEESE_WIDGET_STATE_READY | The camera should be ready and the widget should be displaying the preview |
CHEESE_WIDGET_STATE_ERROR | An error occurred while setting up the camera, check what went wrong with `cheese_widget_get_error()` |

## Property Details

### The `“state”` property

      “state”                    CheeseWidgetState

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.

Flags: Read

Default value: CHEESE_WIDGET_STATE_NONE