automatically removed trailing whitespace from 3460 lines.

2006-01-17  Raphael Quinet  <raphael@gimp.org>

	* (about 130 *.[ch] files): automatically removed trailing
	whitespace from 3460 lines.
This commit is contained in:
Raphael Quinet 2006-01-17 12:43:50 +00:00 committed by Raphaël Quinet
parent d9ffb3db1c
commit 7d8998a99c
135 changed files with 2694 additions and 2689 deletions

View File

@ -1,3 +1,8 @@
2006-01-17 Raphaël Quinet <raphael@gimp.org>
* (about 130 *.[ch] files): automatically removed trailing
whitespace from 3460 lines.
2006-01-17 Sven Neumann <sven@gimp.org>
* app/about.h (GIMP_COPYRIGHT): updated year in copyright.

View File

@ -93,24 +93,24 @@ color_balance_create_lookup_tables (ColorBalance *cb)
}
/* Set the transfer arrays (for speed) */
cyan_red_transfer[GIMP_SHADOWS] =
cyan_red_transfer[GIMP_SHADOWS] =
(cb->cyan_red[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
cyan_red_transfer[GIMP_MIDTONES] =
cyan_red_transfer[GIMP_MIDTONES] =
(cb->cyan_red[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
cyan_red_transfer[GIMP_HIGHLIGHTS] =
cyan_red_transfer[GIMP_HIGHLIGHTS] =
(cb->cyan_red[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
magenta_green_transfer[GIMP_SHADOWS] =
magenta_green_transfer[GIMP_SHADOWS] =
(cb->magenta_green[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
magenta_green_transfer[GIMP_MIDTONES] =
magenta_green_transfer[GIMP_MIDTONES] =
(cb->magenta_green[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
magenta_green_transfer[GIMP_HIGHLIGHTS] =
magenta_green_transfer[GIMP_HIGHLIGHTS] =
(cb->magenta_green[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
yellow_blue_transfer[GIMP_SHADOWS] =
yellow_blue_transfer[GIMP_SHADOWS] =
(cb->yellow_blue[GIMP_SHADOWS] > 0) ? shadows_add : shadows_sub;
yellow_blue_transfer[GIMP_MIDTONES] =
yellow_blue_transfer[GIMP_MIDTONES] =
(cb->yellow_blue[GIMP_MIDTONES] > 0) ? midtones_add : midtones_sub;
yellow_blue_transfer[GIMP_HIGHLIGHTS] =
yellow_blue_transfer[GIMP_HIGHLIGHTS] =
(cb->yellow_blue[GIMP_HIGHLIGHTS] > 0) ? highlights_add : highlights_sub;
for (i = 0; i < 256; i++)

View File

@ -135,7 +135,7 @@ arch_get_vendor (void)
*(int *)&id[0] = ebx;
*(int *)&id[4] = edx;
*(int *)&id[8] = ecx;
id[12] = '\0';
#ifdef ARCH_X86_64
@ -417,7 +417,7 @@ static guint32
arch_accel (void)
{
signal (SIGILL, sigill_handler);
if (sigsetjmp (jmpbuf, 1))
{
signal (SIGILL, SIG_DFL);

View File

@ -45,7 +45,7 @@ struct _TileManager
typedef struct _PixelDataHandlePrivate PixelDataHandlePrivate;
struct _PixelDataHandlePrivate
struct _PixelDataHandlePrivate
{
PixelDataHandle public;
TileManager *tm;

View File

@ -18,19 +18,19 @@ static struct install_table {
void (*function)(GimpCompositeContext *);
} _gimp_composite_altivec[] = {
#if defined(COMPILE_ALTIVEC_IS_OKAY)
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_divide_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_BLEND, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_blend_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DIVIDE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_divide_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_DODGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_dodge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_BLEND, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_blend_rgba8_rgba8_rgba8_altivec },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_altivec },
#endif
{ 0, 0, 0, 0, NULL }
};

View File

@ -291,7 +291,7 @@ gimp_composite_difference_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
length = length*4;
a=LoadUnalignedLess(A, length);
b=LoadUnalignedLess(B, length);
alpha_a=vec_and(a,alphamask);
alpha_b=vec_and(b,alphamask);
d=vec_min(alpha_a,alpha_b);
@ -302,7 +302,7 @@ gimp_composite_difference_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
d=vec_subs(a,b);
e=vec_subs(b, a);
d=vec_add(d,e);
StoreUnalignedLess(d, D, length);
}
@ -321,7 +321,7 @@ gimp_composite_darken_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
b=LoadUnaligned(B);
d=vec_min(a, b);
StoreUnaligned(d, D);
A+=16;
@ -335,11 +335,11 @@ gimp_composite_darken_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
b=LoadUnalignedLess(B, length);
d=vec_min(a, b);
StoreUnalignedLess(d, D, length);
}
void
void
gimp_composite_lighten_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
{
const guchar *A = ctx->A;
@ -356,7 +356,7 @@ gimp_composite_lighten_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
alpha_a=vec_and(a, alphamask);
alpha_b=vec_and(b, alphamask);
d=vec_min(alpha_a, alpha_b);
a=vec_andc(a, alphamask);
a=vec_adds(a, d);
b=vec_andc(b, alphamask);
@ -377,7 +377,7 @@ gimp_composite_lighten_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
alpha_a=vec_and(a,alphamask);
alpha_b=vec_and(b,alphamask);
d=vec_min(alpha_a,alpha_b);
a=vec_andc(a,alphamask);
a=vec_adds(a,d);
b=vec_andc(b,alphamask);
@ -474,8 +474,8 @@ gimp_composite_blend_rgba8_rgba8_rgba8_altivec (GimpCompositeContext *ctx)
a=LoadUnaligned(A);
b=LoadUnaligned(B);
/* dest[b] = (src1[b] * blend2 + src2[b] * blend) / 255;
* to divide by 255 we use ((n+1)+(n+1)>>8)>>8
/* dest[b] = (src1[b] * blend2 + src2[b] * blend) / 255;
* to divide by 255 we use ((n+1)+(n+1)>>8)>>8
* It works for all value but 0xffff
* happily blending formula can't give this value */

File diff suppressed because it is too large Load Diff

View File

@ -18,19 +18,19 @@ static struct install_table {
void (*function)(GimpCompositeContext *);
} _gimp_composite_mmx[] = {
#if defined(COMPILE_MMX_IS_OKAY)
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_addition_va8_va8_va8_mmx },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_subtract_va8_va8_va8_mmx },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SCALE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_scale_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_addition_va8_va8_va8_mmx },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, GIMP_PIXELFORMAT_VA8, gimp_composite_subtract_va8_va8_va8_mmx },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_mmx },
{ GIMP_COMPOSITE_SCALE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_scale_rgba8_rgba8_rgba8_mmx },
#endif
{ 0, 0, 0, 0, NULL }
};

View File

@ -189,7 +189,7 @@ gimp_composite_burn_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
"\tpandn %%mm5,%%mm7\n" /* mm7 = ~mm7 & mm5 */
"\tpor %%mm1,%%mm7\n" /* mm7 = mm7 | mm1 */
"\tmovq %%mm7,%0\n"
: "=m" (*d)
: "m" (*a), "m" (*b), "m" (*rgba8_b255_64), "m" (*rgba8_w1_64), "m" (*rgba8_w255_64), "m" (*rgba8_alpha_mask_64)
@ -1186,7 +1186,7 @@ gimp_composite_screen_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
"\tpand %%mm0,%%mm3\n"
"\tpor %%mm3,%%mm1\n"
"\tmovd %%mm1,%0\n"
: "=m" (*d)
: "m" (*a), "m" (*b)
@ -1269,7 +1269,7 @@ gimp_composite_swap_rgba8_rgba8_rgba8_mmx (GimpCompositeContext *_op)
"\tmovntq %%mm3,%0\n"
"\tmovntq %%mm2,%1\n"
: "+m" (*a), "+m" (*b)
:
:
: "%mm2", "%mm3");
a++;
b++;
@ -1300,7 +1300,7 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
gulong n_pixels = _op->n_pixels;
asm volatile ("movq %0,%%mm0"
:
:
: "m" (*va8_alpha_mask_64)
: "%mm0");
@ -1347,7 +1347,7 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
b32++;
d32++;
}
uint16 *a16 = (uint16 *) a32;
uint16 *b16 = (uint16 *) b32;
uint16 *d16 = (uint16 *) d32;
@ -1373,7 +1373,7 @@ gimp_composite_addition_va8_va8_va8_mmx (GimpCompositeContext *_op)
b16++;
d16++;
}
asm("emms");
}
@ -1386,7 +1386,7 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
gulong n_pixels = _op->n_pixels;
asm volatile ("movq %0,%%mm0"
:
:
: "m" (*va8_alpha_mask_64)
: "%mm0");
@ -1433,7 +1433,7 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
b32++;
d32++;
}
uint16 *a16 = (uint16 *) a32;
uint16 *b16 = (uint16 *) b32;
uint16 *d16 = (uint16 *) d32;
@ -1459,7 +1459,7 @@ gimp_composite_subtract_va8_va8_va8_mmx (GimpCompositeContext *_op)
b16++;
d16++;
}
asm("emms");
}

View File

@ -18,17 +18,17 @@ static struct install_table {
void (*function)(GimpCompositeContext *);
} _gimp_composite_sse[] = {
#if defined(COMPILE_SSE_IS_OKAY)
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SCALE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_scale_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_MULTIPLY, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_multiply_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SCREEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_screen_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_GRAIN_MERGE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_merge_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_sse },
{ GIMP_COMPOSITE_SCALE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_scale_rgba8_rgba8_rgba8_sse },
#endif
{ 0, 0, 0, 0, NULL }
};

View File

@ -166,7 +166,7 @@ gimp_composite_burn_rgba8_rgba8_rgba8_sse (GimpCompositeContext *_op)
"\tpandn %%mm5,%%mm7\n" /* mm7 = ~mm7 & mm5 */
"\tpor %%mm1,%%mm7\n" /* mm7 = mm7 | mm1 */
"\tmovq %%mm7,%0\n"
: "=m" (*d)
: "m" (*a), "m" (*b), "m" (*rgba8_b255_64), "m" (*rgba8_w1_64), "m" (*rgba8_w255_64), "m" (*rgba8_alpha_mask_64)

View File

@ -18,13 +18,13 @@ static struct install_table {
void (*function)(GimpCompositeContext *);
} _gimp_composite_sse2[] = {
#if defined(COMPILE_SSE2_IS_OKAY)
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_DIFFERENCE, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_difference_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_ADDITION, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_addition_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_SUBTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_subtract_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_DARKEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_darken_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_LIGHTEN, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_lighten_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_GRAIN_EXTRACT, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_grain_extract_rgba8_rgba8_rgba8_sse2 },
{ GIMP_COMPOSITE_SWAP, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, GIMP_PIXELFORMAT_RGBA8, gimp_composite_swap_rgba8_rgba8_rgba8_sse2 },
#endif
{ 0, 0, 0, 0, NULL }
};

View File

@ -107,7 +107,7 @@ gimp_composite_addition_rgba8_rgba8_rgba8_sse2 (GimpCompositeContext *_op)
"\tmovdqu %2,%%xmm3\n"
"\tmovdqu %%xmm2,%%xmm4\n"
"\tpaddusb %%xmm3,%%xmm4\n"
"\tmovdqu %%xmm0,%%xmm1\n"
"\tpandn %%xmm4,%%xmm1\n"
"\tpminub %%xmm3,%%xmm2\n"

View File

