2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-25 06:05:25 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* 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 2 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, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
#ifndef __GIMP_PROJECTION_H__
|
|
|
|
#define __GIMP_PROJECTION_H__
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-05-14 01:25:12 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
#include "gimpobject.h"
|
2001-08-17 22:27:31 +08:00
|
|
|
|
2001-05-14 05:51:20 +08:00
|
|
|
|
2004-07-14 18:31:59 +08:00
|
|
|
typedef struct _GimpProjectionIdleRender GimpProjectionIdleRender;
|
2001-05-14 01:25:12 +08:00
|
|
|
|
2004-07-14 18:31:59 +08:00
|
|
|
struct _GimpProjectionIdleRender
|
1998-10-01 19:53:20 +08:00
|
|
|
{
|
2001-12-03 21:44:59 +08:00
|
|
|
gint width;
|
|
|
|
gint height;
|
2001-11-11 07:03:22 +08:00
|
|
|
gint x;
|
|
|
|
gint y;
|
2004-07-14 18:31:59 +08:00
|
|
|
gint base_x;
|
|
|
|
gint base_y;
|
2001-11-11 07:03:22 +08:00
|
|
|
guint idle_id;
|
|
|
|
GSList *update_areas; /* flushed update areas */
|
2001-05-14 01:25:12 +08:00
|
|
|
};
|
1998-10-01 19:53:20 +08:00
|
|
|
|
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
#define GIMP_TYPE_PROJECTION (gimp_projection_get_type ())
|
|
|
|
#define GIMP_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROJECTION, GimpProjection))
|
|
|
|
#define GIMP_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PROJECTION, GimpProjectionClass))
|
|
|
|
#define GIMP_IS_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROJECTION))
|
|
|
|
#define GIMP_IS_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PROJECTION))
|
|
|
|
#define GIMP_PROJECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PROJECTION, GimpProjectionClass))
|
2001-09-26 01:44:03 +08:00
|
|
|
|
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
typedef struct _GimpProjectionClass GimpProjectionClass;
|
2001-09-26 01:44:03 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
struct _GimpProjection
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2004-07-14 18:31:59 +08:00
|
|
|
GimpObject parent_instance;
|
2001-09-26 01:44:03 +08:00
|
|
|
|
2006-03-29 01:08:36 +08:00
|
|
|
GimpImage *image;
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2004-07-14 18:31:59 +08:00
|
|
|
GimpImageType type;
|
|
|
|
gint bytes;
|
|
|
|
TileManager *tiles;
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2004-07-14 18:31:59 +08:00
|
|
|
GSList *update_areas;
|
|
|
|
GimpProjectionIdleRender idle_render;
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2004-07-14 18:31:59 +08:00
|
|
|
gboolean construct_flag;
|
1997-11-25 06:05:25 +08:00
|
|
|
};
|
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
struct _GimpProjectionClass
|
2001-09-26 01:44:03 +08:00
|
|
|
{
|
|
|
|
GimpObjectClass parent_class;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2006-03-29 01:08:36 +08:00
|
|
|
void (* update) (GimpProjection *image,
|
2004-07-14 00:36:29 +08:00
|
|
|
gboolean now,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
};
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
GType gimp_projection_get_type (void) G_GNUC_CONST;
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2006-03-29 01:08:36 +08:00
|
|
|
GimpProjection * gimp_projection_new (GimpImage *image);
|
2001-11-01 05:20:09 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
TileManager * gimp_projection_get_tiles (GimpProjection *proj);
|
2004-09-25 21:16:13 +08:00
|
|
|
GimpImage * gimp_projection_get_image (const GimpProjection *proj);
|
2006-12-13 22:27:57 +08:00
|
|
|
GimpImageType gimp_projection_get_image_type (const GimpProjection *proj);
|
2004-07-14 00:36:29 +08:00
|
|
|
gint gimp_projection_get_bytes (const GimpProjection *proj);
|
|
|
|
gdouble gimp_projection_get_opacity (const GimpProjection *proj);
|
2001-11-11 07:03:22 +08:00
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
void gimp_projection_flush (GimpProjection *proj);
|
|
|
|
void gimp_projection_flush_now (GimpProjection *proj);
|
2004-07-14 18:31:59 +08:00
|
|
|
void gimp_projection_finish_draw (GimpProjection *proj);
|
2001-11-11 07:03:22 +08:00
|
|
|
|
|
|
|
|
2004-07-14 00:36:29 +08:00
|
|
|
#endif /* __GIMP_PROJECTION_H__ */
|