~ubuntu-branches/ubuntu/precise/simple-scan/precise

« back to all changes in this revision

Viewing changes to src/jpeglib.vapi

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-08-22 14:39:00 UTC
  • mto: (44.1.1 oneiric-proposed)
  • mto: This revision was merged to the branch mainline in revision 40.
  • Revision ID: james.westby@ubuntu.com-20110822143900-rh1uyhxyh6b61wqj
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
[CCode (cheader_filename = "jpeglib.h", cprefix = "jpeg_")]
 
2
namespace JPEG {
 
3
    [CCode (cprefix = "JCS_")]
 
4
    public enum ColorSpace
 
5
    {
 
6
        UNKNOWN,
 
7
        GRAYSCALE,
 
8
        RGB,
 
9
        YCbCr,
 
10
        CMYK,
 
11
        YCCK
 
12
    }
 
13
 
 
14
    public ErrorManager std_error (out ErrorManager err);
 
15
 
 
16
    [CCode (cname = "struct jpeg_compress_struct", cprefix = "jpeg_", destroy_function = "jpeg_destroy_compress")]
 
17
    public struct Compress
 
18
    {
 
19
        public DestinationManager* dest;
 
20
        public int image_width;
 
21
        public int image_height;
 
22
        public int input_components;
 
23
        public ColorSpace in_color_space;
 
24
        public ErrorManager* err;
 
25
 
 
26
        public void create_compress ();
 
27
        public void set_defaults ();
 
28
        public void start_compress (bool write_all_tables);
 
29
        public void write_scanlines ([CCode (array_length = false)] uint8*[] scanlines, int num_Lines);
 
30
        public void finish_compress ();
 
31
    }
 
32
 
 
33
    [CCode (cname = "struct jpeg_error_mgr")]
 
34
    public struct ErrorManager
 
35
    {
 
36
        [CCode (cname = "jpeg_std_error")]
 
37
        public ErrorManager* std_error ();
 
38
    }
 
39
 
 
40
    [CCode (has_target = false)]
 
41
    public delegate void InitDestinationFunc (Compress cinfo);
 
42
    [CCode (has_target = false)]
 
43
    public delegate bool EmptyOutputBufferFunc (Compress cinfo);
 
44
    [CCode (has_target = false)]
 
45
    public delegate void TermDestinationFunc (Compress cinfo);
 
46
 
 
47
    [CCode (cname = "struct jpeg_destination_mgr")]
 
48
    public struct DestinationManager
 
49
    {
 
50
        [CCode (array_length = false)]
 
51
        public unowned uint8[] next_output_byte;
 
52
        public int free_in_buffer;
 
53
        public InitDestinationFunc init_destination;
 
54
        public EmptyOutputBufferFunc empty_output_buffer;
 
55
        public TermDestinationFunc term_destination;
 
56
    }
 
57
}