summaryrefslogtreecommitdiff
path: root/vapi
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-09-03 13:16:51 +0200
committerAlexander Larsson <alexl@redhat.com>2012-09-03 13:16:51 +0200
commita803054a057b4c481a30eaabd78eba9732da1421 (patch)
tree0852078ccb13a8dfa3c05061d4b92d046218bfd0 /vapi
parent0ff693d586dd3af6f3f4a8098f734f0b9d466894 (diff)
downloadgnome-contacts-a803054a057b4c481a30eaabd78eba9732da1421.tar.gz
Use cheese APIs rather than direct gstreamer to take avatar photo
This uses the currently private cheese_widget_get_camera public call, which is slated to be made public: https://bugzilla.gnome.org/show_bug.cgi?id=683259 I did this after verifying that this is ok with David King.
Diffstat (limited to 'vapi')
-rw-r--r--vapi/custom.vapi40
1 files changed, 39 insertions, 1 deletions
diff --git a/vapi/custom.vapi b/vapi/custom.vapi
index 467284c..9a9fefb 100644
--- a/vapi/custom.vapi
+++ b/vapi/custom.vapi
@@ -64,8 +64,46 @@ namespace Um {
}
}
-[CCode (cprefix = "Cheese", lower_case_cprefix = "cheese_", cheader_filename = "cheese-flash.h")]
+[CCode (cprefix = "Cheese", lower_case_cprefix = "cheese_", cheader_filename = "cheese/cheese-gtk.h")]
namespace Cheese {
+ public static void gtk_init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv);
+ [CCode (cheader_filename = "cheese/cheese-camera-device.h")]
+ public class CameraDevice : GLib.Object {
+ [CCode (has_construct_function = false, type = "CheeseCameraDevice*")]
+ public CameraDevice (string uuid, string device_node, string name, uint v4l_api_version) throws GLib.Error;
+ }
+ [CCode (cheader_filename = "cheese/cheese-camera-device-monitor.h")]
+ public class CameraDeviceMonitor : GLib.Object {
+ [CCode (has_construct_function = false, type = "CheeseCameraDeviceMonitor*")]
+ public CameraDeviceMonitor ();
+ public void coldplug ();
+ public signal void added (CameraDevice device);
+ public signal void removed (string uuid);
+ }
+ [CCode (cheader_filename = "cheese/cheese-avatar-chooser.h")]
+ public class AvatarChooser : Gtk.Dialog {
+ [CCode (has_construct_function = false, type = "CheeseAvatarChooser*")]
+ public AvatarChooser ();
+ public Gdk.Pixbuf get_picture ();
+ }
+ public enum WidgetState {
+ NONE,
+ READY,
+ ERROR
+ }
+ [CCode (cheader_filename = "cheese/cheese-widget.h")]
+ public class Widget : Gtk.Widget {
+ [CCode (has_construct_function = false, type = "CheeseWidget*")]
+ public Widget ();
+ public WidgetState state { get; }
+ public unowned GLib.Object get_camera ();
+ }
+ [CCode (cheader_filename = "cheese/cheese-camera.h")]
+ public class Camera : GLib.Object {
+ public bool take_photo_pixbuf ();
+ public signal void photo_taken (Gdk.Pixbuf pixbuf);
+ }
+ [CCode (cheader_filename = "cheese-flash.h")]
public class Flash : Gtk.Window {
[CCode (has_construct_function = false, type = "CheeseFlash*")]
public Flash ();