Cheese Overview

CheeseWidget
CheeseEffect
CheeseCameraDeviceMonitor — Simple object to enumerate v4l devices
CheeseAvatarChooser

Cheese uses your webcam to take photos and videos, applies fancy special effects and lets you share the fun with others

Cheese Overview Cheese uses your webcam to take photos and videos, applies fancy special effects and lets you share the fun with others CheeseWidget3 CHEESE Library CheeseWidgetSynopsisstruct CheeseWidgetClass; CheeseWidget; GtkWidget * cheese_widget_new (void); void cheese_widget_get_error (CheeseWidget *widget, GError **error); enum CheeseWidgetState; Object Hierarchy GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkNotebook +----CheeseWidget Implemented Interfaces CheeseWidget implements AtkImplementorIface and GtkBuildable.Properties "state" CheeseWidgetState : Read DescriptionDetailsstruct CheeseWidgetClassCheeseWidgetClassstruct CheeseWidgetClass { GtkNotebookClass parent_class; }; CheeseWidgetCheeseWidgettypedef struct _CheeseWidget CheeseWidget;cheese_widget_new ()cheese_widget_newGtkWidget * 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 CheeseWidget widget.cheese_widget_get_error ()cheese_widget_get_errorvoid 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. widget :a CheeseWidgeterror :return location for the errorenum CheeseWidgetStateCheeseWidgetStatetypedef enum { CHEESE_WIDGET_STATE_NONE, CHEESE_WIDGET_STATE_READY, CHEESE_WIDGET_STATE_ERROR } CheeseWidgetState; Current CheeseWidget state. CHEESE_WIDGET_STATE_NONEDefault state, camera uninitialized CHEESE_WIDGET_STATE_READYThe camera should be ready and the widget should be displaying the preview CHEESE_WIDGET_STATE_ERRORAn error occurred while setting up the camera, check what went wrong with cheese_widget_get_error() Property DetailsThe "state" propertyCheeseWidget:state "state" CheeseWidgetState : Read Current state of the widget. Connect to notify::state signal to get notified about state changes. Useful to update other widgets sensitiveness when the camera is ready or to handle errors if camera setup fails. Default value: CHEESE_WIDGET_STATE_NONECheeseEffect3 CHEESE Library CheeseEffectSynopsisCheeseEffect * cheese_effect_new (void); void cheese_effect_enable_preview (CheeseEffect *self); void cheese_effect_disable_preview (CheeseEffect *self); DescriptionDetailscheese_effect_new ()cheese_effect_newCheeseEffect * cheese_effect_new (void);cheese_effect_enable_preview ()cheese_effect_enable_previewvoid cheese_effect_enable_preview (CheeseEffect *self);cheese_effect_disable_preview ()cheese_effect_disable_previewvoid cheese_effect_disable_preview (CheeseEffect *self);CheeseCameraDeviceMonitor3 CHEESE Library CheeseCameraDeviceMonitorSimple object to enumerate v4l devicesSynopsis #include <cheese/cheese-camera-device-monitor.h> struct CheeseCameraDeviceMonitorClass; struct CheeseCameraDeviceMonitor; CheeseCameraDeviceMonitor * cheese_camera_device_monitor_new (void); void cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor); Object Hierarchy GObject +----CheeseCameraDeviceMonitor Signals "added" : Action "removed" : Action Description CheeseCameraDeviceMonitor provides a basic interface for video4linux device enumeration and hotplugging. It uses either GUdev or some platform specific code to list video devices. It is also capable (right now in linux only, with the udev backend) to monitor device plugging and emit a CheeseCameraDeviceMonitor::added or CheeseCameraDeviceMonitor::removed signal when an event happens. Detailsstruct CheeseCameraDeviceMonitorClassCheeseCameraDeviceMonitorClassstruct CheeseCameraDeviceMonitorClass { GObjectClass parent_class; void (*added)(CheeseCameraDeviceMonitor *camera, const char *id, const char *device_file, const char *product_name, int api_version); void (*removed)(CheeseCameraDeviceMonitor *camera, const char *id); }; struct CheeseCameraDeviceMonitorCheeseCameraDeviceMonitorstruct CheeseCameraDeviceMonitor;cheese_camera_device_monitor_new ()cheese_camera_device_monitor_newCheeseCameraDeviceMonitor * cheese_camera_device_monitor_new (void); Returns a new CheeseCameraDeviceMonitor object. Returns :a new CheeseCameraDeviceMonitor object.cheese_camera_device_monitor_coldplug ()cheese_camera_device_monitor_coldplugvoid cheese_camera_device_monitor_coldplug (CheeseCameraDeviceMonitor *monitor); Will actively look for plugged in cameras and emit ::added for those new cameras. This is only required when your program starts, so as to connect to those signals before they are emitted. monitor :a CheeseCameraDeviceMonitor object.Signal DetailsThe "added" signalCheeseCameraDeviceMonitor::addedvoid user_function (CheeseCameraDeviceMonitor *device, gchar *id, gchar *device, gchar *product_name, gint api_version, gpointer user_data) : Action The ::added signal is emitted when a camera is added, or on start-up after cheese_camera_device_monitor_colplug is called. device :A private object representing the newly added camera.id :Device unique identifier.device :Device file name (e.g. /dev/video2).product_name :Device product name (human readable, intended to be displayed in a UI).api_version :Supported video4linux API: 1 for v4l, 2 for v4l2.user_data :user data set when the signal handler was connected.The "removed" signalCheeseCameraDeviceMonitor::removedvoid user_function (CheeseCameraDeviceMonitor *device, gchar *id, gpointer user_data) : Action The ::removed signal is emitted when a camera is un-plugged, or disabled on the system. device :A private object representing the newly added cameraid :Device unique identifier.user_data :user data set when the signal handler was connected.CheeseAvatarChooser3 CHEESE Library CheeseAvatarChooserSynopsisstruct CheeseAvatarChooserClass; CheeseAvatarChooser; GtkWidget * cheese_avatar_chooser_new (void); GdkPixbuf * cheese_avatar_chooser_get_picture (CheeseAvatarChooser *chooser); Object Hierarchy GObject +----GInitiallyUnowned +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----CheeseAvatarChooser Implemented Interfaces CheeseAvatarChooser implements AtkImplementorIface and GtkBuildable.Properties "pixbuf" GdkPixbuf* : Read DescriptionDetailsstruct CheeseAvatarChooserClassCheeseAvatarChooserClassstruct CheeseAvatarChooserClass { GtkDialogClass parent_class; }; CheeseAvatarChooserCheeseAvatarChoosertypedef struct _CheeseAvatarChooser CheeseAvatarChooser;cheese_avatar_chooser_new ()cheese_avatar_chooser_newGtkWidget * cheese_avatar_chooser_new (void); Returns a new CheeseAvatarChooser dialogue. Returns :a CheeseAvatarChooser widget.cheese_avatar_chooser_get_picture ()cheese_avatar_chooser_get_pictureGdkPixbuf * cheese_avatar_chooser_get_picture (CheeseAvatarChooser *chooser); Returns the portion of image selected through the builtin cropping tool, after a picture has been captured on the webcam. chooser :a CheeseAvatarChooser dialogue.Returns :a GdkPixbuf object, or NULL if no picture has been taken yet.Property DetailsThe "pixbuf" propertyCheeseAvatarChooser:pixbuf "pixbuf" GdkPixbuf* : Read a GdkPixbuf object representing the cropped area of the picture, or NULL.