gimp/app/base/tile-manager.h
Michael Natterer d240f623f1 new directory app/base/
2001-05-15  Michael Natterer  <mitch@gimp.org>

	* configure.in: new directory app/base/

	* app/Makefile.am
	* app/boundary.[ch]
	* app/brush_scale.[ch]
	* app/gimpchecks.h
	* app/gimplut.[ch]
	* app/pixel_processor.[ch]
	* app/pixel_region.[ch]
	* app/pixel_surround.[ch]
	* app/temp_buf.[ch]
	* app/tile.[ch]
	* app/tile_cache.[ch]
	* app/tile_manager.[ch]
	* app/tile_manager_pvt.h
	* app/tile_pvt.h
	* app/tile_swap.[ch]: moved to base/

	* app/base/Makefile.am
	* app/base/base-types.h
	* app/base/*: new directory for the sub-object pixel maniplation
	and storage stuff. Does not include Gtk+ or anything outside
	base/. Did some cleanup in all files.

	* app/appenums.h
	* app/apptypes.h
	* app/core/gimpimage.h: removed types which are now in
	base/base-types.h.

	* app/base/base-config.[ch]
	* app/gimprc.[ch]: put the config variables for base/ to their own
	file so base/ doesn not have to include gimprc.h (does not yet
	work, i.e. the variables are un-configurable right now)

	* app/main.c: set a log handler for "Gimp-Base".

	* app/paint-funcs/Makefile.am
	* app/paint-funcs/paint-funcs.[ch]: removed the color hash which
	maps RGB to color indices because it's a totally standalone system
	which has nothing to do with the paint-funcs and introduced a
	GimpImage dependency.

	paint-funcs/ should be considered on the same sub-object
	(glib-only) level as base/, only in a different directory.

	* app/core/Makefile.am
	* app/core/gimpimage-colorhash.[ch]: put the color hash here.

	* app/gimage.c: don't invalidate the color hash here...

	* app/core/gimpimage.c: ... but in the colormap_changed() default
	inplementation. Initialize the hash in class_init().

	* tools/pdbgen/Makefile.am: scan app/base/base-types.h for enums.

	* tools/pdbgen/enums.pl: regenerated.

	* app/[lots]
	* app/core/[of]
	* app/gui/[files]
	* app/pdb/[all]
	* app/tools/[over]
	* app/widgets/[the]
	* tools/pdbgen/pdb/[place]: changed #includes accordingly. And use
	base_config->value instead of the stuff from gimprc.h.
2001-05-15 11:25:25 +00:00

128 lines
4.5 KiB
C

/* The GIMP -- an image manipulation program
* 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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __TILE_MANAGER_H__
#define __TILE_MANAGER_H__
/* Creates a new tile manager with the specified
* width for the toplevel. The toplevel sizes is
* used to compute the number of levels and there
* size. Each level is 1/2 the width and height of
* the level above it.
*
* The toplevel is level 0. The smallest level in the
* hierarchy is "nlevels - 1". That level will be smaller
* than TILE_WIDTH x TILE_HEIGHT
*/
TileManager * tile_manager_new (gint toplevel_width,
gint toplevel_height,
gint bpp);
/* Destroy a tile manager and all the tiles it contains.
*/
void tile_manager_destroy (TileManager *tm);
/* Set the validate procedure for the tile manager.
* The validate procedure is called when an invalid tile
* is referenced. If the procedure is NULL, then the tile
* is set to valid and its memory is allocated, but
* not initialized.
*/
void tile_manager_set_validate_proc (TileManager *tm,
TileValidateProc proc);
/* Get a specified tile from a tile manager.
*/
Tile * tile_manager_get_tile (TileManager *tm,
gint xpixel,
gint ypixel,
gint wantread,
gint wantwrite);
/* Get a specified tile from a tile manager.
*/
Tile * tile_manager_get (TileManager *tm,
gint tile_num,
gint wantread,
gint wantwrite);
/* Request that (if possible) the tile at x,y be swapped
* in. This is only a hint to improve performance; no guarantees.
* The tile may be swapped in or otherwise made more accessible
* if it is convenient...
*/
void tile_manager_get_async (TileManager *tm,
gint xpixel,
gint ypixel);
void tile_manager_map_tile (TileManager *tm,
gint xpixel,
gint ypixel,
Tile *srctile);
void tile_manager_map (TileManager *tm,
gint time_num,
Tile *srctile);
/* Validate a tiles memory.
*/
void tile_manager_validate (TileManager *tm,
Tile *tile);
void tile_invalidate (Tile **tile_ptr,
TileManager *tm,
gint tile_num);
void tile_invalidate_tile (Tile **tile_ptr,
TileManager *tm,
gint xpixel,
gint ypixel);
/* Given a toplevel tile, this procedure will invalidate
* (set the dirty bit) for this toplevel tile.
*/
void tile_manager_invalidate_tiles (TileManager *tm,
Tile *toplevel_tile);
void tile_manager_set_user_data (TileManager *tm,
gpointer user_data);
gpointer tile_manager_get_user_data (const TileManager *tm);
gint tile_manager_width (const TileManager *tm);
gint tile_manager_height (const TileManager *tm);
gint tile_manager_bpp (const TileManager *tm);
void tile_manager_get_offsets (const TileManager *tm,
gint *x,
gint *y);
void tile_manager_set_offsets (TileManager *tm,
gint x,
gint y);
void tile_manager_get_tile_coordinates (TileManager *tm,
Tile *tile,
gint *x,
gint *y);
void tile_manager_map_over_tile (TileManager *tm,
Tile *tile,
Tile *srctile);
#endif /* __TILE_MANAGER_H__ */