~ubuntu-branches/ubuntu/precise/shotwell/precise-updates

« back to all changes in this revision

Viewing changes to .pc/99git_libraw_api.patch/vapi/libraw.vapi

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-11-25 12:31:19 UTC
  • Revision ID: package-import@ubuntu.com-20111125123119-lfpfor07uow6vrz9
Tags: 0.11.6-0ubuntu2
* debian/patches/99git_libraw_api.patch: cherry-pick changes from git to work
  with libraw 0.14.0.
* debian/patches/05-gomp-linking.patch: we also need to link shotwell against
  GOMP now, apparently, so add -fopenmp to the Makefile's relevant rule.
* debian/shotwell-video-thumbnailer.1: added, it was missing from the previous
  upload and referred to by debian/manpages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2010-2011 Yorba Foundation
 
2
 *
 
3
 * This software is licensed under the GNU Lesser General Public License
 
4
 * (version 2.1 or later).  See the COPYING file in this distribution. 
 
5
 */
 
6
 
 
7
[CCode (cprefix="libraw_", cheader_filename="libraw/libraw.h")]
 
8
namespace LibRaw {
 
9
 
 
10
[CCode (cname="LIBRAW_CHECK_VERSION")]
 
11
public bool check_version(int major, int minor, int patch);
 
12
 
 
13
public unowned string version();
 
14
 
 
15
public unowned string versionNumber();
 
16
 
 
17
[CCode (cname="enum libraw_Filtering", cprefix="LIBRAW_FILTERING_")]
 
18
public enum Filtering {
 
19
    DEFAULT,
 
20
    NOZEROES,
 
21
    NOBLACK,
 
22
    NORAWCURVE,
 
23
    NONE,
 
24
    LIBRAWOWN,
 
25
    AUTOMATIC
 
26
}
 
27
 
 
28
[SimpleType]
 
29
[CCode (cname="libraw_imgother_t")]
 
30
public struct ImageOther {
 
31
    public float iso_speed;
 
32
    public float shutter;
 
33
    public float aperture;
 
34
    public float focal_len;
 
35
    public time_t timestamp;
 
36
    public uint shot_order;
 
37
    public uint gpsdata[32];
 
38
    public char desc[512];
 
39
    public char artist[64];
 
40
}
 
41
 
 
42
[SimpleType]
 
43
[CCode (cname="libraw_iparams_t")]
 
44
public struct ImageParams {
 
45
    public uint raw_count;
 
46
    public uint dng_version;
 
47
    public bool is_foveon;
 
48
    public int colors;
 
49
    public uint filters;
 
50
    
 
51
    private char *make;
 
52
    private char *model;
 
53
    private char *cdesc;
 
54
    
 
55
    public string get_make() {
 
56
        return build_string(make, 64);
 
57
    }
 
58
    
 
59
    public string get_model() {
 
60
        return build_string(model, 64);
 
61
    }
 
62
    
 
63
    public string get_cdesc() {
 
64
        return build_string(cdesc, 5);
 
65
    }
 
66
    
 
67
    private static string build_string(char *array, int len) {
 
68
        GLib.StringBuilder builder = new GLib.StringBuilder();
 
69
        for (int ctr = 0; ctr < len; ctr++) {
 
70
            if (array[ctr] != '\0')
 
71
                builder.append_c(array[ctr]);
 
72
            else
 
73
                break;
 
74
        }
 
75
        
 
76
        return builder.str;
 
77
    }
 
78
}
 
79
 
 
80
[SimpleType]
 
81
[CCode (cname="libraw_image_sizes_t")]
 
82
public struct ImageSizes {
 
83
    public ushort raw_height;
 
84
    public ushort raw_width;
 
85
    public ushort height;
 
86
    public ushort width;
 
87
    public ushort top_margin;
 
88
    public ushort left_margin;
 
89
    public ushort iheight;
 
90
    public ushort iwidth;
 
91
    public double pixel_aspect;
 
92
    public int flip;
 
93
    public ushort right_margin;
 
94
    public ushort bottom_margin;
 
95
}
 
96
 
 
97
[CCode (cname="enum LibRaw_constructor_flags", cprefix="LIBRAW_OPIONS_")]
 
98
public enum Options {
 
99
    [CCode (cname="LIBRAW_OPTIONS_NONE")]
 
100
    NONE,
 
101
    NO_MEMERR_CALLBACK,
 
102
    NO_DATAERR_CALLBACK
 
103
}
 
104
 
 
105
[SimpleType]
 
106
[CCode (cname="libraw_output_params_t")]
 
107
public struct OutputParams {
 
108
    public uint greybox[4];
 
109
    public double aber[4];
 
110
    public double gamm[6];
 
111
    public float user_mul[4];
 
112
    public uint shot_select;
 
113
    public uint multi_out;
 
114
    public float bright;
 
115
    public float threshold;
 
116
    public bool half_size;
 
117
    public bool four_color_rgb;
 
118
    public int document_mode;
 
119
    public int highlight;
 
120
    public bool use_auto_wb;
 
121
    public bool use_camera_wb;
 
122
    public bool use_camera_matrix;
 
123
    public int output_color;
 
124
    public Filtering filtering_mode;
 
125
    public int output_bps;
 
126
    public bool output_tiff;
 
127
    public int user_flip;
 
128
    public int user_qual;
 
129
    public int user_black;
 
130
    public int user_sat;
 
131
    public int med_passes;
 
132
    public bool no_auto_bright;
 
133
    public float auto_bright_thr;
 
134
    public int use_fuji_rotate;
 
135
    
 
136
    public void set_chromatic_aberrations(double red_multiplier, double green_multiplier) {
 
137
        aber[0] = red_multiplier;
 
138
        aber[2] = green_multiplier;
 
139
    }
 
140
    
 
141
    public void set_gamma_curve(double power, double slope) {
 
142
        gamm[0] = power;
 
143
        gamm[1] = slope;
 
144
    }
 
145
}
 
146
 
 
147
[Compact]
 
148
[CCode (cname="libraw_processed_image_t", free_function="free")]
 
149
public class ProcessedImage {
 
150
    public ushort height;
 
151
    public ushort width;
 
152
    public ushort colors;
 
153
    public ushort bits;
 
154
    public uint data_size;
 
155
    [CCode (array_length=false)]
 
156
    public uint8[] data;
 
157
}
 
158
 
 
159
[Compact]
 
160
[CCode (cname="libraw_data_t", cprefix="libraw_", free_function="libraw_close")]
 
161
public class Processor {
 
162
    public OutputParams params;
 
163
    
 
164
    private Progress progress_flags;
 
165
    private Warnings process_warnings;
 
166
    private ImageParams idata;
 
167
    private ImageSizes sizes;
 
168
    private ImageOther other;
 
169
    private Thumbnail thumbnail;
 
170
    
 
171
    [CCode (cname="libraw_init")]
 
172
    public Processor(Options flags = Options.NONE);
 
173
    
 
174
    public void add_masked_borders_to_bitmap();
 
175
    public Result adjust_sizes_info_only();
 
176
    [CCode (cname="libraw_dcraw_document_mode_processing")]
 
177
    public Result document_mode_processing();
 
178
    public unowned ImageOther get_image_other() { return other; }
 
179
    public unowned ImageParams get_image_params() { return idata; }
 
180
    public Progress get_progress_flags() { return progress_flags; }
 
181
    public Warnings get_process_warnings() { return process_warnings; }
 
182
    public unowned ImageSizes get_sizes() { return sizes; }
 
183
    public unowned Thumbnail get_thumbnail() { return thumbnail; }
 
184
    [CCode (cname="libraw_dcraw_make_mem_image")]
 
185
    public ProcessedImage make_mem_image(ref Result result);
 
186
    [CCode (cname="libraw_dcraw_make_mem_thumb")]
 
187
    public ProcessedImage make_mem_thumb(ref Result result);
 
188
    public Result open_buffer(uint8[] buffer);
 
189
    public Result open_file(string filename);
 
190
    [CCode (cname="libraw_dcraw_process")]
 
191
    public Result process();
 
192
    [CCode (cname="libraw_dcraw_ppm_tiff_writer")]
 
193
    public Result ppm_tiff_writer(string outfile);
 
194
    public void recycle();
 
195
    public Result rotate_fuji_raw();
 
196
    [CCode (cname="libraw_dcraw_thumb_writer")]
 
197
    public Result thumb_writer(string outfile);
 
198
    public Result unpack();
 
199
    public Result unpack_thumb();
 
200
}
 
201
 
 
202
[CCode (cname="enum LibRaw_progress", cprefix="LIBRAW_PROGRESS_")]
 
203
public enum Progress {
 
204
   START;
 
205
   
 
206
   [CCode (cname="libraw_strprogress")]
 
207
   public unowned string to_string();
 
208
}
 
209
 
 
210
[CCode (cname="enum LibRaw_errors", cprefix="LIBRAW_")]
 
211
public enum Result {
 
212
    SUCCESS,
 
213
    UNSPECIFIED_ERROR,
 
214
    FILE_UNSUPPORTED,
 
215
    REQUEST_FOR_NONEXISTENT_IMAGE,
 
216
    OUT_OF_ORDER_CALL,
 
217
    NO_THUMBNAIL,
 
218
    UNSUPPORTED_THUMBNAIL,
 
219
    CANNOT_ADDMASK,
 
220
    UNSUFFICIENT_MEMORY,
 
221
    DATA_ERROR,
 
222
    IO_ERROR,
 
223
    CANCELLED_BY_CALLBACK;
 
224
    
 
225
    [CCode (cname="LIBRAW_FATAL_ERROR")]
 
226
    public bool is_fatal_error();
 
227
    
 
228
    [CCode (cname="libraw_strerror")]
 
229
    public unowned string to_string();
 
230
}
 
231
 
 
232
[SimpleType]
 
233
[CCode (cname="libraw_thumbnail_t")]
 
234
public struct Thumbnail {
 
235
    public ThumbnailFormat tformat;
 
236
    public ushort twidth;
 
237
    public ushort theight;
 
238
    public uint tlength;
 
239
    public int tcolors;
 
240
    public int8 *thumb;
 
241
}
 
242
 
 
243
[CCode (cname="enum LibRaw_thumbnail_formats", cprefix="LIBRAW_THUMBNAIL_")]
 
244
public enum ThumbnailFormat {
 
245
    UNKNOWN,
 
246
    JPEG,
 
247
    BITMAP,
 
248
    LAYER,
 
249
    ROLLEI;
 
250
}
 
251
 
 
252
[CCode (cname="enum LibRaw_warnings", cprefix="LIBRAW_WARN_")]
 
253
public enum Warnings {
 
254
   NONE
 
255
}
 
256
 
 
257
}
 
258