libgimp/gimp.h libgimp/gimpbrushmenu.h libgimp/gimpbrushselect.[ch]

2003-12-05  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimp.h
	* libgimp/gimpbrushmenu.h
	* libgimp/gimpbrushselect.[ch]
	* libgimp/gimpfontmenu.[ch]
	* libgimp/gimpfontselect.[ch]
	* libgimp/gimpgradientmenu.h
	* libgimp/gimpgradientselect.[ch]
	* libgimp/gimpmenu.h
	* libgimp/gimpmisc.[ch]
	* libgimp/gimpmiscui.[ch]
	* libgimp/gimppatternmenu.h
	* libgimp/gimppatternselect.[ch]
	* libgimp/gimppixelrgn.[ch]
	* libgimp/gimpproceduraldb.c
	* libgimp/gimpselection.c
	* libgimp/gimptile.h
	* libgimp/gimptypes.h
	* libgimp/gimpui.h
	* libgimp/gimpuitypes.h
	* libgimp/libgimp-intl.h
	* libgimp/stdplugins-intl.h
	* libgimpbase/gimpbase.h
	* libgimpbase/gimpdatafiles.c
	* libgimpbase/gimpenv.c
	* libgimpbase/gimpparasite.[ch]
	* libgimpbase/gimpparasiteio.[ch]
	* libgimpbase/gimpsignal.[ch]
	* libgimpbase/gimputils.c
	* libgimpcolor/gimpadaptivesupersample.[ch]
	* libgimpcolor/gimpbilinear.[ch]
	* libgimpmath/gimpmath.h
	* libgimpmath/gimpmathtypes.h
	* libgimpwidgets/gimpbutton.[ch]
	* libgimpwidgets/gimpchainbutton.h
	* libgimpwidgets/gimpcolorarea.[ch]
	* libgimpwidgets/gimpcolornotebook.h
	* libgimpwidgets/gimpcolorscale.[ch]
	* libgimpwidgets/gimpcolorscales.h
	* libgimpwidgets/gimpcolorselect.h
	* libgimpwidgets/gimpoffsetarea.h
	* libgimpwidgets/gimppixmap.[ch]: removed trailing whitespace.
This commit is contained in:
Michael Natterer 2003-12-05 15:55:15 +00:00 committed by Michael Natterer
parent 2de8decd7e
commit 7efa81d1da
64 changed files with 511 additions and 467 deletions

View File

@ -1,3 +1,47 @@
2003-12-05 Michael Natterer <mitch@gimp.org>
* libgimp/gimp.h
* libgimp/gimpbrushmenu.h
* libgimp/gimpbrushselect.[ch]
* libgimp/gimpfontmenu.[ch]
* libgimp/gimpfontselect.[ch]
* libgimp/gimpgradientmenu.h
* libgimp/gimpgradientselect.[ch]
* libgimp/gimpmenu.h
* libgimp/gimpmisc.[ch]
* libgimp/gimpmiscui.[ch]
* libgimp/gimppatternmenu.h
* libgimp/gimppatternselect.[ch]
* libgimp/gimppixelrgn.[ch]
* libgimp/gimpproceduraldb.c
* libgimp/gimpselection.c
* libgimp/gimptile.h
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/libgimp-intl.h
* libgimp/stdplugins-intl.h
* libgimpbase/gimpbase.h
* libgimpbase/gimpdatafiles.c
* libgimpbase/gimpenv.c
* libgimpbase/gimpparasite.[ch]
* libgimpbase/gimpparasiteio.[ch]
* libgimpbase/gimpsignal.[ch]
* libgimpbase/gimputils.c
* libgimpcolor/gimpadaptivesupersample.[ch]
* libgimpcolor/gimpbilinear.[ch]
* libgimpmath/gimpmath.h
* libgimpmath/gimpmathtypes.h
* libgimpwidgets/gimpbutton.[ch]
* libgimpwidgets/gimpchainbutton.h
* libgimpwidgets/gimpcolorarea.[ch]
* libgimpwidgets/gimpcolornotebook.h
* libgimpwidgets/gimpcolorscale.[ch]
* libgimpwidgets/gimpcolorscales.h
* libgimpwidgets/gimpcolorselect.h
* libgimpwidgets/gimpoffsetarea.h
* libgimpwidgets/gimppixmap.[ch]: removed trailing whitespace.
2003-12-05 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_bytes() to

View File

@ -160,7 +160,7 @@ struct _GimpParam
* platform being compiled for.
*
* To use this macro, simply place a line that contains just the code
* MAIN() at the toplevel of your file. No semicolon should be used.
* MAIN() at the toplevel of your file. No semicolon should be used.
*
*/

View File

