prefix PIXELS and POINTS with GIMP instead of SIZE so we don't break the
2002-12-01 Sven Neumann <sven@gimp.org> * app/core/core-types.h: prefix PIXELS and POINTS with GIMP instead of SIZE so we don't break the libgimp API without a good reason. * app/pdb/text_tool_cmds.c * tools/pdbgen/enums.pl: regenerated. * libgimp/gimpmisc.[ch]: removed gimp_timer functions since the GTimer API is simple enough and doesn't need to be wrapped. * plug-ins/common/newsprint.c * plug-ins/common/unsharp.c: use GTimer.
This commit is contained in:
committed by
Sven Neumann
parent
06e1d93fdb
commit
c838165e33
17
ChangeLog
17
ChangeLog
@ -1,3 +1,18 @@
|
||||
2002-12-01 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/core-types.h: prefix PIXELS and POINTS with GIMP
|
||||
instead of SIZE so we don't break the libgimp API without a good
|
||||
reason.
|
||||
|
||||
* app/pdb/text_tool_cmds.c
|
||||
* tools/pdbgen/enums.pl: regenerated.
|
||||
|
||||
* libgimp/gimpmisc.[ch]: removed gimp_timer functions since the
|
||||
GTimer API is simple enough and doesn't need to be wrapped.
|
||||
|
||||
* plug-ins/common/newsprint.c
|
||||
* plug-ins/common/unsharp.c: use GTimer.
|
||||
|
||||
2002-12-01 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpdatafiles.c: s/S_ISLINK/S_ISNLK/ (was never
|
||||
@ -15,7 +30,7 @@
|
||||
* app/core/core-types.h : renamed PIXELS and POINTS
|
||||
to SIZE_* to avoid clashes with system headers
|
||||
* app/pdb/text_tool_cmds.c : updated ...
|
||||
* tools/pdbgen/enums.py : ... by renaming here too.
|
||||
* tools/pdbgen/enums.pl : ... by renaming here too.
|
||||
|
||||
* app/widgets/gimphistogrambox.c : <string.h> for memcpy()
|
||||
* app/widgets/gimppropwidgets.c : <string.h> for strlen()
|
||||
|
||||
@ -54,8 +54,8 @@ typedef enum /*< pdb-skip >*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SIZE_PIXELS,
|
||||
SIZE_POINTS
|
||||
GIMP_PIXELS,
|
||||
GIMP_POINTS
|
||||
} SizeType;
|
||||
|
||||
typedef enum /*< pdb-skip >*/ /*< skip >*/
|
||||
|
||||
@ -111,7 +111,7 @@ text_fontname_invoker (Gimp *gimp,
|
||||
success = FALSE;
|
||||
|
||||
size_type = args[8].value.pdb_int;
|
||||
if (size_type < SIZE_PIXELS || size_type > SIZE_POINTS)
|
||||
if (size_type < GIMP_PIXELS || size_type > GIMP_POINTS)
|
||||
success = FALSE;
|
||||
|
||||
fontname = (gchar *) args[9].value.pdb_pointer;
|
||||
@ -183,7 +183,7 @@ static ProcArg text_fontname_inargs[] =
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
"size_type",
|
||||
"The units of specified size: SIZE_PIXELS (0) or SIZE_POINTS (1)"
|
||||
"The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_STRING,
|
||||
@ -242,7 +242,7 @@ text_get_extents_fontname_invoker (Gimp *gimp,
|
||||
success = FALSE;
|
||||
|
||||
size_type = args[2].value.pdb_int;
|
||||
if (size_type < SIZE_PIXELS || size_type > SIZE_POINTS)
|
||||
if (size_type < GIMP_PIXELS || size_type > GIMP_POINTS)
|
||||
success = FALSE;
|
||||
|
||||
fontname = (gchar *) args[3].value.pdb_pointer;
|
||||
@ -288,7 +288,7 @@ static ProcArg text_get_extents_fontname_inargs[] =
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
"size_type",
|
||||
"The units of specified size: SIZE_PIXELS (0) or SIZE_POINTS (1)"
|
||||
"The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_STRING,
|
||||
@ -450,7 +450,7 @@ static ProcArg text_inargs[] =
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
"size_type",
|
||||
"The units of specified size: SIZE_PIXELS (0) or SIZE_POINTS (1)"
|
||||
"The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_STRING,
|
||||
@ -603,7 +603,7 @@ static ProcArg text_get_extents_inargs[] =
|
||||
{
|
||||
GIMP_PDB_INT32,
|
||||
"size_type",
|
||||
"The units of specified size: SIZE_PIXELS (0) or SIZE_POINTS (1)"
|
||||
"The units of specified size: GIMP_PIXELS (0) or GIMP_POINTS (1)"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_STRING,
|
||||
|
||||
@ -247,31 +247,6 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
}
|
||||
}
|
||||
|
||||
GTimer* _timer = NULL;
|
||||
|
||||
void
|
||||
gimp_timer_start(void)
|
||||
{
|
||||
g_return_if_fail (!_timer);
|
||||
|
||||
_timer = g_timer_new ();
|
||||
}
|
||||
|
||||
void
|
||||
gimp_timer_stop(void)
|
||||
{
|
||||
double elapsed;
|
||||
|
||||
g_return_if_fail (_timer != NULL);
|
||||
|
||||
g_timer_stop (_timer);
|
||||
elapsed = g_timer_elapsed (_timer, NULL);
|
||||
g_timer_destroy (_timer);
|
||||
_timer = NULL;
|
||||
|
||||
g_print ("%ld seconds\n", elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_rgn_render_row (guchar *src,
|
||||
guchar *dest,
|
||||
|
||||
@ -69,9 +69,6 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
gboolean transparent,
|
||||
guchar *bg);
|
||||
|
||||
void gimp_timer_start(void);
|
||||
void gimp_timer_stop(void);
|
||||
|
||||
|
||||
typedef void (*GimpRgnFunc1)(guchar *src, gint bpp, gpointer);
|
||||
typedef void (*GimpRgnFunc2)(guchar *src, guchar *dest, gint bpp, gpointer);
|
||||
|
||||
@ -247,31 +247,6 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
}
|
||||
}
|
||||
|
||||
GTimer* _timer = NULL;
|
||||
|
||||
void
|
||||
gimp_timer_start(void)
|
||||
{
|
||||
g_return_if_fail (!_timer);
|
||||
|
||||
_timer = g_timer_new ();
|
||||
}
|
||||
|
||||
void
|
||||
gimp_timer_stop(void)
|
||||
{
|
||||
double elapsed;
|
||||
|
||||
g_return_if_fail (_timer != NULL);
|
||||
|
||||
g_timer_stop (_timer);
|
||||
elapsed = g_timer_elapsed (_timer, NULL);
|
||||
g_timer_destroy (_timer);
|
||||
_timer = NULL;
|
||||
|
||||
g_print ("%ld seconds\n", elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_rgn_render_row (guchar *src,
|
||||
guchar *dest,
|
||||
|
||||
@ -69,9 +69,6 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
gboolean transparent,
|
||||
guchar *bg);
|
||||
|
||||
void gimp_timer_start(void);
|
||||
void gimp_timer_stop(void);
|
||||
|
||||
|
||||
typedef void (*GimpRgnFunc1)(guchar *src, gint bpp, gpointer);
|
||||
typedef void (*GimpRgnFunc2)(guchar *src, guchar *dest, gint bpp, gpointer);
|
||||
|
||||
@ -247,31 +247,6 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
}
|
||||
}
|
||||
|
||||
GTimer* _timer = NULL;
|
||||
|
||||
void
|
||||
gimp_timer_start(void)
|
||||
{
|
||||
g_return_if_fail (!_timer);
|
||||
|
||||
_timer = g_timer_new ();
|
||||
}
|
||||
|
||||
void
|
||||
gimp_timer_stop(void)
|
||||
{
|
||||
double elapsed;
|
||||
|
||||
g_return_if_fail (_timer != NULL);
|
||||
|
||||
g_timer_stop (_timer);
|
||||
elapsed = g_timer_elapsed (_timer, NULL);
|
||||
g_timer_destroy (_timer);
|
||||
_timer = NULL;
|
||||
|
||||
g_print ("%ld seconds\n", elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_rgn_render_row (guchar *src,
|
||||
guchar *dest,
|
||||
|
||||
@ -69,9 +69,6 @@ void gimp_get_bg_guchar (GimpDrawable *drawable,
|
||||
gboolean transparent,
|
||||
guchar *bg);
|
||||
|
||||
void gimp_timer_start(void);
|
||||
void gimp_timer_stop(void);
|
||||
|
||||
|
||||
typedef void (*GimpRgnFunc1)(guchar *src, gint bpp, gpointer);
|
||||
typedef void (*GimpRgnFunc2)(guchar *src, guchar *dest, gint bpp, gpointer);
|
||||
|
||||
@ -1776,6 +1776,10 @@ newsprint (GimpDrawable *drawable)
|
||||
gpointer pr;
|
||||
gint w002;
|
||||
|
||||
#ifdef TIMINGS
|
||||
GTimer *timer = g_timer_new ();
|
||||
#endif
|
||||
|
||||
width = pvals.cell_width;
|
||||
|
||||
if (width < 0)
|
||||
@ -1874,10 +1878,6 @@ do { \
|
||||
progress = 0;
|
||||
max_progress = (x2 - x1) * (y2 - y1);
|
||||
|
||||
#ifdef TIMINGS
|
||||
gimp_timer_start();
|
||||
#endif
|
||||
|
||||
for (y = y1; y < y2; y += tile_width - (y % tile_width))
|
||||
{
|
||||
for (x = x1; x < x2; x += tile_width - (x % tile_width))
|
||||
@ -2035,7 +2035,8 @@ do { \
|
||||
}
|
||||
|
||||
#ifdef TIMINGS
|
||||
gimp_timer_stop();
|
||||
g_printerr ("%f seconds\n", g_timer_elapsed (timer));
|
||||
g_timer_destroy (timer);
|
||||
#endif
|
||||
|
||||
/* We don't free the threshold matrices, since we're about to
|
||||
|
||||
@ -171,7 +171,7 @@ run (gchar *name,
|
||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||
|
||||
#ifdef TIMER
|
||||
timerstart();
|
||||
GTimer *timer = g_timer_new ();
|
||||
#endif
|
||||
|
||||
run_mode = param[0].data.d_int32;
|
||||
@ -237,8 +237,10 @@ run (gchar *name,
|
||||
gimp_drawable_detach(drawable);
|
||||
values[0].data.d_status = status;
|
||||
}
|
||||
|
||||
#ifdef TIMER
|
||||
timerstop ();
|
||||
g_printerr ("%f seconds\n", g_timer_elapsed (timer));
|
||||
g_timer_destroy (timer);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -362,9 +362,9 @@ package Gimp::CodeGen::enums;
|
||||
SizeType =>
|
||||
{ contig => 1,
|
||||
header => 'core/core-types.h',
|
||||
symbols => [ qw(SIZE_PIXELS SIZE_POINTS) ],
|
||||
mapping => { SIZE_PIXELS => '0',
|
||||
SIZE_POINTS => '1' }
|
||||
symbols => [ qw(GIMP_PIXELS GIMP_POINTS) ],
|
||||
mapping => { GIMP_PIXELS => '0',
|
||||
GIMP_POINTS => '1' }
|
||||
},
|
||||
GimpCloneType =>
|
||||
{ contig => 1,
|
||||
|
||||
Reference in New Issue
Block a user