equal
deleted
inserted
replaced
25 |
25 |
26 /** Accept stale cache */ |
26 /** Accept stale cache */ |
27 PT_IMG_STALE = 0x02, |
27 PT_IMG_STALE = 0x02, |
28 }; |
28 }; |
29 |
29 |
|
30 /** |
|
31 * Values for pt_image_cached |
|
32 */ |
|
33 enum pt_cache_status { |
|
34 /** Cache status could not be determined */ |
|
35 PT_CACHE_ERROR = -1, |
|
36 |
|
37 /** Cache is fresh */ |
|
38 PT_CACHE_FRESH = 0, |
|
39 |
|
40 /** Cache does not exist */ |
|
41 PT_CACHE_NONE = 1, |
|
42 |
|
43 /** Cache exists, but is stale */ |
|
44 PT_CACHE_STALE = 2, |
|
45 }; |
|
46 |
30 /** Metadata info for image */ |
47 /** Metadata info for image */ |
31 struct pt_image_info { |
48 struct pt_image_info { |
32 /** Dimensions of image */ |
49 /** Dimensions of image */ |
33 size_t width, height; |
50 size_t width, height; |
34 }; |
51 }; |
50 * Get the image's metadata |
67 * Get the image's metadata |
51 */ |
68 */ |
52 int pt_image_info (struct pt_image *image, const struct pt_image_info **info_ptr); |
69 int pt_image_info (struct pt_image *image, const struct pt_image_info **info_ptr); |
53 |
70 |
54 /** |
71 /** |
55 * Check the given image's cache is stale - in other words, the image needs to be updated. |
72 * Check the given image's cache is stale - in other words, if the image needs to be update()'d. |
|
73 * |
|
74 * @return one of pt_cache_status |
56 */ |
75 */ |
57 int pt_image_stale (struct pt_image *image); |
76 int pt_image_status (struct pt_image *image); |
58 |
77 |
59 /** |
78 /** |
60 * Update the given image's cache. |
79 * Update the given image's cache. |
61 */ |
80 */ |
62 int pt_image_update (struct pt_image *image); |
81 int pt_image_update (struct pt_image *image); |