PIKApp/libpikabase/pikalimits.h

98 lines
2.9 KiB
C

/* LIBPIKA - The PIKA Library
* Copyright (C) 1995-1999 Peter Mattis and Spencer Kimball
*
* pikalimits.h
* Copyright (C) 1999 Michael Natterer <mitschel@cs.tu-berlin.de>
*
* This library is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <https://www.gnu.org/licenses/>.
*/
#if !defined (__PIKA_BASE_H_INSIDE__) && !defined (PIKA_BASE_COMPILATION)
#error "Only <libpikabase/pikabase.h> can be included directly."
#endif
#ifndef __PIKA_LIMITS_H__
#define __PIKA_LIMITS_H__
G_BEGIN_DECLS
/**
* SECTION: pikalimits
* @title: pikalimits
* @short_description: Boundaries of some PIKA data types and some
* global constants.
*
* Boundaries of some PIKA data types and some global constants.
**/
/**
* PIKA_MIN_IMAGE_SIZE:
*
* The minimum width and height of a PIKA image in pixels.
**/
#define PIKA_MIN_IMAGE_SIZE 1
/**
* PIKA_MAX_IMAGE_SIZE:
*
* The maximum width and height of a PIKA image in pixels. This is a
* somewhat arbitrary value that can be used when an upper value for
* pixel sizes is needed; for example to give a spin button an upper
* limit.
**/
#define PIKA_MAX_IMAGE_SIZE 524288 /* 2^19 */
/**
* PIKA_MIN_RESOLUTION:
*
* The minimum resolution of a PIKA image in pixels per inch. This is
* a somewhat arbitrary value that can be used when a lower value for a
* resolution is needed. PIKA will not accept resolutions smaller than
* this value.
**/
#define PIKA_MIN_RESOLUTION 5e-3 /* shouldn't display as 0.000 */
/**
* PIKA_MAX_RESOLUTION:
*
* The maximum resolution of a PIKA image in pixels per inch. This is
* a somewhat arbitrary value that can be used to when an upper value
* for a resolution is needed. PIKA will not accept resolutions larger
* than this value.
**/
#define PIKA_MAX_RESOLUTION 1048576.0
/**
* PIKA_MAX_MEMSIZE:
*
* A large but arbitrary value that can be used when an upper limit
* for a memory size (in bytes) is needed. It is smaller than
* %G_MAXDOUBLE since the #PikaMemsizeEntry doesn't handle larger
* values.
**/
#define PIKA_MAX_MEMSIZE ((guint64) 1 << 42) /* 4 terabyte;
* needs a 64bit variable
* and must be < G_MAXDOUBLE
*/
G_END_DECLS
#endif /* __PIKA_LIMITS_H__ */