aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUGS28
-rw-r--r--Perl/Makefile.PL.in (renamed from Perl/Makefile.PL)7
-rw-r--r--Perl/Zinc.pm1
-rw-r--r--Perl/Zinc.xs41
-rw-r--r--Python/library/Zinc.py.in2
-rw-r--r--README183
-rw-r--r--aclocal.m4226
-rw-r--r--generic/private.h209
-rw-r--r--sandbox/allreliefs.pl1
-rw-r--r--sandbox/allreliefs.tcl30
10 files changed, 675 insertions, 53 deletions
diff --git a/BUGS b/BUGS
index b008c50..e69de29 100644
--- a/BUGS
+++ b/BUGS
@@ -1,28 +0,0 @@
-
-* Problem with focus lost in demos. This happen
- when open a new window. See transforms an open
- the option menu, a leave/enter for mthe main
- window is needed to reactivate the keyboard commands.
-
-* The 'all_options' demo work stand alone but
- has a problem with creating additional windows
- under zinc-demos. A rewrite is necessary
-
-* The Tcl version has not been tested for a while. It
- may not work.
-
-* Images/Fonts are not handled correctly under the windows
- Exceed X/openGL emulator.
-
-* Reliefs are not properly closed on closed curves in some cases.
-
-* When using a display area over 1280x1024 with openGL/nvidia
- the redrawing may be incomplete leaving an undrawn band
- on the right of the window. It may also crash the process.
-
-* When using openGL/Mesa -linewidth between 4 and 10 crash the X
- server
-
-* When using openGL/Mesa (and may be other configurations), Zinc
- fails to detect if the GLX extension is not available in the serve
- and crashes.
diff --git a/Perl/Makefile.PL b/Perl/Makefile.PL.in
index 00d9c32..6f31dd7 100644
--- a/Perl/Makefile.PL
+++ b/Perl/Makefile.PL.in
@@ -1,7 +1,4 @@
#
-# The first argument should be the name of the zinc library
-# either ptkzinc or ptkzinc_debug for example. The second
-# argument is the path to pTk in the system.
#
use Tk::MMutil;
use Tk::Config;
@@ -14,5 +11,5 @@ Tk::MMutil::TkExtMakefile(
'OBJECT' => '$(O_FILES)',
'VERSION_FROM' => 'Zinc.pm',
'XS_VERSION' => $Tk::Config::VERSION,
- 'INC' => "-I. -I$ARGV[1]",
- 'LIBS' => ["-L/usr/X11R6/lib -lX11 -l$ARGV[0]"]);
+ 'INC' => "-I. -I@PERL_TK_LIB@/pTk",
+ 'LIBS' => ["-L/usr/X11R6/lib -lX11 -L@prefix@/lib -l@PACKAGE@@VERSION@"]);
diff --git a/Perl/Zinc.pm b/Perl/Zinc.pm
index 624b45f..f08809f 100644
--- a/Perl/Zinc.pm
+++ b/Perl/Zinc.pm
@@ -5,6 +5,7 @@ package Tk::Zinc;
#require Tk;
use Tk;
+use Tk::Photo;
#use AutoLoader;
#use Exporter;
use Carp;
diff --git a/Perl/Zinc.xs b/Perl/Zinc.xs
index d3f04e3..323a53a 100644
--- a/Perl/Zinc.xs
+++ b/Perl/Zinc.xs
@@ -8,13 +8,14 @@
#include <perl.h>
#include <XSUB.h>
-#include "tkGlue.def"
+#include <tkGlue.def>
-#include "pTk/tkPort.h"
-#include "pTk/tkInt.h"
-#include "pTk/tkVMacro.h"
-#include "tkGlue.h"
-#include "tkGlue.m"
+#include <pTk/tkPort.h>
+#include <pTk/tkInt.h>
+#include <pTk/tkImgPhoto.h>
+#include <pTk/tkVMacro.h>
+#include <tkGlue.h>
+#include <tkGlue.m>
extern int
ZincObjCmd(
@@ -24,21 +25,21 @@ ZincObjCmd(
Tcl_Obj *args[]);
extern int
-VideomapObjCmd(
- ClientData client_data,
- Tcl_Interp* interp,
- int argc,
- Tcl_Obj *args[]);
+ZnVideomapObjCmd(
+ ClientData client_data,
+ Tcl_Interp* interp,
+ int argc,
+ Tcl_Obj *args[]);
extern int
-MapInfoObjCmd(
- ClientData client_data,
- Tcl_Interp* interp,
- int argc,
- Tcl_Obj *args[]);
+ZnMapInfoObjCmd(
+ ClientData client_data,
+ Tcl_Interp* interp,
+ int argc,
+ Tcl_Obj *args[]);
DECLARE_VTABLES;
-
+TkimgphotoVtab *TkimgphotoVptr;
MODULE = Tk::Zinc PACKAGE = Tk::Zinc
@@ -47,7 +48,9 @@ PROTOTYPES: DISABLE
BOOT:
{
IMPORT_VTABLES;
+ TkimgphotoVptr = (TkimgphotoVtab *) SvIV(perl_get_sv("Tk::TkimgphotoVtab",GV_ADDWARN|GV_ADD));
+
Lang_TkCommand("zinc", ZincObjCmd);
- Lang_TkCommand("videomap", VideomapObjCmd);
- Lang_TkCommand("mapinfo", MapInfoObjCmd);
+ Lang_TkCommand("videomap", ZnVideomapObjCmd);
+ Lang_TkCommand("mapinfo", ZnMapInfoObjCmd);
}
diff --git a/Python/library/Zinc.py.in b/Python/library/Zinc.py.in
index c7f0b08..f26af6a 100644
--- a/Python/library/Zinc.py.in
+++ b/Python/library/Zinc.py.in
@@ -50,7 +50,7 @@ def havetkzinc(window):
if ok :return zinc version
if nok : return 0 '''
try:
- window.tk.call('load', 'tkzincZINC_VER.ZINC_MAJOR.so')
+ window.tk.call('load', '@Tkzinc_LIB_FILE@')
# Call a function from the package to autoload it
# and verify that all is OK.
sversion = window.tk.call('zinc') + " Zinc.py %s" % __version__
diff --git a/README b/README
new file mode 100644
index 0000000..9775026
--- /dev/null
+++ b/README
@@ -0,0 +1,183 @@
+
+
+
+
+
+ *===========================================*
+ The TkZinc widget version 3.3
+ *===========================================*
+
+
+
+WHAT IS THIS?
+
+ TkZinc is a canvas like widget extension to Tcl/Tk. It adds
+support for ATC displays, provides structured assembly of
+items, transformations, clipping, and openGL based rendering
+features such as gradients and alpha blending.
+
+ It is currently available on Unices (tested on Linux) and
+Windows.
+
+
+WHERE DOES IT COME FROM?
+
+ The newest version is found at: http://www.openatc.org/zinc
+ It should be at least available in source form in a file
+ named Tkzinc<version>.tgz.
+ Distribution specific packages may also be available for
+ Debian/Mandrake/Red Hat distributions, most likely for stable
+ versions.
+ As a convenience the documentation (pdf+html) is made available
+ on the web site as a separate package.
+
+
+BUILDING AND INSTALLATION
+
+
+0. Get, build and _install_ the Tcl/Tk distribution. You need a 8.4
+ distribution to use Tkzinc. On Windows there is currently an
+ incompatibility when using a TkZinc compiled under mingw32 with
+ a core Tcl/Tk compiled with visual C++.
+
+
+1. Unpack the distribution
+
+ On Unix/Linux:
+
+ tar zxf Tkzinc<version>.tgz
+
+ On Windows:
+
+ Use WinZip or something like this to unpack
+
+ This creates a directory Tkzinc<version> with all the
+ needed files. This directory should be in the same
+ directory as the Tcl/Tk sources.
+
+
+2. Configure
+
+ On Unix/Linux:
+
+ cd Tkzinc<version>
+ ./configure
+
+ This will configure the package for your platform. It
+ will install it in /usr/local. If you want it elsewhere
+ you can use the --prefix and --exec-prefix options of
+ configure to assign another location.
+
+ On Windows:
+
+ TkZinc has been built using the msys/mingw32 environment.
+ It is known to work with Tcl/Tk 8.4.2 compiled using the
+ same environment. CAUTION: It doesn't work with Tcl/Tk 8.4.1
+ using mingw32.
+ The steps for building under mingw32 are the same as on Unices.
+ Currently there is no support for building with visual C++.
+
+ On all platforms:
+
+ It is possible to customize TkZinc through configure options:
+
+ --enable-gl=[yes|no|damage]
+ --disable-gl
+
+ This is turned off by default. Building with --enable-gl=damage
+ is the recommanded way for openGL support.
+
+ --enable-om=[yes|no]
+ --disable-om
+
+ This is turned on by default. It controls the inclusion of
+ code for avoid overlap between track labels in radar images.
+
+ --enable-shape=[yes|no]
+ --disable-shape
+
+ This is turned on by default except on Windows where support
+ code is not currently available (it may become available).
+ It allows for non rectangular TkZinc windows optionally including
+ the top level window.
+
+ --enable-ptk=[yes|no]
+ --disable-ptk
+
+ This is turned off by default. It builds TkZinc for use in
+ perl/tk. This is not currently supported on Windows.
+
+ And the Tcl standards:
+
+ --enable-threads=[yes|no]
+ --disable-threads
+
+ Compile a thread aware/thread safe version (not tested in multi
+ threaded environment). Needed if Tcl/Tk has been compiled with
+ the same configure option.
+
+ --enable-symbols=[yes|no|mem|all]
+ --disable-symbols
+
+ Turn on debugging symbols. If the form --enable-symbols=mem is
+ used, turn on memory debugging as well.
+
+
+3. Make and Install
+
+ On Unix/Linux and Windows:
+
+ make
+ make install
+
+ The warnings while compiling libtess are harmless (or so I believe ;-).
+ libtess is a tesselation library extracted from GLU/Mesa. I trust it as
+ robust unless proven wrong. I do not want to modify the code just to
+ shut up some warnings.
+
+
+4. Run the demos
+
+ In the Tkzinc<version> directory run:
+
+ wish8.4 demos/zinc-widget
+
+ It should start a Tk like 'widget' demo showing TkZinc
+ features.
+
+ If the perl/tk version is installed you can run a
+ similar demo with:
+
+ zinc-demos
+
+
+5. Make and read the documentation
+
+ It is available in pdf and html forms.
+ To make the pdf doc you need pdflatex installed. Then do:
+
+ cd Tkzinc<version>
+ make pdf
+
+ This should create a refman.pdf in the doc directory.
+
+ To make the html doc you need latex and latex2html. Then do:
+
+ cd Tkzinc<version>
+ make html
+
+ This should create a refman directory in the doc directory
+ with all the html pages and images. The entry point is
+ index.html.
+
+
+6. Report bugs and wishes
+
+ Please report bugs and suggestions to the TkZinc mailing list
+ at zinc@tls.cena.fr.
+
+ When reporting bugs try to be as specific as possible.
+ Include, if possible, the output from the program. Compile
+ TkZinc with debugging symbols and include a backtrace of the
+ debugger. Send a small Tcl script reproducing the problem.
+ The availability of a correction may dependent on these infos.
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..746ca89
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,226 @@
+#
+# Include the TEA standard macro set
+#
+
+builtin(include,tclconfig/tcl.m4)
+
+#
+# Zinc specific macros below.
+#
+#
+# ALL the new macros here need to be modified to
+# detect the various packages needed and to get their paths.
+# Right now all this is statically defined in the macros.
+#
+#------------------------------------------------------------------------
+# ZINC_ENABLE_GL --
+#
+# Specify if openGL support should be used.
+# Code for managing a damage area can also be enabled.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-gl=[yes,no,damage]
+#
+# Defines the following vars:
+# GL_INCLUDES OpenGL include files path
+# GL_LIBS additional libraries needed for GL
+# LIBS Modified to reflect the need of new
+# libraries
+# GL Defined if GL support is enabled
+# GL_DAMAGE Defined if damage support has been
+# requested
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(ZINC_ENABLE_GL, [
+ if test x"${TEA_INITED}" = x ; then
+ AC_MSG_ERROR([Must call TEA INIT before ENABLE_GL])
+ fi
+
+ AC_MSG_CHECKING([for build with GL])
+ AC_ARG_ENABLE(gl,
+ [ --enable-gl build with openGL support (yes,no,damage) [[no]]],
+ [tcl_ok=$enableval], [tcl_ok=no])
+
+ if test "$tcl_ok" = "no"; then
+ GL_LIBS=
+ GL_INCLUDES=
+ AC_MSG_RESULT([no])
+ else
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ GL_LIBS=-lopengl32
+ else
+ #
+ # On Linux, the Nvidia GL libraries needs threads support via
+ # pthreads but not mesa. Need to auto-detect that and the
+ # availability of pthreads.
+ GL_LIBS="-lGL -lpthread"
+# GL_LIBS="-lGL"
+ GL_INCLUDES='/usr/include'
+ fi
+
+ AC_DEFINE(GL)
+ if test "$tcl_ok" = "damage"; then
+ AC_DEFINE(GL_DAMAGE)
+ fi
+
+ LIBS="$LIBS $GL_LIBS"
+
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_RESULT([yes (standard)])
+ else
+ AC_MSG_RESULT([yes (with damage support)])
+ fi
+ fi
+
+ AC_SUBST(GL_LIBS)
+ AC_SUBST(GL_INCLUDES)
+])
+
+#------------------------------------------------------------------------
+# ZINC_ENABLE_OM --
+#
+# Specify if the anti overlapping code should be included.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-om=[yes,no]
+#
+# Defines the following vars:
+# Om_LIB_FILE Contains the platform depent library
+# name for the pluggable overlap manager
+# OM Defined if overlap manager support
+# is enabled
+#
+# Adjust LIBS to include the overlap manager default library.
+# May Modify LD_SEARCH_FLAGS to include the zinc install directory
+#
+#------------------------------------------------------------------------
+
+ AC_DEFUN(ZINC_ENABLE_OM, [
+ if test x"${TEA_INITED}" = x ; then
+ AC_MSG_ERROR([Must call TEA INIT before ENABLE_OM])
+ fi
+
+ AC_MSG_CHECKING([for build with the overlap manager])
+ AC_ARG_ENABLE(om,
+ [ --enable-om build with overlap manager support [[yes]]],
+ [tcl_ok=$enableval], [tcl_ok=yes])
+ if test "$tcl_ok" = "no"; then
+ Om_LIB_FILE=
+ AC_MSG_RESULT([no])
+ else
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ Om_LIB_FILE=om.dll
+ else
+ Om_LIB_FILE=libom.so
+ fi
+ AC_DEFINE(OM)
+ AC_MSG_RESULT([yes])
+ LIBS="${LIBS} -L. -lom"
+ fi
+ AC_SUBST(Om_LIB_FILE)
+])
+
+#------------------------------------------------------------------------
+# ZINC_ENABLE_SHAPE --
+#
+# Specify if the X shape extension support should be included.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-shape=[yes,no]
+#
+# Defines the following vars:
+# SHAPE Defined if shape support is enabled
+#
+# Adjust LIBS to include the X extension library
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(ZINC_ENABLE_SHAPE, [
+ if test x"${TEA_INITED}" = x ; then
+ AC_MSG_ERROR([Must call TEA INIT before ENABLE_SHAPE])
+ fi
+ AC_MSG_CHECKING([for build with X shape support])
+ AC_ARG_ENABLE(shape,
+ [ --enable-shape build with X shape support (if applicable) [[yes]]],
+ [tcl_ok=$enableval], [tcl_ok=yes])
+ if test "$tcl_ok" = "no"; then
+ AC_MSG_RESULT([no])
+ else
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_MSG_RESULT([no (not available on windows)])
+ else
+ AC_DEFINE(SHAPE)
+ AC_MSG_RESULT([yes])
+ LIBS="${LIBS} -lXext"
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# ZINC_ENABLE_PTK --
+#
+# Specify that zinc should be build for perl/Tk instead of Tk
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-ptk=[yes,no]
+#
+# Defines the following vars:
+# PTK Defined if compilation should be
+# done for perl/Tk
+# PERL_TK_LIB Path to perl/tk library (.pm)
+#
+# Modifies SHLIB_LD_LIBS, TCL_INCLUDES and TK_INCLUDES to
+# reflect the change in runtime environment.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(ZINC_ENABLE_PTK, [
+ AC_MSG_CHECKING([for build with perl/Tk support])
+ AC_ARG_ENABLE(ptk,
+ [ --enable-ptk build with perl/Tk support [[no]]],
+ [tcl_ok=$enableval], [tcl_ok=no])
+ if test "$tcl_ok" = "no"; then
+ PERL_TK_LIB=
+ AC_MSG_RESULT([no])
+ else
+ #
+ # Locate the perl hierarchy and the corresponding perl/tk.
+ #
+ AC_CHECK_PROGS(PERL, perl, error)
+ changequote()
+ PERL_TK_LIB=`perl -MTk -e 'print $Tk::library'`
+ changequote([, ])
+
+ #
+ # Don't use stubs libraries with perl/Tk.
+ # Don't use either the includes from Tcl/Tk.
+ SHLIB_LD_LIBS="\${LIBS}"
+ TCL_INCLUDES=
+ TK_INCLUDES=-I${PERL_TK_LIB}/pTk
+ AC_DEFINE(PTK)
+ AC_MSG_RESULT([yes])
+ fi
+
+ AC_SUBST(PERL_TK_LIB)
+])
diff --git a/generic/private.h b/generic/private.h
new file mode 100644
index 0000000..015be37
--- /dev/null
+++ b/generic/private.h
@@ -0,0 +1,209 @@
+/* Copyright (C) 1996-2001 Martin Vicente -*- c -*-
+ This file is part of the eXtended C Library (XCLIB).
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library (see the file COPYING.LIB).
+ If not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */
+
+
+/* XCLIB 0.3 PRIVATE: PRIVATE AND INTERNALS */
+
+
+#ifndef __XC_PRIVATE_H
+#define __XC_PRIVATE_H
+
+
+/* Standard C Library: */
+#include <stddef.h>
+
+
+#if !defined __STDC__
+#error "Use a modern C compiler please"
+#endif
+
+#if __STDC__ - 1
+#warning "Use a C ANSI compiler please"
+#endif
+
+
+#if __WORDSIZE == 64 || defined __alpha || defined __sgi && _MIPS_SZLONG == 64
+# undef __LONG64__
+# define __LONG64__
+#endif
+
+
+#if defined _FACILITY && !defined __FACI__
+#define __FACI__ _FACILITY
+#endif
+
+#if defined __DEBUG__ && !defined __FACI__
+#define __FACI__ ""
+#endif
+
+
+#if defined __GNUG__
+#define __FUNC__ __PRETTY_FUNCTION__
+#elif defined __GNUC__
+#define __FUNC__ __FUNCTION__
+#elif defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#define __FUNC__ __func__
+#else
+#define __FUNC__ ""
+#endif
+
+
+#if defined __sun && defined __SUNPRO_C && defined __SVR4 /* Solaris 2.x */
+#define __PRAGMA_INIT__
+#define __PRAGMA_FINI__
+#endif
+
+
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+#define __extension__
+#endif
+
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#define __format__ format
+#define __printf__ printf
+#define __scanf__ scanf
+#endif
+
+#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+#define __attribute(spec)
+#define __attribute__(spec)
+#endif
+
+#define __constructor __attribute__ ((__constructor__))
+#define __destructor __attribute__ ((__destructor__))
+#define __noreturn __attribute__ ((__noreturn__))
+#define __unused __attribute__ ((__unused__))
+
+
+#ifndef __GNUC__
+#define inline
+#define __inline
+#define __inline__
+#endif
+
+
+#ifndef NULL
+#if defined __GNUG__
+#define NULL __null /* NUL POINTER */
+#elif defined __cplusplus
+#define NULL 0
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+
+
+#define __noop ((void)0) /* VOID INSTRUCTION (NO OPERATION) */
+
+
+#if defined __GNUC__ && !defined __STRICT_ANSI__
+#define _XC_ESC '\e' /* ESCAPE CHARACTER */
+#define _XC_ESC_STRING "\e" /* ESCAPE CHARACTER (STRING) */
+#else
+#define _XC_ESC '\x1b'
+#define _XC_ESC_STRING "\x1b"
+#endif
+
+
+#define _XC_E 2.7182818284590452354 /* e */
+#define _XC_LOG2E 1.4426950408889634074 /* log_2(e) */
+#define _XC_LOG10E 0.43429448190325182765 /* log_10(e) */
+#define _XC_LN2 0.69314718055994530942 /* log_e(2) */
+#define _XC_LN10 2.30258509299404568402 /* log_e(10) */
+#define _XC_PI 3.14159265358979323846 /* pi */
+#define _XC_PI_2 1.57079632679489661923 /* pi/2 */
+#define _XC_PI_4 0.78539816339744830962 /* pi/4 */
+#define _XC_1_PI 0.31830988618379067154 /* 1/pi */
+#define _XC_2_PI 0.63661977236758134308 /* 2/pi */
+#define _XC_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
+#define _XC_SQRT2 1.41421356237309504880 /* sqrt(2) */
+#define _XC_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
+
+#define _XC_El 2.7182818284590452353602874713526625L /* e */
+#define _XC_LOG2El 1.4426950408889634073599246810018922L /* log_2(e) */
+#define _XC_LOG10El 0.4342944819032518276511289189166051L /* log_10(e) */
+#define _XC_LN2l 0.6931471805599453094172321214581766L /* log_e(2) */
+#define _XC_LN10l 2.3025850929940456840179914546843642L /* log_e(10) */
+#define _XC_PIl 3.1415926535897932384626433832795029L /* pi */
+#define _XC_PI_2l 1.5707963267948966192313216916397514L /* pi/2 */
+#define _XC_PI_4l 0.7853981633974483096156608458198757L /* pi/4 */
+#define _XC_1_PIl 0.3183098861837906715377675267450287L /* 1/pi */
+#define _XC_2_PIl 0.6366197723675813430755350534900574L /* 2/pi */
+#define _XC_2_SQRTPIl 1.1283791670955125738961589031215452L /* 2/sqrt(pi) */
+#define _XC_SQRT2l 1.4142135623730950488016887242096981L /* sqrt(2) */
+#define _XC_SQRT1_2l 0.7071067811865475244008443621048490L /* 1/sqrt(2) */
+
+
+#define __XC_T_1_2(type) ((type)1 / (type)2)
+
+#ifdef __GNUC__
+#define __XC_1_2(x) __XC_TYPE_1_2(typeof (x))
+#endif
+
+
+#if defined __GNUC__ && !defined __STRICT_ANSI__
+#define __MACRO_VARARGS__
+#endif
+
+
+#if defined __GNUC__ && !defined __STRICT_ANSI__
+#define _MBEGIN ({ /* TO DEFINE COMPLEX MACROS */
+#define _MEND })
+#else
+#/* Attention ici à l'utilisation des `break' et des `continue'! */
+#define _MBEGIN do {
+#define _MEND } while (0)
+#endif
+
+#ifdef __GNUC__
+#ifdef __STRICT_ANSI__
+#define _FBEGIN ( __extension__ ({ /* TO DEFINE FUNCTION MACROS */
+#define _FEND }))
+#else
+#define _FBEGIN ({
+#define _FEND })
+#endif
+#endif
+
+
+#ifdef __REENTRANT__
+#define __XC_AUTO auto
+#define __XC_REGISTER auto
+#else
+#define __XC_AUTO
+#define __XC_REGISTER register
+#endif
+
+
+#ifdef __GNUC__
+#ifdef __STRICT_ANSI__
+#define TYPEDEF __extension__ typedef
+#else
+#define TYPEDEF typedef
+#endif
+#endif
+
+
+#define __xclib(reference) xc__ ## reference
+#define __xcint(reference) __xc__ ## reference
+
+
+#endif /* XC PRIVATE HEADER */
+
+
+/*------------------------------/ END OF FILE /------------------------------*/
diff --git a/sandbox/allreliefs.pl b/sandbox/allreliefs.pl
index 2a19151..891a16f 100644
--- a/sandbox/allreliefs.pl
+++ b/sandbox/allreliefs.pl
@@ -3,6 +3,7 @@
# these simple samples have been developped by C. Mertz mertz@cena.fr and N. Banoun banoun@cena.fr
use Tk;
+use Tk::Photo;
use Tk::Zinc;
use strict;
diff --git a/sandbox/allreliefs.tcl b/sandbox/allreliefs.tcl
new file mode 100644
index 0000000..291a02b
--- /dev/null
+++ b/sandbox/allreliefs.tcl
@@ -0,0 +1,30 @@
+# $Id$
+# these simple samples have been developped by C. Mertz mertz@cena.fr and N. Banoun banoun@cena.fr
+
+lappend auto_path [file join [file dirname [info script]] ..]
+package require Tkzinc
+
+set defaultfont "-adobe-helvetica-bold-r-normal-*-100-*-*-*-*-*-*"
+zinc .z -width 700 -height 300 -render 1 -backcolor gray
+pack .z
+
+set grp [.z add group 1]
+.z add rectangle $grp {0 0 70 50} -filled 1 -fillcolor tan -linecolor tan \
+ -linewidth 6 -relief raised -tags attrs
+.z add text $grp -text raised -anchor center -font $defaultfont \
+ -position {35 -10} -tags texts
+.z translate $grp 20 30
+
+set i 1
+foreach s {sunken ridge groove roundraised roundsunken roundridge roundgroove raisedrule sunkenrule} {
+ set grp [.z clone $grp]
+ .z itemconfigure "$grp.texts" -text $s
+ .z itemconfigure "$grp.attrs" -relief $s
+ incr i
+ if {$i == 5} {
+ .z translate $grp [expr -3*100] 80
+ set i 1
+ } else {
+ .z translate $grp 100 0
+ }
+}