sane-project-website/old-archive/2000-10/0100.html

239 wiersze
7.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Sane with latest Gimp</TITLE>
<META NAME="Author" CONTENT="Jeremy L Rosenberger (jlr4@cornell.edu)">
<META NAME="Subject" CONTENT="Re: Sane with latest Gimp">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Sane with latest Gimp</H1>
<!-- received="Tue Oct 10 19:06:27 2000" -->
<!-- isoreceived="20001011020627" -->
<!-- sent="Tue, 10 Oct 2000 20:12:07 -0600" -->
<!-- isosent="20001011021207" -->
<!-- name="Jeremy L Rosenberger" -->
<!-- email="jlr4@cornell.edu" -->
<!-- subject="Re: Sane with latest Gimp" -->
<!-- id="39E3CC77.310C0368@cornell.edu" -->
<!-- inreplyto="00100817193500.30356@joachim" -->
<STRONG>From:</STRONG> Jeremy L Rosenberger (<A HREF="mailto:jlr4@cornell.edu?Subject=Re:%20Sane%20with%20latest%20Gimp&In-Reply-To=&lt;39E3CC77.310C0368@cornell.edu&gt;"><EM>jlr4@cornell.edu</EM></A>)<BR>
<STRONG>Date:</STRONG> Tue Oct 10 2000 - 19:12:07 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0101.html">Stens, Ralph: "AW: [SnapScan] Core testing group"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0099.html">Daemon Ares: "Re:[SnapScan] Core testing group"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0097.html">Joachim Ansorg: "Sane with latest Gimp"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0119.html">Dave Hill: "Re: Sane with latest Gimp"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0119.html">Dave Hill: "Re: Sane with latest Gimp"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#100">[ date ]</A>
<A HREF="index.html#100">[ thread ]</A>
<A HREF="subject.html#100">[ subject ]</A>
<A HREF="author.html#100">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
I modified xscanimage.c (the only file that appeared to require
<BR>
modification) myself; a patch file (to be applied to 1.0.3) is attached.
<BR>
<P>Cheers,
<BR>
Jeremy
<BR>
<P>Joachim Ansorg wrote:
<BR>
&nbsp;
<BR>
<EM>&gt; Sane doesn''t compile with the latest GIMP (they changed the names of
</EM><BR>
<EM>&gt; the enums, structs and other things).
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Does somebody have a patch?
</EM><BR>
<EM>&gt; xsane doesn't compile, too.
</EM><BR>
<P><PRE>
--
<P>Jeremy L. Rosenberger * <A HREF="mailto:jlr4@cornell.edu?Subject=Re:%20Sane%20with%20latest%20Gimp&In-Reply-To=&lt;39E3CC77.310C0368@cornell.edu&gt;">jlr4@cornell.edu</A>
</PRE>
<P>
--- xscanimage.c.orig Mon Oct 2 22:15:03 2000
+++ xscanimage.c Mon Oct 2 22:30:07 2000
@@ -60,10 +60,10 @@
#include &lt;libgimp/gimp.h&gt;
static void query (void);
-static void run (char *name, int nparams, GParam * param,
- int *nreturn_vals, GParam ** return_vals);
+static void run (char *name, int nparams, GimpParam * param,
+ int *nreturn_vals, GimpParam ** return_vals);
-GPlugInInfo PLUG_IN_INFO =
+GimpPlugInInfo PLUG_IN_INFO =
{
NULL, /* init_proc */
NULL, /* quit_proc */
@@ -100,10 +100,10 @@
#ifdef HAVE_LIBGIMP_GIMP_H
/* for GIMP mode: */
gint32 image_ID;
- GDrawable *drawable;
+ GimpDrawable *drawable;
guchar *tile;
unsigned tile_offset;
- GPixelRgn region;
+ GimpPixelRgn region;
int first_frame; /* used for RED/GREEN/BLUE frames */
#endif
}
@@ -231,11 +231,11 @@
static void
query (void)
{
- static GParamDef args[] =
+ static GimpParamDef args[] =
{
- {PARAM_INT32, &quot;run_mode&quot;, &quot;Interactive, non-interactive&quot;},
+ {GIMP_PDB_INT32, &quot;run_mode&quot;, &quot;Interactive, non-interactive&quot;},
};
- static GParamDef *return_vals = NULL;
+ static GimpParamDef *return_vals = NULL;
static int nargs = sizeof (args) / sizeof (args[0]);
static int nreturn_vals = 0;
char mpath[1024];
@@ -253,7 +253,7 @@
&quot;8th June 1997&quot;,
&quot;&lt;Toolbox&gt;/Xtns/Acquire Image/Device dialog...&quot;,
&quot;RGB, GRAY&quot;,
- PROC_EXTENSION,
+ GIMP_EXTENSION,
nargs, nreturn_vals,
args, return_vals);
@@ -284,18 +284,18 @@
&quot;interface.&quot;,
&quot;Andy Beck, Tristan Tarrant, and David Mosberger&quot;,
&quot;Andy Beck, Tristan Tarrant, and David Mosberger&quot;,
- &quot;8th June 1997&quot;, mpath, &quot;RGB, GRAY&quot;, PROC_EXTENSION,
+ &quot;8th June 1997&quot;, mpath, &quot;RGB, GRAY&quot;, GIMP_EXTENSION,
nargs, nreturn_vals, args, return_vals);
}
sane_exit ();
}
static void
-run (char *name, int nparams, GParam * param,
- int *nreturn_vals, GParam ** return_vals)
+run (char *name, int nparams, GimpParam * param,
+ int *nreturn_vals, GimpParam ** return_vals)
{
- static GParam values[2];
- GRunModeType run_mode;
+ static GimpParam values[2];
+ GimpRunModeType run_mode;
char devname[1024];
char *args[2];
int nargs;
@@ -306,8 +306,8 @@
*nreturn_vals = 1;
*return_vals = values;
- values[0].type = PARAM_STATUS;
- values[0].data.d_status = STATUS_CALLING_ERROR;
+ values[0].type = GIMP_PDB_STATUS;
+ values[0].data.d_status = GIMP_PDB_CALLING_ERROR;
nargs = 0;
args[nargs++] = &quot;xscanimage&quot;;
@@ -322,16 +322,16 @@
switch (run_mode)
{
- case RUN_INTERACTIVE:
+ case GIMP_RUN_INTERACTIVE:
interface (nargs, args);
- values[0].data.d_status = STATUS_SUCCESS;
+ values[0].data.d_status = GIMP_PDB_SUCCESS;
break;
- case RUN_NONINTERACTIVE:
+ case GIMP_RUN_NONINTERACTIVE:
/* Make sure all the arguments are there! */
break;
- case RUN_WITH_LAST_VALS:
+ case GIMP_RUN_WITH_LAST_VALS:
/* Possibly retrieve data */
break;
@@ -912,14 +912,14 @@
scan_win.first_frame = 0;
else
{
- GImageType image_type = RGB;
- GDrawableType drawable_type = RGB_IMAGE;
+ GimpImageBaseType image_type = GIMP_RGB;
+ GimpImageType drawable_type = GIMP_RGB_IMAGE;
gint32 layer_ID;
if (scan_win.param.format == SANE_FRAME_GRAY)
{
- image_type = GRAY;
- drawable_type = GRAY_IMAGE;
+ image_type = GIMP_GRAY;
+ drawable_type = GIMP_GRAY_IMAGE;
}
scan_win.image_ID = gimp_image_new (scan_win.param.pixels_per_line,
@@ -927,7 +927,7 @@
layer_ID = gimp_layer_new (scan_win.image_ID, &quot;Background&quot;,
scan_win.param.pixels_per_line,
scan_win.param.lines,
- drawable_type, 100, NORMAL_MODE);
+ drawable_type, 100, GIMP_NORMAL_MODE);
gimp_image_add_layer (scan_win.image_ID, layer_ID, 0);
scan_win.drawable = gimp_drawable_get (layer_ID);
<P><P><P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Sane%20with%20latest%20Gimp&In-Reply-To=&lt;39E3CC77.310C0368@cornell.edu&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0101.html">Stens, Ralph: "AW: [SnapScan] Core testing group"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0099.html">Daemon Ares: "Re:[SnapScan] Core testing group"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0097.html">Joachim Ansorg: "Sane with latest Gimp"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0119.html">Dave Hill: "Re: Sane with latest Gimp"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0119.html">Dave Hill: "Re: Sane with latest Gimp"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#100">[ date ]</A>
<A HREF="index.html#100">[ thread ]</A>
<A HREF="subject.html#100">[ subject ]</A>
<A HREF="author.html#100">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Tue Oct 10 2000 - 19:09:36 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>