libharu_sys/
lib.rs

1#![allow(non_snake_case, non_camel_case_types, dead_code)]
2
3extern crate libc;
4
5pub type   HPDF_INT = libc::c_int;
6pub type   HPDF_UINT = libc::c_uint;
7
8
9/*  32bit integer types
10 */
11pub type   HPDF_INT32 = libc::int32_t;
12pub type   HPDF_UINT32 = libc::uint32_t;
13
14
15/*  16bit integer types
16 */
17pub type   HPDF_INT16 = libc::int16_t;
18pub type   HPDF_UINT16 = libc::uint16_t;
19
20
21/*  8bit integer types
22 */
23pub type   HPDF_INT8 = libc::c_schar;
24pub type   HPDF_UINT8 = libc::c_uchar;
25
26
27/*  8bit binary types
28 */
29pub type   HPDF_BYTE = libc::c_uchar;
30
31
32/*  float type (32bit IEEE754)
33 */
34pub type   HPDF_REAL = libc::c_float;
35
36
37/*  double type (64bit IEEE754)
38 */
39pub type   HPDF_DOUBLE = libc::c_double;
40
41
42/*  boolean type (0: False, !0: True)
43 */
44pub type   HPDF_BOOL = libc::c_int;
45
46
47/*  error-no type (32bit unsigned integer)
48 */
49pub type   HPDF_STATUS = libc::uint32_t;
50
51
52/*  charactor-code type (16bit)
53 */
54type  HPDF_CID      = HPDF_UINT16;
55type  HPDF_UNICODE  = HPDF_UINT16;
56
57/*  HPDF_Point struct
58 */
59#[repr(C)]
60#[derive(Copy, Clone)]
61pub struct  HPDF_Point {
62    pub x: HPDF_REAL,
63    pub y: HPDF_REAL,
64} 
65
66#[repr(C)]
67#[derive(Copy, Clone)]
68pub struct HPDF_Rect {
69    pub left: HPDF_REAL,
70    pub bottom: HPDF_REAL,
71    pub right: HPDF_REAL,
72    pub top: HPDF_REAL,
73} 
74
75/*  HPDF_Point3D struct
76*/
77#[repr(C)]
78pub struct  HPDF_Point3D {
79	pub x: HPDF_REAL,
80	pub y: HPDF_REAL,
81	pub z: HPDF_REAL,
82}
83
84type HPDF_Box = HPDF_Rect;
85
86/* HPDF_Date struct
87*/ 
88#[repr(C)]
89pub struct  HPDF_Date {
90   pub year:        HPDF_INT,
91   pub month:       HPDF_INT,
92   pub day:         HPDF_INT,
93   pub hour:        HPDF_INT,
94   pub minutes:     HPDF_INT,
95   pub seconds:     HPDF_INT,
96   pub ind:         libc::c_char,
97   pub off_hour:    HPDF_INT,
98   pub off_minutes: HPDF_INT,
99} 
100
101#[repr(C)]
102pub enum HPDF_InfoType {
103    /* date-time type parameters */
104    HPDF_INFO_CREATION_DATE = 0,
105    HPDF_INFO_MOD_DATE,
106
107    /* string type parameters */
108    HPDF_INFO_AUTHOR,
109    HPDF_INFO_CREATOR,
110    HPDF_INFO_PRODUCER,
111    HPDF_INFO_TITLE,
112    HPDF_INFO_SUBJECT,
113    HPDF_INFO_KEYWORDS,
114    HPDF_INFO_TRAPPED,
115    HPDF_INFO_GTS_PDFX,
116    HPDF_INFO_EOF
117}
118
119/* PDF-A Types */
120
121#[repr(C)]
122pub enum HPDF_PDFA_TYPE
123{
124    HPDF_PDFA_1A = 0,
125    HPDF_PDFA_1B = 1
126} 
127
128
129#[repr(C)]
130pub enum _HPDF_PdfVer {
131    HPDF_VER_12 = 0,
132    HPDF_VER_13,
133    HPDF_VER_14,
134    HPDF_VER_15,
135    HPDF_VER_16,
136    HPDF_VER_17,
137    HPDF_VER_EOF
138} 
139
140#[repr(C)]
141pub enum  HPDF_EncryptMode {
142    HPDF_ENCRYPT_R2    = 2,
143    HPDF_ENCRYPT_R3    = 3
144}
145
146
147//Constants
148
149/*----------------------------------------------------------------------------*/
150
151pub const  HPDF_TRUE      :  i32 =          1;
152pub const  HPDF_FALSE     :  i32 =          0;
153 
154pub const  HPDF_OK        :  u8 =          0;
155pub const  HPDF_NOERROR   :  u8 =          0;
156
157/*----- default values -------------------------------------------------------*/
158
159/* buffer size which is required when we convert to character string. */
160pub const HPDF_TMP_BUF_SIZ       : u16 =     512;
161pub const HPDF_SHORT_BUF_SIZ     : u16 =     32;
162pub const HPDF_REAL_LEN          : u16 =     11;
163pub const HPDF_INT_LEN           : u16 =     11;
164pub const HPDF_TEXT_DEFAULT_LEN  : u16 =     256;
165pub const HPDF_UNICODE_HEADER_LEN: u16 =     2;
166pub const HPDF_DATE_TIME_STR_LEN : u16 =     23;
167
168/* length of each item defined in PDF */
169pub const HPDF_BYTE_OFFSET_LEN : u8 =       10;
170pub const HPDF_OBJ_ID_LEN      : u8 =       7;
171pub const HPDF_GEN_NO_LEN      : u8 =       5;
172
173/* default value of Graphic State */
174//#define HPDF_DEF_FONT               "Helvetica"
175//#define HPDF_DEF_PAGE_LAYOUT        HPDF_PAGE_LAYOUT_SINGLE
176//#define HPDF_DEF_PAGE_MODE          HPDF_PAGE_MODE_USE_NONE
177//#define HPDF_DEF_WORDSPACE          0
178//#define HPDF_DEF_CHARSPACE          0
179//#define HPDF_DEF_FONTSIZE           10
180//#define HPDF_DEF_HSCALING           100
181//#define HPDF_DEF_LEADING            0
182//#define HPDF_DEF_RENDERING_MODE     HPDF_FILL
183//#define HPDF_DEF_RISE               0
184//#define HPDF_DEF_RAISE              HPDF_DEF_RISE
185//#define HPDF_DEF_LINEWIDTH          1
186//#define HPDF_DEF_LINECAP            HPDF_BUTT_END
187//#define HPDF_DEF_LINEJOIN           HPDF_MITER_JOIN
188pub const HPDF_DEF_MITERLIMIT:u8      =   10;
189//#define HPDF_DEF_FLATNESS           1
190//#define HPDF_DEF_PAGE_NUM           1
191//
192//#define HPDF_BS_DEF_WIDTH           1
193//
194///* defalt page-size */
195//#define HPDF_DEF_PAGE_WIDTH         595.276F
196//#define HPDF_DEF_PAGE_HEIGHT        841.89F
197//
198///*---------------------------------------------------------------------------*/
199///*----- compression mode ----------------------------------------------------*/
200//
201pub const  HPDF_COMP_NONE     : u32 =       0x00;
202pub const  HPDF_COMP_TEXT     : u32 =       0x01;
203pub const  HPDF_COMP_IMAGE    : u32 =       0x02;
204pub const  HPDF_COMP_METADATA : u32 =       0x04;
205pub const  HPDF_COMP_ALL      : u32 =       0x0F;
206///* #define  HPDF_COMP_BEST_COMPRESS   0x10
207// * #define  HPDF_COMP_BEST_SPEED      0x20
208// */
209pub const  HPDF_COMP_MASK     : u32 =       0xFF;
210//
211//
212///*----------------------------------------------------------------------------*/
213///*----- permission flags (only Revision 2 is supported)-----------------------*/
214//
215pub const HPDF_ENABLE_READ      : u32 =  0;
216pub const HPDF_ENABLE_PRINT     : u32 =  4;
217pub const HPDF_ENABLE_EDIT_ALL  : u32 =  8;
218pub const HPDF_ENABLE_COPY      : u32 =  16;
219pub const HPDF_ENABLE_EDIT      : u32 =  32;
220//
221//
222///*----------------------------------------------------------------------------*/
223///*------ viewer preferences definitions --------------------------------------*/
224//
225//#define HPDF_HIDE_TOOLBAR    1
226//#define HPDF_HIDE_MENUBAR    2
227//#define HPDF_HIDE_WINDOW_UI  4
228//#define HPDF_FIT_WINDOW      8
229//#define HPDF_CENTER_WINDOW   16
230//#define HPDF_PRINT_SCALING_NONE   32
231//
232//
233///*---------------------------------------------------------------------------*/
234///*------ limitation of object implementation (PDF1.4) -----------------------*/
235//
236//#define HPDF_LIMIT_MAX_INT             2147483647
237//#define HPDF_LIMIT_MIN_INT             -2147483647
238//
239//#define HPDF_LIMIT_MAX_REAL             3.4E38f // per PDF 1.7 spec, Annex C, old value  32767
240//#define HPDF_LIMIT_MIN_REAL            -3.4E38f // per PDF 1.7 spec, Annex C, old value -32767
241//
242//#define HPDF_LIMIT_MAX_STRING_LEN      2147483646 // per PDF 1.7 spec, limit 32767 is for strings in content stream and no limit in other cases => open the limit to max Integer, old value 65535
243//#define HPDF_LIMIT_MAX_NAME_LEN        127
244//
245//#define HPDF_LIMIT_MAX_ARRAY           8388607  // per PDF 1.7 spec, "Maximum number of indirect objects in a PDF file" is 8388607, old value 8191
246//#define HPDF_LIMIT_MAX_DICT_ELEMENT    8388607  // per PDF 1.7 spec, "Maximum number of indirect objects in a PDF file" is 8388607, old value 4095
247//#define HPDF_LIMIT_MAX_XREF_ELEMENT    8388607
248//#define HPDF_LIMIT_MAX_GSTATE          28
249//#define HPDF_LIMIT_MAX_DEVICE_N        8
250//#define HPDF_LIMIT_MAX_DEVICE_N_V15    32
251//#define HPDF_LIMIT_MAX_CID             65535
252//#define HPDF_MAX_GENERATION_NUM        65535
253//
254//#define HPDF_MIN_PAGE_HEIGHT           3
255//#define HPDF_MIN_PAGE_WIDTH            3
256//#define HPDF_MAX_PAGE_HEIGHT           14400
257//#define HPDF_MAX_PAGE_WIDTH            14400
258//#define HPDF_MIN_MAGNIFICATION_FACTOR  8
259//#define HPDF_MAX_MAGNIFICATION_FACTOR  3200
260//
261///*---------------------------------------------------------------------------*/
262///*------ limitation of various properties -----------------------------------*/
263//
264//#define HPDF_MIN_PAGE_SIZE          3
265//#define HPDF_MAX_PAGE_SIZE          14400
266//#define HPDF_MIN_HORIZONTALSCALING  10
267//#define HPDF_MAX_HORIZONTALSCALING  300
268//#define HPDF_MIN_WORDSPACE          -30
269//#define HPDF_MAX_WORDSPACE          300
270//#define HPDF_MIN_CHARSPACE          -30
271//#define HPDF_MAX_CHARSPACE          300
272//#define HPDF_MAX_FONTSIZE           600
273//#define HPDF_MAX_ZOOMSIZE           10
274//#define HPDF_MAX_LEADING            300
275//#define HPDF_MAX_LINEWIDTH          100
276//#define HPDF_MAX_DASH_PATTERN       100
277//
278//#define HPDF_MAX_JWW_NUM            128
279//
280///*----------------------------------------------------------------------------*/
281///*----- country code definition ----------------------------------------------*/
282//
283//#define HPDF_COUNTRY_AF  "AF"    /* AFGHANISTAN */
284//#define HPDF_COUNTRY_AL  "AL"    /* ALBANIA */
285//#define HPDF_COUNTRY_DZ  "DZ"    /* ALGERIA */
286//#define HPDF_COUNTRY_AS  "AS"    /* AMERICAN SAMOA */
287//#define HPDF_COUNTRY_AD  "AD"    /* ANDORRA */
288//#define HPDF_COUNTRY_AO  "AO"    /* ANGOLA */
289//#define HPDF_COUNTRY_AI  "AI"    /* ANGUILLA */
290//#define HPDF_COUNTRY_AQ  "AQ"    /* ANTARCTICA */
291//#define HPDF_COUNTRY_AG  "AG"    /* ANTIGUA AND BARBUDA */
292//#define HPDF_COUNTRY_AR  "AR"    /* ARGENTINA */
293//#define HPDF_COUNTRY_AM  "AM"    /* ARMENIA */
294//#define HPDF_COUNTRY_AW  "AW"    /* ARUBA */
295//#define HPDF_COUNTRY_AU  "AU"    /* AUSTRALIA */
296//#define HPDF_COUNTRY_AT  "AT"    /* AUSTRIA */
297//#define HPDF_COUNTRY_AZ  "AZ"    /* AZERBAIJAN */
298//#define HPDF_COUNTRY_BS  "BS"    /* BAHAMAS */
299//#define HPDF_COUNTRY_BH  "BH"    /* BAHRAIN */
300//#define HPDF_COUNTRY_BD  "BD"    /* BANGLADESH */
301//#define HPDF_COUNTRY_BB  "BB"    /* BARBADOS */
302//#define HPDF_COUNTRY_BY  "BY"    /* BELARUS */
303//#define HPDF_COUNTRY_BE  "BE"    /* BELGIUM */
304//#define HPDF_COUNTRY_BZ  "BZ"    /* BELIZE */
305//#define HPDF_COUNTRY_BJ  "BJ"    /* BENIN */
306//#define HPDF_COUNTRY_BM  "BM"    /* BERMUDA */
307//#define HPDF_COUNTRY_BT  "BT"    /* BHUTAN */
308//#define HPDF_COUNTRY_BO  "BO"    /* BOLIVIA */
309//#define HPDF_COUNTRY_BA  "BA"    /* BOSNIA AND HERZEGOWINA */
310//#define HPDF_COUNTRY_BW  "BW"    /* BOTSWANA */
311//#define HPDF_COUNTRY_BV  "BV"    /* BOUVET ISLAND */
312//#define HPDF_COUNTRY_BR  "BR"    /* BRAZIL */
313//#define HPDF_COUNTRY_IO  "IO"    /* BRITISH INDIAN OCEAN TERRITORY */
314//#define HPDF_COUNTRY_BN  "BN"    /* BRUNEI DARUSSALAM */
315//#define HPDF_COUNTRY_BG  "BG"    /* BULGARIA */
316//#define HPDF_COUNTRY_BF  "BF"    /* BURKINA FASO */
317//#define HPDF_COUNTRY_BI  "BI"    /* BURUNDI */
318//#define HPDF_COUNTRY_KH  "KH"    /* CAMBODIA */
319//#define HPDF_COUNTRY_CM  "CM"    /* CAMEROON */
320//#define HPDF_COUNTRY_CA  "CA"    /* CANADA */
321//#define HPDF_COUNTRY_CV  "CV"    /* CAPE VERDE */
322//#define HPDF_COUNTRY_KY  "KY"    /* CAYMAN ISLANDS */
323//#define HPDF_COUNTRY_CF  "CF"    /* CENTRAL AFRICAN REPUBLIC */
324//#define HPDF_COUNTRY_TD  "TD"    /* CHAD */
325//#define HPDF_COUNTRY_CL  "CL"    /* CHILE */
326//#define HPDF_COUNTRY_CN  "CN"    /* CHINA */
327//#define HPDF_COUNTRY_CX  "CX"    /* CHRISTMAS ISLAND */
328//#define HPDF_COUNTRY_CC  "CC"    /* COCOS (KEELING) ISLANDS */
329//#define HPDF_COUNTRY_CO  "CO"    /* COLOMBIA */
330//#define HPDF_COUNTRY_KM  "KM"    /* COMOROS */
331//#define HPDF_COUNTRY_CG  "CG"    /* CONGO */
332//#define HPDF_COUNTRY_CK  "CK"    /* COOK ISLANDS */
333//#define HPDF_COUNTRY_CR  "CR"    /* COSTA RICA */
334//#define HPDF_COUNTRY_CI  "CI"    /* COTE D'IVOIRE */
335//#define HPDF_COUNTRY_HR  "HR"    /* CROATIA (local name: Hrvatska) */
336//#define HPDF_COUNTRY_CU  "CU"    /* CUBA */
337//#define HPDF_COUNTRY_CY  "CY"    /* CYPRUS */
338//#define HPDF_COUNTRY_CZ  "CZ"    /* CZECH REPUBLIC */
339//#define HPDF_COUNTRY_DK  "DK"    /* DENMARK */
340//#define HPDF_COUNTRY_DJ  "DJ"    /* DJIBOUTI */
341//#define HPDF_COUNTRY_DM  "DM"    /* DOMINICA */
342//#define HPDF_COUNTRY_DO  "DO"    /* DOMINICAN REPUBLIC */
343//#define HPDF_COUNTRY_TP  "TP"    /* EAST TIMOR */
344//#define HPDF_COUNTRY_EC  "EC"    /* ECUADOR */
345//#define HPDF_COUNTRY_EG  "EG"    /* EGYPT */
346//#define HPDF_COUNTRY_SV  "SV"    /* EL SALVADOR */
347//#define HPDF_COUNTRY_GQ  "GQ"    /* EQUATORIAL GUINEA */
348//#define HPDF_COUNTRY_ER  "ER"    /* ERITREA */
349//#define HPDF_COUNTRY_EE  "EE"    /* ESTONIA */
350//#define HPDF_COUNTRY_ET  "ET"    /* ETHIOPIA */
351//#define HPDF_COUNTRY_FK  "FK"   /* FALKLAND ISLANDS (MALVINAS) */
352//#define HPDF_COUNTRY_FO  "FO"    /* FAROE ISLANDS */
353//#define HPDF_COUNTRY_FJ  "FJ"    /* FIJI */
354//#define HPDF_COUNTRY_FI  "FI"    /* FINLAND */
355//#define HPDF_COUNTRY_FR  "FR"    /* FRANCE */
356//#define HPDF_COUNTRY_FX  "FX"    /* FRANCE, METROPOLITAN */
357//#define HPDF_COUNTRY_GF  "GF"    /* FRENCH GUIANA */
358//#define HPDF_COUNTRY_PF  "PF"    /* FRENCH POLYNESIA */
359//#define HPDF_COUNTRY_TF  "TF"    /* FRENCH SOUTHERN TERRITORIES */
360//#define HPDF_COUNTRY_GA  "GA"    /* GABON */
361//#define HPDF_COUNTRY_GM  "GM"    /* GAMBIA */
362//#define HPDF_COUNTRY_GE  "GE"    /* GEORGIA */
363//#define HPDF_COUNTRY_DE  "DE"    /* GERMANY */
364//#define HPDF_COUNTRY_GH  "GH"    /* GHANA */
365//#define HPDF_COUNTRY_GI  "GI"    /* GIBRALTAR */
366//#define HPDF_COUNTRY_GR  "GR"    /* GREECE */
367//#define HPDF_COUNTRY_GL  "GL"    /* GREENLAND */
368//#define HPDF_COUNTRY_GD  "GD"    /* GRENADA */
369//#define HPDF_COUNTRY_GP  "GP"    /* GUADELOUPE */
370//#define HPDF_COUNTRY_GU  "GU"    /* GUAM */
371//#define HPDF_COUNTRY_GT  "GT"    /* GUATEMALA */
372//#define HPDF_COUNTRY_GN  "GN"    /* GUINEA */
373//#define HPDF_COUNTRY_GW  "GW"    /* GUINEA-BISSAU */
374//#define HPDF_COUNTRY_GY  "GY"    /* GUYANA */
375//#define HPDF_COUNTRY_HT  "HT"    /* HAITI */
376//#define HPDF_COUNTRY_HM  "HM"    /* HEARD AND MC DONALD ISLANDS */
377//#define HPDF_COUNTRY_HN  "HN"    /* HONDURAS */
378//#define HPDF_COUNTRY_HK  "HK"    /* HONG KONG */
379//#define HPDF_COUNTRY_HU  "HU"    /* HUNGARY */
380//#define HPDF_COUNTRY_IS  "IS"    /* ICELAND */
381//#define HPDF_COUNTRY_IN  "IN"    /* INDIA */
382//#define HPDF_COUNTRY_ID  "ID"    /* INDONESIA */
383//#define HPDF_COUNTRY_IR  "IR"    /* IRAN (ISLAMIC REPUBLIC OF) */
384//#define HPDF_COUNTRY_IQ  "IQ"    /* IRAQ */
385//#define HPDF_COUNTRY_IE  "IE"    /* IRELAND */
386//#define HPDF_COUNTRY_IL  "IL"    /* ISRAEL */
387//#define HPDF_COUNTRY_IT  "IT"    /* ITALY */
388//#define HPDF_COUNTRY_JM  "JM"    /* JAMAICA */
389//#define HPDF_COUNTRY_JP  "JP"    /* JAPAN */
390//#define HPDF_COUNTRY_JO  "JO"    /* JORDAN */
391//#define HPDF_COUNTRY_KZ  "KZ"    /* KAZAKHSTAN */
392//#define HPDF_COUNTRY_KE  "KE"    /* KENYA */
393//#define HPDF_COUNTRY_KI  "KI"    /* KIRIBATI */
394//#define HPDF_COUNTRY_KP  "KP"    /* KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF */
395//#define HPDF_COUNTRY_KR  "KR"    /* KOREA, REPUBLIC OF */
396//#define HPDF_COUNTRY_KW  "KW"    /* KUWAIT */
397//#define HPDF_COUNTRY_KG  "KG"    /* KYRGYZSTAN */
398//#define HPDF_COUNTRY_LA  "LA"    /* LAO PEOPLE'S DEMOCRATIC REPUBLIC */
399//#define HPDF_COUNTRY_LV  "LV"    /* LATVIA */
400//#define HPDF_COUNTRY_LB  "LB"    /* LEBANON */
401//#define HPDF_COUNTRY_LS  "LS"    /* LESOTHO */
402//#define HPDF_COUNTRY_LR  "LR"    /* LIBERIA */
403//#define HPDF_COUNTRY_LY  "LY"    /* LIBYAN ARAB JAMAHIRIYA */
404//#define HPDF_COUNTRY_LI  "LI"    /* LIECHTENSTEIN */
405//#define HPDF_COUNTRY_LT  "LT"    /* LITHUANIA */
406//#define HPDF_COUNTRY_LU  "LU"    /* LUXEMBOURG */
407//#define HPDF_COUNTRY_MO  "MO"    /* MACAU */
408//#define HPDF_COUNTRY_MK  "MK"   /* MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF */
409//#define HPDF_COUNTRY_MG  "MG"    /* MADAGASCAR */
410//#define HPDF_COUNTRY_MW  "MW"    /* MALAWI */
411//#define HPDF_COUNTRY_MY  "MY"    /* MALAYSIA */
412//#define HPDF_COUNTRY_MV  "MV"    /* MALDIVES */
413//#define HPDF_COUNTRY_ML  "ML"    /* MALI */
414//#define HPDF_COUNTRY_MT  "MT"    /* MALTA */
415//#define HPDF_COUNTRY_MH  "MH"    /* MARSHALL ISLANDS */
416//#define HPDF_COUNTRY_MQ  "MQ"    /* MARTINIQUE */
417//#define HPDF_COUNTRY_MR  "MR"    /* MAURITANIA */
418//#define HPDF_COUNTRY_MU  "MU"    /* MAURITIUS */
419//#define HPDF_COUNTRY_YT  "YT"    /* MAYOTTE */
420//#define HPDF_COUNTRY_MX  "MX"    /* MEXICO */
421//#define HPDF_COUNTRY_FM  "FM"    /* MICRONESIA, FEDERATED STATES OF */
422//#define HPDF_COUNTRY_MD  "MD"    /* MOLDOVA, REPUBLIC OF */
423//#define HPDF_COUNTRY_MC  "MC"    /* MONACO */
424//#define HPDF_COUNTRY_MN  "MN"    /* MONGOLIA */
425//#define HPDF_COUNTRY_MS  "MS"    /* MONTSERRAT */
426//#define HPDF_COUNTRY_MA  "MA"    /* MOROCCO */
427//#define HPDF_COUNTRY_MZ  "MZ"    /* MOZAMBIQUE */
428//#define HPDF_COUNTRY_MM  "MM"    /* MYANMAR */
429//#define HPDF_COUNTRY_NA  "NA"    /* NAMIBIA */
430//#define HPDF_COUNTRY_NR  "NR"    /* NAURU */
431//#define HPDF_COUNTRY_NP  "NP"    /* NEPAL */
432//#define HPDF_COUNTRY_NL  "NL"    /* NETHERLANDS */
433//#define HPDF_COUNTRY_AN  "AN"    /* NETHERLANDS ANTILLES */
434//#define HPDF_COUNTRY_NC  "NC"    /* NEW CALEDONIA */
435//#define HPDF_COUNTRY_NZ  "NZ"    /* NEW ZEALAND */
436//#define HPDF_COUNTRY_NI  "NI"    /* NICARAGUA */
437//#define HPDF_COUNTRY_NE  "NE"    /* NIGER */
438//#define HPDF_COUNTRY_NG  "NG"    /* NIGERIA */
439//#define HPDF_COUNTRY_NU  "NU"    /* NIUE */
440//#define HPDF_COUNTRY_NF  "NF"    /* NORFOLK ISLAND */
441//#define HPDF_COUNTRY_MP  "MP"    /* NORTHERN MARIANA ISLANDS */
442//#define HPDF_COUNTRY_NO  "NO"    /* NORWAY */
443//#define HPDF_COUNTRY_OM  "OM"    /* OMAN */
444//#define HPDF_COUNTRY_PK  "PK"    /* PAKISTAN */
445//#define HPDF_COUNTRY_PW  "PW"    /* PALAU */
446//#define HPDF_COUNTRY_PA  "PA"    /* PANAMA */
447//#define HPDF_COUNTRY_PG  "PG"    /* PAPUA NEW GUINEA */
448//#define HPDF_COUNTRY_PY  "PY"    /* PARAGUAY */
449//#define HPDF_COUNTRY_PE  "PE"    /* PERU */
450//#define HPDF_COUNTRY_PH  "PH"    /* PHILIPPINES */
451//#define HPDF_COUNTRY_PN  "PN"    /* PITCAIRN */
452//#define HPDF_COUNTRY_PL  "PL"    /* POLAND */
453//#define HPDF_COUNTRY_PT  "PT"    /* PORTUGAL */
454//#define HPDF_COUNTRY_PR  "PR"    /* PUERTO RICO */
455//#define HPDF_COUNTRY_QA  "QA"    /* QATAR */
456//#define HPDF_COUNTRY_RE  "RE"    /* REUNION */
457//#define HPDF_COUNTRY_RO  "RO"    /* ROMANIA */
458//#define HPDF_COUNTRY_RU  "RU"    /* RUSSIAN FEDERATION */
459//#define HPDF_COUNTRY_RW  "RW"    /* RWANDA */
460//#define HPDF_COUNTRY_KN  "KN"    /* SAINT KITTS AND NEVIS */
461//#define HPDF_COUNTRY_LC  "LC"    /* SAINT LUCIA */
462//#define HPDF_COUNTRY_VC  "VC"    /* SAINT VINCENT AND THE GRENADINES */
463//#define HPDF_COUNTRY_WS  "WS"    /* SAMOA */
464//#define HPDF_COUNTRY_SM  "SM"    /* SAN MARINO */
465//#define HPDF_COUNTRY_ST  "ST"    /* SAO TOME AND PRINCIPE */
466//#define HPDF_COUNTRY_SA  "SA"    /* SAUDI ARABIA */
467//#define HPDF_COUNTRY_SN  "SN"    /* SENEGAL */
468//#define HPDF_COUNTRY_SC  "SC"    /* SEYCHELLES */
469//#define HPDF_COUNTRY_SL  "SL"    /* SIERRA LEONE */
470//#define HPDF_COUNTRY_SG  "SG"    /* SINGAPORE */
471//#define HPDF_COUNTRY_SK  "SK"    /* SLOVAKIA (Slovak Republic) */
472//#define HPDF_COUNTRY_SI  "SI"    /* SLOVENIA */
473//#define HPDF_COUNTRY_SB  "SB"    /* SOLOMON ISLANDS */
474//#define HPDF_COUNTRY_SO  "SO"    /* SOMALIA */
475//#define HPDF_COUNTRY_ZA  "ZA"    /* SOUTH AFRICA */
476//#define HPDF_COUNTRY_ES  "ES"    /* SPAIN */
477//#define HPDF_COUNTRY_LK  "LK"    /* SRI LANKA */
478//#define HPDF_COUNTRY_SH  "SH"    /* ST. HELENA */
479//#define HPDF_COUNTRY_PM  "PM"    /* ST. PIERRE AND MIQUELON */
480//#define HPDF_COUNTRY_SD  "SD"    /* SUDAN */
481//#define HPDF_COUNTRY_SR  "SR"    /* SURINAME */
482//#define HPDF_COUNTRY_SJ  "SJ"    /* SVALBARD AND JAN MAYEN ISLANDS */
483//#define HPDF_COUNTRY_SZ  "SZ"    /* SWAZILAND */
484//#define HPDF_COUNTRY_SE  "SE"    /* SWEDEN */
485//#define HPDF_COUNTRY_CH  "CH"    /* SWITZERLAND */
486//#define HPDF_COUNTRY_SY  "SY"    /* SYRIAN ARAB REPUBLIC */
487//#define HPDF_COUNTRY_TW  "TW"    /* TAIWAN, PROVINCE OF CHINA */
488//#define HPDF_COUNTRY_TJ  "TJ"    /* TAJIKISTAN */
489//#define HPDF_COUNTRY_TZ  "TZ"    /* TANZANIA, UNITED REPUBLIC OF */
490//#define HPDF_COUNTRY_TH  "TH"    /* THAILAND */
491//#define HPDF_COUNTRY_TG  "TG"    /* TOGO */
492//#define HPDF_COUNTRY_TK  "TK"    /* TOKELAU */
493//#define HPDF_COUNTRY_TO  "TO"    /* TONGA */
494//#define HPDF_COUNTRY_TT  "TT"    /* TRINIDAD AND TOBAGO */
495//#define HPDF_COUNTRY_TN  "TN"    /* TUNISIA */
496//#define HPDF_COUNTRY_TR  "TR"    /* TURKEY */
497//#define HPDF_COUNTRY_TM  "TM"    /* TURKMENISTAN */
498//#define HPDF_COUNTRY_TC  "TC"    /* TURKS AND CAICOS ISLANDS */
499//#define HPDF_COUNTRY_TV  "TV"    /* TUVALU */
500//#define HPDF_COUNTRY_UG  "UG"    /* UGANDA */
501//#define HPDF_COUNTRY_UA  "UA"    /* UKRAINE */
502//#define HPDF_COUNTRY_AE  "AE"    /* UNITED ARAB EMIRATES */
503//#define HPDF_COUNTRY_GB  "GB"    /* UNITED KINGDOM */
504//#define HPDF_COUNTRY_US  "US"    /* UNITED STATES */
505//#define HPDF_COUNTRY_UM  "UM"    /* UNITED STATES MINOR OUTLYING ISLANDS */
506//#define HPDF_COUNTRY_UY  "UY"    /* URUGUAY */
507//#define HPDF_COUNTRY_UZ  "UZ"    /* UZBEKISTAN */
508//#define HPDF_COUNTRY_VU  "VU"    /* VANUATU */
509//#define HPDF_COUNTRY_VA  "VA"    /* VATICAN CITY STATE (HOLY SEE) */
510//#define HPDF_COUNTRY_VE  "VE"    /* VENEZUELA */
511//#define HPDF_COUNTRY_VN  "VN"    /* VIET NAM */
512//#define HPDF_COUNTRY_VG  "VG"    /* VIRGIN ISLANDS (BRITISH) */
513//#define HPDF_COUNTRY_VI  "VI"    /* VIRGIN ISLANDS (U.S.) */
514//#define HPDF_COUNTRY_WF  "WF"    /* WALLIS AND FUTUNA ISLANDS */
515//#define HPDF_COUNTRY_EH  "EH"    /* WESTERN SAHARA */
516//#define HPDF_COUNTRY_YE  "YE"    /* YEMEN */
517//#define HPDF_COUNTRY_YU  "YU"    /* YUGOSLAVIA */
518//#define HPDF_COUNTRY_ZR  "ZR"    /* ZAIRE */
519//#define HPDF_COUNTRY_ZM  "ZM"    /* ZAMBIA */
520//#define HPDF_COUNTRY_ZW  "ZW"    /* ZIMBABWE */
521//
522///*----------------------------------------------------------------------------*/
523///*----- lang code definition -------------------------------------------------*/
524//
525//#define HPDF_LANG_AA    "aa"     /* Afar */
526//#define HPDF_LANG_AB    "ab"     /* Abkhazian */
527//#define HPDF_LANG_AF    "af"     /* Afrikaans */
528//#define HPDF_LANG_AM    "am"     /* Amharic */
529//#define HPDF_LANG_AR    "ar"     /* Arabic */
530//#define HPDF_LANG_AS    "as"     /* Assamese */
531//#define HPDF_LANG_AY    "ay"     /* Aymara */
532//#define HPDF_LANG_AZ    "az"     /* Azerbaijani */
533//#define HPDF_LANG_BA    "ba"     /* Bashkir */
534//#define HPDF_LANG_BE    "be"     /* Byelorussian */
535//#define HPDF_LANG_BG    "bg"     /* Bulgarian */
536//#define HPDF_LANG_BH    "bh"     /* Bihari */
537//#define HPDF_LANG_BI    "bi"     /* Bislama */
538//#define HPDF_LANG_BN    "bn"     /* Bengali Bangla */
539//#define HPDF_LANG_BO    "bo"     /* Tibetan */
540//#define HPDF_LANG_BR    "br"     /* Breton */
541//#define HPDF_LANG_CA    "ca"     /* Catalan */
542//#define HPDF_LANG_CO    "co"     /* Corsican */
543//#define HPDF_LANG_CS    "cs"     /* Czech */
544//#define HPDF_LANG_CY    "cy"     /* Welsh */
545//#define HPDF_LANG_DA    "da"     /* Danish */
546//#define HPDF_LANG_DE    "de"     /* German */
547//#define HPDF_LANG_DZ    "dz"     /* Bhutani */
548//#define HPDF_LANG_EL    "el"     /* Greek */
549//#define HPDF_LANG_EN    "en"     /* English */
550//#define HPDF_LANG_EO    "eo"     /* Esperanto */
551//#define HPDF_LANG_ES    "es"     /* Spanish */
552//#define HPDF_LANG_ET    "et"     /* Estonian */
553//#define HPDF_LANG_EU    "eu"     /* Basque */
554//#define HPDF_LANG_FA    "fa"     /* Persian */
555//#define HPDF_LANG_FI    "fi"     /* Finnish */
556//#define HPDF_LANG_FJ    "fj"     /* Fiji */
557//#define HPDF_LANG_FO    "fo"     /* Faeroese */
558//#define HPDF_LANG_FR    "fr"     /* French */
559//#define HPDF_LANG_FY    "fy"     /* Frisian */
560//#define HPDF_LANG_GA    "ga"     /* Irish */
561//#define HPDF_LANG_GD    "gd"     /* Scots Gaelic */
562//#define HPDF_LANG_GL    "gl"     /* Galician */
563//#define HPDF_LANG_GN    "gn"     /* Guarani */
564//#define HPDF_LANG_GU    "gu"     /* Gujarati */
565//#define HPDF_LANG_HA    "ha"     /* Hausa */
566//#define HPDF_LANG_HI    "hi"     /* Hindi */
567//#define HPDF_LANG_HR    "hr"     /* Croatian */
568//#define HPDF_LANG_HU    "hu"     /* Hungarian */
569//#define HPDF_LANG_HY    "hy"     /* Armenian */
570//#define HPDF_LANG_IA    "ia"     /* Interlingua */
571//#define HPDF_LANG_IE    "ie"     /* Interlingue */
572//#define HPDF_LANG_IK    "ik"     /* Inupiak */
573//#define HPDF_LANG_IN    "in"     /* Indonesian */
574//#define HPDF_LANG_IS    "is"     /* Icelandic */
575//#define HPDF_LANG_IT    "it"     /* Italian */
576//#define HPDF_LANG_IW    "iw"     /* Hebrew */
577//#define HPDF_LANG_JA    "ja"     /* Japanese */
578//#define HPDF_LANG_JI    "ji"     /* Yiddish */
579//#define HPDF_LANG_JW    "jw"     /* Javanese */
580//#define HPDF_LANG_KA    "ka"     /* Georgian */
581//#define HPDF_LANG_KK    "kk"     /* Kazakh */
582//#define HPDF_LANG_KL    "kl"     /* Greenlandic */
583//#define HPDF_LANG_KM    "km"     /* Cambodian */
584//#define HPDF_LANG_KN    "kn"     /* Kannada */
585//#define HPDF_LANG_KO    "ko"     /* Korean */
586//#define HPDF_LANG_KS    "ks"     /* Kashmiri */
587//#define HPDF_LANG_KU    "ku"     /* Kurdish */
588//#define HPDF_LANG_KY    "ky"     /* Kirghiz */
589//#define HPDF_LANG_LA    "la"     /* Latin */
590//#define HPDF_LANG_LN    "ln"     /* Lingala */
591//#define HPDF_LANG_LO    "lo"     /* Laothian */
592//#define HPDF_LANG_LT    "lt"     /* Lithuanian */
593//#define HPDF_LANG_LV    "lv"     /* Latvian,Lettish */
594//#define HPDF_LANG_MG    "mg"     /* Malagasy */
595//#define HPDF_LANG_MI    "mi"     /* Maori */
596//#define HPDF_LANG_MK    "mk"     /* Macedonian */
597//#define HPDF_LANG_ML    "ml"     /* Malayalam */
598//#define HPDF_LANG_MN    "mn"     /* Mongolian */
599//#define HPDF_LANG_MO    "mo"     /* Moldavian */
600//#define HPDF_LANG_MR    "mr"     /* Marathi */
601//#define HPDF_LANG_MS    "ms"     /* Malay */
602//#define HPDF_LANG_MT    "mt"     /* Maltese */
603//#define HPDF_LANG_MY    "my"     /* Burmese */
604//#define HPDF_LANG_NA    "na"     /* Nauru */
605//#define HPDF_LANG_NE    "ne"     /* Nepali */
606//#define HPDF_LANG_NL    "nl"     /* Dutch */
607//#define HPDF_LANG_NO    "no"     /* Norwegian */
608//#define HPDF_LANG_OC    "oc"     /* Occitan */
609//#define HPDF_LANG_OM    "om"     /* (Afan)Oromo */
610//#define HPDF_LANG_OR    "or"     /* Oriya */
611//#define HPDF_LANG_PA    "pa"     /* Punjabi */
612//#define HPDF_LANG_PL    "pl"     /* Polish */
613//#define HPDF_LANG_PS    "ps"     /* Pashto,Pushto */
614//#define HPDF_LANG_PT    "pt"     /* Portuguese  */
615//#define HPDF_LANG_QU    "qu"     /* Quechua */
616//#define HPDF_LANG_RM    "rm"     /* Rhaeto-Romance */
617//#define HPDF_LANG_RN    "rn"     /* Kirundi */
618//#define HPDF_LANG_RO    "ro"     /* Romanian */
619//#define HPDF_LANG_RU    "ru"     /* Russian */
620//#define HPDF_LANG_RW    "rw"     /* Kinyarwanda */
621//#define HPDF_LANG_SA    "sa"     /* Sanskrit */
622//#define HPDF_LANG_SD    "sd"     /* Sindhi */
623//#define HPDF_LANG_SG    "sg"     /* Sangro */
624//#define HPDF_LANG_SH    "sh"     /* Serbo-Croatian */
625//#define HPDF_LANG_SI    "si"     /* Singhalese */
626//#define HPDF_LANG_SK    "sk"     /* Slovak */
627//#define HPDF_LANG_SL    "sl"     /* Slovenian */
628//#define HPDF_LANG_SM    "sm"     /* Samoan */
629//#define HPDF_LANG_SN    "sn"     /* Shona */
630//#define HPDF_LANG_SO    "so"     /* Somali */
631//#define HPDF_LANG_SQ    "sq"     /* Albanian */
632//#define HPDF_LANG_SR    "sr"     /* Serbian */
633//#define HPDF_LANG_SS    "ss"     /* Siswati */
634//#define HPDF_LANG_ST    "st"     /* Sesotho */
635//#define HPDF_LANG_SU    "su"     /* Sundanese */
636//#define HPDF_LANG_SV    "sv"     /* Swedish */
637//#define HPDF_LANG_SW    "sw"     /* Swahili */
638//#define HPDF_LANG_TA    "ta"     /* Tamil */
639//#define HPDF_LANG_TE    "te"     /* Tegulu */
640//#define HPDF_LANG_TG    "tg"     /* Tajik */
641//#define HPDF_LANG_TH    "th"     /* Thai */
642//#define HPDF_LANG_TI    "ti"     /* Tigrinya */
643//#define HPDF_LANG_TK    "tk"     /* Turkmen */
644//#define HPDF_LANG_TL    "tl"     /* Tagalog */
645//#define HPDF_LANG_TN    "tn"     /* Setswanato Tonga */
646//#define HPDF_LANG_TR    "tr"     /* Turkish */
647//#define HPDF_LANG_TS    "ts"     /* Tsonga */
648//#define HPDF_LANG_TT    "tt"     /* Tatar */
649//#define HPDF_LANG_TW    "tw"     /* Twi */
650//#define HPDF_LANG_UK    "uk"     /* Ukrainian */
651//#define HPDF_LANG_UR    "ur"     /* Urdu */
652//#define HPDF_LANG_UZ    "uz"     /* Uzbek */
653//#define HPDF_LANG_VI    "vi"     /* Vietnamese */
654//#define HPDF_LANG_VO    "vo"     /* Volapuk */
655//#define HPDF_LANG_WO    "wo"     /* Wolof */
656//#define HPDF_LANG_XH    "xh"     /* Xhosa */
657//#define HPDF_LANG_YO    "yo"     /* Yoruba */
658//#define HPDF_LANG_ZH    "zh"     /* Chinese */
659//#define HPDF_LANG_ZU    "zu"     /* Zulu */
660//
661//
662///*----------------------------------------------------------------------------*/
663///*----- Graphis mode ---------------------------------------------------------*/
664//
665//#define   HPDF_GMODE_PAGE_DESCRIPTION       0x0001
666//#define   HPDF_GMODE_PATH_OBJECT            0x0002
667//#define   HPDF_GMODE_TEXT_OBJECT            0x0004
668//#define   HPDF_GMODE_CLIPPING_PATH          0x0008
669//#define   HPDF_GMODE_SHADING                0x0010
670//#define   HPDF_GMODE_INLINE_IMAGE           0x0020
671//#define   HPDF_GMODE_EXTERNAL_OBJECT        0x0040
672//
673//
674///*----------------------------------------------------------------------------*/
675//
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692/*---------------------------------------------------------------------------*/
693/*------ text width struct --------------------------------------------------*/
694
695#[repr(C)]
696pub struct HPDF_TextWidth {
697    pub numchars: HPDF_UINT,
698
699    /* don't use this value (it may be change in the feature).
700       use numspace as alternated. */
701    numwords: HPDF_UINT,
702
703    pub width:    HPDF_UINT,
704    pub numspace: HPDF_UINT,
705} 
706
707
708/*---------------------------------------------------------------------------*/
709/*------ dash mode ----------------------------------------------------------*/
710
711#[repr(C)]
712pub struct HPDF_DashMode {
713    pub ptn:     [HPDF_UINT16;8],
714    pub num_ptn:    HPDF_UINT,
715    pub phase:      HPDF_UINT,
716} 
717
718
719/*---------------------------------------------------------------------------*/
720/*----- HPDF_TransMatrix struct ---------------------------------------------*/
721
722#[repr(C)]
723pub struct HPDF_TransMatrix {
724    pub a:      HPDF_REAL, 
725    pub b:      HPDF_REAL,   
726    pub c:      HPDF_REAL,   
727    pub d:      HPDF_REAL,   
728    pub x:      HPDF_REAL,   
729    pub y:      HPDF_REAL,   
730} 
731
732/*---------------------------------------------------------------------------*/
733/*----- HPDF_3DMatrix struct ------------------------------------------------*/
734
735#[repr(C)]
736pub struct HPDF_3DMatrix {
737    pub a:      HPDF_REAL, 
738    pub b:      HPDF_REAL, 
739    pub c:      HPDF_REAL, 
740    pub d:      HPDF_REAL, 
741    pub e:      HPDF_REAL, 
742    pub f:      HPDF_REAL, 
743    pub g:      HPDF_REAL, 
744    pub h:      HPDF_REAL, 
745    pub i:      HPDF_REAL, 
746    pub tx:     HPDF_REAL, 
747    pub ty:     HPDF_REAL, 
748    pub tz:     HPDF_REAL, 
749}
750
751
752/*---------------------------------------------------------------------------*/
753
754#[repr(C)]
755pub enum HPDF_ColorSpace {
756    HPDF_CS_DEVICE_GRAY = 0,
757    HPDF_CS_DEVICE_RGB,
758    HPDF_CS_DEVICE_CMYK,
759    HPDF_CS_CAL_GRAY,
760    HPDF_CS_CAL_RGB,
761    HPDF_CS_LAB,
762    HPDF_CS_ICC_BASED,
763    HPDF_CS_SEPARATION,
764    HPDF_CS_DEVICE_N,
765    HPDF_CS_INDEXED,
766    HPDF_CS_PATTERN,
767    HPDF_CS_EOF
768}
769
770/*---------------------------------------------------------------------------*/
771/*----- HPDF_RGBColor struct ------------------------------------------------*/
772
773#[repr(C)]
774pub struct HPDF_RGBColor {
775    pub r:      HPDF_REAL,
776    pub g:      HPDF_REAL,   
777    pub b:      HPDF_REAL,   
778}
779
780/*---------------------------------------------------------------------------*/
781/*----- HPDF_CMYKColor struct -----------------------------------------------*/
782 
783#[repr(C)]
784pub struct HPDF_CMYKColor {
785    pub c:      HPDF_REAL,   
786    pub m:      HPDF_REAL,   
787    pub y:      HPDF_REAL,   
788    pub k:      HPDF_REAL,   
789}
790
791/*---------------------------------------------------------------------------*/
792/*------ The line cap style -------------------------------------------------*/
793
794#[repr(C)]
795pub enum HPDF_LineCap {
796    HPDF_BUTT_END = 0,
797    HPDF_ROUND_END,
798    HPDF_PROJECTING_SCUARE_END,
799    HPDF_LINECAP_EOF
800}
801
802/*----------------------------------------------------------------------------*/
803/*------ The line join style -------------------------------------------------*/
804
805#[repr(C)]
806pub enum HPDF_LineJoin {
807    HPDF_MITER_JOIN = 0,
808    HPDF_ROUND_JOIN,
809    HPDF_BEVEL_JOIN,
810    HPDF_LINEJOIN_EOF
811}
812
813/*----------------------------------------------------------------------------*/
814/*------ The text rendering mode ---------------------------------------------*/
815
816#[repr(C)]
817pub enum HPDF_TextRenderingMode {
818    HPDF_FILL = 0,
819    HPDF_STROKE,
820    HPDF_FILL_THEN_STROKE,
821    HPDF_INVISIBLE,
822    HPDF_FILL_CLIPPING,
823    HPDF_STROKE_CLIPPING,
824    HPDF_FILL_STROKE_CLIPPING,
825    HPDF_CLIPPING,
826    HPDF_RENDERING_MODE_EOF
827}
828
829
830#[repr(C)]
831pub enum HPDF_WritingMode {
832    HPDF_WMODE_HORIZONTAL = 0,
833    HPDF_WMODE_VERTICAL,
834    HPDF_WMODE_EOF
835}
836
837
838#[repr(C)]
839pub enum HPDF_PageLayout {
840    HPDF_PAGE_LAYOUT_SINGLE = 0,
841    HPDF_PAGE_LAYOUT_ONE_COLUMN,
842    HPDF_PAGE_LAYOUT_TWO_COLUMN_LEFT,
843    HPDF_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
844    HPDF_PAGE_LAYOUT_TWO_PAGE_LEFT,
845    HPDF_PAGE_LAYOUT_TWO_PAGE_RIGHT,
846    HPDF_PAGE_LAYOUT_EOF
847}
848
849
850#[repr(C)]
851pub enum HPDF_PageMode {
852    HPDF_PAGE_MODE_USE_NONE = 0,
853    HPDF_PAGE_MODE_USE_OUTLINE,
854    HPDF_PAGE_MODE_USE_THUMBS,
855    HPDF_PAGE_MODE_FULL_SCREEN,
856/*  HPDF_PAGE_MODE_USE_OC,
857    HPDF_PAGE_MODE_USE_ATTACHMENTS,
858 */
859    HPDF_PAGE_MODE_EOF
860}
861
862
863#[repr(C)]
864pub enum HPDF_PageNumStyle {
865    HPDF_PAGE_NUM_STYLE_DECIMAL = 0,
866    HPDF_PAGE_NUM_STYLE_UPPER_ROMAN,
867    HPDF_PAGE_NUM_STYLE_LOWER_ROMAN,
868    HPDF_PAGE_NUM_STYLE_UPPER_LETTERS,
869    HPDF_PAGE_NUM_STYLE_LOWER_LETTERS,
870    HPDF_PAGE_NUM_STYLE_EOF
871}
872
873
874#[repr(C)]
875pub enum HPDF_DestinationType {
876    HPDF_XYZ = 0,
877    HPDF_FIT,
878    HPDF_FIT_H,
879    HPDF_FIT_V,
880    HPDF_FIT_R,
881    HPDF_FIT_B,
882    HPDF_FIT_BH,
883    HPDF_FIT_BV,
884    HPDF_DST_EOF
885}
886
887#[repr(C)]
888pub enum HPDF_AnnotType {
889    HPDF_ANNOT_TEXT_NOTES,
890    HPDF_ANNOT_LINK,
891    HPDF_ANNOT_SOUND,
892    HPDF_ANNOT_FREE_TEXT,
893    HPDF_ANNOT_STAMP,
894    HPDF_ANNOT_SQUARE,
895    HPDF_ANNOT_CIRCLE,
896    HPDF_ANNOT_STRIKE_OUT,
897    HPDF_ANNOT_HIGHTLIGHT,
898    HPDF_ANNOT_UNDERLINE,
899    HPDF_ANNOT_INK,
900    HPDF_ANNOT_FILE_ATTACHMENT,
901    HPDF_ANNOT_POPUP,
902    HPDF_ANNOT_3D,
903    HPDF_ANNOT_SQUIGGLY,
904	HPDF_ANNOT_LINE,
905	HPDF_ANNOT_PROJECTION,
906	HPDF_ANNOT_WIDGET
907}
908
909
910#[repr(C)]
911pub enum HPDF_AnnotFlgs {
912    HPDF_ANNOT_INVISIBLE,
913    HPDF_ANNOT_HIDDEN,
914    HPDF_ANNOT_PRINT,
915    HPDF_ANNOT_NOZOOM,
916    HPDF_ANNOT_NOROTATE,
917    HPDF_ANNOT_NOVIEW,
918    HPDF_ANNOT_READONLY
919}
920
921
922#[repr(C)]
923pub enum HPDF_AnnotHighlightMode {
924    HPDF_ANNOT_NO_HIGHTLIGHT = 0,
925    HPDF_ANNOT_INVERT_BOX,
926    HPDF_ANNOT_INVERT_BORDER,
927    HPDF_ANNOT_DOWN_APPEARANCE,
928    HPDF_ANNOT_HIGHTLIGHT_MODE_EOF
929}
930
931
932#[repr(C)]
933pub enum HPDF_AnnotIcon {
934    HPDF_ANNOT_ICON_COMMENT = 0,
935    HPDF_ANNOT_ICON_KEY,
936    HPDF_ANNOT_ICON_NOTE,
937    HPDF_ANNOT_ICON_HELP,
938    HPDF_ANNOT_ICON_NEW_PARAGRAPH,
939    HPDF_ANNOT_ICON_PARAGRAPH,
940    HPDF_ANNOT_ICON_INSERT,
941    HPDF_ANNOT_ICON_EOF
942}
943
944#[repr(C)]
945pub enum HPDF_AnnotIntent {
946    HPDF_ANNOT_INTENT_FREETEXTCALLOUT = 0,
947    HPDF_ANNOT_INTENT_FREETEXTTYPEWRITER,
948    HPDF_ANNOT_INTENT_LINEARROW,
949    HPDF_ANNOT_INTENT_LINEDIMENSION,
950    HPDF_ANNOT_INTENT_POLYGONCLOUD,
951    HPDF_ANNOT_INTENT_POLYLINEDIMENSION,
952    HPDF_ANNOT_INTENT_POLYGONDIMENSION
953}
954
955#[repr(C)]
956pub enum HPDF_LineAnnotEndingStyle {
957    HPDF_LINE_ANNOT_NONE = 0,
958    HPDF_LINE_ANNOT_SQUARE,
959    HPDF_LINE_ANNOT_CIRCLE,
960    HPDF_LINE_ANNOT_DIAMOND,
961    HPDF_LINE_ANNOT_OPENARROW,
962    HPDF_LINE_ANNOT_CLOSEDARROW,
963    HPDF_LINE_ANNOT_BUTT,
964    HPDF_LINE_ANNOT_ROPENARROW,
965    HPDF_LINE_ANNOT_RCLOSEDARROW,
966    HPDF_LINE_ANNOT_SLASH
967}
968
969#[repr(C)]
970pub enum HPDF_LineAnnotCapPosition{
971    HPDF_LINE_ANNOT_CAP_INLINE = 0,
972    HPDF_LINE_ANNOT_CAP_TOP
973}
974
975#[repr(C)]
976pub enum HPDF_StampAnnotName{
977    HPDF_STAMP_ANNOT_APPROVED = 0,
978    HPDF_STAMP_ANNOT_EXPERIMENTAL,
979    HPDF_STAMP_ANNOT_NOTAPPROVED,
980    HPDF_STAMP_ANNOT_ASIS,
981    HPDF_STAMP_ANNOT_EXPIRED,
982    HPDF_STAMP_ANNOT_NOTFORPUBLICRELEASE,
983    HPDF_STAMP_ANNOT_CONFIDENTIAL,
984    HPDF_STAMP_ANNOT_FINAL,
985    HPDF_STAMP_ANNOT_SOLD,
986    HPDF_STAMP_ANNOT_DEPARTMENTAL,
987    HPDF_STAMP_ANNOT_FORCOMMENT,
988    HPDF_STAMP_ANNOT_TOPSECRET,
989    HPDF_STAMP_ANNOT_DRAFT,
990    HPDF_STAMP_ANNOT_FORPUBLICRELEASE
991}
992
993/*----------------------------------------------------------------------------*/
994/*------ border stype --------------------------------------------------------*/
995
996#[repr(C)]
997pub enum HPDF_BSSubtype {
998    HPDF_BS_SOLID,
999    HPDF_BS_DASHED,
1000    HPDF_BS_BEVELED,
1001    HPDF_BS_INSET,
1002    HPDF_BS_UNDERLINED
1003}
1004
1005
1006/*----- blend modes ----------------------------------------------------------*/
1007
1008#[repr(C)]
1009pub enum HPDF_BlendMode {
1010    HPDF_BM_NORMAL,
1011    HPDF_BM_MULTIPLY,
1012    HPDF_BM_SCREEN,
1013    HPDF_BM_OVERLAY,
1014    HPDF_BM_DARKEN,
1015    HPDF_BM_LIGHTEN,
1016    HPDF_BM_COLOR_DODGE,
1017    HPDF_BM_COLOR_BUM,
1018    HPDF_BM_HARD_LIGHT,
1019    HPDF_BM_SOFT_LIGHT,
1020    HPDF_BM_DIFFERENCE,
1021    HPDF_BM_EXCLUSHON,
1022    HPDF_BM_EOF
1023}
1024
1025/*----- slide show -----------------------------------------------------------*/
1026
1027#[repr(C)]
1028pub enum HPDF_TransitionStyle {
1029    HPDF_TS_WIPE_RIGHT = 0,
1030    HPDF_TS_WIPE_UP,
1031    HPDF_TS_WIPE_LEFT,
1032    HPDF_TS_WIPE_DOWN,
1033    HPDF_TS_BARN_DOORS_HORIZONTAL_OUT,
1034    HPDF_TS_BARN_DOORS_HORIZONTAL_IN,
1035    HPDF_TS_BARN_DOORS_VERTICAL_OUT,
1036    HPDF_TS_BARN_DOORS_VERTICAL_IN,
1037    HPDF_TS_BOX_OUT,
1038    HPDF_TS_BOX_IN,
1039    HPDF_TS_BLINDS_HORIZONTAL,
1040    HPDF_TS_BLINDS_VERTICAL,
1041    HPDF_TS_DISSOLVE,
1042    HPDF_TS_GLITTER_RIGHT,
1043    HPDF_TS_GLITTER_DOWN,
1044    HPDF_TS_GLITTER_TOP_LEFT_TO_BOTTOM_RIGHT,
1045    HPDF_TS_REPLACE,
1046    HPDF_TS_EOF
1047}
1048
1049/*----------------------------------------------------------------------------*/
1050
1051#[repr(C)]
1052pub enum HPDF_PageSizes {
1053    HPDF_PAGE_SIZE_LETTER = 0,
1054    HPDF_PAGE_SIZE_LEGAL,
1055    HPDF_PAGE_SIZE_A3,
1056    HPDF_PAGE_SIZE_A4,
1057    HPDF_PAGE_SIZE_A5,
1058    HPDF_PAGE_SIZE_B4,
1059    HPDF_PAGE_SIZE_B5,
1060    HPDF_PAGE_SIZE_EXECUTIVE,
1061    HPDF_PAGE_SIZE_US4x6,
1062    HPDF_PAGE_SIZE_US4x8,
1063    HPDF_PAGE_SIZE_US5x7,
1064    HPDF_PAGE_SIZE_COMM10,
1065    HPDF_PAGE_SIZE_EOF
1066}
1067
1068
1069#[repr(C)]
1070pub enum HPDF_PageDirection {
1071    HPDF_PAGE_PORTRAIT = 0,
1072    HPDF_PAGE_LANDSCAPE
1073}
1074
1075
1076#[repr(C)]
1077pub enum  HPDF_EncoderType {
1078    HPDF_ENCODER_TYPE_SINGLE_BYTE,
1079    HPDF_ENCODER_TYPE_DOUBLE_BYTE,
1080    HPDF_ENCODER_TYPE_UNINITIALIZED,
1081    HPDF_ENCODER_UNKNOWN
1082}
1083
1084
1085#[repr(C)]
1086pub enum HPDF_ByteType {
1087    HPDF_BYTE_TYPE_SINGLE = 0,
1088    HPDF_BYTE_TYPE_LEAD,
1089    HPDF_BYTE_TYPE_TRIAL,
1090    HPDF_BYTE_TYPE_UNKNOWN
1091}
1092
1093
1094#[repr(C)]
1095pub enum HPDF_TextAlignment {
1096    HPDF_TALIGN_LEFT = 0,
1097    HPDF_TALIGN_RIGHT,
1098    HPDF_TALIGN_CENTER,
1099    HPDF_TALIGN_JUSTIFY
1100}
1101
1102/*----------------------------------------------------------------------------*/
1103
1104/* Name Dictionary values -- see PDF reference section 7.7.4 */
1105#[repr(C)]
1106pub enum _HPDF_NameDictKey {
1107    HPDF_NAME_EMBEDDED_FILES = 0,    /* TODO the rest */
1108    HPDF_NAME_EOF
1109}
1110
1111
1112
1113pub type HPDF_HANDLE   = *mut libc::c_void;
1114pub type HPDF_Doc       =   HPDF_HANDLE;
1115pub type HPDF_Page      =   HPDF_HANDLE; 
1116pub type HPDF_Pages     =   HPDF_HANDLE;
1117pub type HPDF_Stream    =   HPDF_HANDLE;
1118pub type HPDF_Image     =   HPDF_HANDLE;
1119pub type HPDF_Font      =   HPDF_HANDLE;
1120pub type HPDF_Outline   =   HPDF_HANDLE;
1121pub type HPDF_Encoder   =   HPDF_HANDLE;
1122pub type HPDF_3DMeasure =   HPDF_HANDLE;
1123pub type HPDF_ExData    =   HPDF_HANDLE;
1124pub type HPDF_Destination=  HPDF_HANDLE;
1125pub type HPDF_XObject   =   HPDF_HANDLE;
1126pub type HPDF_Annotation=   HPDF_HANDLE;
1127pub type HPDF_ExtGState =   HPDF_HANDLE;
1128pub type HPDF_FontDef   =   HPDF_HANDLE;
1129pub type HPDF_U3D       =   HPDF_HANDLE;
1130pub type HPDF_JavaScript=   HPDF_HANDLE;
1131pub type HPDF_Error     =   HPDF_HANDLE;
1132pub type HPDF_MMgr      =   HPDF_HANDLE;
1133pub type HPDF_Dict      =   HPDF_HANDLE;
1134pub type HPDF_EmbeddedFile= HPDF_HANDLE;
1135pub type HPDF_OutputIntent= HPDF_HANDLE;
1136pub type HPDF_Xref      =   HPDF_HANDLE;
1137
1138
1139
1140
1141
1142
1143extern{
1144    pub fn HPDF_New  (user_error_fn: extern fn(HPDF_STATUS, HPDF_STATUS, HPDF_HANDLE), user_data: HPDF_HANDLE) -> HPDF_Doc;
1145
1146
1147    pub fn HPDF_Free(pdf: HPDF_Doc)->libc::c_void;
1148
1149    pub fn HPDF_SaveToFile(pdf: HPDF_Doc,
1150                           file_name:  *const libc::c_char)->HPDF_STATUS;
1151
1152
1153
1154/*--- Text object operator -----------------------------------------------*/
1155
1156/* BT */
1157    pub fn HPDF_Page_BeginText  (page: HPDF_Page)->HPDF_STATUS;
1158
1159/* ET */
1160    pub fn HPDF_Page_EndText  (page: HPDF_Page)->HPDF_STATUS;
1161
1162/*--- Text state ---------------------------------------------------------*/
1163
1164/* Tc */
1165    pub fn HPDF_Page_SetCharSpace  (page:   HPDF_Page,
1166                                     value : HPDF_REAL)->HPDF_STATUS;
1167//
1168//* Tw */
1169    pub fn HPDF_Page_SetWordSpace  (page : HPDF_Page, 
1170                                    value: HPDF_REAL, )->HPDF_STATUS;
1171//
1172//* Tz */
1173    pub fn HPDF_Page_SetHorizontalScalling  ( page: HPDF_Page,
1174                                              value: HPDF_REAL )->HPDF_STATUS;
1175//
1176//* TL */
1177    pub fn HPDF_Page_SetTextLeading  (page : HPDF_Page,
1178                                      value: HPDF_REAL )->HPDF_STATUS;
1179//
1180//* Tf */
1181    pub fn HPDF_Page_SetFontAndSize  (page:  HPDF_Page ,
1182                                       font:  HPDF_Font,
1183                                       size:  HPDF_REAL)->HPDF_STATUS;
1184
1185//* Tr */
1186    pub fn HPDF_Page_SetTextRenderingMode  (page: HPDF_Page,
1187                                          mode: HPDF_TextRenderingMode)->HPDF_STATUS;
1188//
1189//* Ts */
1190//HPDF_EXPORT(HPDF_STATUS)
1191//HPDF_Page_SetTextRise  (HPDF_Page   page,
1192//                        HPDF_REAL   value);
1193//
1194//* This function is obsolete. Use HPDF_Page_SetTextRise.  */
1195//HPDF_EXPORT(HPDF_STATUS)
1196//HPDF_Page_SetTextRaise  (HPDF_Page   page,
1197//                         HPDF_REAL   value);
1198//
1199//
1200/*--- Text positioning ---------------------------------------------------*/
1201
1202/* Td */
1203    pub fn HPDF_Page_MoveTextPos(page:  HPDF_Page,
1204                                 x:     HPDF_REAL,
1205                                 y:     HPDF_REAL)->HPDF_STATUS;
1206
1207/* TD */
1208    pub fn HPDF_Page_MoveTextPos2  ( page:  HPDF_Page,
1209                                     x:     HPDF_REAL,
1210                                     y:     HPDF_REAL)->HPDF_STATUS;
1211
1212/* Tm */
1213    pub fn HPDF_Page_SetTextMatrix  ( page:    HPDF_Page,
1214                                      a:    HPDF_REAL,
1215                                      b:    HPDF_REAL,
1216                                      c:    HPDF_REAL,
1217                                      d:    HPDF_REAL,
1218                                      x:    HPDF_REAL,
1219                                      y:    HPDF_REAL)->HPDF_STATUS;
1220
1221
1222/* T* */
1223    pub fn HPDF_Page_MoveToNextLine  (page: HPDF_Page)->HPDF_STATUS;
1224/*--- Text showing -------------------------------------------------------*/
1225
1226/* Tj */
1227    pub fn HPDF_Page_ShowText(page: HPDF_Page,
1228                             text: *const libc::c_char)->HPDF_STATUS;
1229
1230/* TJ */
1231
1232/* ' */
1233    pub fn HPDF_Page_ShowTextNextLine (page: HPDF_Page,                       
1234                                   text: *const libc::c_char)->HPDF_STATUS; 
1235
1236/* " */
1237    pub fn HPDF_Page_ShowTextNextLineEx(page      :  HPDF_Page,
1238                                        word_space: HPDF_REAL,
1239                                        char_space: HPDF_REAL,
1240                                        text      :  *const libc::c_char )->HPDF_STATUS;
1241
1242/*--- Color showing ------------------------------------------------------*/
1243
1244/* cs --not implemented yet */
1245/* CS --not implemented yet */
1246/* sc --not implemented yet */
1247/* scn --not implemented yet */
1248/* SC --not implemented yet */
1249/* SCN --not implemented yet */
1250
1251/* g */
1252    pub fn HPDF_Page_SetGrayFill  (page: HPDF_Page ,
1253                                  gray: HPDF_REAL)->HPDF_STATUS;
1254
1255/* G */
1256    pub fn HPDF_Page_SetGrayStroke  (page: HPDF_Page  ,
1257                                    gray: HPDF_REAL   )->HPDF_STATUS;
1258
1259/* rg */
1260    pub fn HPDF_Page_SetRGBFill  (page: HPDF_Page,
1261                                   r   : HPDF_REAL,
1262                                   g   : HPDF_REAL,
1263                                   b   : HPDF_REAL)->HPDF_STATUS;
1264
1265/* RG */
1266    pub fn HPDF_Page_SetRGBStroke  (page: HPDF_Page,   
1267                                    r:    HPDF_REAL,  
1268                                    g:    HPDF_REAL,  
1269                                    b:    HPDF_REAL,  )->HPDF_STATUS;
1270
1271/* k */
1272    pub fn HPDF_Page_SetCMYKFill  (page: HPDF_Page,   
1273                                   c:    HPDF_REAL,  
1274                                   m:    HPDF_REAL,  
1275                                   y:    HPDF_REAL,  
1276                                   k:    HPDF_REAL,  )->HPDF_STATUS;
1277
1278/* K */
1279    pub fn HPDF_Page_SetCMYKStroke  (page: HPDF_Page,  
1280                                     c:    HPDF_REAL, 
1281                                     m:    HPDF_REAL, 
1282                                     y:    HPDF_REAL, 
1283                                     k:    HPDF_REAL,    )->HPDF_STATUS;
1284
1285
1286/*--------------------------------------------------------------------------*/
1287/*----- GRAPHICS OPERATORS -------------------------------------------------*/
1288
1289
1290/*--- General graphics state ---------------------------------------------*/
1291
1292/* w */
1293    pub fn HPDF_Page_SetLineWidth  (page: HPDF_Page,
1294                                    line_width: HPDF_REAL)->HPDF_STATUS;
1295
1296/* J */
1297    pub fn HPDF_Page_SetLineCap  (  page    : HPDF_Page,
1298                                    line_cap: HPDF_LineCap)->HPDF_STATUS;
1299
1300///* j */
1301    pub fn HPDF_Page_SetLineJoin(page       : HPDF_Page ,
1302                                 line_join  : HPDF_LineJoin)->HPDF_STATUS;
1303
1304///* M */
1305    pub fn HPDF_Page_SetMiterLimit  (page: HPDF_Page,
1306                                      miter_limit: HPDF_REAL)->HPDF_STATUS;
1307//
1308///* d */
1309    pub fn HPDF_Page_SetDash  (  page      :  HPDF_Page,       
1310                                  dash_ptn  : *const HPDF_UINT16,
1311                                  num_param : HPDF_UINT, 
1312                                  phase     : HPDF_UINT         )->HPDF_STATUS;
1313
1314
1315
1316/* ri --not implemented yet */
1317
1318///* i */
1319//HPDF_EXPORT(HPDF_STATUS)
1320//HPDF_Page_SetFlat  (HPDF_Page    page,
1321//                    HPDF_REAL    flatness);
1322//
1323///* gs */
1324
1325    pub fn HPDF_Page_SetExtGState  (page       : HPDF_Page ,
1326                                    ext_gstate : HPDF_ExtGState )->HPDF_STATUS;
1327
1328
1329///*--- Special graphic state operator --------------------------------------*/
1330//
1331///* q */
1332    pub fn HPDF_Page_GSave  (page: HPDF_Page)->HPDF_STATUS;
1333//
1334///* Q */
1335    pub fn HPDF_Page_GRestore  (page: HPDF_Page)->HPDF_STATUS;
1336//
1337///* cm */
1338    pub fn HPDF_Page_Concat  (page  :   HPDF_Page,    
1339                               a     :   HPDF_REAL,    
1340                               b     :   HPDF_REAL,    
1341                               c     :   HPDF_REAL,    
1342                               d     :   HPDF_REAL,    
1343                               x     :   HPDF_REAL,    
1344                               y     :   HPDF_REAL  )->HPDF_STATUS;
1345
1346/*--- Path construction operator ------------------------------------------*/
1347
1348/* m */
1349    pub fn HPDF_Page_MoveTo  (page : HPDF_Page,
1350                               x   : HPDF_REAL,
1351                               y   : HPDF_REAL)->HPDF_STATUS;
1352
1353//* l */
1354    pub fn HPDF_Page_LineTo  (page: HPDF_Page,    
1355                               x:   HPDF_REAL,    
1356                               y:    HPDF_REAL, )->HPDF_STATUS;
1357
1358//* c */
1359    pub fn HPDF_Page_CurveTo  (page : HPDF_Page,
1360                                x1   : HPDF_REAL,  
1361                                y1   : HPDF_REAL,  
1362                                x2   : HPDF_REAL,  
1363                                y2   : HPDF_REAL,  
1364                                x3   : HPDF_REAL,  
1365                                y3   : HPDF_REAL   )->HPDF_STATUS;
1366
1367//* v */
1368//HPDF_EXPORT(HPDF_STATUS)
1369    pub fn HPDF_Page_CurveTo2  (page    : HPDF_Page, 
1370                                 x2      : HPDF_REAL, 
1371                                 y2      : HPDF_REAL, 
1372                                 x3      : HPDF_REAL, 
1373                                 y3      : HPDF_REAL  )->HPDF_STATUS;
1374
1375//* y */
1376    pub fn HPDF_Page_CurveTo3  (page    : HPDF_Page,  
1377                                 x1      : HPDF_REAL,  
1378                                 y1      : HPDF_REAL,  
1379                                 x3      : HPDF_REAL,  
1380                                 y3      : HPDF_REAL  )->HPDF_STATUS;
1381
1382//* h */
1383//HPDF_EXPORT(HPDF_STATUS)
1384    pub fn HPDF_Page_ClosePath  (page: HPDF_Page)->HPDF_STATUS;
1385
1386/* re */
1387    pub fn HPDF_Page_Rectangle  (page   : HPDF_Page,
1388                                  x     : HPDF_REAL,
1389                                  y     : HPDF_REAL,
1390                                  width : HPDF_REAL,
1391                                  height: HPDF_REAL)->HPDF_STATUS;
1392
1393
1394/*--- Path painting operator ---------------------------------------------*/
1395
1396/* S */
1397    pub fn HPDF_Page_Stroke  (page: HPDF_Page)->HPDF_STATUS;
1398
1399/* s */
1400    pub fn HPDF_Page_ClosePathStroke  (page: HPDF_Page)->HPDF_STATUS;
1401//
1402//* f */
1403    pub fn HPDF_Page_Fill  (page: HPDF_Page)->HPDF_STATUS;
1404
1405//* f* */
1406    pub fn HPDF_Page_Eofill  (page: HPDF_Page )->HPDF_STATUS;
1407
1408//* B */
1409    pub fn HPDF_Page_FillStroke  (page: HPDF_Page)->HPDF_STATUS;
1410
1411//* B* */
1412    pub fn HPDF_Page_EofillStroke  (page: HPDF_Page)->HPDF_STATUS;
1413
1414//* b */
1415    pub fn HPDF_Page_ClosePathFillStroke  (page: HPDF_Page)->HPDF_STATUS;
1416
1417//* b* */
1418    pub fn HPDF_Page_ClosePathEofillStroke  (page: HPDF_Page)->HPDF_STATUS;
1419
1420//* n */
1421    pub fn HPDF_Page_EndPath  (page: HPDF_Page)->HPDF_STATUS;
1422/*--- Clipping paths operator --------------------------------------------*/
1423
1424/* W */
1425    pub fn HPDF_Page_Clip  (page: HPDF_Page)->HPDF_STATUS;
1426
1427/* W* */
1428    pub fn HPDF_Page_Eoclip  (page: HPDF_Page)->HPDF_STATUS;
1429/*--------------------------------------------------------------------------*/
1430/*----- encryption ---------------------------------------------------------*/
1431
1432    pub fn  HPDF_SetPassword  (pdf          :   HPDF_Doc,
1433                               owner_passwd : *const libc::c_char,
1434                               user_passwd  : *const libc::c_char)->HPDF_STATUS;
1435
1436
1437    pub fn  HPDF_SetPermission  (pdf    :   HPDF_Doc,
1438                                 permission : HPDF_UINT)->HPDF_STATUS;
1439
1440
1441    pub fn  HPDF_SetEncryptionMode  ( pdf       :   HPDF_Doc,       
1442                                      mode      :   HPDF_EncryptMode, 
1443                                      key_len   :   HPDF_UINT         )->HPDF_STATUS;
1444
1445
1446/*--------------------------------------------------------------------------*/
1447/*----- compression --------------------------------------------------------*/
1448
1449    pub fn HPDF_SetCompressionMode( pdf : HPDF_Doc,
1450                                    mode: HPDF_UINT )->HPDF_STATUS;
1451
1452/*--------------------------------------------------------------------------*/
1453/*----- font ---------------------------------------------------------------*/
1454
1455    pub fn HPDF_Font_GetFontName  (font : HPDF_Font )->*const libc::c_char;
1456
1457
1458    pub fn HPDF_Font_GetEncodingName  (font : HPDF_Font )->*const libc::c_char;
1459
1460
1461    pub fn HPDF_Font_GetUnicodeWidth  (font : HPDF_Font,
1462                                       code : HPDF_UNICODE)->HPDF_INT;
1463
1464    pub fn HPDF_Font_GetBBox  (font : HPDF_Font)->HPDF_Box;
1465
1466
1467    pub fn HPDF_Font_GetAscent  (font : HPDF_Font)->HPDF_INT;
1468
1469
1470    pub fn HPDF_Font_GetDescent  (font : HPDF_Font )->HPDF_INT;
1471
1472
1473    pub fn HPDF_Font_GetXHeight  (font : HPDF_Font)->HPDF_UINT;
1474
1475
1476    pub fn HPDF_Font_GetCapHeight  (font : HPDF_Font)->HPDF_UINT;
1477
1478
1479    pub fn  HPDF_Font_TextWidth  (font : HPDF_Font,
1480                                  text : *const libc::c_char,
1481                                  len  : HPDF_UINT           )->HPDF_TextWidth;
1482
1483
1484    pub fn HPDF_Font_MeasureText ( font      : HPDF_Font,
1485                                text      : *const HPDF_BYTE,
1486                                len       : HPDF_UINT,
1487                                width     : HPDF_REAL,
1488                                font_size : HPDF_REAL,
1489                                char_space: HPDF_REAL,
1490                                word_space: HPDF_REAL,
1491                                word_wrap : HPDF_BOOL,
1492                                real_width: &mut HPDF_REAL)->HPDF_UINT;
1493
1494
1495/*--------------------------------------------------------------------------*/
1496/*----- attachements -------------------------------------------------------*/
1497
1498    pub fn HPDF_AttachFile  (pdf:  HPDF_Doc ,
1499                              file: *const libc::c_char ) -> HPDF_EmbeddedFile;
1500
1501/*--------------------------------------------------------------------------*/
1502/*----- extended graphics state --------------------------------------------*/
1503
1504    pub fn HPDF_CreateExtGState  (pdf: HPDF_Doc )->HPDF_ExtGState;
1505
1506
1507    pub fn HPDF_ExtGState_SetAlphaStroke  ( ext_gstate  :  HPDF_ExtGState,
1508                                             value      :  HPDF_REAL         )->HPDF_STATUS;
1509
1510
1511    pub fn HPDF_ExtGState_SetAlphaFill  (ext_gstate : HPDF_ExtGState,
1512                                         value      :  HPDF_REAL ) ->HPDF_STATUS;
1513
1514
1515
1516    pub fn HPDF_ExtGState_SetBlendMode  (ext_gstate : HPDF_ExtGState,
1517                                         mode       : HPDF_BlendMode)->HPDF_STATUS;
1518
1519
1520/*--------------------------------------------------------------------------*/
1521/*--------------------------------------------------------------------------*/
1522
1523    pub fn HPDF_Page_TextWidth( page: HPDF_Page,
1524                      text: *const libc::c_char )-> HPDF_REAL;
1525
1526
1527    pub fn HPDF_Page_MeasureText  (page: HPDF_Page,
1528                        text: *const libc::c_char,
1529                        width: HPDF_REAL,
1530                        wordwrap: HPDF_BOOL,
1531                        real_width: *mut HPDF_REAL)-> HPDF_UINT;
1532
1533
1534    pub fn HPDF_Page_GetWidth  (page: HPDF_Page)-> HPDF_REAL;
1535
1536
1537    pub fn HPDF_Page_GetHeight (page: HPDF_Page)->HPDF_REAL;
1538
1539
1540    pub fn HPDF_Page_GetGMode  (page: HPDF_Page)-> HPDF_UINT16;
1541
1542
1543    pub fn HPDF_Page_GetCurrentPos (page: HPDF_Page)-> HPDF_Point;
1544
1545
1546    pub fn HPDF_Page_GetCurrentPos2  (page: HPDF_Page,
1547                                      pos: *mut HPDF_Point)->HPDF_STATUS;
1548
1549
1550    pub fn HPDF_Page_GetCurrentTextPos (page: HPDF_Page)->HPDF_Point;
1551
1552
1553    pub fn HPDF_Page_GetCurrentTextPos2  (page: HPDF_Page,
1554                                          pos: *mut HPDF_Point)->HPDF_STATUS;
1555
1556
1557    pub fn HPDF_Page_GetCurrentFont  (page: HPDF_Page)->HPDF_Font;
1558
1559
1560    pub fn HPDF_Page_GetCurrentFontSize  (page: HPDF_Page)->HPDF_REAL;
1561
1562
1563    pub fn HPDF_Page_GetTransMatrix  (page: HPDF_Page)->HPDF_TransMatrix;
1564
1565
1566    pub fn HPDF_Page_GetLineWidth  (page: HPDF_Page)->HPDF_REAL;
1567
1568
1569    pub fn HPDF_Page_GetLineCap  (page: HPDF_Page)->HPDF_LineCap;
1570
1571
1572    pub fn HPDF_Page_GetLineJoin  (page: HPDF_Page)->HPDF_LineJoin;
1573
1574
1575    pub fn HPDF_Page_GetMiterLimit  (page: HPDF_Page)->HPDF_REAL;
1576
1577
1578    pub fn HPDF_Page_GetDash  (page: HPDF_Page)->HPDF_DashMode;
1579
1580
1581    pub fn HPDF_Page_GetFlat  (page: HPDF_Page)->HPDF_REAL;
1582
1583
1584    pub fn HPDF_Page_GetCharSpace  (page: HPDF_Page)->HPDF_REAL;
1585
1586
1587    pub fn HPDF_Page_GetWordSpace  (page: HPDF_Page)->HPDF_REAL;
1588
1589
1590    pub fn HPDF_Page_GetHorizontalScalling  (page: HPDF_Page)->HPDF_REAL;
1591
1592
1593    pub fn HPDF_Page_GetTextLeading  (page: HPDF_Page)->HPDF_REAL;
1594
1595
1596    pub fn HPDF_Page_GetTextRenderingMode  (page: HPDF_Page)->HPDF_TextRenderingMode;
1597
1598
1599/* This function is obsolete. Use HPDF_Page_GetTextRise.  */
1600////HPDF_EXPORT(XXXX)
1601////HPDF_Page_GetTextRaise  (XXXX   XXXX);
1602
1603
1604    pub fn HPDF_Page_GetTextRise  (page: HPDF_Page)->HPDF_REAL;
1605
1606
1607    pub fn HPDF_Page_GetRGBFill  (page: HPDF_Page)->HPDF_RGBColor;
1608
1609
1610    pub fn HPDF_Page_GetRGBStroke  (page: HPDF_Page)->HPDF_RGBColor;
1611
1612
1613    pub fn HPDF_Page_GetCMYKFill  (page: HPDF_Page)->HPDF_CMYKColor;
1614
1615
1616    pub fn HPDF_Page_GetCMYKStroke  (page: HPDF_Page)->HPDF_CMYKColor;
1617
1618
1619    pub fn HPDF_Page_GetGrayFill  (page: HPDF_Page)->HPDF_REAL;
1620
1621
1622    pub fn HPDF_Page_GetGrayStroke  (page: HPDF_Page)->HPDF_REAL;
1623
1624
1625    pub fn HPDF_Page_GetStrokingColorSpace (page: HPDF_Page)->HPDF_ColorSpace;
1626
1627
1628    pub fn HPDF_Page_GetFillingColorSpace (page: HPDF_Page)->HPDF_ColorSpace;
1629
1630
1631    pub fn HPDF_Page_GetTextMatrix  (page: HPDF_Page)->HPDF_TransMatrix;
1632
1633
1634    pub fn HPDF_Page_GetGStateDepth  (page: HPDF_Page)->HPDF_UINT;
1635/*---------------------------------------------------------------------------*/
1636/*---------------------------------------------------------------------------*/
1637
1638    pub fn HPDF_GetPageMMgr    (page : HPDF_Page)->HPDF_MMgr;
1639
1640    pub fn HPDF_GetPageLayout  (pdf : HPDF_Doc )->HPDF_PageLayout;
1641
1642
1643    pub fn HPDF_SetPageLayout  (pdf     : HPDF_Doc,
1644                                layout  : HPDF_PageLayout)->HPDF_STATUS;
1645
1646
1647    pub fn HPDF_GetPageMode  (pdf  : HPDF_Doc)->HPDF_PageMode;
1648
1649
1650    pub fn HPDF_SetPageMode  (pdf  : HPDF_Doc,
1651                              mode : HPDF_PageMode )->HPDF_STATUS;
1652
1653
1654    pub fn HPDF_GetViewerPreference  (pdf : HPDF_Doc)->HPDF_UINT;
1655
1656
1657    pub fn HPDF_SetViewerPreference  (pdf       : HPDF_Doc,
1658                                      value     : HPDF_UINT)->HPDF_STATUS;
1659
1660
1661    pub fn HPDF_SetOpenAction  (pdf: HPDF_Doc ,
1662                                 open_action: HPDF_Destination)->HPDF_STATUS;
1663
1664
1665/*---------------------------------------------------------------------------*/
1666/*----- page handling -------------------------------------------------------*/
1667
1668
1669    pub fn HPDF_GetCurrentPage  (pdf: HPDF_Doc)->HPDF_Page;
1670 
1671 
1672    pub fn HPDF_AddPage  (pdf: HPDF_Doc )->HPDF_Page;
1673
1674
1675    pub fn HPDF_InsertPage  (pdf:  HPDF_Doc  ,
1676                             page:  HPDF_Page)->HPDF_Page;
1677
1678
1679    pub fn HPDF_Page_SetWidth  (page : HPDF_Page ,
1680                                vale : HPDF_REAL )->HPDF_STATUS;
1681
1682
1683    pub fn HPDF_Page_SetHeight  (page:  HPDF_Page ,
1684                                  value: HPDF_REAL)->HPDF_STATUS;
1685
1686
1687    pub fn HPDF_Page_SetSize  (page      :    HPDF_Page         ,   
1688                               size      :    HPDF_PageSizes    ,   
1689                               direction : HPDF_PageDirection   )->HPDF_STATUS;
1690
1691
1692    pub fn HPDF_Page_SetRotate  (page:   HPDF_Page ,
1693                                 angle : HPDF_UINT16  )->HPDF_STATUS;
1694
1695
1696    pub fn HPDF_Page_SetZoom  (page    : HPDF_Page ,
1697                               zoom    : HPDF_REAL     )->HPDF_STATUS;
1698
1699
1700/*---------------------------------------------------------------------------*/
1701/*----- font handling -------------------------------------------------------*/
1702
1703
1704    pub fn HPDF_GetFont  (pdf: HPDF_Doc,
1705                           font_name: *const libc::c_char,
1706                           encoding_name: *const libc::c_char)->HPDF_Font;
1707    
1708
1709    pub fn HPDF_LoadType1FontFromFile  (pdf           : HPDF_Doc,
1710                                        afm_file_name : *const libc::c_char,
1711                                        data_file_name: *const libc::c_char)->*const libc::c_char;
1712
1713
1714    pub fn HPDF_GetTTFontDefFromFile (pdf       : HPDF_Doc,
1715                                      file_name : *const libc::c_char,
1716                                      embedding :  HPDF_BOOL)->HPDF_FontDef;
1717
1718    pub fn HPDF_LoadTTFontFromFile (pdf: HPDF_Doc,
1719                                     file_name: *const libc::c_char,
1720                                     embedding: HPDF_BOOL)-> *const libc::c_char;
1721
1722
1723    pub fn  HPDF_LoadTTFontFromFile2 (pdf        : HPDF_Doc, 
1724                                      file_name  : *const libc::c_char,
1725                                      index      : HPDF_UINT,    
1726                                      embedding  : HPDF_BOOL    )->*const libc::c_char;
1727
1728	pub fn HPDF_LoadTTFontFromMemory ( pdf		: HPDF_Doc,
1729									   buffer	: *const HPDF_BYTE,
1730									   size		: HPDF_UINT,
1731									   embedding: HPDF_BOOL)->*const libc::c_char;
1732
1733
1734    pub fn HPDF_AddPageLabel  (pdf         :  HPDF_Doc,
1735                               page_num    :  HPDF_UINT,
1736                               style       :  HPDF_PageNumStyle,
1737                               first_page  :  HPDF_UINT,
1738                               prefix      : *const libc::c_char)->HPDF_STATUS;
1739
1740
1741    pub fn HPDF_UseJPFonts   (pdf : HPDF_Doc)->HPDF_STATUS;
1742
1743
1744    pub fn HPDF_UseKRFonts   (pdf : HPDF_Doc)->HPDF_STATUS;
1745
1746
1747    pub fn HPDF_UseCNSFonts   (pdf : HPDF_Doc )->HPDF_STATUS;
1748
1749
1750    pub fn HPDF_UseCNTFonts   (pdf : HPDF_Doc  )->HPDF_STATUS;
1751
1752/*--------------------------------------------------------------------------*/
1753/*----- outline ------------------------------------------------------------*/
1754
1755
1756    pub fn  HPDF_CreateOutline  (pdf     : HPDF_Doc    ,
1757                                 parent  : HPDF_Outline,
1758                                 title   : *const libc::c_char,
1759                                 encoder : HPDF_Encoder    )->HPDF_Outline;
1760
1761
1762    pub fn  HPDF_Outline_SetOpened  (outline : HPDF_Outline,
1763                                     opened  : HPDF_BOOL)->HPDF_STATUS;
1764
1765
1766    pub fn  HPDF_Outline_SetDestination (outline : HPDF_Outline,
1767                                         dst : HPDF_Destination )->HPDF_STATUS;
1768
1769
1770/*--------------------------------------------------------------------------*/
1771/*----- destination --------------------------------------------------------*/
1772
1773    pub fn HPDF_Page_CreateDestination (page: HPDF_Page)->HPDF_Destination ;
1774
1775
1776    pub fn HPDF_Destination_SetXYZ  (dst  : HPDF_Destination, 
1777                                      left : HPDF_REAL,        
1778                                      top  : HPDF_REAL,        
1779                                      zoom : HPDF_REAL)->HPDF_STATUS;
1780
1781
1782    pub fn HPDF_Destination_SetFit  (dst : HPDF_Destination)->HPDF_STATUS;
1783
1784
1785    pub fn HPDF_Destination_SetFitH  (dst       : HPDF_Destination,
1786                                      top       : HPDF_REAL)->HPDF_STATUS;
1787
1788
1789    pub fn HPDF_Destination_SetFitV  (dst    : HPDF_Destination,
1790                                      left   : HPDF_REAL)->HPDF_STATUS;
1791
1792
1793    pub fn HPDF_Destination_SetFitR  (dst    : HPDF_Destination,
1794                                      left   : HPDF_REAL,
1795                                      bottom : HPDF_REAL,
1796                                      right  : HPDF_REAL,
1797                                      top    : HPDF_REAL)->HPDF_STATUS;
1798
1799
1800    pub fn HPDF_Destination_SetFitB  (dst  : HPDF_Destination)->HPDF_STATUS;
1801
1802
1803    pub fn HPDF_Destination_SetFitBH  (dst   : HPDF_Destination,
1804                                       top   : HPDF_REAL)->HPDF_STATUS;
1805
1806
1807    pub fn HPDF_Destination_SetFitBV  (dst :   HPDF_Destination,
1808                                       left:   HPDF_REAL)->HPDF_STATUS;
1809
1810/*--------------------------------------------------------------------------*/
1811/*----- encoder ------------------------------------------------------------*/
1812
1813    pub fn HPDF_GetEncoder  (pdf           : HPDF_Doc,
1814                             encoding_name : *const libc::c_char)->HPDF_Encoder;
1815
1816
1817    pub fn HPDF_GetCurrentEncoder  (pdf : HPDF_Doc)->HPDF_Encoder;
1818
1819
1820    pub fn HPDF_SetCurrentEncoder  (pdf           : HPDF_Doc,
1821                                    encoding_name : *const libc::c_char)->HPDF_STATUS;
1822
1823
1824    pub fn HPDF_Encoder_GetType  (encoder : HPDF_Encoder  )->HPDF_EncoderType;
1825
1826
1827    pub fn HPDF_Encoder_GetByteType  (encoder   : HPDF_Encoder,
1828                                      text      : *const libc::c_char,
1829                                      index     : HPDF_UINT)->HPDF_ByteType;
1830
1831
1832    pub fn HPDF_Encoder_GetUnicode  (encoder : HPDF_Encoder ,
1833                                     code : HPDF_UINT16 )->HPDF_UNICODE;
1834
1835
1836    pub fn HPDF_Encoder_GetWritingMode (encoder : HPDF_Encoder )->HPDF_WritingMode;
1837
1838
1839    pub fn HPDF_UseJPEncodings   (pdf : HPDF_Doc  )->HPDF_STATUS;
1840
1841
1842
1843    pub fn HPDF_UseKREncodings   (pdf : HPDF_Doc )->HPDF_STATUS;
1844
1845
1846
1847    pub fn HPDF_UseCNSEncodings   (pdf : HPDF_Doc )->HPDF_STATUS;
1848
1849
1850
1851    pub fn HPDF_UseCNTEncodings   (pdf : HPDF_Doc )->HPDF_STATUS;
1852
1853
1854    pub fn HPDF_UseUTFEncodings   (pdf : HPDF_Doc)->HPDF_STATUS;
1855
1856
1857    
1858/*--------------------------------------------------------------------------*/
1859/*----- annotation ---------------------------------------------------------*/
1860
1861	pub fn HPDF_Page_Create3DAnnot    (page : HPDF_Page ,
1862										rect : HPDF_Rect ,
1863										tb   : HPDF_BOOL ,
1864										np   : HPDF_BOOL ,
1865										u3d  : HPDF_U3D  ,
1866										ap   : HPDF_Image  )->HPDF_Annotation;
1867
1868    pub fn  HPDF_Page_CreateTextAnnot  (page      :   HPDF_Page,       
1869                                        rect      :   HPDF_Rect,       
1870                                        text      :  *const libc::c_char,
1871                                        encoder   :   HPDF_Encoder    )->HPDF_Annotation;
1872
1873	pub fn HPDF_Page_CreateFreeTextAnnot  ( page   : HPDF_Page,     
1874										   rect   : HPDF_Rect,      
1875										   text   : *const libc::c_char,
1876										   encoder : HPDF_Encoder   )->HPDF_Annotation;
1877
1878	pub fn HPDF_Page_CreateLineAnnot  ( page : HPDF_Page,
1879										text : *const libc::c_char,
1880										encoder : HPDF_Encoder)->HPDF_Annotation;
1881
1882	pub fn HPDF_Page_CreateWidgetAnnot_WhiteOnlyWhilePrint (pdf  : HPDF_Doc  ,
1883															page : HPDF_Page ,
1884															rect : HPDF_Rect )->HPDF_Annotation;
1885
1886	pub fn HPDF_Page_CreateWidgetAnnot (page : HPDF_Page  ,
1887										rect : HPDF_Rect  )->HPDF_Annotation;
1888
1889    pub fn HPDF_Page_CreateLinkAnnot  (page : HPDF_Page          ,
1890                                        rect : HPDF_Rect          ,
1891                                        dst  : HPDF_Destination    )->HPDF_Annotation ;
1892
1893
1894    pub fn HPDF_Page_CreateURILinkAnnot  (page: HPDF_Page,
1895                                           rect: HPDF_Rect,
1896                                           uri : *const libc::c_char)->HPDF_Annotation;
1897
1898
1899	pub fn HPDF_Page_CreateTextMarkupAnnot (page    : HPDF_Page,
1900								   rect    : HPDF_Rect,      
1901								   text    : *const libc::c_char,     
1902								   encoder : HPDF_Encoder,
1903								   subType : HPDF_AnnotType )->HPDF_Annotation;
1904
1905	pub fn HPDF_Page_CreateHighlightAnnot  (page : HPDF_Page,
1906											rect : HPDF_Rect,
1907											tect : *const libc::c_char,
1908											encoder: HPDF_Encoder)->HPDF_Annotation;
1909
1910	pub fn HPDF_Page_CreateUnderlineAnnot (page    : HPDF_Page,
1911										   rect    : HPDF_Rect,   
1912										   text    : *const libc::c_char,   
1913										   encoder : HPDF_Encoder )->HPDF_Annotation;
1914
1915	pub fn HPDF_Page_CreateSquigglyAnnot  (page : HPDF_Page,
1916											  rect : HPDF_Rect,
1917											  text : *const libc::c_char,
1918											  encoder : HPDF_Encoder)->HPDF_Annotation;
1919
1920	pub fn HPDF_Page_CreateStrikeOutAnnot  (page   : HPDF_Page,   
1921										   rect   : HPDF_Rect, 
1922										   text   : *const libc::c_char,
1923										   encoder : HPDF_Encoder )->HPDF_Annotation;
1924
1925	pub fn HPDF_Page_CreatePopupAnnot  (	page : HPDF_Page,
1926											rect : HPDF_Rect,
1927											parent : HPDF_Annotation)->HPDF_Annotation;
1928
1929	pub fn HPDF_Page_CreateStampAnnot  (	page  	:	HPDF_Page ,
1930											rect  	:	HPDF_Rect ,
1931											name  	:	HPDF_StampAnnotName ,
1932											text  	:	*const libc::c_char,
1933											encoder	:	HPDF_Encoder)->HPDF_Annotation;
1934
1935	pub fn HPDF_Page_CreateProjectionAnnot(page : HPDF_Page,
1936											rect : HPDF_Rect,
1937											text : *const libc::c_char,
1938											encoder : HPDF_Encoder)->HPDF_Annotation;
1939
1940	pub fn HPDF_Page_CreateSquareAnnot (page    : HPDF_Page,       
1941							   rect    : HPDF_Rect, 
1942							   text    : *const libc::c_char,
1943							   encoder : HPDF_Encoder)->HPDF_Annotation;
1944
1945	pub fn HPDF_Page_CreateCircleAnnot (  page	:	HPDF_Page,
1946										 rect	:   HPDF_Rect,          
1947										 text	:  *const libc::c_char,
1948										 encoder:   HPDF_Encoder )->HPDF_Annotation;
1949
1950    pub fn HPDF_LinkAnnot_SetHighlightMode  (annot: HPDF_Annotation, 
1951                                              mode : HPDF_AnnotHighlightMode   )->HPDF_STATUS;
1952
1953	pub fn HPDF_LinkAnnot_SetJavaScript(annot    	:	HPDF_Annotation,    
1954									 javascript	:	HPDF_JavaScript    )->HPDF_STATUS;
1955
1956    pub fn HPDF_LinkAnnot_SetBorderStyle  (annot   : HPDF_Annotation,
1957                                            width   : HPDF_REAL,  
1958                                            dash_on : HPDF_UINT16,      
1959                                            dash_off: HPDF_UINT16      )->HPDF_STATUS;
1960
1961
1962    pub fn  HPDF_TextAnnot_SetIcon  (annot    :   HPDF_Annotation, 
1963                                     icon     :   HPDF_AnnotIcon )->HPDF_STATUS;
1964
1965
1966    pub fn  HPDF_TextAnnot_SetOpened  (annot     :   HPDF_Annotation, 
1967                                       opened    :   HPDF_BOOL         )->HPDF_STATUS;
1968
1969    pub fn HPDF_Annot_SetRGBColor (annot: HPDF_Annotation, color : HPDF_RGBColor )->HPDF_STATUS;
1970
1971    pub fn HPDF_Annot_SetCMYKColor (annot : HPDF_Annotation, color : HPDF_CMYKColor)->HPDF_STATUS;
1972
1973    pub fn HPDF_Annot_SetGrayColor (annot : HPDF_Annotation, color : HPDF_REAL)->HPDF_STATUS;
1974
1975    pub fn HPDF_Annot_SetNoColor (annot : HPDF_Annotation)->HPDF_STATUS;
1976
1977    pub fn HPDF_MarkupAnnot_SetTitle (annot : HPDF_Annotation, name : *const libc::c_char)->HPDF_STATUS;
1978
1979    pub fn HPDF_MarkupAnnot_SetSubject (annot : HPDF_Annotation, name : *const libc::c_char)->HPDF_STATUS;
1980
1981    pub fn HPDF_MarkupAnnot_SetCreationDate (annot : HPDF_Annotation, value : HPDF_Date)->HPDF_STATUS;
1982
1983    pub fn HPDF_MarkupAnnot_SetTransparency (annot : HPDF_Annotation, value : HPDF_REAL)->HPDF_STATUS;
1984
1985	pub fn HPDF_MarkupAnnot_SetIntent (annot	:	HPDF_Annotation, intent	:	HPDF_AnnotIntent )->HPDF_STATUS;
1986
1987	pub fn HPDF_MarkupAnnot_SetPopup (annot	:	HPDF_Annotation, popup	:	HPDF_Annotation)->HPDF_STATUS;
1988
1989	pub fn HPDF_MarkupAnnot_SetRectDiff (annot	:	HPDF_Annotation, rect 	:	HPDF_Rect)->HPDF_STATUS; /* RD entry */
1990
1991	pub fn HPDF_MarkupAnnot_SetCloudEffect (annot	:	HPDF_Annotation, cloudIntensity	:	HPDF_INT)->HPDF_STATUS; /* BE entry */
1992
1993	pub fn HPDF_MarkupAnnot_SetInteriorRGBColor (annot	:	HPDF_Annotation, color	:	HPDF_RGBColor)->HPDF_STATUS; /* IC with RGB entry */
1994
1995	pub fn HPDF_MarkupAnnot_SetInteriorCMYKColor (annot	:	HPDF_Annotation, color	:	HPDF_CMYKColor)->HPDF_STATUS; /* IC with CMYK entry */
1996
1997	pub fn HPDF_MarkupAnnot_SetInteriorGrayColor (annot	:	HPDF_Annotation, color	:	HPDF_REAL)->HPDF_STATUS; /* IC with Gray entry */
1998
1999	pub fn HPDF_MarkupAnnot_SetInteriorTransparent (annot	:	HPDF_Annotation)->HPDF_STATUS; /* IC with No Color entry */
2000
2001	pub fn HPDF_TextMarkupAnnot_SetQuadPoints ( annot	:	HPDF_Annotation, 
2002												lb		:	HPDF_Point, 
2003												rb		: 	HPDF_Point, 
2004												rt		:	HPDF_Point, 
2005												lt		:	HPDF_Point)->HPDF_STATUS; /* l-left, r-right, b-bottom, t-top positions */
2006
2007	pub fn HPDF_Annot_Set3DView  ( mmgr   	:	HPDF_MMgr,    
2008								  annot  	:	HPDF_Annotation,	
2009								  annot3d	:	HPDF_Annotation,	
2010								  view    	:	HPDF_Dict		 )->HPDF_STATUS;
2011
2012	pub fn HPDF_PopupAnnot_SetOpened  (annot	:	HPDF_Annotation,
2013									   opened	: 	HPDF_BOOL )->HPDF_STATUS;
2014
2015	pub fn HPDF_FreeTextAnnot_SetLineEndingStyle (annot : HPDF_Annotation, startStyle : HPDF_LineAnnotEndingStyle, endStyle : HPDF_LineAnnotEndingStyle)->HPDF_STATUS;
2016
2017	pub fn HPDF_FreeTextAnnot_Set3PointCalloutLine (annot : HPDF_Annotation, startPoint : HPDF_Point, kneePoint : HPDF_Point, endPoint : HPDF_Point)->HPDF_STATUS; /* Callout line will be in default user space */
2018
2019	pub fn HPDF_FreeTextAnnot_Set2PointCalloutLine (annot : HPDF_Annotation, startPoint : HPDF_Point, endPoint : HPDF_Point)->HPDF_STATUS; /* Callout line will be in default user space */
2020
2021	pub fn HPDF_FreeTextAnnot_SetDefaultStyle (annot : HPDF_Annotation, style : *const libc::c_char)->HPDF_STATUS;
2022
2023	pub fn HPDF_LineAnnot_SetPosition (annot    : HPDF_Annotation ,
2024									startPoint : HPDF_Point , 
2025									startStyle : HPDF_LineAnnotEndingStyle ,
2026									endPoint   : HPDF_Point , 
2027									endStyle   : HPDF_LineAnnotEndingStyle )->HPDF_STATUS;
2028
2029	pub fn HPDF_LineAnnot_SetLeader (annot : HPDF_Annotation, leaderLen : HPDF_INT, leaderExtLen : HPDF_INT, leaderOffsetLen : HPDF_INT)->HPDF_STATUS;
2030
2031	pub fn HPDF_LineAnnot_SetCaption (annot : HPDF_Annotation, showCaption : HPDF_BOOL, position : HPDF_LineAnnotCapPosition, horzOffset : HPDF_INT, vertOffset : HPDF_INT)->HPDF_STATUS;
2032
2033	pub fn HPDF_Annotation_SetBorderStyle  (annot    	:	HPDF_Annotation,  
2034										 subtype  	:	HPDF_BSSubtype,  
2035										 width    	:	HPDF_REAL,       
2036										 dash_on  	:	HPDF_UINT16,     
2037										 dash_off 	:	HPDF_UINT16,     
2038										 dash_phase	:	HPDF_UINT16     )->HPDF_STATUS;
2039
2040	pub fn HPDF_ProjectionAnnot_SetExData(annot	:	HPDF_Annotation, exdata	:	HPDF_ExData)->HPDF_STATUS;
2041
2042/*--------------------------------------------------------------------------*/
2043/*----- image data ---------------------------------------------------------*/
2044
2045    pub fn HPDF_LoadPngImageFromMem  ( pdf:    HPDF_Doc,
2046                                    buffer: *const HPDF_BYTE,
2047                                    size:   HPDF_UINT    )->HPDF_Image;
2048
2049    pub fn HPDF_LoadPngImageFromFile (pdf:         HPDF_Doc   ,
2050                                   filename:    *const libc::c_char)->HPDF_Image;
2051
2052
2053    pub fn HPDF_LoadPngImageFromFile2 (pdf:        HPDF_Doc,
2054                                        filename: *const libc::c_char )->HPDF_Image;
2055
2056
2057    pub fn HPDF_LoadJpegImageFromFile (pdf:        HPDF_Doc,
2058                                        filename:  *const libc::c_char)->HPDF_Image;
2059
2060    pub fn HPDF_LoadJpegImageFromMem  (pdf:    HPDF_Doc  ,
2061                                      buffer: *const HPDF_BYTE ,
2062                                      size:   HPDF_UINT)->HPDF_Image;
2063
2064    pub fn HPDF_LoadU3DFromFile ( pdf      :  HPDF_Doc,
2065                                  filename :  *const libc::c_char)->HPDF_Image;
2066
2067    pub fn HPDF_LoadU3DFromMem  (pdf    : HPDF_Doc,
2068                                 buffer : *const HPDF_BYTE,
2069                                 size   : HPDF_UINT)->HPDF_Image;
2070
2071    pub fn HPDF_Image_LoadRaw1BitImageFromMem ( pdf:          HPDF_Doc,          
2072                                              buf:          *const HPDF_BYTE, 
2073                                              width:        HPDF_UINT,         
2074                                              height:       HPDF_UINT,         
2075                                              line_width:   HPDF_UINT,         
2076                                              black_is1:    HPDF_BOOL,         
2077                                              top_is_first: HPDF_BOOL  )->HPDF_Image;
2078
2079
2080    pub fn HPDF_LoadRawImageFromFile  (pdf:         HPDF_Doc,          
2081                                    filename:    *const libc::c_char,         
2082                                    width:       HPDF_UINT,          
2083                                    height:      HPDF_UINT,          
2084                                    color_space: HPDF_ColorSpace )->HPDF_Image;
2085
2086
2087    pub fn HPDF_LoadRawImageFromMem  (pdf:         HPDF_Doc,       
2088                                   buf:         *const HPDF_BYTE,
2089                                   width:       HPDF_UINT,    
2090                                   height:      HPDF_UINT,     
2091                                   color_space: HPDF_ColorSpace,
2092                                   bits_per_component: HPDF_UINT)->HPDF_Image;
2093
2094    pub fn HPDF_Image_AddSMask  (   image : HPDF_Image, 
2095                                     smask : HPDF_Image  )->HPDF_STATUS;
2096
2097     pub fn HPDF_Image_GetSize (image: HPDF_Image)->HPDF_Point;
2098
2099
2100    pub fn HPDF_Image_GetSize2 (image: HPDF_Image, size: *mut HPDF_Point)->HPDF_STATUS;
2101
2102
2103    pub fn HPDF_Image_GetWidth  (image: HPDF_Image  )->HPDF_UINT;
2104
2105
2106    pub fn HPDF_Image_GetHeight  (image: HPDF_Image )->HPDF_UINT;
2107
2108
2109    pub fn HPDF_Image_GetBitsPerComponent (image : HPDF_Image)->HPDF_UINT;
2110
2111
2112    pub fn HPDF_Image_GetColorSpace (image : HPDF_Image)-> *const libc::c_char;
2113
2114
2115    pub fn HPDF_Image_SetColorMask (image  :   HPDF_Image,
2116                                    rmin  :   HPDF_UINT,
2117                                    rmax  :   HPDF_UINT,
2118                                    gmin  :   HPDF_UINT,
2119                                    gmax  :   HPDF_UINT,
2120                                    bmin  :   HPDF_UINT,
2121                                    bmax  :   HPDF_UINT)->HPDF_STATUS;
2122
2123
2124    pub fn HPDF_Image_SetMaskImage  ( image       : HPDF_Image,
2125                                      mask_image  : HPDF_Image)->HPDF_STATUS;
2126
2127
2128
2129/*--- Compatibility ------------------------------------------------------*/
2130
2131/* BX --not implemented yet */
2132/* EX --not implemented yet */
2133
2134    pub fn HPDF_Page_DrawImage  (page  :   HPDF_Page,   
2135                              image :   HPDF_Image,   
2136                              x     :   HPDF_REAL,   
2137                              y     :   HPDF_REAL,   
2138                              width :   HPDF_REAL,   
2139                              height:   HPDF_REAL )->HPDF_STATUS;
2140
2141
2142    pub fn HPDF_Page_Circle  (page :     HPDF_Page,     
2143                              x    :     HPDF_REAL,     
2144                              y    :     HPDF_REAL,     
2145                              ray  :     HPDF_REAL )->HPDF_STATUS;
2146
2147
2148    pub fn HPDF_Page_Ellipse  ( page    : HPDF_Page, 
2149                                 x       : HPDF_REAL, 
2150                                 y       : HPDF_REAL, 
2151                                xray     : HPDF_REAL, 
2152                                yray     : HPDF_REAL  )->HPDF_STATUS;
2153
2154
2155    pub fn HPDF_Page_Arc  (page     : HPDF_Page,    
2156                            x        : HPDF_REAL,    
2157                            y        : HPDF_REAL,    
2158                            ray      : HPDF_REAL,    
2159                            ang1     : HPDF_REAL,    
2160                            ang2     : HPDF_REAL  )->HPDF_STATUS;
2161
2162
2163   pub fn  HPDF_Page_TextOut  (page:     HPDF_Page,
2164                                xpos:     HPDF_REAL,
2165                                ypos:     HPDF_REAL,
2166                                text:    *const libc::c_char)->HPDF_STATUS;
2167    
2168
2169    pub fn HPDF_Page_TextRect  (page   : HPDF_Page,            
2170                                 left   : HPDF_REAL,            
2171                                 top    : HPDF_REAL,            
2172                                 right  : HPDF_REAL,            
2173                                 bottom : HPDF_REAL,   
2174                                 text   : *const libc::c_char,
2175                                 align  : HPDF_TextAlignment,   
2176                                 len    : *mut HPDF_UINT  );
2177
2178
2179    pub fn HPDF_Page_SetSlideShow  ( page       : HPDF_Page,
2180                                     _type      : HPDF_TransitionStyle,
2181                                     disp_time  : HPDF_REAL,
2182                                     trans_time : HPDF_REAL)->HPDF_STATUS;
2183
2184
2185    pub fn HPDF_ICC_LoadIccFromMem (pdf        : HPDF_Doc   ,
2186                                    mmgr        : HPDF_MMgr   ,
2187                                    iccdata     : HPDF_Stream ,
2188                                    xref        : HPDF_Xref   ,
2189                                    numcomponent: i32)->HPDF_OutputIntent;
2190
2191    pub fn HPDF_LoadIccProfileFromFile  ( pdf: HPDF_Doc ,
2192                                          icc_file_nameconst : *mut libc::c_char,
2193                                          numcomponent: i32)->HPDF_OutputIntent;
2194
2195
2196
2197}
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207