Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
811d3054
Commit
811d3054
authored
Aug 22, 2000
by
Sven Neumann
Committed by
Sven Neumann
Aug 22, 2000
Browse files
removed COMPAT_CRUFT.
2000-08-22 Sven Neumann <sven@gimp.org> * plug-ins/common/*.c: removed COMPAT_CRUFT.
parent
f219503a
Changes
139
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
811d3054
2000-08-22 Sven Neumann <sven@gimp.org>
* plug-ins/common/*.c: removed COMPAT_CRUFT.
Tue Aug 22 02:12:36 CEST 2000 Daniel Egger <egger@suse.de>
* plug-ins/AlienMap/AlienMap.c:
...
...
plug-ins/common/CEL.c
View file @
811d3054
...
...
@@ -41,9 +41,9 @@
static
void
query
(
void
);
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
);
G
imp
Param
**
return_vals
);
static
gint
load_palette
(
FILE
*
fp
,
guchar
palette
[]);
...
...
@@ -57,7 +57,7 @@ static void palette_dialog (gchar *title);
/* Globals... */
GPlugInInfo
PLUG_IN_INFO
=
G
imp
PlugInInfo
PLUG_IN_INFO
=
{
NULL
,
/* init_proc */
NULL
,
/* quit_proc */
...
...
@@ -77,29 +77,29 @@ MAIN ()
static
void
query
(
void
)
{
static
GParamDef
load_args
[]
=
static
G
imp
ParamDef
load_args
[]
=
{
{
PARAM
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
PARAM
_STRING
,
"filename"
,
"Filename to load image from"
},
{
PARAM
_STRING
,
"raw_filename"
,
"Name entered"
},
{
PARAM
_STRING
,
"palette_filename"
,
"Filename to load palette from"
}
{
GIMP_PDB
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
GIMP_PDB
_STRING
,
"filename"
,
"Filename to load image from"
},
{
GIMP_PDB
_STRING
,
"raw_filename"
,
"Name entered"
},
{
GIMP_PDB
_STRING
,
"palette_filename"
,
"Filename to load palette from"
}
};
static
GParamDef
load_return_vals
[]
=
static
G
imp
ParamDef
load_return_vals
[]
=
{
{
PARAM
_IMAGE
,
"image"
,
"Output image"
}
{
GIMP_PDB
_IMAGE
,
"image"
,
"Output image"
}
};
static
gint
nload_args
=
sizeof
(
load_args
)
/
sizeof
(
load_args
[
0
]);
static
gint
nload_return_vals
=
(
sizeof
(
load_return_vals
)
/
sizeof
(
load_return_vals
[
0
]));
static
GParamDef
save_args
[]
=
static
G
imp
ParamDef
save_args
[]
=
{
{
PARAM
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
PARAM
_IMAGE
,
"image"
,
"Input image"
},
{
PARAM
_DRAWABLE
,
"drawable"
,
"Drawable to save"
},
{
PARAM
_STRING
,
"filename"
,
"Filename to save image to"
},
{
PARAM
_STRING
,
"raw_filename"
,
"Name entered"
},
{
PARAM
_STRING
,
"palette_filename"
,
"Filename to save palette to"
},
{
GIMP_PDB
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
GIMP_PDB
_IMAGE
,
"image"
,
"Input image"
},
{
GIMP_PDB
_DRAWABLE
,
"drawable"
,
"Drawable to save"
},
{
GIMP_PDB
_STRING
,
"filename"
,
"Filename to save image to"
},
{
GIMP_PDB
_STRING
,
"raw_filename"
,
"Name entered"
},
{
GIMP_PDB
_STRING
,
"palette_filename"
,
"Filename to save palette to"
},
};
static
gint
nsave_args
=
sizeof
(
save_args
)
/
sizeof
(
save_args
[
0
]);
...
...
@@ -111,7 +111,7 @@ query (void)
"May 1998"
,
"<Load>/CEL"
,
NULL
,
PROC
_PLUG
_
IN
,
GIMP
_PLUGIN
,
nload_args
,
nload_return_vals
,
load_args
,
load_return_vals
);
...
...
@@ -123,7 +123,7 @@ query (void)
"May 1998"
,
"<Save>/CEL"
,
"INDEXEDA"
,
PROC
_PLUG
_
IN
,
GIMP
_PLUGIN
,
nsave_args
,
0
,
save_args
,
NULL
);
...
...
@@ -139,13 +139,13 @@ query (void)
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
)
G
imp
Param
**
return_vals
)
{
static
GParam
values
[
2
];
/* Return values */
GRunModeType
run_mode
;
GStatusType
status
=
STATUS
_SUCCESS
;
static
G
imp
Param
values
[
2
];
/* Return values */
G
imp
RunModeType
run_mode
;
G
impPDB
StatusType
status
=
GIMP_PDB
_SUCCESS
;
gint32
image
;
run_mode
=
param
[
0
].
data
.
d_int32
;
...
...
@@ -154,10 +154,10 @@ run (gchar *name,
*
nreturn_vals
=
1
;
*
return_vals
=
values
;
values
[
0
].
type
=
PARAM
_STATUS
;
values
[
0
].
data
.
d_status
=
STATUS
_EXECUTION_ERROR
;
values
[
0
].
type
=
GIMP_PDB
_STATUS
;
values
[
0
].
data
.
d_status
=
GIMP_PDB
_EXECUTION_ERROR
;
if
(
run_mode
==
RUN_INTERACTIVE
)
if
(
run_mode
==
GIMP_
RUN_INTERACTIVE
)
{
INIT_I18N_UI
();
}
...
...
@@ -168,7 +168,7 @@ run (gchar *name,
if
(
strcmp
(
name
,
"file_cel_load"
)
==
0
)
{
if
(
run_mode
!=
RUN_NONINTERACTIVE
)
if
(
run_mode
!=
GIMP_
RUN_NONINTERACTIVE
)
{
gimp_get_data
(
"file_cel_save:length"
,
&
data_length
);
if
(
data_length
>
0
)
...
...
@@ -183,12 +183,12 @@ run (gchar *name,
}
}
if
(
run_mode
==
RUN_NONINTERACTIVE
)
if
(
run_mode
==
GIMP_
RUN_NONINTERACTIVE
)
{
palette_file
=
param
[
3
].
data
.
d_string
;
data_length
=
strlen
(
palette_file
)
+
1
;
}
else
if
(
run_mode
==
RUN_INTERACTIVE
)
else
if
(
run_mode
==
GIMP_
RUN_INTERACTIVE
)
{
/* Let user choose KCF palette (cancel ignores) */
palette_dialog
(
_
(
"Load KISS Palette"
));
...
...
@@ -201,12 +201,12 @@ run (gchar *name,
if
(
image
!=
-
1
)
{
*
nreturn_vals
=
2
;
values
[
1
].
type
=
PARAM
_IMAGE
;
values
[
1
].
type
=
GIMP_PDB
_IMAGE
;
values
[
1
].
data
.
d_image
=
image
;
}
else
{
status
=
STATUS
_EXECUTION_ERROR
;
status
=
GIMP_PDB
_EXECUTION_ERROR
;
}
}
else
if
(
strcmp
(
name
,
"file_cel_save"
)
==
0
)
...
...
@@ -214,7 +214,7 @@ run (gchar *name,
if
(
!
save_image
(
param
[
3
].
data
.
d_string
,
param
[
4
].
data
.
d_string
,
param
[
1
].
data
.
d_int32
,
param
[
2
].
data
.
d_int32
))
{
status
=
STATUS
_EXECUTION_ERROR
;
status
=
GIMP_PDB
_EXECUTION_ERROR
;
}
else
{
...
...
@@ -224,7 +224,7 @@ run (gchar *name,
}
else
{
status
=
STATUS
_CALLING_ERROR
;
status
=
GIMP_PDB
_CALLING_ERROR
;
}
values
[
0
].
data
.
d_status
=
status
;
...
...
@@ -248,8 +248,8 @@ load_image (gchar *file,
guchar
*
palette
,
/* 24 bit palette */
*
buffer
,
/* Temporary buffer */
*
line
;
/* Pixel data */
GDrawable
*
drawable
;
/* Drawable for layer */
GPixelRgn
pixel_rgn
;
/* Pixel region for layer */
G
imp
Drawable
*
drawable
;
/* Drawable for layer */
G
imp
PixelRgn
pixel_rgn
;
/* Pixel region for layer */
gint
i
,
j
,
k
;
/* Counters */
...
...
@@ -289,7 +289,7 @@ load_image (gchar *file,
offy
=
header
[
10
]
+
(
256
*
header
[
11
]);
}
image
=
gimp_image_new
(
width
+
offx
,
height
+
offy
,
INDEXED
);
image
=
gimp_image_new
(
width
+
offx
,
height
+
offy
,
GIMP_
INDEXED
);
if
(
image
==
-
1
)
{
...
...
@@ -302,7 +302,7 @@ load_image (gchar *file,
/* Create an indexed-alpha layer to hold the image... */
layer
=
gimp_layer_new
(
image
,
_
(
"Background"
),
width
,
height
,
INDEXEDA_IMAGE
,
100
,
NORMAL_MODE
);
GIMP_
INDEXEDA_IMAGE
,
100
,
GIMP_
NORMAL_MODE
);
gimp_image_add_layer
(
image
,
layer
,
0
);
gimp_layer_set_offsets
(
layer
,
offx
,
offy
);
...
...
@@ -480,14 +480,14 @@ save_image (gchar *file,
guchar
*
buffer
,
/* Temporary buffer */
*
line
;
/* Pixel data */
GDrawable
*
drawable
;
/* Drawable for layer */
GPixelRgn
pixel_rgn
;
/* Pixel region for layer */
G
imp
Drawable
*
drawable
;
/* Drawable for layer */
G
imp
PixelRgn
pixel_rgn
;
/* Pixel region for layer */
int
i
,
j
,
k
;
/* Counters */
/* Check that this is an indexed image, fail otherwise */
type
=
gimp_drawable_type
(
layer
);
if
(
type
!=
INDEXEDA_IMAGE
)
if
(
type
!=
GIMP_
INDEXEDA_IMAGE
)
{
g_message
(
_
(
"Only an indexed-alpha image can be saved in CEL format"
));
return
FALSE
;
...
...
plug-ins/common/CML_explorer.c
View file @
811d3054
...
...
@@ -304,11 +304,11 @@ static gchar *channel_names[] =
static
void
query
(
void
);
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
);
G
imp
Param
**
return_vals
);
static
GStatusType
CML_main_function
(
gint
preview_p
);
static
G
impPDB
StatusType
CML_main_function
(
gint
preview_p
);
static
void
CML_compute_next_step
(
gint
size
,
gdouble
**
h
,
gdouble
**
s
,
...
...
@@ -391,7 +391,7 @@ static gdouble parse_line_to_gdouble (FILE *file,
gint
*
flag
);
GPlugInInfo
PLUG_IN_INFO
=
G
imp
PlugInInfo
PLUG_IN_INFO
=
{
NULL
,
/* init_proc */
NULL
,
/* quit_proc */
...
...
@@ -449,12 +449,12 @@ MAIN ()
static
void
query
(
void
)
{
static
GParamDef
args
[]
=
static
G
imp
ParamDef
args
[]
=
{
{
PARAM
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
PARAM
_IMAGE
,
"image"
,
"Input image (not used)"
},
{
PARAM
_DRAWABLE
,
"drawable"
,
"Input drawable"
},
{
PARAM
_STRING
,
"parameter_file_name"
,
"The name of parameter file. CML_explorer makes an image with its settings."
}
{
GIMP_PDB
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
GIMP_PDB
_IMAGE
,
"image"
,
"Input image (not used)"
},
{
GIMP_PDB
_DRAWABLE
,
"drawable"
,
"Input drawable"
},
{
GIMP_PDB
_STRING
,
"parameter_file_name"
,
"The name of parameter file. CML_explorer makes an image with its settings."
}
};
static
gint
nargs
=
sizeof
(
args
)
/
sizeof
(
args
[
0
]);
...
...
@@ -462,7 +462,7 @@ query (void)
"Make an image of Coupled-Map Lattice"
,
"Make an image of Coupled-Map Lattice (CML). CML is "
"a kind of Cellula Automata on continuous (value) "
"domain. In RUN_NONINTERACTIVE, the name of a "
"domain. In
GIMP_
RUN_NONINTERACTIVE, the name of a "
"prameter file is passed as the 4th arg. You can "
"control CML_explorer via parameter file."
,
/* Or do you want to call me with over 50 args? */
...
...
@@ -472,7 +472,7 @@ query (void)
"1997"
,
N_
(
"<Image>/Filters/Render/Pattern/CML Explorer..."
),
"RGB*, GRAY*"
,
PROC
_PLUG
_
IN
,
GIMP
_PLUGIN
,
nargs
,
0
,
args
,
NULL
);
}
...
...
@@ -480,13 +480,13 @@ query (void)
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
)
G
imp
Param
**
return_vals
)
{
static
GParam
values
[
1
];
GStatusType
status
=
STATUS
_EXECUTION_ERROR
;
GRunModeType
run_mode
;
static
G
imp
Param
values
[
1
];
G
impPDB
StatusType
status
=
GIMP_PDB
_EXECUTION_ERROR
;
G
imp
RunModeType
run_mode
;
run_mode
=
param
[
0
].
data
.
d_int32
;
drawable_id
=
param
[
2
].
data
.
d_drawable
;
...
...
@@ -494,18 +494,18 @@ run (gchar *name,
*
nreturn_vals
=
1
;
*
return_vals
=
values
;
values
[
0
].
type
=
PARAM
_STATUS
;
values
[
0
].
type
=
GIMP_PDB
_STATUS
;
values
[
0
].
data
.
d_status
=
status
;
switch
(
run_mode
)
{
case
RUN_INTERACTIVE
:
case
GIMP_
RUN_INTERACTIVE
:
INIT_I18N_UI
();
gimp_get_data
(
PLUG_IN_NAME
,
&
VALS
);
if
(
!
CML_explorer_dialog
())
return
;
break
;
case
RUN_NONINTERACTIVE
:
case
GIMP_
RUN_NONINTERACTIVE
:
{
gchar
*
filename
=
param
[
3
].
data
.
d_string
;
...
...
@@ -513,7 +513,7 @@ run (gchar *name,
return
;
break
;
}
case
RUN_WITH_LAST_VALS
:
case
GIMP_
RUN_WITH_LAST_VALS
:
gimp_get_data
(
PLUG_IN_NAME
,
&
VALS
);
break
;
}
...
...
@@ -521,9 +521,9 @@ run (gchar *name,
gimp_tile_cache_ntiles
(
TILE_CACHE_SIZE
);
status
=
CML_main_function
(
FALSE
);
if
(
run_mode
!=
RUN_NONINTERACTIVE
)
if
(
run_mode
!=
GIMP_
RUN_NONINTERACTIVE
)
gimp_displays_flush
();
if
(
run_mode
==
RUN_INTERACTIVE
&&
status
==
STATUS
_SUCCESS
)
if
(
run_mode
==
GIMP_
RUN_INTERACTIVE
&&
status
==
GIMP_PDB
_SUCCESS
)
gimp_set_data
(
PLUG_IN_NAME
,
&
VALS
,
sizeof
(
ValueType
));
if
(
mem_chank0
)
...
...
@@ -533,15 +533,15 @@ run (gchar *name,
if
(
mem_chank2
)
g_free
(
mem_chank2
);
values
[
0
].
type
=
PARAM
_STATUS
;
values
[
0
].
type
=
GIMP_PDB
_STATUS
;
values
[
0
].
data
.
d_status
=
status
;
}
static
GStatusType
static
G
impPDB
StatusType
CML_main_function
(
gint
preview_p
)
{
GDrawable
*
drawable
=
NULL
;
GPixelRgn
dest_rgn
,
src_rgn
;
G
imp
Drawable
*
drawable
=
NULL
;
G
imp
PixelRgn
dest_rgn
,
src_rgn
;
guchar
*
dest_buffer
=
NULL
;
guchar
*
src_buffer
=
NULL
;
gint
x1
,
x2
,
y1
,
y2
;
...
...
@@ -864,7 +864,7 @@ CML_main_function (gint preview_p)
gimp_drawable_detach
(
drawable
);
}
return
STATUS
_SUCCESS
;
return
GIMP_PDB
_SUCCESS
;
}
static
void
...
...
plug-ins/common/aa.c
View file @
811d3054
...
...
@@ -29,9 +29,9 @@
static
void
query
(
void
);
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
);
G
imp
Param
**
return_vals
);
static
gboolean
aa_savable
(
gint32
drawable_ID
);
static
gboolean
save_aa
(
gint
output_type
,
gchar
*
filename
,
...
...
@@ -51,7 +51,7 @@ static void type_dialog_cancel_callback (GtkWidget *widget,
* Some global variables.
*/
GPlugInInfo
PLUG_IN_INFO
=
G
imp
PlugInInfo
PLUG_IN_INFO
=
{
NULL
,
/* init_proc */
NULL
,
/* quit_proc */
...
...
@@ -70,14 +70,14 @@ MAIN ()
static
void
query
(
void
)
{
static
GParamDef
save_args
[]
=
static
G
imp
ParamDef
save_args
[]
=
{
{
PARAM
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
PARAM
_IMAGE
,
"image"
,
"Input image"
},
{
PARAM
_DRAWABLE
,
"drawable"
,
"Drawable to save"
},
{
PARAM
_STRING
,
"filename"
,
"The name of the file to save the image in"
},
{
PARAM
_STRING
,
"raw_filename"
,
"The name entered"
},
{
PARAM
_STRING
,
"file_type"
,
"File type to use"
}
{
GIMP_PDB
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
GIMP_PDB
_IMAGE
,
"image"
,
"Input image"
},
{
GIMP_PDB
_DRAWABLE
,
"drawable"
,
"Drawable to save"
},
{
GIMP_PDB
_STRING
,
"filename"
,
"The name of the file to save the image in"
},
{
GIMP_PDB
_STRING
,
"raw_filename"
,
"The name entered"
},
{
GIMP_PDB
_STRING
,
"file_type"
,
"File type to use"
}
};
static
gint
nsave_args
=
sizeof
(
save_args
)
/
sizeof
(
save_args
[
0
]);
...
...
@@ -89,7 +89,7 @@ query (void)
"1997"
,
"<Save>/AA"
,
"GRAY*"
,
/* support grayscales */
PROC
_PLUG
_
IN
,
GIMP
_PLUGIN
,
nsave_args
,
0
,
save_args
,
NULL
);
...
...
@@ -124,13 +124,13 @@ get_type_from_string (gchar *string)
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
)
G
imp
Param
**
return_vals
)
{
static
GParam
values
[
2
];
GRunModeType
run_mode
;
GStatusType
status
=
STATUS
_SUCCESS
;
static
G
imp
Param
values
[
2
];
G
imp
RunModeType
run_mode
;
G
impPDB
StatusType
status
=
GIMP_PDB
_SUCCESS
;
gint
output_type
=
0
;
static
int
last_type
=
0
;
gint32
image_ID
;
...
...
@@ -140,8 +140,8 @@ run (gchar *name,
/* Set us up to return a status. */
*
nreturn_vals
=
1
;
*
return_vals
=
values
;
values
[
0
].
type
=
PARAM
_STATUS
;
values
[
0
].
data
.
d_status
=
STATUS
_EXECUTION_ERROR
;
values
[
0
].
type
=
GIMP_PDB
_STATUS
;
values
[
0
].
data
.
d_status
=
GIMP_PDB
_EXECUTION_ERROR
;
run_mode
=
param
[
0
].
data
.
d_int32
;
image_ID
=
param
[
1
].
data
.
d_int32
;
...
...
@@ -150,8 +150,8 @@ run (gchar *name,
/* eventually export the image */
switch
(
run_mode
)
{
case
RUN_INTERACTIVE
:
case
RUN_WITH_LAST_VALS
:
case
GIMP_
RUN_INTERACTIVE
:
case
GIMP_
RUN_WITH_LAST_VALS
:
INIT_I18N_UI
();
gimp_ui_init
(
"aa"
,
FALSE
);
export
=
gimp_export_image
(
&
image_ID
,
&
drawable_ID
,
"AA"
,
...
...
@@ -159,7 +159,7 @@ run (gchar *name,
CAN_HANDLE_ALPHA
));
if
(
export
==
EXPORT_CANCEL
)
{
values
[
0
].
data
.
d_status
=
STATUS
_CANCEL
;
values
[
0
].
data
.
d_status
=
GIMP_PDB
_CANCEL
;
return
;
}
break
;
...
...
@@ -170,35 +170,35 @@ run (gchar *name,
if
(
!
aa_savable
(
drawable_ID
))
{
status
=
STATUS
_CALLING_ERROR
;
status
=
GIMP_PDB
_CALLING_ERROR
;
}
if
(
status
==
STATUS
_SUCCESS
)
if
(
status
==
GIMP_PDB
_SUCCESS
)
{
switch
(
run_mode
)
{
case
RUN_INTERACTIVE
:
case
GIMP_
RUN_INTERACTIVE
:
gimp_get_data
(
"file_aa_save"
,
&
last_type
);
output_type
=
type_dialog
(
last_type
);
if
(
output_type
<
0
)
status
=
STATUS
_CANCEL
;
status
=
GIMP_PDB
_CANCEL
;
break
;
case
RUN_NONINTERACTIVE
:
case
GIMP_
RUN_NONINTERACTIVE
:
/* Make sure all the arguments are there! */
if
(
nparams
!=
6
)
{
status
=
STATUS
_CALLING_ERROR
;
status
=
GIMP_PDB
_CALLING_ERROR
;
}
else
{
output_type
=
get_type_from_string
(
param
[
5
].
data
.
d_string
);
if
(
output_type
<
0
)
status
=
STATUS
_CALLING_ERROR
;
status
=
GIMP_PDB
_CALLING_ERROR
;
}
break
;
case
RUN_WITH_LAST_VALS
:
case
GIMP_
RUN_WITH_LAST_VALS
:
gimp_get_data
(
"file_aa_save"
,
&
last_type
);
output_type
=
last_type
;
break
;
...
...
@@ -208,11 +208,11 @@ run (gchar *name,
}
}
if
(
status
==
STATUS
_SUCCESS
)
if
(
status
==
GIMP_PDB
_SUCCESS
)
{
if
(
save_aa
(
output_type
,
param
[
3
].
data
.
d_string
,
image_ID
,
drawable_ID
))
{
status
=
STATUS
_EXECUTION_ERROR
;
status
=
GIMP_PDB
_EXECUTION_ERROR
;
}
else
{
...
...
@@ -239,7 +239,7 @@ save_aa (gint output_type,
{
aa_savedata
savedata
=
{
NULL
,
NULL
};
aa_context
*
context
=
NULL
;
GDrawable
*
drawable
=
NULL
;
G
imp
Drawable
*
drawable
=
NULL
;
aa_format
format
;
/*fprintf(stderr, "save %s\n", filename); */
...
...
@@ -275,8 +275,8 @@ gimp2aa (gint32 image,
{
gint
width
,
height
,
x
,
y
;
guchar
*
buffer
;
GDrawable
*
drawable
=
NULL
;
GPixelRgn
pixel_rgn
;
G
imp
Drawable
*
drawable
=
NULL
;
G
imp
PixelRgn
pixel_rgn
;
aa_renderparams
*
renderparams
=
NULL
;
gint
bpp
;
...
...
@@ -312,11 +312,11 @@ gimp2aa (gint32 image,
static
gboolean
aa_savable
(
gint32
drawable_ID
)
{
G
Drawabl
eType
drawable_type
;
G
impImag
eType
drawable_type
;
drawable_type
=
gimp_drawable_type
(
drawable_ID
);
if
(
drawable_type
!=
GRAY_IMAGE
&&
drawable_type
!=
GRAYA_IMAGE
)
if
(
drawable_type
!=
GIMP_
GRAY_IMAGE
&&
drawable_type
!=
GIMP_
GRAYA_IMAGE
)
return
FALSE
;
return
TRUE
;
...
...
plug-ins/common/align_layers.c
View file @
811d3054
...
...
@@ -72,11 +72,11 @@ enum
static
void
query
(
void
);
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
);
G
imp
Param
**
return_vals
);
static
GStatusType
align_layers
(
gint32
image_id
);
static
G
impPDB
StatusType
align_layers
(
gint32
image_id
);
static
void
align_layers_get_align_offsets
(
gint32
drawable_id
,
gint
*
x
,
gint
*
y
);
...
...
@@ -85,7 +85,7 @@ static gint align_layers_dialog (void);
static
void
align_layers_ok_callback
(
GtkWidget
*
widget
,
gpointer
data
);
GPlugInInfo
PLUG_IN_INFO
=
G
imp
PlugInInfo
PLUG_IN_INFO
=
{
NULL
,
/* init_proc */
NULL
,
/* quit_proc */
...
...
@@ -133,13 +133,13 @@ MAIN ()
static
void
query
(
void
)
{
static
GParamDef
args
[]
=
static
G
imp
ParamDef
args
[]
=
{
{
PARAM
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
PARAM
_IMAGE
,
"image"
,
"Input image"
},
{
PARAM
_DRAWABLE
,
"drawable"
,
"Input drawable (not used)"
},
{
PARAM
_INT32
,
"link-afteer-alignment"
,
"Link the visible layers after alignment"
},
{
PARAM
_INT32
,
"use-bottom"
,
"use the bottom layer as the base of alignment"
}
{
GIMP_PDB
_INT32
,
"run_mode"
,
"Interactive, non-interactive"
},
{
GIMP_PDB
_IMAGE
,
"image"
,
"Input image"
},
{
GIMP_PDB
_DRAWABLE
,
"drawable"
,
"Input drawable (not used)"
},
{
GIMP_PDB
_INT32
,
"link-afteer-alignment"
,
"Link the visible layers after alignment"
},
{
GIMP_PDB
_INT32
,
"use-bottom"
,
"use the bottom layer as the base of alignment"
}
};
static
gint
nargs
=
sizeof
(
args
)
/
sizeof
(
args
[
0
]);
...
...
@@ -151,7 +151,7 @@ query (void)
"1997"
,
N_
(
"<Image>/Layers/Align Visible Layers..."
),
"RGB*,GRAY*"
,
PROC
_PLUG
_
IN
,
GIMP
_PLUGIN
,
nargs
,
0
,
args
,
NULL
);
}
...
...
@@ -159,13 +159,13 @@ query (void)
static
void
run
(
gchar
*
name
,
gint
nparams
,
GParam
*
param
,
G
imp
Param
*
param
,
gint
*
nreturn_vals
,
GParam
**
return_vals
)
G
imp
Param
**
return_vals
)
{
static
GParam
values
[
1
];
GStatusType
status
=
STATUS
_EXECUTION_ERROR
;
GRunModeType
run_mode
;
static
G
imp
Param
values
[
1
];
G
impPDB
StatusType
status
=
GIMP_PDB
_EXECUTION_ERROR
;
G
imp
RunModeType
run_mode
;
gint
image_id
,
layer_num
;
run_mode
=
param
[
0
].
data
.
d_int32
;
...
...
@@ -174,12 +174,12 @@ run (gchar *name,
*
nreturn_vals
=
1
;
*
return_vals
=
values
;