@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_brush_select_widget_new (const gchar *title,
const gchar *brush_name,
const gchar *brush_name,
gdouble opacity,
gint spacing,
GimpLayerModeEffects paint_mode,

View File

@ -61,7 +61,7 @@ static GHashTable *gimp_brush_select_ht = NULL;
/* public functions */
const gchar *
gimp_brush_select_new (const gchar *title,
gimp_brush_select_new (const gchar *title,
const gchar *brush_name,
gdouble opacity,
gint spacing,
@ -147,7 +147,7 @@ gimp_brush_select_destroy (const gchar *brush_callback)
{
g_source_remove (brush_data->idle_id);
g_free (brush_data->brush_name);
g_free (brush_data->brush_mask_data);
g_free (brush_data->brush_mask_data);
}
if (brush_data->brush_callback)

View File

@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_BRUSH_SELECT_H__
#define __GIMP_BRUSH_SELECT_H__

View File

@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default
* title.
* @font_name: Initial font name.
* @font_name: Initial font name.
* @callback: A function to call when the selected font changes.
* @data: A pointer to arbitary data to be used in the call to @callback.
*
@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
*
* Returns: A #GtkWidget that you can use in your UI.
*/
GtkWidget *
GtkWidget *
gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)
{
@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/**
* gimp_font_select_widget_set;
* @widget: A font select widget.
* @font_name: Font name to set; %NULL means no change.
* @font_name: Font name to set; %NULL means no change.
*
* Sets the current font for the font select widget. Calls the
* callback function if one was supplied in the call to
@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback)
{
/* calling gimp_fonts_set_popup() raises the dialog */
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
}
else
{

View File

@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data);

View File

@ -55,7 +55,7 @@ static GHashTable *gimp_font_select_ht = NULL;
/* public functions */
const gchar *
gimp_font_select_new (const gchar *title,
gimp_font_select_new (const gchar *title,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)

View File

@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_FONT_SELECT_H__
#define __GIMP_FONT_SELECT_H__

View File

@ -63,7 +63,7 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
* gimp_font_select_widget_new:
* @title: Title of the dialog to use or %NULL means to use the default
* title.
* @font_name: Initial font name.
* @font_name: Initial font name.
* @callback: A function to call when the selected font changes.
* @data: A pointer to arbitary data to be used in the call to @callback.
*
@ -73,9 +73,9 @@ static void gimp_font_select_widget_destroy (GtkWidget *widget,
*
* Returns: A #GtkWidget that you can use in your UI.
*/
GtkWidget *
GtkWidget *
gimp_font_select_widget_new (const gchar *title,
const gchar *font_name,
const gchar *font_name,
GimpRunFontCallback callback,
gpointer data)
{
@ -149,7 +149,7 @@ gimp_font_select_widget_close (GtkWidget *widget)
/**
* gimp_font_select_widget_set;
* @widget: A font select widget.
* @font_name: Font name to set; %NULL means no change.
* @font_name: Font name to set; %NULL means no change.
*
* Sets the current font for the font select widget. Calls the
* callback function if one was supplied in the call to
@ -200,7 +200,7 @@ gimp_font_select_widget_clicked (GtkWidget *widget,
if (font_sel->temp_font_callback)
{
/* calling gimp_fonts_set_popup() raises the dialog */
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
gimp_fonts_set_popup (font_sel->temp_font_callback, font_sel->font_name);
}
else
{

View File

@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_gradient_select_widget_new (const gchar *title,
const gchar *gradient_name,
const gchar *gradient_name,
GimpRunGradientCallback callback,
gpointer data);

View File

@ -57,7 +57,7 @@ static GHashTable *gimp_gradient_select_ht = NULL;
/* public functions */
const gchar *
gimp_gradient_select_new (const gchar *title,
gimp_gradient_select_new (const gchar *title,
const gchar *gradient_name,
gint sample_size,
GimpRunGradientCallback callback,

View File

@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_GRAIDENT_SELECT_H__
#define __GIMP_GRADIENT_SELECT_H__

View File

@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_MENU_H__
#define __GIMP_MENU_H__

View File

@ -4,7 +4,7 @@
* gimpmisc.c
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
@ -49,7 +49,7 @@ struct _GimpPixelFetcher
gboolean shadow;
};
struct _GimpRgnIterator
struct _GimpRgnIterator
{
GimpDrawable *drawable;
gint x1, y1, x2, y2;
@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable)
pf = g_new (GimpPixelFetcher, 1);
gimp_drawable_mask_bounds (drawable->drawable_id,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x2, &pf->sel_y2);
pf->col = -1;
@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf)
}
}
void
void
gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow)
{
@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf,
pf->col = col;
pf->row = row;
}
return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff);
}
@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
break;
case PIXEL_BLACK:
if (x < 0 || x >= pf->img_width ||
if (x < 0 || x >= pf->img_width ||
y < 0 || y >= pf->img_height)
{
i = pf->img_bpp;
@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable,
}
}
void
void
gimp_get_bg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *bg)
@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
gimp_get_color_guchar (drawable, &background, transparent, bg);
}
void
void
gimp_get_fg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *fg)
@ -323,10 +323,10 @@ GimpRgnIterator*
gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode)
{
GimpRgnIterator *iter = g_new (GimpRgnIterator, 1);
iter->drawable = drawable;
iter->run_mode = run_mode;
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
&iter->x2, &iter->y2);
return iter;
@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
}
static void
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
GimpRgnFuncSrc func, gpointer data)
{
gpointer pr;
@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1);
area_so_far = 0;
for (pr = gimp_pixel_rgns_register (1, srcPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
{
guchar *src = srcPR->data;
gint y;
for (y = srcPR->y; y < srcPR->y + srcPR->h; y++)
{
guchar *s = src;
gint x;
for (x = srcPR->x; x < srcPR->x + srcPR->w; x++)
{
func (x, y, s, srcPR->bpp, data);
s += srcPR->bpp;
}
src += srcPR->rowstride;
}
if (iter->run_mode != GIMP_RUN_NONINTERACTIVE)
{
area_so_far += srcPR->w * srcPR->h;
@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
}
void
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data)
{
GimpPixelRgn srcPR;
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, FALSE, FALSE);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
}
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data)
{
GimpPixelRgn srcPR, destPR;
@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
TRUE, TRUE);
bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gint y;
guchar* src = srcPR.data;
guchar* dest = destPR.data;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{
gint x;
@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
s += bpp;
d += bpp;
}
src += srcPR.rowstride;
dest += destPR.rowstride;
}
@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
y2 - y1);
}
void
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data)
{
GimpPixelRgn destPR;
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, TRUE, TRUE);
gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data);
/* update the processed region */
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1);
}
@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR,
gint row;
guchar* src = srcPR->data;
guchar* dest = destPR->data;
for (row = 0; row < srcPR->h; row++)
{
gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data);
@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable,
void
gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data)
{
@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable,
FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1),
TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))

View File

@ -4,17 +4,17 @@
* gimpmisc.h
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -45,16 +45,16 @@ GimpPixelFetcher * gimp_pixel_fetcher_new (GimpDrawable *drawable);
void gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf);
void gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow);
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
gint x,
gint y,
gint wrapmode,
guchar *pixel);
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
const guchar *pixel);
@ -93,28 +93,28 @@ typedef void (* GimpRgnFuncSrcDest) (gint x,
gint bpp,
gpointer data);
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRunMode run_mode);
void gimp_rgn_iterator_free (GimpRgnIterator *iter);
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data);
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data);
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc1 func,
GimpRgnFunc1 func,
gpointer data);
void gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc2 func,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data);
G_END_DECLS

View File

