made get_tiles() a method of GimpDrawable.
2007-12-18 Sven Neumann <sven@gimp.org> * app/core/gimpdrawable.[ch]: made get_tiles() a method of GimpDrawable. svn path=/trunk/; revision=24388
This commit is contained in:

committed by
Sven Neumann

parent
53f3123847
commit
43dfbd1c97
@ -1,3 +1,8 @@
|
||||
2007-12-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpdrawable.[ch]: made get_tiles() a method of
|
||||
GimpDrawable.
|
||||
|
||||
2007-12-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/display/gimpdisplayshell-render.c
|
||||
|
@ -128,6 +128,7 @@ static gint64 gimp_drawable_real_estimate_memsize (const GimpDrawable *drawable
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
static TileManager * gimp_drawable_real_get_tiles (GimpDrawable *drawable);
|
||||
static void gimp_drawable_real_set_tiles (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
@ -215,6 +216,7 @@ gimp_drawable_class_init (GimpDrawableClass *klass)
|
||||
klass->get_active_components = NULL;
|
||||
klass->apply_region = gimp_drawable_real_apply_region;
|
||||
klass->replace_region = gimp_drawable_real_replace_region;
|
||||
klass->get_tiles = gimp_drawable_real_get_tiles;
|
||||
klass->set_tiles = gimp_drawable_real_set_tiles;
|
||||
klass->push_undo = gimp_drawable_real_push_undo;
|
||||
klass->swap_pixels = gimp_drawable_real_swap_pixels;
|
||||
@ -625,6 +627,12 @@ gimp_drawable_real_estimate_memsize (const GimpDrawable *drawable,
|
||||
return (gint64) gimp_drawable_bytes (drawable) * width * height;
|
||||
}
|
||||
|
||||
static TileManager *
|
||||
gimp_drawable_real_get_tiles (GimpDrawable *drawable)
|
||||
{
|
||||
return drawable->tiles;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_drawable_real_set_tiles (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
@ -906,11 +914,11 @@ gimp_drawable_replace_region (GimpDrawable *drawable,
|
||||
}
|
||||
|
||||
TileManager *
|
||||
gimp_drawable_get_tiles (const GimpDrawable *drawable)
|
||||
gimp_drawable_get_tiles (GimpDrawable *drawable)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
|
||||
|
||||
return drawable->tiles;
|
||||
return GIMP_DRAWABLE_GET_CLASS (drawable)->get_tiles (drawable);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -53,60 +53,61 @@ struct _GimpDrawableClass
|
||||
GimpItemClass parent_class;
|
||||
|
||||
/* signals */
|
||||
void (* update) (GimpDrawable *drawable,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* alpha_changed) (GimpDrawable *drawable);
|
||||
void (* update) (GimpDrawable *drawable,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* alpha_changed) (GimpDrawable *drawable);
|
||||
|
||||
/* virtual functions */
|
||||
gint64 (* estimate_memsize) (const GimpDrawable *drawable,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* invalidate_boundary) (GimpDrawable *drawable);
|
||||
void (* get_active_components) (const GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
void (* apply_region) (GimpDrawable *drawable,
|
||||
PixelRegion *src2PR,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
gdouble opacity,
|
||||
GimpLayerModeEffects mode,
|
||||
TileManager *src1_tiles,
|
||||
gint x,
|
||||
gint y);
|
||||
void (* replace_region) (GimpDrawable *drawable,
|
||||
PixelRegion *src2PR,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
gdouble opacity,
|
||||
PixelRegion *maskPR,
|
||||
gint x,
|
||||
gint y);
|
||||
void (* set_tiles) (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
TileManager *tiles,
|
||||
GimpImageType type,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
gint64 (* estimate_memsize) (const GimpDrawable *drawable,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* invalidate_boundary) (GimpDrawable *drawable);
|
||||
void (* get_active_components) (const GimpDrawable *drawable,
|
||||
gboolean *active);
|
||||
void (* apply_region) (GimpDrawable *drawable,
|
||||
PixelRegion *src2PR,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
gdouble opacity,
|
||||
GimpLayerModeEffects mode,
|
||||
TileManager *src1_tiles,
|
||||
gint x,
|
||||
gint y);
|
||||
void (* replace_region) (GimpDrawable *drawable,
|
||||
PixelRegion *src2PR,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
gdouble opacity,
|
||||
PixelRegion *maskPR,
|
||||
gint x,
|
||||
gint y);
|
||||
TileManager * (* get_tiles) (GimpDrawable *drawable);
|
||||
void (* set_tiles) (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
TileManager *tiles,
|
||||
GimpImageType type,
|
||||
gint offset_x,
|
||||
gint offset_y);
|
||||
|
||||
void (* push_undo) (GimpDrawable *drawable,
|
||||
const gchar *undo_desc,
|
||||
TileManager *tiles,
|
||||
gboolean sparse,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* swap_pixels) (GimpDrawable *drawable,
|
||||
TileManager *tiles,
|
||||
gboolean sparse,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* push_undo) (GimpDrawable *drawable,
|
||||
const gchar *undo_desc,
|
||||
TileManager *tiles,
|
||||
gboolean sparse,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (* swap_pixels) (GimpDrawable *drawable,
|
||||
TileManager *tiles,
|
||||
gboolean sparse,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
};
|
||||
|
||||
|
||||
@ -154,7 +155,7 @@ void gimp_drawable_replace_region (GimpDrawable *drawable,
|
||||
gint x,
|
||||
gint y);
|
||||
|
||||
TileManager * gimp_drawable_get_tiles (const GimpDrawable *drawable);
|
||||
TileManager * gimp_drawable_get_tiles (GimpDrawable *drawable);
|
||||
void gimp_drawable_set_tiles (GimpDrawable *drawable,
|
||||
gboolean push_undo,
|
||||
const gchar *undo_desc,
|
||||
|
Reference in New Issue
Block a user