@ -110,7 +110,7 @@
"psllq $32,%%" #divisor ";" \
"por %%" #divisor ",%%" #quotient ";"
#define pdivwqX_clobber "%eax", "%ecx", "%edx", "%cc"
/*
* Quadword divide. Adjusted for subsequent unsigned packing
* (high-order bit of each word is cleared)
@ -175,7 +175,7 @@
"movd %%eax,%%" #scratch ";" \
"psllq $96,%%" #scratch ";" \
"por %%" #scratch ",%%" #quotient ";"
#define xmm_pdivwX(dividend,divisor,quotient) "movd %%" #dividend ",%%eax; " \
"movd %%" #divisor ",%%ecx; " \
"xorl %%edx,%%edx; " \
@ -226,7 +226,7 @@
"\tpsrlw $8, %%"#opr2"; " \
"\tpaddw %%"#opr1", %%"#opr2"; " \
"\tpsrlw $8, %%"#opr2"\n"
#define xmm_pmulwX(opr1,opr2,w128) \
"\tpmullw %%"#opr2", %%"#opr1"; " \
"\tpaddw %%"#w128", %%"#opr1"; " \

View File

@ -1,4 +1,4 @@
/* gimpparasite.h: Copyright 1998 Jay Cox <jaycox@gimp.org>
/* gimpparasite.h: Copyright 1998 Jay Cox <jaycox@gimp.org>
*
* 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

View File

@ -34,7 +34,7 @@
typedef struct _GimpEnvironTableClass GimpEnvironTableClass;
struct _GimpEnvironTable
{
{
GObject parent_instance;
GHashTable *vars;
@ -44,7 +44,7 @@ struct _GimpEnvironTable
};
struct _GimpEnvironTableClass
{
{
GObjectClass parent_class;
};

View File

@ -1,6 +1,6 @@
/* The GIMP -- an image manipulation program
* Copyright (C) 1995-1999 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

View File

@ -37,10 +37,10 @@ gboolean gimp_image_get_popup_size (GimpViewable *viewable,
gint *popup_width,
gint *popup_height);
TempBuf * gimp_image_get_preview (GimpViewable *viewable,
gint width,
gint width,
gint height);
TempBuf * gimp_image_get_new_preview (GimpViewable *viewable,
gint width,
gint width,
gint height);

View File

@ -476,7 +476,7 @@ gimp_interpreter_db_clear_magics (GimpInterpreterDB *db)
list = list->next;
g_slist_free_1 (last);
}
}
}
#ifdef INTERP_DEBUG
@ -522,7 +522,7 @@ resolve_program (gpointer key,
g_free (value);
value = g_strdup (program);
}
g_hash_table_insert (db->extensions, key, value);
return TRUE;
@ -569,7 +569,7 @@ gimp_interpreter_db_resolve_programs (GimpInterpreterDB *db)
g_hash_table_foreach (db->extensions, print_kv, NULL);
g_print ("\nMagics:\n");
list = db->magics;
while (list)

View File

@ -34,7 +34,7 @@
typedef struct _GimpInterpreterDBClass GimpInterpreterDBClass;
struct _GimpInterpreterDB
{
{
GObject parent_instance;
GHashTable *programs;
@ -47,7 +47,7 @@ struct _GimpInterpreterDB
};
struct _GimpInterpreterDBClass
{
{
GObjectClass parent_class;
};

View File

@ -276,7 +276,7 @@ pattern_pixels_mask (guchar *dest,
}
}
/*
/*
* blend_pixels patched 8-24-05 to fix bug #163721. Note that this change
* causes the function to treat src1 and src2 asymmetrically. This gives the
* right behavior for the smudge tool, which is the only user of this function

View File

@ -226,7 +226,7 @@ buffer_delete_invoker (Gimp *gimp,
{
GimpBuffer *buffer;
buffer = (GimpBuffer *)
buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL);
@ -282,7 +282,7 @@ buffer_get_width_invoker (Gimp *gimp,
if (success)
{
buffer = (GimpBuffer *)
buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL);
@ -349,7 +349,7 @@ buffer_get_height_invoker (Gimp *gimp,
if (success)
{
buffer = (GimpBuffer *)
buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL);
@ -416,7 +416,7 @@ buffer_get_bytes_invoker (Gimp *gimp,
if (success)
{
buffer = (GimpBuffer *)
buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL);
@ -483,7 +483,7 @@ buffer_get_image_type_invoker (Gimp *gimp,
if (success)
{
buffer = (GimpBuffer *)
buffer = (GimpBuffer *)
gimp_container_get_child_by_name (gimp->named_buffers, buffer_name);
success = (buffer != NULL);

View File

@ -448,7 +448,7 @@ posterize_invoker (Gimp *gimp,
GimpLut *lut;
PixelRegion srcPR, destPR;
lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable));
lut = posterize_lut_new (levels, gimp_drawable_bytes (drawable));
pixel_region_init (&srcPR, gimp_drawable_data (drawable),
x, y, width, height, FALSE);

View File

@ -423,7 +423,7 @@ file_save_invoker (Gimp *gimp,
g_free (uri);
if (! file_proc)
if (! file_proc)
return procedural_db_return_args (&file_save_proc, FALSE);
proc = plug_in_proc_def_get_proc (file_proc);

View File

@ -507,7 +507,7 @@ image_get_guide_position_invoker (Gimp *gimp,
success = TRUE;
break;
}
}
}
}
return_args = procedural_db_return_args (&image_get_guide_position_proc, success);

View File

@ -238,7 +238,7 @@ palettes_get_palette_entry_invoker (Gimp *gimp,
if (palette)
{
if (entry_num < 0 || entry_num >= palette->n_colors)
if (entry_num < 0 || entry_num >= palette->n_colors)
{
success = FALSE;
}

View File

@ -702,11 +702,11 @@ path_get_point_at_dist_invoker (Gimp *gimp,
distance_along = 0.0;
stroke = gimp_vectors_stroke_get_next (vectors, NULL);
while (stroke != NULL )
while (stroke != NULL )
{
stroke_length = gimp_stroke_get_length (stroke, 0.5);
if (distance_along + stroke_length < distance)
if (distance_along + stroke_length < distance)
{
distance_along += stroke_length;
}

View File

@ -934,7 +934,7 @@ selection_load_invoker (Gimp *gimp,
gimp_channel_select_channel (gimp_image_get_mask (gimage),
_("Channel to Selection"),
channel,
channel,
off_x, off_y,
GIMP_CHANNEL_OP_REPLACE,
FALSE, 0.0, 0.0);
@ -1060,7 +1060,7 @@ selection_combine_invoker (Gimp *gimp,
gimp_channel_select_channel (gimp_image_get_mask (gimage),
_("Channel to Selection"),
channel,
channel,
off_x, off_y,
operation,
FALSE, 0.0, 0.0);

View File

@ -333,10 +333,10 @@ free_select_invoker (Gimp *gimp,
gimp_channel_select_polygon (gimp_image_get_mask (gimage),
_("Free Select"),
num_segs,
(GimpVector2 *) segs,
(GimpVector2 *) segs,
operation,
antialias,
feather,
feather,
feather_radius,
feather_radius);
@ -449,7 +449,7 @@ fuzzy_select_invoker (Gimp *gimp,
gimp_channel_select_fuzzy (gimp_image_get_mask (gimage),
drawable,
sample_merged,
x, y,
x, y,
threshold,
FALSE /* don't select transparent */,
operation,

View File

@ -34,7 +34,7 @@
typedef struct _GimpEnvironTableClass GimpEnvironTableClass;
struct _GimpEnvironTable
{
{
GObject parent_instance;
GHashTable *vars;
@ -44,7 +44,7 @@ struct _GimpEnvironTable
};
struct _GimpEnvironTableClass
{
{
GObjectClass parent_class;
};

View File

@ -476,7 +476,7 @@ gimp_interpreter_db_clear_magics (GimpInterpreterDB *db)
list = list->next;
g_slist_free_1 (last);
}
}
}
#ifdef INTERP_DEBUG
@ -522,7 +522,7 @@ resolve_program (gpointer key,
g_free (value);
value = g_strdup (program);
}
g_hash_table_insert (db->extensions, key, value);
return TRUE;
@ -569,7 +569,7 @@ gimp_interpreter_db_resolve_programs (GimpInterpreterDB *db)
g_hash_table_foreach (db->extensions, print_kv, NULL);
g_print ("\nMagics:\n");
list = db->magics;
while (list)

View File

@ -34,7 +34,7 @@
typedef struct _GimpInterpreterDBClass GimpInterpreterDBClass;
struct _GimpInterpreterDB
{
{
GObject parent_instance;
GHashTable *programs;
@ -47,7 +47,7 @@ struct _GimpInterpreterDB
};
struct _GimpInterpreterDBClass
{
{
GObjectClass parent_class;
};

View File

@ -88,7 +88,7 @@ plug_in_debug_init (Gimp *gimp)
dbg->name = g_strdup (wrap);
dbg->flags = GIMP_DEBUG_WRAP_DEFAULT;
}
gimp->plug_in_debug = dbg;
}

View File

@ -32,7 +32,7 @@ typedef enum
void plug_in_debug_init (Gimp *gimp);
void plug_in_debug_exit (Gimp *gimp);
gchar **plug_in_debug_argv (Gimp *gimp,
const gchar *name,
GimpDebugWrapFlag flag,

View File

@ -88,7 +88,7 @@ plug_in_debug_init (Gimp *gimp)
dbg->name = g_strdup (wrap);
dbg->flags = GIMP_DEBUG_WRAP_DEFAULT;
}
gimp->plug_in_debug = dbg;
}

View File

