summaryrefslogtreecommitdiff
path: root/include/gutenprint/paper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gutenprint/paper.h')
-rw-r--r--include/gutenprint/paper.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/gutenprint/paper.h b/include/gutenprint/paper.h
index e9c14ed..26ee9ae 100644
--- a/include/gutenprint/paper.h
+++ b/include/gutenprint/paper.h
@@ -1,5 +1,5 @@
/*
- * "$Id: paper.h,v 1.2 2008/01/15 03:48:45 rlk Exp $"
+ * "$Id: paper.h,v 1.4 2008/07/12 15:05:54 rlk Exp $"
*
* libgimpprint paper functions.
*
@@ -103,31 +103,47 @@ extern int stp_known_papersizes(void);
/**
* Get a papersize by name.
* @param name the short unique name of the paper.
- * @returns a pointer to the papersize, or NULL on failure. The
- * pointer should not be freed.
+ * @returns a static pointer to the papersize, or NULL on failure.
*/
extern const stp_papersize_t *stp_get_papersize_by_name(const char *name);
/**
* Get a papersize by size.
* The nearest available size to the size requested will be found.
+ * Only paper sizes within 5 points of width and height will be considered.
* @param length the length of the paper.
* @param width the width of the paper
- * @returns a pointer to the papersize, or NULL on failure. The
- * pointer should not be freed.
+ * @returns a static pointer to the papersize, or NULL on failure.
*/
extern const stp_papersize_t *stp_get_papersize_by_size(int length,
int width);
/**
+ * Get a papersize by size if an exact match is found.
+ * @param length the length of the paper.
+ * @param width the width of the paper
+ * @returns a static pointer to the papersize, or NULL on failure.
+ */
+extern const stp_papersize_t *stp_get_papersize_by_size_exact(int length,
+ int width);
+
+/**
* Get a papersize by its index number.
* @param idx the index number. This must not be greater than (total
* number of papers - 1).
- * @returns a pointer to the papersize, or NULL on failure. The
- * pointer should not be freed.
+ * @returns a static pointer to the papersize, or NULL on failure.
*/
extern const stp_papersize_t *stp_get_papersize_by_index(int idx);
+/**
+ * Get the default paper dimensions for the current configuration.
+ * The default is derived from the PageSize parameter if set, otherwise
+ * the default page size for the printer is used. If no value can be
+ * determined, 1x1 will be returned.
+ * @param v the Gutenprint vars object
+ * @param width pointer to storage that the width will be returned in.
+ * @param height pointer to storage that the height will be returned in.
+ */
extern void stp_default_media_size(const stp_vars_t *v,
int *width, int *height);
@@ -139,5 +155,5 @@ extern void stp_default_media_size(const stp_vars_t *v,
#endif /* GUTENPRINT_PAPER_H */
/*
- * End of "$Id: paper.h,v 1.2 2008/01/15 03:48:45 rlk Exp $".
+ * End of "$Id: paper.h,v 1.4 2008/07/12 15:05:54 rlk Exp $".
*/