@ -4,7 +4,7 @@
* gimpmiscui.c
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
@ -39,27 +39,27 @@
#include "libgimp-intl.h"
#define PREVIEW_SIZE 128
#define PREVIEW_SIZE 128
#define PREVIEW_BPP 3
static void
gimp_fixme_preview_put_in_frame (GimpFixMePreview* preview)
{
GtkWidget *frame, *abox;
preview->frame = gtk_frame_new (_("Preview"));
gtk_widget_show (preview->frame);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_container_set_border_width (GTK_CONTAINER (abox), 4);
gtk_container_add (GTK_CONTAINER (preview->frame), abox);
gtk_widget_show (abox);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_widget_show (frame);
gtk_container_add (GTK_CONTAINER (frame), preview->widget);
}
@ -81,7 +81,7 @@ gimp_fixme_preview_new (GimpDrawable *drawable,
return preview;
}
void
void
gimp_fixme_preview_free (GimpFixMePreview *preview)
{
g_free (preview->cmap);
@ -123,9 +123,9 @@ gimp_fixme_preview_new2 (GimpImageType drawable_type,
}
gtk_preview_size (GTK_PREVIEW (preview->widget), PREVIEW_SIZE, PREVIEW_SIZE);
for (y = 0; y < PREVIEW_SIZE; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview->widget), buf, 0, y,
for (y = 0; y < PREVIEW_SIZE; y++)
gtk_preview_draw_row (GTK_PREVIEW (preview->widget), buf, 0, y,
PREVIEW_SIZE);
g_free (buf);
@ -208,7 +208,7 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
gint r, g, b, a;
gint c0, c1;
for (x = 0; x < width; x++)
for (x = 0; x < width; x++)
{
switch (bpp)
{
@ -230,7 +230,7 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
if (preview->cmap)
{
gint index = MIN (src[x*bpp], preview->ncolors - 1);
r = preview->cmap[index * 3 + 0];
g = preview->cmap[index * 3 + 1];
b = preview->cmap[index * 3 + 2];
@ -239,43 +239,43 @@ gimp_fixme_preview_do_row (GimpFixMePreview *preview,
{
g = b = r = src[x * bpp + 0];
}
if (bpp == 2)
a = src[x*2 + 1];
else
a = 255;
break;
}
if ((x / GIMP_CHECK_SIZE_SM) & 1)
if ((x / GIMP_CHECK_SIZE_SM) & 1)
{
c0 = GIMP_CHECK_LIGHT * 255;
c1 = GIMP_CHECK_DARK * 255;
}
else
}
else
{
c0 = GIMP_CHECK_DARK * 255;
c1 = GIMP_CHECK_LIGHT * 255;
}
*p0++ = c0 + (r - c0) * a / 255;
*p0++ = c0 + (g - c0) * a / 255;
*p0++ = c0 + (b - c0) * a / 255;
*p1++ = c1 + (r - c1) * a / 255;
*p1++ = c1 + (g - c1) * a / 255;
*p1++ = c1 + (b - c1) * a / 255;
*p1++ = c1 + (b - c1) * a / 255;
}
if ((row / GIMP_CHECK_SIZE_SM) & 1)
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->odd, 0, row, width);
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->odd, 0, row, width);
}
else
{
gtk_preview_draw_row (GTK_PREVIEW (preview->widget),
preview->even, 0, row, width);
preview->even, 0, row, width);
}
}
@ -312,7 +312,7 @@ gimp_fixme_preview_update (GimpFixMePreview *preview,
g_free (buffer);
}
void
void
gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint32 drawable_ID)
{
@ -322,7 +322,7 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint width = PREVIEW_SIZE;
gint height = PREVIEW_SIZE;
preview->cache =
preview->cache =
gimp_drawable_get_thumbnail_data (drawable_ID, &width, &height, &bpp);
if (width < 1 || height < 1)
@ -343,9 +343,9 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gtk_preview_size (GTK_PREVIEW (preview->widget), width, height);
preview->scale_x =
preview->scale_x =
(gdouble) width / (gdouble) gimp_drawable_width (drawable_ID);
preview->scale_y =
preview->scale_y =
(gdouble) height / (gdouble) gimp_drawable_height (drawable_ID);
src = preview->cache;
@ -363,8 +363,8 @@ gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
preview->height = GTK_PREVIEW (preview->widget)->buffer_height;
}
void
gimp_fixme_preview_fill (GimpFixMePreview *preview,
void
gimp_fixme_preview_fill (GimpFixMePreview *preview,
GimpDrawable *drawable)
{
GimpPixelRgn srcPR;
@ -374,15 +374,15 @@ gimp_fixme_preview_fill (GimpFixMePreview *preview,
gint bpp;
gint y;
guchar *src;
gimp_drawable_mask_bounds (drawable->drawable_id, &x1, &y1, &x2, &y2);
if (x2 - x1 > PREVIEW_SIZE)
x2 = x1 + PREVIEW_SIZE;
if (y2 - y1 > PREVIEW_SIZE)
y2 = y1 + PREVIEW_SIZE;
width = x2 - x1;
height = y2 - y1;
bpp = gimp_drawable_bpp (drawable->drawable_id);
@ -413,10 +413,10 @@ gimp_fixme_preview_fill (GimpFixMePreview *preview,
gimp_pixel_rgn_get_row (&srcPR, src, x1, y + y1, width);
memcpy(preview->cache + (y * width * bpp), src, width * bpp);
}
for (y = 0; y < height; y++)
{
gimp_fixme_preview_do_row (preview, y, width,
gimp_fixme_preview_do_row (preview, y, width,
preview->cache + (y * width * bpp));
}
@ -427,8 +427,8 @@ gimp_fixme_preview_fill (GimpFixMePreview *preview,
g_free (src);
}
void
gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
void
gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
GimpDrawable *drawable)
{
gint bpp;

View File

@ -4,17 +4,17 @@
* gimpmiscui.h
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -59,13 +59,13 @@ typedef struct
} GimpFixMePreview;
typedef void (*GimpFixeMePreviewFunc) (const guchar *src,
guchar *dest,
guchar *dest,
gint bpp,
gpointer data);
GimpFixMePreview * gimp_fixme_preview_new (GimpDrawable *drawable,
gboolean has_frame);
GimpFixMePreview * gimp_fixme_preview_new2 (GimpImageType drawable_type,
GimpFixMePreview * gimp_fixme_preview_new2 (GimpImageType drawable_type,
gboolean has_frame);
void gimp_fixme_preview_free (GimpFixMePreview *preview);
@ -75,9 +75,9 @@ void gimp_fixme_preview_update (GimpFixMePreview *preview,
void gimp_fixme_preview_fill_with_thumb (GimpFixMePreview *preview,
gint32 drawable_ID);
void gimp_fixme_preview_fill (GimpFixMePreview *preview,
void gimp_fixme_preview_fill (GimpFixMePreview *preview,
GimpDrawable *drawable);
void gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
void gimp_fixme_preview_fill_scaled (GimpFixMePreview *preview,
GimpDrawable *drawable);
void gimp_fixme_preview_do_row (GimpFixMePreview *preview,

View File

@ -26,7 +26,7 @@ G_BEGIN_DECLS
GtkWidget * gimp_pattern_select_widget_new (const gchar *title,
const gchar *pattern_name,
const gchar *pattern_name,
GimpRunPatternCallback callback,
gpointer data);

View File

@ -141,7 +141,7 @@ gimp_pattern_select_destroy (const gchar *pattern_callback)
{
g_source_remove (pattern_data->idle_id);
g_free (pattern_data->pattern_name);
g_free (pattern_data->pattern_mask_data);
g_free (pattern_data->pattern_mask_data);
}
if (pattern_data->pattern_callback)

View File

@ -17,7 +17,7 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_PATTERN_SELECT_H__
#define __GIMP_PATTERN_SELECT_H__
@ -32,7 +32,7 @@ typedef void (* GimpRunPatternCallback) (const gchar *pattern_name,
const guchar *mask_data,
gboolean dialog_closing,
gpointer user_data);
const gchar * gimp_pattern_select_new (const gchar *title,
const gchar *pattern_name,

View File

@ -4,7 +4,7 @@
* gimpmisc.c
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
@ -49,7 +49,7 @@ struct _GimpPixelFetcher
gboolean shadow;
};
struct _GimpRgnIterator
struct _GimpRgnIterator
{
GimpDrawable *drawable;
gint x1, y1, x2, y2;
@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable)
pf = g_new (GimpPixelFetcher, 1);
gimp_drawable_mask_bounds (drawable->drawable_id,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x2, &pf->sel_y2);
pf->col = -1;
@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf)
}
}
void
void
gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow)
{
@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf,
pf->col = col;
pf->row = row;
}
return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff);
}
@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
break;
case PIXEL_BLACK:
if (x < 0 || x >= pf->img_width ||
if (x < 0 || x >= pf->img_width ||
y < 0 || y >= pf->img_height)
{
i = pf->img_bpp;
@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable,
}
}
void
void
gimp_get_bg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *bg)
@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
gimp_get_color_guchar (drawable, &background, transparent, bg);
}
void
void
gimp_get_fg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *fg)
@ -323,10 +323,10 @@ GimpRgnIterator*
gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode)
{
GimpRgnIterator *iter = g_new (GimpRgnIterator, 1);
iter->drawable = drawable;
iter->run_mode = run_mode;
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
&iter->x2, &iter->y2);
return iter;
@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
}
static void
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
GimpRgnFuncSrc func, gpointer data)
{
gpointer pr;
@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1);
area_so_far = 0;
for (pr = gimp_pixel_rgns_register (1, srcPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
{
guchar *src = srcPR->data;
gint y;
for (y = srcPR->y; y < srcPR->y + srcPR->h; y++)
{
guchar *s = src;
gint x;
for (x = srcPR->x; x < srcPR->x + srcPR->w; x++)
{
func (x, y, s, srcPR->bpp, data);
s += srcPR->bpp;
}
src += srcPR->rowstride;
}
if (iter->run_mode != GIMP_RUN_NONINTERACTIVE)
{
area_so_far += srcPR->w * srcPR->h;
@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
}
void
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data)
{
GimpPixelRgn srcPR;
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, FALSE, FALSE);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
}
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data)
{
GimpPixelRgn srcPR, destPR;
@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
TRUE, TRUE);
bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gint y;
guchar* src = srcPR.data;
guchar* dest = destPR.data;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{
gint x;
@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
s += bpp;
d += bpp;
}
src += srcPR.rowstride;
dest += destPR.rowstride;
}
@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
y2 - y1);
}
void
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data)
{
GimpPixelRgn destPR;
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, TRUE, TRUE);
gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data);
/* update the processed region */
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1);
}
@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR,
gint row;
guchar* src = srcPR->data;
guchar* dest = destPR->data;
for (row = 0; row < srcPR->h; row++)
{
gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data);
@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable,
void
gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data)
{
@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable,
FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1),
TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))