@ -32,7 +32,7 @@ typedef enum
void plug_in_debug_init (Gimp *gimp);
void plug_in_debug_exit (Gimp *gimp);
gchar **plug_in_debug_argv (Gimp *gimp,
const gchar *name,
GimpDebugWrapFlag flag,

View File

@ -50,7 +50,7 @@ GType
gtk_hwrap_box_get_type (void)
{
static GType hwrap_box_type = 0;
if (!hwrap_box_type)
{
static const GTypeInfo hwrap_box_info =
@ -65,11 +65,11 @@ gtk_hwrap_box_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) gtk_hwrap_box_init,
};
hwrap_box_type = g_type_register_static (GTK_TYPE_WRAP_BOX, "GtkHWrapBox",
&hwrap_box_info, 0);
}
return hwrap_box_type;
}
@ -80,14 +80,14 @@ gtk_hwrap_box_class_init (GtkHWrapBoxClass *class)
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
GtkWrapBoxClass *wrap_box_class;
object_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
container_class = GTK_CONTAINER_CLASS (class);
wrap_box_class = GTK_WRAP_BOX_CLASS (class);
parent_class = g_type_class_peek_parent (class);
widget_class->size_request = gtk_hwrap_box_size_request;
widget_class->size_allocate = gtk_hwrap_box_size_allocate;
@ -115,7 +115,7 @@ get_child_requisition (GtkWrapBox *wbox,
if (wbox->homogeneous)
{
GtkHWrapBox *hwbox = GTK_HWRAP_BOX (wbox);
child_requisition->width = hwbox->max_child_width;
child_requisition->height = hwbox->max_child_height;
}
@ -171,7 +171,7 @@ get_layout_size (GtkHWrapBox *this,
if (*width_inc > this->max_child_width)
*width_inc = 0;
return MAX (total_height, 1);
}
@ -184,9 +184,9 @@ gtk_hwrap_box_size_request (GtkWidget *widget,
GtkWrapBoxChild *child;
gfloat ratio_dist, layout_width = 0;
guint row_inc = 0;
g_return_if_fail (requisition != NULL);
requisition->width = 0;
requisition->height = 0;
this->max_child_width = 0;
@ -252,18 +252,18 @@ reverse_list_row_children (GtkWrapBox *wbox,
*max_child_size = 0;
*expand_line = FALSE;
while (child && !GTK_WIDGET_VISIBLE (child->widget))
{
*child_p = child->next;
child = *child_p;
}
if (child)
{
GtkRequisition child_requisition;
guint n = 1;
get_child_requisition (wbox, child->widget, &child_requisition);
width += child_requisition.width;
*max_child_size = MAX (*max_child_size, child_requisition.height);
@ -271,7 +271,7 @@ reverse_list_row_children (GtkWrapBox *wbox,
slist = g_slist_prepend (slist, child);
*child_p = child->next;
child = *child_p;
while (child && n < wbox->child_limit)
{
if (GTK_WIDGET_VISIBLE (child->widget))
@ -290,7 +290,7 @@ reverse_list_row_children (GtkWrapBox *wbox,
child = *child_p;
}
}
return slist;
}
@ -306,27 +306,27 @@ layout_row (GtkWrapBox *wbox,
gint total_width = 0;
gfloat x, width, extra;
GtkAllocation child_allocation;
for (slist = children; slist; slist = slist->next)
{
GtkWrapBoxChild *child = slist->data;
GtkRequisition child_requisition;
n_children++;
if (child->hexpand)
n_expand_children++;
get_child_requisition (wbox, child->widget, &child_requisition);
total_width += child_requisition.width;
}
width = MAX (1, area->width - (n_children - 1) * wbox->hspacing);
if (width > total_width)
extra = width - total_width;
else
extra = 0;
have_expand_children = n_expand_children && extra;
x = area->x;
if (wbox->homogeneous)
{
@ -366,12 +366,12 @@ layout_row (GtkWrapBox *wbox,
extra = 0;
}
}
n_children = 0;
for (slist = children; slist; slist = slist->next)
{
GtkWrapBoxChild *child = slist->data;
child_allocation.x = x;
child_allocation.y = area->y;
if (wbox->homogeneous)
@ -383,9 +383,9 @@ layout_row (GtkWrapBox *wbox,
else
{
GtkRequisition child_requisition;
get_child_requisition (wbox, child->widget, &child_requisition);
if (child_requisition.height >= area->height)
child_allocation.height = area->height;
else
@ -398,14 +398,14 @@ layout_row (GtkWrapBox *wbox,
else if (wbox->line_justify == GTK_JUSTIFY_BOTTOM)
child_allocation.y += area->height - child_requisition.height;
}
if (have_expand_children)
{
child_allocation.width = child_requisition.width;
if (child->hexpand || wbox->justify == GTK_JUSTIFY_FILL)
{
guint space;
n_expand_children--;
space = extra * n_expand_children;
space = width - space;
@ -430,7 +430,7 @@ layout_row (GtkWrapBox *wbox,
area->width - child_allocation.x + area->x);
}
}
x += child_allocation.width + wbox->hspacing;
gtk_widget_size_allocate (child->widget, &child_allocation);
n_children++;
@ -458,7 +458,7 @@ layout_rows (GtkWrapBox *wbox,
guint total_height = 0, n_expand_lines = 0, n_lines = 0;
gfloat shrink_height;
guint children_per_line;
next_child = wbox->children;
slist = GTK_WRAP_BOX_GET_CLASS (wbox)->rlist_line_children (wbox,
&next_child,
@ -471,7 +471,7 @@ layout_rows (GtkWrapBox *wbox,
while (slist)
{
Line *line = g_new (Line, 1);
line->children = slist;
line->min_size = min_height;
total_height += min_height;
@ -481,7 +481,7 @@ layout_rows (GtkWrapBox *wbox,
line->next = line_list;
line_list = line;
n_lines++;
slist = GTK_WRAP_BOX_GET_CLASS (wbox)->rlist_line_children (wbox,
&next_child,
area,
@ -489,17 +489,17 @@ layout_rows (GtkWrapBox *wbox,
&vexpand);
slist = g_slist_reverse (slist);
}
if (total_height > area->height)
shrink_height = total_height - area->height;
else
shrink_height = 0;
if (1) /* reverse lines and shrink */
{
Line *prev = NULL, *last = NULL;
gfloat n_shrink_lines = n_lines;
while (line_list)
{
Line *tmp = line_list->next;
@ -529,15 +529,15 @@ layout_rows (GtkWrapBox *wbox,
}
line_list = last;
}
if (n_lines)
{
Line *line;
gfloat y, height, extra = 0;
height = area->height;
height = MAX (n_lines, height - (n_lines - 1) * wbox->vspacing);
if (wbox->homogeneous)
height /= ((gdouble) n_lines);
else if (n_expand_lines)
@ -547,14 +547,14 @@ layout_rows (GtkWrapBox *wbox,
}
else
height = 0;
y = area->y;
line = line_list;
while (line)
{
GtkAllocation row_allocation;
Line *next_line = line->next;
row_allocation.x = area->x;
row_allocation.width = area->width;
if (wbox->homogeneous)
@ -562,13 +562,13 @@ layout_rows (GtkWrapBox *wbox,
else
{
row_allocation.height = line->min_size;
if (line->expand)
row_allocation.height += extra;
}
row_allocation.y = y;
y += row_allocation.height + wbox->vspacing;
layout_row (wbox,
&row_allocation,
@ -590,19 +590,19 @@ gtk_hwrap_box_size_allocate (GtkWidget *widget,
GtkWrapBox *wbox = GTK_WRAP_BOX (widget);
GtkAllocation area;
gint border = GTK_CONTAINER (wbox)->border_width; /*<h2v-skip>*/
widget->allocation = *allocation;
area.x = allocation->x + border;
area.y = allocation->y + border;
area.width = MAX (1, (gint) allocation->width - border * 2);
area.height = MAX (1, (gint) allocation->height - border * 2);
/*<h2v-off>*/
/* g_print ("got: width %d, height %d\n",
allocation->width,
allocation->height);
*/
/*<h2v-on>*/
layout_rows (wbox, &area);
}

View File

@ -47,7 +47,7 @@ typedef struct _GtkHWrapBoxClass GtkHWrapBoxClass;
struct _GtkHWrapBox
{
GtkWrapBox parent_widget;
/*<h2v-off>*/
guint max_child_width;
guint max_child_height;

View File

@ -50,7 +50,7 @@ GType
gtk_vwrap_box_get_type (void)
{
static GType vwrap_box_type = 0;
if (!vwrap_box_type)
{
static const GTypeInfo vwrap_box_info =
@ -65,11 +65,11 @@ gtk_vwrap_box_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) gtk_vwrap_box_init,
};
vwrap_box_type = g_type_register_static (GTK_TYPE_WRAP_BOX, "GtkVWrapBox",
&vwrap_box_info, 0);
}
return vwrap_box_type;
}
@ -80,14 +80,14 @@ gtk_vwrap_box_class_init (GtkVWrapBoxClass *class)
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
GtkWrapBoxClass *wrap_box_class;
object_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
container_class = GTK_CONTAINER_CLASS (class);
wrap_box_class = GTK_WRAP_BOX_CLASS (class);
parent_class = g_type_class_peek_parent (class);
widget_class->size_request = gtk_vwrap_box_size_request;
widget_class->size_allocate = gtk_vwrap_box_size_allocate;
@ -115,7 +115,7 @@ get_child_requisition (GtkWrapBox *wbox,
if (wbox->homogeneous)
{
GtkVWrapBox *vwbox = GTK_VWRAP_BOX (wbox);
child_requisition->height = vwbox->max_child_height;
child_requisition->width = vwbox->max_child_width;
}
@ -171,7 +171,7 @@ get_layout_size (GtkVWrapBox *this,
if (*height_inc > this->max_child_height)
*height_inc = 0;
return MAX (total_width, 1);
}
@ -184,9 +184,9 @@ gtk_vwrap_box_size_request (GtkWidget *widget,
GtkWrapBoxChild *child;
gfloat ratio_dist, layout_height = 0;
guint col_inc = 0;
g_return_if_fail (requisition != NULL);
requisition->height = 0;
requisition->width = 0;
this->max_child_height = 0;
@ -252,18 +252,18 @@ reverse_list_col_children (GtkWrapBox *wbox,
*max_child_size = 0;
*expand_line = FALSE;
while (child && !GTK_WIDGET_VISIBLE (child->widget))
{
*child_p = child->next;
child = *child_p;
}
if (child)
{
GtkRequisition child_requisition;
guint n = 1;
get_child_requisition (wbox, child->widget, &child_requisition);
height += child_requisition.height;
*max_child_size = MAX (*max_child_size, child_requisition.width);
@ -271,7 +271,7 @@ reverse_list_col_children (GtkWrapBox *wbox,
slist = g_slist_prepend (slist, child);
*child_p = child->next;
child = *child_p;
while (child && n < wbox->child_limit)
{
if (GTK_WIDGET_VISIBLE (child->widget))
@ -290,7 +290,7 @@ reverse_list_col_children (GtkWrapBox *wbox,
child = *child_p;
}
}
return slist;
}
@ -306,27 +306,27 @@ layout_col (GtkWrapBox *wbox,
gint total_height = 0;
gfloat y, height, extra;
GtkAllocation child_allocation;
for (slist = children; slist; slist = slist->next)
{
GtkWrapBoxChild *child = slist->data;
GtkRequisition child_requisition;
n_children++;
if (child->vexpand)
n_expand_children++;
get_child_requisition (wbox, child->widget, &child_requisition);
total_height += child_requisition.height;
}
height = MAX (1, area->height - (n_children - 1) * wbox->vspacing);
if (height > total_height)
extra = height - total_height;
else
extra = 0;
have_expand_children = n_expand_children && extra;
y = area->y;
if (wbox->homogeneous)
{
@ -366,12 +366,12 @@ layout_col (GtkWrapBox *wbox,
extra = 0;
}
}
n_children = 0;
for (slist = children; slist; slist = slist->next)
{
GtkWrapBoxChild *child = slist->data;
child_allocation.y = y;
child_allocation.x = area->x;
if (wbox->homogeneous)
@ -383,9 +383,9 @@ layout_col (GtkWrapBox *wbox,
else
{
GtkRequisition child_requisition;
get_child_requisition (wbox, child->widget, &child_requisition);
if (child_requisition.width >= area->width)
child_allocation.width = area->width;
else
@ -398,14 +398,14 @@ layout_col (GtkWrapBox *wbox,
else if (wbox->line_justify == GTK_JUSTIFY_BOTTOM)
child_allocation.x += area->width - child_requisition.width;
}
if (have_expand_children)
{
child_allocation.height = child_requisition.height;
if (child->vexpand || wbox->justify == GTK_JUSTIFY_FILL)
{
guint space;
n_expand_children--;
space = extra * n_expand_children;
space = height - space;
@ -430,7 +430,7 @@ layout_col (GtkWrapBox *wbox,
area->height - child_allocation.y + area->y);
}
}
y += child_allocation.height + wbox->vspacing;
gtk_widget_size_allocate (child->widget, &child_allocation);
n_children++;
@ -458,7 +458,7 @@ layout_cols (GtkWrapBox *wbox,
guint total_width = 0, n_expand_lines = 0, n_lines = 0;
gfloat shrink_width;
guint children_per_line;
next_child = wbox->children;
slist = GTK_WRAP_BOX_GET_CLASS (wbox)->rlist_line_children (wbox,
&next_child,
@ -471,7 +471,7 @@ layout_cols (GtkWrapBox *wbox,
while (slist)
{
Line *line = g_new (Line, 1);
line->children = slist;
line->min_size = min_width;
total_width += min_width;
@ -481,7 +481,7 @@ layout_cols (GtkWrapBox *wbox,
line->next = line_list;
line_list = line;
n_lines++;
slist = GTK_WRAP_BOX_GET_CLASS (wbox)->rlist_line_children (wbox,
&next_child,
area,
@ -489,17 +489,17 @@ layout_cols (GtkWrapBox *wbox,
&hexpand);
slist = g_slist_reverse (slist);
}
if (total_width > area->width)
shrink_width = total_width - area->width;
else
shrink_width = 0;
if (1) /* reverse lines and shrink */
{
Line *prev = NULL, *last = NULL;
gfloat n_shrink_lines = n_lines;
while (line_list)
{
Line *tmp = line_list->next;
@ -529,15 +529,15 @@ layout_cols (GtkWrapBox *wbox,
}
line_list = last;
}
if (n_lines)
{
Line *line;
gfloat x, width, extra = 0;
width = area->width;
width = MAX (n_lines, width - (n_lines - 1) * wbox->hspacing);
if (wbox->homogeneous)
width /= ((gdouble) n_lines);
else if (n_expand_lines)
@ -547,14 +547,14 @@ layout_cols (GtkWrapBox *wbox,
}
else
width = 0;
x = area->x;
line = line_list;
while (line)
{
GtkAllocation col_allocation;
Line *next_line = line->next;
col_allocation.y = area->y;
col_allocation.height = area->height;
if (wbox->homogeneous)
@ -562,13 +562,13 @@ layout_cols (GtkWrapBox *wbox,
else
{
col_allocation.width = line->min_size;
if (line->expand)
col_allocation.width += extra;
}
col_allocation.x = x;
x += col_allocation.width + wbox->hspacing;
layout_col (wbox,
&col_allocation,
@ -590,19 +590,19 @@ gtk_vwrap_box_size_allocate (GtkWidget *widget,
GtkWrapBox *wbox = GTK_WRAP_BOX (widget);
GtkAllocation area;
gint border = GTK_CONTAINER (wbox)->border_width; /*<h2v-skip>*/
widget->allocation = *allocation;
area.y = allocation->y + border;
area.x = allocation->x + border;
area.height = MAX (1, (gint) allocation->height - border * 2);
area.width = MAX (1, (gint) allocation->width - border * 2);
/*<h2v-off>*/
/* g_print ("got: width %d, height %d\n",
allocation->width,
allocation->height);
*/
/*<h2v-on>*/
layout_cols (wbox, &area);
}

View File

@ -47,7 +47,7 @@ typedef struct _GtkVWrapBoxClass GtkVWrapBoxClass;
struct _GtkVWrapBox
{
GtkWrapBox parent_widget;
/*<h2v-off>*/
guint max_child_width;
guint max_child_height;

View File

@ -94,7 +94,7 @@ GType
gtk_wrap_box_get_type (void)
{
static GType wrap_box_type = 0;
if (!wrap_box_type)
{
static const GTypeInfo wrap_box_info =
@ -109,11 +109,11 @@ gtk_wrap_box_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) gtk_wrap_box_init,
};
wrap_box_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkWrapBox",
&wrap_box_info, 0);
}
return wrap_box_type;
}
@ -123,20 +123,20 @@ gtk_wrap_box_class_init (GtkWrapBoxClass *class)
GObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
object_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
container_class = GTK_CONTAINER_CLASS (class);
parent_class = g_type_class_peek_parent (class);
object_class->set_property = gtk_wrap_box_set_property;
object_class->get_property = gtk_wrap_box_get_property;
widget_class->map = gtk_wrap_box_map;
widget_class->unmap = gtk_wrap_box_unmap;
widget_class->expose_event = gtk_wrap_box_expose;
container_class->add = gtk_wrap_box_add;
container_class->remove = gtk_wrap_box_remove;
container_class->forall = gtk_wrap_box_forall;
@ -268,7 +268,7 @@ static void
gtk_wrap_box_init (GtkWrapBox *wbox)
{
GTK_WIDGET_SET_FLAGS (wbox, GTK_NO_WINDOW);
wbox->homogeneous = FALSE;
wbox->hspacing = 0;
wbox->vspacing = 0;
@ -287,7 +287,7 @@ gtk_wrap_box_set_property (GObject *object,
GParamSpec *pspec)
{
GtkWrapBox *wbox = GTK_WRAP_BOX (object);
switch (property_id)
{
case PROP_HOMOGENEOUS:
@ -326,7 +326,7 @@ gtk_wrap_box_get_property (GObject *object,
{
GtkWrapBox *wbox = GTK_WRAP_BOX (object);
GtkWidget *widget = GTK_WIDGET (object);
switch (property_id)
{
case PROP_HOMOGENEOUS:
@ -377,7 +377,7 @@ gtk_wrap_box_set_child_property (GtkContainer *container,
&hexpand, &hfill,
&vexpand, &vfill,
&wrapped);
switch (property_id)
{
case CHILD_PROP_POSITION:
@ -430,13 +430,13 @@ gtk_wrap_box_get_child_property (GtkContainer *container,
gboolean hexpand = FALSE, hfill = FALSE;
gboolean vexpand = FALSE, vfill = FALSE;
gboolean wrapped = FALSE;
if (property_id != CHILD_PROP_POSITION)
gtk_wrap_box_query_child_packing (wbox, child,
&hexpand, &hfill,
&vexpand, &vfill,
&wrapped);
switch (property_id)
{
GtkWrapBoxChild *child_info;
@ -483,7 +483,7 @@ gtk_wrap_box_set_homogeneous (GtkWrapBox *wbox,
gboolean homogeneous)
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
homogeneous = homogeneous != FALSE;
if (wbox->homogeneous != homogeneous)
{
@ -497,7 +497,7 @@ gtk_wrap_box_set_hspacing (GtkWrapBox *wbox,
guint hspacing)
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
if (wbox->hspacing != hspacing)
{
wbox->hspacing = hspacing;
@ -510,7 +510,7 @@ gtk_wrap_box_set_vspacing (GtkWrapBox *wbox,
guint vspacing)
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
if (wbox->vspacing != vspacing)
{
wbox->vspacing = vspacing;
@ -524,7 +524,7 @@ gtk_wrap_box_set_justify (GtkWrapBox *wbox,
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (justify <= GTK_JUSTIFY_FILL);
if (wbox->justify != justify)
{
wbox->justify = justify;
@ -538,7 +538,7 @@ gtk_wrap_box_set_line_justify (GtkWrapBox *wbox,
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (line_justify <= GTK_JUSTIFY_FILL);
if (wbox->line_justify != line_justify)
{
wbox->line_justify = line_justify;
@ -551,9 +551,9 @@ gtk_wrap_box_set_aspect_ratio (GtkWrapBox *wbox,
gfloat aspect_ratio)
{
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
aspect_ratio = CLAMP (aspect_ratio, 1.0 / 256.0, 256.0);
if (wbox->aspect_ratio != aspect_ratio)
{
wbox->aspect_ratio = aspect_ratio;
@ -586,11 +586,11 @@ gtk_wrap_box_pack_wrapped (GtkWrapBox *wbox,
gboolean wrapped)
{
GtkWrapBoxChild *child_info;
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (child->parent == NULL);
child_info = g_new (GtkWrapBoxChild, 1);
child_info->widget = child;
child_info->hexpand = hexpand ? TRUE : FALSE;
@ -602,7 +602,7 @@ gtk_wrap_box_pack_wrapped (GtkWrapBox *wbox,
if (wbox->children)
{
GtkWrapBoxChild *last = wbox->children;
while (last->next)
last = last->next;
last->next = child_info;
@ -610,17 +610,17 @@ gtk_wrap_box_pack_wrapped (GtkWrapBox *wbox,
else
wbox->children = child_info;
wbox->n_children++;
gtk_widget_set_parent (child, GTK_WIDGET (wbox));
if (GTK_WIDGET_REALIZED (wbox))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (wbox) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (wbox))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
}
@ -631,23 +631,23 @@ gtk_wrap_box_reorder_child (GtkWrapBox *wbox,
gint position)
{
GtkWrapBoxChild *child_info, *last = NULL;
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (GTK_IS_WIDGET (child));
for (child_info = wbox->children; child_info; last = child_info, child_info = last->next)
if (child_info->widget == child)
break;
if (child_info && wbox->children->next)
{
GtkWrapBoxChild *tmp;
if (last)
last->next = child_info->next;
else
wbox->children = child_info->next;
last = NULL;
tmp = wbox->children;
while (position && tmp->next)
@ -656,7 +656,7 @@ gtk_wrap_box_reorder_child (GtkWrapBox *wbox,
last = tmp;
tmp = last->next;
}
if (position)
{
tmp->next = child_info;
@ -670,7 +670,7 @@ gtk_wrap_box_reorder_child (GtkWrapBox *wbox,
else
wbox->children = child_info;
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (wbox))
gtk_widget_queue_resize (child);
}
@ -686,14 +686,14 @@ gtk_wrap_box_query_child_packing (GtkWrapBox *wbox,
gboolean *wrapped)
{
GtkWrapBoxChild *child_info;
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (GTK_IS_WIDGET (child));
for (child_info = wbox->children; child_info; child_info = child_info->next)
if (child_info->widget == child)
break;
if (child_info)
{
if (hexpand)
@ -719,10 +719,10 @@ gtk_wrap_box_set_child_packing (GtkWrapBox *wbox,
gboolean wrapped)
{
GtkWrapBoxChild *child_info;
g_return_if_fail (GTK_IS_WRAP_BOX (wbox));
g_return_if_fail (GTK_IS_WIDGET (child));
hexpand = hexpand != FALSE;
hfill = hfill != FALSE;
vexpand = vexpand != FALSE;
@ -732,7 +732,7 @@ gtk_wrap_box_set_child_packing (GtkWrapBox *wbox,
for (child_info = wbox->children; child_info; child_info = child_info->next)
if (child_info->widget == child)
break;
if (child_info &&
(child_info->hexpand != hexpand || child_info->vexpand != vexpand ||
child_info->hfill != hfill || child_info->vfill != vfill ||
@ -743,7 +743,7 @@ gtk_wrap_box_set_child_packing (GtkWrapBox *wbox,
child_info->vexpand = vexpand;
child_info->vfill = vfill;
child_info->wrapped = wrapped;
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (wbox))
gtk_widget_queue_resize (child);
}
@ -802,9 +802,9 @@ gtk_wrap_box_map (GtkWidget *widget)
{
GtkWrapBox *wbox = GTK_WRAP_BOX (widget);
GtkWrapBoxChild *child;
GTK_WIDGET_SET_FLAGS (wbox, GTK_MAPPED);
for (child = wbox->children; child; child = child->next)
if (GTK_WIDGET_VISIBLE (child->widget) &&
!GTK_WIDGET_MAPPED (child->widget))
@ -816,9 +816,9 @@ gtk_wrap_box_unmap (GtkWidget *widget)
{
GtkWrapBox *wbox = GTK_WRAP_BOX (widget);
GtkWrapBoxChild *child;
GTK_WIDGET_UNSET_FLAGS (wbox, GTK_MAPPED);
for (child = wbox->children; child; child = child->next)
if (GTK_WIDGET_VISIBLE (child->widget) &&
GTK_WIDGET_MAPPED (child->widget))
@ -845,30 +845,30 @@ gtk_wrap_box_remove (GtkContainer *container,
{
GtkWrapBox *wbox = GTK_WRAP_BOX (container);
GtkWrapBoxChild *child, *last = NULL;
child = wbox->children;
while (child)
{
if (child->widget == widget)
{
gboolean was_visible;
was_visible = GTK_WIDGET_VISIBLE (widget);
gtk_widget_unparent (widget);
if (last)
last->next = child->next;
else
wbox->children = child->next;
g_free (child);
wbox->n_children--;
if (was_visible)
gtk_widget_queue_resize (GTK_WIDGET (container));
break;
}
last = child;
child = last->next;
}
@ -882,14 +882,14 @@ gtk_wrap_box_forall (GtkContainer *container,
{
GtkWrapBox *wbox = GTK_WRAP_BOX (container);
GtkWrapBoxChild *child;
child = wbox->children;
while (child)
{
GtkWidget *widget = child->widget;
child = child->next;
callback (widget, callback_data);
}
}

View File

@ -47,7 +47,7 @@ typedef struct _GtkWrapBoxChild GtkWrapBoxChild;
struct _GtkWrapBox
{
GtkContainer container;
guint homogeneous : 1;
guint justify : 4;
guint line_justify : 4;
@ -76,7 +76,7 @@ struct _GtkWrapBoxChild
guint vexpand : 1;
guint vfill : 1;
guint wrapped : 1;
GtkWrapBoxChild *next;
};
#define GTK_JUSTIFY_TOP GTK_JUSTIFY_LEFT

View File

@ -1,6 +1,6 @@
/*
/*
* gtk-doc can't build libgimp-scan.c without PLUG_IN_INFO being defined
* so we include this file as a workaround
* so we include this file as a workaround
*/
#include <glib.h>
@ -9,7 +9,7 @@
GimpPlugInInfo PLUG_IN_INFO =
{
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
};

View File

@ -23,13 +23,13 @@ create_blur_filter (int radius)
ConvFilter *filter;
int x, y;
double sum;
filter = g_new0 (ConvFilter, 1);
filter->size = radius * 2 + 1;
filter->data = g_new (double, filter->size * filter->size);
sum = 0.0;
for (y = 0 ; y < filter->size; y++)
{
for (x = 0 ; x < filter->size; x++)
@ -49,7 +49,7 @@ create_blur_filter (int radius)
}
return filter;
}
static GdkPixbuf *
@ -61,12 +61,12 @@ create_shadow (GdkPixbuf *src)
static ConvFilter *filter = NULL;
int src_rowstride, dest_rowstride;
int src_bpp, dest_bpp;
guchar *src_pixels, *dest_pixels;
if (!filter)
filter = create_blur_filter (BLUR_RADIUS);
width = gdk_pixbuf_get_width (src) + BLUR_RADIUS * 2 + SHADOW_OFFSET;
height = gdk_pixbuf_get_height (src) + BLUR_RADIUS * 2 + SHADOW_OFFSET;
@ -74,15 +74,15 @@ create_shadow (GdkPixbuf *src)
gdk_pixbuf_get_has_alpha (src),
gdk_pixbuf_get_bits_per_sample (src),
width, height);
gdk_pixbuf_fill (dest, 0);
gdk_pixbuf_fill (dest, 0);
src_pixels = gdk_pixbuf_get_pixels (src);
src_rowstride = gdk_pixbuf_get_rowstride (src);
src_bpp = gdk_pixbuf_get_has_alpha (src) ? 4 : 3;
dest_pixels = gdk_pixbuf_get_pixels (dest);
dest_rowstride = gdk_pixbuf_get_rowstride (dest);
dest_bpp = gdk_pixbuf_get_has_alpha (dest) ? 4 : 3;
for (y = 0; y < height; y++)
{
for (x = 0; x < width; x++)
@ -106,19 +106,19 @@ create_shadow (GdkPixbuf *src)
src_x * src_bpp + 0] *
filter->data [i * filter->size + j];
sumg += src_pixels [src_y * src_rowstride +
src_x * src_bpp + 1] *
src_x * src_bpp + 1] *
filter->data [i * filter->size + j];
sumb += src_pixels [src_y * src_rowstride +
src_x * src_bpp + 2] *
src_x * src_bpp + 2] *
filter->data [i * filter->size + j];
if (src_bpp == 4)
suma += src_pixels [src_y * src_rowstride +
src_x * src_bpp + 3] *
filter->data [i * filter->size + j];
}
}
@ -128,7 +128,7 @@ create_shadow (GdkPixbuf *src)
}
}
return dest;
}
@ -136,7 +136,7 @@ GdkPixbuf *
create_shadowed_pixbuf (GdkPixbuf *src)
{
GdkPixbuf *dest;
dest = create_shadow (src);
gdk_pixbuf_composite (src, dest,

View File

@ -135,7 +135,7 @@ arch_get_vendor (void)
*(int *)&id[0] = ebx;
*(int *)&id[4] = edx;
*(int *)&id[8] = ecx;
id[12] = '\0';
#ifdef ARCH_X86_64
@ -417,7 +417,7 @@ static guint32
arch_accel (void)
{
signal (SIGILL, sigill_handler);
if (sigsetjmp (jmpbuf, 1))
{
signal (SIGILL, SIG_DFL);

View File

@ -48,9 +48,9 @@ struct _GimpResolutionEntryField
GimpResolutionEntryField *corresponding;
gboolean size;
GtkWidget *label;
guint changed_signal;
GtkObject *adjustment;
@ -82,7 +82,7 @@ struct _GimpResolutionEntry
GimpResolutionEntryField height;
GimpResolutionEntryField x;
GimpResolutionEntryField y;
};
struct _GimpResolutionEntryClass
@ -124,7 +124,7 @@ GtkWidget * gimp_resolution_entry_attach_label (GimpResolutionEntry *gre,
gint column,
gfloat alignment);
void gimp_resolution_entry_set_width_boundaries
void gimp_resolution_entry_set_width_boundaries
(GimpResolutionEntry *gre,
gdouble lower,
gdouble upper);
@ -173,11 +173,11 @@ void gimp_resolution_entry_set_pixel_digits
void gimp_resolution_entry_grab_focus (GimpResolutionEntry *gre);
void gimp_resolution_entry_set_activates_default
void gimp_resolution_entry_set_activates_default
(GimpResolutionEntry *gre,
gboolean setting);
GtkWidget * gimp_resolution_entry_get_width_help_widget
GtkWidget * gimp_resolution_entry_get_width_help_widget
(GimpResolutionEntry *gre);
GtkWidget * gimp_resolution_entry_get_height_help_widget
(GimpResolutionEntry *gre);

View File

@ -842,7 +842,7 @@ activate_fractal_callback (GtkTreeView *view,
fractalexplorerOBJ *sel_obj;
model = gtk_tree_view_get_model (view);
if (gtk_tree_model_get_iter (model, &iter, path))
{
gtk_tree_model_get (model, &iter, 1, &sel_obj, -1);

View File

@ -49,7 +49,7 @@ peek_map (GimpPixelRgn *region,
gimp_pixel_rgn_get_pixel (region, data, x, y);
if (region->bpp == 1)
{
{
ret_val = data[0];
} else
{
@ -158,7 +158,7 @@ int_to_pos (gint x,
pos.x = (gdouble) x / (gdouble) width;
pos.y = (gdouble) y / (gdouble) width;
pos.y += 0.5 * (1.0 - (gdouble) height / (gdouble) width);
pos.y += 0.5 * (1.0 - (gdouble) height / (gdouble) width);
}
else
{
@ -183,7 +183,7 @@ int_to_posf (gdouble x,
pos.x = x / (gdouble) width;
pos.y = y / (gdouble) width;
pos.y += 0.5 * (1.0 - (gdouble) height / (gdouble) width);
pos.y += 0.5 * (1.0 - (gdouble) height / (gdouble) width);
}
else
{
@ -252,7 +252,7 @@ get_image_color (gdouble u,
{
gint x1, y1, x2, y2;
GimpRGB p[4];
x1 = RINT (u);
y1 = RINT (v);
@ -288,7 +288,7 @@ get_map_value (GimpPixelRgn *region,
{
gint x1, y1, x2, y2;
gdouble p[4];
x1 = RINT (u);
y1 = RINT (v);

View File

@ -73,7 +73,7 @@ void
ArcBall_Init (void)
{
int i;
center = qOne;
radius = 1.0;
vDown = vNow = qOne;
@ -174,7 +174,7 @@ ArcBall_Values (double *alpha,
else
{
*gamma=atan2(mNow[1][0],mNow[1][1]);
*alpha=0.0;
*alpha=0.0;
}
}
@ -285,7 +285,7 @@ V3_Unit (HVect v)
{
static HVect u = {0, 0, 0, 0};
double vlen = sqrt(V3_Norm(v));
if (vlen != 0.0) u.x = v.x/vlen; u.y = v.y/vlen; u.z = v.z/vlen;
return (u);
}
@ -410,7 +410,7 @@ MouseOnSphere (HVect mouse,
{
HVect ballMouse;
register double mag;
ballMouse.x = (mouse.x - ballCenter.x) / ballRadius;
ballMouse.y = (mouse.y - ballCenter.y) / ballRadius;
mag = ballMouse.x*ballMouse.x + ballMouse.y*ballMouse.y;
@ -449,7 +449,7 @@ Qt_ToBallPoints (Quat q,
HVect *arcTo)
{
double s;
s = sqrt(q.x*q.x + q.y*q.y);
if (s == 0.0) *arcFrom = V3_(0.0, 1.0, 0.0);
else *arcFrom = V3_(-q.y/s, q.x/s, 0.0);
@ -468,7 +468,7 @@ ConstrainToAxis (HVect loose,
{
HVect onPlane;
register double norm;
onPlane = V3_Sub(loose, V3_Scale(axis, V3_Dot(axis, loose)));
norm = V3_Norm(onPlane);
if (norm > 0.0)
@ -496,7 +496,7 @@ NearestConstraintAxis (HVect loose,
register double max, dot;
register int i, nearest;
max = -1; nearest = 0;
for (i=0; i<nAxes; i++)
{
onPlane = ConstrainToAxis(loose, axes[i]);

View File

@ -232,7 +232,7 @@ get_image_color (gdouble u,
if (x1 < 0) x1 = (width-1) - (-x1 % width);
else x1 = x1 % width;
if (y1 < 0) y1 = (height-1) - (-y1 % height);
else y1 = y1 % height;
@ -282,7 +282,7 @@ get_box_image_color (gint image,
gint w, h;
gint x1, y1, x2, y2;
GimpRGB p[4];
w = box_drawables[image]->width;
h = box_drawables[image]->height;
@ -314,7 +314,7 @@ get_cylinder_image_color (gint image,
gint w, h;
gint x1, y1, x2, y2;
GimpRGB p[4];
w = cylinder_drawables[image]->width;
h = cylinder_drawables[image]->height;

View File

@ -136,14 +136,14 @@ plane_intersect (GimpVector3 *dir,
imat[0][2] * imat[1][1] * imat[2][3] -
imat[1][2] * imat[2][1] * imat[0][3] -
imat[2][2] * imat[0][1] * imat[1][3]);
det2 = (imat[0][0] * imat[1][3] * imat[2][2] +
imat[0][3] * imat[1][2] * imat[2][0] +
imat[0][2] * imat[1][0] * imat[2][3] -
imat[0][2] * imat[1][3] * imat[2][0] -
imat[1][2] * imat[2][3] * imat[0][0] -
imat[2][2] * imat[0][3] * imat[1][0]);
det3 = (imat[0][0] * imat[1][1] * imat[2][3] +
imat[0][1] * imat[1][3] * imat[2][0] +
imat[0][3] * imat[1][0] * imat[2][1] -
@ -217,10 +217,10 @@ get_ray_color_plane (GimpVector3 *pos)
gimp_rgb_clamp (&color);
}
}
if (mapvals.transparent_background == FALSE && color.a < 1.0)
{
gimp_rgb_composite (&color, &background,
gimp_rgb_composite (&color, &background,
GIMP_RGB_COMPOSITE_BEHIND);
}
@ -375,7 +375,7 @@ get_ray_color_sphere (GimpVector3 *pos)
gimp_vector3_sub (&normal, &spos2, &mapvals.position);
gimp_vector3_normalize (&normal);
sphere_to_image (&normal, &vx, &vy);
sphere_to_image (&normal, &vx, &vy);
color2 = get_image_color (vx, vy, &inside);
/* Make the normal point inwards */
@ -417,13 +417,13 @@ get_ray_color_sphere (GimpVector3 *pos)
gimp_rgb_clamp (&color);
}
}
if (mapvals.transparent_background == FALSE && color.a < 1.0)
{
gimp_rgb_composite (&color, &background,
gimp_rgb_composite (&color, &background,
GIMP_RGB_COMPOSITE_BEHIND);
}
return color;
}
@ -595,7 +595,7 @@ matmul (gfloat a[16],
{
gint i, j, k;
gfloat value;
#define A(row,col) a[col*4+row]
#define B(row,col) b[col*4+row]
#define C(row,col) c[col*4+row]
@ -622,9 +622,9 @@ void
ident_mat (gfloat m[16])
{
gint i, j;
#define M(row,col) m[col*4+row]
for (i = 0; i < 4; i++)
{
for (j = 0; j < 4; j++)
@ -660,7 +660,7 @@ intersect_rect (gdouble u,
face_info->s.y = viewp.y + face_info->t * dir.y;
face_info->s.z = w;
if (face_info->s.x >= -u2 && face_info->s.x <= u2 &&
if (face_info->s.x >= -u2 && face_info->s.x <= u2 &&
face_info->s.y >= -v2 && face_info->s.y <= v2)
{
face_info->u = (face_info->s.x + u2) / u;
@ -718,7 +718,7 @@ intersect_box (GimpVector3 scale,
{
/* Top: Rotate viewpoint and direction into rectangle's local coordinate system */
/* ============================================================================ */
rotatemat (90, &axis[0], m);
vecmulmat (&v, &viewp, m);
vecmulmat (&d, &dir, m);
@ -734,7 +734,7 @@ intersect_box (GimpVector3 scale,
gimp_vector3_set (&face_intersect[i++].n, 0.0, -1.0, 0.0);
result = TRUE;
}
}
}
/* Check if we've found the two possible intersection points */
@ -745,7 +745,7 @@ intersect_box (GimpVector3 scale,
/* Bottom: Rotate viewpoint and direction into rectangle's local coordinate system */
/* =============================================================================== */
rotatemat (90, &axis[0], m);
rotatemat (90, &axis[0], m);
vecmulmat (&v, &viewp, m);
vecmulmat (&d, &dir, m);
@ -775,7 +775,7 @@ intersect_box (GimpVector3 scale,
/* Left side: Rotate viewpoint and direction into rectangle's local coordinate system */
/* ================================================================================== */
rotatemat (90, &axis[1], m);
rotatemat (90, &axis[1], m);
vecmulmat (&v, &viewp, m);
vecmulmat (&d, &dir, m);
@ -783,7 +783,7 @@ intersect_box (GimpVector3 scale,
v, d, &face_intersect[i]) == TRUE)
{
face_intersect[i].face = 4;
transpose_mat (m);
vecmulmat (&tmp, &face_intersect[i].s, m);
face_intersect[i].s = tmp;
@ -801,7 +801,7 @@ intersect_box (GimpVector3 scale,
/* Right side: Rotate viewpoint and direction into rectangle's local coordinate system */
/* =================================================================================== */
rotatemat (90, &axis[1], m);
rotatemat (90, &axis[1], m);
vecmulmat (&v, &viewp, m);
vecmulmat (&d, &dir, m);
@ -860,7 +860,7 @@ get_ray_color_box (GimpVector3 *pos)
/* Compute direction */
/* ================= */
gimp_vector3_sub (&dir, &p, &vp);
gimp_vector3_normalize (&dir);
@ -922,7 +922,7 @@ get_ray_color_box (GimpVector3 *pos)
&mapvals.lightsource.position,
&color,
&mapvals.lightsource.color,
mapvals.lightsource.type);
mapvals.lightsource.type);
gimp_rgb_clamp (&color);
@ -941,13 +941,13 @@ get_ray_color_box (GimpVector3 *pos)
&mapvals.lightsource.position,
&color2,
&mapvals.lightsource.color,
mapvals.lightsource.type);
mapvals.lightsource.type);
gimp_rgb_clamp (&color2);
if (mapvals.transparent_background == FALSE && color2.a < 1.0)
{
gimp_rgb_composite (&color2, &background,
gimp_rgb_composite (&color2, &background,
GIMP_RGB_COMPOSITE_BEHIND);
}
@ -965,7 +965,7 @@ get_ray_color_box (GimpVector3 *pos)
&mapvals.lightsource.position,
&color,
&mapvals.lightsource.color,
mapvals.lightsource.type);
mapvals.lightsource.type);
gimp_rgb_clamp (&color);
}
@ -1037,18 +1037,18 @@ intersect_cylinder (GimpVector3 vp,
if (f != 0.0)
{
result = TRUE;
result = TRUE;
face_intersect[0].t = (-b+e)/f;
face_intersect[1].t = (-b-e)/f;
if (face_intersect[0].t>face_intersect[1].t)
{
tmp = face_intersect[0].t;
face_intersect[0].t = face_intersect[1].t;
face_intersect[1].t = tmp;
}
for (i = 0; i < 2; i++)
{
face_intersect[i].s.x = vp.x + face_intersect[i].t * dir.x;
@ -1066,17 +1066,17 @@ intersect_cylinder (GimpVector3 vp,
/* Mark hitpoint as on the cylinder hull */
/* ===================================== */
face_intersect[i].face = 0;
/* Check if we're completely off the cylinder axis */
/* =============================================== */
if (face_intersect[i].s.y>l || face_intersect[i].s.y<-l)
{
/* Check if we've hit a cap */
/* ======================== */
if (face_intersect[i].s.y>l)
{
if (intersect_circle(vp,dir,l,&face_intersect[i])==FALSE)
@ -1115,7 +1115,7 @@ get_cylinder_color (gint face,
{
GimpRGB color;
gint inside;
if (face == 0)
color = get_image_color (u, v, &inside);
else
@ -1201,8 +1201,8 @@ get_ray_color_cylinder (GimpVector3 *pos)
&mapvals.lightsource.position,
&color,
&mapvals.lightsource.color,
mapvals.lightsource.type);
mapvals.lightsource.type);
gimp_rgb_clamp (&color);
color2 = get_cylinder_color (face_intersect[1].face,
@ -1226,7 +1226,7 @@ get_ray_color_cylinder (GimpVector3 *pos)
if (mapvals.transparent_background == FALSE && color2.a < 1.0)
{
gimp_rgb_composite (&color2, &background,
gimp_rgb_composite (&color2, &background,
GIMP_RGB_COMPOSITE_BEHIND);
}
@ -1254,6 +1254,6 @@ get_ray_color_cylinder (GimpVector3 *pos)
if (mapvals.transparent_background == TRUE)
gimp_rgb_set_alpha (&color, 0.0);
}
return color;
}

View File

@ -1799,7 +1799,7 @@ function_graph_expose (GtkWidget *widget,
g_free (buffer);
gdk_draw_line (widget->window, widget->style->white_gc, 0,255, 255, 0);
y = 255 * CLAMP (logistic_function (param, 0, param->power),
0, 1.0);
for (x = 0; x < 256; x++)

View File

@ -51,7 +51,7 @@ void iterate(cp, n, fuse, points)
/*
* first, set up xform, which is an array that converts a uniform random
* variable into one with the distribution dictated by the density
* fields
* fields
*/
dr = 0.0;
for (i = 0; i < NXFORMS; i++)
@ -101,7 +101,7 @@ void iterate(cp, n, fuse, points)
p[0] += v * nx;
p[1] += v * ny;
}
v = vari[1];
if (v > 0.0) {
/* sinusoidal */
@ -111,7 +111,7 @@ void iterate(cp, n, fuse, points)
p[0] += v * nx;
p[1] += v * ny;
}
v = vari[2];
if (v > 0.0) {
/* complex */
@ -134,7 +134,7 @@ void iterate(cp, n, fuse, points)
p[0] += v * nx;
p[1] += v * ny;
}
v = vari[4];
if (v > 0.0) {
/* horseshoe */
@ -264,7 +264,7 @@ void choose_evector(m, r, v)
}
/* diagonalize the linear part of a 3x2 matrix. the evalues are returned
/* diagonalize the linear part of a 3x2 matrix. the evalues are returned
in r as either reals on the diagonal, or a complex pair. the evectors
are returned as a change of coords matrix. does not handle shearing
transforms.
@ -719,7 +719,7 @@ int compare_xforms(a, b)
* must integrate with tcl soon...
*/
void parse_control_point(ss, cp)
void parse_control_point(ss, cp)
char **ss;
control_point *cp;
{
@ -749,7 +749,7 @@ void parse_control_point(ss, cp)
cp->wiggle[j][0] = 0.0;
cp->wiggle[j][1] = 60.0;
}
tokenize(ss, argv, &argc);
for (i = 0; i < argc; i++) {
if (streql("xform", argv[i]))
@ -904,16 +904,16 @@ copy_variation(control_point *cp0, control_point *cp1) {
int i, j;
for (i = 0; i < NXFORMS; i++) {
for (j = 0; j < NVARS; j++)
cp0->xform[i].var[j] =
cp0->xform[i].var[j] =
cp1->xform[i].var[j];
}
}
#define random_distrib(v) ((v)[g_random_int_range (0, vlen(v))])
void random_control_point(cp, ivar)
void random_control_point(cp, ivar)
control_point *cp;
int ivar;
{
@ -959,7 +959,7 @@ void random_control_point(cp, ivar)
cp->xform[i].var[var] = 1.0;
else
cp->xform[i].var[random_distrib(mixed_var_distrib)] = 1.0;
}
for (; i < NXFORMS; i++)
cp->xform[i].density = 0.0;
@ -985,7 +985,7 @@ void estimate_bounding_box(cp, eps, bmin, bmax)
min[0] = min[1] = 1e10;
max[0] = max[1] = -1e10;
for (i = 0; i < batch; i++) {
if (points[i][0] < min[0]) min[0] = points[i][0];
if (points[i][1] < min[1]) min[1] = points[i][1];
@ -1000,7 +1000,7 @@ void estimate_bounding_box(cp, eps, bmin, bmax)
bmax[1] = max[1];
return;
}
delta[0] = (max[0] - min[0]) * 0.25;
delta[1] = (max[1] - min[1]) * 0.25;
@ -1033,7 +1033,7 @@ void estimate_bounding_box(cp, eps, bmin, bmax)
/* use hill climberer to find smooth ordering of control points
this is untested */
void sort_control_points(cps, ncps, metric)
control_point *cps;
int ncps;
@ -1073,7 +1073,7 @@ double standard_metric(cp1, cp2)
{
int i, j, k;
double t;
double dist = 0.0;
for (i = 0; i < NXFORMS; i++) {
double var_dist = 0.0;

View File

@ -58,7 +58,7 @@ typedef struct {
double pixels_per_unit; /* and scale */
double spatial_filter_radius; /* variance of gaussian */
double sample_density; /* samples per pixel (not bucket) */
/* in order to motion blur more accurately we compute the logs of the
/* in order to motion blur more accurately we compute the logs of the
sample density many times and average the results. we interplate
only this many times. */
int nbatches;

View File

@ -35,7 +35,7 @@
typedef short bucket[4];
/* if you use longs instead of shorts, you
/* if you use longs instead of shorts, you
get higher quality, and spend more memory */
#if 1
@ -157,7 +157,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
fprintf(stderr, "%4f %4f\n", temporal_deltas[j], temporal_filter[j]);
fprintf(stderr, "\n");
#endif
/* the number of additional rows of buckets we put at the edge so
that the filter doesn't go off the edge */
@ -210,7 +210,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
#else
/* monochrome if you don't have any cmaps */
cmap[j][k] = cp.white_level;
#endif
#endif
}
cmap[j][3] = cp.white_level;
}
@ -245,7 +245,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
nsamples = (int) (sample_density * nbuckets /
(oversample * oversample));
batch_size = nsamples / cp.nbatches;
sbc = 0;
@ -261,8 +261,8 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
points[0][1] = random_uniform11();
points[0][2] = random_uniform01();
iterate(&cp, SUB_BATCH_SIZE, FUSE, points);
/* merge them into buckets, looking up colors */
for (j = 0; j < SUB_BATCH_SIZE; j++) {
int k, color_index;
@ -279,12 +279,12 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
color_index = CMAP_SIZE-1;
b = buckets +
(int) (width * (p[0] - bounds[0]) * size[0]) +
width * (int) (height * (p[1] - bounds[1]) * size[1]);
width * (int) (height * (p[1] - bounds[1]) * size[1]);
for (k = 0; k < 4; k++)
bump_no_overflow(b[0][k], cmap[color_index][k], short);
}
}
if (1) {
double k1 =(cp.contrast * cp.brightness *
PREFILTER_WHITE * 268.0 *
@ -292,7 +292,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
double area = image_width * image_height / (ppux * ppuy);
double k2 = (oversample * oversample * nbatches) /
(cp.contrast * area * cp.white_level * sample_density);
/* log intensity in hsv space */
for (j = 0; j < height; j++)
for (i = 0; i < width; i++) {
@ -305,7 +305,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
c[3] = (double) b[0][3];
if (0.0 == c[3])
continue;
ls = (k1 * log(1.0 + c[3] * k2))/c[3];
c[0] *= ls;
c[1] *= ls;
@ -339,7 +339,7 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
for (jj = 0; jj < filter_width; jj++) {
double k = filter[ii + jj * filter_width];
abucket *a = accumulate + x + ii + (y + jj) * width;
t[0] += k * a[0][0];
t[1] += k * a[0][1];
t[2] += k * a[0][2];
@ -365,6 +365,6 @@ void render_rectangle(spec, out, out_width, field, nchan, progress)
y += oversample;
}
}
free(filter);
}

View File

@ -40,11 +40,11 @@ typedef struct
gboolean snap2grid;
gboolean lockongrid;
gboolean showcontrol;
gdouble grid_radius_min;
gdouble grid_radius_interval;
gdouble grid_rotation;
gdouble grid_granularity;
gint grid_sectors_desired;
gdouble grid_radius_min;
gdouble grid_radius_interval;
gdouble grid_rotation;
gdouble grid_granularity;
gint grid_sectors_desired;
} GfigOpts;
typedef struct

View File

@ -80,23 +80,23 @@ typedef struct _fli_chunk {
void fli_read_header(FILE *f, s_fli_header *fli_header);
void fli_read_frame(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *old_cmap, unsigned char *framebuf, unsigned char *cmap);
void fli_read_color(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_read_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_read_black(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_brun(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_copy(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_lc(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
void fli_read_color(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_read_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_read_black(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_brun(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_copy(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_read_lc(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
void fli_read_lc_2(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
void fli_write_header(FILE *f, s_fli_header *fli_header);
void fli_write_frame(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *old_cmap, unsigned char *framebuf, unsigned char *cmap, unsigned short codec_mask);
int fli_write_color(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
int fli_write_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_write_black(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_brun(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_copy(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_lc(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
int fli_write_color(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
int fli_write_color_2(FILE *f, s_fli_header *fli_header, unsigned char *old_cmap, unsigned char *cmap);
void fli_write_black(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_brun(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_copy(FILE *f, s_fli_header *fli_header, unsigned char *framebuf);
void fli_write_lc(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
void fli_write_lc_2(FILE *f, s_fli_header *fli_header, unsigned char *old_framebuf, unsigned char *framebuf);
#endif

View File

@ -605,7 +605,7 @@ create_brushpage (GtkNotebook *notebook)
brush_select (selection, FALSE);
readdirintolist ("Brushes", view, pcvals.selected_brush);
/*
/*
* This is so the "changed signal won't get sent to the brushes' list
* and reset the gamma and stuff.
* */

View File

@ -99,10 +99,10 @@ updatepreview (GtkWidget *wg, gpointer d)
GIMP_RGB_IMAGE,
buffer,
PREVIEWSIZE * 3);
g_free (buffer);
}
else
else
#endif
{
if (!PPM_IS_INITED (&backup_ppm))

View File

@ -76,7 +76,7 @@ sum_brush (ppm_t *p)
return sum;
}
/* TODO : Use r = rgb[0]; g = rgb[1] ; b = rgb[2]; instead of
/* TODO : Use r = rgb[0]; g = rgb[1] ; b = rgb[2]; instead of
* the direct references here.
* */
static int

View File

@ -43,7 +43,7 @@ do_about_dialog(void)
gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog),
_("Copyright(c) 1999-2005 by Maurits Rijk"));
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog),
gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog),
_("Released under the GNU General Public License"));
g_signal_connect (dialog, "destroy",

View File

@ -159,10 +159,10 @@ static const short yyrline[] =
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "RECTANGLE", "POLYGON", "CIRCLE", "DEFAULT",
"AUTHOR", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "COMMENT", "LINK",
"'('", "','", "')'", "cern_file", "area_list", "area", "default",
"rectangle", "circle", "polygon", "@1", "coord_list", "coord",
"$", "error", "$undefined.", "RECTANGLE", "POLYGON", "CIRCLE", "DEFAULT",
"AUTHOR", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "COMMENT", "LINK",
"'('", "','", "')'", "cern_file", "area_list", "area", "default",
"rectangle", "circle", "polygon", "@1", "coord_list", "coord",
"comment_line", "real_comment", "author_line", "description_line", 0
};
#endif
@ -995,7 +995,7 @@ case 16:
{
Polygon_t *polygon = ObjectToPolygon(current_object);
GdkPoint *point = new_point((gint) yyvsp[-3].value, (gint) yyvsp[-1].value);
polygon->points = g_list_append(polygon->points,
polygon->points = g_list_append(polygon->points,
(gpointer) point);
}
break;
@ -1018,7 +1018,7 @@ case 22:
MapInfo_t *info = get_map_info();
gchar *description;
description = g_strconcat(info->description, yyvsp[0].id, "\n",
description = g_strconcat(info->description, yyvsp[0].id, "\n",
NULL);
g_strreplace(&info->description, description);
}
@ -1259,7 +1259,7 @@ yyreturn:
#line 155 "imap_cern.y"
static void
static void
cern_error(char* s)
{
extern FILE *cern_in;

View File

@ -43,7 +43,7 @@ typedef struct {
ObjectList_t *list;
} ClearCommand_t;
Command_t*
Command_t*
clear_command_new(ObjectList_t *list)
{
ClearCommand_t *command = g_new(ClearCommand_t, 1);

View File

@ -58,7 +58,7 @@ static CmdExecuteValue_t
copy_command_execute(Command_t *parent)
{
CopyCommand_t *command = (CopyCommand_t*) parent;
command->paste_buffer = object_list_copy(command->paste_buffer,
command->paste_buffer = object_list_copy(command->paste_buffer,
get_paste_buffer());
object_list_copy_to_paste_buffer(command->list);
return CMD_APPEND;

View File

@ -52,7 +52,7 @@ copy_object_command_new(Object_t *obj)
CopyObjectCommand_t *command = g_new(CopyObjectCommand_t, 1);
command->obj = object_ref(obj);
command->paste_buffer = NULL;
return command_init(&command->parent, _("Copy"),
return command_init(&command->parent, _("Copy"),
&copy_object_command_class);
}
@ -69,7 +69,7 @@ copy_object_command_execute(Command_t *parent)
CopyObjectCommand_t *command = (CopyObjectCommand_t*) parent;
ObjectList_t *paste_buffer = get_paste_buffer();
command->paste_buffer = object_list_copy(command->paste_buffer,
command->paste_buffer = object_list_copy(command->paste_buffer,
paste_buffer);
clear_paste_buffer();
object_list_append(paste_buffer, object_clone(command->obj));

View File

@ -49,7 +49,7 @@ typedef struct {
gboolean changed;
} CreateCommand_t;
Command_t*
Command_t*
create_command_new(ObjectList_t *list, Object_t *obj)
{
CreateCommand_t *command = g_new(CreateCommand_t, 1);

View File

@ -76,7 +76,7 @@ cut_command_execute(Command_t *parent)
CutCommand_t *command = (CutCommand_t*) parent;
gpointer id;
command->paste_buffer = object_list_copy(command->paste_buffer,
command->paste_buffer = object_list_copy(command->paste_buffer,
get_paste_buffer());
id = object_list_add_remove_cb(command->list, remove_one_object, command);
object_list_cut(command->list);

View File

@ -48,7 +48,7 @@ cut_object_command_new(Object_t *obj)
CutObjectCommand_t *command = g_new(CutObjectCommand_t, 1);
Command_t *parent;
parent = command_init(&command->parent, _("Cut"),
parent = command_init(&command->parent, _("Cut"),
&cut_object_command_class);
command_add_subcommand(parent, copy_object_command_new(obj));
command_add_subcommand(parent, delete_command_new(obj->list, obj));

View File

@ -48,13 +48,13 @@ typedef struct {
gboolean changed;
} DeleteCommand_t;
Command_t*
Command_t*
delete_command_new(ObjectList_t *list, Object_t *obj)
{
DeleteCommand_t *command = g_new(DeleteCommand_t, 1);
command->list = list;
command->obj = object_ref(obj);
return command_init(&command->parent, _("Delete"),
return command_init(&command->parent, _("Delete"),
&delete_command_class);
}

View File

@ -58,7 +58,7 @@ delete_point_command_new(Object_t *obj, GdkPoint *point)
command->copy = *point;
command->position = g_list_index(command->polygon->points,
(gpointer) point);
return command_init(&command->parent, _("Delete Point"),
return command_init(&command->parent, _("Delete Point"),
&delete_point_command_class);
}

View File

@ -45,13 +45,13 @@ typedef struct {
Object_t *copy;
} EditObjectCommand_t;
Command_t*
Command_t*
edit_object_command_new(Object_t *obj)
{
EditObjectCommand_t *command = g_new(EditObjectCommand_t, 1);
command->obj = object_ref(obj);
command->copy = object_clone(obj);
return command_init(&command->parent, _("Edit Object"),
return command_init(&command->parent, _("Edit Object"),
&edit_object_command_class);
}

View File

@ -59,7 +59,7 @@ insert_point_command_new(Object_t *obj, gint x, gint y, gint edge)
command->x = x;
command->y = y;
command->edge = edge;
return command_init(&command->parent, _("Insert Point"),
return command_init(&command->parent, _("Insert Point"),
&insert_point_command_class);
}

View File

@ -63,7 +63,7 @@ typedef struct {
gboolean moved_first_time;
} MoveCommand_t;
Command_t*
Command_t*
move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y)
{
MoveCommand_t *command = g_new(MoveCommand_t, 1);
@ -73,7 +73,7 @@ move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y)
command->obj = object_ref(obj);
command->start_x = x;
command->start_y = y;
object_get_dimensions(obj, &command->obj_x, &command->obj_y,
object_get_dimensions(obj, &command->obj_x, &command->obj_y,
&command->obj_width, &command->obj_height);
command->obj_start_x = command->obj_x;
command->obj_start_y = command->obj_y;
@ -149,7 +149,7 @@ button_release(GtkWidget *widget, GdkEventButton *event, gpointer data)
command->obj_x -= command->obj_start_x;
command->obj_y -= command->obj_start_y;
if (command->obj_x || command->obj_y)
command_list_add(object_move_command_new(command->obj, command->obj_x,
command_list_add(object_move_command_new(command->obj, command->obj_x,
command->obj_y));
/* preview_thaw(); */
@ -162,9 +162,9 @@ move_command_execute(Command_t *parent)
GtkWidget *widget = command->preview->preview;
/* preview_freeze(); */
g_signal_connect(widget, "button-release-event",
G_CALLBACK (button_release), command);
g_signal_connect(widget, "motion-notify-event",
G_CALLBACK (button_motion), command);
g_signal_connect(widget, "button-release-event",
G_CALLBACK (button_release), command);
g_signal_connect(widget, "motion-notify-event",
G_CALLBACK (button_motion), command);
return CMD_DESTRUCT;
}

View File

@ -44,13 +44,13 @@ typedef struct {
gboolean add;
} MoveDownCommand_t;
Command_t*
Command_t*
move_down_command_new(ObjectList_t *list)
{
MoveDownCommand_t *command = g_new(MoveDownCommand_t, 1);
command->list = list;
command->add = FALSE;
return command_init(&command->parent, _("Move Down"),
return command_init(&command->parent, _("Move Down"),
&move_down_command_class);
}

View File

@ -50,8 +50,8 @@ typedef struct {
MoveSashFunc_t sash_func;
} MoveSashCommand_t;
Command_t*
move_sash_command_new(GtkWidget *widget, Object_t *obj,
Command_t*
move_sash_command_new(GtkWidget *widget, Object_t *obj,
gint x, gint y, MoveSashFunc_t sash_func)
{
MoveSashCommand_t *command = g_new(MoveSashCommand_t, 1);
@ -139,9 +139,9 @@ move_sash_command_execute(Command_t *parent)
hide_url();
preview_freeze();
g_signal_connect(command->widget, "button-release-event",
G_CALLBACK (sash_end), command);
g_signal_connect(command->widget, "motion-notify-event",
G_CALLBACK (sash_move), command);
G_CALLBACK (sash_end), command);
g_signal_connect(command->widget, "motion-notify-event",
G_CALLBACK (sash_move), command);
gdk_gc_set_function(get_preferences()->selected_gc, GDK_EQUIV);
return CMD_APPEND;

View File

@ -46,14 +46,14 @@ typedef struct {
gint dy;
} MoveSelectedCommand_t;
Command_t*
Command_t*
move_selected_command_new(ObjectList_t *list, gint dx, gint dy)
{
MoveSelectedCommand_t *command = g_new(MoveSelectedCommand_t, 1);
command->list = list;
command->dx = dx;
command->dy = dy;
return command_init(&command->parent, _("Move Selected Objects"),
return command_init(&command->parent, _("Move Selected Objects"),
&move_selected_command_class);
}

View File

@ -43,12 +43,12 @@ typedef struct {
ObjectList_t *list;
} MoveToFrontCommand_t;
Command_t*
Command_t*
move_to_front_command_new(ObjectList_t *list)
{
MoveToFrontCommand_t *command = g_new(MoveToFrontCommand_t, 1);
command->list = list;
return command_init(&command->parent, _("Move To Front"),
return command_init(&command->parent, _("Move To Front"),
&move_to_front_command_class);
}
@ -76,7 +76,7 @@ move_to_front_command_execute(Command_t *parent)
id1 = object_list_add_remove_cb(command->list, remove_one_object, command);
id2 = object_list_add_add_cb(command->list, add_one_object, command);
object_list_move_to_front(command->list);
object_list_remove_remove_cb(command->list, id1);
object_list_remove_add_cb(command->list, id2);

View File

@ -44,7 +44,7 @@ typedef struct {
gboolean add;
} MoveUpCommand_t;
Command_t*
Command_t*
move_up_command_new(ObjectList_t *list)
{
MoveUpCommand_t *command = g_new(MoveUpCommand_t, 1);

View File

@ -46,13 +46,13 @@ typedef struct {
Object_t *obj;
} ObjectDownCommand_t;
Command_t*
Command_t*
object_down_command_new(ObjectList_t *list, Object_t *obj)
{
ObjectDownCommand_t *command = g_new(ObjectDownCommand_t, 1);
command->list = list;
command->obj = object_ref(obj);
return command_init(&command->parent, _("Move Down"),
return command_init(&command->parent, _("Move Down"),
&object_down_command_class);
}

View File

@ -47,14 +47,14 @@ typedef struct {
gint dy;
} ObjectMoveCommand_t;
Command_t*
Command_t*
object_move_command_new(Object_t *obj, gint dx, gint dy)
{
ObjectMoveCommand_t *command = g_new(ObjectMoveCommand_t, 1);
command->obj = object_ref(obj);
command->dx = dx;
command->dy = dy;
return command_init(&command->parent, _("Move"),
return command_init(&command->parent, _("Move"),
&object_move_command_class);
}

View File

@ -46,13 +46,13 @@ typedef struct {
Object_t *obj;
} ObjectUpCommand_t;
Command_t*
Command_t*
object_up_command_new(ObjectList_t *list, Object_t *obj)
{
ObjectUpCommand_t *command = g_new(ObjectUpCommand_t, 1);
command->list = list;
command->obj = object_ref(obj);
return command_init(&command->parent, _("Move Up"),
return command_init(&command->parent, _("Move Up"),
&object_up_command_class);
}

View File

@ -43,7 +43,7 @@ typedef struct {
ObjectList_t *list;
} PasteCommand_t;
Command_t*
Command_t*
paste_command_new(ObjectList_t *list)
{
PasteCommand_t *command = g_new(PasteCommand_t, 1);

View File

@ -45,7 +45,7 @@ typedef struct {
Object_t *obj;
} SelectCommand_t;
Command_t*
Command_t*
select_command_new(Object_t *obj)
{
SelectCommand_t *command = g_new(SelectCommand_t, 1);

View File

@ -43,12 +43,12 @@ typedef struct {
ObjectList_t *list;
} SelectAllCommand_t;
Command_t*
Command_t*
select_all_command_new(ObjectList_t *list)
{
SelectAllCommand_t *command = g_new(SelectAllCommand_t, 1);
command->list = list;
return command_init(&command->parent, _("Select All"),
return command_init(&command->parent, _("Select All"),
&select_all_command_class);
}
@ -67,7 +67,7 @@ select_all_command_execute(Command_t *parent)
CmdExecuteValue_t rvalue;
id = object_list_add_select_cb(command->list, select_one_object, command);
rvalue = (object_list_select_all(command->list))
rvalue = (object_list_select_all(command->list))
? CMD_APPEND : CMD_DESTRUCT;
object_list_remove_select_cb(command->list, id);

View File

@ -43,12 +43,12 @@ typedef struct {
ObjectList_t *list;
} SelectNextCommand_t;
Command_t*
Command_t*
select_next_command_new(ObjectList_t *list)
{
SelectNextCommand_t *command = g_new(SelectNextCommand_t, 1);
command->list = list;
return command_init(&command->parent, _("Select Next"),
return command_init(&command->parent, _("Select Next"),
&select_next_command_class);
}
@ -58,7 +58,7 @@ select_one_object(Object_t *obj, gpointer data)
SelectNextCommand_t *command = (SelectNextCommand_t*) data;
Command_t *sub_command;
sub_command = (obj->selected)
sub_command = (obj->selected)
? select_command_new(obj) : unselect_command_new(obj);
command_add_subcommand(&command->parent, sub_command);
}

View File

@ -43,12 +43,12 @@ typedef struct {
ObjectList_t *list;
} SelectPrevCommand_t;
Command_t*
Command_t*
select_prev_command_new(ObjectList_t *list)
{
SelectPrevCommand_t *command = g_new(SelectPrevCommand_t, 1);
command->list = list;
return command_init(&command->parent, _("Select Previous"),
return command_init(&command->parent, _("Select Previous"),
&select_prev_command_class);
}
@ -58,7 +58,7 @@ select_one_object(Object_t *obj, gpointer data)
SelectPrevCommand_t *command = (SelectPrevCommand_t*) data;
Command_t *sub_command;
sub_command = (obj->selected)
sub_command = (obj->selected)
? select_command_new(obj) : unselect_command_new(obj);
command_add_subcommand(&command->parent, sub_command);
}

View File

@ -50,8 +50,8 @@ typedef struct {
Command_t *unselect_command;
} SelectRegionCommand_t;
Command_t*
select_region_command_new(GtkWidget *widget, ObjectList_t *list, gint x,
Command_t*
select_region_command_new(GtkWidget *widget, ObjectList_t *list, gint x,
gint y)
{
SelectRegionCommand_t *command = g_new(SelectRegionCommand_t, 1);
@ -61,7 +61,7 @@ select_region_command_new(GtkWidget *widget, ObjectList_t *list, gint x,
command->list = list;
command->x = x;
command->y = y;
(void) command_init(&command->parent, _("Select Region"),
(void) command_init(&command->parent, _("Select Region"),
&select_region_command_class);
sub_command = unselect_all_command_new(list, NULL);
@ -102,9 +102,9 @@ select_release(GtkWidget *widget, GdkEventButton *event, gpointer data)
gpointer id;
gint count;
g_signal_handlers_disconnect_by_func(widget,
g_signal_handlers_disconnect_by_func(widget,
select_motion, data);
g_signal_handlers_disconnect_by_func(widget,
g_signal_handlers_disconnect_by_func(widget,
select_release, data);
object_draw(obj, widget->window);
@ -131,10 +131,10 @@ select_region_command_execute(Command_t *parent)
SelectRegionCommand_t *command = (SelectRegionCommand_t*) parent;
command->obj = create_rectangle(command->x, command->y, 0, 0);
g_signal_connect(command->widget, "button-release-event",
G_CALLBACK (select_release), command);
g_signal_connect(command->widget, "motion-notify-event",
G_CALLBACK (select_motion), command);
g_signal_connect(command->widget, "button-release-event",
G_CALLBACK (select_release), command);
g_signal_connect(command->widget, "motion-notify-event",
G_CALLBACK (select_motion), command);
gdk_gc_set_function(get_preferences()->normal_gc, GDK_XOR);

View File

@ -43,12 +43,12 @@ typedef struct {
ObjectList_t *list;
} SendToBackCommand_t;
Command_t*
Command_t*
send_to_back_command_new(ObjectList_t *list)
{
SendToBackCommand_t *command = g_new(SendToBackCommand_t, 1);
command->list = list;
return command_init(&command->parent, _("Send To Back"),
return command_init(&command->parent, _("Send To Back"),
&send_to_back_command_class);
}
@ -76,7 +76,7 @@ send_to_back_command_execute(Command_t *parent)
id1 = object_list_add_remove_cb(command->list, remove_one_object, command);
id2 = object_list_add_add_cb(command->list, add_one_object, command);
object_list_send_to_back(command->list);
object_list_remove_remove_cb(command->list, id1);
object_list_remove_add_cb(command->list, id2);

View File

@ -45,12 +45,12 @@ typedef struct {
Object_t *obj;
} UnselectCommand_t;
Command_t*
Command_t*
unselect_command_new(Object_t *obj)
{
UnselectCommand_t *command = g_new(UnselectCommand_t, 1);
command->obj = object_ref(obj);
return command_init(&command->parent, _("Unselect"),
return command_init(&command->parent, _("Unselect"),
&unselect_command_class);
}

View File

@ -47,13 +47,13 @@ typedef struct {
Object_t *exception;
} UnselectAllCommand_t;
Command_t*
Command_t*
unselect_all_command_new(ObjectList_t *list, Object_t *exception)
{
UnselectAllCommand_t *command = g_new(UnselectAllCommand_t, 1);
command->list = list;
command->exception = (exception) ? object_ref(exception) : exception;
return command_init(&command->parent, _("Unselect All"),
return command_init(&command->parent, _("Unselect All"),
&unselect_all_command_class);
}

View File

@ -36,8 +36,8 @@ static void command_destruct(Command_t *command);
static CommandList_t _command_list = {NULL, DEFAULT_UNDO_LEVELS};
static CommandList_t *_current_command_list = &_command_list;
static void
command_list_callback_add(CommandListCallback_t *list,
static void
command_list_callback_add(CommandListCallback_t *list,
CommandListCallbackFunc_t func, gpointer data)
{
CommandListCB_t *cb = g_new(CommandListCB_t, 1);
@ -46,7 +46,7 @@ command_list_callback_add(CommandListCallback_t *list,
list->list = g_list_append(list->list, cb);
}
static void
static void
command_list_callback_call(CommandListCallback_t *list, Command_t *command)
{
GList *p;
@ -56,7 +56,7 @@ command_list_callback_call(CommandListCallback_t *list, Command_t *command)
}
}
CommandList_t*
CommandList_t*
command_list_new(gint undo_levels)
{
CommandList_t *list = g_new(CommandList_t, 1);
@ -82,7 +82,7 @@ command_list_clear(CommandList_t *list)
command_list_callback_call(&list->update_cb, NULL);
}
void
void
command_list_destruct(CommandList_t *list)
{
command_list_clear(list);
@ -172,7 +172,7 @@ subcommand_end(void)
command_list_end(_current_command_list);
}
static void
static void
_command_list_set_undo_level(CommandList_t *list, gint level)
{
gint diff = g_list_length(list->list) - level;
@ -187,20 +187,20 @@ _command_list_set_undo_level(CommandList_t *list, gint level)
}
/* If still to long start removing redo levels at the end */
for (p = g_list_last(list->list); diff && p != list->undo; p = q,
for (p = g_list_last(list->list); diff && p != list->undo; p = q,
diff--) {
Command_t *curr = (Command_t*) p->data;
q = p->prev;
command_destruct(curr);
list->list = g_list_remove_link(list->list, p);
}
command_list_callback_call(&list->update_cb,
command_list_callback_call(&list->update_cb,
(Command_t*) list->undo->data);
}
list->undo_levels = level;
}
void
void
command_list_set_undo_level(gint level)
{
_command_list_set_undo_level(&_command_list, level);
@ -213,7 +213,7 @@ command_list_get_redo_command(void)
NULL;
}
void
void
command_list_add_update_cb(CommandListCallbackFunc_t func, gpointer data)
{
command_list_callback_add(&_command_list.update_cb, func, data);
@ -279,14 +279,14 @@ command_undo(Command_t *command)
command->class->undo(command);
}
void
void
command_set_name(Command_t *command, const gchar *name)
{
command->name = name;
command_list_callback_call(&_command_list.update_cb, command);
}
void
void
command_list_undo(CommandList_t *list)
{
Command_t *command = (Command_t*) list->undo->data;
@ -301,14 +301,14 @@ command_list_undo(CommandList_t *list)
command_list_callback_call(&list->update_cb, command);
}
void
void
command_list_undo_all(CommandList_t *list)
{
while (list->undo)
command_list_undo(list);
}
void
void
last_command_undo(void)
{
command_list_undo(&_command_list);
@ -332,7 +332,7 @@ command_list_redo_all(CommandList_t *list)
command_list_redo(list);
}
void
void
last_command_redo(void)
{
command_list_redo(&_command_list);

View File

@ -90,7 +90,7 @@ void command_list_add_update_cb(CommandListCallbackFunc_t func, gpointer data);
Command_t *command_list_get_redo_command(void);
Command_t *command_new(void (*func)(void));
Command_t *command_init(Command_t *command, const gchar *name,
Command_t *command_init(Command_t *command, const gchar *name,
CommandClass_t *class);
void command_execute(Command_t *command);
void command_undo(Command_t *command);

View File

@ -37,13 +37,13 @@ Command_t *cut_object_command_new(Object_t *obj);
Command_t *delete_command_new(ObjectList_t *list, Object_t *obj);
Command_t *delete_point_command_new(Object_t *obj, GdkPoint *point);
Command_t *edit_object_command_new(Object_t *obj);
Command_t *gimp_guides_command_new(ObjectList_t *list,
Command_t *gimp_guides_command_new(ObjectList_t *list,
GimpDrawable *_drawable);
Command_t *guides_command_new(ObjectList_t *list);
Command_t *insert_point_command_new(Object_t *obj, gint x, gint y, gint edge);
Command_t *move_down_command_new(ObjectList_t *list);
Command_t *move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y);
Command_t *move_sash_command_new(GtkWidget *widget, Object_t *obj,
Command_t *move_sash_command_new(GtkWidget *widget, Object_t *obj,
gint x, gint y, MoveSashFunc_t sash_func);
Command_t *move_selected_command_new(ObjectList_t *list, gint dx, gint dy);
Command_t *move_to_front_command_new(ObjectList_t *list);

View File

@ -951,7 +951,7 @@ yyparse ()
#endif
#endif
{
register int yystate;
register int yyn;
int yyresult;
@ -1272,7 +1272,7 @@ yyreduce:
{
gchar *description;
description = g_strconcat(_map_info->description, (yyvsp[-1].id), "\n",
description = g_strconcat(_map_info->description, (yyvsp[-1].id), "\n",
NULL);
g_strreplace(&_map_info->description, description);
}
@ -1663,7 +1663,7 @@ yyreturn:
#line 311 "imap_csim.y"
static void
static void
csim_error(char* s)
{
extern FILE *csim_in;

View File

@ -200,7 +200,7 @@ do_file_error_dialog (const char *error,
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new_with_markup
dialog = gtk_message_dialog_new_with_markup
(NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,

View File

@ -1213,19 +1213,19 @@ imap_help (void)
gimp_standard_help_func ("plug-in-imagemap", NULL);
}
void
void
do_cut (void)
{
command_execute (cut_command_new (_shapes));
}
void
void
do_copy (void)
{
command_execute (copy_command_new (_shapes));
}
void
void
do_paste (void)
{
command_execute (paste_command_new (_shapes));

View File

@ -63,13 +63,13 @@ void main_toolbar_set_grid(gboolean active);
void set_zoom(gint zoom_factor);
gint get_real_coord(gint coord);
void draw_line(GdkWindow *window, GdkGC *gc, gint x1, gint y1, gint x2,
void draw_line(GdkWindow *window, GdkGC *gc, gint x1, gint y1, gint x2,
gint y2);
void draw_rectangle(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
gint width, gint height);
void draw_arc(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
gint width, gint height, gint angle1, gint angle2);
void draw_circle(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
void draw_circle(GdkWindow *window, GdkGC *gc, gint filled, gint x, gint y,
gint r);
void draw_polygon(GdkWindow *window, GdkGC *gc, GList *list);

View File

@ -29,7 +29,7 @@
#include "imap_mru.h"
MRU_t*
MRU_t*
mru_create(void)
{
MRU_t *mru = g_new(MRU_t, 1);
@ -38,7 +38,7 @@ mru_create(void)
return mru;
}
void
void
mru_destruct(MRU_t *mru)
{
g_list_foreach(mru->list, (GFunc) g_free, NULL);
@ -55,11 +55,11 @@ mru_remove_link(MRU_t *mru, GList *link)
static GList*
mru_find_link(MRU_t *mru, const gchar *filename)
{
return g_list_find_custom(mru->list, (gpointer) filename,
return g_list_find_custom(mru->list, (gpointer) filename,
(GCompareFunc) strcmp);
}
void
void
mru_add(MRU_t *mru, const gchar *filename)
{
if (g_list_length(mru->list) == mru->max_size)
@ -67,7 +67,7 @@ mru_add(MRU_t *mru, const gchar *filename)
mru->list = g_list_prepend(mru->list, g_strdup(filename));
}
void
void
mru_remove(MRU_t *mru, const gchar *filename)
{
mru_remove_link(mru, mru_find_link(mru, filename));
@ -78,13 +78,13 @@ mru_set_first(MRU_t *mru, const gchar *filename)
{
GList *link = mru_find_link(mru, filename);
if (link)
mru->list = g_list_prepend(g_list_remove_link(mru->list, link),
mru->list = g_list_prepend(g_list_remove_link(mru->list, link),
link->data);
else
mru_add(mru, filename);
}
void
void
mru_set_size(MRU_t *mru, gint size)
{
gint diff;

View File

@ -159,11 +159,11 @@ static const short yyrline[] =
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "RECTANGLE", "POLYGON", "CIRCLE", "DEFAULT",
"AUTHOR", "TITLE", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "LINK",
"COMMENT", "','", "ncsa_file", "comment_lines", "comment_line",
"real_comment", "author_line", "title_line", "description_line",
"area_list", "area", "default", "rectangle", "circle", "polygon", "@1",
"$", "error", "$undefined.", "RECTANGLE", "POLYGON", "CIRCLE", "DEFAULT",
"AUTHOR", "TITLE", "DESCRIPTION", "BEGIN_COMMENT", "FLOAT", "LINK",
"COMMENT", "','", "ncsa_file", "comment_lines", "comment_line",
"real_comment", "author_line", "title_line", "description_line",
"area_list", "area", "default", "rectangle", "circle", "polygon", "@1",
"coord_list", "coord", 0
};
#endif
@ -970,7 +970,7 @@ case 11:
MapInfo_t *info = get_map_info();
gchar *description;
description = g_strconcat(info->description, yyvsp[0].id, "\n",
description = g_strconcat(info->description, yyvsp[0].id, "\n",
NULL);
g_strreplace(&info->description, description);
}
@ -978,7 +978,7 @@ case 11:
case 19:
#line 112 "imap_ncsa.y"
{
MapInfo_t *info = get_map_info();
MapInfo_t *info = get_map_info();
g_strreplace(&info->default_url, yyvsp[0].id);
}
break;
@ -1026,7 +1026,7 @@ case 26:
{
Polygon_t *polygon = ObjectToPolygon(current_object);
GdkPoint *point = new_point((gint) yyvsp[-2].value, (gint) yyvsp[0].value);
polygon->points = g_list_append(polygon->points,
polygon->points = g_list_append(polygon->points,
(gpointer) point);
}
break;
@ -1266,7 +1266,7 @@ yyreturn:
#line 164 "imap_ncsa.y"
static void
static void
ncsa_error(char* s)
{
extern FILE *ncsa_in;

View File

@ -40,7 +40,7 @@ typedef struct {
static ObjectList_t *_paste_buffer;
static gpointer
object_list_callback_add(ObjectListCallback_t *list,
object_list_callback_add(ObjectListCallback_t *list,
ObjectListCallbackFunc_t func, gpointer data)
{
ObjectListCB_t *cb = g_new(ObjectListCB_t, 1);
@ -56,7 +56,7 @@ object_list_callback_remove(ObjectListCallback_t *list, gpointer id)
list->list = g_list_remove(list->list, id);
}
static void
static void
object_list_callback_call(ObjectListCallback_t *list, Object_t *obj)
{
GList *p;
@ -81,35 +81,35 @@ object_list_add_update_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
}
gpointer
object_list_add_add_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
object_list_add_add_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
gpointer data)
{
return object_list_callback_add(&list->add_cb, func, data);
}
gpointer
object_list_add_remove_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
object_list_add_remove_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
gpointer data)
{
return object_list_callback_add(&list->remove_cb, func, data);
}
gpointer
object_list_add_select_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
object_list_add_select_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
gpointer data)
{
return object_list_callback_add(&list->select_cb, func, data);
}
gpointer
object_list_add_move_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
object_list_add_move_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
gpointer data)
{
return object_list_callback_add(&list->move_cb, func, data);
}
gpointer
object_list_add_geometry_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
object_list_add_geometry_cb(ObjectList_t *list, ObjectListCallbackFunc_t func,
gpointer data)
{
return object_list_callback_add(&list->geometry_cb, func, data);
@ -131,31 +131,31 @@ paste_buffer_add_remove_cb(ObjectListCallbackFunc_t func, gpointer data)
return object_list_callback_add(&_paste_buffer->remove_cb, func, data);
}
void
void
object_list_remove_add_cb(ObjectList_t *list, gpointer id)
{
object_list_callback_remove(&list->add_cb, id);
}
void
void
object_list_remove_select_cb(ObjectList_t *list, gpointer id)
{
object_list_callback_remove(&list->select_cb, id);
}
void
void
object_list_remove_remove_cb(ObjectList_t *list, gpointer id)
{
object_list_callback_remove(&list->remove_cb, id);
}
void
void
object_list_remove_move_cb(ObjectList_t *list, gpointer id)
{
object_list_callback_remove(&list->move_cb, id);
}
void
void
object_list_remove_geometry_cb(ObjectList_t *list, gpointer id)
{
object_list_callback_remove(&list->geometry_cb, id);
@ -200,7 +200,7 @@ object_ref(Object_t *obj)
return obj;
}
void
void
object_unref(Object_t *obj)
{
if (!--obj->refcount)
@ -210,7 +210,7 @@ object_unref(Object_t *obj)
Object_t*
object_clone(Object_t *obj)
{
Object_t *clone = obj->class->clone(obj);
Object_t *clone = obj->class->clone(obj);
clone->class = obj->class;
clone->refcount = 1;
clone->selected = obj->selected;
@ -221,7 +221,7 @@ object_clone(Object_t *obj)
clone->mouse_over = g_strdup(obj->mouse_over);
clone->mouse_out = g_strdup(obj->mouse_out);
clone->focus = g_strdup(obj->focus);
clone->blur = g_strdup(obj->blur);
clone->blur = g_strdup(obj->blur);
return clone;
}
@ -248,18 +248,18 @@ object_assign(Object_t *obj, Object_t *des)
return object_copy(obj, des);
}
void
void
object_draw(Object_t *obj, GdkWindow *window)
{
PreferencesData_t *preferences = get_preferences();
GdkGC *gc = (obj->selected) ? preferences->selected_gc
GdkGC *gc = (obj->selected) ? preferences->selected_gc
: preferences->normal_gc;
obj->class->draw(obj, window, gc);
if (obj->selected && preferences->show_area_handle)
obj->class->draw_sashes(obj, window, gc);
}
void
void
object_edit(Object_t *obj, gboolean add)
{
if (!obj->class->info_dialog)
@ -267,7 +267,7 @@ object_edit(Object_t *obj, gboolean add)
edit_area_info_dialog_show(obj->class->info_dialog, obj, add);
}
void
void
object_select(Object_t *obj)
{
obj->selected = TRUE;
@ -275,7 +275,7 @@ object_select(Object_t *obj)
object_emit_geometry_signal(obj);
}
void
void
object_unselect(Object_t *obj)
{
obj->selected = FALSE;
@ -297,31 +297,31 @@ object_remove(Object_t *obj)
object_emit_geometry_signal(obj);
}
void
void
object_lock(Object_t *obj)
{
obj->locked = TRUE;
}
void
void
object_unlock(Object_t *obj)
{
obj->locked = FALSE;
}
void
void
object_set_url(Object_t *obj, const gchar *url)
{
g_strreplace(&obj->url, url);
}
void
void
object_set_target(Object_t *obj, const gchar *target)
{
g_strreplace(&obj->target, target);
}
void
void
object_set_comment(Object_t *obj, const gchar *comment)
{
g_strreplace(&obj->comment, comment);
@ -357,19 +357,19 @@ object_get_position_in_list(Object_t *obj)
return g_list_index(obj->list->list, (gpointer) obj);
}
void
void
object_emit_changed_signal(Object_t *obj)
{
object_list_callback_call(&obj->list->changed_cb, obj);
}
void
void
object_emit_geometry_signal(Object_t *obj)
{
object_list_callback_call(&obj->list->geometry_cb, obj);
}
void
void
object_emit_update_signal(Object_t *obj)
{
object_list_callback_call(&obj->list->update_cb, obj);
@ -398,7 +398,7 @@ object_factory_create_object(ObjectFactory_t *factory, gint x, gint y)
}
static gboolean
button_motion(GtkWidget *widget, GdkEventMotion *event,
button_motion(GtkWidget *widget, GdkEventMotion *event,
ObjectFactory_t *factory)
{
gint x = get_real_coord((gint) event->x);
@ -429,8 +429,8 @@ object_on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
if (obj) {
if (event->button == 1) {
if (!factory->finish || factory->finish(obj, x, y)) {
g_signal_handlers_disconnect_by_func(widget,
button_motion,
g_signal_handlers_disconnect_by_func(widget,
button_motion,
factory);
if (object_is_valid(obj)) {
Command_t *command = create_command_new(get_shapes(), obj);
@ -448,8 +448,8 @@ object_on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
} else if (event->button == 3) {
object_draw(obj, widget->window);
if (!factory->cancel || factory->cancel(event, obj)) {
g_signal_handlers_disconnect_by_func(widget,
button_motion,
g_signal_handlers_disconnect_by_func(widget,
button_motion,
factory);
object_unref(obj);
gdk_gc_set_function(preferences->normal_gc, GDK_COPY);
@ -463,7 +463,7 @@ object_on_button_press(GtkWidget *widget, GdkEventButton *event, gpointer data)
if (event->button == 1) {
factory = ((ObjectFactory_t*(*)(guint)) data)(event->state);
obj = object_factory_create_object(factory, x, y);
gdk_gc_set_function(preferences->normal_gc, GDK_EQUIV);
g_signal_connect(widget, "motion-notify-event",
@ -507,7 +507,7 @@ object_list_copy(ObjectList_t *des, ObjectList_t *src)
return object_list_append_list(des, src);
}
void
void
object_list_append(ObjectList_t *list, Object_t *object)
{
object->list = list;
@ -516,7 +516,7 @@ object_list_append(ObjectList_t *list, Object_t *object)
object_list_callback_call(&list->add_cb, object);
}
void
void
object_list_prepend(ObjectList_t *list, Object_t *object)
{
object->list = list;
@ -525,7 +525,7 @@ object_list_prepend(ObjectList_t *list, Object_t *object)
object_list_callback_call(&list->add_cb, object);
}
void
void
object_list_insert(ObjectList_t *list, gint position, Object_t *object)
{
object->list = list;
@ -534,7 +534,7 @@ object_list_insert(ObjectList_t *list, gint position, Object_t *object)
object_list_callback_call(&list->add_cb, object);
}
void
void
object_list_remove(ObjectList_t *list, Object_t *object)
{
list->list = g_list_remove(list->list, (gpointer) object);
@ -543,7 +543,7 @@ object_list_remove(ObjectList_t *list, Object_t *object)
object_unref(object);
}
void
void
object_list_remove_link(ObjectList_t *list, GList *link)
{
list->list = g_list_remove_link(list->list, link);
@ -551,7 +551,7 @@ object_list_remove_link(ObjectList_t *list, GList *link)
object_list_callback_call(&list->remove_cb, (Object_t*) link->data);
}
void
void
object_list_update(ObjectList_t *list, Object_t *object)
{
object_list_callback_call(&list->update_cb, object);
@ -661,7 +661,7 @@ object_list_cut(ObjectList_t *list)
return count;
}
void
void
object_list_copy_to_paste_buffer(ObjectList_t *list)
{
GList *p;
@ -674,7 +674,7 @@ object_list_copy_to_paste_buffer(ObjectList_t *list)
}
}
void
void
object_list_paste(ObjectList_t *list)
{
object_list_append_list(list, _paste_buffer);
@ -698,7 +698,7 @@ object_list_delete_selected(ObjectList_t *list)
}
}
void
void
object_list_edit_selected(ObjectList_t *list)
{
GList *p;
@ -726,7 +726,7 @@ object_list_select_all(ObjectList_t *list)
return count;
}
void
void
object_list_select_next(ObjectList_t *list)
{
GList *p;
@ -764,7 +764,7 @@ void object_list_select_prev(ObjectList_t *list)
}
}
gint
gint
object_list_select_region(ObjectList_t *list, gint x, gint y, gint width,
gint height)
{
@ -799,7 +799,7 @@ object_list_deselect_all(ObjectList_t *list, Object_t *exception)
return count;
}
gint
gint
object_list_nr_selected(ObjectList_t *list)
{
GList *p;
@ -812,7 +812,7 @@ object_list_nr_selected(ObjectList_t *list)
return count;
}
void
void
object_list_resize(ObjectList_t *list, gint percentage_x, gint percentage_y)
{
GList *p;
@ -842,7 +842,7 @@ object_list_swap_next(ObjectList_t *list, GList *p)
object_list_callback_call(&list->move_cb, (Object_t*) p->next->data);
}
void
void
object_list_move_selected(ObjectList_t *list, gint dx, gint dy)
{
GList *p;
@ -853,14 +853,14 @@ object_list_move_selected(ObjectList_t *list, gint dx, gint dy)
}
}
void
void
object_list_move_up(ObjectList_t *list, Object_t *obj)
{
GList *p = g_list_find(list->list, (gpointer) obj);
object_list_swap_prev(list, p);
}
void
void
object_list_move_down(ObjectList_t *list, Object_t *obj)
{
GList *p = g_list_find(list->list, (gpointer) obj);
@ -891,7 +891,7 @@ object_list_move_selected_down(ObjectList_t *list)
}
}
void
void
object_list_move_to_front(ObjectList_t *list)
{
GList *p, *q;
@ -907,7 +907,7 @@ object_list_move_to_front(ObjectList_t *list)
}
}
void
void
object_list_send_to_back(ObjectList_t *list)
{
GList *p, *q;
@ -923,9 +923,9 @@ object_list_send_to_back(ObjectList_t *list)
}
}
static void
static void
write_xml_attrib(const gchar *attrib, const gchar *value,
const gchar *default_text, gpointer param,
const gchar *default_text, gpointer param,
OutputFunc_t output)
{
if (*value) {

Some files were not shown because too many files have changed in this diff Show More