equal
deleted
inserted
replaced
20 struct pt_image; |
20 struct pt_image; |
21 |
21 |
22 /** Bitmask for pt_image_open modes */ |
22 /** Bitmask for pt_image_open modes */ |
23 enum pt_image_mode { |
23 enum pt_image_mode { |
24 /** Update cache if needed */ |
24 /** Update cache if needed */ |
25 PT_IMG_WRITE = 0x01, |
25 PT_OPEN_UPDATE = 0x01, |
26 |
26 |
27 /** Accept stale cache */ |
27 /** Accept stale cache */ |
28 PT_IMG_STALE = 0x02, |
28 PT_OPEN_STALE = 0x02, |
29 }; |
29 }; |
30 |
30 |
31 /** |
31 /** |
32 * Values for pt_image_cached |
32 * Values for pt_image_cached |
33 */ |
33 */ |
61 |
61 |
62 /** Zoom factor (out < zero < in) */ |
62 /** Zoom factor (out < zero < in) */ |
63 // TODO: int zoom; |
63 // TODO: int zoom; |
64 }; |
64 }; |
65 |
65 |
66 |
66 /** |
|
67 * TODO: impl |
|
68 */ |
67 int pt_ctx_new (struct pt_ctx **ctx_ptr); |
69 int pt_ctx_new (struct pt_ctx **ctx_ptr); |
68 |
70 |
69 /** |
71 /** |
70 * Open a new pt_image for use. |
72 * Open a new pt_image for use. |
71 * |
73 * |
72 * @param img_ptr returned pt_image handle |
74 * @param img_ptr returned pt_image handle |
73 * @param ctx global state to use |
75 * @param ctx global state to use |
74 * @param path filesystem path to .png file |
76 * @param path filesystem path to .png file |
75 * @param mode combination of PT_IMG_* flags |
77 * @param mode combination of PT_OPEN_* flags |
76 */ |
78 */ |
77 int pt_image_open (struct pt_image **image_ptr, struct pt_ctx *ctx, const char *png_path, int cache_mode); |
79 int pt_image_open (struct pt_image **image_ptr, struct pt_ctx *ctx, const char *png_path, int cache_mode); |
78 |
80 |
79 /** |
81 /** |
80 * Get the image's metadata |
82 * Get the image's metadata |