From d443a3c2509889533ca812c163056bace396b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 14 Jun 2023 20:35:58 +0200 Subject: New upstream version 0.32.1 --- vapi/gphoto.h | 18 ------------------ vapi/libexif.vapi | 14 +++++++++++--- vapi/libgphoto2.vapi | 29 +++++++++++++++++++++++++---- vapi/libwebp.vapi | 5 +++++ vapi/libwebpdemux.vapi | 43 +++++++++++++++++++++++++++++++++++++++++++ vapi/shotwell-gphoto-helper.h | 18 ++++++++++++++++++ vapi/version.vapi | 2 ++ 7 files changed, 104 insertions(+), 25 deletions(-) delete mode 100644 vapi/gphoto.h create mode 100644 vapi/libwebp.vapi create mode 100644 vapi/libwebpdemux.vapi create mode 100644 vapi/shotwell-gphoto-helper.h (limited to 'vapi') diff --git a/vapi/gphoto.h b/vapi/gphoto.h deleted file mode 100644 index 6b2447e..0000000 --- a/vapi/gphoto.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright 2016 Software Freedom Conservancy Inc. - * - * This software is licensed under the GNU LGPL (version 2.1 or later). - * See the COPYING file in this distribution. - */ - -#ifndef GPHOTO_H -#define GPHOTO_H - -#define GPHOTO_REF_CAMERA(c) (gp_camera_ref(c) == GP_OK ? c : NULL) - -#define GPHOTO_REF_FILE(c) (gp_file_ref(c) == GP_OK ? c : NULL) - -#define GPHOTO_REF_LIST(c) (gp_list_ref(c) == GP_OK ? c : NULL) - -#define GPHOTO_REF_CONTEXT(c) (gp_context_ref(c) == GP_OK ? c : NULL) - -#endif /* GPHOTO_H */ 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/shotwell-gphoto-helper.h b/vapi/shotwell-gphoto-helper.h new file mode 100644 index 0000000..6b2447e --- /dev/null +++ b/vapi/shotwell-gphoto-helper.h @@ -0,0 +1,18 @@ +/* Copyright 2016 Software Freedom Conservancy Inc. + * + * This software is licensed under the GNU LGPL (version 2.1 or later). + * See the COPYING file in this distribution. + */ + +#ifndef GPHOTO_H +#define GPHOTO_H + +#define GPHOTO_REF_CAMERA(c) (gp_camera_ref(c) == GP_OK ? c : NULL) + +#define GPHOTO_REF_FILE(c) (gp_file_ref(c) == GP_OK ? c : NULL) + +#define GPHOTO_REF_LIST(c) (gp_list_ref(c) == GP_OK ? c : NULL) + +#define GPHOTO_REF_CONTEXT(c) (gp_context_ref(c) == GP_OK ? c : NULL) + +#endif /* GPHOTO_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; -- cgit v1.2.3