summaryrefslogtreecommitdiff
path: root/vapi
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:37 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:37 +0200
commitbb80d3feebdc9acc52e3f4ad24084d8425f043a2 (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /vapi
parentb26ff0798252a1a8072dd2c7a67f6205de9fde11 (diff)
parent31804433d72460cbe0a39f9f8ea5e76058d84cda (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'vapi')
-rw-r--r--vapi/libexif.vapi14
-rw-r--r--vapi/libgphoto2.vapi29
-rw-r--r--vapi/libwebp.vapi5
-rw-r--r--vapi/libwebpdemux.vapi43
-rw-r--r--vapi/shotwell-gphoto-helper.h (renamed from vapi/gphoto.h)0
-rw-r--r--vapi/version.vapi2
6 files changed, 86 insertions, 7 deletions
diff --git a/vapi/libexif.vapi b/vapi/libexif.vapi
index b95dfb0..25e1a6b 100644
--- a/vapi/libexif.vapi
+++ b/vapi/libexif.vapi
@@ -63,7 +63,11 @@ namespace Exif {
public static void set_slong(uchar *buffer, ByteOrder byteOrder, int32 val);
}
- [CCode (cheader_filename="libexif/exif-content.h", has_target=false)]
+ [CCode (
+ cheader_filename="libexif/exif-content.h",
+ has_target=false,
+ cname="ExifContentForeachEntryFunc"
+ )]
public delegate void ForeachEntryFunc(Entry e, void *user);
[Compact]
@@ -92,12 +96,16 @@ namespace Exif {
public void set_data_type(DataType data_type);
// length is Exif.IFD_COUNT
- public Content[] ifd;
+ public Content ifd[Exif.IFD_COUNT];
public uchar *data;
public uint size;
}
- [CCode (cheader_filename="libexif/exif-data.h", has_target=false)]
+ [CCode (
+ cheader_filename="libexif/exif-data.h",
+ has_target=false,
+ cname="ExifDataForeachContentFunc"
+ )]
public delegate void ForeachContentFunc(Content c, void *user);
[CCode (
diff --git a/vapi/libgphoto2.vapi b/vapi/libgphoto2.vapi
index 34fc1c4..67cb209 100644
--- a/vapi/libgphoto2.vapi
+++ b/vapi/libgphoto2.vapi
@@ -53,7 +53,7 @@ namespace GPhoto {
ref_function="GPHOTO_REF_CAMERA",
unref_function="gp_camera_unref",
free_function="gp_camera_free",
- cheader_filename="gphoto2/gphoto2-camera.h,gphoto.h"
+ cheader_filename="gphoto2/gphoto2-camera.h,shotwell-gphoto-helper.h"
)]
public class Camera {
[CCode (cname="gp_camera_new")]
@@ -99,7 +99,7 @@ namespace GPhoto {
ref_function="GPHOTO_REF_FILE",
unref_function="gp_file_unref",
free_function="gp_file_free",
- cheader_filename="gphoto2/gphoto2-file.h,gphoto.h"
+ cheader_filename="gphoto2/gphoto2-file.h,shotwell-gphoto-helper.h"
)]
public class CameraFile {
[CCode (cname="gp_file_new")]
@@ -253,7 +253,7 @@ namespace GPhoto {
ref_function="GPHOTO_REF_LIST",
unref_function="gp_list_unref",
free_function="gp_list_free",
- cheader_filename="gphoto2/gphoto2-list.h,gphoto.h"
+ cheader_filename="gphoto2/gphoto2-list.h,shotwell-gphoto-helper.h"
)]
public class CameraList {
[CCode (cname="gp_list_new")]
@@ -325,7 +325,7 @@ namespace GPhoto {
[CCode (
ref_function="GPHOTO_REF_CONTEXT",
unref_function="gp_context_unref",
- cheader_filename="gphoto2/gphoto2-context.h,gphoto.h"
+ cheader_filename="gphoto2/gphoto2-context.h,shotwell-gphoto-helper.h"
)]
public class Context {
[CCode (cname="gp_context_new")]
@@ -340,19 +340,40 @@ namespace GPhoto {
public void set_message_func([CCode (delegate_target_pos=3.1)] ContextMessageFunc messageFunc);
}
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextIdleFunc(Context context);
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextErrorFunc(Context context, string text);
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextStatusFunc(Context context, string text);
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextMessageFunc(Context context, string text);
// TODO: Support for va_args in Vala, esp. for delegates?
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate uint ContextProgressStartFunc(Context context, float target, string text);
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextProgressUpdateFunc(Context context, uint id, float current);
+ [CCode (
+ cheader_filename="gphoto2/gphoto2-context.h"
+ )]
public delegate void ContextProgressStopFunc(Context context, uint id);
[CCode (
diff --git a/vapi/libwebp.vapi b/vapi/libwebp.vapi
new file mode 100644
index 0000000..534dd2c
--- /dev/null
+++ b/vapi/libwebp.vapi
@@ -0,0 +1,5 @@
+[CCode (cheader_filename = "webp/decode.h")]
+namespace WebP {
+ [CCode (array_length = false, cname="WebPDecodeRGBA")]
+ public static uint8[] DecodeRGBA([CCode (array_length_pos=1.1)]uint8[] data, out int width, out int height);
+}
diff --git a/vapi/libwebpdemux.vapi b/vapi/libwebpdemux.vapi
new file mode 100644
index 0000000..7612b42
--- /dev/null
+++ b/vapi/libwebpdemux.vapi
@@ -0,0 +1,43 @@
+namespace WebP {
+ [CCode (has_type_id = false)]
+ public struct Data {
+ [CCode (array_length_cname = "size")]
+ public unowned uint8[] bytes;
+
+ public size_t size;
+
+ [CCode (cname = "WebPDataClear")]
+ public void clear();
+ }
+
+ [CCode (cprefix = "WEBP_DEMUX_", cname = "WebPDemuxState")]
+ public enum ParsingState {
+ PARSE_ERROR,
+ PARSING_HEADER,
+ PARSED_HEADER,
+ DONE
+ }
+
+ [CCode (cprefix = "WEBP_FF_")]
+ public enum FormatFeature {
+ FORMAT_FLAGS,
+ CANVAS_WIDTH,
+ CANVAS_HEIGHT,
+ LOOP_COUNT,
+ BACKGROUND_COLOR,
+ FRAME_COUNT
+ }
+
+ [Compact]
+ [CCode (free_function = "WebPDemuxDelete", cname = "WebPDemuxer", cheader_filename = "webp/demux.h", has_type_id = false)]
+ public class Demuxer {
+ [CCode (cname="WebPDemux")]
+ public Demuxer(Data data);
+
+ [CCode (cname="WebPDemuxPartial")]
+ public Demuxer.partial(Data data, out ParsingState state);
+
+ [CCode (cname="WebPDemuxGetI")]
+ public uint32 get(FormatFeature feature);
+ }
+}
diff --git a/vapi/gphoto.h b/vapi/shotwell-gphoto-helper.h
index 6b2447e..6b2447e 100644
--- a/vapi/gphoto.h
+++ b/vapi/shotwell-gphoto-helper.h
diff --git a/vapi/version.vapi b/vapi/version.vapi
index e191f2f..b4744c1 100644
--- a/vapi/version.vapi
+++ b/vapi/version.vapi
@@ -12,3 +12,5 @@ public const string _LIB;
public const string _LIBEXECDIR;
[CCode (cheader_filename = "config.h")]
public const string _LANG_SUPPORT_DIR;
+[CCode (cheader_filename = "config.h")]
+public const string _PIXBUF_LOADER_PATH;