2 * << Haru Free PDF Library >> -- hpdf_types.h
4 * URL: http://libharu.org
6 * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp>
7 * Copyright (c) 2007-2009 Antony Dovgal <tony@daylessday.org>
9 * Permission to use, copy, modify, distribute and sell this software
10 * and its documentation for any purpose is hereby granted without fee,
11 * provided that the above copyright notice appear in all copies and
12 * that both that copyright notice and this permission notice appear
13 * in supporting documentation.
14 * It is provided "as is" without express or implied warranty.
23 #define HPDF_STDCALL __stdcall
26 #define HPDF_STDCALL __stdcall
39 /*----------------------------------------------------------------------------*/
40 /*----- type definition ------------------------------------------------------*/
43 /* native OS integer types */
44 typedef signed int HPDF_INT;
45 typedef unsigned int HPDF_UINT;
48 /* 32bit integer types
50 typedef signed int HPDF_INT32;
51 typedef unsigned int HPDF_UINT32;
54 /* 16bit integer types
56 typedef signed short HPDF_INT16;
57 typedef unsigned short HPDF_UINT16;
62 typedef signed char HPDF_INT8;
63 typedef unsigned char HPDF_UINT8;
68 typedef unsigned char HPDF_BYTE;
71 /* float type (32bit IEEE754)
73 typedef float HPDF_REAL;
76 /* double type (64bit IEEE754)
78 typedef double HPDF_DOUBLE;
81 /* boolean type (0: False, !0: True)
83 typedef signed int HPDF_BOOL;
86 /* error-no type (32bit unsigned integer)
88 typedef unsigned long HPDF_STATUS;
91 /* charactor-code type (16bit)
93 typedef HPDF_UINT16 HPDF_CID;
94 typedef HPDF_UINT16 HPDF_UNICODE;
99 typedef struct _HPDF_Point {
104 typedef struct _HPDF_Rect {
111 /* HPDF_Point3D struct
113 typedef struct _HPDF_Point3D {
119 typedef struct _HPDF_Rect HPDF_Box;
123 typedef struct _HPDF_Date {
132 HPDF_INT off_minutes;
136 typedef enum _HPDF_InfoType {
137 /* date-time type parameters */
138 HPDF_INFO_CREATION_DATE = 0,
141 /* string type parameters */
155 typedef enum _HPDF_PDFA_TYPE
162 typedef enum _HPDF_PdfVer {
172 typedef enum _HPDF_EncryptMode {
179 (HPDF_STDCALL *HPDF_Error_Handler) (HPDF_STATUS error_no,
180 HPDF_STATUS detail_no,
184 (HPDF_STDCALL *HPDF_Alloc_Func) (HPDF_UINT size);
188 (HPDF_STDCALL *HPDF_Free_Func) (void *aptr);
191 /*---------------------------------------------------------------------------*/
192 /*------ text width struct --------------------------------------------------*/
194 typedef struct _HPDF_TextWidth {
197 /* don't use this value (it may be change in the feature).
198 use numspace as alternated. */
206 /*---------------------------------------------------------------------------*/
207 /*------ dash mode ----------------------------------------------------------*/
209 typedef struct _HPDF_DashMode {
216 /*---------------------------------------------------------------------------*/
217 /*----- HPDF_TransMatrix struct ---------------------------------------------*/
219 typedef struct _HPDF_TransMatrix {
229 /*---------------------------------------------------------------------------*/
231 typedef enum _HPDF_ColorSpace {
232 HPDF_CS_DEVICE_GRAY = 0,
246 /*---------------------------------------------------------------------------*/
247 /*----- HPDF_RGBColor struct ------------------------------------------------*/
249 typedef struct _HPDF_RGBColor {
255 /*---------------------------------------------------------------------------*/
256 /*----- HPDF_CMYKColor struct -----------------------------------------------*/
258 typedef struct _HPDF_CMYKColor {
265 /*---------------------------------------------------------------------------*/
266 /*------ The line cap style -------------------------------------------------*/
268 typedef enum _HPDF_LineCap {
271 HPDF_PROJECTING_SCUARE_END,
275 /*----------------------------------------------------------------------------*/
276 /*------ The line join style -------------------------------------------------*/
278 typedef enum _HPDF_LineJoin {
285 /*----------------------------------------------------------------------------*/
286 /*------ The text rendering mode ---------------------------------------------*/
288 typedef enum _HPDF_TextRenderingMode {
291 HPDF_FILL_THEN_STROKE,
294 HPDF_STROKE_CLIPPING,
295 HPDF_FILL_STROKE_CLIPPING,
297 HPDF_RENDERING_MODE_EOF
298 } HPDF_TextRenderingMode;
301 typedef enum _HPDF_WritingMode {
302 HPDF_WMODE_HORIZONTAL = 0,
308 typedef enum _HPDF_PageLayout {
309 HPDF_PAGE_LAYOUT_SINGLE = 0,
310 HPDF_PAGE_LAYOUT_ONE_COLUMN,
311 HPDF_PAGE_LAYOUT_TWO_COLUMN_LEFT,
312 HPDF_PAGE_LAYOUT_TWO_COLUMN_RIGHT,
313 HPDF_PAGE_LAYOUT_TWO_PAGE_LEFT,
314 HPDF_PAGE_LAYOUT_TWO_PAGE_RIGHT,
319 typedef enum _HPDF_PageMode {
320 HPDF_PAGE_MODE_USE_NONE = 0,
321 HPDF_PAGE_MODE_USE_OUTLINE,
322 HPDF_PAGE_MODE_USE_THUMBS,
323 HPDF_PAGE_MODE_FULL_SCREEN,
324 /* HPDF_PAGE_MODE_USE_OC,
325 HPDF_PAGE_MODE_USE_ATTACHMENTS,
331 typedef enum _HPDF_PageNumStyle {
332 HPDF_PAGE_NUM_STYLE_DECIMAL = 0,
333 HPDF_PAGE_NUM_STYLE_UPPER_ROMAN,
334 HPDF_PAGE_NUM_STYLE_LOWER_ROMAN,
335 HPDF_PAGE_NUM_STYLE_UPPER_LETTERS,
336 HPDF_PAGE_NUM_STYLE_LOWER_LETTERS,
337 HPDF_PAGE_NUM_STYLE_EOF
341 typedef enum _HPDF_DestinationType {
351 } HPDF_DestinationType;
354 typedef enum _HPDF_AnnotType {
355 HPDF_ANNOT_TEXT_NOTES,
358 HPDF_ANNOT_FREE_TEXT,
362 HPDF_ANNOT_STRIKE_OUT,
363 HPDF_ANNOT_HIGHTLIGHT,
364 HPDF_ANNOT_UNDERLINE,
366 HPDF_ANNOT_FILE_ATTACHMENT,
371 HPDF_ANNOT_PROJECTION
375 typedef enum _HPDF_AnnotFlgs {
376 HPDF_ANNOT_INVISIBLE,
386 typedef enum _HPDF_AnnotHighlightMode {
387 HPDF_ANNOT_NO_HIGHTLIGHT = 0,
388 HPDF_ANNOT_INVERT_BOX,
389 HPDF_ANNOT_INVERT_BORDER,
390 HPDF_ANNOT_DOWN_APPEARANCE,
391 HPDF_ANNOT_HIGHTLIGHT_MODE_EOF
392 } HPDF_AnnotHighlightMode;
395 typedef enum _HPDF_AnnotIcon {
396 HPDF_ANNOT_ICON_COMMENT = 0,
398 HPDF_ANNOT_ICON_NOTE,
399 HPDF_ANNOT_ICON_HELP,
400 HPDF_ANNOT_ICON_NEW_PARAGRAPH,
401 HPDF_ANNOT_ICON_PARAGRAPH,
402 HPDF_ANNOT_ICON_INSERT,
406 typedef enum _HPDF_AnnotIntent {
407 HPDF_ANNOT_INTENT_FREETEXTCALLOUT = 0,
408 HPDF_ANNOT_INTENT_FREETEXTTYPEWRITER,
409 HPDF_ANNOT_INTENT_LINEARROW,
410 HPDF_ANNOT_INTENT_LINEDIMENSION,
411 HPDF_ANNOT_INTENT_POLYGONCLOUD,
412 HPDF_ANNOT_INTENT_POLYLINEDIMENSION,
413 HPDF_ANNOT_INTENT_POLYGONDIMENSION
416 typedef enum _HPDF_LineAnnotEndingStyle {
417 HPDF_LINE_ANNOT_NONE = 0,
418 HPDF_LINE_ANNOT_SQUARE,
419 HPDF_LINE_ANNOT_CIRCLE,
420 HPDF_LINE_ANNOT_DIAMOND,
421 HPDF_LINE_ANNOT_OPENARROW,
422 HPDF_LINE_ANNOT_CLOSEDARROW,
423 HPDF_LINE_ANNOT_BUTT,
424 HPDF_LINE_ANNOT_ROPENARROW,
425 HPDF_LINE_ANNOT_RCLOSEDARROW,
426 HPDF_LINE_ANNOT_SLASH
427 } HPDF_LineAnnotEndingStyle;
429 typedef enum _HPDF_LineAnnotCapPosition{
430 HPDF_LINE_ANNOT_CAP_INLINE = 0,
431 HPDF_LINE_ANNOT_CAP_TOP
432 } HPDF_LineAnnotCapPosition;
434 typedef enum _HPDF_StampAnnotName{
435 HPDF_STAMP_ANNOT_APPROVED = 0,
436 HPDF_STAMP_ANNOT_EXPERIMENTAL,
437 HPDF_STAMP_ANNOT_NOTAPPROVED,
438 HPDF_STAMP_ANNOT_ASIS,
439 HPDF_STAMP_ANNOT_EXPIRED,
440 HPDF_STAMP_ANNOT_NOTFORPUBLICRELEASE,
441 HPDF_STAMP_ANNOT_CONFIDENTIAL,
442 HPDF_STAMP_ANNOT_FINAL,
443 HPDF_STAMP_ANNOT_SOLD,
444 HPDF_STAMP_ANNOT_DEPARTMENTAL,
445 HPDF_STAMP_ANNOT_FORCOMMENT,
446 HPDF_STAMP_ANNOT_TOPSECRET,
447 HPDF_STAMP_ANNOT_DRAFT,
448 HPDF_STAMP_ANNOT_FORPUBLICRELEASE
449 } HPDF_StampAnnotName;
451 /*----------------------------------------------------------------------------*/
452 /*------ border stype --------------------------------------------------------*/
454 typedef enum _HPDF_BSSubtype {
463 /*----- blend modes ----------------------------------------------------------*/
465 typedef enum _HPDF_BlendMode {
481 /*----- slide show -----------------------------------------------------------*/
483 typedef enum _HPDF_TransitionStyle {
484 HPDF_TS_WIPE_RIGHT = 0,
488 HPDF_TS_BARN_DOORS_HORIZONTAL_OUT,
489 HPDF_TS_BARN_DOORS_HORIZONTAL_IN,
490 HPDF_TS_BARN_DOORS_VERTICAL_OUT,
491 HPDF_TS_BARN_DOORS_VERTICAL_IN,
494 HPDF_TS_BLINDS_HORIZONTAL,
495 HPDF_TS_BLINDS_VERTICAL,
497 HPDF_TS_GLITTER_RIGHT,
498 HPDF_TS_GLITTER_DOWN,
499 HPDF_TS_GLITTER_TOP_LEFT_TO_BOTTOM_RIGHT,
502 } HPDF_TransitionStyle;
504 /*----------------------------------------------------------------------------*/
506 typedef enum _HPDF_PageSizes {
507 HPDF_PAGE_SIZE_LETTER = 0,
508 HPDF_PAGE_SIZE_LEGAL,
514 HPDF_PAGE_SIZE_EXECUTIVE,
515 HPDF_PAGE_SIZE_US4x6,
516 HPDF_PAGE_SIZE_US4x8,
517 HPDF_PAGE_SIZE_US5x7,
518 HPDF_PAGE_SIZE_COMM10,
523 typedef enum _HPDF_PageDirection {
524 HPDF_PAGE_PORTRAIT = 0,
526 } HPDF_PageDirection;
529 typedef enum _HPDF_EncoderType {
530 HPDF_ENCODER_TYPE_SINGLE_BYTE,
531 HPDF_ENCODER_TYPE_DOUBLE_BYTE,
532 HPDF_ENCODER_TYPE_UNINITIALIZED,
537 typedef enum _HPDF_ByteType {
538 HPDF_BYTE_TYPE_SINGLE = 0,
540 HPDF_BYTE_TYPE_TRIAL,
541 HPDF_BYTE_TYPE_UNKNOWN
545 typedef enum _HPDF_TextAlignment {
546 HPDF_TALIGN_LEFT = 0,
550 } HPDF_TextAlignment;
552 /*----------------------------------------------------------------------------*/
554 /* Name Dictionary values -- see PDF reference section 7.7.4 */
555 typedef enum _HPDF_NameDictKey {
556 HPDF_NAME_EMBEDDED_FILES = 0, /* TODO the rest */
562 #endif /* __cplusplus */
564 #endif /* _HPDF_TYPES_H */