diff options
author | Alessio Treglia <alessio@debian.org> | 2011-08-27 10:54:22 +0200 |
---|---|---|
committer | Alessio Treglia <alessio@debian.org> | 2011-08-27 10:54:22 +0200 |
commit | 575d802c4f1a81ebce3b7b71be6dd3a51fddf7bd (patch) | |
tree | f67206af06039627d241d77bc83009505189b7eb /src/jpeglib.vapi | |
parent | 77a9b5bea4c6dc6977e51b002d92d268e57208f3 (diff) | |
parent | 87ebc2af1f0417b3bc38a233e28ff673eff4fa51 (diff) |
Merge commit 'upstream/3.1.5'
Diffstat (limited to 'src/jpeglib.vapi')
-rw-r--r-- | src/jpeglib.vapi | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/jpeglib.vapi b/src/jpeglib.vapi new file mode 100644 index 0000000..3022b5b --- /dev/null +++ b/src/jpeglib.vapi @@ -0,0 +1,57 @@ +[CCode (cheader_filename = "jpeglib.h", cprefix = "jpeg_")] +namespace JPEG { + [CCode (cprefix = "JCS_")] + public enum ColorSpace + { + UNKNOWN, + GRAYSCALE, + RGB, + YCbCr, + CMYK, + YCCK + } + + public ErrorManager std_error (out ErrorManager err); + + [CCode (cname = "struct jpeg_compress_struct", cprefix = "jpeg_", destroy_function = "jpeg_destroy_compress")] + public struct Compress + { + public DestinationManager* dest; + public int image_width; + public int image_height; + public int input_components; + public ColorSpace in_color_space; + public ErrorManager* err; + + public void create_compress (); + public void set_defaults (); + public void start_compress (bool write_all_tables); + public void write_scanlines ([CCode (array_length = false)] uint8*[] scanlines, int num_Lines); + public void finish_compress (); + } + + [CCode (cname = "struct jpeg_error_mgr")] + public struct ErrorManager + { + [CCode (cname = "jpeg_std_error")] + public ErrorManager* std_error (); + } + + [CCode (has_target = false)] + public delegate void InitDestinationFunc (Compress cinfo); + [CCode (has_target = false)] + public delegate bool EmptyOutputBufferFunc (Compress cinfo); + [CCode (has_target = false)] + public delegate void TermDestinationFunc (Compress cinfo); + + [CCode (cname = "struct jpeg_destination_mgr")] + public struct DestinationManager + { + [CCode (array_length = false)] + public unowned uint8[] next_output_byte; + public int free_in_buffer; + public InitDestinationFunc init_destination; + public EmptyOutputBufferFunc empty_output_buffer; + public TermDestinationFunc term_destination; + } +} |