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.h51
1 files changed, 8 insertions, 43 deletions
diff --git a/include/gutenprint/paper.h b/include/gutenprint/paper.h
index e0ee713..0f5869e 100644
--- a/include/gutenprint/paper.h
+++ b/include/gutenprint/paper.h
@@ -15,8 +15,7 @@
* for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
@@ -63,20 +62,18 @@ typedef enum
/** Standard paper size */
PAPERSIZE_TYPE_STANDARD = 0,
/** Envelope */
- PAPERSIZE_TYPE_ENVELOPE,
- /** Special (not normally displayed) */
- PAPERSIZE_TYPE_SPECIAL
+ PAPERSIZE_TYPE_ENVELOPE
} stp_papersize_type_t;
/** The papersize data type. */
typedef struct
{
/** Short unique name (not translated). */
- char *name;
+ const char *name;
/** Long descriptive name (translated). */
- char *text;
+ const char *text;
/** Comment. */
- char *comment;
+ const char *comment;
/** Paper width. */
stp_dimension_t width;
/** Paper height. */
@@ -96,45 +93,13 @@ typedef struct
} stp_papersize_t;
/**
- * Get the number of available papersizes.
- * @returns the number of papersizes.
- */
-extern int stp_known_papersizes(void);
-
-/**
* Get a papersize by name.
+ * @param v the Gutenprint vars object
* @param name the short unique name of the paper.
* @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 static pointer to the papersize, or NULL on failure.
- */
-extern const stp_papersize_t *stp_get_papersize_by_size(stp_dimension_t length,
- stp_dimension_t 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(stp_dimension_t length,
- stp_dimension_t 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 static pointer to the papersize, or NULL on failure.
- */
-extern const stp_papersize_t *stp_get_papersize_by_index(int idx);
+extern const stp_papersize_t *stp_describe_papersize(const stp_vars_t *v,
+ const char *name);
/**
* Get the default paper dimensions for the current configuration.