106 lines
4.2 KiB
C
106 lines
4.2 KiB
C
/* PIKA - Photo and Image Kooker Application
|
|
* a rebranding of The GNU Image Manipulation Program (created with heckimp)
|
|
* A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
|
|
*
|
|
* Original copyright, applying to most contents (license remains unchanged):
|
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
|
*
|
|
* pikatemplate.h
|
|
* Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __PIKA_TEMPLATE_H__
|
|
#define __PIKA_TEMPLATE_H__
|
|
|
|
|
|
#include "pikaviewable.h"
|
|
|
|
|
|
#define PIKA_TEMPLATE_PARAM_COPY_FIRST (1 << (8 + G_PARAM_USER_SHIFT))
|
|
|
|
#ifdef PIKA_UNSTABLE
|
|
/* Uncommon ratio, with at least one odd value, to encourage testing
|
|
* PIKA with unusual numbers.
|
|
* It also has to be a higher resolution, to push PIKA a little further
|
|
* in tests. */
|
|
#define PIKA_DEFAULT_IMAGE_WIDTH 2001
|
|
#define PIKA_DEFAULT_IMAGE_HEIGHT 1984
|
|
#else
|
|
/* 1366x768 is the most common screen resolution in 2016.
|
|
* 1920x1080 is the second most common.
|
|
* Since PIKA targets advanced graphics artists, let's go for the
|
|
* highest common dimension.
|
|
*/
|
|
#define PIKA_DEFAULT_IMAGE_WIDTH 1920
|
|
#define PIKA_DEFAULT_IMAGE_HEIGHT 1080
|
|
#endif
|
|
|
|
|
|
#define PIKA_TYPE_TEMPLATE (pika_template_get_type ())
|
|
#define PIKA_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIKA_TYPE_TEMPLATE, PikaTemplate))
|
|
#define PIKA_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PIKA_TYPE_TEMPLATE, PikaTemplateClass))
|
|
#define PIKA_IS_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIKA_TYPE_TEMPLATE))
|
|
#define PIKA_IS_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PIKA_TYPE_TEMPLATE))
|
|
#define PIKA_TEMPLATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PIKA_TYPE_TEMPLATE, PikaTemplateClass))
|
|
|
|
|
|
typedef struct _PikaTemplateClass PikaTemplateClass;
|
|
|
|
struct _PikaTemplate
|
|
{
|
|
PikaViewable parent_instance;
|
|
};
|
|
|
|
struct _PikaTemplateClass
|
|
{
|
|
PikaViewableClass parent_instance;
|
|
};
|
|
|
|
|
|
GType pika_template_get_type (void) G_GNUC_CONST;
|
|
|
|
PikaTemplate * pika_template_new (const gchar *name);
|
|
|
|
void pika_template_set_from_image (PikaTemplate *template,
|
|
PikaImage *image);
|
|
|
|
gint pika_template_get_width (PikaTemplate *template);
|
|
gint pika_template_get_height (PikaTemplate *template);
|
|
PikaUnit pika_template_get_unit (PikaTemplate *template);
|
|
|
|
gdouble pika_template_get_resolution_x (PikaTemplate *template);
|
|
gdouble pika_template_get_resolution_y (PikaTemplate *template);
|
|
PikaUnit pika_template_get_resolution_unit (PikaTemplate *template);
|
|
|
|
PikaImageBaseType pika_template_get_base_type (PikaTemplate *template);
|
|
PikaPrecision pika_template_get_precision (PikaTemplate *template);
|
|
|
|
PikaColorProfile * pika_template_get_color_profile (PikaTemplate *template);
|
|
PikaColorProfile * pika_template_get_simulation_profile
|
|
(PikaTemplate *template);
|
|
PikaColorRenderingIntent pika_template_get_simulation_intent
|
|
(PikaTemplate *template);
|
|
gboolean pika_template_get_simulation_bpc (PikaTemplate *template);
|
|
|
|
PikaFillType pika_template_get_fill_type (PikaTemplate *template);
|
|
|
|
const gchar * pika_template_get_comment (PikaTemplate *template);
|
|
|
|
guint64 pika_template_get_initial_size (PikaTemplate *template);
|
|
|
|
|
|
#endif /* __PIKA_TEMPLATE__ */
|