View File

@ -4,17 +4,17 @@
* gimpmisc.h
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -45,16 +45,16 @@ GimpPixelFetcher * gimp_pixel_fetcher_new (GimpDrawable *drawable);
void gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf);
void gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow);
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
gint x,
gint y,
gint wrapmode,
guchar *pixel);
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
const guchar *pixel);
@ -93,28 +93,28 @@ typedef void (* GimpRgnFuncSrcDest) (gint x,
gint bpp,
gpointer data);
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRunMode run_mode);
void gimp_rgn_iterator_free (GimpRgnIterator *iter);
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data);
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data);
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc1 func,
GimpRgnFunc1 func,
gpointer data);
void gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc2 func,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data);
G_END_DECLS

View File

@ -183,7 +183,7 @@ gimp_pixel_rgn_get_row (GimpPixelRgn *pr,
#ifdef MEMCPY_IS_NICE
memcpy ((void *)buf,
(const void *)tile_data,
inc = (bpp *
inc = (bpp *
( (min = MIN (end, boundary)) -x) ) );
x = min;
buf += inc;
@ -301,8 +301,8 @@ gimp_pixel_rgn_get_rect (GimpPixelRgn *pr,
dest = buf + bufstride * (ty - ystart) + bpp * (x - xstart);
#ifdef MEMCPY_IS_NICE
memcpy ((void *)dest, (const void *)src, (xboundary-x)*bpp);
#else
memcpy ((void *)dest, (const void *)src, (xboundary-x)*bpp);
#else
for (tx = x; tx < xboundary; tx++)
{
for (b = 0; b < bpp; b++)
@ -500,7 +500,7 @@ gimp_pixel_rgn_set_rect (GimpPixelRgn *pr,
(ty % TILE_HEIGHT) + (x % TILE_WIDTH));
#ifdef MEMCPY_IS_NICE
memcpy ((void *)dest, (const void *)src, (xboundary-x)*bpp);
memcpy ((void *)dest, (const void *)src, (xboundary-x)*bpp);
#else
for (tx = x; tx < xboundary; tx++)
{

View File

@ -7,17 +7,17 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_PIXEL_RGN_H__
#define __GIMP_PIXEL_RGN_H__

View File

@ -44,8 +44,8 @@
*
* This procedure returns information on the specified procedure. A
* short blurb, detailed help, author(s), copyright information,
* procedure type, number of input, and number of return values are
* returned. Additionally this function returns specific information
* procedure type, number of input, and number of return values are
* returned. Additionally this function returns specific information
* about each input argument and return value.
*
* Returns: TRUE on success.
@ -123,10 +123,10 @@ gimp_procedural_db_proc_info (const gchar *procedure,
* Returns data associated with the specified identifier.
*
* This procedure returns any data which may have been associated with
* the specified identifier. The data is copied into the given memory
* the specified identifier. The data is copied into the given memory
* location.
*
* Returns: TRUE on success, FALSE if no data has been associated with
* Returns: TRUE on success, FALSE if no data has been associated with
* the identifier
*/
gboolean
@ -145,7 +145,7 @@ gimp_procedural_db_get_data (const gchar *identifier,
memcpy (data, (gpointer) hack, size * sizeof (guint8));
g_free (hack);
}
return success;
}

View File

@ -4,7 +4,7 @@
* gimpmisc.c
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
@ -49,7 +49,7 @@ struct _GimpPixelFetcher
gboolean shadow;
};
struct _GimpRgnIterator
struct _GimpRgnIterator
{
GimpDrawable *drawable;
gint x1, y1, x2, y2;
@ -64,7 +64,7 @@ gimp_pixel_fetcher_new (GimpDrawable *drawable)
pf = g_new (GimpPixelFetcher, 1);
gimp_drawable_mask_bounds (drawable->drawable_id,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x1, &pf->sel_y1,
&pf->sel_x2, &pf->sel_y2);
pf->col = -1;
@ -112,7 +112,7 @@ gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf)
}
}
void
void
gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow)
{
@ -144,7 +144,7 @@ gimp_pixel_fetcher_provide_tile (GimpPixelFetcher *pf,
pf->col = col;
pf->row = row;
}
return pf->tile->data + pf->img_bpp * (pf->tile->ewidth * rowoff + coloff);
}
@ -231,7 +231,7 @@ gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
break;
case PIXEL_BLACK:
if (x < 0 || x >= pf->img_width ||
if (x < 0 || x >= pf->img_width ||
y < 0 || y >= pf->img_height)
{
i = pf->img_bpp;
@ -297,7 +297,7 @@ gimp_get_color_guchar (GimpDrawable *drawable,
}
}
void
void
gimp_get_bg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *bg)
@ -308,7 +308,7 @@ gimp_get_bg_guchar (GimpDrawable *drawable,
gimp_get_color_guchar (drawable, &background, transparent, bg);
}
void
void
gimp_get_fg_guchar (GimpDrawable *drawable,
gboolean transparent,
guchar *fg)
@ -323,10 +323,10 @@ GimpRgnIterator*
gimp_rgn_iterator_new (GimpDrawable *drawable, GimpRunMode run_mode)
{
GimpRgnIterator *iter = g_new (GimpRgnIterator, 1);
iter->drawable = drawable;
iter->run_mode = run_mode;
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
gimp_drawable_mask_bounds (drawable->drawable_id, &iter->x1, &iter->y1,
&iter->x2, &iter->y2);
return iter;
@ -339,7 +339,7 @@ gimp_rgn_iterator_free (GimpRgnIterator *iter)
}
static void
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
GimpRgnFuncSrc func, gpointer data)
{
gpointer pr;
@ -347,28 +347,28 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
total_area = (iter->x2 - iter->x1) * (iter->y2 - iter->y1);
area_so_far = 0;
for (pr = gimp_pixel_rgns_register (1, srcPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
{
guchar *src = srcPR->data;
gint y;
for (y = srcPR->y; y < srcPR->y + srcPR->h; y++)
{
guchar *s = src;
gint x;
for (x = srcPR->x; x < srcPR->x + srcPR->w; x++)
{
func (x, y, s, srcPR->bpp, data);
s += srcPR->bpp;
}
src += srcPR->rowstride;
}
if (iter->run_mode != GIMP_RUN_NONINTERACTIVE)
{
area_so_far += srcPR->w * srcPR->h;
@ -379,20 +379,20 @@ gimp_rgn_iterator_iter_single (GimpRgnIterator *iter, GimpPixelRgn *srcPR,
}
void
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data)
{
GimpPixelRgn srcPR;
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&srcPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, FALSE, FALSE);
gimp_rgn_iterator_iter_single (iter, &srcPR, func, data);
}
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void
gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data)
{
GimpPixelRgn srcPR, destPR;
@ -415,7 +415,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
TRUE, TRUE);
bpp = srcPR.bpp;
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))
@ -423,7 +423,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gint y;
guchar* src = srcPR.data;
guchar* dest = destPR.data;
for (y = srcPR.y; y < srcPR.y + srcPR.h; y++)
{
gint x;
@ -436,7 +436,7 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
s += bpp;
d += bpp;
}
src += srcPR.rowstride;
dest += destPR.rowstride;
}
@ -451,25 +451,25 @@ gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
gimp_drawable_update (iter->drawable->drawable_id, x1, y1, x2 - x1,
y2 - y1);
}
void
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data)
{
GimpPixelRgn destPR;
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
gimp_pixel_rgn_init (&destPR, iter->drawable, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1, TRUE, TRUE);
gimp_rgn_iterator_iter_single (iter, &destPR, (GimpRgnFuncSrc) func, data);
/* update the processed region */
gimp_drawable_flush (iter->drawable);
gimp_drawable_merge_shadow (iter->drawable->drawable_id, TRUE);
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
gimp_drawable_update (iter->drawable->drawable_id, iter->x1, iter->y1,
iter->x2 - iter->x1, iter->y2 - iter->y1);
}
@ -498,7 +498,7 @@ gimp_rgn_render_region (const GimpPixelRgn *srcPR,
gint row;
guchar* src = srcPR->data;
guchar* dest = destPR->data;
for (row = 0; row < srcPR->h; row++)
{
gimp_rgn_render_row (src, dest, srcPR->w, srcPR->bpp, func, data);
@ -563,7 +563,7 @@ gimp_rgn_iterate1 (GimpDrawable *drawable,
void
gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data)
{
@ -585,7 +585,7 @@ gimp_rgn_iterate2 (GimpDrawable *drawable,
FALSE, FALSE);
gimp_pixel_rgn_init (&destPR, drawable, x1, y1, (x2 - x1), (y2 - y1),
TRUE, TRUE);
for (pr = gimp_pixel_rgns_register (2, &srcPR, &destPR);
pr != NULL;
pr = gimp_pixel_rgns_process (pr))

View File

@ -4,17 +4,17 @@
* gimpmisc.h
* Contains all kinds of miscellaneous routines factored out from different
* plug-ins. They stay here until their API has crystalized a bit and we can
* put them into the file where they belong (Maurits Rijk
* put them into the file where they belong (Maurits Rijk
* <lpeek.mrijk@consunet.nl> if you want to blame someone for this mess)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -45,16 +45,16 @@ GimpPixelFetcher * gimp_pixel_fetcher_new (GimpDrawable *drawable);
void gimp_pixel_fetcher_set_bg_color (GimpPixelFetcher *pf);
void gimp_pixel_fetcher_set_shadow (GimpPixelFetcher *pf,
gboolean shadow);
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
guchar *pixel);
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_get_pixel2 (GimpPixelFetcher *pf,
gint x,
gint y,
gint wrapmode,
guchar *pixel);
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
void gimp_pixel_fetcher_put_pixel (GimpPixelFetcher *pf,
gint x,
gint y,
const guchar *pixel);
@ -93,28 +93,28 @@ typedef void (* GimpRgnFuncSrcDest) (gint x,
gint bpp,
gpointer data);
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRgnIterator *gimp_rgn_iterator_new (GimpDrawable *drawable,
GimpRunMode run_mode);
void gimp_rgn_iterator_free (GimpRgnIterator *iter);
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
void gimp_rgn_iterator_src (GimpRgnIterator *iter,
GimpRgnFuncSrc func,
gpointer data);
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
void gimp_rgn_iterator_dest (GimpRgnIterator *iter,
GimpRgnFuncDest func,
gpointer data);
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
void gimp_rgn_iterator_src_dest (GimpRgnIterator *iter,
GimpRgnFuncSrcDest func,
gpointer data);
void gimp_rgn_iterate1 (GimpDrawable *drawable,
void gimp_rgn_iterate1 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc1 func,
GimpRgnFunc1 func,
gpointer data);
void gimp_rgn_iterate2 (GimpDrawable *drawable,
GimpRunMode run_mode,
GimpRgnFunc2 func,
GimpRunMode run_mode,
GimpRgnFunc2 func,
gpointer data);
G_END_DECLS

View File

@ -47,7 +47,7 @@ gimp_selection_float (gint32 image_ID,
gint offx,
gint offy)
{
return _gimp_selection_float (drawable_ID,
offx,
return _gimp_selection_float (drawable_ID,
offx,
offy);
}

View File

@ -7,10 +7,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -7,10 +7,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,21 +1,21 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
*/
#ifndef __GIMP_UI_H__
#define __GIMP_UI_H__

View File

@ -7,10 +7,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,12 +1,12 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* libgimp-intl.h
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* stdplugins-intl.h
*
@ -7,7 +7,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

View File

@ -1,14 +1,14 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -183,7 +183,7 @@ gimp_datafiles_read_directories (const gchar *path_str,
}
#endif
else if ((flags & G_FILE_TEST_IS_EXECUTABLE) &&
(((filestat.st_mode & S_IXUSR) &&
(((filestat.st_mode & S_IXUSR) &&
!S_ISDIR (filestat.st_mode)) ||
(S_ISREG (filestat.st_mode) &&
is_script (filename))))

View File

@ -126,10 +126,10 @@ gimp_directory (void)
}
else
{
#ifdef __EMX__
#ifdef __EMX__
gimp_dir = g_strdup(__XOS2RedirRoot(GIMPDIR));
return gimp_dir;
#endif
return gimp_dir;
#endif
if (home_dir)
{
gimp_dir = g_build_filename (home_dir, GIMPDIR, NULL);
@ -196,26 +196,26 @@ gimp_toplevel_directory ()
static gchar *toplevel = NULL;
gchar filename[MAX_PATH];
gchar *sep1, *sep2;
if (toplevel != NULL)
return toplevel;
if (GetModuleFileName (NULL, filename, sizeof (filename)) == 0)
g_error ("GetModuleFilename failed\n");
/* If the executable file name is of the format
* <foobar>\bin\*.exe or
* <foobar>\lib\gimp\GIMP_MAJOR_VERSION.GIMP_MINOR_VERSION\plug-ins\*.exe,
* use <foobar>. Otherwise, use the directory where the
* executable is.
*/
sep1 = strrchr (filename, '\\');
*sep1 = '\0';
sep2 = strrchr (filename, '\\');
if (sep2 != NULL)
{
if (g_ascii_strcasecmp (sep2 + 1, "bin") == 0)
@ -225,10 +225,10 @@ gimp_toplevel_directory ()
else
{
gchar test[MAX_PATH];
sprintf (test, "\\lib\\gimp\\%d.%d\\plug-ins",
GIMP_MAJOR_VERSION, GIMP_MINOR_VERSION);
if (strlen (filename) > strlen (test) &&
g_ascii_strcasecmp (filename + strlen (filename) - strlen (test),
test) == 0)
@ -326,10 +326,10 @@ gimp_sysconf_directory (void)
/**
* gimp_plug_in_directory:
*
* Returns the top directory for GIMP plug_ins and modules. If the
* environment variable GIMP2_PLUGINDIR exists, that is used. It
* should be an absolute pathname. Otherwise, on Unix the compile-time
* defined directory is used. On Win32, the installation directory as
* Returns the top directory for GIMP plug_ins and modules. If the
* environment variable GIMP2_PLUGINDIR exists, that is used. It
* should be an absolute pathname. Otherwise, on Unix the compile-time
* defined directory is used. On Win32, the installation directory as
* deduced from the executable's name is used.
*
* The returned string is allocated just once, and should *NOT* be
@ -359,7 +359,7 @@ gimp_plug_in_directory (void)
* freed with g_free().
*
* Returns: The name of the GIMP's application-specific gtkrc file.
**/
**/
const gchar *
gimp_gtkrc (void)
{
@ -628,7 +628,7 @@ gimp_env_get_dir (const gchar *gimp_env_name,
if (env)
{
if (! g_path_is_absolute (env))
g_error ("%s environment variable should be an absolute path.",
g_error ("%s environment variable should be an absolute path.",
gimp_env_name);
#ifndef __EMX__
return g_strdup (env);

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpparasite.c
@ -39,7 +39,7 @@
#ifdef DEBUG
static void
static void
gimp_parasite_print (GimpParasite *parasite)
{
if (parasite == NULL)
@ -63,9 +63,9 @@ gimp_parasite_print (GimpParasite *parasite)
#endif
GimpParasite *
gimp_parasite_new (const gchar *name,
gimp_parasite_new (const gchar *name,
guint32 flags,
guint32 size,
guint32 size,
gconstpointer data)
{
GimpParasite *parasite;
@ -100,7 +100,7 @@ gimp_parasite_free (GimpParasite *parasite)
}
gboolean
gimp_parasite_is_type (const GimpParasite *parasite,
gimp_parasite_is_type (const GimpParasite *parasite,
const gchar *name)
{
if (!parasite || !parasite->name)
@ -120,7 +120,7 @@ gimp_parasite_copy (const GimpParasite *parasite)
}
gboolean
gimp_parasite_compare (const GimpParasite *a,
gimp_parasite_compare (const GimpParasite *a,
const GimpParasite *b)
{
if (a && b &&
@ -129,7 +129,7 @@ gimp_parasite_compare (const GimpParasite *a,
a->flags == b->flags &&
a->size == b->size)
{
if (a->data == NULL && b->data == NULL)
if (a->data == NULL && b->data == NULL)
return TRUE;
else if (a->data && b->data && memcmp (a->data, b->data, a->size) == 0)
return TRUE;
@ -166,7 +166,7 @@ gimp_parasite_is_undoable (const GimpParasite *parasite)
}
gboolean
gimp_parasite_has_flag (const GimpParasite *parasite,
gimp_parasite_has_flag (const GimpParasite *parasite,
gulong flag)
{
if (parasite == NULL)
@ -193,7 +193,7 @@ gimp_parasite_data (const GimpParasite *parasite)
return NULL;
}
glong
glong
gimp_parasite_data_size (const GimpParasite *parasite)
{
if (parasite)

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpparasite.h
@ -50,15 +50,15 @@ struct _GimpParasite
};
GimpParasite * gimp_parasite_new (const gchar *name,
GimpParasite * gimp_parasite_new (const gchar *name,
guint32 flags,
guint32 size,
guint32 size,
gconstpointer data);
void gimp_parasite_free (GimpParasite *parasite);
GimpParasite * gimp_parasite_copy (const GimpParasite *parasite);
gboolean gimp_parasite_compare (const GimpParasite *a,
gboolean gimp_parasite_compare (const GimpParasite *a,
const GimpParasite *b);
gboolean gimp_parasite_is_type (const GimpParasite *parasite,

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpparasiteio.c
@ -65,7 +65,7 @@ gimp_pixpipe_params_parse (gchar *string,
GimpPixPipeParams *params)
{
gchar *p, *q, *r; /* Don't you love single-char identifiers? */
gint i; /* No, we don't!! <Sven> */
gint i; /* No, we don't!! <Sven> */
q = string;
while ((p = strtok (q, " \r\n")) != NULL)

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpparasiteio.h

View File

@ -26,10 +26,10 @@
/* Courtesy of Austin Donnelly 06-04-2000 to address bug #2742 */
/**
* gimp_signal_private:
/**
* gimp_signal_private:
* @signum: Selects signal to be handled see man 5 signal (or man 7 signal)
* @handler: Handler that maps to signum. Invoked by O/S.
* @handler: Handler that maps to signum. Invoked by O/S.
* Handler gets signal that caused invocation. Corresponds
* to the @sa_handler field of the @sigaction struct.
* @flags: Preferences. OR'ed SA_&lt;xxx&gt;. See man sigaction. Corresponds
@ -38,9 +38,9 @@
* This function furnishes a workalike for signal(2) but
* which internally invokes sigaction(2) after certain
* sa_flags are set; these primarily to ensure restarting
* of interrupted system calls. See sigaction(2) It is a
* aid to transition and not new development: that effort
* should employ sigaction directly. [gosgood 18.04.2000]
* of interrupted system calls. See sigaction(2) It is a
* aid to transition and not new development: that effort
* should employ sigaction directly. [gosgood 18.04.2000]
*
* Cause @handler to be run when @signum is delivered. We
* use sigaction(2) rather than signal(2) so that we can control the

View File

@ -38,8 +38,8 @@ G_BEGIN_DECLS
#define SA_RESTART SA_SYSV
#endif
/* GimpSignalHandlerFunc is a reference to a (signal handler) function
* that takes a signal ID and returns void.
/* GimpSignalHandlerFunc is a reference to a (signal handler) function
* that takes a signal ID and returns void.
* signal(2) returns such references; so does gimp_signal_private.
*/
typedef void (* GimpSignalHandlerFunc) (gint signum);

View File

@ -185,7 +185,7 @@ gchar *
gimp_memsize_to_string (guint64 memsize)
{
#if defined _MSC_VER && (_MSC_VER < 1200)
/* sorry, error C2520: conversion from unsigned __int64 to double not
/* sorry, error C2520: conversion from unsigned __int64 to double not
* implemented, use signed __int64
*/
# define CAST_DOUBLE (gdouble)(gint64)

View File

@ -1,14 +1,14 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,14 +1,14 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,14 +1,14 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,14 +1,14 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpmath.h

View File

@ -1,4 +1,4 @@
/* LIBGIMP - The GIMP Library
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpmathtypes.h

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpbutton.c
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>
@ -8,7 +8,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@ -89,7 +89,7 @@ gimp_button_class_init (GimpButtonClass *klass)
parent_class = g_type_class_peek_parent (klass);
button_signals[EXTENDED_CLICKED] =
button_signals[EXTENDED_CLICKED] =
g_signal_new ("extended_clicked",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
@ -130,7 +130,7 @@ gimp_button_new (void)
* gimp_button_extended_clicked:
* @button: a #GimpButton.
* @state: a state as found in #GdkEventButton->state, e.g. #GDK_SHIFT_MASK.
*
*
* Emits the button's "extended_clicked" signal.
**/
void

View File

@ -8,7 +8,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

View File

@ -1,17 +1,17 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpchainbutton.h
* Copyright (C) 1999-2000 Sven Neumann <sven@gimp.org>
* Copyright (C) 1999-2000 Sven Neumann <sven@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -20,12 +20,12 @@
* Boston, MA 02111-1307, USA.
*/
/*
/*
* This implements a widget derived from GtkTable that visualizes
* it's state with two different pixmaps showing a closed and a
* it's state with two different pixmaps showing a closed and a
* broken chain. It's intented to be used with the GimpSizeEntry
* widget. The usage is quite similar to the one the GtkToggleButton
* provides.
* provides.
*/
#ifndef __GIMP_CHAIN_BUTTON_H__

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorarea.c
* Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org>
@ -8,10 +8,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -58,14 +58,14 @@ static void gimp_color_area_drag_begin (GtkWidget *widget,
GdkDragContext *context);
static void gimp_color_area_drag_end (GtkWidget *widget,
GdkDragContext *context);
static void gimp_color_area_drag_data_received (GtkWidget *widget,
static void gimp_color_area_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
guint time);
static void gimp_color_area_drag_data_get (GtkWidget *widget,
static void gimp_color_area_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,
@ -100,7 +100,7 @@ gimp_color_area_get_type (void)
};
area_type = g_type_register_static (GTK_TYPE_DRAWING_AREA,
"GimpColorArea",
"GimpColorArea",
&area_info, 0);
}
@ -118,7 +118,7 @@ gimp_color_area_class_init (GimpColorAreaClass *klass)
parent_class = g_type_class_peek_parent (klass);
gimp_color_area_signals[COLOR_CHANGED] =
gimp_color_area_signals[COLOR_CHANGED] =
g_signal_new ("color_changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST,
@ -161,7 +161,7 @@ gimp_color_area_destroy (GtkObject *object)
GimpColorArea *area;
g_return_if_fail (GIMP_IS_COLOR_AREA (object));
area = GIMP_COLOR_AREA (object);
if (area->buf)
@ -198,7 +198,7 @@ gimp_color_area_size_allocate (GtkWidget *widget,
area->buf = g_new (guchar, area->rowstride * area->height);
area->needs_render = TRUE;
}
}
}
static gboolean
@ -207,7 +207,7 @@ gimp_color_area_expose (GtkWidget *widget,
{
GimpColorArea *area = GIMP_COLOR_AREA (widget);
guchar *buf;
if (! area->buf || !GTK_WIDGET_DRAWABLE (widget))
return FALSE;
@ -243,12 +243,12 @@ gimp_color_area_expose (GtkWidget *widget,
* @color: A pointer to a #GimpRGB struct.
* @type: The type of color area to create.
* @drag_mask: The event_mask that should trigger drags.
*
*
* Creates a new #GimpColorArea widget.
*
* This returns a preview area showing the color. It handles color
* DND. If the color changes, the "color_changed" signal is emitted.
*
*
* Returns: Pointer to the new #GimpColorArea widget.
**/
GtkWidget *
@ -258,13 +258,13 @@ gimp_color_area_new (const GimpRGB *color,
{
GimpColorArea *area;
g_return_val_if_fail (color != NULL, NULL);
g_return_val_if_fail (color != NULL, NULL);
area = g_object_new (GIMP_TYPE_COLOR_AREA, NULL);
area->color = *color;
area->type = type;
gtk_drag_dest_set (GTK_WIDGET (area),
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
@ -287,10 +287,10 @@ gimp_color_area_new (const GimpRGB *color,
* gimp_color_area_set_color:
* @area: Pointer to a #GimpColorArea.
* @color: Pointer to a #GimpRGB struct that defines the new color.
*
*
* Sets @area to a different @color.
**/
void
void
gimp_color_area_set_color (GimpColorArea *area,
const GimpRGB *color)
{
@ -334,7 +334,7 @@ gimp_color_area_get_color (GimpColorArea *area,
*
* Returns: %TRUE if @area shows transparency information, %FALSE otherwise.
**/
gboolean
gboolean
gimp_color_area_has_alpha (GimpColorArea *area)
{
g_return_val_if_fail (GIMP_IS_COLOR_AREA (area), FALSE);
@ -345,7 +345,7 @@ gimp_color_area_has_alpha (GimpColorArea *area)
/**
* gimp_color_area_set_type:
* @area: Pointer to a #GimpColorArea.
* @type: A #GimpColorAreaType.
* @type: A #GimpColorAreaType.
*
* Allows to change the type of @area. The #GimpColorAreaType determines
* whether the widget shows transparency information and chooses the size of
@ -376,7 +376,7 @@ void
gimp_color_area_set_draw_border (GimpColorArea *area,
gboolean draw_border)
{
g_return_if_fail (GIMP_IS_COLOR_AREA (area));
g_return_if_fail (GIMP_IS_COLOR_AREA (area));
area->draw_border = draw_border ? TRUE : FALSE;
@ -433,27 +433,27 @@ gimp_color_area_render (GimpColorArea *area)
*p++ = opaque[2];
}
}
return;
}
light[0] = (GIMP_CHECK_LIGHT +
light[0] = (GIMP_CHECK_LIGHT +
(area->color.r - GIMP_CHECK_LIGHT) * area->color.a) * 255.999;
dark[0] = (GIMP_CHECK_DARK +
dark[0] = (GIMP_CHECK_DARK +
(area->color.r - GIMP_CHECK_DARK) * area->color.a) * 255.999;
light[1] = (GIMP_CHECK_LIGHT +
light[1] = (GIMP_CHECK_LIGHT +
(area->color.g - GIMP_CHECK_LIGHT) * area->color.a) * 255.999;
dark[1] = (GIMP_CHECK_DARK +
dark[1] = (GIMP_CHECK_DARK +
(area->color.g - GIMP_CHECK_DARK) * area->color.a) * 255.999;
light[2] = (GIMP_CHECK_LIGHT +
light[2] = (GIMP_CHECK_LIGHT +
(area->color.b - GIMP_CHECK_LIGHT) * area->color.a) * 255.999;
dark[2] = (GIMP_CHECK_DARK +
dark[2] = (GIMP_CHECK_DARK +
(area->color.b - GIMP_CHECK_DARK) * area->color.a) * 255.999;
for (y = 0; y < height; y++)
{
p = area->buf + y * area->rowstride;
for (x = 0; x < width; x++)
{
if ((width - x) * height > y * width)
@ -461,13 +461,13 @@ gimp_color_area_render (GimpColorArea *area)
*p++ = opaque[0];
*p++ = opaque[1];
*p++ = opaque[2];
continue;
}
frac = y - (gdouble) ((width - x) * height) / (gdouble) width;
if (((x / check_size) ^ (y / check_size)) & 1)
if (((x / check_size) ^ (y / check_size)) & 1)
{
if ((gint) frac)
{
@ -477,11 +477,11 @@ gimp_color_area_render (GimpColorArea *area)
}
else
{
*p++ = ((gdouble) light[0] * frac +
*p++ = ((gdouble) light[0] * frac +
(gdouble) opaque[0] * (1.0 - frac));
*p++ = ((gdouble) light[1] * frac +
*p++ = ((gdouble) light[1] * frac +
(gdouble) opaque[1] * (1.0 - frac));
*p++ = ((gdouble) light[2] * frac +
*p++ = ((gdouble) light[2] * frac +
(gdouble) opaque[2] * (1.0 - frac));
}
}
@ -495,11 +495,11 @@ gimp_color_area_render (GimpColorArea *area)
}
else
{
*p++ = ((gdouble) dark[0] * frac +
*p++ = ((gdouble) dark[0] * frac +
(gdouble) opaque[0] * (1.0 - frac));
*p++ = ((gdouble) dark[1] * frac +
*p++ = ((gdouble) dark[1] * frac +
(gdouble) opaque[1] * (1.0 - frac));
*p++ = ((gdouble) dark[2] * frac +
*p++ = ((gdouble) dark[2] * frac +
(gdouble) opaque[2] * (1.0 - frac));
}
}
@ -540,7 +540,7 @@ gimp_color_area_drag_begin (GtkWidget *widget,
window,
(GDestroyNotify) gtk_widget_destroy);
gtk_drag_set_icon_widget (context, window,
gtk_drag_set_icon_widget (context, window,
DRAG_ICON_OFFSET, DRAG_ICON_OFFSET);
}
@ -553,7 +553,7 @@ gimp_color_area_drag_end (GtkWidget *widget,
}
static void
gimp_color_area_drag_data_received (GtkWidget *widget,
gimp_color_area_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
@ -570,7 +570,7 @@ gimp_color_area_drag_data_received (GtkWidget *widget,
if (selection_data->length < 0)
return;
if ((selection_data->format != 16) ||
if ((selection_data->format != 16) ||
(selection_data->length != 8))
{
g_warning ("Received invalid color data");
@ -579,7 +579,7 @@ gimp_color_area_drag_data_received (GtkWidget *widget,
vals = (guint16 *)selection_data->data;
gimp_rgba_set (&color,
gimp_rgba_set (&color,
(gdouble) vals[0] / 0xffff,
(gdouble) vals[1] / 0xffff,
(gdouble) vals[2] / 0xffff,
@ -589,7 +589,7 @@ gimp_color_area_drag_data_received (GtkWidget *widget,
}
static void
gimp_color_area_drag_data_get (GtkWidget *widget,
gimp_color_area_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
guint info,

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorarea.h
* Copyright (C) 2001-2002 Sven Neumann <sven@gimp.org>
@ -8,10 +8,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolornotebook.h
* Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
@ -11,10 +11,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorscale.c
* Copyright (C) 2002 Sven Neumann <sven@gimp.org>
@ -9,10 +9,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
@ -209,7 +209,7 @@ gimp_color_scale_expose (GtkWidget *widget,
gint w, h;
scale = GIMP_COLOR_SCALE (widget);
if (! scale->buf || ! GTK_WIDGET_DRAWABLE (widget))
return FALSE;
@ -348,11 +348,11 @@ gimp_color_scale_expose (GtkWidget *widget,
break;
}
gdk_gc_set_clip_rectangle (widget->style->black_gc, NULL);
gdk_gc_set_clip_rectangle (widget->style->white_gc, &expose_area);
switch (range->orientation)
{
case GTK_ORIENTATION_HORIZONTAL:
case GTK_ORIENTATION_HORIZONTAL:
for (w = area.width, x = area.x, y = area.y + area.height - 1;
w > 0; w -= 2, x++, y--)
gdk_draw_line (widget->window, widget->style->white_gc,
@ -375,9 +375,9 @@ gimp_color_scale_expose (GtkWidget *widget,
* gimp_color_scale_new:
* @orientation: the scale's orientation (horizontal or vertical)
* @channel: the scale's color channel
*
*
* Creates a new #GimpColorScale widget.
*
*
* Return value: a new #GimpColorScale widget
**/
GtkWidget *
@ -394,7 +394,7 @@ gimp_color_scale_new (GtkOrientation orientation,
range = GTK_RANGE (scale);
range->orientation = orientation;
range->flippable = (orientation == GTK_ORIENTATION_HORIZONTAL);
return GTK_WIDGET (scale);
}
@ -402,7 +402,7 @@ gimp_color_scale_new (GtkOrientation orientation,
* gimp_color_scale_set_channel:
* @scale: a #GimpColorScale widget
* @channel: the new color channel
*
*
* Changes the color channel displayed by the @scale.
**/
void
@ -425,7 +425,7 @@ gimp_color_scale_set_channel (GimpColorScale *scale,
* @scale: a #GimpColorScale widget
* @rgb: the new color as #GimpRGB
* @hsv: the new color as #GimpHSV
*
*
* Changes the color value of the @scale.
**/
void
@ -447,7 +447,7 @@ gimp_color_scale_set_color (GimpColorScale *scale,
/* as in gtkrange.c */
static gboolean
should_invert (GtkRange *range)
{
{
if (range->orientation == GTK_ORIENTATION_HORIZONTAL)
return
(range->inverted && !range->flippable) ||
@ -546,7 +546,7 @@ gimp_color_scale_render (GimpColorScale *scale)
value = 1.0 - value;
*channel_value = value;
if (to_rgb)
gimp_hsv_to_rgb (&hsv, &rgb);
@ -593,23 +593,23 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
/* this won't work correctly for very thin scales */
dark = (scale->height > GIMP_CHECK_SIZE_SM ?
buf + GIMP_CHECK_SIZE_SM * scale->rowstride : light);
for (x = 0, d = light, l = dark; x < scale->width; x++)
{
if ((x % GIMP_CHECK_SIZE_SM) == 0)
{
guchar *t;
t = d;
d = l;
l = t;
}
a = (gdouble) x / (gdouble) (scale->width - 1);
if (invert)
a = 1.0 - a;
l[0] = (GIMP_CHECK_LIGHT +
(rgb.r - GIMP_CHECK_LIGHT) * a) * 255.999;
l[1] = (GIMP_CHECK_LIGHT +
@ -617,7 +617,7 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
l[2] = (GIMP_CHECK_LIGHT +
(rgb.b - GIMP_CHECK_LIGHT) * a) * 255.999;
l += 3;
d[0] = (GIMP_CHECK_DARK +
(rgb.r - GIMP_CHECK_DARK) * a) * 255.999;
d[1] = (GIMP_CHECK_DARK +
@ -631,7 +631,7 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
{
if (y == 0 || y == GIMP_CHECK_SIZE_SM)
continue;
if ((y / GIMP_CHECK_SIZE_SM) & 1)
memcpy (d, dark, scale->rowstride);
else
@ -639,7 +639,7 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
}
}
break;
case GTK_ORIENTATION_VERTICAL:
{
guchar light[3];
@ -648,7 +648,7 @@ gimp_color_scale_render_alpha (GimpColorScale *scale)
for (y = 0, d = buf; y < scale->height; y++, d += scale->rowstride)
{
a = (gdouble) y / (gdouble) (scale->height - 1);
if (invert)
a = 1.0 - a;

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorscale.h
* Copyright (C) 2002 Sven Neumann <sven@gimp.org>
@ -9,10 +9,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorscales.h
* Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
@ -11,10 +11,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpcolorselect.h
* Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
@ -11,10 +11,10 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public

View File

@ -2,13 +2,13 @@
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimpoffsetarea.h
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
* Copyright (C) 2001 Sven Neumann <sven@gimp.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@ -49,15 +49,15 @@ struct _GimpOffsetArea
gint offset_x;
gint offset_y;
gdouble display_ratio_x;
gdouble display_ratio_y;
gdouble display_ratio_y;
};
struct _GimpOffsetAreaClass
{
GtkDrawingAreaClass parent_class;
void (* offsets_changed) (GimpOffsetArea *offset_area,
gint offset_x,
void (* offsets_changed) (GimpOffsetArea *offset_area,
gint offset_x,
gint offset_y);
};

View File

@ -1,5 +1,5 @@
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* gimppixmap.c
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>
@ -8,7 +8,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

View File

@ -8,7 +8,7 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU