mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
8d6c335f8f
2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
119 lines
4.2 KiB
C
119 lines
4.2 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_level_width (const TileManager *tm);
|
|
gint tile_manager_level_height (const TileManager *tm);
|
|
gint tile_manager_level_bpp (const TileManager *tm);
|
|
|
|
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__ */
|