Compare commits
60 Commits
gdk-object
...
GTK_1_0_2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b62fc60de7 | ||
|
|
7defce053a | ||
|
|
f322097971 | ||
|
|
8d312b1d4f | ||
|
|
3b0e9baee5 | ||
|
|
0b1b179e45 | ||
|
|
6c6b244015 | ||
|
|
725300f5f2 | ||
|
|
7d56ba7b0c | ||
|
|
832e096207 | ||
|
|
063c490570 | ||
|
|
8d55a9d665 | ||
|
|
6c21fc646d | ||
|
|
0847bed69f | ||
|
|
f3f8304436 | ||
|
|
7e6c3c0df7 | ||
|
|
25f9fd2958 | ||
|
|
b3e0707899 | ||
|
|
aa505f0ff4 | ||
|
|
66dd08d2e8 | ||
|
|
8555c23889 | ||
|
|
98d997b105 | ||
|
|
5cb538d805 | ||
|
|
7d6aff77e5 | ||
|
|
668c7604a9 | ||
|
|
e8cf1d552b | ||
|
|
5266d6322a | ||
|
|
52d2e1b6a1 | ||
|
|
4aa965149c | ||
|
|
ab40e71ec9 | ||
|
|
d8e88af7d0 | ||
|
|
1a7acfef50 | ||
|
|
f8116014c1 | ||
|
|
eedaab9236 | ||
|
|
2117f4ac7e | ||
|
|
6349f7cb2c | ||
|
|
8435d34838 | ||
|
|
0f0ede22ad | ||
|
|
43ef2e2394 | ||
|
|
b94559a288 | ||
|
|
a3cfbc84cf | ||
|
|
4143e106cc | ||
|
|
d0a29b40d6 | ||
|
|
1b7fc490af | ||
|
|
8c66060a8e | ||
|
|
e94d12f926 | ||
|
|
cde57dc1d2 | ||
|
|
42a7da51fc | ||
|
|
2bec3fad18 | ||
|
|
2f6ee99191 | ||
|
|
9a1db40746 | ||
|
|
37bedcc07a | ||
|
|
302aaa2802 | ||
|
|
9829d1ee03 | ||
|
|
aa6097e255 | ||
|
|
1d8aed6816 | ||
|
|
49680fed32 | ||
|
|
4a7d355898 | ||
|
|
0982f71b98 | ||
|
|
7363897409 |
@@ -1,7 +1,6 @@
|
||||
*.lo
|
||||
config.log
|
||||
config.h
|
||||
config.h.in
|
||||
libtool
|
||||
config.status
|
||||
stamp-h
|
||||
@@ -11,10 +10,4 @@ aclocal.m4
|
||||
configure
|
||||
gtk-config
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
|
||||
|
||||
13
AUTHORS
13
AUTHORS
@@ -4,26 +4,19 @@ Peter Mattis <petm@xcf.berkeley.edu>
|
||||
Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
|
||||
Please do not mail the original authors asking questions about this
|
||||
version of GTK+.
|
||||
|
||||
The GTK+ Team (in alphabetical order)
|
||||
-------------------------------------
|
||||
Shawn T. Amundson <amundson@gtk.org>
|
||||
Jerome Bolliet <bolliet@gtk.org>
|
||||
Damon Chaplin <damon@gtk.org>
|
||||
Jerome Bolliet <bolliet@in2p3.fr>
|
||||
Tony Gale <gale@gtk.org>
|
||||
Jeff Garzik <jgarzik@gtk.org>
|
||||
Lars Hamann <lars@gtk.org>
|
||||
Raja R Harinath <harinath@gtk.org>
|
||||
Carsten Haitzler <raster@gtk.org>
|
||||
Tim Janik <timj@gtk.org>
|
||||
Stefan Jeske <stefan@gtk.org>
|
||||
Elliot Lee <sopwith@gtk.org>
|
||||
Raph Levien <raph@gtk.org>
|
||||
Ian Main <imain@gtk.org>
|
||||
Federico Mena <quartic@gtk.org>
|
||||
Paolo Molaro <lupus@gtk.org>
|
||||
Fedrerico Mena <quartic@gtk.org>
|
||||
Paolo Molaro <lupus@lettere.unipd.it>
|
||||
Jay Painter <jpaint@gtk.org>
|
||||
Manish Singh <manish@gtk.org>
|
||||
Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
4961
ChangeLog.pre-1-0
4961
ChangeLog.pre-1-0
File diff suppressed because it is too large
Load Diff
9106
ChangeLog.pre-1-2
9106
ChangeLog.pre-1-2
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-0
9732
ChangeLog.pre-2-0
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-10
9732
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-2
9732
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-4
9732
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-6
9732
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
9732
ChangeLog.pre-2-8
9732
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
27
HACKING
27
HACKING
@@ -1,35 +1,29 @@
|
||||
If you want to hack on the Gtk+ project, it will make you life easier
|
||||
to have the following packages installed:
|
||||
|
||||
- GNU autoconf 2.13
|
||||
- GNU automake 1.4
|
||||
- GNU autoconf 2.12
|
||||
- GNU automake 1.3
|
||||
(Beta releases are at ftp://ftp.cygnus.com/pub/tromey)
|
||||
- GNU libtool 1.2d
|
||||
- indent (GNU indent 1.9.1 is known good)
|
||||
- GNU gettext 10.35
|
||||
Available in ftp://alpha.gnu.org/gnu
|
||||
- GNU libtool 1.2
|
||||
|
||||
These should be available by ftp from ftp.gnu.org or any of the
|
||||
fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
|
||||
In order to get CVS gtk+ installed on your system, you need to have
|
||||
the most recent CVS version of glib installed as well.
|
||||
The installation process of glib is similar to that of gtk+, but
|
||||
needs to be fulfilled prior to installation of gtk+.
|
||||
|
||||
To compile a CVS version of gtk+ on your system, you will need to take
|
||||
several steps to setup the tree for compilation. You can do all these
|
||||
steps at once by running:
|
||||
If you are accessing gtk+ via CVS, then you will need to take several
|
||||
steps to get it to compile. You can do all these steps at once
|
||||
by running:
|
||||
|
||||
cvsroot/gtk+# ./autogen.sh
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
cvsroot/gtk+# aclocal; automake; autoconf
|
||||
cvsroot/gtk+/glib# aclocal; automake; autoconf
|
||||
|
||||
The above commands create the "configure" script. Now you
|
||||
can run the configure script in cvsroot/gtk+ to create all
|
||||
the Makefiles.
|
||||
the Makefiles. You only need to call "configure" in cvsroot/gtk+
|
||||
as the one in glib will be invoked automatically.
|
||||
|
||||
Before running autogen.sh or configure, make sure you have libtool
|
||||
in your path.
|
||||
@@ -39,12 +33,11 @@ options like --prefix=/usr to configure you can give those options
|
||||
to autogen.sh and they will be passed on to configure.
|
||||
|
||||
If at all possible, please use CVS to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from cvs:
|
||||
gtk+. You can do the following to get gtk+ from cvs:
|
||||
|
||||
$ export CVSROOT=':pserver:anonymous@cvs.gimp.org:/debian/home/gnomecvs'
|
||||
$ cvs login
|
||||
(there is no password, just hit return)
|
||||
$ cvs -z9 checkout glib
|
||||
$ cvs -z9 checkout gtk+
|
||||
|
||||
Please submit patches to the gtk-list@redhat.com mailing list (you must
|
||||
|
||||
64
INSTALL
64
INSTALL
@@ -1,18 +1,12 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the GLIB library, available at the same location as
|
||||
you got this package.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-1.2.7.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.7 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
% gzip -cd gtk+-1.0.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.0.2 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
% make install # install GTK
|
||||
|
||||
The Nitty-Gritty
|
||||
================
|
||||
@@ -43,13 +37,6 @@ which form of support to use:
|
||||
|
||||
For more information, follow the link from http://www.gtk.org
|
||||
|
||||
* --disable-nls do not use Native Language Support
|
||||
|
||||
If this flag is not specified, GTK+ will try to find
|
||||
and use the gettext() set of functions to provide translations
|
||||
of the strings in the standard dialogs into the
|
||||
user's native language.
|
||||
|
||||
* --enable-xim support XIM [default=yes]
|
||||
|
||||
Specifying --disable-xim will disable support for entering
|
||||
@@ -57,7 +44,7 @@ internationalized text using X Input Methods. This will give some
|
||||
slight savings in speed and memory use and might be necessary
|
||||
with older versions of X.
|
||||
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
|
||||
The --with-locale options is used to determine if your operating
|
||||
system has support for the locale you will be using. If not, X's
|
||||
@@ -91,43 +78,6 @@ or,
|
||||
|
||||
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||
|
||||
Native-Language Support and gettext()
|
||||
=====================================
|
||||
|
||||
To provide native-language support (NLS) GTK+ uses the
|
||||
gettext() set of functions. These functions are found
|
||||
in the C library on many systems, such as the Solaris
|
||||
C library and the GNU C Library, version 2.
|
||||
|
||||
If your C library does not provide the necessary functionality,
|
||||
you may wish to install the GNU gettext package. You'll
|
||||
need version 0.10.35 or better. Version 0.10.35 is
|
||||
available from ftp://alpha.gnu.org/pub/gnu
|
||||
|
||||
Generally, GTK+ will properly detect what is installed
|
||||
on your system and enable or disable NLS as appropriate.
|
||||
However, in rare cases, it may be necessary to disable
|
||||
NLS manually to get GTK+ to compile. You can do this
|
||||
by specifying the --disable-nls flag when configuring
|
||||
GTK+.
|
||||
|
||||
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||
=================================================
|
||||
|
||||
You can compile GTK+ against a copy of GLIB that you have not
|
||||
yet installed. To do this, give the --with-glib=DIR options
|
||||
to ./configure. For instance:
|
||||
|
||||
./configure --with-glib=../glib-1.2.7
|
||||
|
||||
This, however, will not work if you built GLIB with different
|
||||
source and build directories.
|
||||
|
||||
It is recommended that you install GLIB before compiling
|
||||
GTK+. The --with-glib option is not regularly tested
|
||||
and may not function correctly. In addition,
|
||||
inter-library dependencies won't be generated when
|
||||
using --with-glib=.
|
||||
|
||||
Installation directories
|
||||
========================
|
||||
@@ -157,7 +107,7 @@ For complete details, see the file docs/gtk-config.txt
|
||||
Notes for using XIM support for Japanese input
|
||||
==============================================
|
||||
|
||||
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||
* There is a bug in older versions of kinput2 that will cause GTK
|
||||
to hang when destroying a text entry. The latest versions of
|
||||
kinput is available from:
|
||||
|
||||
|
||||
187
INSTALL.in
187
INSTALL.in
@@ -1,187 +0,0 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the GLIB library, available at the same location as
|
||||
you got this package.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-@GTK_VERSION@ # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK
|
||||
|
||||
The Nitty-Gritty
|
||||
================
|
||||
|
||||
The 'configure' script can be given a number of options to enable
|
||||
and disable various features. For a complete list, type:
|
||||
|
||||
./configure --help
|
||||
|
||||
A few of the more important ones:
|
||||
|
||||
* --prefix=PREFIX install architecture-independent files in PREFIX
|
||||
[ Defaults to /usr/local ]
|
||||
|
||||
* --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
||||
[ Defaults to the value given to --prefix ]
|
||||
|
||||
* --with-xinput=[no/gxi/xfree] support XInput [default=no]
|
||||
|
||||
The --with-xinput flag specifies whether to compile with support
|
||||
for the XInput extension (mainly used for graphics tablets), and
|
||||
which form of support to use:
|
||||
|
||||
no : no support
|
||||
gxi : Use generic XInput support
|
||||
xfree : Use special features in the Wacom drivers in XFree86 3.3.1
|
||||
and later.
|
||||
|
||||
For more information, follow the link from http://www.gtk.org
|
||||
|
||||
* --disable-nls do not use Native Language Support
|
||||
|
||||
If this flag is not specified, GTK+ will try to find
|
||||
and use the gettext() set of functions to provide translations
|
||||
of the strings in the standard dialogs into the
|
||||
user's native language.
|
||||
|
||||
* --enable-xim support XIM [default=yes]
|
||||
|
||||
Specifying --disable-xim will disable support for entering
|
||||
internationalized text using X Input Methods. This will give some
|
||||
slight savings in speed and memory use and might be necessary
|
||||
with older versions of X.
|
||||
|
||||
* --with-locale=LOCALE locale name you want to use
|
||||
|
||||
The --with-locale options is used to determine if your operating
|
||||
system has support for the locale you will be using. If not, X's
|
||||
built in locale support will be used.
|
||||
|
||||
Because of bugs in autoconf, it is necessary to specify this
|
||||
option even if your LANG environment variable is correctly set.
|
||||
|
||||
This option does not determine which locale GTK will use at
|
||||
runtime. That will be determined from the usual environment
|
||||
variables. If you will be using multiple locales with GTK,
|
||||
specify the one for which your operating system has the worst
|
||||
support for the --with-locale option.
|
||||
|
||||
|
||||
Options can be given to the compiler and linker by setting
|
||||
environment variables before running configure. A few of the more
|
||||
important ones:
|
||||
|
||||
CC : The C compiler to use
|
||||
CPPFLAGS : Flags for the C preprocesser such as -I and -D
|
||||
CFLAGS : C compiler flags
|
||||
|
||||
The most important use of this is to set the
|
||||
optimization/debugging flags. For instance, to compile with no
|
||||
debugging information at all, run configure as:
|
||||
|
||||
CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
|
||||
|
||||
or,
|
||||
|
||||
setenv CFLAGS -O2 ; ./configure # csh and variants
|
||||
|
||||
Native-Language Support and gettext()
|
||||
=====================================
|
||||
|
||||
To provide native-language support (NLS) GTK+ uses the
|
||||
gettext() set of functions. These functions are found
|
||||
in the C library on many systems, such as the Solaris
|
||||
C library and the GNU C Library, version 2.
|
||||
|
||||
If your C library does not provide the necessary functionality,
|
||||
you may wish to install the GNU gettext package. You'll
|
||||
need version 0.10.35 or better. Version 0.10.35 is
|
||||
available from ftp://alpha.gnu.org/pub/gnu
|
||||
|
||||
Generally, GTK+ will properly detect what is installed
|
||||
on your system and enable or disable NLS as appropriate.
|
||||
However, in rare cases, it may be necessary to disable
|
||||
NLS manually to get GTK+ to compile. You can do this
|
||||
by specifying the --disable-nls flag when configuring
|
||||
GTK+.
|
||||
|
||||
Using an uninstalled copy of GLIB [ Unsupported ]
|
||||
=================================================
|
||||
|
||||
You can compile GTK+ against a copy of GLIB that you have not
|
||||
yet installed. To do this, give the --with-glib=DIR options
|
||||
to ./configure. For instance:
|
||||
|
||||
./configure --with-glib=../glib-@GTK_VERSION@
|
||||
|
||||
This, however, will not work if you built GLIB with different
|
||||
source and build directories.
|
||||
|
||||
It is recommended that you install GLIB before compiling
|
||||
GTK+. The --with-glib option is not regularly tested
|
||||
and may not function correctly. In addition,
|
||||
inter-library dependencies won't be generated when
|
||||
using --with-glib=.
|
||||
|
||||
Installation directories
|
||||
========================
|
||||
|
||||
The location of the installed files is determined by the --prefix
|
||||
and --exec-prefix options given to configure. There are also more
|
||||
detailed flags to control individual directories. However, the
|
||||
use of these flags is not tested.
|
||||
|
||||
One particular detail to note, is that the architecture-dependent
|
||||
include file glibconfig.h is installed in:
|
||||
|
||||
$exec_pref/lib/glib/include/
|
||||
|
||||
if you have a version in $prefix/include, this is out of date
|
||||
and should be deleted.
|
||||
|
||||
A shell script gtk-config is created during the configure
|
||||
process, and installed in the bin/ directory
|
||||
($exec_prefix/bin). This is used to determine the location of GTK
|
||||
when building applications. If you move GTK after installation,
|
||||
it will be necessary to edit this file.
|
||||
|
||||
For complete details, see the file docs/gtk-config.txt
|
||||
|
||||
|
||||
Notes for using XIM support for Japanese input
|
||||
==============================================
|
||||
|
||||
* There is a bug in older versions of kinput2 that will cause GTK+
|
||||
to hang when destroying a text entry. The latest versions of
|
||||
kinput is available from:
|
||||
|
||||
ftp://ftp.sra.co.jp/pub/x11/kinput2
|
||||
|
||||
* The locale information file for the ja_JP EUC locale
|
||||
distributed with some recent versions of X11 specifies to use the
|
||||
C library multibyte functions. Unless your C library has support
|
||||
for Japanese locales, this is incorrect, and will cause problems
|
||||
for GTK's internationalization.
|
||||
|
||||
(In particular, this occurs with GNU libc 2.0 in which
|
||||
the multibyte functions always translate to and from UTF-8; but
|
||||
the problem may occur for other C libraries, and other operating
|
||||
systems as well.)
|
||||
|
||||
To fix this, change the line:
|
||||
|
||||
use_stdc_env True
|
||||
|
||||
to
|
||||
|
||||
use_stdc_env False
|
||||
|
||||
in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
|
||||
|
||||
|
||||
73
Makefile.am
73
Makefile.am
@@ -1,40 +1,20 @@
|
||||
## Makefile.am for GTK+
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SRC_SUBDIRS = gdk gtk
|
||||
SUBDIRS = po $(SRC_SUBDIRS) docs
|
||||
SRC_SUBDIRS = glib gdk gtk
|
||||
SUBDIRS = $(SRC_SUBDIRS) docs
|
||||
|
||||
bin_SCRIPTS = gtk-config
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
gtk+.spec.in \
|
||||
gtk+.spec \
|
||||
gtk.m4 \
|
||||
makecopyright \
|
||||
TODO \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
intl/libgettext.h \
|
||||
intl/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
@@ -53,13 +33,14 @@ EXTRA_DIST = \
|
||||
examples/list/list.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/menu/itemfactory.c \
|
||||
examples/menu/menufactory.c \
|
||||
examples/menu/menufactory.h \
|
||||
examples/menu/mfmain.c \
|
||||
examples/menu/mfmain.h \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/packer/Makefile \
|
||||
examples/packer/pack.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
@@ -68,8 +49,6 @@ EXTRA_DIST = \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
@@ -83,37 +62,19 @@ EXTRA_DIST = \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/text/Makefile \
|
||||
examples/text/text.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/tree/Makefile \
|
||||
examples/tree/tree.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
|
||||
dist-hook: gtk+.spec
|
||||
if test -e $(srcdir)/INSTALL.in && test -e $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi \
|
||||
&& cp gtk+.spec $(distdir)
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = gtk.m4
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
.PHONY: files populate checkin release
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
@@ -126,13 +87,13 @@ files:
|
||||
done; \
|
||||
done
|
||||
|
||||
populate:
|
||||
@echo "populating project"
|
||||
@files=`$(MAKE) files | grep -v "make\[[1-9]\]"`; prcs populate -d gtk+.prj $$files
|
||||
|
||||
checkin: populate
|
||||
@echo "checking in project"
|
||||
@prcs checkin
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
sanity:
|
||||
./sanity_check $(VERSION)
|
||||
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
|
||||
|
||||
540
NEWS
540
NEWS
@@ -1,411 +1,143 @@
|
||||
Overview of Changes in GTK+ 1.2.6:
|
||||
Overview of Changes in GTK+ 1.0.2:
|
||||
|
||||
* container queue_resize fixes
|
||||
* gtk[vh]scale: minor fixups
|
||||
* rename idle to idle_id in testgtk to avoid conflicts with
|
||||
broken libs
|
||||
* More consistant naming of gtkrc files
|
||||
* Added language support: ro, uk
|
||||
|
||||
Overview of Changes in GTK+ 1.2.5:
|
||||
|
||||
* more GtkCTree and GtkWindow bug fixes.
|
||||
* more redraw/resize queue fixes, better expose event
|
||||
discarding code.
|
||||
* more miscellaneous bugs fixed
|
||||
* new configure.in option --disable-rebuilds to completely disable
|
||||
rebuilds of autogenerated sources.
|
||||
* check for 5.002 now, to avoid failing autogeneration build rules due
|
||||
to old perl versions.
|
||||
* fonts (and fontsets) are cached now.
|
||||
* more autogeneration make rules and dependancy fixups, we should be
|
||||
save with autogeneration up to make -j12 now ;)
|
||||
* new window position GTK_WIN_POS_CENTER_ALWAYS, which will recenter the
|
||||
GtkWindow on every size change.
|
||||
* major rework of window manager hints handling code, fixed a bunch of
|
||||
races with the new resizing code.
|
||||
* the new wm hints and resizing code is absolutely perfect and bug free now,
|
||||
it only lacks testing ;)
|
||||
* fixed up various rc style memory prolems.
|
||||
* gtk_widget_modify_style() now properly changes the style of realized widgets
|
||||
and references the style passed into it. if people worked around this bug,
|
||||
this will introduce a slight memory leak in their code.
|
||||
The code should typically look like:
|
||||
GtkRcStyle *rc_style = gtk_rc_style_new ();
|
||||
[...]
|
||||
gtk_widget_modify_style (widget, rc_style);
|
||||
gtk_rc_style_unref (rc_style);
|
||||
* fix problems with positioning menus offscreen.
|
||||
* GtkText fixes for some crashes and drawing errors.
|
||||
* Better handling for unexpected window destroys in GDK and GTK+.
|
||||
This should make it possible to use a GtkPlug and catch the
|
||||
case where its parent socket is randomly killed.
|
||||
* FAQ updates.
|
||||
* FileSelection i18n patches, RadioButton fixups.
|
||||
* many translation improvements.
|
||||
* miscellaneous other bugs fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.4:
|
||||
|
||||
* DnD improvements (drags can be canceled with Esc now).
|
||||
* suppressed configure event reordering in Gdk.
|
||||
* rewrite of Gtk's configure event handling.
|
||||
* major improvements for the object argument system (Elena Devdariani).
|
||||
* major bugfixes for threading, GtkNotebook, GtkItemFactory, GtkCList and
|
||||
GtkCTree.
|
||||
* tutorial/FAQ updates, new file generation.txt on autogenerated sources.
|
||||
* configure's --with-glib= is "officially" unsupported.
|
||||
* upgrade to libtool 1.3.3.
|
||||
* various buglets fixed.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.3:
|
||||
|
||||
* Upgrade to libtool 1.3
|
||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
||||
* Many bug fixes (see ChangeLog for details)
|
||||
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrive object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signalling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu heirarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
GtkInvisible, GtkCalendar, GtkLayout, GtkPlug, GtkSocket
|
||||
* Many new features and robustness for existing widgets
|
||||
* Theme support
|
||||
* New DND implementation
|
||||
* Internationalization of standard dialogs
|
||||
* New key binding system
|
||||
* Tearoff menus and menu accelerators
|
||||
* Wide character support for entry and text
|
||||
* Resizing code has been overhauled
|
||||
* Queued redraws of partial areas
|
||||
* Far better support for object arguments
|
||||
* Speed optimizations
|
||||
* Runtime loading of dynamic modules
|
||||
* Support for GLib log domains
|
||||
* Tutorial improvements
|
||||
* A bug fix or two
|
||||
|
||||
Overview of Changes in GTK+ 1.1.16:
|
||||
|
||||
* Major fixes and improvements for handlebox
|
||||
* A change to the way widget->requisition works. Now,
|
||||
widget->requisition is always what the widget requested,
|
||||
unmodified by the usize. See Changes-1.2.txt for details.
|
||||
This correct various bugs with gtk_widget_set_usize().
|
||||
* Fixes for XIM on X11R5 systems
|
||||
* Don't allow cut-and-paste of text in password-style entries
|
||||
* --enable-debug is now on by default for the development releaes.
|
||||
(When compiling for "production", use --enable-debug=minimum)
|
||||
* Handle systems where Helvetica is not present more gracefully
|
||||
* Fixes for memory leaks
|
||||
* CList and CTree fixes
|
||||
* Bug fixes for drawing problems.
|
||||
* Miscellaneous bug fixes to GtkLabel, GtkCList, GtkCTree,
|
||||
GtkColorsel, Focusing, DND
|
||||
* Tutorial improvements
|
||||
|
||||
Overview of Changes in GTK+ 1.1.15:
|
||||
|
||||
* Tutorial Updates
|
||||
* Added --libs gthread to gtk-config
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.14:
|
||||
|
||||
* Additions to docs/Changes-1.2.txt
|
||||
* Just warn when loading theme engine fails
|
||||
* CLAMP GtkScale digits to a meaningful range
|
||||
* GTK_LOCALDIR is now defined in a better fashion
|
||||
* New functions (feature freeze, we know...):
|
||||
gtk_menu_set_title()
|
||||
gtk_toggle_button_get_active()
|
||||
* Some locale fixups in gtkrc code
|
||||
* Fixes to make gtk_radio_button_set_group() keep only
|
||||
one radio button in the group active
|
||||
* Foreign windows are now always treated as viewable; this fixes
|
||||
a problem where updating didn't occure properly in GtkPlug
|
||||
* DND fixes for 64 bit architectures, and for specifying operations
|
||||
with modifier keys.
|
||||
* Major revisions to GtkLayout: avoid having to create window
|
||||
for NO_WINDOW children, adjust allocations of children as
|
||||
scrolled so queued draws work, and a resize is queued instead
|
||||
of allocating directly in a put() or move()
|
||||
|
||||
What is new in GTK+ 1.1.13:
|
||||
|
||||
* Dnd and selection bug fixes and memory purification.
|
||||
* Widget sensitivity fixups.
|
||||
* Tooltips windows are now named "gtk-tooltips" so rc file rules
|
||||
can match tooltips windows. Fixed interaction of tooltips and NO_WINDOW
|
||||
widgets.
|
||||
* Spin buttons now update their values upon value retrival.
|
||||
* Overhaul of the resizing vs. redrawing logic to reduce redrawing needs
|
||||
a lot. Gtk makes full use of the draw_area coalescing code now, which
|
||||
got minorly improved as well.
|
||||
* Containers map their Gdk windows after their children now to reduce
|
||||
expose event generation.
|
||||
* Gdk event queue fixups, this solves the double-click problems people were
|
||||
recently having.
|
||||
* Account for the fact that GSource's are only properly reentrant from
|
||||
within dispatch(), thus we don't do Gdk event processing from within
|
||||
check() or prepare() anymore.
|
||||
* Rc files feature a bg_pixmap value of "<none>" now.
|
||||
* Improved session management support in Gdk.
|
||||
* Automatic disabling of NLS if no gettext is found should work now.
|
||||
* Removed deprecated functions, docs/Changes-1.2.txt gives an overview.
|
||||
* Gtk+ development now requires GNU autoconf 2.13, GNU automake 1.4
|
||||
and GNU libtool 1.2d.
|
||||
* More bug fixes all over the place.
|
||||
|
||||
What is new in GTK+ 1.1.12:
|
||||
|
||||
* Korean translation added
|
||||
* Fixed memory leaks
|
||||
* A few other bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.11:
|
||||
|
||||
* Dutch, Japanese, Swedish, Polish, and Norwegian translations
|
||||
* Removed deprecated _interp variants: gtk_container_foreach_interp,
|
||||
gtk_idle_add_interp, gtk_timeout_add_interp, gtk_signal_connect_interp
|
||||
* Lots of cast corrections
|
||||
* Many fixes
|
||||
|
||||
What is new in GTK+ 1.1.9:
|
||||
|
||||
* Check for broken glibc 2.0 mb functions and avoid them
|
||||
* Label and Entry display fixes
|
||||
* Move main thread back to GDK, for locking when translating events
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.8:
|
||||
|
||||
* Added support for gettext and the localization of the standard
|
||||
dialogs.
|
||||
* Added line-wrapping for the label, and JUSTIFY_FILL
|
||||
* Support reordering via drag and drop in CList and CTree.
|
||||
* Replaced GtkDrawWindow widget with a GTK_USER_DRAW flag
|
||||
* Extended gtkpaned API to support minimum sizes and proportional
|
||||
resizing.
|
||||
* Changed the handling of shared memory segments so as to
|
||||
remove the need for GTK+ to set up signal handlers.
|
||||
* Re-implemented event loop in terms of the event loop
|
||||
that has been added to GLib 1.1.8
|
||||
* Added 'grab_focus' signal to allow keyboard accelerators
|
||||
for entries.
|
||||
* Load locale specific RC files if present.
|
||||
* Bug fixes.
|
||||
|
||||
What is new in GTK+ 1.1.7:
|
||||
|
||||
* Fixed memory mis-allocation in default files code
|
||||
* Various event handling fixes
|
||||
* Wide character support for entry and text
|
||||
* Destroy widgets _after_ propagating unrealize signals through
|
||||
widget heirarchy
|
||||
* Only build XIM-support if available
|
||||
* Tutorial and examples updates
|
||||
* Added gtk_drag_source_unset()
|
||||
|
||||
What is new in GTK+ 1.1.6:
|
||||
|
||||
* The signal system now features emission hooks whith special semantics,
|
||||
refer to the ChangeLog for this.
|
||||
* Minor? speedups and memory reductions to the emission handling of the
|
||||
signal system.
|
||||
* _interp() function variants are deprecated now. the corresponding *_full()
|
||||
variants are provided for a long time now.
|
||||
* Dnd abort timeout increased to 10 minutes.
|
||||
* GtkScrolledWindow inherits from GtkBin now.
|
||||
* GTK_POLICY_NEVER is implemented for scrolled windows now.
|
||||
* Lots of API clean ups.
|
||||
* Incremental freezing abilities.
|
||||
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
|
||||
* New window functions for transient relationship, default size, and
|
||||
geometry hints
|
||||
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
|
||||
GTK_RC_FILES environment variable and functions are provided to configure
|
||||
this behavior
|
||||
* Read doc/Changes-1.2.txt to properly adapt your code.
|
||||
* Bug Fixes.
|
||||
|
||||
What is new in GTK+ 1.1.5:
|
||||
|
||||
* Theme integration
|
||||
* Widget style modification is now handled through GtkRcStyles
|
||||
* GtkPixmaps now grey out pixmaps when insensitive
|
||||
* Notebook enhancements
|
||||
* Shadow configurability for menubars and handleboxes
|
||||
* DND enhancements
|
||||
* gtkfilesel now supports automounters better
|
||||
* Implementation of expose compression
|
||||
* Queued redraws of partial areas
|
||||
* Scrolledwindow (+Viewport) source incompatibilities, children that are added
|
||||
to a scrolled window don't get an automatic viewport anymore. a convenience
|
||||
function gtk_scrolled_window_add_with_viewport() is suplied for this task
|
||||
* Deprecated functions will now issue a message, informing the programmer about
|
||||
the use of this function. These functions will get removed in future versions
|
||||
* Non-functional functions got removed entirely
|
||||
* gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
|
||||
A new function gtk_object_default_construct() is provided now which should
|
||||
be called after every gtk_type_new() to perfom the auto-construction
|
||||
* Improved argument support of several widgets
|
||||
* Bug Fixes
|
||||
|
||||
What is new in GTK+ 1.1.3:
|
||||
|
||||
* GtkCList/GtkCTree now have the ability to:
|
||||
- hide/show individual columns
|
||||
- disable/enable column resizing
|
||||
- set min and max for column widths
|
||||
- set expander style of the ctree
|
||||
- set/get row and cell styles
|
||||
- set spacing between tree expander and cell contents in ctree
|
||||
- toggle auto_resize for columns
|
||||
* Must enhanced DND support, removed old DND code
|
||||
* Idle functions are now implemented via GHook, giving a slight speed
|
||||
improvement
|
||||
* An environment variable GTK_MODULES which takes a colon seperated
|
||||
list of module names GTK+ will now automatically load at gtk_init() startup
|
||||
* GtkFontSel now has support for an extra 'base' filter
|
||||
* New function gdk_window_set_root_origin to get the real geometry taking
|
||||
into account window manager offsets
|
||||
* New function gtk_text_set_line_wrap to toggle line wrapping
|
||||
* New function gtk_widget_add_events which safely adds additional
|
||||
events to a widget's event mask
|
||||
* New function gdk_event_get_time to get the timestamp from a generic
|
||||
event
|
||||
* New widget GtkCalendar
|
||||
* New widget GtkInvisible - InputOnly offscreen windows used for reliable
|
||||
pointer grabs and selection handling in DND code
|
||||
* New functions gtk_object_remove_no_notify[_by_id] to remove a certain
|
||||
data portion without invokation of its destroy notifier
|
||||
* gtk_spin_button_construct is now deprecated, use gtk_spin_button_configure
|
||||
instead
|
||||
* gtk_clist_set_border is now deprecated, use gtk_clist_set_shadow_type
|
||||
instead
|
||||
* Removed functions gtk_object_set_data_destroy[_by_id]
|
||||
* Documentation additions/updates
|
||||
* HTML and plain text files are now included in the distribution
|
||||
* Bug fixes, typeness corrections, and general fixups
|
||||
|
||||
What is new in GTK+ 1.1.2:
|
||||
|
||||
* Gtk+ is now featuring runtime loading of dynamic modules via the
|
||||
--gtk-modules= command line switch. such modules have to export a
|
||||
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv);
|
||||
function which will be invoked to initialize the module. since such
|
||||
modules may create new widget types, they are always resident.
|
||||
* The tutorial has been updated again.
|
||||
* Changes to menus including tearoff menus and accelerators.
|
||||
* Better support for modal dialogs.
|
||||
* Removed CAN_FOCUS by default from scrollbars and button children of toolbar.
|
||||
* More improvements and fixes for GtkCList and GtkCTree (i.e. row sorting).
|
||||
* GtkCTree rows can be unselectable now.
|
||||
* The GtkCTree API has undergone major renames (see ChangeLog entry from Lars
|
||||
Hamann on Tue Aug 18 00:29:13 1998).
|
||||
* A bunch of varargs functions changed to get va_lists working on systems that
|
||||
implement va_lists as arrays.
|
||||
* Improvements to the gdkrgb code.
|
||||
* Improvements to Gdk color handling so we greatly reduce server traffic and
|
||||
don't leak colors anymore.
|
||||
* Improved internal widget tree iterators (the GtkContainer::foreach signal
|
||||
vanished because of this).
|
||||
* Option menus can have the keyboard focus now.
|
||||
* More fixups to the text widget.
|
||||
* GtkFileSelection should behave much more nicely in combination with AFS now.
|
||||
* Support for label underlining.
|
||||
* Support for GLib 1.1.3 log domains.
|
||||
* Documentation improvements.
|
||||
* Configuration fixes on various platforms.
|
||||
* Miscellaneous fixes to XInput support.
|
||||
* Build with shared library dependencies on Linux
|
||||
* Fix for a major bug in the type systems memory allocation code that could
|
||||
cause random crashes.
|
||||
* Libtool update to version 1.2b.
|
||||
* Lots of bugfixes and cleanups again ;)
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.1:
|
||||
|
||||
* Tutorial updates and additions.
|
||||
* Key binding support for GtkListItems and GtkList.
|
||||
* Extended selection mode and autoscrolling for GtkLists.
|
||||
* A GtkCtree now operates on GtkCTreeNode* structures rather than GList*.
|
||||
* GtkCTreeNodes can now be created from GNode trees.
|
||||
* Bug fixes for GtkNotebook, GtkCList, GtkCombo and GdkWindow reparentation.
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.0:
|
||||
|
||||
* New widget GtkFontSelector.
|
||||
* New featurefull progress bar.
|
||||
* New container widget GtkPacker.
|
||||
* New object GtkItemFactory, GtkMenuFactory is deprecated.
|
||||
* New key binding system, configurable via rcfiles, similar to styles.
|
||||
* New widget GtkCTree with drag selections and keyboard movement and
|
||||
and horizontal scrolling. Features also implemented for GtkCList.
|
||||
* Significant speedups to widget creation and destruction through caching
|
||||
colormap and visual queries to the XServer.
|
||||
* Speedups for type creation and especially gtk_type_is_a() checks.
|
||||
* Speedups in signal lookup, creation and emissions and connection handling.
|
||||
* Minor speedups with object data allocation and destruction.
|
||||
* Additions to the signal handling API (e.g. *_emitv).
|
||||
* Support for rc-file reparsing.
|
||||
* Resizing logic is now implemented on container widget basis, rather than
|
||||
for toplevel GtkWindows only.
|
||||
* Buttons support relief styles now.
|
||||
* Some widgets are now allocated through memchunks to behave more memory wise.
|
||||
* Minor speedups with object data allocation and destruction.
|
||||
* Newly included file gtkfeatures.h which defines compatibility macros to
|
||||
test for certain API features upon program compilation.
|
||||
* Child arguments support for container widgets.
|
||||
* Far better support for object arguments, revamp of the underlying
|
||||
mechanism for speed and reusability. Child/object arguments don't
|
||||
need to be preceeded by the "GtkType::" portion anymore.
|
||||
* Removed GtkAcceleratorTable in favour of GtkAccelGroup, accelerator display
|
||||
is now performed by a new widget GtkAccelLabel.
|
||||
* Overhaul of the resizing code. Resizing behaviour can now be specified
|
||||
on GtkContainer basis, so the underlying algorithm isn't only available
|
||||
for GtkWindows.
|
||||
* GtkTables are now fully resizable.
|
||||
* The GtkType system now supports an additional base class initialization
|
||||
function.
|
||||
* GtkStyles and key bindings can now be looked up depending on the base
|
||||
types of a widget, through a new keyword `class' in rc files.
|
||||
* GtkButton derives from GtkBin (finally).
|
||||
* More descriptive error messages on rc parsing.
|
||||
* Runtime information is available to query enum/flag definition values.
|
||||
* Cleanups to give less warnings on 64-bit platforms.
|
||||
* Many bugs fixed, including:
|
||||
- A segfault with selections on Solaris and IRIX.
|
||||
- A segfault that occured for all keypresses on Linux/Alpha.
|
||||
|
||||
Overview of Changes in GTK+ 1.0.1:
|
||||
|
||||
* Significant speedups to widget creation and destruction
|
||||
* Upgrade to libtool-1.2
|
||||
* Legions of bug fixes, memory leaks, segfaults, of-by-something errors...
|
||||
including those that already went into the 1.0.x branch.
|
||||
* A big bunch of features and cosmetic fixups that just got lost in
|
||||
the masses of changes.
|
||||
* Lots of bug fixes, including one that fixed a major memory leak
|
||||
in 1.0.0.
|
||||
|
||||
Overview of Changes in GTK+ 1.0.0:
|
||||
|
||||
* A few bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.10:
|
||||
|
||||
* Lots of bug fixes
|
||||
* Documentation improvements
|
||||
* Better looking handlebox
|
||||
* A few convenience functions
|
||||
|
||||
Overview of Changes in GTK+ 0.99.9:
|
||||
|
||||
* Added examples directory, even more examples soon
|
||||
* Added optional word wrap to gtktext
|
||||
* Changes to gtkhandlebox
|
||||
* Lots of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.8:
|
||||
|
||||
* Compilation and configuration fixes
|
||||
* DND Fixes
|
||||
* New test in testgtk: cursors
|
||||
* Tutorial updates/additions
|
||||
* Few more FAQ additions
|
||||
* More prep for 1.0
|
||||
|
||||
Overview of Changes in GTK+ 0.99.7:
|
||||
|
||||
* This release is mainly because 0.99.6 did not compile completely
|
||||
due to a missing file.
|
||||
* Fixes to Gtk's quit handlers.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.6:
|
||||
|
||||
* Intermediate release to become 1.0.
|
||||
* More signedness corrections for handler functions in gtkmain.h.
|
||||
* Semantics of GtkWidget::delete_event changed.
|
||||
* Documentation updates.
|
||||
* Inclusion of Gtk tutorial.
|
||||
* Implementation of a new shutdown method for GtkObject's executed prior to
|
||||
actual destruction. WARNING: this breaks binary compatibility, programs using
|
||||
Gtk need to be recompiled.
|
||||
* Clean ups due to compiler warnings.
|
||||
* Various widget fixes.
|
||||
|
||||
Overview of Fixes in GTK+ 0.99.5:
|
||||
|
||||
* Signal signedness and naming corrections
|
||||
* rc/style fixes
|
||||
* text, entry widget fixes
|
||||
* gtkeditable fixes
|
||||
* scrollbar flickering fixed
|
||||
* check casts are more descriptive
|
||||
* DND fixes
|
||||
* FAQ updates
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.4:
|
||||
|
||||
* Reference counting revolution integrated.
|
||||
Refer to docs/refcounting.txt on this issue.
|
||||
* Implementation of a decent debugging system, you would want
|
||||
to export GTK_DEBUG=objects if you are going to develop gtk applications,
|
||||
refer to docs/debugging.txt for further information.
|
||||
* Additions on the signal code for querying information about certain signals,
|
||||
and pending handlers of signals.
|
||||
* Support for user signals, and major changes to internal signal handler
|
||||
handling for proper signal removal and invokation of after signals.
|
||||
* Additional signals for various widgets e.g, GtkHandleBox::child_attached,
|
||||
GtkHandleBox::child_detached, GtkWidget::style_set, GtkWidget::parent_set.
|
||||
* GtkTooltips became a true descendant of GtkObject via derivation from
|
||||
GtkData and facilitates an extra tip string which can be used as e.g. an
|
||||
index into context help.
|
||||
* Split up of the widget/object flags into a private and a public portion,
|
||||
consult docs/widget_system.txt on this.
|
||||
* Support for hot keys on gtk programs via gtk_key_snooper_install().
|
||||
* Reimplementation of the *_interp functions as *_full functions to provide
|
||||
simple callback functions as well.
|
||||
* Idle functions are now prioritized.
|
||||
* Many enhancements to GtkNotebook.
|
||||
* New widget GtkSpinButton, check out testgtk.
|
||||
* New widget GtkTipsQuery for letting the user query tooltips of widgets.
|
||||
* Addition of GtkEditable base widget to encapsulate selection and
|
||||
clipboard handling. (GtkEntry and GtkText use this)
|
||||
* Text widget more complete.
|
||||
* Additions to GtkStatusBar to make it complete.
|
||||
* Gdk now supports regions.
|
||||
* Access masks for widget arguments (GTK_ARG_READABLE/GTK_ARG_WRITABLE).
|
||||
* Function replacements:
|
||||
g_string_hash() -> g_str_hash()
|
||||
g_string_equal() -> g_str_equal()
|
||||
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
||||
* Support for quit handlers in gtk_main().
|
||||
* Motif window mangaer hints support.
|
||||
* Widget arguments are now flagged for readability/writability.
|
||||
* Additions to documentation.
|
||||
* Various FAQ updates. (FAQ now included)
|
||||
* Clean ups and many many bug fixes by a lot of people all over the place.
|
||||
* New, long and descriptive ChangeLog entries for bored readers ;)
|
||||
|
||||
Overview of Changes in GTK+ 0.99.3:
|
||||
|
||||
* Filesel enhancement / stability changes
|
||||
* New widget, gtkcombo
|
||||
* Widgets in the toolbar do not get the focus
|
||||
* New widget, gtkstatusbar (still in-progress)
|
||||
* g_string_equal renamed g_str_equal
|
||||
* g_string_hash renamed g_str_hash
|
||||
* new gtkbox functions to allow modification of the child
|
||||
linkage after the widget tree is setup
|
||||
* gtk_*_get_arg() and gtk_*_set_arg() fixes and implementations
|
||||
* DND changes/fixes
|
||||
* Entry widget now has set_max_length function
|
||||
* Handlebox widget changes/fixes
|
||||
* Some work on text widget (still in-progress)
|
||||
* Now the toolbar supports arbitrary widgets as well
|
||||
* CList has resizable columns again
|
||||
* CList now looks consistant with scrolled windows
|
||||
* Remove flickering from entry widget
|
||||
* Added switch_page signal to notebook widget
|
||||
* Documentation additions
|
||||
* Other bug fixes...
|
||||
|
||||
124
NEWS.pre-1-0
124
NEWS.pre-1-0
@@ -1,124 +0,0 @@
|
||||
|
||||
Overview of Changes in GTK+ 1.0.0:
|
||||
|
||||
* A few bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.10:
|
||||
|
||||
* Lots of bug fixes
|
||||
* Documentation improvements
|
||||
* Better looking handlebox
|
||||
* A few convenience functions
|
||||
|
||||
Overview of Changes in GTK+ 0.99.9:
|
||||
|
||||
* Added examples directory, even more examples soon
|
||||
* Added optional word wrap to gtktext
|
||||
* Changes to gtkhandlebox
|
||||
* Lots of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.8:
|
||||
|
||||
* Compilation and configuration fixes
|
||||
* DND Fixes
|
||||
* New test in testgtk: cursors
|
||||
* Tutorial updates/additions
|
||||
* Few more FAQ additions
|
||||
* More prep for 1.0
|
||||
|
||||
Overview of Changes in GTK+ 0.99.7:
|
||||
|
||||
* This release is mainly because 0.99.6 did not compile completely
|
||||
due to a missing file.
|
||||
* Fixes to Gtk's quit handlers.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.6:
|
||||
|
||||
* Intermediate release to become 1.0.
|
||||
* More signedness corrections for handler functions in gtkmain.h.
|
||||
* Semantics of GtkWidget::delete_event changed.
|
||||
* Documentation updates.
|
||||
* Inclusion of Gtk tutorial.
|
||||
* Implementation of a new shutdown method for GtkObject's executed prior to
|
||||
actual destruction. WARNING: this breaks binary compatibility, programs using
|
||||
Gtk need to be recompiled.
|
||||
* Clean ups due to compiler warnings.
|
||||
* Various widget fixes.
|
||||
|
||||
Overview of Fixes in GTK+ 0.99.5:
|
||||
|
||||
* Signal signedness and naming corrections
|
||||
* rc/style fixes
|
||||
* text, entry widget fixes
|
||||
* gtkeditable fixes
|
||||
* scrollbar flickering fixed
|
||||
* check casts are more descriptive
|
||||
* DND fixes
|
||||
* FAQ updates
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.4:
|
||||
|
||||
* Reference counting revolution integrated.
|
||||
Refer to docs/refcounting.txt on this issue.
|
||||
* Implementation of a decent debugging system, you would want
|
||||
to export GTK_DEBUG=objects if you are going to develop gtk applications,
|
||||
refer to docs/debugging.txt for further information.
|
||||
* Additions on the signal code for querying information about certain signals,
|
||||
and pending handlers of signals.
|
||||
* Support for user signals, and major changes to internal signal handler
|
||||
handling for proper signal removal and invokation of after signals.
|
||||
* Additional signals for various widgets e.g, GtkHandleBox::child_attached,
|
||||
GtkHandleBox::child_detached, GtkWidget::style_set, GtkWidget::parent_set.
|
||||
* GtkTooltips became a true descendant of GtkObject via derivation from
|
||||
GtkData and facilitates an extra tip string which can be used as e.g. an
|
||||
index into context help.
|
||||
* Split up of the widget/object flags into a private and a public portion,
|
||||
consult docs/widget_system.txt on this.
|
||||
* Support for hot keys on gtk programs via gtk_key_snooper_install().
|
||||
* Reimplementation of the *_interp functions as *_full functions to provide
|
||||
simple callback functions as well.
|
||||
* Idle functions are now prioritized.
|
||||
* Many enhancements to GtkNotebook.
|
||||
* New widget GtkSpinButton, check out testgtk.
|
||||
* New widget GtkTipsQuery for letting the user query tooltips of widgets.
|
||||
* Addition of GtkEditable base widget to encapsulate selection and
|
||||
clipboard handling. (GtkEntry and GtkText use this)
|
||||
* Text widget more complete.
|
||||
* Additions to GtkStatusBar to make it complete.
|
||||
* Gdk now supports regions.
|
||||
* Access masks for widget arguments (GTK_ARG_READABLE/GTK_ARG_WRITABLE).
|
||||
* Function replacements:
|
||||
g_string_hash() -> g_str_hash()
|
||||
g_string_equal() -> g_str_equal()
|
||||
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
||||
* Support for quit handlers in gtk_main().
|
||||
* Motif window mangaer hints support.
|
||||
* Widget arguments are now flagged for readability/writability.
|
||||
* Additions to documentation.
|
||||
* Various FAQ updates. (FAQ now included)
|
||||
* Clean ups and many many bug fixes by a lot of people all over the place.
|
||||
* New, long and descriptive ChangeLog entries for bored readers ;)
|
||||
|
||||
Overview of Changes in GTK+ 0.99.3:
|
||||
|
||||
* Filesel enhancement / stability changes
|
||||
* New widget, gtkcombo
|
||||
* Widgets in the toolbar do not get the focus
|
||||
* New widget, gtkstatusbar (still in-progress)
|
||||
* g_string_equal renamed g_str_equal
|
||||
* g_string_hash renamed g_str_hash
|
||||
* new gtkbox functions to allow modification of the child
|
||||
linkage after the widget tree is setup
|
||||
* gtk_*_get_arg() and gtk_*_set_arg() fixes and implementations
|
||||
* DND changes/fixes
|
||||
* Entry widget now has set_max_length function
|
||||
* Handlebox widget changes/fixes
|
||||
* Some work on text widget (still in-progress)
|
||||
* Now the toolbar supports arbitrary widgets as well
|
||||
* CList has resizable columns again
|
||||
* CList now looks consistant with scrolled windows
|
||||
* Remove flickering from entry widget
|
||||
* Added switch_page signal to notebook widget
|
||||
* Documentation additions
|
||||
* Other bug fixes...
|
||||
38
README
38
README
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 1.2.7. GTK+, which stands for the Gimp ToolKit,
|
||||
This is GTK+ version 1.0.2. GTK+, which stands for the Gimp ToolKit,
|
||||
is a library for creating graphical user interfaces for the X Window
|
||||
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||
written in C with a very object-oriented approach.
|
||||
@@ -26,23 +26,13 @@ See the file 'INSTALL'
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking
|
||||
system. (http://bugs.gnome.org). To report a problem
|
||||
about GTK+, send mail to submit@bugs.gnome.org.
|
||||
To report a bug, send mail either to gtk-list, as mentioned
|
||||
above, or to gtk-bugs@gtk.org. If you send mail to gtk-list, you
|
||||
must be subscribed yourself.
|
||||
|
||||
The subject of the mail should describe your problem.
|
||||
In the body of the mail, you should first include
|
||||
a "pseudo-header" that gives the package and
|
||||
version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
In the mail include:
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.7
|
||||
|
||||
[ Please substitute 1.2.7 with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
* The version of GTK
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
@@ -74,22 +64,6 @@ Then describe the bug. Include:
|
||||
is produced running the test program with the --sync command
|
||||
line option.
|
||||
|
||||
An example of a bug report:
|
||||
|
||||
====
|
||||
To: submit@bugs.gnome.org
|
||||
From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.7
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
the demo, so it should be "handle boxes", to
|
||||
be like "buttons" or "check buttons".
|
||||
===
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
GTK+ is part of the GNOME CVS repository. At the current time, any
|
||||
person with write access to the GNOME repository, can make changes to
|
||||
GTK+. This is a good thing, in that it encourages many people to work
|
||||
on GTK+, and progress can be made quickly. However, GTK+ is a fairly
|
||||
large and complicated package that many other things depend on, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK+ that has been built up over the last 18 months, we'd like
|
||||
to ask people commiting to GTK+ to follow a few rules:
|
||||
|
||||
0) Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've
|
||||
been working on GTK+ for a while it probably isn't necessary
|
||||
to ask. But when in doubt, ask. Even if your change is correct,
|
||||
somebody may know a better way to do things.
|
||||
|
||||
If you are making changes to GTK+, you should be subscribed
|
||||
to gtk-devel-list@redhat.com. (Subscription address:
|
||||
gtk-devel-list-request@redhat.com.) This is a good place to ask
|
||||
about intended changes.
|
||||
|
||||
If you just want to make a trivial change, and don't want to subscribe,
|
||||
you can also mail gtk-bugs@gtk.org. Or, alternatively, you can look in
|
||||
the ChangeLog for somebody who has been making changes to the file
|
||||
you want to change and email them.
|
||||
|
||||
#gimp on byxnet (irc.gimp.org, irc2.gimp.org, irc3.gimp.org,
|
||||
irc.germany.gimp.org...)s also a good place to find GTK+ developers to
|
||||
discuss changes with, however, email to gtk-devel-list is the most
|
||||
certain and preferred method.
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
2) There must be a ChangeLog for every commit. (If you discover that
|
||||
you only committed half the files you meant to and need to fix that
|
||||
up, or something, you don't need a new ChangeLog entry. But in general,
|
||||
ChangeLog entries are mandatory.) Changes with out ChangeLog entries
|
||||
will be reverted.
|
||||
|
||||
3) There _must_ be a ChangeLog for every commit.
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are going to be changing many files in an experimental fashion,
|
||||
it probably is a good idea to create a separate branch for your changes.
|
||||
|
||||
* The ChangeLog entries should preferrably match in date format
|
||||
with the existing entries. You can set how emacs does this
|
||||
by using customize mode:
|
||||
|
||||
- M-x customize
|
||||
- set Programming/Tools/ChangeLog/Add Log Time Format to
|
||||
'Old Format'
|
||||
|
||||
Or, set the add-log-time-format to 'current-time-string in
|
||||
your .emacs file.
|
||||
|
||||
Owen Taylor
|
||||
13 Aug 1998
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
101
README.in
101
README.in
@@ -1,101 +0,0 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version @GTK_VERSION@. GTK+, which stands for the Gimp ToolKit,
|
||||
is a library for creating graphical user interfaces for the X Window
|
||||
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||
written in C with a very object-oriented approach.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
A mailing list is located at:
|
||||
gtk-list@redhat.com
|
||||
|
||||
To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
|
||||
(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking
|
||||
system. (http://bugs.gnome.org). To report a problem
|
||||
about GTK+, send mail to submit@bugs.gnome.org.
|
||||
|
||||
The subject of the mail should describe your problem.
|
||||
In the body of the mail, you should first include
|
||||
a "pseudo-header" that gives the package and
|
||||
version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
[ Please substitute @GTK_VERSION@ with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with the testgtk program that is built
|
||||
in the gtk/ subdirectory, that will be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior.
|
||||
As a last resort, you can also provide a pointer to a larger piece
|
||||
of software that can be downloaded.
|
||||
|
||||
(Bugs that can be reproduced within the GIMP are almost as good
|
||||
as bugs that can be reproduced in testgtk. If you are reporting a
|
||||
bug found with the GIMP, please include the version number of the GIMP
|
||||
you are using)
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary. If you do send a stack trace, and the error
|
||||
is an X error, it will be more useful if the stacktrace
|
||||
is produced running the test program with the --sync command
|
||||
line option.
|
||||
|
||||
An example of a bug report:
|
||||
|
||||
====
|
||||
To: submit@bugs.gnome.org
|
||||
From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
the demo, so it should be "handle boxes", to
|
||||
be like "buttons" or "check buttons".
|
||||
===
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches can be uploaded to the incoming/ directory on
|
||||
ftp.gtk.org. Please follow the instructions there, and include
|
||||
your name and email address in the README file.
|
||||
|
||||
If the patch fixes a bug, it is usually a good idea to include
|
||||
all the information described in "How to Report Bugs".
|
||||
154
README.nanox
154
README.nanox
@@ -1,154 +0,0 @@
|
||||
Gtk port to nano-X
|
||||
|
||||
STATUS
|
||||
|
||||
Once upon a time I got a few apps working, then started merging
|
||||
the new features added by Owen (32 bit sizes for windows and buffering).
|
||||
Since then I haven't found the time to work on it:-/
|
||||
|
||||
|
||||
TODO
|
||||
|
||||
Finish internal window manager abstraction or add proper support in nano-X.
|
||||
Fix event polling.
|
||||
Implement GdkImage, GdkRgb stuff.
|
||||
Put generic region code in generic gdk and/or use the region code from nano-X.
|
||||
Fix ugly automake stuff for make dist.
|
||||
|
||||
TODO in nano-X
|
||||
|
||||
We need to be able to clip and change the background of windows at runtime
|
||||
for apps to not look so ugly!
|
||||
Fonts: wait for better nano-X font implementation.
|
||||
Properties on windows.
|
||||
|
||||
|
||||
If you want to work on this port or get additional informnation, get in
|
||||
touch with me.
|
||||
To get the beast to compile you also need to apply the patch below
|
||||
(any auto* wizard here?): the issue of having two gtk libraries in the
|
||||
system needs to be addressed too, maybe use libgtk-x11-1.4.so and
|
||||
libgtk-nanox-1.4.so ...
|
||||
|
||||
Paolo Molaro
|
||||
lupus@linuxcare.com
|
||||
|
||||
|
||||
Index: acconfig.h
|
||||
===================================================================
|
||||
RCS file: /cvs/gnome/gtk+/acconfig.h,v
|
||||
retrieving revision 1.16
|
||||
diff -u -r1.16 acconfig.h
|
||||
--- acconfig.h 1999/03/20 00:52:29 1.16
|
||||
+++ acconfig.h 2000/05/06 11:52:38
|
||||
@@ -49,6 +49,8 @@
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
#undef SIGNAL_ARG_TYPE
|
||||
|
||||
+#undef USE_NANOX
|
||||
+
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
Index: configure.in
|
||||
===================================================================
|
||||
RCS file: /cvs/gnome/gtk+/configure.in,v
|
||||
retrieving revision 1.142
|
||||
diff -u -r1.142 configure.in
|
||||
--- configure.in 2000/05/04 00:29:46 1.142
|
||||
+++ configure.in 2000/05/06 11:52:38
|
||||
@@ -99,6 +99,8 @@
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
||||
|
||||
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
||||
+AC_ARG_ENABLE(nanox, [ --enable-nanox use nano-X instead of X11 [default=no]],
|
||||
+ , enable_nanox="no")
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
@@ -322,6 +324,8 @@
|
||||
saved_cflags="$CFLAGS"
|
||||
saved_ldflags="$LDFLAGS"
|
||||
|
||||
+if text "x$enable_nanox" = "xno"; then
|
||||
+
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
||||
|
||||
@@ -465,6 +469,13 @@
|
||||
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
||||
fi
|
||||
|
||||
+else
|
||||
+AC_CHECK_LIB(nano-X, GrOpen)
|
||||
+LIBS="-lnano-X $LIBS"
|
||||
+ AC_DEFINE(USE_NANOX)
|
||||
+AM_CONDITIONAL(USE_NANOX, test x$enable_nanox = xyes)
|
||||
+fi # if enable_nanox
|
||||
+
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
@@ -602,8 +613,13 @@
|
||||
esac
|
||||
],[
|
||||
# Currently we always use X11 on those systems where we run configure...
|
||||
+if test x$enable_nanox = xno; then
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_X11'
|
||||
+else
|
||||
+gdk_windowing='
|
||||
+#define GDK_WINDOWING_NANOX'
|
||||
+fi
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
gdk_wc='
|
||||
#define GDK_HAVE_WCHAR_H 1'
|
||||
@@ -629,6 +645,7 @@
|
||||
docs/Makefile
|
||||
gdk/Makefile
|
||||
gdk/x11/Makefile
|
||||
+gdk/nanox/Makefile
|
||||
gdk/win32/Makefile
|
||||
gtk/Makefile
|
||||
gtk/gtkfeatures.h
|
||||
Index: gdk/Makefile.am
|
||||
===================================================================
|
||||
RCS file: /cvs/gnome/gtk+/gdk/Makefile.am,v
|
||||
retrieving revision 1.41
|
||||
diff -u -r1.41 Makefile.am
|
||||
--- gdk/Makefile.am 2000/04/05 04:11:10 1.41
|
||||
+++ gdk/Makefile.am 2000/05/06 11:52:38
|
||||
@@ -1,6 +1,10 @@
|
||||
## Makefile.am for gtk+/gdk
|
||||
|
||||
+if USE_NANOX
|
||||
+SUBDIRS=win32 nanox
|
||||
+else
|
||||
SUBDIRS=x11 win32
|
||||
+endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
gdkconfig.h.win32 \
|
||||
@@ -36,8 +40,13 @@
|
||||
-lm \
|
||||
@STRIP_END@
|
||||
|
||||
+if USE_NANOX
|
||||
libgdk_la_LIBADD = \
|
||||
+ nanox/libgdk-nanox.la
|
||||
+else
|
||||
+libgdk_la_LIBADD = \
|
||||
x11/libgdk-x11.la
|
||||
+endif
|
||||
|
||||
#
|
||||
# setup source file variables
|
||||
@@ -138,3 +147,8 @@
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
+
|
||||
+noinst_PROGRAMS = simple
|
||||
+simple_DEPENDENCIES = libgdk.la simple.c
|
||||
+simple_LDADD = libgdk.la
|
||||
+
|
||||
45
README.win32
45
README.win32
@@ -1,45 +0,0 @@
|
||||
The Win32 port of GTk+ is a work in progress, and not as stable or
|
||||
correct as the Unix/X11 version. For more information about the Win32
|
||||
port, see http://www.gimp.org/tml/gimp/win32/ or
|
||||
http://www.iki.fi/tml/gimp/win32/ .
|
||||
|
||||
The current (CVS) version of the Win32 backend is *not* as stable as it
|
||||
was before the no-flicker branch was merged. A zipfile with that
|
||||
version is available from http://www.gimp.org/win32/. That should be
|
||||
use by "production" code until this CVS version is usable. (But note,
|
||||
the Win32 backend has never been claimed to be "production quality".)
|
||||
|
||||
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||
tools, or gcc-2.95 or later. The mingw setup of gcc is preferred, but
|
||||
you can run gcc also under cygwin-b20.1 or later. Compile in
|
||||
gdk\win32, gdk and gtk with `nmake -f makefile.msc` or `make -f
|
||||
makefile.cygwin`. The name makefile.cygwin is misleading, it should
|
||||
really be called makefile.mingw.
|
||||
|
||||
See the README.win32 file in the GLib distribution for instructions
|
||||
how to build with gcc.
|
||||
|
||||
To use GTk+ on Win32, you also need either of the above mentioned
|
||||
compilers. Other compilers might work, but don't count on it. The
|
||||
same instructions on how to set up a correct version of gcc should
|
||||
also be followed if you want to build applications that use GTk+ with
|
||||
gcc.
|
||||
|
||||
The tablet support uses the Wintab API. The Wintab development kit can
|
||||
be downloaded from http://www.pointing.com. If you don't care for
|
||||
that, undefine HAVE_WINTAB in config.h.win32 and remove references to
|
||||
the wntab32x library from the makefile before building.
|
||||
|
||||
GTk+ wants to be built with the GNU "intl" library for
|
||||
internationalisation (i18n). Get the version ported to Win32 (not a
|
||||
very big deal) from tml's web site mentioned above. We build the
|
||||
"intl" library as a DLL called gnu-intl.dll (the "gnu" prefix is used
|
||||
to reduce name clash risks). If you don't want any i18n stuff,
|
||||
undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
|
||||
config.h.win32 file, and remove references to the gnu-intl library
|
||||
from the makefiles.
|
||||
|
||||
Note that while the GNU gettext package is under the GPL, the "intl"
|
||||
part of it which is distributed with GNU libc is under the LGPL (like
|
||||
GTk+ or GLib). We want the LGPL one, even if they are the same, more
|
||||
or less.
|
||||
228
TODO
228
TODO
@@ -1,26 +1,122 @@
|
||||
Bugs:
|
||||
* Scrolled windows (GtkList?) get cought in an endless reallocation loop
|
||||
under certain (rare) circumstances.
|
||||
|
||||
Outstanding items:
|
||||
|
||||
* focus handling for GtkOptionMenu (needs the previous)
|
||||
|
||||
* implement gtk_default_draw_oval and other missing things in gtkstyle.c.
|
||||
* Widget redrawing when the window resizes sometimes messes up.
|
||||
GtkLabels sometimes redraw without clearing up the underlying background on
|
||||
window resizes.
|
||||
|
||||
* delay dnd settings to take effect once a widget is realized, this is
|
||||
to avoid force realizations. i think this goes along with owens dnd
|
||||
changes?
|
||||
-timj
|
||||
The way DND data types are set in GtkWidget really needs to be fixed.
|
||||
This is pretty high on my priority list, and I'll get to it as soon as
|
||||
the column list widget is done. The correct way dnd data needs to be set
|
||||
is to have a additional keyed data type with GtkWidget, which is applied to
|
||||
the widget's window upon realize.
|
||||
There also needs to be a way to set dnd-data on widget windows which are
|
||||
not the main window (for widgets that create more than one window).
|
||||
-Jay Painter
|
||||
DnD seems to work for me, but yes, there needs to be some sort of
|
||||
gtk_widget layer that makes it easier... Also, adding support for drop
|
||||
zones might be nice.
|
||||
-Elliot
|
||||
This one is reproducabel for me:
|
||||
testgtk --sync
|
||||
popup colorselection
|
||||
drag/drop works
|
||||
start up preview color
|
||||
drag works but not dropping
|
||||
end preview color
|
||||
drag/drop works
|
||||
start up prewiev color
|
||||
segfault in malloc
|
||||
-timj
|
||||
|
||||
* Change bitfields to guints from enums, or vice versa?
|
||||
|
||||
* Expose events aren't being generated correctly for DND demo
|
||||
|
||||
Additions:
|
||||
* GScanner: it might be good to ues stdio and getch() instead of 1-character
|
||||
reads. so one can take advantage of buffering. Currently each read() takes
|
||||
a separate syscall.
|
||||
|
||||
* implement gtk_default_draw_oval
|
||||
|
||||
* Lists should scroll to center the recently selected item if it isn't
|
||||
visible.
|
||||
|
||||
* enforce invariants on *_RESIZE* and *_REDRAW* flags.
|
||||
|
||||
* GtkToolTips: allocate GtkTooltipsData from memchunks
|
||||
* asure that child widgets are really get gtk_widget_destroy()ed in their
|
||||
parents destroy handler, and not just unparented or somesuch.
|
||||
|
||||
* GtkToolTips:
|
||||
allocate GtkTooltipsData from memchunks
|
||||
look into incorporation of outdated/gtk-dairiki-971208-[01].patch.gz
|
||||
|
||||
* Make widget attributes configurable after the widget is created (timj).
|
||||
|
||||
* Change gtk_widget_propagate_default_style() mechanism to
|
||||
void gtk_rc_string_export (const gchar *rc_additions,
|
||||
gboolean override_rc_styles);
|
||||
|
||||
* Should release grab before activating menu item (and remove
|
||||
menu from screen?)
|
||||
|
||||
* Make all widget attributes configurable after the widget is created (timj).
|
||||
|
||||
* Radio buttons need to display CAN/HAS_DEFAULT correctly, if draw_inidicator
|
||||
is TRUE. (Radio buttons do not need to CAN_DEFAULT! OWT)
|
||||
* Widgets dervied from GtkButton need to be able to override
|
||||
GtkButtonClass.paint. e.g. redrawing of GtkToggleButton with CAN_DEFAULT
|
||||
is messed up otheriwse. This does in fact not only apply to (toggle)buttons,
|
||||
we should introduce a common paint member for the GtkWidgetClass.
|
||||
|
||||
* Radio buttons need to display CAN/HAS_DEFAULT correctly.
|
||||
|
||||
* More dialogs: Print, maybe others...
|
||||
* GtkCList improvements. (Jay Painter)
|
||||
|
||||
* Seperate GtkObject and signaling system from Gdk dependancies?
|
||||
|
||||
* move *_input_add (wrappers for select(2)) mechanism into glib.
|
||||
|
||||
* Make sure a widget added to a list is a list item and a widget added
|
||||
to a menu is a menu item, etc. GTK_BASIC was a first attempt at this,
|
||||
but it fails with subsequent container_add()s. maybe have another
|
||||
GTK_PARENT_BASIC (similar to GTK_PARENT_SENSITIVE) flag, to prevent
|
||||
tree iterations upon every container addition.
|
||||
|
||||
* gdk_expose_compress: ala-Xt, this would really help for opaque moves and
|
||||
such
|
||||
|
||||
* Entry should have a password mode (and it should show stars
|
||||
for user feedback).
|
||||
|
||||
* Entry should allow set_usize to work better, and should compute
|
||||
a different width when a maximum length is used.
|
||||
|
||||
* More dialogs: Print, GtkFontSelector, maybe others...
|
||||
|
||||
* Multiple document interface (MDI)?
|
||||
|
||||
* Support another widget style? Should be possible using GtkStyle's, but
|
||||
there may be some work needed to remove any style dependencies in widget
|
||||
code. Maybe GtkStyle's should have 'draw_push_button', 'draw_check_button',
|
||||
etc, functions to draw the various widgets.
|
||||
This will be covered by upcoming themability, raster is working on it.
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* More work on Documentation
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* The "--geometry" option should be supported
|
||||
* Rewrite the interface to the i18n stuff so GTK widgets don't need to
|
||||
retrieve X values, and so they don't have to know the value of the
|
||||
XNxxx character constants.
|
||||
|
||||
* The "-geometry" option should be supported
|
||||
|
||||
- Having gdk_init() parse the geometry option. (putting it into
|
||||
GDK means you can use XParseGeometry() without wrapping it)
|
||||
@@ -42,31 +138,74 @@ Outstanding items:
|
||||
( You'd have to extend gdk_window_set_hints to accept the
|
||||
window gravity option to get it right. )
|
||||
|
||||
* Allow moving the separator for paned widgets by dragging
|
||||
? Allow moving the separator for paned widgets by dragging
|
||||
it directly instead of using the handle.
|
||||
|
||||
? Mark public use of gtk_tree_remove_item as deprecated - it should be used
|
||||
as:
|
||||
gtk_container_remove (GTK_CONTAINER(tree), widget);
|
||||
|
||||
* Standardize that all strings should be passed as gchar *, not
|
||||
guchar *. But what about non-string data? (gdk_property_change,
|
||||
gtk_selection_data_set) X makes these sort of things guchar...
|
||||
|
||||
* Check into XAddConnectionWatch - is this needed for XIM?
|
||||
|
||||
* Places where a _full variant is needed:
|
||||
|
||||
gtk_clist_set_row_data
|
||||
gtk_init_add
|
||||
gtk_menu_popup
|
||||
gtk_toolbar_prepend_element
|
||||
gtk_toolbar_insert_element
|
||||
gtk_widget_dnd_data_set (should be guchar * with a copy?
|
||||
shouldn't be there at all...)
|
||||
??? GtkDrawingarea.draw_data
|
||||
|
||||
* gtk_rc_add_[name/class]_style are broken for bg pixmaps, because
|
||||
styles are broken for bg pixmaps, and RC styles only hack around
|
||||
that.
|
||||
|
||||
* Try to rationally deal with someone else deleting one of our
|
||||
windows??? This would mean keeping track of our window heirarchy
|
||||
ourselves, for one thing, and will never be safe, because of
|
||||
race conditions.
|
||||
|
||||
* --g-fatal-warnings flag that does
|
||||
g_set_warning_handler ((GWarningHandler)g_error);
|
||||
|
||||
* If a window spontaneously resizes itself N times before any
|
||||
ConfigureNotify events are received, then due to the interaction
|
||||
of the ConfigureNotify compression code in GDK and the resize
|
||||
count used for the window, the window will be size_allocated
|
||||
the next N-1 times it is moved.
|
||||
|
||||
Fix: Only send GDK_EVENT_CONFIGURE when the window is resized,
|
||||
create a new event type for toplevel motion. (GDK_EVENT_REPOSITION?)
|
||||
and eliminate the resize count in GtkWindow.
|
||||
|
||||
* Generic ScrolledWindow interface, which provide automatic scrollbar
|
||||
capability to Viewport, Text, and CList widgets.
|
||||
|
||||
GTK_POLICY_NEVER for scrolled windows.
|
||||
|
||||
* Consider caching more state in GdkWindowPrivate. Currently,
|
||||
every widget realization involves a XGetGeometry and a
|
||||
XGetWindowAttributes. And every GdkWindow destruction
|
||||
involves a XQueryTree.
|
||||
|
||||
* Scrolled windows need to be smarter about when they size-request/allocate
|
||||
their children. In particular, we should not be queuing the resizes
|
||||
on the toplevel window, but on the Viewport.
|
||||
|
||||
* Should all the default handlers really return FALSE? This can
|
||||
cause confusing presses to be sent to containers that actually
|
||||
want to get events on themselves.
|
||||
|
||||
* The menu code should skip separators during keyboard navigation,
|
||||
whether they are sensitive or insensitive.
|
||||
* Fix block_resize, disable_resize.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
* Buttons's should derive from Bin's. (GTK 2.0 change, breaks
|
||||
lots of stuff)
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
@@ -77,7 +216,7 @@ Text/Edit widget:
|
||||
Improvements:
|
||||
|
||||
- Unify the key binding support in some fashion between the
|
||||
Entry and Text widget widgets, use GtkBindings for this.
|
||||
Entry and Text widget widgets (???)
|
||||
|
||||
- Figure out a way not to recompute the geometry on insertions/deletions
|
||||
which are large, but not a significant fraction of the
|
||||
@@ -139,62 +278,3 @@ Text/Edit widget:
|
||||
|
||||
- "changed" emitted when doing deletes on empty Text widget.
|
||||
|
||||
- Delete IC in editable->unrealize, not editable->finalize?
|
||||
|
||||
Themes
|
||||
======
|
||||
|
||||
- When a scale gets shown/hidden only queue a redraw on the
|
||||
non-window portion, not the whole area.
|
||||
|
||||
- In various places, to avoid shaping windows excessively,
|
||||
we set parent relative backgrounds. This is an ugly
|
||||
hack and needs a better solution. Plus, I don't think
|
||||
these parent-relative backgrounds always persist to
|
||||
when they are actually needed.
|
||||
|
||||
Such calls exist in: GtkButton, GtkHandeBox, GtkItem,
|
||||
GtkListItem, GtkMenu, GtkMenuItem, GtkMisc,
|
||||
GtkNoteBook, GtkOptionMenu, GtkPaned, GtkPreview,
|
||||
GtkSpinButton and GtkTreeItem.
|
||||
|
||||
- For menus and for GtkWindow's, the realize() function
|
||||
calls paint(), so that background pixmaps can be set
|
||||
ahead of time, and prevent flashing when the window is
|
||||
shown. This is an ugly hack and needs a better solution.
|
||||
|
||||
=======
|
||||
|
||||
Calendar Widget:
|
||||
|
||||
- The widget should be nicely resizeable vertical too.
|
||||
|
||||
- CALENDAR_MARGIN should be removed, uses INNER_BORDER and
|
||||
style->class->[xy]thickness insted.
|
||||
|
||||
- Flag to choose between using standard three letter abbreviated
|
||||
weekday name or just the first character from it. It looks like
|
||||
that is what most other calendar-widgets do.
|
||||
|
||||
- Arrows should resize with the header-font.
|
||||
|
||||
- The keyboard support has to be finished.
|
||||
|
||||
DND
|
||||
===
|
||||
|
||||
- Use a cursor instead of an ICON when over Motif windows,
|
||||
to get rid of the current junk that Motif leaves because
|
||||
of its XCopyArea stupidity for doing highlighting.
|
||||
|
||||
- Add a GTK_DRAG_VERIFY target flag and a "drag_data_verify"
|
||||
signal so that apps can easily check if a, say,
|
||||
text/uri-list URL looks OK during the drop.
|
||||
|
||||
- Check more for memory leaks.
|
||||
|
||||
- Drag and drop for Entry and Text widgets.
|
||||
|
||||
- Send synthetic motion events on structure changes so
|
||||
drag_enter/leave get sent properly. (See the popup
|
||||
in testdnd)
|
||||
|
||||
739
TODO.xml
739
TODO.xml
@@ -1,739 +0,0 @@
|
||||
<!-- This is used to generate the online TODO list for GTK+ using
|
||||
the script docs/make-todo. Whenever a change to this file is
|
||||
committed to CVS,the file is run through make-todo and the online
|
||||
version updated. If you modify this file, you should check for
|
||||
parse errors by running:
|
||||
|
||||
$ docs/make-todo TODO.xml > /dev/null
|
||||
|
||||
before committing, or you may screw up the online version -->
|
||||
<todo logourl="gtk-logo-rgb.gif">
|
||||
<title>GTK+ TODO list</title>
|
||||
<section>
|
||||
<title>GDK</title>
|
||||
|
||||
<entry size="medium" status="70%" target="1.4">
|
||||
<title>Add backing store support</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+'s drawing model involves clearing to a background, and
|
||||
then drawing widgets on top of this. Without having
|
||||
backing-store support, this results in flickering in various
|
||||
situations. Backing store cannot be added widget-by-widget,
|
||||
because the drawing in a particular window is not confined
|
||||
to a single widget. Instead it needs to be added per GDK
|
||||
window.
|
||||
</p>
|
||||
<p>
|
||||
The way this is done is by having
|
||||
<tt>gdk_window_begin_paint()</tt>
|
||||
and <tt>gdk_window_end_paint()</tt> functions that
|
||||
redirect all drawing to a particular window to an offscreen
|
||||
pixmap, and then copy that offscreen pixmap back onto the
|
||||
screen when the paint operation is done. The implementation
|
||||
of this is mostly complete in the <tt>gtk-no-flicker</tt> branch of
|
||||
GTK+.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="70%" target="1.4">
|
||||
<title>32 Bit Coordinates</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+-1.2 and earlier share X's limitation on the
|
||||
size of coordinates and restrict all dimensions
|
||||
to 16 bit quantities. By clever use of X it is
|
||||
possible to lift this restriction and present a
|
||||
full 32-bit space to the user.
|
||||
</p>
|
||||
<p>
|
||||
There are some difficulties with performance in this
|
||||
approach - mostly because scrolling can involve mapping and
|
||||
unmapping lots of widgets, but in general, current
|
||||
trials in this area seem to work pretty well.
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.gtk.org/~otaylor/gtk/1.4/gdk-drawing.html</url>
|
||||
<contact>Owen Taylor <otaylor@redhat.com></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Customizable double-click timeout</title>
|
||||
<description>
|
||||
<p>
|
||||
The current fixed double-click timeout in GTK+
|
||||
is too small for some users. This needs to be
|
||||
customizable
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
<bugs>#3958</bugs>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Make color handling more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Add some color convenience functions; such as a way to get an
|
||||
allocated GdkColor from GdkRGB, and export functions from gtkstyle.c
|
||||
that lighten/darken a given color, and set a color from HSV in
|
||||
addition to RGB. Also, consider having static variables that contain
|
||||
preallocated common colors (gdk_blue, gdk_red, etc.), the problem
|
||||
being colormap issues.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Cursors</title>
|
||||
<description>
|
||||
<p>
|
||||
Two tasks: 1) move the cursors in the cursor font that people actually
|
||||
care about to the top of the gdkcursor.h header file, and put a nice
|
||||
list of the 15 cursors people actually care about in the docs 2) if
|
||||
the cursor font lacks some commonly-useful cursors (like magnifying
|
||||
glass), add these cursors to gdkcursor.h and then emulate them in
|
||||
gdk_cursor_new by transparently creating the cursor from a bitmap.
|
||||
The list of Qt cursors is worth http://doc.trolltech.com/qcursor.html
|
||||
looking at for this task.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>Make GdkRGB work on any visual</title>
|
||||
<description>
|
||||
<p>
|
||||
GdkRGB should be able to render to an arbitrary visual
|
||||
(i.e. the visual shouldn't be fixed at gdk_rgb_init()
|
||||
time). This will break gdk_rgb_gc_set_foreground() and
|
||||
friends, though.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GDK -->
|
||||
|
||||
<section>
|
||||
<title>Internationalization</title>
|
||||
|
||||
<entry size="big" status="70%" target="1.4">
|
||||
<title>Integrate Pango</title>
|
||||
<description>
|
||||
<p>
|
||||
The purpose of the Pango project is to provide a system for
|
||||
layout and rendering of internationalized text. It handles
|
||||
most of the issues necessary to
|
||||
</p>
|
||||
</description>
|
||||
<url>http://www.pango.org</url>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="80%" target="1.4">
|
||||
<title>Switch to using UTF-8</title>
|
||||
<description>
|
||||
<p>
|
||||
This is closely related to Pango integration. Pango deals
|
||||
with all strings in terms of UTF-8; by switching GTK+ over
|
||||
to UTF-8 we make it considerably simpler for developers to
|
||||
support multiple languages properly while still retaining
|
||||
a large degree of compatibility with existing programs.
|
||||
</p>
|
||||
<p>
|
||||
Some work has already been done on this as part of the Win32
|
||||
port, since the Win32 port is currently using UTF-8 for all
|
||||
strings. In general, this should be an easy job; the hardest
|
||||
parts are places like GtkFileSelection, cut and paste, and
|
||||
input method support where there is interaction between GTK+
|
||||
and the operating system.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="40%" target="1.4">
|
||||
<title>Rewrite Input Method Support</title>
|
||||
<description>
|
||||
<p>
|
||||
Support for Input Methods is GTK+-1.2 is done via XIM, with
|
||||
supported styles being over-the-spot and the root-window
|
||||
styles. However, the over-the-spot style is not going to
|
||||
work well with the Pango integration, since it relies on the
|
||||
text rendering in the program being done in the standard
|
||||
Xlib style, so it will be necessary to also support
|
||||
on-the-spot input. On-the-spot input is done by supplying a
|
||||
set of callbacks that are invoked by the input methods.
|
||||
</p>
|
||||
<p>
|
||||
GTK+-1.4 will have a new system with loadable input method
|
||||
modules. These modules can either be implemented using XIM,
|
||||
or written from scratch.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
</section> <!-- i18n -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Core</title>
|
||||
|
||||
<entry size="big" status="5%" target="1.4">
|
||||
<title>GLib based object and type system</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ object system is already in use in quite a few different
|
||||
non-GUI applications; it would be desirable for these uses
|
||||
to have the object and type systems separated from the GUI portions
|
||||
of GTK+ and be generalized for non-GUI usage.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="1%" target="1.4">
|
||||
<title>Overall callback improvements</title>
|
||||
<description>
|
||||
<p>
|
||||
The GTK+ type and signal systems need significant improvements to
|
||||
allow signal creation with default handlers from language bindings
|
||||
and to aid language bindings in deriving new objects.
|
||||
One aspect of this is the Closure support, recently suggested by
|
||||
Karl Nelson <kenelson@ece.ucdavis.edu>, but this also
|
||||
requires a GLib based type and parameter system (ties in with
|
||||
"GLib based object and type system").
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="1.4">
|
||||
<title>State change notification</title>
|
||||
<description>
|
||||
<p>
|
||||
GTK+ objects emit various types of signals, some to perform
|
||||
arbitrary actions, some to allow customization from user code,
|
||||
and some signals are emitted to notify of certain changes
|
||||
of an object. For the latter, what really is required is a
|
||||
gneneric signal that can be used to monitor *any* kind of object
|
||||
changes. For that, all object changes need to be routed through
|
||||
a central point (otherwise the signal emissions are spread all
|
||||
over the object implementation), i.e. an object argument setter.
|
||||
The state change notification signal doesn't need to be emitted
|
||||
syncronously, in fact, it's probably most effective to always
|
||||
emit this asynchronously, so subsequent changes are accumulated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="5%" target="1.4">
|
||||
<title>Widget as sensitivity/grab state machine</title>
|
||||
<description>
|
||||
<p>
|
||||
Maintenance of pointer and keybnoard grabs is currently very
|
||||
tedious and error-prone, most widget's cook up their own stuff
|
||||
in this regard.
|
||||
By moving the general concept of "Grabs" to the GTK+ level as
|
||||
a widget state, and providing a new signal for alterations of
|
||||
a widget's state ("visible", "visible+insensitive",
|
||||
"visible+grab", "hidden", "hidden+insensitive", etc.), things
|
||||
can be unified and more stabelize. A couple of bugs, such as
|
||||
insensitive widgets still holding a grab, or buttons that
|
||||
still think they are depressed when hidden, will be squeezed
|
||||
automatically with that.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="1.4">
|
||||
<title>Allow argument customization</title>
|
||||
<description>
|
||||
<p>
|
||||
Many types of object arguments (expander style in the CList,
|
||||
default padding in button boxes, etc), conceptually go with
|
||||
the theme, or as user preferences; they should not be set by
|
||||
a particular program.
|
||||
</p>
|
||||
<p>
|
||||
There needs to be a mechanism for themes to be able to
|
||||
control these arguments from the RC file.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>Allow global customization</title>
|
||||
<description>
|
||||
<p>
|
||||
There are a number of global parameters in GTK+ and GDK that should be
|
||||
customizable by the user, such as the double-click timeout,
|
||||
or whether widgets should be backing-stored by default.
|
||||
</p>
|
||||
<p>
|
||||
If we had argument customization from an RC file, it might
|
||||
be possible to do this simply with a global object with
|
||||
arguments for the various global parameters that was
|
||||
customized in the same fashion as object arguments.
|
||||
</p>
|
||||
</description>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Gtk+ Modules installation directory</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+ needs to support an extra lib/ directory, to search
|
||||
for dynamically loadable modules, it also needs to support
|
||||
an environment variable to specify module search paths.
|
||||
This has quite some cross-platform issues with the GModule
|
||||
code (especially on AIX).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Convenient widget setup</title>
|
||||
<description>
|
||||
<p>
|
||||
Make it simpler to set all the basic attributes of a widget. Might
|
||||
want set_tooltip(), set_accel(), set_color(FOREGROUND, color),
|
||||
set_min_size() (usize does this, but needs a rename), set_whatsthis(),
|
||||
etc. set_accel() may not work for all widgets, may need a convenience
|
||||
API for button and label accelerators specifically.
|
||||
</p>
|
||||
<p>
|
||||
The idea is that it should be easy, out of the box, to set up a widget
|
||||
with all the nice touches and features the widget really should
|
||||
have. Users shouldn't need to do their own convenience functions for
|
||||
this.
|
||||
</p>
|
||||
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 1.4">
|
||||
<title>Make selections/clipboard more convenient</title>
|
||||
<description>
|
||||
<p>
|
||||
Make GtkSelectionData more like the MIME blobs in Swing and Qt.
|
||||
Consider a GtkClipboard object to simplify cut-and-paste handling.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="small" status="50%" target="1.4">
|
||||
<title>Stock label/icon system</title>
|
||||
<description>
|
||||
<p>
|
||||
A system like GnomeStock for getting a standard labels/icons
|
||||
for menus and toolbars. Should be extensible by themes, and
|
||||
by libgnomeui. Some work already done on this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="big" status="0%" target="> 1.4">
|
||||
<title>Session Management</title>
|
||||
<description>
|
||||
<p>
|
||||
Look in to session management. Consider whether to use
|
||||
X11R6 SM, or some custom spec shared with KDE. Create
|
||||
GTK+ API for this.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 1.4">
|
||||
<title>Online help enhancements</title>
|
||||
<description>
|
||||
<p>
|
||||
Look at a small "What's This" popup widget,
|
||||
and a What's This system in general (this part
|
||||
could maybe be done for 1.4). A more difficult, probably
|
||||
a post-1.4 task, is to integrate a very simple little
|
||||
help browser gizmo into GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>GUI-editable means of user configuration</title>
|
||||
<description>
|
||||
<p>
|
||||
Need to be able to set double click time, whether cursors
|
||||
blink, etc., from a control panel type of deal.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- Core -->
|
||||
|
||||
<section>
|
||||
<title>GTK+ Widgets</title>
|
||||
|
||||
<entry size="small" status="50%" target="1.4">
|
||||
<title>Make GtkFrame use a label</title>
|
||||
<description>
|
||||
<p>
|
||||
The title of a frame should simply be another child widget
|
||||
which, by default, holds a label widget. This will important
|
||||
with Pango where proper text behavior will be more complex to
|
||||
implement, but is also useful for certain user-interface
|
||||
designs. (It can be useful, for example, to put a checkbutton
|
||||
in that slot.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="75%" target="1.4">
|
||||
<title>Replace GtkText Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
The GtkText widget is badly in need of replacement, since it
|
||||
is buggy and insufficiently feature rich. This is being done
|
||||
using Havoc Pennington's port of the Tk Text widget.
|
||||
</p>
|
||||
<p>
|
||||
As part of this job <a href="http://www.pango.org">Pango</a>
|
||||
support is being added to the replacement. The structure of
|
||||
the Tk text widget port is suited to this as it works
|
||||
paragraph-by-paragraph, and Pango works at a sub-paragraph
|
||||
scale. The main remaining tasks here are to implement
|
||||
incremental reflow to make performance acceptable and to
|
||||
implement embedded pixmaps and widgets.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Improve Radio/Checkbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
The default look for the radio and checkbuttons is both
|
||||
unattractive and not friendly to the user . Motif did not
|
||||
get this one right, and we should not keep on following the
|
||||
Motif look. The right thing here is probably to copy the
|
||||
Windows appearance for these controls fairly closely. This
|
||||
will fit in with well with the rest of the GTK+ look.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Improve Submenu Navigation</title>
|
||||
<description>
|
||||
<p>
|
||||
Navigating through a deep menu tree in GTK+ is currently
|
||||
quite tricky, because as soon as one leaves a menu item,
|
||||
the submenu disappears. The way that the Macintosh is
|
||||
reputed to handle this is that to pop down the current
|
||||
submenu, you have to leave the triangle defined by the
|
||||
upper left hand corner of the menu item and right
|
||||
side of the submenu.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4 ?">
|
||||
<title>Improve Spinbutton Look</title>
|
||||
<description>
|
||||
<p>
|
||||
Spinbuttons currently appear to have lumpy boundaries,
|
||||
because sides of the arrows aren't at an angle that
|
||||
meshes well with the pixel grid. However, fixing this
|
||||
would require making the spinbuttons narrower and
|
||||
harder to hit. This points out a general problem with
|
||||
the spinbutton (and the arrows on the scrollbars) - the
|
||||
target area for clicks actually the bounding box of the
|
||||
arrows, but the user thinks that they must click on the
|
||||
arrows themselves. It would probably be more friendly
|
||||
to use a square button with an arrow drawn on top instead
|
||||
of a arrow-shaped button, the approach taken by most other
|
||||
windowing systems.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="90%" target="1.4">
|
||||
<title>Supply horizontable/vertical wrapping boxes</title>
|
||||
<description>
|
||||
<p>
|
||||
An often requested feature are wrapping containers, at this
|
||||
point, gimp's development version already uses such widgets:
|
||||
horizontable/vertical wrap boxes, that need to go into 1.4
|
||||
proper at some point.
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="90%" target="1.4">
|
||||
<title>Improved generic combo support</title>
|
||||
<description>
|
||||
<p>
|
||||
Gtk+'s combo box has several drawbacks in design and
|
||||
implementation. An new attempt at providing the combo box
|
||||
functionality with improved flexibility has been made with
|
||||
the GtkClueHunter widget, sitting in the CVS module "gle".
|
||||
</p>
|
||||
</description>
|
||||
<contact>Tim Janik <timj@gtk.org></contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 1.4">
|
||||
<title>Add unified set of List/Tree/Grid widgets</title>
|
||||
<description>
|
||||
<p>
|
||||
Currently, GTK+ has a large number of list and tree widgets
|
||||
(GtkList, GtkTree, GtkCList, GtkCTree), none of which are
|
||||
ideal. The GtkList and GtkTree widgets perform badly on large
|
||||
number of items. (GtkTree widget is also quite buggy.) GtkCList
|
||||
and GtkCTree mostly solve the size problem, but are quite
|
||||
complex and, despite that, not very flexible. They are limited to
|
||||
displaying pixmaps and text, and can neither support arbitrary
|
||||
widgets nor custom drawing functions.
|
||||
</p>
|
||||
<p>
|
||||
In addition to list and tree widgets, a closely related need
|
||||
is a sheet widget that displays a (possibly editable) 2-D grid.
|
||||
It would be desirable to have a complete set of widgets that
|
||||
could be presented as the one-true-solution for these needs.
|
||||
Model/View techniques could be used effectively to increase
|
||||
both the simplicity and power of the interfaces.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>GtkPixbuf</title>
|
||||
<description>
|
||||
<p>
|
||||
gdk-pixbuf is moving to become a GTK+ dependency, a new image-display
|
||||
widget is thus needed.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Attempt to fix GtkStatusbar</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkStatusbar is too inconvenient to use.
|
||||
The only non-breakage-inducing fix we could
|
||||
come up with is to permit 0 as a context ID, so you
|
||||
don't have to use gtk_statusbar_get_context_id().
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="95%" target="1.4">
|
||||
<title>Decruft GtkProgress, GtkProgressbar</title>
|
||||
<description>
|
||||
<p>UPDATE: this is done, just need to apply the patch.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This interface is just a disaster of overcomplexity;
|
||||
it should pretty much just be set_percentage(),
|
||||
pulse() (to move during activity mode), and set_text().
|
||||
There's no reason that there are two objects, should
|
||||
just be one interface. Almost all the functions
|
||||
that currently exist should be deprecated.
|
||||
</p>
|
||||
</description>
|
||||
<contact>hp@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Entry validation hooks</title>
|
||||
<description>
|
||||
<p>
|
||||
Simple hooks for validation in a GtkEntry. Pretty much just a
|
||||
"validate" callback which takes a string (current entry contents) and
|
||||
returns either VALID, INVALID, or COULDBEVALID. Then the
|
||||
GtkEntry calls this function if it's set, and does the appropriate
|
||||
UI things. GTK should come with validators for int and float,
|
||||
see GtkSpinButton where these are already implemented.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 1.4">
|
||||
<title>pseudo-MDI Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget that lets you rearrange various views (similar to many
|
||||
IDEs, like Visual SlickEdit or JBuilder). Basically there should be a
|
||||
central slot and 4 slots around the sides; each slot holds one or more
|
||||
views. If two views are dropped in the same slot, then a notebook is
|
||||
created displaying both views. If a view is dropped outside the
|
||||
application window, it becomes a standalone window. It should be
|
||||
possible to restrict whether a view can be dropped on the sides,
|
||||
horizontal/vertical sides only, in the central content area, or in
|
||||
any of those places.
|
||||
</p>
|
||||
<p>
|
||||
(Havoc has a proposed interface for this, mail hp@redhat.com)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 1.4">
|
||||
<title>Icon List Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
A simple icon list widget, suitable for creating a file selector or
|
||||
the like.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="> 1.4">
|
||||
<title>Dock widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Add a widget like GnomeDock (perhaps based on GnomeDock)
|
||||
that allows people to put rearrangeable toolbars, menubars, etc.
|
||||
around a central content area. The widget should have hooks for
|
||||
saving the current positions of the various docked bars.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="0%" target="> 1.4">
|
||||
<title>Canvas widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Figure out how to get GnomeCanvas or a derived work into GTK+ itself.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>Menu scroll</title>
|
||||
<description>
|
||||
<p>
|
||||
When menus are bigger than the screen, allow scrolling
|
||||
as on the Mac.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>Toolbar/menubar wrap</title>
|
||||
<description>
|
||||
<p>
|
||||
When toolbars and menubars are too wide, do some sort of
|
||||
wrapping or drop-down deal. (See Windows/Mac apps for examples.)
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Blink cursor in GtkEntry</title>
|
||||
<description>
|
||||
<p>
|
||||
Make the cursor optionally blink in GtkEntry. Beware, the entry code
|
||||
is somewhat in flux; mail Owen and ask.
|
||||
</p>
|
||||
</description>
|
||||
<contact>otaylor@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="100%" target="1.4">
|
||||
<title>Don't highlight first menu item when menus come up</title>
|
||||
<description>
|
||||
<p>
|
||||
Keep GtkMenu from prelighting the first menu item.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="95%" target="1.4">
|
||||
<title>Integrate new color selector</title>
|
||||
<description>
|
||||
<p>
|
||||
There's a new color selector in CVS (module gnome-colorsel),
|
||||
it needs to be folded in to GTK and any remaining issues resolved.
|
||||
(This new selector is API-compatible with the old one, and
|
||||
still called GtkColorSelector).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="medium" status="0%" target="1.4">
|
||||
<title>Write new font selector</title>
|
||||
<description>
|
||||
<p>
|
||||
Pango introduces a new font handling system,
|
||||
replacing the XLFD system. Need a font selector for this.
|
||||
The XLFD selector should probably remain, for apps where
|
||||
it makes sense (like gnome-terminal probably).
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Stack Widget</title>
|
||||
<description>
|
||||
<p>
|
||||
Jonathan has a widget like a tabless/frameless notebook, used for
|
||||
something like the GNOME control center where you want to toggle which
|
||||
widget is visible to the user. Needs to be cleaned up and considered
|
||||
for GTK.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org, jrb@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="small" status="0%" target="1.4">
|
||||
<title>Clean up GtkNotebook</title>
|
||||
<description>
|
||||
<p>
|
||||
GtkNotebook currently breaks GTK invariants about
|
||||
mapping/visibility/etc., needs fixing.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@gnome.org</contact>
|
||||
</entry>
|
||||
|
||||
</section> <!-- GTK+ -->
|
||||
</todo>
|
||||
|
||||
20
acconfig.h
20
acconfig.h
@@ -15,30 +15,22 @@
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#undef ENABLE_NLS
|
||||
#undef GTK_COMPILED_WITH_DEBUGGING
|
||||
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_PWD_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
/* some systems do not allow to ipcrm pages prior to
|
||||
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
|
||||
* IRIX 5.2 and 6.2.
|
||||
*/
|
||||
#undef IPC_RMID_DEFERRED_RELEASE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
/* Define to use X11R6 additions to XIM */
|
||||
#undef USE_X11R6_XIM
|
||||
|
||||
#undef XINPUT_NONE
|
||||
#undef XINPUT_GXI
|
||||
#undef XINPUT_XFREE
|
||||
|
||||
768
acinclude.m4
768
acinclude.m4
@@ -1,768 +0,0 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program 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
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# Modified to never use included libintl.
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||
#
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
# AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
# nls_cv_force_use_gnu_gettext=$withval,
|
||||
# nls_cv_force_use_gnu_gettext=no)
|
||||
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
nls_cv_force_use_gnu_gettext="no"
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes,
|
||||
gt_cv_func_dgettext_libintl=no)],
|
||||
gt_cv_func_dgettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
LIBS="$LIBS -lintl";
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS=-lintl
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
# if test "$GENCAT" != "no"; then
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
# if test "$GMSGFMT" = "no"; then
|
||||
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
# fi
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.cat
|
||||
# INSTOBJEXT=.cat
|
||||
# DATADIRNAME=lib
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
# fi
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
else
|
||||
# Unset this variable since we use the non-zero value as a flag.
|
||||
CATOBJEXT=
|
||||
# dnl Mark actions used to generate GNU NLS library.
|
||||
# INTLOBJS="\$(GETTOBJS)"
|
||||
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# AC_SUBST(MSGFMT)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.gmo
|
||||
# INSTOBJEXT=.mo
|
||||
# DATADIRNAME=share
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# # If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# # because some of the sources are only built for this goal.
|
||||
# if test "$PACKAGE" = gettext; then
|
||||
# USE_NLS=yes
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GTK_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_GTK_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
||||
72
autogen.sh
72
autogen.sh
@@ -1,28 +1,27 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Gtk+
|
||||
TEST_TYPE=-d
|
||||
FILE=gdk
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "You must have autoconf installed to compile GTK+."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile GTK+."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/libtool-1.0h.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
echo "You must have automake installed to compile GTK+."
|
||||
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
@@ -32,8 +31,8 @@ if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
(test -d gtk && test -d glib) || {
|
||||
echo "You must run this script in the top-level GTK+ directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -42,45 +41,12 @@ if test -z "$*"; then
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`aclocal --print-ac-dir`
|
||||
m4list="glib.m4 gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
# Hmm, we specify --force here, since otherwise things dont'
|
||||
# get added reliably, but we don't want to overwrite intl
|
||||
# while making dist.
|
||||
echo "no" | gettextize --copy --force
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
||||
# optionally feature autoheader
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||
|
||||
automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
for i in glib .
|
||||
do
|
||||
echo processing $i
|
||||
(cd $i; aclocal; automake; autoconf)
|
||||
done
|
||||
./configure "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
||||
echo "Now type 'make' to compile GTK+."
|
||||
|
||||
386
config.guess
vendored
386
config.guess
vendored
@@ -1,7 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -24,7 +23,6 @@
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
# Please send patches to <autoconf-patches@gnu.org>.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@@ -37,20 +35,6 @@
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
CC_FOR_BUILD="$HOST_CC"
|
||||
else
|
||||
if test x"$CC" != x; then
|
||||
CC_FOR_BUILD="$CC"
|
||||
else
|
||||
CC_FOR_BUILD=cc
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
@@ -62,8 +46,7 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
@@ -76,7 +59,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
cat <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -93,9 +76,9 @@ main:
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -114,14 +97,8 @@ EOF
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
# of the specific Alpha model?
|
||||
echo alpha-pc-interix
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
@@ -135,9 +112,6 @@ EOF
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -156,9 +130,6 @@ EOF
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
@@ -168,7 +139,7 @@ EOF
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
@@ -176,12 +147,9 @@ EOF
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE*:*:*:dcosx)
|
||||
NILE:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
@@ -227,32 +195,6 @@ EOF
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
||||
# to the lowercase version "mint" (or "freemint"). Finally
|
||||
# the system name "TOS" denotes a system which is actually not
|
||||
# MiNT. But MiNT is downward compatible to TOS, so this should
|
||||
# be no problem.
|
||||
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
||||
echo m68k-atari-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
||||
echo m68k-milan-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
||||
echo m68k-hades-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -274,9 +216,6 @@ EOF
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:NetBSD:*:*)
|
||||
echo powerpc-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
@@ -286,16 +225,12 @@ EOF
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:* | 2430:CLIX:*:*)
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
@@ -310,10 +245,10 @@ EOF
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy \
|
||||
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
@@ -331,18 +266,15 @@ EOF
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
[ ${TARGET_BINARY_INTERFACE}x = x ]
|
||||
then
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else
|
||||
echo i586-dg-dgux${UNAME_RELEASE}
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
@@ -368,7 +300,7 @@ EOF
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
@@ -379,8 +311,8 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@@ -389,8 +321,7 @@ EOF
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
|
||||
if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
@@ -423,50 +354,18 @@ EOF
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[34678]??:HP-UX:*:*)
|
||||
9000/[3478]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
|
||||
9000/8?? ) HP_ARCH=hppa1.0 ;;
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
sed 's/^ //' << EOF >dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
@@ -491,8 +390,8 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@@ -501,9 +400,6 @@ EOF
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
*9??*:MPE/iX:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
@@ -520,9 +416,6 @@ EOF
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
hppa*:OpenBSD:*:*)
|
||||
echo hppa-unknown-openbsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
@@ -555,14 +448,11 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
@@ -575,47 +465,26 @@ EOF
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
i?86:BSD/386:*:* | *:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
echo i386-pc-cygwin32
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
echo i386-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
echo powerpcle-unknown-cygwin32
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
@@ -624,11 +493,9 @@ EOF
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_help_string=`cd /; ld --help 2>&1`
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
@@ -636,74 +503,15 @@ EOF
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
*ia64)
|
||||
echo "${UNAME_MACHINE}-unknown-linux"
|
||||
exit 0
|
||||
;;
|
||||
i?86linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
i?86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
;;
|
||||
sparclinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
armlinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32arm*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
armelf_linux*)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
m68klinux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf32ppc)
|
||||
# Determine Lib Version
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#if defined(__GLIBC__)
|
||||
extern char __libc_version[];
|
||||
extern char __libc_release[];
|
||||
#endif
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#if defined(__GLIBC__)
|
||||
printf("%s %s\n", __libc_version, __libc_release);
|
||||
#else
|
||||
printf("unkown\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy | grep 1\.99 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0
|
||||
;;
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
sed 's/^ //' <<EOF >dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
@@ -721,9 +529,9 @@ EOF
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
${CC-cc} dummy.s -o dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
./dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
@@ -740,23 +548,22 @@ EOF
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
objdump --private-headers dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
fi
|
||||
rm -f dummy.s dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
cat >dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
@@ -766,8 +573,8 @@ EOF
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
@@ -786,13 +593,12 @@ EOF
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
cat >dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
@@ -809,8 +615,8 @@ EOF
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
@@ -826,20 +632,10 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:5:7*)
|
||||
# Fixed at (any) Pentium or better
|
||||
UNAME_MACHINE=i586
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
|
||||
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
@@ -851,10 +647,6 @@ EOF
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
@@ -901,7 +693,7 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
|
||||
i?86:LynxOS:2.*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
@@ -913,9 +705,6 @@ EOF
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:ReliantUNIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
@@ -946,43 +735,19 @@ EOF
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit 0 ;;
|
||||
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
|
||||
echo powerpc-apple-beos
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit 0 ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-qnx-qnx${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >$dummy.c <<EOF
|
||||
cat >dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
@@ -1020,10 +785,7 @@ main ()
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
@@ -1083,8 +845,8 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
|
||||
rm -f dummy.c dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
||||
46
config.h.in
Normal file
46
config.h.in
Normal file
@@ -0,0 +1,46 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if the X Window System is missing or not being used. */
|
||||
#undef X_DISPLAY_MISSING
|
||||
|
||||
/* Other stuff */
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* some systems do not allow to ipcrm pages prior to
|
||||
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
|
||||
* IRIX 5.2 and 6.2.
|
||||
*/
|
||||
#undef IPC_RMID_DEFERRED_RELEASE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
#undef XINPUT_NONE
|
||||
#undef XINPUT_GXI
|
||||
#undef XINPUT_XFREE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#undef HAVE_GETPAGESIZE
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
192
config.h.win32
192
config.h.win32
@@ -1,192 +0,0 @@
|
||||
/* config.h.win32. Handcrafted for Microsoft C and gcc -mno-cygwin */
|
||||
|
||||
#if ! (defined(_MSC_VER) || defined(__GNUC__))
|
||||
#error Unrecognized Win32 compiler, edit config.h.win32 by hand
|
||||
#endif
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
|
||||
This function is required for alloca.c support on those systems. */
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define if you have alloca, as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
#ifdef _MSC_VER
|
||||
#define alloca _alloca
|
||||
#elif defined (__GNUC__)
|
||||
#define alloca __builtin_alloca
|
||||
#endif
|
||||
|
||||
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have a working `mmap' system call. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to empty, or __inline if that's what your compiler wants. */
|
||||
#define inline __inline
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE*/
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown
|
||||
*/
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Other stuff */
|
||||
#define ENABLE_NLS 1
|
||||
#define GTK_COMPILED_WITH_DEBUGGING "minimum"
|
||||
|
||||
/* #undef HAVE_CATGETS */
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
#define HAVE_GETTEXT 1
|
||||
/* #undef HAVE_IPC_H */
|
||||
/* #undef HAVE_LC_MESSAGES */
|
||||
/* #undef HAVE_PWD_H */
|
||||
/* #undef HAVE_SHM_H */
|
||||
/* #undef HAVE_STPCPY */
|
||||
/* #undef HAVE_XSHM_H */
|
||||
#define HAVE_SHAPE_EXT 1
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
/* #undef HAVE_XCONVERTCASE */
|
||||
|
||||
/* #undef NO_FD_SET */
|
||||
|
||||
/* #undef XINPUT_NONE */
|
||||
/* #undef XINPUT_GXI */
|
||||
/* #undef XINPUT_XFREE */
|
||||
#define XINPUT_WIN32 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define if you have the __argz_count function. */
|
||||
/* #undef HAVE___ARGZ_COUNT */
|
||||
|
||||
/* Define if you have the __argz_next function. */
|
||||
/* #undef HAVE___ARGZ_NEXT */
|
||||
|
||||
/* Define if you have the __argz_stringify function. */
|
||||
/* #undef HAVE___ARGZ_STRINGIFY */
|
||||
|
||||
/* Define if you have the broken_wctype function. */
|
||||
/* #undef HAVE_BROKEN_WCTYPE */
|
||||
|
||||
/* Define if you have the dcgettext function. */
|
||||
/* #undef HAVE_DCGETTEXT */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getpagesize function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define if you have the lstat function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define if you have the munmap function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the putenv function. */
|
||||
#define HAVE_PUTENV 1
|
||||
#define putenv _putenv
|
||||
|
||||
/* Define if you have the setenv function. */
|
||||
/* #undef HAVE_SETENV */
|
||||
|
||||
/* Define if you have the setlocale function. */
|
||||
#define HAVE_SETLOCALE 1
|
||||
|
||||
/* Define if you have the stpcpy function. */
|
||||
/* #undef HAVE_STPCPY */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define strcasecmp _stricmp
|
||||
|
||||
/* Define if you have the strchr function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the <argz.h> header file. */
|
||||
/* #undef HAVE_ARGZ_H */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <nl_types.h> header file. */
|
||||
/* #undef HAVE_NL_TYPES_H */
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/* #undef HAVE_SYS_PARAM_H */
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
/* #undef HAVE_UNISTD_H */
|
||||
|
||||
/* Define if you have the <wchar.h> header file. */
|
||||
#define HAVE_WCHAR_H 1
|
||||
|
||||
/* Define if you have the <wctype.h> header file. */
|
||||
#ifdef _MSC_VER
|
||||
#define HAVE_WCTYPE_H 1
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/* Define if you have the i library (-li). */
|
||||
/* #undef HAVE_LIBI */
|
||||
|
||||
/* Define if you have the intl library (-lintl). */
|
||||
#define HAVE_LIBINTL 1
|
||||
|
||||
/* define if compiled symbols have a leading underscore */
|
||||
/* #undef WITH_SYMBOL_UNDERSCORE */
|
||||
|
||||
/* Define if you have the Wintab programmer's kit */
|
||||
#define HAVE_WINTAB 1
|
||||
|
||||
/* Define if you have the <dimm.h> header file
|
||||
* (available in the Platform SDK)
|
||||
*/
|
||||
/* #define HAVE_DIMM_H 1 */
|
||||
366
config.sub
vendored
366
config.sub
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@@ -98,21 +98,11 @@ case $os in
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-sim | -cisco | -oki | -wec | -winbond)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
-scout)
|
||||
;;
|
||||
-wrs)
|
||||
os=-vxworks
|
||||
basic_machine=$1
|
||||
;;
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco4)
|
||||
@@ -131,9 +121,6 @@ case $os in
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-udk*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-isc)
|
||||
os=-isc2.2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -156,37 +143,26 @@ case $os in
|
||||
-psos*)
|
||||
os=-psos
|
||||
;;
|
||||
-mint | -mint[0-9]*)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | fr30)
|
||||
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 \
|
||||
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
|
||||
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
|
||||
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
|
||||
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| sparc | sparclet | sparclite | sparc64 | v850)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
i[3456]86)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
@@ -195,45 +171,27 @@ case $basic_machine in
|
||||
exit 1
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
| clipper-* | orion-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
|
||||
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
|
||||
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
|
||||
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
|
||||
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
|
||||
| sparc64-* | mips64-* | mipsel-* \
|
||||
| mips64el-* | mips64orion-* | mips64orionel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| f301-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
386bsd)
|
||||
basic_machine=i386-unknown
|
||||
os=-bsd
|
||||
;;
|
||||
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
|
||||
basic_machine=m68000-att
|
||||
;;
|
||||
3b*)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
a29khif)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
adobe68k)
|
||||
basic_machine=m68010-adobe
|
||||
os=-scout
|
||||
;;
|
||||
alliant | fx80)
|
||||
basic_machine=fx80-alliant
|
||||
;;
|
||||
@@ -263,10 +221,6 @@ case $basic_machine in
|
||||
basic_machine=m68k-apollo
|
||||
os=-sysv
|
||||
;;
|
||||
apollo68bsd)
|
||||
basic_machine=m68k-apollo
|
||||
os=-bsd
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
@@ -343,10 +297,6 @@ case $basic_machine in
|
||||
encore | umax | mmax)
|
||||
basic_machine=ns32k-encore
|
||||
;;
|
||||
es1800 | OSE68k | ose68k | ose | OSE)
|
||||
basic_machine=m68k-ericsson
|
||||
os=-ose
|
||||
;;
|
||||
fx2800)
|
||||
basic_machine=i860-alliant
|
||||
;;
|
||||
@@ -365,14 +315,6 @@ case $basic_machine in
|
||||
basic_machine=h8300-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
h8300xray)
|
||||
basic_machine=h8300-hitachi
|
||||
os=-xray
|
||||
;;
|
||||
h8500hms)
|
||||
basic_machine=h8500-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
harris)
|
||||
basic_machine=m88k-harris
|
||||
os=-sysv3
|
||||
@@ -388,30 +330,13 @@ case $basic_machine in
|
||||
basic_machine=m68k-hp
|
||||
os=-hpux
|
||||
;;
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hp9k2[0-9][0-9] | hp9k31[0-9])
|
||||
basic_machine=m68000-hp
|
||||
;;
|
||||
hp9k3[2-9][0-9])
|
||||
basic_machine=m68k-hp
|
||||
;;
|
||||
hp9k6[0-9][0-9] | hp6[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
;;
|
||||
hp9k7[0-79][0-9] | hp7[0-79][0-9])
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k78[0-9] | hp78[0-9])
|
||||
# FIXME: really hppa2.0-hp
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
|
||||
# FIXME: really hppa2.0-hp
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][13679] | hp8[0-9][13679])
|
||||
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
|
||||
basic_machine=hppa1.1-hp
|
||||
;;
|
||||
hp9k8[0-9][0-9] | hp8[0-9][0-9])
|
||||
@@ -420,53 +345,27 @@ case $basic_machine in
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
hppaosf)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-osf
|
||||
;;
|
||||
hppro)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-proelf
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
i[3456]86v32)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv32
|
||||
;;
|
||||
i[34567]86v4*)
|
||||
i[3456]86v4*)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv4
|
||||
;;
|
||||
i[34567]86v)
|
||||
i[3456]86v)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-sysv
|
||||
;;
|
||||
i[34567]86sol2)
|
||||
i[3456]86sol2)
|
||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||
os=-solaris2
|
||||
;;
|
||||
i386mach)
|
||||
basic_machine=i386-mach
|
||||
os=-mach
|
||||
;;
|
||||
i386-vsta | vsta)
|
||||
basic_machine=i386-unknown
|
||||
os=-vsta
|
||||
;;
|
||||
i386-go32 | go32)
|
||||
basic_machine=i386-unknown
|
||||
os=-go32
|
||||
;;
|
||||
i386-mingw32 | mingw32)
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
i386-qnx | qnx)
|
||||
basic_machine=i386-qnx
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
case $os in
|
||||
@@ -495,10 +394,6 @@ case $basic_machine in
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
os=-linux-gnu
|
||||
@@ -513,30 +408,10 @@ case $basic_machine in
|
||||
mips3*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
|
||||
;;
|
||||
monitor)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-unknown
|
||||
os=-msdos
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
ncr3000)
|
||||
basic_machine=i486-ncr
|
||||
os=-sysv4
|
||||
;;
|
||||
netbsd386)
|
||||
basic_machine=i386-unknown
|
||||
os=-netbsd
|
||||
;;
|
||||
netwinder)
|
||||
basic_machine=armv4l-rebel
|
||||
os=-linux
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
basic_machine=m68k-sony
|
||||
os=-newsos
|
||||
@@ -549,10 +424,6 @@ case $basic_machine in
|
||||
basic_machine=mips-sony
|
||||
os=-newsos
|
||||
;;
|
||||
necv70)
|
||||
basic_machine=v70-nec
|
||||
os=-sysv
|
||||
;;
|
||||
next | m*-next )
|
||||
basic_machine=m68k-next
|
||||
case $os in
|
||||
@@ -578,25 +449,9 @@ case $basic_machine in
|
||||
basic_machine=i960-intel
|
||||
os=-nindy
|
||||
;;
|
||||
mon960)
|
||||
basic_machine=i960-intel
|
||||
os=-mon960
|
||||
;;
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
;;
|
||||
os68k)
|
||||
basic_machine=m68k-none
|
||||
os=-os68k
|
||||
;;
|
||||
pa-hitachi)
|
||||
basic_machine=hppa1.1-hitachi
|
||||
os=-hiuxwe2
|
||||
@@ -614,23 +469,25 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
basic_machine=i586-pc
|
||||
pentium | p5)
|
||||
basic_machine=i586-intel
|
||||
;;
|
||||
pentiumpro | p6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
pentiumpro | p6)
|
||||
basic_machine=i686-intel
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
pentium-* | p5-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-*)
|
||||
pentiumpro-* | p6-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
k5)
|
||||
# We don't have specific support for AMD's K5 yet, so just call it a Pentium
|
||||
basic_machine=i586-amd
|
||||
;;
|
||||
nexen)
|
||||
# We don't have specific support for Nexgen yet, so just call it a Pentium
|
||||
basic_machine=i586-nexgen
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
@@ -650,20 +507,12 @@ case $basic_machine in
|
||||
ps2)
|
||||
basic_machine=i386-ibm
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
rm[46]00)
|
||||
basic_machine=mips-siemens
|
||||
;;
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
@@ -671,10 +520,6 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
sps7)
|
||||
basic_machine=m68k-bull
|
||||
os=-sysv2
|
||||
@@ -682,13 +527,6 @@ case $basic_machine in
|
||||
spur)
|
||||
basic_machine=spur-unknown
|
||||
;;
|
||||
st2000)
|
||||
basic_machine=m68k-tandem
|
||||
;;
|
||||
stratus)
|
||||
basic_machine=i860-stratus
|
||||
os=-sysv4
|
||||
;;
|
||||
sun2)
|
||||
basic_machine=m68000-sun
|
||||
;;
|
||||
@@ -733,10 +571,6 @@ case $basic_machine in
|
||||
basic_machine=i386-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -754,10 +588,6 @@ case $basic_machine in
|
||||
basic_machine=a29k-nyu
|
||||
os=-sym1
|
||||
;;
|
||||
v810 | necv810)
|
||||
basic_machine=v810-nec
|
||||
os=-none
|
||||
;;
|
||||
vaxv)
|
||||
basic_machine=vax-dec
|
||||
os=-sysv
|
||||
@@ -781,14 +611,6 @@ case $basic_machine in
|
||||
basic_machine=a29k-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
w65*)
|
||||
basic_machine=w65-wdc
|
||||
os=-none
|
||||
;;
|
||||
w89k-*)
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
@@ -796,10 +618,6 @@ case $basic_machine in
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
@@ -807,15 +625,6 @@ case $basic_machine in
|
||||
|
||||
# Here we handle the default manufacturer of certain CPU types. It is in
|
||||
# some cases the only manufacturer, in others, it is the most popular.
|
||||
w89k)
|
||||
basic_machine=hppa1.1-winbond
|
||||
;;
|
||||
op50n)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
if [ x$os = x-linux-gnu ]; then
|
||||
basic_machine=mips-unknown
|
||||
@@ -838,7 +647,7 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -850,16 +659,6 @@ case $basic_machine in
|
||||
orion105)
|
||||
basic_machine=clipper-highlevel
|
||||
;;
|
||||
mac | mpw | mac-mpw)
|
||||
basic_machine=m68k-apple
|
||||
;;
|
||||
pmac | pmac-mpw)
|
||||
basic_machine=powerpc-apple
|
||||
;;
|
||||
c4x*)
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*)
|
||||
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
|
||||
exit 1
|
||||
@@ -913,21 +712,13 @@ case $os in
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mon960* | -lnews*)
|
||||
;;
|
||||
-mac*)
|
||||
os=`echo $os | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
-linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
@@ -937,9 +728,6 @@ case $os in
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
@@ -955,9 +743,6 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
@@ -977,9 +762,6 @@ case $os in
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-qnx)
|
||||
os=-qnx4
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
@@ -992,18 +774,9 @@ case $os in
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-ose*)
|
||||
os=-ose
|
||||
;;
|
||||
-es1800*)
|
||||
os=-ose
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
os=-mint
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
@@ -1029,9 +802,6 @@ case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-rebel)
|
||||
os=-linux
|
||||
;;
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
@@ -1053,36 +823,15 @@ case $basic_machine in
|
||||
# default.
|
||||
# os=-sunos4
|
||||
;;
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
sparc-* | *-sun)
|
||||
os=-sunos4.1.1
|
||||
;;
|
||||
*-be)
|
||||
os=-beos
|
||||
;;
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
*-winbond)
|
||||
os=-proelf
|
||||
;;
|
||||
*-oki)
|
||||
os=-proelf
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
@@ -1146,18 +895,6 @@ case $basic_machine in
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=-coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=-coff
|
||||
;;
|
||||
*-apple)
|
||||
os=-macos
|
||||
;;
|
||||
*-atari*)
|
||||
os=-mint
|
||||
;;
|
||||
*)
|
||||
os=-none
|
||||
;;
|
||||
@@ -1179,15 +916,9 @@ case $basic_machine in
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-beos*)
|
||||
vendor=be
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
@@ -1203,7 +934,7 @@ case $basic_machine in
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs* | -opened*)
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
@@ -1215,15 +946,6 @@ case $basic_machine in
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
-hms*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-mpw* | -macos*)
|
||||
vendor=apple
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
vendor=atari
|
||||
;;
|
||||
esac
|
||||
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
|
||||
;;
|
||||
|
||||
553
configure.in
553
configure.in
@@ -1,68 +1,32 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(gdk/gdktypes.h)
|
||||
|
||||
# In the following, there are a the following variants
|
||||
# of GLib cflags and libs variables
|
||||
#
|
||||
# GLIB_CFLAGS: cflags for compiling libraries and example progs
|
||||
# GLIB_LIBS: libraries for linking example programs
|
||||
# GLIB_DEPLIBS: libraries for linking libraries against
|
||||
# glib_cflags: cflags to store in gtk-config
|
||||
# glib_libs: libs to store in gtk-config
|
||||
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
|
||||
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
|
||||
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
|
||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
#
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
# GTK_INTERFACE_AGE += 1;
|
||||
# GTK_BINARY_AGE += 1;
|
||||
# if any functions have been added, set GTK_INTERFACE_AGE to 0.
|
||||
# if backwards compatibility has been broken,
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
#
|
||||
GTK_MAJOR_VERSION=1
|
||||
GTK_MINOR_VERSION=3
|
||||
GTK_MICRO_VERSION=0
|
||||
GTK_INTERFACE_AGE=0
|
||||
GTK_BINARY_AGE=0
|
||||
GTK_MINOR_VERSION=0
|
||||
GTK_MICRO_VERSION=2
|
||||
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
||||
dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_SUBST(GTK_MAJOR_VERSION)
|
||||
AC_SUBST(GTK_MINOR_VERSION)
|
||||
AC_SUBST(GTK_MICRO_VERSION)
|
||||
AC_SUBST(GTK_INTERFACE_AGE)
|
||||
AC_SUBST(GTK_BINARY_AGE)
|
||||
AC_SUBST(GTK_VERSION)
|
||||
|
||||
# libtool versioning
|
||||
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
|
||||
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
|
||||
LT_REVISION=$GTK_INTERFACE_AGE
|
||||
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
|
||||
AC_SUBST(LT_RELEASE)
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
AC_SUBST(LT_AGE)
|
||||
|
||||
# For automake.
|
||||
VERSION=$GTK_VERSION
|
||||
PACKAGE=gtk+
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
# Configure glib
|
||||
AC_CONFIG_SUBDIRS(glib)
|
||||
|
||||
dnl Initialize automake stuff
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
|
||||
|
||||
AC_SUBST(GTK_MAJOR_VERSION)
|
||||
AC_SUBST(GTK_MINOR_VERSION)
|
||||
AC_SUBST(GTK_MICRO_VERSION)
|
||||
AC_SUBST(GTK_VERSION)
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
# Specify a configuration file
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
@@ -74,242 +38,56 @@ AM_MAINTAINER_MODE
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl figure debugging default, prior to $ac_help setup
|
||||
dnl
|
||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
|
||||
debug_default=yes
|
||||
else
|
||||
debug_default=minimum
|
||||
fi
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
dnl declare --enable-* args and collect ac_help strings
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
|
||||
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
|
||||
echo $enable_shm, enable_shm="yes")
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=minimum]],,enable_debug=minimum)
|
||||
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
|
||||
, enable_ansi=no)
|
||||
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
|
||||
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
|
||||
, enable_xim="yes")
|
||||
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
|
||||
, enable_xim_inst="maybe")
|
||||
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
|
||||
echo $enable_xim, enable_xim="yes")
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
||||
|
||||
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
|
||||
CFLAGS="$CFLAGS -DG_ENABLE_DEBUG"
|
||||
else
|
||||
if test "x$enable_debug" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
|
||||
CFLAGS="$CFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
|
||||
else
|
||||
GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
|
||||
CFLAGS="$CFLAGS -DGTK_NO_CHECK_CASTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
|
||||
|
||||
# Build time sanity check...
|
||||
AM_SANITY_CHECK
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
|
||||
CFLAGS="$CFLAGS -Wall"
|
||||
fi
|
||||
|
||||
if test "x$enable_ansi" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-ansi[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -ansi" ;;
|
||||
esac
|
||||
if test -z "`echo "$CFLAGS" | grep "\-ansi" 2> /dev/null`" ; then
|
||||
CFLAGS="$CFLAGS -ansi"
|
||||
fi
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-pedantic[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -pedantic" ;;
|
||||
esac
|
||||
if test -z "`echo "$CFLAGS" | grep "\-pedantic" 2> /dev/null`" ; then
|
||||
CFLAGS="$CFLAGS -pedantic"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
# define a MAINT-like variable REBUILD which is set if Perl
|
||||
# and awk are found, so autogenerated sources can be rebuilt
|
||||
|
||||
AC_PROG_AWK
|
||||
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
|
||||
# We would like indent, but don't require it.
|
||||
AC_CHECK_PROG(INDENT, indent, indent)
|
||||
|
||||
REBUILD=\#
|
||||
if test "x$enable_rebuilds" = "xyes" && \
|
||||
test -n "$PERL" && \
|
||||
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
|
||||
test -n "$AWK" ; then
|
||||
REBUILD=
|
||||
if test "x$enable_xim" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -DUSE_XIM"
|
||||
fi
|
||||
AC_SUBST(REBUILD)
|
||||
|
||||
AC_CHECK_FUNCS(lstat)
|
||||
|
||||
AC_MSG_CHECKING(whether make is GNU Make)
|
||||
STRIP_BEGIN=
|
||||
STRIP_END=
|
||||
if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
|
||||
STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
|
||||
STRIP_END=')'
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
STRIP_DUMMY=
|
||||
AC_SUBST(STRIP_DUMMY)
|
||||
AC_SUBST(STRIP_BEGIN)
|
||||
AC_SUBST(STRIP_END)
|
||||
|
||||
# i18n stuff
|
||||
ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl no pl pt pt_BR ro ru sk sl sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
|
||||
AM_GTK_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
|
||||
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
|
||||
# this is the directory where the *.{mo,gmo} files are installed
|
||||
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
AC_SUBST(gtklocaledir)
|
||||
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl -std1 is given to the native cc.
|
||||
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
|
||||
|
||||
gtk_save_LIBS=$LIBS
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([#include <math.h>
|
||||
int main (void) { return (log(1) != log(1.)); }],
|
||||
AC_MSG_RESULT(none needed),
|
||||
gtk_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -std1"
|
||||
AC_TRY_RUN([#include <math.h>
|
||||
int main (void) { return (log(1) != log(1.)); }],
|
||||
AC_MSG_RESULT(-std1),
|
||||
AC_MSG_RESULT()
|
||||
CFLAGS=$gtk_save_CFLAGS
|
||||
AC_MSG_WARN(
|
||||
[No ANSI prototypes found in library. (-std1 didn't work.)]),
|
||||
true
|
||||
),
|
||||
AC_MSG_RESULT(none needed)
|
||||
)
|
||||
LIBS=$gtk_save_LIBS
|
||||
|
||||
MATH_LIB=-lm
|
||||
GTK_LIBS_EXTRA=
|
||||
AC_MSG_CHECKING(for the BeOS)
|
||||
case $host in
|
||||
*-*-beos*)
|
||||
AC_MSG_RESULT(yes)
|
||||
GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
|
||||
MATH_LIB=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MATH_LIB)
|
||||
AC_SUBST(GTK_LIBS_EXTRA)
|
||||
|
||||
dnl NeXTStep cc seems to need this
|
||||
AC_MSG_CHECKING([for extra flags for POSIX compliance])
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
AC_MSG_RESULT(none needed),
|
||||
gtk_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -posix"
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
AC_MSG_RESULT(-posix),
|
||||
AC_MSG_RESULT()
|
||||
CFLAGS=$gtk_save_CFLAGS
|
||||
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
|
||||
|
||||
if test x$with_glib = xyes ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Directory must be specified for --with-glib])
|
||||
fi
|
||||
|
||||
if test x$with_glib = x ; then
|
||||
# Look for separately installed glib
|
||||
|
||||
AM_PATH_GLIB(1.3.1,,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB 1.3.0 or better is required. The latest version of GLIB
|
||||
*** is always available from ftp://ftp.gtk.org/.]),
|
||||
gobject gmodule gthread)
|
||||
|
||||
# we do not want to make all gtk progs to link to thread libraries.
|
||||
glib_cflags=`$GLIB_CONFIG glib gobject gmodule --cflags`
|
||||
glib_thread_cflags="$GLIB_CFLAGS"
|
||||
glib_libs=`$GLIB_CONFIG glib gobject gmodule --libs`
|
||||
glib_thread_libs="$GLIB_LIBS"
|
||||
GLIB_LIBS="$glib_libs"
|
||||
GLIB_DEPLIBS="$glib_libs"
|
||||
else
|
||||
# Use uninstalled glib (assume they got the version right)
|
||||
|
||||
GLIB_CONFIG=$with_glib/glib-config
|
||||
if test -x $GLIB_CONFIG ; then
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
|
||||
fi
|
||||
|
||||
# For use in gtk-config
|
||||
glib_cflags=`$GLIB_CONFIG --cflags gmodule`
|
||||
glib_thread_cflags=`$GLIB_CONFIG --cflags gmodule gthread`
|
||||
glib_libs=`$GLIB_CONFIG --libs gmodule`
|
||||
glib_thread_libs=`$GLIB_CONFIG --libs gmodule gthread`
|
||||
|
||||
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
|
||||
|
||||
# canonicalize relative paths
|
||||
case $with_glib in
|
||||
/*)
|
||||
glib_dir=$with_glib
|
||||
;;
|
||||
*)
|
||||
glib_dir="\$(top_builddir)/$with_glib"
|
||||
;;
|
||||
esac
|
||||
|
||||
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
|
||||
GLIB_DEPLIBS=
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AC_SUBST(glib_cflags)
|
||||
AC_SUBST(glib_libs)
|
||||
AC_SUBST(glib_thread_cflags)
|
||||
AC_SUBST(glib_thread_libs)
|
||||
AC_SUBST(GLIB_DEPLIBS)
|
||||
|
||||
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
|
||||
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
|
||||
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
||||
|
||||
# Find the X11 include and library directories
|
||||
AC_PATH_X
|
||||
@@ -322,20 +100,12 @@ fi
|
||||
saved_cflags="$CFLAGS"
|
||||
saved_ldflags="$LDFLAGS"
|
||||
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
||||
|
||||
if test "x$no_x" = "xyes"; then
|
||||
AC_MSG_ERROR([
|
||||
*** X libraries or include files not found. Check 'config.log' for
|
||||
*** more details.])
|
||||
fi
|
||||
CFLAGS="$X_CFLAGS"
|
||||
LDFLAGS="$X_LDFLAGS $X_LIBS"
|
||||
|
||||
# Checks for libraries.
|
||||
# Check for the X11 library
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
|
||||
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
|
||||
$X_EXTRA_LIBS)
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", no_x11_lib=yes, $X_EXTRA_LIBS)
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for the Xext library (needed for XShm extention)
|
||||
@@ -352,47 +122,9 @@ fi
|
||||
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
||||
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
|
||||
x_libs="-lXext $x_libs"
|
||||
$x_libs="-lXext $x_libs"
|
||||
fi
|
||||
AC_DEFINE(HAVE_SHAPE_EXT),
|
||||
,
|
||||
$x_libs)
|
||||
|
||||
# Check for XConvertCase (X11R6 specific)
|
||||
|
||||
AC_CHECK_LIB(X11, XConvertCase,
|
||||
AC_DEFINE(HAVE_XCONVERTCASE),
|
||||
,
|
||||
$x_libs)
|
||||
|
||||
# Check for XIM support.
|
||||
|
||||
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
|
||||
: ,
|
||||
enable_xim_inst="no",
|
||||
$x_libs)
|
||||
|
||||
# On Solaris, calling XRegisterIMInstantiateCallback seems to
|
||||
# cause an immediate segfault, so we disable it, unless
|
||||
# the user specifically forces it to be on.
|
||||
|
||||
if test x$enable_xim_inst = xmaybe ; then
|
||||
case host in
|
||||
*-*-solaris*)
|
||||
enable_xim_inst="no"
|
||||
;;
|
||||
*)
|
||||
enable_xim_inst="yes"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x$enable_xim" = "xyes"; then
|
||||
GTK_XIM_FLAGS="-DUSE_XIM"
|
||||
if test "x$enable_xim_inst" = "xyes"; then
|
||||
AC_DEFINE(USE_X11R6_XIM)
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(HAVE_SHAPE_EXT),, $x_libs)
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS $X_LIBS"
|
||||
@@ -410,23 +142,52 @@ else
|
||||
AC_DEFINE(XINPUT_NONE)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
|
||||
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(xinput_progs)
|
||||
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for shared memory
|
||||
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
|
||||
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
|
||||
|
||||
# Check whether shmctl IPC_RMID allowes subsequent attaches
|
||||
if test "$ac_cv_header_sys_shm_h" = "yes"; then
|
||||
AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
int main()
|
||||
{
|
||||
int id;
|
||||
char *shmaddr;
|
||||
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0777);
|
||||
if (id == -1)
|
||||
exit (2);
|
||||
shmaddr = shmat (id, 0, 0);
|
||||
shmctl (id, IPC_RMID, 0);
|
||||
if ((char*) shmat (id, 0, 0) == (char*) -1)
|
||||
{
|
||||
shmdt (shmaddr);
|
||||
exit (1);
|
||||
}
|
||||
shmdt (shmaddr);
|
||||
shmdt (shmaddr);
|
||||
exit (0);
|
||||
}
|
||||
],
|
||||
AC_DEFINE(IPC_RMID_DEFERRED_RELEASE)
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(assuming no))
|
||||
fi
|
||||
|
||||
# Check for the X shared memory extension header file
|
||||
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
||||
if test "x$no_xext_lib" = "xyes"; then
|
||||
@@ -443,6 +204,27 @@ if test "x$enable_shm" = "xyes"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for private display resource base variable
|
||||
AC_MSG_CHECKING(resource base field in XDisplay)
|
||||
AC_CACHE_VAL(gtk_cv_display_resource_base,
|
||||
[AC_TRY_RUN([
|
||||
#define XLIB_ILLEGAL_ACCESS
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
Display *display;
|
||||
|
||||
return 0;
|
||||
|
||||
display->resource_base;
|
||||
}],
|
||||
gtk_cv_display_resource_base="resource_base",
|
||||
gtk_cv_display_resource_base="private3")])
|
||||
AC_MSG_RESULT($gtk_cv_display_resource_base)
|
||||
AC_DEFINE_UNQUOTED(RESOURCE_BASE, gdk_display->$gtk_cv_display_resource_base)
|
||||
|
||||
# Check if X_LOCALE definition is necessary
|
||||
|
||||
AC_MSG_CHECKING(need -DX_LOCALE)
|
||||
@@ -457,12 +239,11 @@ main ()
|
||||
return setlocale (LC_ALL, "${with_locale}") == NULL;
|
||||
}],
|
||||
need_x_locale=no,
|
||||
need_x_locale=yes,
|
||||
need_x_locale=no)
|
||||
need_x_locale=yes)
|
||||
AC_MSG_RESULT($need_x_locale)
|
||||
|
||||
if test $need_x_locale = yes; then
|
||||
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
||||
CFLAGS="$CFLAGS -DX_LOCALE"
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
@@ -475,162 +256,28 @@ AC_C_CONST
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_MMAP
|
||||
|
||||
# Check if <sys/select.h> needs to be included for fd_set
|
||||
AC_MSG_CHECKING([for fd_set])
|
||||
# Check for sys/select.h
|
||||
|
||||
AC_MSG_CHECKING([fd_set and sys/select])
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],
|
||||
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
AC_MSG_RESULT([yes, found in sys/types.h])
|
||||
else
|
||||
if test $gtk_ok = no; then
|
||||
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
|
||||
if test $gtk_ok = yes; then
|
||||
AC_DEFINE(HAVE_SYS_SELECT_H)
|
||||
AC_MSG_RESULT([yes, found in sys/select.h])
|
||||
else
|
||||
AC_DEFINE(NO_FD_SET)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
# `widechar' tests for gdki18n.h
|
||||
AC_MSG_CHECKING(for wchar.h)
|
||||
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
|
||||
if test $gdk_wchar_h = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
if test $gtk_ok = no; then
|
||||
AC_DEFINE(NO_FD_SET)
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wchar_h)
|
||||
|
||||
# Check for wctype.h (for iswalnum)
|
||||
AC_MSG_CHECKING(for wctype.h)
|
||||
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
|
||||
if test $gdk_wctype_h = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wctype_h)
|
||||
|
||||
# in Solaris 2.5, `iswalnum' is in -lw
|
||||
GDK_WLIBS=
|
||||
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
||||
|
||||
oLIBS="$LIBS"
|
||||
LIBS="$LIBS $GDK_WLIBS"
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
|
||||
AC_TRY_LINK([#include <stdlib.h>],[
|
||||
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
|
||||
# ifdef HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
# else
|
||||
# ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
||||
#endif
|
||||
iswalnum((wchar_t) 0);
|
||||
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
||||
LIBS="$oLIBS"
|
||||
|
||||
if test $gdk_working_wctype = no; then
|
||||
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
||||
GDK_WLIBS=
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_SUBST(GDK_WLIBS)
|
||||
|
||||
AC_SUBST(GTK_DEBUG_FLAGS)
|
||||
AC_SUBST(GTK_XIM_FLAGS)
|
||||
AC_SUBST(GTK_LOCALE_FLAGS)
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
|
||||
## Generate `gdk/gdkconfig.h' in two cases
|
||||
## 1. `config.status' is run either explicitly, or via configure.
|
||||
## Esp. not when it is run in `Makefile' to generate makefiles and
|
||||
## config.h
|
||||
## 2. CONFIG_OTHER is set explicitly
|
||||
##
|
||||
## Case 1 is difficult. We know that `automake' sets one of
|
||||
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
||||
## only when AM_CONFIG_HEADER is set, however.
|
||||
|
||||
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
||||
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
||||
CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
|
||||
fi
|
||||
case "$CONFIG_OTHER" in
|
||||
*gdk/gdkconfig.h*)
|
||||
echo creating gdk/gdkconfig.h
|
||||
outfile=gdkconfig.h-tmp
|
||||
cat > $outfile <<\_______EOF
|
||||
/* gdkconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify `configure.in'
|
||||
*/
|
||||
|
||||
#ifndef GDKCONFIG_H
|
||||
#define GDKCONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
$gdk_windowing
|
||||
$gdk_wc
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GDKCONFIG_H */
|
||||
_______EOF
|
||||
|
||||
|
||||
if cmp -s $outfile gdk/gdkconfig.h; then
|
||||
echo gdk/gdkconfig.h is unchanged
|
||||
rm -f $outfile
|
||||
else
|
||||
mv $outfile gdk/gdkconfig.h
|
||||
fi ;;
|
||||
esac
|
||||
],[
|
||||
# Currently we always use X11 on those systems where we run configure...
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_X11'
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
gdk_wc='
|
||||
#define GDK_HAVE_WCHAR_H 1'
|
||||
fi
|
||||
if test x$gdk_wctype_h = xyes; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_WCTYPE_H 1"
|
||||
fi
|
||||
if test x$gdk_working_wctype = xno; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
||||
fi
|
||||
|
||||
|
||||
])
|
||||
|
||||
AC_OUTPUT([
|
||||
gtk+.spec
|
||||
docs/gtk-config.1
|
||||
Makefile
|
||||
gtk-config
|
||||
po/Makefile.in
|
||||
docs/Makefile
|
||||
gdk/Makefile
|
||||
gdk/x11/Makefile
|
||||
gdk/win32/Makefile
|
||||
gtk/Makefile
|
||||
gtk/gtkfeatures.h
|
||||
gtk/gtkcompat.h
|
||||
], [chmod +x gtk-config])
|
||||
],
|
||||
[chmod +x gtk-config])
|
||||
|
||||
62
debian/build
vendored
62
debian/build
vendored
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Adjust debian/changelog and build a new
|
||||
# Debian package of a CVS archive.
|
||||
|
||||
# Written 17 November 1998 by Ben Gertzfield
|
||||
# <che@debian.org>
|
||||
|
||||
# This work is released under the GNU
|
||||
# General Public License, version 2 or
|
||||
# later.
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use File::Copy;
|
||||
|
||||
my $maintainer = 'Ben Gertzfield <che@debian.org>';
|
||||
|
||||
my @date = localtime;
|
||||
|
||||
my $datestr = sprintf("%d%.2d%.2d", $date[5] + 1900, $date[4] + 1, $date[3]);
|
||||
my $revision = '01';
|
||||
|
||||
open (CHANGELOG, 'debian/changelog') or die "Couldn't open debian/changelog: $!\n";
|
||||
|
||||
$_ = <CHANGELOG>;
|
||||
chomp;
|
||||
|
||||
close CHANGELOG;
|
||||
|
||||
my ($package, $last_date, $last_revision) = /^(.*?) \((.*?)\.(.*)?\)/;
|
||||
|
||||
if ($last_date eq $datestr) {
|
||||
$revision = sprintf("%.2d", $last_revision + 1);
|
||||
}
|
||||
|
||||
my $new_version = "$datestr.$revision";
|
||||
|
||||
copy('debian/changelog', 'debian/changelog.old') or die "Couldn't copy debian/changelog to debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWCHANGELOG, ">debian/changelog") or die "Couldn't open debian/changelog for writing: $!\n";
|
||||
|
||||
print NEWCHANGELOG "$package ($new_version) unstable; urgency=low\n\n * CVS snapshot build at " . scalar localtime() . "\n\n -- $maintainer " . `date -R` . "\n";
|
||||
|
||||
open(OLDCHANGELOG, "debian/changelog.old") or die "Couldn't open debian/changelog.old: $!\n";
|
||||
|
||||
while (<OLDCHANGELOG>) {
|
||||
print NEWCHANGELOG;
|
||||
}
|
||||
|
||||
close OLDCHANGELOG;
|
||||
close NEWCHANGELOG;
|
||||
|
||||
unlink('debian/changelog.old') or die "Couldn't unlink debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWVERSION, '>debian/version') or die "Couldn't open debian/version for writing: $!\n";
|
||||
print NEWVERSION "$new_version\n";
|
||||
close NEWVERSION;
|
||||
|
||||
system('dpkg-buildpackage -b -rfakeroot -us -uc');
|
||||
unlink 'debian/version' or die "Couldn't unlink debian/version: $!\n";
|
||||
|
||||
165
debian/changelog
vendored
165
debian/changelog
vendored
@@ -1,8 +1,167 @@
|
||||
gtk+-cvs (19981116.01) unstable; urgency=low
|
||||
gtk+ (1:0.99.8-1) unstable; urgency=low
|
||||
|
||||
* First test build from CVS
|
||||
* New upstream version.
|
||||
* New file included in libgtk-dev: /usr/share/aclocal/gtk.m4,
|
||||
to help autoconf/automake developers use gtk and gtk-config
|
||||
more easily.
|
||||
* New file included in libgtk-doc: /usr/doc/libgtk-doc/gtk-config.txt
|
||||
Please refer to this doc when developing for gtk or compiling
|
||||
and running into odd path-related errors.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Thu, 19 Mar 1998 19:58:53 -0800
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 17 Nov 1998 12:02:13 -0800
|
||||
gtk+ (1:0.99.7-4) frozen unstable; urgency=low
|
||||
|
||||
* Rebuild with native Debian libtool to have libraries properly
|
||||
linked with libc and libX et al.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 17 Mar 1998 16:05:13 -0800
|
||||
|
||||
gtk+ (1:0.99.7-3) frozen unstable; urgency=low
|
||||
|
||||
* Accidentally included all the html docs in /usr/doc/libgtk-doc/faq-html;
|
||||
moved the tutorial into /usr/doc/libgtk-doc/tutorial-html.
|
||||
* Included the Italian Gtk+ Tutorial in
|
||||
/usr/doc/libgtk-doc/italian-tutorial-html.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 16 Mar 1998 22:39:57 -0800
|
||||
|
||||
gtk+ (1:0.99.7-2) unstable; urgency=low
|
||||
|
||||
* Upstream source added a /usr/lib/glib/ directory that I didn't
|
||||
notice; included this directory in libgtk-dev.
|
||||
* Realized that Xinput support was broken because I was doing
|
||||
./configure --enable-xinput=xfree instead of ./configure
|
||||
--with-xinput=xfree. Fixed.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Sun, 15 Mar 1998 19:17:05 -0800
|
||||
|
||||
gtk+ (1:0.99.7-1) unstable; urgency=low
|
||||
|
||||
* New upstream release -- THIS IS INCOMPATIBLE WITH OLDER RELEASES!
|
||||
All Gtk-using packages *will* need patches to work with this Gtk!
|
||||
* Upstream release includes 'gtk-config' script to check installed
|
||||
version of Gtk; included said script in libgtk-dev in /usr/bin.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Sun, 15 Mar 1998 11:03:03 -0800
|
||||
|
||||
gtk+ (1:0.99.5-2) unstable; urgency=low
|
||||
|
||||
* Modified libgtk-doc to Replace: libgtk-dev (<< 1:0.99.4) to
|
||||
deal with both packages including the same .info files.
|
||||
Fixes bug #19533.
|
||||
* Also noticed that libgtk-dev depended on libgtk1 without
|
||||
an epoch! Fixed.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Thu, 12 Mar 1998 13:37:11 -0800
|
||||
|
||||
gtk+ (1:0.99.5-1) unstable; urgency=low
|
||||
|
||||
* Wow, that was quick, a new upstream version.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 9 Mar 1998 22:08:08 -0800
|
||||
|
||||
gtk+ (1:0.99.4-3) unstable; urgency=low
|
||||
|
||||
* Recompiled with --enable-xinput=xfree to enable Wacom pads
|
||||
and other physical input devices.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 9 Mar 1998 21:26:07 -0800
|
||||
|
||||
gtk+ (1:0.99.4-2) unstable; urgency=MEDIUM
|
||||
|
||||
* Ack! The shlibs file makes things depend on libgtk1 (>= 0.99.4)
|
||||
rather than (>= 1:0.99.4)! Fixes bug #19134.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Sat, 7 Mar 1998 23:57:33 -0800
|
||||
|
||||
gtk+ (1:0.99.4-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Recompiled with new debhelper to remove du warnings.
|
||||
* Upstream source is named gtk+, not libgtk1. Changed source name.
|
||||
* Removed --disable-xim in hopes that xim is no longer broken.
|
||||
* Removed testgtk at the behest of the Gtk developers until I can
|
||||
come up with a better solution, probably related to:
|
||||
* the new libgtk-doc package! :) libgtk-doc contains the Gtk FAQ,
|
||||
the Gtk Tutorial, and the Gtk info files.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 3 Mar 1998 22:23:47 -0800
|
||||
|
||||
libgtk1 (1:0.99.3-2) unstable; urgency=low
|
||||
|
||||
* Created manpage for testgtk program.
|
||||
* Fixed copyright mention to LGPL.gz to be just LGPL.
|
||||
* This fixes all known lintian errors.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Wed, 11 Feb 1998 14:07:17 -0800
|
||||
|
||||
libgtk1 (1:0.99.3-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Include the testgtk binary in libgtk-dev.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Sat, 24 Jan 1998 15:30:09 -0800
|
||||
|
||||
libgtk1 (1:0.99.2-2) unstable; urgency=low
|
||||
|
||||
* Fixed shlibs file to specify version >=1:0.99.2.
|
||||
* Renamed debian/postinst.libgtk1 to debian/postinst, so debhelper
|
||||
would actually install it.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 5 Jan 1998 12:22:46 -0800
|
||||
|
||||
libgtk1 (1:0.99.2-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Sun, 4 Jan 1998 00:21:21 -0800
|
||||
|
||||
libgtk1 (1:0.99.0-1) unstable; urgency=medium
|
||||
|
||||
* New upstream version with new numbering scheme, went to epoch :1
|
||||
correspondingly.
|
||||
* Hopefully fixed entry-field bug.
|
||||
* Converted to use debhelper.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 15 Dec 1997 12:02:25 -0800
|
||||
|
||||
libgtk1 (971201-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Fixed copyright to say LGPL, not GPL. (bug #14867)
|
||||
* Re-added postinst ldconfig call. (bug #14213)
|
||||
* Info files should be correct now. (bugs #14773, #15143)
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 1 Dec 1997 16:41:50 -0800
|
||||
|
||||
libgtk1 (971109-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Name is really 'GIMP Tool Kit', not 'General Tool Kit'.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 10 Nov 1997 16:15:27 -0800
|
||||
|
||||
libgtk1 (970925-3) unstable; urgency=low
|
||||
|
||||
* Moved the include files to /usr/include/{gtk,gdk}.
|
||||
* Removed postinst/postrm ldconfig calls, fixes old gimp bug #13773.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Fri, 17 Oct 1997 17:06:10 -0700
|
||||
|
||||
libgtk1 (970925-2) unstable; urgency=low
|
||||
|
||||
* Added the shlibs file.
|
||||
* Removed the postinst/postrm calls to ldconfig, fixes bug #13733.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Fri, 10 Oct 1997 17:55:39 -0700
|
||||
|
||||
libgtk1 (970925-1) unstable; urgency=low
|
||||
|
||||
* New upstream version.
|
||||
* Split off source tree from gimp's source tree.
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Mon, 29 Sep 1997 13:14:45 -0700
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
|
||||
70
debian/control
vendored
70
debian/control
vendored
@@ -1,81 +1,41 @@
|
||||
Source: gtk+-cvs
|
||||
Priority: extra
|
||||
Source: gtk+
|
||||
Priority: optional
|
||||
Section: libs
|
||||
Maintainer: Ben Gertzfield <che@debian.org>
|
||||
Standards-Version: 2.4.0.0
|
||||
|
||||
Package: libgtk-cvs-1.1
|
||||
Package: libgtk1
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends}
|
||||
Conflicts: libgtk-dev (<< 1:1.0.2), libgtk1.1
|
||||
Description: CVS build of the GIMP Toolkit set of widgets for X
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
Description: The GIMP Toolkit set of widgets for X
|
||||
The GIMP Toolkit is a freely available set of widgets for X.
|
||||
GTK is easy to use, and has been implemented in such projects as
|
||||
The GNU Image Manipulation Program (The GIMP), GNOME, a GNU
|
||||
desktop set of utilities for X, and gzilla, a GNU web-browser.
|
||||
.
|
||||
This is the unstable 1.1 branch of GTK. It is not intended for use
|
||||
with stable projects!
|
||||
|
||||
Package: libgtk-cvs-dev
|
||||
Package: libgtk-dev
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (=${Source-Version}), libglib-cvs-dev
|
||||
Suggests: libgtk-cvs-doc
|
||||
Provides: libgtk1.1-dev
|
||||
Replaces: libgtk1.1-dev
|
||||
Conflicts: libgtk-dev, libgtk1 (<< 1:1.0.4), libgtk1.1-dev
|
||||
Description: CVS build of development files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
Depends: libgtk1 (>= 1:0.99.8)
|
||||
Suggests: libgtk-doc
|
||||
Replaces: libgtk1 (<= 0.99.7)
|
||||
Description: Header files and static libraries for the GIMP Toolkit
|
||||
This package contains the header files and static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to develop your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to compile your own plug-ins for
|
||||
the GIMP Toolkit, or if you wish to compile your own plug-ins for
|
||||
The GIMP.
|
||||
|
||||
Package: libgtk-cvs-doc
|
||||
Package: libgtk-doc
|
||||
Architecture: all
|
||||
Section: doc
|
||||
Conflicts: libgtk-dev (<< 1:0.99.4), libgtk-doc, libgtk1.1-doc
|
||||
Description: CVS build of documentation for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
Section: docs
|
||||
Replaces: libgtk-dev (<< 1:0.99.4)
|
||||
Description: Documentation and example code for the GIMP Toolkit
|
||||
This package contains lots of info-files, HTML docs, FAQs, and
|
||||
other handy documentation about the GIMP Toolkit set of widgets
|
||||
for X.
|
||||
for X.
|
||||
.
|
||||
This package documents the unstable 1.1 release of the GIMP Toolkit.
|
||||
.
|
||||
Install this package if you want to have lots of info about the
|
||||
GIMP toolkit when you're programming.
|
||||
|
||||
Package: libgtk-cvs-dbg
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (= ${Source-Version}), libgtk-cvs-dev (= ${Source-Version})
|
||||
Suggests: libgtk-cvs-doc
|
||||
Conflicts: libgtk1.1-dbg
|
||||
Description: CVS build of debugging files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the debugging static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to debug your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to debug your own plug-ins for
|
||||
The GIMP.
|
||||
|
||||
6
debian/copyright
vendored
6
debian/copyright
vendored
@@ -1,7 +1,7 @@
|
||||
This package was debianized by Ben Gertzfield <che@debian.org> on
|
||||
Tue, 17 Nov 1998 12:07:17 -0800
|
||||
This package was debianized by Ben Gertzfield che@imsa.edu on
|
||||
Tue, 22 Jul 1997 20:53:20 -0500
|
||||
|
||||
It was produced from the CVS repository at cvs.gimp.org.
|
||||
It was downloaded from ftp.gimp.org.
|
||||
|
||||
It may be redistributed under the terms of the GNU LGPL, Version 2 or
|
||||
later, found on Debian systems in the file /usr/doc/copyright/LGPL.
|
||||
|
||||
9
debian/libgtk-cvs-dev.files
vendored
9
debian/libgtk-cvs-dev.files
vendored
@@ -1,9 +0,0 @@
|
||||
usr/lib/libgdk.so
|
||||
usr/lib/libgdk.a
|
||||
usr/lib/libgtk.so
|
||||
usr/lib/libgtk.a
|
||||
usr/include/gdk/
|
||||
usr/include/gtk/
|
||||
usr/bin/gtk-config
|
||||
usr/man/man1/gtk-config.1
|
||||
usr/share/aclocal/gtk.m4
|
||||
8
debian/libgtk-cvs-doc.files
vendored
8
debian/libgtk-cvs-doc.files
vendored
@@ -1,8 +0,0 @@
|
||||
usr/info/gdk.info
|
||||
usr/info/gtk.info
|
||||
usr/info/gtk.info-1
|
||||
usr/info/gtk.info-2
|
||||
usr/info/gtk.info-3
|
||||
usr/info/gtk.info-4
|
||||
usr/info/gtk.info-5
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
ldconfig
|
||||
|
||||
#DEBHELPER#
|
||||
@@ -8,4 +8,7 @@ install-info --quiet --description="The GIMP Toolkit." \
|
||||
install-info --quiet --description="The GIMP Drawing Kit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gdk.info.gz
|
||||
|
||||
install-info --quiet --description="The GIMP Library." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/glib.info.gz
|
||||
|
||||
#DEBHELPER#
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
install-info --quiet --remove glib
|
||||
install-info --quiet --remove gdk
|
||||
|
||||
#DEBHELPER#
|
||||
196
debian/rules
vendored
196
debian/rules
vendored
@@ -1,50 +1,27 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# debian/rules file for gtk+ Debian package
|
||||
# written April 1998 by Ben Gertzfield <che@debian.org
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
./autogen.sh --prefix=/usr --with-xinput=xfree
|
||||
# Add here commands to compile the package.
|
||||
./configure --prefix=/usr --with-xinput=xfree
|
||||
$(MAKE)
|
||||
cd docs && make distdocs
|
||||
cd docs && make -f Makefile.sgml
|
||||
cd ..
|
||||
touch build-stamp
|
||||
|
||||
build-dbg: build-dbg-stamp
|
||||
build-dbg-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --with-xinput=xfree --enable-debug=yes
|
||||
$(MAKE)
|
||||
touch build-dbg-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
rm -f build-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
-rm docs/*.html
|
||||
dh_clean
|
||||
|
||||
clean-dbg:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean -k
|
||||
|
||||
install: install-stamp
|
||||
install-stamp: build
|
||||
dh_testdir
|
||||
@@ -53,105 +30,88 @@ install-stamp: build
|
||||
$(MAKE) prefix=`pwd`/debian/tmp/usr install
|
||||
touch install-stamp
|
||||
|
||||
install-dbg: install-dbg-stamp
|
||||
install-dbg-stamp: build-dbg
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
$(MAKE) prefix=`pwd`/debian/libgtk-cvs-dbg/usr install
|
||||
touch install-dbg-stamp
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install libgtk-cvs-doc
|
||||
binary-indep: build install libgtk-doc
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install libgtk-cvs-dev libgtk-cvs-1.1 libgtk-cvs-dbg
|
||||
binary-arch: build install libgtk-dev libgtk1
|
||||
|
||||
libgtk-cvs-1.1: build
|
||||
dh_testdir -plibgtk-cvs-1.1
|
||||
dh_testroot -plibgtk-cvs-1.1
|
||||
dh_installdirs -plibgtk-cvs-1.1
|
||||
libgtk1: build
|
||||
dh_testdir -plibgtk1
|
||||
dh_testroot -plibgtk1
|
||||
# dh_clean -plibgtk1
|
||||
dh_installdirs -plibgtk1
|
||||
# Add here commands to install the files into debian/tmp
|
||||
rm -rf debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/info debian/tmp/usr/lib/glib debian/tmp/usr/share/aclocal debian/tmp/usr/man debian/tmp/usr/lib/*.la
|
||||
dh_installdocs -plibgtk-cvs-1.1
|
||||
dh_installchangelogs -plibgtk-cvs-1.1
|
||||
dh_strip -plibgtk-cvs-1.1
|
||||
dh_compress -plibgtk-cvs-1.1
|
||||
dh_fixperms -plibgtk-cvs-1.1
|
||||
dh_installdeb -plibgtk-cvs-1.1
|
||||
dh_shlibdeps -plibgtk-cvs-1.1
|
||||
dh_gencontrol -plibgtk-cvs-1.1
|
||||
dh_makeshlibs -plibgtk-cvs-1.1 -V 'libgtk-cvs-1.1 (='`cat debian/version`')'
|
||||
dh_md5sums -plibgtk-cvs-1.1
|
||||
dh_builddeb -plibgtk-cvs-1.1
|
||||
rm -rf debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/info debian/tmp/usr/lib/glib debian/tmp/usr/share
|
||||
# dh_movefiles -plibgtk1
|
||||
# $(MAKE) prefix=`pwd`/debian/tmp/usr install
|
||||
# rmdir debian/tmp/usr/bin
|
||||
# rm debian/tmp/usr/lib/*.{so,la,a}
|
||||
# rm -rf debian/tmp/usr/{include,info}
|
||||
dh_installdocs -plibgtk1
|
||||
dh_installchangelogs -plibgtk1
|
||||
dh_strip -plibgtk1
|
||||
dh_compress -plibgtk1
|
||||
dh_fixperms -plibgtk1
|
||||
dh_installdeb -plibgtk1
|
||||
dh_shlibdeps -plibgtk1
|
||||
dh_gencontrol -plibgtk1
|
||||
dh_makeshlibs -plibgtk1 -V 'libgtk1 (>= 1:0.99.7)'
|
||||
# echo "libglib 1 libgtk1 (>=0.99.4)" >> debian/tmp/DEBIAN/shlibs
|
||||
# echo "libgtk 1 libgtk1 (>=0.99.4)" >> debian/tmp/DEBIAN/shlibs
|
||||
# echo "libgdk 1 libgtk1 (>=0.99.4)" >> debian/tmp/DEBIAN/shlibs
|
||||
dh_md5sums -plibgtk1
|
||||
dh_builddeb -plibgtk1
|
||||
|
||||
libgtk-cvs-dev: build
|
||||
dh_testdir -plibgtk-cvs-dev
|
||||
dh_testroot -plibgtk-cvs-dev
|
||||
dh_clean -plibgtk-cvs-dev -k
|
||||
dh_installdirs -plibgtk-cvs-dev
|
||||
libgtk-dev: build
|
||||
dh_testdir -plibgtk-dev
|
||||
dh_testroot -plibgtk-dev
|
||||
dh_clean -plibgtk-dev -k
|
||||
dh_installdirs -plibgtk-dev
|
||||
# Add here commands to install the files into debian/tmp
|
||||
dh_movefiles -plibgtk-cvs-dev
|
||||
dh_movefiles -plibgtk-dev
|
||||
cp gtk-config debian/tmp/usr/bin
|
||||
dh_installdocs -plibgtk-cvs-dev
|
||||
dh_installchangelogs -plibgtk-cvs-dev
|
||||
dh_strip -plibgtk-cvs-dev
|
||||
dh_compress -plibgtk-cvs-dev
|
||||
dh_fixperms -plibgtk-cvs-dev
|
||||
dh_installdeb -plibgtk-cvs-dev
|
||||
dh_shlibdeps -plibgtk-cvs-dev
|
||||
dh_gencontrol -plibgtk-cvs-dev
|
||||
dh_md5sums -plibgtk-cvs-dev
|
||||
dh_builddeb -plibgtk-cvs-dev
|
||||
# $(MAKE) prefix=`pwd`/debian/libgtk-dev/usr install
|
||||
# find debian/libgtk-dev/usr/lib \( -type f -or -type l \) -and ! \( -name \*.so -or -name \*.a \) | xargs rm
|
||||
# cp gtk/.libs/testgtk debian/libgtk-dev/usr/bin
|
||||
# cp debian/testgtk.1 debian/libgtk-dev/usr/man/man1
|
||||
dh_installdocs -plibgtk-dev
|
||||
dh_installchangelogs -plibgtk-dev
|
||||
dh_strip -plibgtk-dev
|
||||
dh_compress -plibgtk-dev
|
||||
dh_fixperms -plibgtk-dev
|
||||
dh_installdeb -plibgtk-dev
|
||||
dh_shlibdeps -plibgtk-dev
|
||||
dh_gencontrol -plibgtk-dev
|
||||
dh_makeshlibs -plibgtk-dev
|
||||
dh_md5sums -plibgtk-dev
|
||||
dh_builddeb -plibgtk-dev
|
||||
|
||||
libgtk-cvs-doc:
|
||||
dh_testdir -plibgtk-cvs-doc
|
||||
dh_testroot -plibgtk-cvs-doc
|
||||
dh_clean -plibgtk-cvs-doc -k
|
||||
dh_installdirs -plibgtk-cvs-doc usr/doc/libgtk-cvs-doc/faq-html \
|
||||
usr/doc/libgtk-cvs-doc/tutorial-html usr/doc/libgtk-cvs-doc/italian-tutorial-html usr/doc/libgtk-cvs-doc/french-tutorial-html usr/doc/libgtk-cvs-doc/gdk-html
|
||||
dh_movefiles -plibgtk-cvs-doc
|
||||
cp docs/html/gtkfaq*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/faq-html
|
||||
cp docs/html/gtk_tut-*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut_it*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/gtk_tut_fr*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/gdk* debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/gdk-html
|
||||
cp docs/text/*.txt debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/
|
||||
libgtk-doc:
|
||||
dh_testdir -plibgtk-doc
|
||||
dh_testroot -plibgtk-doc
|
||||
dh_clean -plibgtk-doc -k
|
||||
dh_installdirs -plibgtk-doc usr/doc/libgtk-doc/faq-html \
|
||||
usr/doc/libgtk-doc/tutorial-html usr/doc/libgtk-doc/italian-tutorial-html
|
||||
# Add here commands to install the files into debian/tmp
|
||||
dh_movefiles -plibgtk-doc
|
||||
cp docs/gtkfaq*.html debian/libgtk-doc/usr/doc/libgtk-doc/faq-html
|
||||
cp docs/gtk_tut-*.html debian/libgtk-doc/usr/doc/libgtk-doc/tutorial-html
|
||||
cp docs/gtk_tut.html debian/libgtk-doc/usr/doc/libgtk-doc/tutorial-html
|
||||
cp docs/gtk_tut_it*.html debian/libgtk-doc/usr/doc/libgtk-doc/italian-tutorial-html
|
||||
dh_installdocs -plibgtk-doc docs/{debugging,developers,styles,text_widget,widget_system,gtk-config}.txt ChangeLog TODO NEWS
|
||||
dh_installchangelogs -plibgtk-doc
|
||||
dh_strip -plibgtk-doc
|
||||
dh_compress -plibgtk-doc
|
||||
dh_fixperms -plibgtk-doc
|
||||
dh_installdeb -plibgtk-doc
|
||||
dh_shlibdeps -plibgtk-doc
|
||||
dh_gencontrol -plibgtk-doc
|
||||
dh_makeshlibs -plibgtk-doc
|
||||
dh_md5sums -plibgtk-doc
|
||||
dh_builddeb -plibgtk-doc
|
||||
|
||||
dh_installdocs -plibgtk-cvs-doc docs/{debugging,developers,styles,text_widget,widget_system,gtk-config,refcounting}.txt TODO NEWS
|
||||
dh_installchangelogs -plibgtk-cvs-doc
|
||||
dh_strip -plibgtk-cvs-doc
|
||||
dh_compress -plibgtk-cvs-doc
|
||||
dh_fixperms -plibgtk-cvs-doc
|
||||
dh_installdeb -plibgtk-cvs-doc
|
||||
dh_shlibdeps -plibgtk-cvs-doc
|
||||
dh_gencontrol -plibgtk-cvs-doc
|
||||
dh_md5sums -plibgtk-cvs-doc
|
||||
dh_builddeb -plibgtk-cvs-doc
|
||||
|
||||
libgtk-cvs-dbg: clean-dbg install-dbg
|
||||
dh_testdir -plibgtk-cvs-dbg
|
||||
dh_testroot -plibgtk-cvs-dbg
|
||||
dh_installdirs -plibgtk-cvs-dbg
|
||||
# Add here commands to install the files into debian/libgtk-cvs-dbg
|
||||
rm -rf debian/libgtk-cvs-dbg/usr/bin debian/libgtk-cvs-dbg/usr/include debian/libgtk-cvs-dbg/usr/info debian/libgtk-cvs-dbg/usr/lib/glib debian/libgtk-cvs-dbg/usr/man debian/libgtk-cvs-dbg/usr/share debian/libgtk-cvs-dbg/usr/lib/*.{la,so*}
|
||||
for file in `find debian/libgtk-cvs-dbg/usr/lib -name '*.a'` ; do \
|
||||
mv $$file debian/libgtk-cvs-dbg/usr/lib/`basename $$file .a`_g.a; \
|
||||
done
|
||||
dh_installdocs -plibgtk-cvs-dbg
|
||||
dh_installchangelogs -plibgtk-cvs-dbg
|
||||
dh_compress -plibgtk-cvs-dbg
|
||||
dh_fixperms -plibgtk-cvs-dbg
|
||||
dh_installdeb -plibgtk-cvs-dbg
|
||||
dh_shlibdeps -plibgtk-cvs-dbg
|
||||
dh_gencontrol -plibgtk-cvs-dbg
|
||||
dh_md5sums -plibgtk-cvs-dbg
|
||||
dh_builddeb -plibgtk-cvs-dbg
|
||||
|
||||
source diff:
|
||||
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
|
||||
|
||||
@@ -16,7 +16,3 @@ Makefile.in
|
||||
*.cps
|
||||
*.fns
|
||||
*.vrs
|
||||
html
|
||||
text
|
||||
texinfo.tex
|
||||
gtk-config.1
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
Incompatible Changes from GTK+-1.0 to GTK+-1.2:
|
||||
|
||||
* GtkAcceleratorTable has been replaced with GtkAccelGroup
|
||||
|
||||
* GtkMenuFactory has been replaced with GtkItemFactory, although
|
||||
a version of GtkMenuFactory is currently still provided to ease
|
||||
the migration phase.
|
||||
|
||||
* The GtkTypeInfo structures used in the gtk_*_type_init() functions have
|
||||
changed a bit, the old format:
|
||||
GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL,
|
||||
};
|
||||
|
||||
needs to be converted to:
|
||||
|
||||
static const GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
the GtkArgSetFunc and GtkArgGetFunc functions are not supported from the
|
||||
type system anymore, and you should make sure that your code only fills
|
||||
in these fields with NULL and doesn't use the deprecated function typedefs
|
||||
(GtkArgSetFunc) and (GtkArgGetFunc) anymore.
|
||||
|
||||
* A number of Gtk functions were renamed. For compatibility, gtkcompat.h
|
||||
#define's the old 1.0.x function names in terms of the new names.
|
||||
To assure your Gtk program doesn't rely on outdated function
|
||||
variants, compile your program with -DGTK_DISABLE_COMPAT_H to disable
|
||||
the compatibility aliases.
|
||||
|
||||
Here is the list of the old names and replacements:
|
||||
|
||||
Old: Replacement:
|
||||
|
||||
gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
|
||||
gtk_check_menu_item_set_state gtk_check_menu_item_set_active
|
||||
gtk_container_border_width gtk_container_set_border_width
|
||||
gtk_label_set gtk_label_set_text
|
||||
gtk_notebook_current_page gtk_notebook_get_current_page
|
||||
gtk_packer_configure gtk_packer_set_child_packing
|
||||
gtk_paned_gutter_size gtk_paned_set_gutter_size
|
||||
gtk_paned_handle_size gtk_paned_set_handle_size
|
||||
gtk_scale_value_width gtk_scale_get_value_width
|
||||
gtk_style_apply_default_pixmap gtk_style_apply_default_background (1)
|
||||
gtk_toggle_button_set_state gtk_toggle_button_set_active
|
||||
gtk_window_position gtk_window_set_position
|
||||
|
||||
(1) gtk_style_apply_default_background() has an additional
|
||||
argument, gboolean set_bg. This parameter should be FALSE if
|
||||
the background is being set for a NO_WINDOW widget, otherwise
|
||||
true.
|
||||
|
||||
* During the development phase of the 1.1.x line of Gtk certain functions
|
||||
were deprecated and later removed. Functions affected are:
|
||||
|
||||
Removed: Replacement:
|
||||
gtk_clist_set_border gtk_clist_set_shadow_type
|
||||
gtk_container_block_resize gtk_container_set_resize_mode
|
||||
gtk_container_unblock_resize gtk_container_set_resize_mode
|
||||
gtk_container_need_resize gtk_container_check_resize
|
||||
gtk_ctree_show_stub gtk_ctree_set_show_stub
|
||||
gtk_ctree_set_reorderable gtk_clist_set_reorderable
|
||||
gtk_ctree_set_use_drag_icons gtk_clist_set_use_drag_icons
|
||||
gtk_entry_adjust_scroll (1)
|
||||
gtk_object_class_add_user_signal gtk_object_class_user_signal_new
|
||||
gtk_preview_put_row gtk_preview_put
|
||||
gtk_progress_bar_construct gtk_progress_set_adjustment
|
||||
gtk_scrolled_window_construct gtk_scrolled_window_set_{h|v}adjustment
|
||||
gtk_spin_button_construct gtk_spin_button_configure
|
||||
gtk_widget_thaw_accelerators gtk_widget_unlock_accelerators
|
||||
gtk_widget_freeze_accelerators gtk_widget_lock_accelerators
|
||||
|
||||
(1) This function is no longer needed as GtkEntry should automatically
|
||||
keep the scroll adjusted properly.
|
||||
|
||||
* Additionally, all gtk_*_interp functions were removed.
|
||||
gtk_*_full versions were provided as of GTK+-1.0 and should
|
||||
be used instead.
|
||||
|
||||
* GtkButton has been changed to derive from GtkBin.
|
||||
To access a button's child, use GTK_BIN (button)->child, instead
|
||||
of the old GTK_BUTTON (button)->child.
|
||||
|
||||
* The selection API has been slightly modified:
|
||||
|
||||
gtk_selection_add_handler() and gtk_selection_add_handler_full()
|
||||
have been removed. To supply the selection, one now register
|
||||
the targets one is interested in with:
|
||||
|
||||
void gtk_selection_add_target (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
guint info);
|
||||
|
||||
or:
|
||||
|
||||
void gtk_selection_add_targets (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GtkTargetEntry *targets,
|
||||
guint ntargets);
|
||||
|
||||
When a request for a selection is received, the new "selection_get"
|
||||
signal will be called:
|
||||
|
||||
void "selection_get" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time);
|
||||
|
||||
A "time" parameter has also been added to the "selection_received"
|
||||
signal.
|
||||
|
||||
void "selection_received" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint time);
|
||||
|
||||
* The old drag and drop API has been completely removed and replaced.
|
||||
See the reference documentation for details on the new API.
|
||||
|
||||
* Support for Themes has been added. In general, this does
|
||||
not affect application code, however, a few new rules should
|
||||
be observed:
|
||||
|
||||
- To set a shape for a window, you must use
|
||||
gtk_widget_shape_combine_mask() instead of
|
||||
gdk_window_shape_combine_mask(), or the shape will be
|
||||
reset when switching themes.
|
||||
|
||||
- It is no longer permissable to draw directly on an arbitrary
|
||||
widget, or to set an arbitrary widget's background pixmap.
|
||||
If you need to do that, use a GtkDrawingArea or (for a
|
||||
toplevel) the new GtkDrawWindow widget.
|
||||
|
||||
* The ScrolledWindow widget no longer creates a Viewport
|
||||
automatically. Instead, it has been generalized to accept
|
||||
any "self-scrolling" widget.
|
||||
|
||||
The self-scrolling widgets in the Gtk+ core are GtkViewport,
|
||||
GtkCList, GtkCTree, GtkText, and GtkLayout. All of these widgets can
|
||||
be added to a scrolled window as normal children with
|
||||
gtk_container_add() and scrollbars will be set up automatically.
|
||||
|
||||
To add scrollbars to a non self-scrolling widget, (such as a GtkList),
|
||||
first add it to a viewport, then add the viewport to a scrolled window.
|
||||
The scrolled window code provides a convenience function to do this:
|
||||
|
||||
void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrollwin,
|
||||
GtkWidget *child);
|
||||
|
||||
This does exactly what it says - it creates a Viewport, adds the child
|
||||
widget to it, then adds the Viewport to the scrolled window.
|
||||
|
||||
The scrollbars have been removed from the GtkCList and GtkCTree,
|
||||
because they are now scrolled by simply adding them to a Scrolled
|
||||
Window. The scrollbar policy is set on the scrolled window with
|
||||
gtk_scrolled_window_set_policy() and not on the child widgets
|
||||
(e.g. GtkCList's gtk_clist_set_policy() was removed).
|
||||
|
||||
* The "main loop" of GTK+ has been moved to GLib. This should not
|
||||
affect existing programs, since compatibility functions have
|
||||
been provided. However, you may want to consider migrating
|
||||
your code to use the GLib main loop directly.
|
||||
|
||||
* the GTK_BASIC flag was removed, and with it the corresponding
|
||||
macro and function GTK_WIDGET_BASIC() and gtk_widget_basic().
|
||||
|
||||
* All freeze/thaw methods are now recursive - that is, if you
|
||||
freeze a widget n times, you must also thaw it n times.
|
||||
|
||||
Therefore, if you have code like:
|
||||
|
||||
gboolean frozen;
|
||||
frozen = GTK_CLIST_FROZEN (clist);
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
if (!frozen)
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
it will not work anymore. It must be, simply:
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
* The thread safety in GTK+ 1.2 is slightly different than
|
||||
that which appeared in early versions in the 1.1
|
||||
development track. The main difference is that it relies on
|
||||
the thread primitives in GLib, and on the thread-safe
|
||||
GLib main loop.
|
||||
|
||||
This means:
|
||||
|
||||
- You must call g_thread_init() before executing any
|
||||
other GTK+ or GDK functions in a threaded GTK+ program.
|
||||
|
||||
- Idles, timeouts, and input functions are executed outside
|
||||
of the main GTK+ lock. So, if you need to call GTK+
|
||||
inside of such a callback, you must surround the callback
|
||||
with a gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
[ However, signals are still executed within the main
|
||||
GTK+ lock ]
|
||||
|
||||
In particular, this means, if you are writing widgets
|
||||
that might be used in threaded programs, you _must_
|
||||
surround timeouts and idle functions in this matter.
|
||||
|
||||
As always, you must also surround any calls to GTK+
|
||||
not made within a signal handler with a
|
||||
gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
- There is no longer a special --with-threads configure
|
||||
option for GTK+. To use threads in a GTK+ program, you
|
||||
must:
|
||||
|
||||
a) If you want to use the native thread implementation,
|
||||
make sure GLib found this in configuration, otherwise,
|
||||
call you must provide a thread implementation to
|
||||
g_thread_init().
|
||||
|
||||
b) Link with the libraries returned by:
|
||||
|
||||
gtk-config --libs gthread
|
||||
|
||||
and use the cflags from:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
You can get these CFLAGS and LIBS by passing gthread
|
||||
as the fourth parameter to the AM_PATH_GTK automake
|
||||
macro.
|
||||
|
||||
* Prior to GTK+-1.2, there were two conflicting interpretations
|
||||
of widget->requistion. It was either taken to be
|
||||
the size that the widget requested, or that size
|
||||
modified by calls to gtk_widget_set_usize(). In GTK+-1.2,
|
||||
it is always interpreted the first way.
|
||||
|
||||
Container widgets are affected in two ways by this:
|
||||
|
||||
1) Container widgets should not pass widget->requisition
|
||||
as the second parameter to gtk_widget_size_request().
|
||||
Instead they should call it like:
|
||||
|
||||
GtkRequisition child_requisition;
|
||||
gtk_widget_size_request (widget, &child_requisition);
|
||||
|
||||
2) Container widgets should not access child->requisition
|
||||
directly. Either they should use the values returned
|
||||
by gtk_widget_size_request(), or they should call
|
||||
the new function:
|
||||
|
||||
void gtk_widget_get_child_requisition (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
|
||||
which returns the requisition of the given widget, modified
|
||||
by calls to gtk_widget_set_usize().
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
Incompatible Changes from GTK+-1.2 to GTK+-1.4:
|
||||
|
||||
* The gdk_time* functions have been removed. This functionality
|
||||
has been unused since the main loop was moved into GLib
|
||||
prior to 1.2.
|
||||
|
||||
* The signature for GtkPrintFunc (used for gtk_item_factory_dump_items)
|
||||
has been changed to take a 'const gchar *' instead of 'gchar *', to
|
||||
match what we do for glib, and other similar cases.
|
||||
|
||||
* The detail arguments in the GtkStyleClass structure are now 'const gchar *'.
|
||||
|
||||
* gtk_paned_set_gutter_size() has been removed, since the small handle tab
|
||||
has been changed to include the entire area previously occupied by
|
||||
the gutter.
|
||||
|
||||
* GDK no longer selects OwnerGrabButtonMask for button presses. This means
|
||||
that the automatic grab that occurs when the user presses a button
|
||||
will have owner_events = FALSE, so all events are redirected to the
|
||||
grab window, even events that would normally go to other windows of the
|
||||
window's owner.
|
||||
|
||||
* GtkColorSelectionDialog has now been moved into it's own set of files,
|
||||
gtkcolorseldialog.c and gtkcolorseldialog.h.
|
||||
|
||||
* gtk_widget_shape_combine_mask() now keeps a reference count on the
|
||||
mask pixmap that is passed in.
|
||||
|
||||
* Type system changes:
|
||||
- GTK_TYPE_OBJECT is not a fundamental type anymore. Type checks of the
|
||||
style (GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT)
|
||||
will not work anymore. As a replacement, (GTK_TYPE_IS_OBJECT (some_type))
|
||||
can be used now.
|
||||
- The following types vanished: GTK_TYPE_ARGS, GTK_TYPE_CALLBACK,
|
||||
GTK_TYPE_C_CALLBACK, GTK_TYPE_FOREIGN. The corresponding GtkArg
|
||||
fields and field access macros are also gone.
|
||||
- The following type aliases vanished: GTK_TYPE_FLAT_FIRST,
|
||||
GTK_TYPE_FLAT_LAST, GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST.
|
||||
- The type macros GTK_TYPE_MAKE() and GTK_TYPE_SEQNO() vanished, use of
|
||||
GTK_FUNDAMENTAL_TYPE() is discouraged. Instead, the corresponding GType
|
||||
API should be used: G_TYPE_FUNDAMENTAL(), G_TYPE_DERIVE_ID(),
|
||||
G_TYPE_BRANCH_SEQNO(). Note that the GLib type system doesn't build new
|
||||
type ids based on a global incremental sequential number anymore, but
|
||||
numbers new type ids sequentially per fundamental type branch.
|
||||
- The following type functions vanished/were replaced:
|
||||
Old Function Replacement
|
||||
gtk_type_query() - being investigated -
|
||||
gtk_type_set_varargs_type() -
|
||||
gtk_type_get_varargs_type() -
|
||||
gtk_type_check_object_cast() g_type_check_instance_cast()
|
||||
gtk_type_check_class_cast() g_type_check_class_cast()
|
||||
gtk_type_describe_tree() -
|
||||
gtk_type_describe_heritage() -
|
||||
gtk_type_free() -
|
||||
gtk_type_children_types() g_type_children()
|
||||
gtk_type_set_chunk_alloc() GTypeInfo.n_preallocs
|
||||
gtk_type_register_enum() g_enum_register_static()
|
||||
gtk_type_register_flags() g_flags_register_static()
|
||||
gtk_type_parent_class() g_type_parent() / g_type_class_peek_parent()
|
||||
Use of g_type_class_ref() / g_type_class_unref() and g_type_class_peek()
|
||||
is recommended over usage of gtk_type_class().
|
||||
Use of g_type_register_static() / g_type_register_dynamic() is recommended
|
||||
over usage of gtk_type_unique().
|
||||
|
||||
* Object system changes:
|
||||
GtkObject derives from GObject, so is not the basic object type anymore.
|
||||
This imposes the following source incompatible changes:
|
||||
- GtkObject has no klass field anymore, an object's class can be retrived
|
||||
with the object's coresponding GTK_<OBJECT>_GET_CLASS (object) macro.
|
||||
- GtkObjectClass has no type field anymore, a class's type can be retrived
|
||||
with the GTK_CLASS_TYPE (class) macro.
|
||||
- GtkObjectClass does not introduce the finalize() and shutdown() methods
|
||||
anymore. While shutdown() is intended for GTK+ internal use only, finalize()
|
||||
is required by a variety of object implementations. GObjectClass.finalize
|
||||
should be overriden here, e.g.:
|
||||
static void gtk_label_finalize (GObject *gobject)
|
||||
{
|
||||
GtkLabel *label = GTK_LABEL (gobject);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
static void gtk_label_class_init (GtkLabelClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
||||
|
||||
gobject_class->finalize = gtk_label_finalize;
|
||||
}
|
||||
|
||||
- the GtkObject::destroy signal can now be emitted multiple times on an object.
|
||||
::destroy implementations should check that make sure that they take this
|
||||
into account, by checking to make sure that resources are there before
|
||||
freeing them. For example:
|
||||
if (object->foo_data)
|
||||
{
|
||||
g_free (object->foo_data);
|
||||
object->foo_data = NULL;
|
||||
}
|
||||
|
||||
Also, ::destroy implementations have to release object references that
|
||||
the object holds. Code in finalize implementations such as:
|
||||
if (object->adjustment)
|
||||
{
|
||||
gtk_object_unref (object->adjustment);
|
||||
object->adjustment = NULL;
|
||||
}
|
||||
have to be moved into the ::destroy implementations. The reason for doing
|
||||
this is that all object reference cycles should be broken at destruction
|
||||
time.
|
||||
211
docs/Makefile.am
211
docs/Makefile.am
@@ -1,201 +1,32 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
info_TEXINFOS = gdk.texi gtk.texi
|
||||
info_TEXINFOS = gdk.texi gtk.texi glib.texi
|
||||
|
||||
man_MANS = gtk-config.1
|
||||
|
||||
TUTORIAL_FR_FILES=html/gtk_tut_fr-1.html \
|
||||
html/gtk_tut_fr-2.html \
|
||||
html/gtk_tut_fr-3.html \
|
||||
html/gtk_tut_fr-4.html \
|
||||
html/gtk_tut_fr-5.html \
|
||||
html/gtk_tut_fr-6.html \
|
||||
html/gtk_tut_fr-7.html \
|
||||
html/gtk_tut_fr-8.html \
|
||||
html/gtk_tut_fr-9.html \
|
||||
html/gtk_tut_fr-10.html \
|
||||
html/gtk_tut_fr-11.html \
|
||||
html/gtk_tut_fr-12.html \
|
||||
html/gtk_tut_fr-13.html \
|
||||
html/gtk_tut_fr-14.html \
|
||||
html/gtk_tut_fr-15.html \
|
||||
html/gtk_tut_fr-16.html \
|
||||
html/gtk_tut_fr-17.html \
|
||||
html/gtk_tut_fr-18.html \
|
||||
html/gtk_tut_fr-19.html \
|
||||
html/gtk_tut_fr-20.html \
|
||||
html/gtk_tut_fr-21.html \
|
||||
html/gtk_tut_fr-22.html \
|
||||
html/gtk_tut_fr-23.html \
|
||||
html/gtk_tut_fr-24.html \
|
||||
html/gtk_tut_fr.html text/gtk_tut_fr.txt
|
||||
|
||||
TUTORIAL_FILES=text/gtk_tut.txt html/gtk_tut.html \
|
||||
html/gtk_tut.html \
|
||||
html/gtk_tut-1.html \
|
||||
html/gtk_tut-2.html \
|
||||
html/gtk_tut-3.html \
|
||||
html/gtk_tut-4.html \
|
||||
html/gtk_tut-5.html \
|
||||
html/gtk_tut-6.html \
|
||||
html/gtk_tut-7.html \
|
||||
html/gtk_tut-8.html \
|
||||
html/gtk_tut-9.html \
|
||||
html/gtk_tut-10.html \
|
||||
html/gtk_tut-11.html \
|
||||
html/gtk_tut-12.html \
|
||||
html/gtk_tut-13.html \
|
||||
html/gtk_tut-14.html \
|
||||
html/gtk_tut-15.html \
|
||||
html/gtk_tut-16.html \
|
||||
html/gtk_tut-17.html \
|
||||
html/gtk_tut-18.html \
|
||||
html/gtk_tut-19.html \
|
||||
html/gtk_tut-20.html \
|
||||
html/gtk_tut-21.html \
|
||||
html/gtk_tut-22.html \
|
||||
html/gtk_tut-23.html \
|
||||
html/gtk_tut-24.html \
|
||||
html/gtk_tut-25.html \
|
||||
html/gtk_tut-26.html \
|
||||
html/gtk_tut-27.html \
|
||||
html/gtk_tut-28.html \
|
||||
html/gtk_tut-29.html \
|
||||
html/gtk_tut-30.html \
|
||||
html/gtk_tut-31.html
|
||||
|
||||
TUTORIAL_IT_FILES= html/gtk_tut_it.html \
|
||||
html/gtk_tut_it-1.html \
|
||||
html/gtk_tut_it-2.html \
|
||||
html/gtk_tut_it-3.html \
|
||||
html/gtk_tut_it-4.html \
|
||||
html/gtk_tut_it-5.html \
|
||||
html/gtk_tut_it-6.html \
|
||||
html/gtk_tut_it-7.html \
|
||||
html/gtk_tut_it-8.html \
|
||||
html/gtk_tut_it-9.html \
|
||||
html/gtk_tut_it-10.html \
|
||||
html/gtk_tut_it-11.html \
|
||||
html/gtk_tut_it-12.html \
|
||||
html/gtk_tut_it-13.html \
|
||||
html/gtk_tut_it-14.html \
|
||||
html/gtk_tut_it-15.html \
|
||||
html/gtk_tut_it-16.html \
|
||||
html/gtk_tut_it-17.html \
|
||||
html/gtk_tut_it-18.html \
|
||||
html/gtk_tut_it-19.html \
|
||||
html/gtk_tut_it-20.html \
|
||||
html/gtk_tut_it-21.html \
|
||||
html/gtk_tut_it-22.html \
|
||||
html/gtk_tut_it-23.html \
|
||||
html/gtk_tut_it-24.html \
|
||||
text/gtk_tut_it.txt
|
||||
|
||||
FAQ_FILES=html/gtkfaq.html \
|
||||
html/gtkfaq-1.html \
|
||||
html/gtkfaq-2.html \
|
||||
html/gtkfaq-3.html \
|
||||
html/gtkfaq-4.html \
|
||||
html/gtkfaq-5.html \
|
||||
html/gtkfaq-6.html \
|
||||
html/gtkfaq-7.html \
|
||||
text/gtkfaq.txt
|
||||
|
||||
html/gtk_tut_table.gif: gdk.html gtk.html
|
||||
|
||||
.PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files
|
||||
|
||||
distdocs: gdk.html gtk.html faq tutorial tutorial_it tutorial_fr
|
||||
|
||||
htmldir:
|
||||
(cd $(srcdir); mkdir -p html; cp gtk_tut*gif html)
|
||||
|
||||
textdir:
|
||||
mkdir -p $(srcdir)/text
|
||||
|
||||
gdk.html gdk_toc.html: gdk.texi
|
||||
(cd $(srcdir); texi2html gdk.texi)
|
||||
|
||||
gtk.html gtk_toc.html: gtk.texi
|
||||
(cd $(srcdir); texi2html gtk.texi)
|
||||
|
||||
html/gdk.html html/gdk_toc.html: htmldir gdk.html gdk_toc.html
|
||||
(cd $(srcdir); cp gdk.html gdk_toc.html html/)
|
||||
|
||||
html/gtk.html html/gtk_toc.html: htmldir gtk.html gtk_toc.html
|
||||
(cd $(srcdir); cp gtk.html gtk_toc.html html/)
|
||||
|
||||
$(FAQ_FILES): faq
|
||||
|
||||
faq: htmldir textdir
|
||||
(cd $(srcdir); sgml2html gtkfaq.sgml; \
|
||||
perl gtkdocs_fix gtkfaq*html; \
|
||||
mv gtkfaq*html html/; \
|
||||
sgml2txt gtkfaq.sgml; \
|
||||
mv gtkfaq.txt text/)
|
||||
|
||||
$(TUTORIAL_FILES): tutorial
|
||||
|
||||
$(TUTORIAL_FR_FILES): tutorial_fr
|
||||
|
||||
$(TUTORIAL_IT_FILES): tutorial_it
|
||||
|
||||
tutorial: htmldir textdir
|
||||
(cd $(srcdir); sgml2html gtk_tut.sgml; \
|
||||
perl gtkdocs_fix gtk_tut*html; \
|
||||
mv gtk_tut*html html/; \
|
||||
sgml2txt gtk_tut.sgml; \
|
||||
mv gtk_tut.txt text/)
|
||||
|
||||
tutorial_it: htmldir textdir
|
||||
(cd $(srcdir); sgml2html --language=it gtk_tut_it.sgml; \
|
||||
perl gtkdocs_fix gtk_tut_it*html; \
|
||||
mv gtk_tut_it*html html/; \
|
||||
sgml2txt --language=it gtk_tut_it.sgml; \
|
||||
mv gtk_tut_it.txt text/)
|
||||
|
||||
tutorial_fr: htmldir textdir
|
||||
(cd $(srcdir); sgml2html --language=fr gtk_tut_fr.sgml; \
|
||||
perl gtkdocs_fix gtk_tut_fr*html; \
|
||||
mv gtk_tut_fr*html html/; \
|
||||
sgml2txt --language=fr gtk_tut_fr.sgml; \
|
||||
mv gtk_tut_fr.txt text/)
|
||||
EXTRA_DIST = \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
Makefile.sgml \
|
||||
gtkdocs_fix \
|
||||
gtkfaq.sgml \
|
||||
gtk-config.txt \
|
||||
gtk_tut.sgml \
|
||||
gtk_tut_it.sgml \
|
||||
debugging.txt \
|
||||
developers.txt \
|
||||
refcounting.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
widget_system.txt \
|
||||
gtk_tut_packbox1.gif \
|
||||
gtk_tut_packbox2.gif \
|
||||
gtk_tut_table.gif \
|
||||
gtk-config.1
|
||||
|
||||
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
|
||||
EXTRA_DIST += \
|
||||
Changes-1.2.txt \
|
||||
debugging.txt \
|
||||
developers.txt \
|
||||
refcounting.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
widget_system.txt \
|
||||
generation.txt \
|
||||
gtk-config.txt \
|
||||
gtk-config.1.in \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
gtkdocs_fix \
|
||||
gtkfaq.sgml \
|
||||
gtk_tut.sgml \
|
||||
gtk_tut_it.sgml \
|
||||
gtk_tut_fr.sgml \
|
||||
gtk_tut_packbox1.gif \
|
||||
gtk_tut_packbox2.gif \
|
||||
html/gtk_tut_table.gif \
|
||||
html/gtk_tut_packbox1.gif \
|
||||
html/gtk_tut_packbox2.gif \
|
||||
gtk_tut_table.gif \
|
||||
html/gdk.html \
|
||||
html/gdk_toc.html \
|
||||
html/gtk.html \
|
||||
html/gtk_toc.html \
|
||||
$(TUTORIAL_FILES) \
|
||||
$(TUTORIAL_FR_FILES) \
|
||||
$(TUTORIAL_IT_FILES) \
|
||||
$(FAQ_FILES)
|
||||
|
||||
40
docs/Makefile.sgml
Normal file
40
docs/Makefile.sgml
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# To use this makefile, do:
|
||||
# make -f Makefile.gtkfaq
|
||||
#
|
||||
# This is not done by default because you might
|
||||
# not have sgml2html installed... Perhaps we could
|
||||
# detect that in the future and combine it in with
|
||||
# the automake stuff...
|
||||
#
|
||||
|
||||
all: html ps
|
||||
|
||||
html: faq tut italian_tut
|
||||
perl gtkdocs_fix gtkfaq*.html gtk_tut*.html
|
||||
|
||||
txt:
|
||||
sgml2txt gtkfaq.sgml
|
||||
sgml2txt gtk_tut.sgml
|
||||
sgml2txt gtk_tut_it.sgml
|
||||
|
||||
ps: dvi
|
||||
dvips -o gtkfaq.ps gtkfaq.dvi
|
||||
dvips -o gtk_tut.ps gtk_tut.dvi
|
||||
dvips -o gtk_tut_it.ps gtk_tut_it.dvi
|
||||
|
||||
dvi:
|
||||
sgml2latex gtkfaq.sgml
|
||||
sgml2latex gtk_tut.sgml
|
||||
sgml2latex gtk_tut_it.sgml
|
||||
|
||||
faq:
|
||||
sgml2html gtkfaq.sgml
|
||||
|
||||
tut:
|
||||
sgml2html gtk_tut.sgml
|
||||
|
||||
italian_tut:
|
||||
sgml2html gtk_tut_it.sgml
|
||||
|
||||
|
||||
@@ -1,338 +0,0 @@
|
||||
|
||||
The overall syntax is:
|
||||
|
||||
(type-of-thing-being-defined name-used-to-refer-to-this-thing
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute)
|
||||
(attribute-name attribute-value-depending-on-the-attribute))
|
||||
|
||||
Some definitions can have a c-declaration field that gives the C code
|
||||
we parsed to arrive at the definition. The c-declaration is a quoted
|
||||
string because it can contain parentheses and such.
|
||||
|
||||
Defined types and their attributes:
|
||||
|
||||
===
|
||||
(module module-name
|
||||
(submodule-of module-name)) ;; submodule is optional
|
||||
|
||||
Ex: (module Gtk)
|
||||
Ex: (module Rgb
|
||||
(submodule-of Gdk))
|
||||
|
||||
modules are later referred to with a list of module names, like
|
||||
(Gdk Rgb) or (Gtk)
|
||||
|
||||
Object and boxed type definitions automatically create a submodule.
|
||||
For example, GtkCList creates the module (module CList (submodule-of
|
||||
(Gtk))) which is referred to as module (Gtk CList).
|
||||
|
||||
===
|
||||
|
||||
(type
|
||||
(alias some-unique-identifier)
|
||||
(in-module module-name) ;; optional, gchar* is not in a module
|
||||
(gtk-type-id gtk-type-system-id) ;; optional, absent if this is not
|
||||
;; in the type system
|
||||
(is-parametric boolean) ;; optional default to #f
|
||||
(in-c-name name-of-symbol-in-C)
|
||||
(out-c-name name-of-symbol-in-C)
|
||||
(inout-c-name name-of-symbol-in-C))
|
||||
|
||||
Ex: (type
|
||||
(alias string)
|
||||
(gtk-type-id GTK_TYPE_STRING)
|
||||
(in-c-name "const gchar*")
|
||||
(out-c-name "gchar**") ;; actually I'm not sure how strings work out/inout
|
||||
(inout-c-name "gchar*"))
|
||||
|
||||
(type
|
||||
(alias list)
|
||||
(gtk-type-id GTK_TYPE_POINTER)
|
||||
(is-parametric #t)
|
||||
(in-c-name "GList*")
|
||||
(out-c-name "GList**")
|
||||
(inout-c-name "GList**"))
|
||||
|
||||
|
||||
;; This one would be implied by the (object) def for GtkWidget I
|
||||
;; think - (type) is only required for types that are not implied
|
||||
;; by other definitions, such as int/boolean/etc.
|
||||
|
||||
(type
|
||||
(alias GtkWidget)
|
||||
(in-module (Gtk))
|
||||
(gtk-type-id GTK_TYPE_WIDGET)
|
||||
(in-c-name "GtkWidget*")
|
||||
(inout-c-name "GtkWidget*")
|
||||
(out-c-name "GtkWidget**"))
|
||||
|
||||
"Type" bindings are automatically assumed for objects, boxed types,
|
||||
etc. as defined below.
|
||||
|
||||
The alias field is used to refer to the type later on.
|
||||
|
||||
Whenever a type alias can be used, it is also possible to use the
|
||||
keyword "native", which implies that the type in question is too
|
||||
C-specific to represent. Then a c-declaration will typically be
|
||||
available for use.
|
||||
|
||||
C types containing [] or () are function pointers or arrays. For
|
||||
arrays that don't specify a size, we just treat them as pointers. For
|
||||
function pointers, we need special (type) syntax/attributes of some
|
||||
kind, but since there basically aren't any of these right now in the
|
||||
libs we care about we can just ignore them. For arrays that specify a
|
||||
size ditto, you would handle them by adding an (array-size) attribute
|
||||
or something or using the "native" keyword and skipping the (type)
|
||||
stuff.
|
||||
|
||||
===
|
||||
(object object-name
|
||||
(in-module module-name-list)
|
||||
(parent object-name optional-module-name-if-different)
|
||||
(abstract boolean-is-abstract-class) ;; omit for default of #f
|
||||
(c-name name-of-the-object-in-C)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field)
|
||||
(access read-or-write-or-readwrite)))
|
||||
|
||||
|
||||
Ex: (object Widget
|
||||
(in-module (Gtk))
|
||||
(parent Object) ;; could say (parent Object (Gtk))
|
||||
(abstract #t)
|
||||
(c-name GtkWidget)
|
||||
(field (type-and-name GdkWindow* window) (access read)))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-object-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GtkWidget)
|
||||
(in-c-name GtkWidget*)
|
||||
(out-c-name GtkWidget**)
|
||||
(inout-c-name GtkWidget*))
|
||||
|
||||
It also implies a module that is the name broken into parts:
|
||||
(module CTree
|
||||
(submodule-of Gtk))
|
||||
|
||||
===
|
||||
|
||||
(function function-name
|
||||
(in-module module-name-list) ;; "static methods" go in their
|
||||
;; object's module
|
||||
(is-constructor-of object-type-alias) ;; optional, marks a constructor
|
||||
(c-name function-name)
|
||||
(return-type return-value-type) ;; defaults to void
|
||||
(caller-owns-return boolean-value) ;; defaults to #f
|
||||
(can-return-null boolean-value) ;; defaults to #t
|
||||
(parameter in-or-out-or-inout
|
||||
(type-and-name parameter-type-alias parameter-name)
|
||||
(type-parameter name-of-contained-type) ;; optional, requires parametric type
|
||||
(c-declaration "c-type-and-name")) ;; c-declaration only required
|
||||
;; if the type alias is "native"
|
||||
(varargs #t) ;; has varargs at the end
|
||||
)
|
||||
|
||||
Ex:
|
||||
(function init
|
||||
(in-module (Gdk Rgb)
|
||||
(c-name gdk_rgb_init)))
|
||||
|
||||
Ex:
|
||||
(function new
|
||||
(in-module (Gdk Rgb Cmap))
|
||||
(is-constructor-of GdkRgbCmap)
|
||||
(c-name gdk_rgb_cmap_new)
|
||||
(return-type GdkRgbCmap)
|
||||
(caller-owns-return #t) ;; perhaps this could be implied by is-constructor-of
|
||||
(parameter in (type-and-name array-of-guint32 colors))
|
||||
(parameter in (type-and-name gint n_colors)))
|
||||
|
||||
Ex:
|
||||
(function config_set_set_handler
|
||||
(in-module (Gnome))
|
||||
(c-name gnome_config_set_set_handler)
|
||||
(parameter in (type-and-name native func)
|
||||
(c-declaration "void (*func)(void*)"))
|
||||
(parameter in (type-and-name gpointer data)))
|
||||
|
||||
===
|
||||
(method method-name
|
||||
(of-object object-name module-name)
|
||||
;; retval/arg attributes as for (function), but with first parameter
|
||||
;; omitted for non-constructors
|
||||
)
|
||||
|
||||
Ex:
|
||||
(method set_text
|
||||
(of-object Label (Gtk))
|
||||
(parameter (type-and-name const-gchar* str)))
|
||||
|
||||
===
|
||||
(object-argument arg-name
|
||||
(of-object object-we-are-an-argument-of optional-objects-module)
|
||||
(type-id argument-type) ;; GTK_TYPE_OBJECT etc.
|
||||
;; flags all default to #f
|
||||
(readable bool-value)
|
||||
(writeable bool-value)
|
||||
(construct-only bool-value))
|
||||
|
||||
Ex:
|
||||
(object-argument label
|
||||
(of-object Label (Gtk))
|
||||
(type GTK_TYPE_STRING)
|
||||
(readable #t)
|
||||
(writeable #t))
|
||||
|
||||
===
|
||||
(signal signal-name
|
||||
(run-action bool-value)
|
||||
(run-first bool-value)
|
||||
(run-last bool-value)
|
||||
(of-object object-we-are-a-signal-of optional-objects-module)
|
||||
;; return value and parameters as for a function, omitting the object
|
||||
;; and user data parameters
|
||||
|
||||
;; what other properties matter for a signal?
|
||||
)
|
||||
|
||||
Ex:
|
||||
(signal select_row
|
||||
(of-object CList (Gtk))
|
||||
(run-first #t)
|
||||
;; return type defaults to void
|
||||
(parameter in (type-and-name gint row))
|
||||
(parameter in (type-and-name gint column))
|
||||
(parameter in (type-and-name GdkEvent* event)))
|
||||
|
||||
===
|
||||
(enum enum-name
|
||||
(in-module modname)
|
||||
(c-name name-in-c)
|
||||
(value (nick value-name-noprefixes-hyphen-lowercase) (c-name value-c-name)))
|
||||
|
||||
Ex:
|
||||
|
||||
(enum DirectionType
|
||||
(in-module Gtk)
|
||||
(c-name GtkDirectionType)
|
||||
(value (nick tab-forward) (c-name GTK_DIR_TAB_FORWARD))
|
||||
(value (nick tab-backward) (c-name GTK_DIR_TAB_BACKWARD))
|
||||
(value (nick up) (c-name GTK_DIR_UP))
|
||||
(value (nick down) (c-name GTK_DIR_DOWN))
|
||||
(value (nick left) (c-name GTK_DIR_LEFT))
|
||||
(value (nick right) (c-name GTK_DIR_RIGHT)))
|
||||
|
||||
(enum Pos
|
||||
(in-module (Gtk CTree))
|
||||
(c-name GtkCTreePos)
|
||||
(value (nick before) (c-name GTK_CTREE_POS_BEFORE))
|
||||
(value (nick as-child) (c-name GTK_CTREE_POS_AS_CHILD))
|
||||
(value (nick after) (c-name GTK_CTREE_POS_AFTER)))
|
||||
|
||||
===
|
||||
(flags) is just like enum, but some bindings may wrap enums and flags differently.
|
||||
|
||||
===
|
||||
|
||||
(boxed boxed-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(ref-func func-to-increase-refcount)
|
||||
(copy-func func-to-copy)
|
||||
(release-func func-to-destroy-or-decrement-refcount)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
It is never OK to use memcpy() to copy a boxed type, or use
|
||||
malloc()/free() to alloc/free one.
|
||||
|
||||
Ex:
|
||||
|
||||
(boxed Pixmap
|
||||
(in-module (Gdk))
|
||||
(c-name GdkPixmap)
|
||||
(ref-func pixmap_ref)
|
||||
(release-func pixmap_unref))
|
||||
|
||||
An "object" declaration automatically implies the type definition:
|
||||
|
||||
(type
|
||||
(alias concat-module-elements-and-boxed-name)
|
||||
(in-c-name pointer-to-c-name)
|
||||
(out-c-name pointer-to-pointer-to-c-name)
|
||||
(inout-c-name pointer-to-c-name))
|
||||
|
||||
Ex:
|
||||
(type (alias GdkPixmap)
|
||||
(in-c-name GdkPixmap*)
|
||||
(out-c-name GdkPixmap**)
|
||||
(inout-c-name GdkPixmap*))
|
||||
|
||||
|
||||
===
|
||||
|
||||
(struct struct-name
|
||||
(in-module modname)
|
||||
(c-name c-name)
|
||||
(field (type-and-name type-alias-of-struct-field name-of-struct-field) (access access-rule)))
|
||||
|
||||
Unlike a boxed type, a struct type can be copied with memcpy() and
|
||||
allocated on the stack or with g_malloc().
|
||||
|
||||
Ex:
|
||||
(struct Rectangle
|
||||
(in-module (Gdk))
|
||||
(c-name GdkRectangle)
|
||||
(field (type-and-name gint16 x) (access readwrite))
|
||||
(field (type-and-name gint16 y) (access readwrite))
|
||||
(field (type-and-name guint16 width) (access readwrite))
|
||||
(field (type-and-name guint16 height) (access readwrite)))
|
||||
|
||||
Implies GdkRectangle type alias:
|
||||
|
||||
(type (alias GdkRectangle)
|
||||
(in-c-name GdkRectangle*)
|
||||
(out-c-name GdkRectangle*) ;; note - not the same as boxed types
|
||||
(inout-c-name GdkRectangle*))
|
||||
|
||||
===
|
||||
|
||||
(user-function name
|
||||
(in-module module)
|
||||
(c-name c-typedef-name)
|
||||
;; return-type and parameters as for (function)
|
||||
)
|
||||
|
||||
Ex:
|
||||
|
||||
(user-function PrintFunc
|
||||
(in-module (Gtk))
|
||||
(parameter in (type-and-name gpointer func_data))
|
||||
(parameter in (type-and-name gchar* str)))
|
||||
|
||||
===
|
||||
|
||||
(typedef new-name
|
||||
(in-module module)
|
||||
(c-name c-full-name)
|
||||
(orig-type alias-of-orig-type))
|
||||
|
||||
Ex:
|
||||
|
||||
(typedef Type
|
||||
(in-module (Gtk))
|
||||
(c-name GtkType)
|
||||
(orig-type guint))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
This document describes some of the internals of the DND handling
|
||||
code.
|
||||
|
||||
Organization
|
||||
============
|
||||
|
||||
The DND code is split between a lowlevel part - gdkdnd.c and a
|
||||
highlevel part - gtkdnd.c. To put it simply, gdkdnd.c contain the
|
||||
portions of DND code that are easiest to do in raw X, while gtkdnd.c
|
||||
contains the portions of DND that are easiest to do with an event loop
|
||||
and high level selection handling.
|
||||
|
||||
Except for a few details of selection handling, most of the
|
||||
dependencies on the DND protocol are confined to gdkdnd.c.
|
||||
There are two or three supported protocols - Motif DND,
|
||||
Xdnd and a pseudo-protocol ROOTWIN, which is used for drops
|
||||
on root windows that aren't really accepting drops.
|
||||
gdkdnd.c divides into 4 pieces:
|
||||
|
||||
1) Utility functions (finding client windows)
|
||||
2) Motif specific code (the biggest chunk)
|
||||
3) Xdnd specific code
|
||||
4) The public interfaces
|
||||
|
||||
The code in gtkdnd.c roughly consists of three parts
|
||||
|
||||
1) General utility functions
|
||||
2) Destination side code
|
||||
3) Source side code.
|
||||
|
||||
Both on the source and dest side, there is some division
|
||||
between the low level layers and the default handlers,
|
||||
though they are rather mixed in many cases.
|
||||
|
||||
Structures and Memory Management
|
||||
================================
|
||||
|
||||
Information about source sites and drop sites is stored
|
||||
in the structures GtkSourceSite and GtkDestSite.
|
||||
|
||||
Information about in-progress drags and drops is stored
|
||||
in the structures GtkSourceInfo and GtkDestInfo.
|
||||
|
||||
The GtkSourceInfo structure is created when the drag
|
||||
begins, and persists until the drag either completes
|
||||
or times out. A pointer to it is stored in
|
||||
dataset-data for the GdkDragContext, however there
|
||||
is no ownership. If the SourceInfo is destroyed
|
||||
before the context, the field is simply cleared.
|
||||
|
||||
A GtkDestInfo is attached to each GdkDragContext
|
||||
that is received for an incoming drag. In contrast
|
||||
to the SourceInfo the DestInfo is "owned" by the
|
||||
context, and when the context is destroyed, destroyed.
|
||||
|
||||
The GDK API
|
||||
===========
|
||||
|
||||
It is expect that the GDK DND API will never be
|
||||
used by anything other than the DND code in GTK+.
|
||||
|
||||
/* Drag and Drop */
|
||||
|
||||
GdkDragContext * gdk_drag_context_new (void);
|
||||
void gdk_drag_context_ref (GdkDragContext *context);
|
||||
void gdk_drag_context_unref (GdkDragContext *context);
|
||||
|
||||
These create and refcount GdkDragContexts in a
|
||||
straightforward manner.
|
||||
|
||||
/* Destination side */
|
||||
|
||||
void gdk_drag_status (GdkDragContext *context,
|
||||
GdkDragAction action,
|
||||
guint32 time);
|
||||
void gdk_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time);
|
||||
void gdk_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time);
|
||||
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
||||
|
||||
/* Source side */
|
||||
|
||||
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
||||
GList *targets,
|
||||
GdkDragAction actions);
|
||||
gboolean gdk_drag_get_protocol (guint32 xid,
|
||||
GdkDragProtocol *protocol);
|
||||
void gdk_drag_find_window (GdkDragContext *context,
|
||||
GdkWindow *drag_window,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
GdkWindow **dest_window,
|
||||
GdkDragProtocol *protocol);
|
||||
gboolean gdk_drag_motion (GdkDragContext *context,
|
||||
GdkWindow *dest_window,
|
||||
GdkDragProtocol protocol,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
GdkDragAction action,
|
||||
guint32 time);
|
||||
void gdk_drag_drop (GdkDragContext *context,
|
||||
guint32 time);
|
||||
void gdk_drag_abort (GdkDragContext *context,
|
||||
guint32 time);
|
||||
|
||||
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
||||
|
||||
Retrieves the selection that will be used to communicate
|
||||
the data for the drag context (valid on both source
|
||||
and dest sides)
|
||||
|
||||
Cursors and window heirarchies
|
||||
==============================
|
||||
|
||||
The DND code, when possible (and it isn't possible over
|
||||
Motif window) uses a shaped window as a drag icon.
|
||||
Because the cursor may fall inside this window during the
|
||||
drag, we actually have to figure out which window
|
||||
the cursor is in _ourselves_ so we can ignore the
|
||||
drag icon properly. (Oh for OutputOnly windows!)
|
||||
|
||||
To avoid obscene amounts of server traffic (which are only
|
||||
slighly observerable locally, but would really kill a
|
||||
session over a slow link), the code in GDK does
|
||||
XGetWindowAttributes for every child of the root window at
|
||||
the beginning of the drag, then selects with
|
||||
SubstructureNotifyMask on the root window, so that
|
||||
it can update this list.
|
||||
|
||||
It probably would be easier to just reread the entire
|
||||
list when one of these events occurs, instead of
|
||||
incrementally updating, but updating the list in
|
||||
sync was sort of fun code, so I did it that way ;-)
|
||||
|
||||
There is also a problem of trying to follow the
|
||||
mouse cursor as well as possible. Currently, the
|
||||
code uses PointerMotionHint, and an XQueryPointer
|
||||
on MotionNotify events. This results in pretty
|
||||
good syncing, but may result in somewhat poor
|
||||
accuracy for drops. (Because the coordinates of
|
||||
the drop are the coordinates when the server receives
|
||||
the button press, which might actually be before
|
||||
the XQueryPointer for the previous MotionNotify
|
||||
event is done.)
|
||||
|
||||
Probably better is doing MotionNotify compression
|
||||
and discarding MotionNotify events when there
|
||||
are more on the queue before the next ButtonPress/Release.
|
||||
|
||||
Proxying
|
||||
========
|
||||
|
||||
A perhaps rather unusual feature of GTK's DND is proxying. A
|
||||
dest site can be specified as a proxy drop site for another
|
||||
window. This is most needed for the plug-socket code - the
|
||||
socket needs to pass on drags to the plug since the original
|
||||
source only sees toplevel windows. However, it can also be
|
||||
used as a user visible proxy - i.e., dragging to buttons on
|
||||
the taskbar.
|
||||
|
||||
Internally, when the outer drag enters a proxy dest site, a
|
||||
new source drag is created, with SourceInfo and
|
||||
GdkDragContext. From the GDK side, it looks much like a
|
||||
normal source drag; on the GTK+ side, most of the code is
|
||||
disjoint. The need to pass in a specific target window
|
||||
is the reason why the GDK DND API splits
|
||||
gdk_drag_find_window() and gdk_drag_motion().
|
||||
|
||||
For proxy drags, the GtkDestInfo and GtkSourceInfo for the
|
||||
drag point at each other.
|
||||
|
||||
Because the abstraction of the drag protocol is at the GDK
|
||||
level, a proxy drag from Motif to Xdnd or vice versa happens
|
||||
pretty much automatically during the drag, though the
|
||||
drop can get complicated. For Xdnd <-> Motif,
|
||||
Motif <-> Xdnd, or Motif <-> Motif drags, it is necessary to
|
||||
for the Proxy to retrieve the data and pass it on to
|
||||
the true destination, since either the selection names
|
||||
differ or (Motif<->Motif), the proxy needs to know
|
||||
about the XmDRAG_SUCCESS/FAILURE selection targets.
|
||||
|
||||
Further Reading:
|
||||
================
|
||||
|
||||
Xdnd:
|
||||
|
||||
The spec is at:
|
||||
|
||||
http://www.cco.caltech.edu/~jafl/xdnd/
|
||||
|
||||
Motif:
|
||||
|
||||
The Motif DND protocol is best described in the
|
||||
Hungry Programmers _Inside Lesstif_ book, available
|
||||
from:
|
||||
|
||||
http://www.igpm.rwth-aachen.de/~albrecht/hungry.html
|
||||
|
||||
Harald Albrecht and Mitch Miers have done a far
|
||||
better job at documenting the DND protocol then
|
||||
anything the OpenGroup has produced.
|
||||
|
||||
|
||||
|
||||
Owen Taylor
|
||||
otaylor@redhat.com
|
||||
Oct 18, 1998
|
||||
103
docs/es/gtk.html
103
docs/es/gtk.html
@@ -1,103 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ</TITLE>
|
||||
<LINK HREF="gtkfaq-es-1.html" REL=next>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
<HR NOSHADE>
|
||||
<H1>GTK+ FAQ</H1>
|
||||
|
||||
|
||||
<H2>Nathan Froyd, Tony Gale, Shawn T. Amundson.</H2>Seis de Julio de 1998
|
||||
<P><HR NOSHADE>
|
||||
<EM>La intención de este documento es dar respuesta a las preguntas
|
||||
realizadas con más frecuencia por parte de los programadores que utilizan GTK+ o simplemente por personas que desean utilizar GTK+. </EM>
|
||||
<HR NOSHADE>
|
||||
<P>
|
||||
<H2><A NAME="toc1">1.</A> <A HREF="gtkfaq-es-1.html">Información General</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.1">1.1 Autores</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.2">1.2 ¿Qué es GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.3">1.3 ¿Qué es el + en GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.4">1.4 ¿La G en GTK+ significa General, Gimp, o GNU?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.5">1.5 ¿Dónde está la documentación para GTK?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.6">1.6 ¿Hay alguna lista de correo (o archivo de lista de correo) para GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.7">1.7 ¿La lista gtk-list no ha tenido tráfico alguno por días,</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.8">1.8 Cómo conseguir ayuda con GTK+</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.9">1.9 Cómo reportar errores en GTK+</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.10">1.10 ¿Qué aplicaciones se han escrito con GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.11">1.11 Estoy buscando una aplicación que escribir en GTK+. ¿Qué tal un cliente IRC?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc2">2.</A> <A HREF="gtkfaq-es-2.html">Cómo encontrar, configurar, instalar y comprobar GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.1">2.1 ¿Qué necesito para correr GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.2">2.2 ¿Dónde puedo conseguir GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.3">2.3 ¿Cómo configuro/compilo GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.4">2.4 Cuando compilo GTK+ obtengo un error como: <CODE>make: file `Makefile' line 456: Syntax error</CODE></A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.5">2.5 ¡He compilado e instalado GTK+, pero no puedo lograr que los programas se enlacen con él!</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.6">2.6 Cuando compilo programas con GTK+, obtengo mensajes de error del compilador diciendo que no es capaz de encontrar <CODE>"glibconfig.h"</CODE>.</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.7">2.7 Cuando instalo El GIMP, configure reporta que no puede encontrar GTK.</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc3">3.</A> <A HREF="gtkfaq-es-3.html">Desarrollo de GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.1">3.1 ¿Qué es esta cosa CVS de la cual todo el mundo habla, y cómo puedo acceder a ella?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.2">3.2 ¿Cómo puedo contribuír a GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.3">3.3 ¿Cómo averiguo si mi parche fue aplicado, y si no, por qué no?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.4">3.4 ¿Cuál es la política sobre la incorporación de nuevos <EM>widgets</EM> en la librería?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.5">3.5 ¿Hay alguien trabajando en atamientos para otros lenguajes distintos a C?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc4">4.</A> <A HREF="gtkfaq-es-4.html">Desarrollo con GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.1">4.1 ¿Cómo empiezo?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.2">4.2 ¿Qué <EM>widgets</EM> existen en GTK?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.3">4.3 ¿GTK+ es seguro ante múltiples hilos?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.4">4.4 ¿Cómo puedo prevenir el redibujar y reacomodar tamaños mientras cambio múltiples <EM>widgets</EM>?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.5">4.5 ¿Cómo atrapo un evento de doble tecleo (en un <EM>widget</EM> de lista, por ejemplo)?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.6">4.6 ¿Cómo puedo averiguar cuál es la selección de un GtkList?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.7">4.7 ¿Acaso es posible desplegar un texto que se recorte para que quepa dentro del lugar que tenga asignado?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.8">4.8 ¿Por qué el contenido de un botón no se mueve al presionar el botón? Aquí les envío un parche para que funcione de esa forma...</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.9">4.9 ¿Cómo puedo definir una línea de separación como en un menú?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.10">4.10 ¿Cómo puedo darle justificación a la derecha a un menú, como Help, cuando utilizo MenuFactory?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.11">4.11 ¿Cómo hago mi ventana modal? / ¿Cómo hago una sóla ventana activa?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.12">4.12 ¿Por qué mi <EM>widget</EM> (ej. progressbar) no se actualiza?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc5">5.</A> <A HREF="gtkfaq-es-5.html">Acerca de gdk</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-5.html#ss5.1">5.1 ¿Qué es gdk?</A>
|
||||
<LI><A HREF="gtkfaq-es-5.html#ss5.2">5.2 ¿Cómo utilizo la asignación de colores?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc6">6.</A> <A HREF="gtkfaq-es-6.html">Acerca de glib</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-6.html#ss6.1">6.1 ¿Qué es glib?</A>
|
||||
<LI><A HREF="gtkfaq-es-6.html#ss6.2">6.2 ¿Por qué utilizar g_print, g_malloc, g_strdup y funciones compañeras de glib?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc7">7.</A> <A HREF="gtkfaq-es-7.html">Contribuciones al GTK+ FAQ, Mantenedores y Copyright</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-7.html#ss7.1">7.1 Nota del Traductor</A>
|
||||
</UL>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,192 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Información General</TITLE>
|
||||
<LINK HREF="gtkfaq-es-2.html" REL=next>
|
||||
|
||||
<LINK HREF="gtkfaq-es.html#toc1" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="gtkfaq-es.html#toc1">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s1">1. Información General</A></H2>
|
||||
|
||||
<H2><A NAME="ss1.1">1.1 Autores</A>
|
||||
</H2>
|
||||
|
||||
<P>Los autores de GTK+ son:
|
||||
<P>
|
||||
<UL>
|
||||
<LI>Peter Mattis (petm@xcf.berkeley.edu)</LI>
|
||||
<LI>Spencer Kimball (spencer@xcf.berkeley.edu)</LI>
|
||||
<LI>Josh MacDonald (jmacd@xcf.berkeley.edu)</LI>
|
||||
</UL>
|
||||
|
||||
GTK+ se ditribuye bajo la licencia de Librería Pública General de GNU
|
||||
<P>
|
||||
<H2><A NAME="ss1.2">1.2 ¿Qué es GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>GTK+ es un pequeño y eficiente conjunto de <EM>widgets</EM>, diseñados
|
||||
con un aspecto y sentir general a Motif. Contiene <EM>widgets</EM> comúnes
|
||||
y algúnos <EM>widgets</EM> más complejos como una selección de
|
||||
archivos, y <EM>widgets</EM> de selección de colores.
|
||||
<P>GTK+ proporciona algunas características únicas. (No tengo conocimiento
|
||||
de otra librería de <EM>widge>
|
||||
<HR><H3>Transfer interrupted!</H3>
|
||||
enos).
|
||||
Por ejemplo, un botón no contiene una etiqueta, contiene un <EM>widget</EM>
|
||||
hijo, que en muchas instancias será una etiqueta. Sin embargo, el
|
||||
<EM>widget</EM> hijo también puede ser un <EM>pixmap</EM> (mapa de pixels),
|
||||
imagén o cualquier combinación posible que desee el programador. Toda la
|
||||
librería es así de flexible.
|
||||
<P>
|
||||
<H2><A NAME="ss1.3">1.3 ¿Qué es el + en GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Peter Mattis informó a la lista de correo gtk:
|
||||
<BLOCKQUOTE>
|
||||
"Escribí originalmente gtk el cual incluía tres librerías,
|
||||
libglib, libgdk y libgtk. Era caracterizado por una jerarquía de
|
||||
<EM>widget</EM> plana. O sea, no podías derivar un nuevo
|
||||
<EM>widget</EM> de uno ya existente. Contenía un mecanismo de
|
||||
<EM>callback</EM> (llamada) más estándar en lugar del mecanismo
|
||||
de señales ahora presente en gtk+. El + fue agregado para distinguir
|
||||
entre la versión original de gtk y la nueva versión. Pueden pensar
|
||||
en ello como una ampliación al gtk original que agrega características
|
||||
orientadas o objetos."
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="ss1.4">1.4 ¿La G en GTK+ significa General, Gimp, o GNU?</A>
|
||||
</H2>
|
||||
|
||||
<P>Peter Mattis informó a la lista de correo gtk:
|
||||
<BLOCKQUOTE>
|
||||
"Pienso que la última vez que Spencer y yo hablamos al respecto nos
|
||||
decidimos por GTK = Gimp ToolKit. Pero no estoy seguro. Sin embargo,
|
||||
definitivamente no es GNU."
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="ss1.5">1.5 ¿Dónde está la documentación para GTK?</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
En el directorio doc/ de la distribución de GTK+ encontrarás
|
||||
el material de referencia para GTK y GDK, este FAQ y el tutor de GTK.
|
||||
<P>Adicionalmente, puedes encontrar enlaces a versiones HTML de estos
|
||||
documentos al ir a
|
||||
<A HREF="http://www.gtk.org/">http://www.gtk.org/</A>.
|
||||
<P>El Tutor y el FAQ también se pueden encontrar en
|
||||
<A HREF="http://www.geocities.com/ResearchTriangle/Lab/4299/">http://www.geocities.com/ResearchTriangle/Lab/4299/</A>.
|
||||
<P>
|
||||
<H2><A NAME="ss1.6">1.6 ¿Hay alguna lista de correo (o archivo de lista de correo) para GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Hay dos listas de correo:
|
||||
<UL>
|
||||
<LI>Una lista de correo para la discusión del desarrollo de aplicaciones
|
||||
basadas en GTK se hospeda en gtk-app-devel-list@redhat.com. Para suscribirse
|
||||
envíe un correo electrónico a
|
||||
<A HREF="mailto:gtk-app-devel-list-request@redhat.com">gtk-app-devel-list-request@redhat.com</A> con <EM>subscribe</EM> en el
|
||||
campo <B>subject</B>.
|
||||
<P>
|
||||
</LI>
|
||||
<LI>Una lista de correo para la discusión del desarrollo de GTK se hospeda
|
||||
en gtk-list@redhat.com. Para suscribirse envíe un correo electrónico
|
||||
a
|
||||
<A HREF="mailto:gtk-list-request@redhat.com">gtk-list-request@redhat.com</A> con <EM>subscribe</EM>
|
||||
en el campo <B>subject</B>.
|
||||
<P>Un archivo escudriñable de la lista de correo puede ser encontrado en
|
||||
<A HREF="http://archive.redhat.com/gtk-list">http://archive.redhat.com/gtk-list</A></LI>
|
||||
</UL>
|
||||
<H2><A NAME="ss1.7">1.7 ¿La lista gtk-list no ha tenido tráfico alguno por días,</A>
|
||||
está muerta?</H2>
|
||||
|
||||
<P>No, todos están ocupados codificando.
|
||||
<P>
|
||||
<H2><A NAME="ss1.8">1.8 Cómo conseguir ayuda con GTK+</A>
|
||||
</H2>
|
||||
|
||||
<P>Primero, asegúrate que tu pregunta no esté respondida en la
|
||||
documentación, este FAQ o el tutor. ¿Hecho? ¿Estás seguro de que
|
||||
lo has hecho, verdad? En ese caso, el mejor lugar para hacer preguntas es
|
||||
la lista de correo de GTK+.
|
||||
<P>
|
||||
<H2><A NAME="ss1.9">1.9 Cómo reportar errores en GTK+</A>
|
||||
</H2>
|
||||
|
||||
<P>Los reportes de errores se deben enviar a la lista de correo de GTK+.
|
||||
<P>
|
||||
<H2><A NAME="ss1.10">1.10 ¿Qué aplicaciones se han escrito con GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Algunas aplicaciones que utilizan GTK+ son:
|
||||
<UL>
|
||||
<LI>GIMP (
|
||||
<A HREF="http://www.XCF.Berkeley.EDU/~gimp/">http://www.XCF.Berkeley.EDU/~gimp/</A> ),
|
||||
un programa de manipulación de imágenes</LI>
|
||||
<LI>Gsumi (
|
||||
<A HREF="http://www.msc.cornell.edu/~otaylor/gsumi/gsumi.html">http://www.msc.cornell.edu/~otaylor/gsumi/gsumi.html</A>),
|
||||
un divertido programa para rayar en blanco y negro con soporte para
|
||||
XInput.</LI>
|
||||
<LI>GUBI (
|
||||
<A HREF="http://www.SoftHome.net/pub/users/timj/gubi/index.htm">http://www.SoftHome.net/pub/users/timj/gubi/index.htm</A>),
|
||||
un constructor de interface de usuario</LI>
|
||||
<LI>Gzilla (
|
||||
<A HREF="http://www.levien.com/gzilla/">http://www.levien.com/gzilla/</A>),
|
||||
un navegador del web</LI>
|
||||
<LI>SANE (
|
||||
<A HREF="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</A> ),
|
||||
una interface universal para <EM>scanner</EM></LI>
|
||||
<LI>XQF (
|
||||
<A HREF="http://www.botik.ru/~roma/quake/">http://www.botik.ru/~roma/quake/</A>),
|
||||
un lanzador y navegador de servidores de QuakeWorld/Quake2</LI>
|
||||
<LI>ElectricEyes (
|
||||
<A HREF="http://www.labs.redhat.com/ee.shtml">http://www.labs.redhat.com/ee.shtml</A>),
|
||||
un visor de imágenes que se dirige a ser un reemplazo libre de xv</LI>
|
||||
<LI>GPK - the General Proxy Kit (
|
||||
<A HREF="http://www.humanfactor.com/gpk/">http://www.humanfactor.com/gpk/</A>),
|
||||
una librería agregable que permite accesso seguro a GTK+
|
||||
ante múltiples hilos</LI>
|
||||
<LI>GCK - the General Convenience Kit (
|
||||
<A HREF="http://www.ii.uib.no/~tomb/gck.html">http://www.ii.uib.no/~tomb/gck.html</A>),
|
||||
funciones misceláneas cuya intención es facilitar el manejo de
|
||||
colores, construcción de IU (interfaces de usuario), operaciones
|
||||
vectoriales, y funciones matemáticas</LI>
|
||||
<LI>GDK Imlib (
|
||||
<A HREF="http://www.labs.redhat.com/imlib/">http://www.labs.redhat.com/imlib/</A>),
|
||||
una librería de manipulación y carga rápida de imágenes para
|
||||
GDK </LI>
|
||||
</UL>
|
||||
<P>Adicionalmente a lo de arriba, el proyecto GNOME
|
||||
(
|
||||
<A HREF="http://www.gnome.org">http://www.gnome.org</A>)
|
||||
utiliza GTK+ para construír un escritorio libre para Linux. Muchos más
|
||||
programas pueden ser encontrados ahí.
|
||||
<P>
|
||||
<H2><A NAME="ss1.11">1.11 Estoy buscando una aplicación que escribir en GTK+. ¿Qué tal un cliente IRC?</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<P>Pregunte en gtk-list para sugerencias. Actualmente hay por lo menos cuatro
|
||||
clientes IRC endesarrollo.
|
||||
<P>
|
||||
<UL>
|
||||
<LI>girc. (Incluído con GNOME)</LI>
|
||||
<LI>Bezerk (
|
||||
<A HREF="http://www.gtk.org/~trog/">http://www.gtk.org/~trog/</A>)</LI>
|
||||
<LI>gsirc. (¿Localización?)</LI>
|
||||
<LI>Gnirc. (
|
||||
<A HREF="http://www.imaginet.fr/~dramboz/gnirc">http://www.imaginet.fr/~dramboz/gnirc</A>)</LI>
|
||||
</UL>
|
||||
<P>
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-2.html">Next</A>
|
||||
Previous
|
||||
<A HREF="gtkfaq-es.html#toc1">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,195 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Cómo encontrar, configurar, instalar y comprobar GTK+</TITLE>
|
||||
<LINK HREF="gtkfaq-es-3.html" REL=next>
|
||||
<LINK HREF="gtkfaq-es-1.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc2" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-3.html">Next</A>
|
||||
<A HREF="gtkfaq-es-1.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc2">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s2">2. Cómo encontrar, configurar, instalar y comprobar GTK+</A></H2>
|
||||
|
||||
<H2><A NAME="ss2.1">2.1 ¿Qué necesito para correr GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Para compilar GTK+, todo lo que necesita es un compilador de C (gcc) y
|
||||
el Sistema X Windows y librerías asociadas en su sistema.
|
||||
<P>
|
||||
<H2><A NAME="ss2.2">2.2 ¿Dónde puedo conseguir GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>El sitio canónico es:
|
||||
<PRE>
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
</PRE>
|
||||
|
||||
Por supuesto, cualquier espejo de ftp.gtk.org debe tener las últimas
|
||||
versiones también.
|
||||
<P>
|
||||
<H2><A NAME="ss2.3">2.3 ¿Cómo configuro/compilo GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Por lo general, todo lo que necesita es emititir los comandos:
|
||||
<PRE>
|
||||
./configure
|
||||
make
|
||||
</PRE>
|
||||
|
||||
en el directorio gtk+-version/.
|
||||
<P>
|
||||
<H2><A NAME="ss2.4">2.4 Cuando compilo GTK+ obtengo un error como: <CODE>make: file `Makefile' line 456: Syntax error</CODE></A>
|
||||
</H2>
|
||||
|
||||
<P>Asegúrese de que utiliza GNU make (verifique con <CODE>make -v</CODE>). Hay
|
||||
varias versiones extrañas y maravillosas de make por ahí, y no todas
|
||||
manejan los <EM>Makefiles</EM> generados automáticamente.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss2.5">2.5 ¡He compilado e instalado GTK+, pero no puedo lograr que los programas se enlacen con él!</A>
|
||||
</H2>
|
||||
|
||||
<P>Este problema se encuentra comúnmente cuando las librerías GTK+ no pueden
|
||||
ser localizadas o tienen la versión incorrecta. Generalmente, el compilador
|
||||
se quejará de un 'unresolved symbol' (símbolo no resuelto). Hay dos cosas
|
||||
que necesita verificar:
|
||||
<P>
|
||||
<UL>
|
||||
<LI>Asegúrese de que las librerías pueden ser encontradas. Usted desea editar
|
||||
/etc/ld.so.conf para incluír los directorios que contienen las librerías
|
||||
GTK, de manera que luzca como:
|
||||
<PRE>
|
||||
/usr/X11R6/lib
|
||||
/usr/local/lib
|
||||
</PRE>
|
||||
|
||||
Luego necesita correr /sbin/ldconfig como root. Puede encontrar que directorio
|
||||
utiliza GTK al ejecutar
|
||||
<PRE>
|
||||
gtk-config --libs
|
||||
</PRE>
|
||||
|
||||
|
||||
Si su sitema no utiliza ld.so para encontrar librerías (como Solaris),
|
||||
entonces tendrá que utilizar la variable de ambiente LD_LIBRARY_PATH
|
||||
(o compilar el camino en su programa, lo cual no voy a cubrir aquí). Así
|
||||
que, con un shell tipo Bourne usted puede hacer (si sus librerías GTK
|
||||
están en /usr/local/lib):
|
||||
<PRE>
|
||||
export LD_LIBRARY_PATH=/usr/local/lib
|
||||
</PRE>
|
||||
|
||||
y en un csh, usted puede hacer:
|
||||
<PRE>
|
||||
setenv LD_LIBRARY_PATH /usr/local/lib
|
||||
</PRE>
|
||||
|
||||
</LI>
|
||||
<LI>Asegúrese de que el enlazador está ha encontrado el conjunto correcto de
|
||||
librerías. Si tiene una distribución de Linux que instala GTK+ (ej.
|
||||
RedHat 5.0) entonces esta versión anterior puede ser utilizada. Ahora
|
||||
(asumiendo que tiene un sistema RedHat), emita el comando
|
||||
<PRE>
|
||||
rpm -e gtk gtk-devel
|
||||
</PRE>
|
||||
|
||||
También puede querer remover los paquetes que dependen de gtk (rpm le
|
||||
dirá cuáles son). Si no tiene un sistema Linux RedHat, verifique
|
||||
para estar seguro que ni
|
||||
<PRE>
|
||||
/usr/lib
|
||||
</PRE>
|
||||
ni
|
||||
<PRE>
|
||||
/usr/local/lib
|
||||
</PRE>
|
||||
|
||||
contengan alguna de las librerías libgtk, libgdk, libglib, or libgck.
|
||||
Si existen, elimínelas (y cualquier archivo <EM>include</EM>, como
|
||||
/usr/include/gtk y /usr/include/gdk) y reinstale gtk+.</LI>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="ss2.6">2.6 Cuando compilo programas con GTK+, obtengo mensajes de error del compilador diciendo que no es capaz de encontrar <CODE>"glibconfig.h"</CODE>.</A>
|
||||
</H2>
|
||||
|
||||
<P>El archivo de encabezado "glibconfig.h" se movió al directorio
|
||||
$exec_prefix/lib/glib/include/. $exec_prefix es el directorio que fue
|
||||
especificado al dar la bandera --exec-prefix a ./configure cuando se
|
||||
compiló GTK+. Va por omisión a $prefix, (especificado con --prefix),
|
||||
que en su lugar va por omisión a /usr/local/.
|
||||
<P>Ésto se hizo asi porque "glibconfig.h" incluye información
|
||||
dependiente de la arquitectura, y el resto de los archivos <EM>include</EM>
|
||||
se colocan en $prefix/include, el cual puede ser compartido entre distintas
|
||||
arquitecturas.
|
||||
<P>GTK+ incluye un guión para el intérprete de comandos,
|
||||
<CODE>gtk-config</CODE>, el cual hace fácil
|
||||
encontrar los caminos correctos de inclusión. El tutor de GTK+ incluye
|
||||
un ejemplo de como utilizar <CODE>gtk-config</CODE> para una compilación simple
|
||||
desde la línea de comandos. Para información sobre configuraciones más
|
||||
complicadas, vea el archivo docs/gtk-config.txt en la distribución de GTK+.
|
||||
<P>Si está intentando compilar un programa viejo, puede bordear el problema
|
||||
al configurarlo con una línea de comando como:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
CPPFLAGS="-I/usr/local/include/glib/include" ./configure
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>para intérpretes de comandos compatibles con Bourne como bash, o para
|
||||
variantes csh:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
setenv CPPFLAGS "-I/usr/local/include/glib/include"
|
||||
./configure
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>(Sustituya el valor apropiado de $exec_prefix para /usr/local.)
|
||||
<P>
|
||||
<H2><A NAME="ss2.7">2.7 Cuando instalo El GIMP, configure reporta que no puede encontrar GTK.</A>
|
||||
</H2>
|
||||
|
||||
<P>Hay varias razones comúnes para esto:
|
||||
<UL>
|
||||
<LI>Usted tiene una versión vieja de GTK instalada en algún lugar.
|
||||
RedHat 5.0, por ejemplo, instala una copia anterior de GTK que no funcinará
|
||||
con las últimas veriones de GIMP. Debe eliminar esta copia vieja, pero
|
||||
observe que en el caso de RedHat 5.0 esto dañará las aplicaciones
|
||||
<CODE>control-panel</CODE>.
|
||||
<P>
|
||||
</LI>
|
||||
<LI><CODE>gtk-config</CODE> (u otro componente de GTK) no se encuentra en el camino
|
||||
(<EM>path</EM>),
|
||||
o hay una versión vieja en su sistema. Teclee:
|
||||
<PRE>
|
||||
gtk-config --version
|
||||
</PRE>
|
||||
|
||||
para verificar ambos casos. Ésto debe devolver un valor de por lo menos
|
||||
0.99.8 para que las cosas funcionen correctamente con GIMP 0.99.23. Si
|
||||
devuelve un valor distinto a lo que usted espera, entonces tiene una versión
|
||||
vieja de GTK en su sistema.
|
||||
<P>
|
||||
</LI>
|
||||
<LI>El guión ./configure no puede encontrar las librerías GTK. Como
|
||||
./configure compila varios programas de prueba, necesita poder encontrar las
|
||||
librerías GTK. Revise la pregunta anterior para obtener más ayuda al
|
||||
respecto.</LI>
|
||||
</UL>
|
||||
<P>Si nada de lo anterior ayuda, entonces revise config.log, el cual es
|
||||
generado por ./configure cuando corre. Al final estará la última
|
||||
acción tomada antes de fallar. Si es una sección de código fuente,
|
||||
copie el código fuente a un archivo y compilelo con la línea
|
||||
jústamente arriba de él en config.log. Si la compilación tiene
|
||||
éxito, intente ejecutarlo.
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-3.html">Next</A>
|
||||
<A HREF="gtkfaq-es-1.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc2">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,198 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Desarrollo de GTK+</TITLE>
|
||||
<LINK HREF="gtkfaq-es-4.html" REL=next>
|
||||
<LINK HREF="gtkfaq-es-2.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc3" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-4.html">Next</A>
|
||||
<A HREF="gtkfaq-es-2.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc3">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s3">3. Desarrollo de GTK+</A></H2>
|
||||
|
||||
<H2><A NAME="ss3.1">3.1 ¿Qué es esta cosa CVS de la cual todo el mundo habla, y cómo puedo acceder a ella?</A>
|
||||
</H2>
|
||||
|
||||
<P>CVS es el Concurrent Version System (Sistema de Versión Concurrente) y es
|
||||
un medio muy popular de control de versión para proyectos de software.
|
||||
Está diseñado para permitir que múltiples autores puedan operar de
|
||||
manera simultánea en el mismo árbol fuente. Este árbol fuente es
|
||||
mantenido centralizadamente, pero cada desarrollador tiene una réplica local
|
||||
de este repositorio en el cual hacen sus cambios.
|
||||
<P>Los desarrolladores de GTK+ utilizan un repositorio CVS para almacenar la
|
||||
copia maestra de la actual versión en desarrollo de GTK+. Como tal,
|
||||
la gente que desea contribuír con parches a GTK+ deben generarlos para la
|
||||
versión del CVS. La gente normal debe utilizar los paquetes liberados.
|
||||
<P>El conjunto de herramientas CVS está disponible como paquetes RPM en los
|
||||
sitios usuales de RedHat. La última versión está disponible en
|
||||
<A HREF="http://download.cyclic.com/pub/"><http://download.cyclic.com/pub/></A><P>Cualquiera puede bajar la última versión CVS de GTK+ utilizando
|
||||
acceso anónimo con los siguientes pasos:
|
||||
<UL>
|
||||
<LI> En un descendiente del intérprete de comandos bourne (ej. bash)
|
||||
teclee:
|
||||
<PRE>
|
||||
export CVSROOT=':pserver:anonymous@anoncvs.gimp.org:/debian/home/gnomecvs'
|
||||
</PRE>
|
||||
</LI>
|
||||
<LI>Luego, la primera vez que el árbol fuente se retira, se necesita
|
||||
un <EM>login</EM> cvs.
|
||||
<PRE>
|
||||
cvs login
|
||||
</PRE>
|
||||
|
||||
Ésto hará que se le solicite una clave de acceso. No hay clave de
|
||||
acceso para cvs.gimp.org, así que solo ingrese un retorno de carro.</LI>
|
||||
<LI>Para conseguir el árbol y colocarlo en un subdirectorio de su
|
||||
directorio de trabajo actual, emita el comando:
|
||||
<PRE>
|
||||
cvs -z3 get gtk+
|
||||
</PRE>
|
||||
|
||||
|
||||
Observe que con el árbol GTK+ 1.1, glib se ha movido a un módulo CVS
|
||||
separado, de manera que si no tiene glib instalado necesitará conseguirlo
|
||||
igualmente:
|
||||
<PRE>
|
||||
cvs -z3 get glib
|
||||
</PRE>
|
||||
|
||||
</LI>
|
||||
</UL>
|
||||
<H2><A NAME="ss3.2">3.2 ¿Cómo puedo contribuír a GTK+?</A>
|
||||
</H2>
|
||||
|
||||
<P>Es simple. Si algo no funciona en un programa como usted piensa que debería,
|
||||
revise la documentación para asegurarse de que no ha pasado algo por alto.
|
||||
Si es un verdadero error o característica perdida, rastréelo en el
|
||||
fuente de GTK+, cámbielo, y entonces genere un parche en la forma de un
|
||||
'diff de contexto'. Esto puede hacerse utilizando un comando como
|
||||
<CODE>diff -ru <oldfile> <newfile></CODE>. Entonces envíe el archivo
|
||||
de parche a:
|
||||
<PRE>
|
||||
ftp://ftp.gtk.org/incoming
|
||||
</PRE>
|
||||
|
||||
junto a un archivo README. ¡Asegúrese de seguir las convenciones de
|
||||
asignación de nombres o su parche será borrado! Los archivos deben ser
|
||||
de esta forma:
|
||||
<PRE>
|
||||
gtk-<username>-<date yymmdd-n>.patch.gz
|
||||
gtk-<username>-<date yymmdd-n>.patch.README
|
||||
</PRE>
|
||||
|
||||
La "n" en la fecha indica un número único (empezando de 0)
|
||||
de parches que subió ese día. Debe ser 0, a menos que envíe más de
|
||||
un parche en el mismo día.
|
||||
<P>Example:
|
||||
<PRE>
|
||||
gtk-gale-982701-0.patch.gz
|
||||
gtk-gale-982701-0.patch.README
|
||||
</PRE>
|
||||
|
||||
Una vez que usted envía <EM>lo que sea</EM>, envíe el README a
|
||||
ftp-admin@gtk.org
|
||||
<P>
|
||||
<H2><A NAME="ss3.3">3.3 ¿Cómo averiguo si mi parche fue aplicado, y si no, por qué no?</A>
|
||||
</H2>
|
||||
|
||||
<P>Los parches enviados se mandarán a
|
||||
<CODE>ftp://ftp.gtk.org/pub/gtk/patches</CODE>
|
||||
donde uno del equipo de desarrollo de GTK+ los recogerá. Si son aplicados,
|
||||
serán movidos a <CODE>/pub/gtk/patches/old</CODE>.
|
||||
<P>Los parches que no son aplicados, por cualquier razón, se mandarán a
|
||||
<CODE>/pub/gtk/patches/unapplied</CODE> o <CODE>/pub/gtk/patches/outdated</CODE>.
|
||||
En este punto puede preguntar en la lista de correo <CODE>gtk-list</CODE> el porqué
|
||||
su parche no fué aplicado. Hay muchas razones posibles por las cuales un
|
||||
parche no se aplica, pasando desde que no se puede aplicar limpiamente, hasta
|
||||
que no es correcto. No se rinda si no logró que su parche se aplicase a la
|
||||
primera.
|
||||
<P>
|
||||
<H2><A NAME="ss3.4">3.4 ¿Cuál es la política sobre la incorporación de nuevos <EM>widgets</EM> en la librería?</A>
|
||||
</H2>
|
||||
|
||||
<P>Esto corresponde a los autores, de manera que tendrá que preguntarles
|
||||
al terminar su <EM>widget</EM>. Como una guía general, los <EM>widgets</EM>
|
||||
que por lo general son útiles, funcionan, y no son una desgracia al conjunto
|
||||
de <EM>widgets</EM> serán incluídos con mucho gusto.
|
||||
<P>
|
||||
<H2><A NAME="ss3.5">3.5 ¿Hay alguien trabajando en atamientos para otros lenguajes distintos a C?</A>
|
||||
</H2>
|
||||
|
||||
<P>Sí. Existe
|
||||
<UL>
|
||||
<LI>una envoltura de C++ para GTK+ llamada gtk--. Puede encontrar el su
|
||||
página hogar en:
|
||||
<A HREF="http://www.cs.tut.fi/~p150650/gtk/gtk--.html">http://www.cs.tut.fi/~p150650/gtk/gtk--.html</A>.
|
||||
El sitio FTP es
|
||||
<A HREF="ftp://ftp.gtk.org/pub/gtk/gtk--">ftp://ftp.gtk.org/pub/gtk/gtk--</A>.
|
||||
<P>
|
||||
<P>
|
||||
</LI>
|
||||
<LI>Hay dos ataduras para Objective-C en desarrollo:
|
||||
|
||||
<UL>
|
||||
<LI>El paquete elegido por el
|
||||
<A HREF="http://www.gnome.org/">proyecto GNOME</A> es obgtk. Objgtk se basa en la clase Object y es
|
||||
mantenido por
|
||||
<A HREF="mailto:sopwith@cuc.edu">Elliot Lee</A>.
|
||||
Aparentemente, objgtk se está aceptando como el atamiento `estándar'
|
||||
de Objective-C para GTK+.
|
||||
</LI>
|
||||
<LI> Si usted está más inclinado al
|
||||
<A HREF="http://www.gnustep.org/">proyecto GNUstep</A>,
|
||||
puede que quiera revisar GTKKit por
|
||||
<A HREF="mailto:helge@mdlink.de">Helge Heß</A>.
|
||||
La intención es crear un atamiento GTK+ utilizando FoundationKit.
|
||||
GTKKit incluye linduras como escribir un archivo con una plantilla tipo
|
||||
XML para construír una interface GTK+.
|
||||
</LI>
|
||||
</UL>
|
||||
|
||||
<P>
|
||||
</LI>
|
||||
<LI>Atamientos Perl
|
||||
<A HREF="ftp://ftp.gtk.org/pub/gtk/perl">ftp://ftp.gtk.org/pub/gtk/perl</A>
|
||||
<P>
|
||||
</LI>
|
||||
<LI>Atamientos Guile. La página hogar se encuentra en
|
||||
<A HREF="http://www.ping.de/sites/zagadka/guile-gtk">http://www.ping.de/sites/zagadka/guile-gtk</A>.
|
||||
Por cierto, Guile es la implantación del Proyecto GNU de Scheme R4RS (el
|
||||
estándar). Si le gusta Scheme, querrá darle un vistazo a éste.
|
||||
<P>
|
||||
<P>
|
||||
</LI>
|
||||
<LI>David Monniaux informa:
|
||||
<BLOCKQUOTE>
|
||||
He empezado un sistema de atamiento gtk-O'Caml. Las bases del sistema,
|
||||
incluyendo <EM>callbacks</EM>, funcionan bien.
|
||||
|
||||
El desarrollo actual se encuentra en
|
||||
<A HREF="http://www.ens-lyon.fr/~dmonniau/arcs">http://www.ens-lyon.fr/~dmonniau/arcs</A></BLOCKQUOTE>
|
||||
|
||||
</LI>
|
||||
<LI>Se han hecho varios atamientos para python:
|
||||
<P>
|
||||
<UL>
|
||||
<LI>pygtk se encuentra en
|
||||
<A HREF="http://www.daa.com.au/~james/pygtk">http://www.daa.com.au/~james/pygtk</A> y
|
||||
<A HREF="ftp://ftp.gtk.org/pub/gtk/python">ftp://ftp.gtk.org/pub/gtk/python</A></LI>
|
||||
<LI>python-gtk se encuentra en
|
||||
<A HREF="http://www.ucalgary.ca/~nascheme/python-gtk">http://www.ucalgary.ca/~nascheme/python-gtk</A></LI>
|
||||
</UL>
|
||||
<P>
|
||||
</LI>
|
||||
<LI>Hay un <EM>widget</EM> disponible para GTK+. Agárrelo en
|
||||
<A HREF="http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html">http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html</A>
|
||||
</LI>
|
||||
</UL>
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-4.html">Next</A>
|
||||
<A HREF="gtkfaq-es-2.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc3">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,435 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Desarrollo con GTK+</TITLE>
|
||||
<LINK HREF="gtkfaq-es-5.html" REL=next>
|
||||
<LINK HREF="gtkfaq-es-3.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc4" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-5.html">Next</A>
|
||||
<A HREF="gtkfaq-es-3.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc4">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s4">4. Desarrollo con GTK+</A></H2>
|
||||
|
||||
<H2><A NAME="ss4.1">4.1 ¿Cómo empiezo?</A>
|
||||
</H2>
|
||||
|
||||
<P>Después de que ha instalado GTK+, hay un par de cosas que pueden
|
||||
facilitarle el desarrollo de aplicaciones con él. Está el Tutor de
|
||||
GTK+
|
||||
<A HREF="http://www.gtk.org/tutorial/"><http://www.gtk.org/tutorial/></A>, el cual está en desarrollo
|
||||
activo. Este tutorial le introducirá en la escritura de aplicaciones
|
||||
utilizando C.
|
||||
<P>El Tutor no contiene (todavía) información sobre todos los
|
||||
<EM>widgets</EM> que existen en GTK+. Para código de ejemplo sobre la
|
||||
utilización básica de todos los <EM>widgets</EM> de GTK+, debe ver
|
||||
el archivo gtk/testgtk.c (y archivos fuentes asociados) en la distribución
|
||||
GTK+. Ver estos ejemplos le dará una buena base sobre lo que pueden hacer
|
||||
los <EM>widgets</EM>.
|
||||
<P>
|
||||
<H2><A NAME="ss4.2">4.2 ¿Qué <EM>widgets</EM> existen en GTK?</A>
|
||||
</H2>
|
||||
|
||||
<P>El Tutor de GTK+ lista los siguientes <EM>widgets</EM>:
|
||||
<PRE>
|
||||
GtkObject
|
||||
+GtkData
|
||||
| +GtkAdjustment
|
||||
| `GtkTooltips
|
||||
`GtkWidget
|
||||
+GtkContainer
|
||||
| +GtkBin
|
||||
| | +GtkAlignment
|
||||
| | +GtkEventBox
|
||||
| | +GtkFrame
|
||||
| | | `GtkAspectFrame
|
||||
| | +GtkHandleBox
|
||||
| | +GtkItem
|
||||
| | | +GtkListItem
|
||||
| | | +GtkMenuItem
|
||||
| | | | `GtkCheckMenuItem
|
||||
| | | | `GtkRadioMenuItem
|
||||
| | | `GtkTreeItem
|
||||
| | +GtkViewport
|
||||
| | `GtkWindow
|
||||
| | +GtkColorSelectionDialog
|
||||
| | +GtkDialog
|
||||
| | | `GtkInputDialog
|
||||
| | `GtkFileSelection
|
||||
| +GtkBox
|
||||
| | +GtkButtonBox
|
||||
| | | +GtkHButtonBox
|
||||
| | | `GtkVButtonBox
|
||||
| | +GtkHBox
|
||||
| | | +GtkCombo
|
||||
| | | `GtkStatusbar
|
||||
| | `GtkVBox
|
||||
| | +GtkColorSelection
|
||||
| | `GtkGammaCurve
|
||||
| +GtkButton
|
||||
| | +GtkOptionMenu
|
||||
| | `GtkToggleButton
|
||||
| | `GtkCheckButton
|
||||
| | `GtkRadioButton
|
||||
| +GtkCList
|
||||
| `GtkCTree
|
||||
| +GtkFixed
|
||||
| +GtkList
|
||||
| +GtkMenuShell
|
||||
| | +GtkMenuBar
|
||||
| | `GtkMenu
|
||||
| +GtkNotebook
|
||||
| +GtkPaned
|
||||
| | +GtkHPaned
|
||||
| | `GtkVPaned
|
||||
| +GtkScrolledWindow
|
||||
| +GtkTable
|
||||
| +GtkToolbar
|
||||
| `GtkTree
|
||||
+GtkDrawingArea
|
||||
| `GtkCurve
|
||||
+GtkEditable
|
||||
| +GtkEntry
|
||||
| | `GtkSpinButton
|
||||
| `GtkText
|
||||
+GtkMisc
|
||||
| +GtkArrow
|
||||
| +GtkImage
|
||||
| +GtkLabel
|
||||
| | `GtkTipsQuery
|
||||
| `GtkPixmap
|
||||
+GtkPreview
|
||||
+GtkProgressBar
|
||||
+GtkRange
|
||||
| +GtkScale
|
||||
| | +GtkHScale
|
||||
| | `GtkVScale
|
||||
| `GtkScrollbar
|
||||
| +GtkHScrollbar
|
||||
| `GtkVScrollbar
|
||||
+GtkRuler
|
||||
| +GtkHRuler
|
||||
| `GtkVRuler
|
||||
`GtkSeparator
|
||||
+GtkHSeparator
|
||||
`GtkVSeparator
|
||||
</PRE>
|
||||
<P>
|
||||
<H2><A NAME="ss4.3">4.3 ¿GTK+ es seguro ante múltiples hilos?</A>
|
||||
</H2>
|
||||
|
||||
<P>Aunque GTK+, como la mayoría de los juegos de herramientas para X,
|
||||
no es seguro ante múltiples hilos, esto no prohibe el desarrollo de
|
||||
aplicaciones con múltiples hilos con GTK+.
|
||||
<P>Rob Browning (rlb@cs.utexas.edu) describe técnicas de hilamiento
|
||||
que pueden utilizarse con GTK+ (levemente modificado):
|
||||
<P>Básicamente existen dos enfoques principales, el primero es sencillo,
|
||||
y el segundo complicado. En el primero, simplemente hay que asegurarse
|
||||
de que todas las interacciones de GTK+ (o X) se manejan por un, y solo un,
|
||||
hilo. Cualquier otro hilo que desee dibujar algo tiene que notificarlo de
|
||||
alguna manera al hilo "GTK+", y dejarlo que maneje el trabajo real.
|
||||
<P>El segundo enfoque le permite llamar funciones de GTK+ (o X) desde cualquier
|
||||
hilo, pero requiere sincronización cuidadosa. La idea básica es crear
|
||||
una exclusión mutua de protección para X, de manera que nadie haga
|
||||
llamadas X sin primero adquirir esta exclusión mutua.
|
||||
<P>Observe que se trata de un pequeño esfuerzo, pero que le permitirá ser
|
||||
potencialmente más eficiente que un GTK+ completamente seguro ante
|
||||
múltiples hilos. Usted decide la granularidad del bloqueo de hilos.
|
||||
También debe asegurarse que el hilo que llama a gtk_main mantiene la
|
||||
cerradura cuando llama a gtk_main.
|
||||
<P>Lo siguiente por lo que hay que preocuparse ya que se tenía agarrada
|
||||
la exclusión mutua global cuando se entró a gtk_main, es que todos
|
||||
los <EM>callbacks</EM> también la tendrán. Esto significa que el
|
||||
<EM>callback</EM> debe soltarla si va a llamar a cualquier otro código
|
||||
que pueda readquirirla. De otra manera obtendrá un bloqueo mortal.
|
||||
También hay que tener agarrada la exclusión mutua cuando finalmente
|
||||
regresa del <EM>callback</EM>.
|
||||
<P>Para permitir a otros hilos, además del que llama a gtk_main, tener
|
||||
acceso a la exclusión mutua, necesitamos registrar una función de
|
||||
trabajo con GTK que nos permita liberar la exclusión mutua
|
||||
periódicamente.
|
||||
<P>¿Por qué GTK+ no puede ser seguro ante múltiples hilos de
|
||||
manera nativa?
|
||||
<P>Complejidad, sobrecarga, y mano de obra. La proporción de programas
|
||||
con hilos es todavía razonablemente pequeña, y conseguir seguridad
|
||||
ante hilos es muy difícil y le quita tiempo valioso al trabajo
|
||||
principal de obtener una buena librería gráfica terminada. Sería
|
||||
muy agradable que GTK+ fuera seguro ante hilos "al sacarlo de la caja",
|
||||
pero no es práctico ahora mismo, y haría a GTK+ sustancialmente menos
|
||||
eficiente si no se maneja cuidadosamente.
|
||||
<P>De cualquier manera, no es una prioridad esencial ya que existen remedios
|
||||
relativamente buenos.
|
||||
<P>
|
||||
<H2><A NAME="ss4.4">4.4 ¿Cómo puedo prevenir el redibujar y reacomodar tamaños mientras cambio múltiples <EM>widgets</EM>?</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
Utilize gtk_container_disable_resize y gtk_container_enable_resize alrededor
|
||||
del código donde quiere cambiar varias cosas. Esto resultará en mayor
|
||||
velocidad ya que prevendrá tener que darle el tamaño otra vez a la
|
||||
jerarquía de <EM>widget</EM> por completo.
|
||||
<P>
|
||||
<H2><A NAME="ss4.5">4.5 ¿Cómo atrapo un evento de doble tecleo (en un <EM>widget</EM> de lista, por ejemplo)?</A>
|
||||
</H2>
|
||||
|
||||
<P>Tim Janik escribió a la lista gtk-list (ligeramente modificado):
|
||||
<P>Defina un manejador de señal:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
gint
|
||||
signal_handler_event(GtkWiget *widget, GdkEvenButton *event, gpointer func_data)
|
||||
{
|
||||
if (GTK_IS_LIST_ITEM(widget) &&
|
||||
(event->type==GDK_2BUTTON_PRESS ||
|
||||
event->type==GDK_3BUTTON_PRESS) ) {
|
||||
printf("I feel %s clicked on button %d\",
|
||||
event->type==GDK_2BUTTON_PRESS ? "double" : "triple",
|
||||
event->button);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>Y conecte el manejador a su objeto:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
{
|
||||
/* lista, asuntos de inicializacion de articulos de lista */
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(list_item),
|
||||
"button_press_event",
|
||||
GTK_SIGNAL_FUNC(signal_handler_event),
|
||||
NULL);
|
||||
|
||||
/* y/o */
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(list_item),
|
||||
"button_release_event",
|
||||
GTK_SIGNAL_FUNC(signal_handler_event),
|
||||
NULL);
|
||||
|
||||
/* algo mas */
|
||||
}
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>y, Owen Taylor escribió:
|
||||
<P>Observe que se recibirá la pulsación del botón de antemano, y
|
||||
si está haciendo esto para un botón, también obtendrá una señal
|
||||
de "tecleado" para el botón. (Esto es cierto para cualquier juego de
|
||||
herramientas, ya que las computadoras no son buenas para leer la mente de
|
||||
cada quien.)
|
||||
<P>
|
||||
<H2><A NAME="ss4.6">4.6 ¿Cómo puedo averiguar cuál es la selección de un GtkList?</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<P>Consiga la selección con algo como esto:
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
GList *sel;
|
||||
sel = GTK_LIST(list)->selection;
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>Así es como GList está definido (sacado de glist.h):
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
typedef struct _GList GList;
|
||||
|
||||
struct _GList
|
||||
{
|
||||
gpointer data;
|
||||
GList *next;
|
||||
GList *prev;
|
||||
};
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>Una estructura GList es simplemente una estructura para listas doblemente
|
||||
enlazadas. Existen varias funciones g_list_*() para modificar una lista
|
||||
enlazada en glib.h. Sin embargo, la selección GTK_LIST(MyGtkList)->selection
|
||||
es mantenida por las funciones gtk_list_*() y no deben ser modificadas.
|
||||
<P>El selection_mode del GtkList determina las facilidades de selección de un
|
||||
GtkList y por lo tanto los contenidos de GTK_LIST(AnyGtkList)->selection:
|
||||
<P>
|
||||
<PRE>
|
||||
selection_mode GTK_LIST()->selection contents
|
||||
------------------------------------------------------
|
||||
|
||||
GTK_SELECTION_SINGLE) la selección es NULL
|
||||
o contiene un puntero GList*
|
||||
para un artículo seleccionado individualmente
|
||||
|
||||
GTK_SELECTION_BROWSE) la selección es NULL si la lista
|
||||
no contiene widgets, de otra manera
|
||||
contiene un puntero GList*
|
||||
para una estructura GList.
|
||||
GTK_SELECTION_MULTIPLE) la selección es NULL si no se seleccionan
|
||||
listitems para un apuntador GList*
|
||||
para el primer artículo seleccionado. Eso en
|
||||
su lugar apunta a una estructura GList para el
|
||||
segundo artículo seleccionado y continúa
|
||||
|
||||
GTK_SELECTION_EXTENDED) la selección es NULL.
|
||||
</PRE>
|
||||
<P>El campo data de la estructura GList GTK_LIST(MyGtkList)->selection apunta
|
||||
al primer GtkListItem que es seleccionado. De manera que si quiere determinar
|
||||
cuales listitems están seleccionados debe hacer esto:
|
||||
<P>Durante la in>
|
||||
<HR><H3>Transfer interrupted!</H3>
|
||||
>
|
||||
{
|
||||
gchar *list_items[]={
|
||||
"Item0",
|
||||
"Item1",
|
||||
"foo",
|
||||
"last Item",
|
||||
};
|
||||
guint nlist_items=sizeof(list_items)/sizeof(list_items[0]);
|
||||
GtkWidget *list_item;
|
||||
guint i;
|
||||
|
||||
list=gtk_list_new();
|
||||
gtk_list_set_selection_mode(GTK_LIST(list), GTK_SELECTION_MULTIPLE);
|
||||
gtk_container_add(GTK_CONTAINER(AnyGtkContainer), list);
|
||||
gtk_widget_show (list);
|
||||
|
||||
for (i = 0; i < nlist_items; i++)
|
||||
{
|
||||
list_item=gtk_list_item_new_with_label(list_items[i]);
|
||||
gtk_object_set_user_data(GTK_OBJECT(list_item), (gpointer)i);
|
||||
gtk_container_add(GTK_CONTAINER(list), list_item);
|
||||
gtk_widget_show(list_item);
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>Para tener conocimiento de la inicialización:
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
{
|
||||
GList *items;
|
||||
|
||||
items=GTK_LIST(list)->selection;
|
||||
|
||||
printf("Selected Items: ");
|
||||
while (items) {
|
||||
if (GTK_IS_LIST_ITEM(items->data))
|
||||
printf("%d ", (guint)
|
||||
gtk_object_get_user_data(items->data));
|
||||
items=items->next;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<H2><A NAME="ss4.7">4.7 ¿Acaso es posible desplegar un texto que se recorte para que quepa dentro del lugar que tenga asignado?</A>
|
||||
</H2>
|
||||
|
||||
<P>El comportamiento de GTK+ (sin recorte) es una consecuencia de sus intentos
|
||||
para conservar recursos de X. Los <EM>widgets</EM> etiqueta (entre otros) no
|
||||
tienen su propia ventana X - simplemente dibujan su contenido en la ventana
|
||||
de su padre. Aunque sería posible hacer que ocurran recortes al establecer
|
||||
la máscara de recorte antes de dibujar el texto, esto podría causar una
|
||||
penalización substancial en el rendimiento.
|
||||
<P>Es posible que, a largo plazo, la mejor solución a tales problemas sea
|
||||
simplemente cambiar gtk para que le de ventanas X a las etiquetas. Un remedio
|
||||
a corto plazo es poner el <EM>widget</EM> de etiqueta dentro de otro
|
||||
<EM>widget</EM> que sí obtiene su propia ventana - un candidato posible puede ser el <EM>widget</EM> <EM>viewport</EM>.
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
viewport = gtk_viewport (NULL, NULL);
|
||||
gtk_widget_set_usize (viewport, 50, 25);
|
||||
gtk_viewport_set_shadow_type (GTK_VIEWPORT(viewport), GTK_SHADOW_NONE);
|
||||
gtk_widget_show(viewport);
|
||||
|
||||
label = gtk_label ("a really long label that won't fit");
|
||||
gtk_container_add (GTK_CONTAINER(viewport), label);
|
||||
gtk_widget_show (label);
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>Si estuviera haciendo esto para un montón de <EM>widgets</EM>, querrá
|
||||
copiar gtkviewport.c y arrancar la funcionalidad de sombra y ajuste (tal vez
|
||||
quiera llamarlo GtkClipper).
|
||||
<P>
|
||||
<H2><A NAME="ss4.8">4.8 ¿Por qué el contenido de un botón no se mueve al presionar el botón? Aquí les envío un parche para que funcione de esa forma...</A>
|
||||
</H2>
|
||||
|
||||
<P>De: Peter Mattis
|
||||
<P>La razón por la cuál los botones no mueven a su hijo abajo y a la derecha
|
||||
cuando son presionados es porque no me parece que eso es lo que ocurre
|
||||
visualmente. Mi visión de los botonos es que los miras de manera recta.
|
||||
O sea, la interface de usuario tiende sobre un plano y tú estás sobre
|
||||
él observándolo de manera recta. Cuando un botón es presionado se
|
||||
mueve directamente lejos de tí. Para ser absolutamente correcto supongo
|
||||
que el hijo debería encojerse un poquito. Pero no veo por qué el hijo
|
||||
debería moverse abajo y a la izquierda. Recurda, el hijo se supone que
|
||||
está pegado a la superficie del botón. No es bueno que luzca como si
|
||||
el hijo se resbala sobre la superficie del botón.
|
||||
<P>En una nota más práctica, ya implanté esto una vez y determiné
|
||||
que no se veía bien y lo quité.
|
||||
<P>
|
||||
<H2><A NAME="ss4.9">4.9 ¿Cómo puedo definir una línea de separación como en un menú?</A>
|
||||
</H2>
|
||||
|
||||
<P>Revise el
|
||||
<A HREF="http://www.gtk.org/tutorial/">Tutor</A> para información sobre como crear menús.
|
||||
<P>Sin embargo, para crear una línea de separación en un menú,
|
||||
simplemente inserte un artículo de menú vacío:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
menuitem = gtk_menu_item_new();
|
||||
gtk_menu_append(GTK_MENU(menu), menuitem);
|
||||
gtk_widget_show(menuitem);
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>
|
||||
<H2><A NAME="ss4.10">4.10 ¿Cómo puedo darle justificación a la derecha a un menú, como Help, cuando utilizo MenuFactory?</A>
|
||||
</H2>
|
||||
|
||||
<P>Utilice algo como lo que sigue:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
menu_path = gtk_menu_factory_find (factory, "<MyApp>/Help");
|
||||
gtk_menu_item_right_justify(menu_path->widget);
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<H2><A NAME="ss4.11">4.11 ¿Cómo hago mi ventana modal? / ¿Cómo hago una sóla ventana activa?</A>
|
||||
</H2>
|
||||
|
||||
<P>Después de haber creado su ventana, haga gtk_grab_add(my_window). Y
|
||||
después de cerrar la ventana haga gtk_grab_remove(my_window).
|
||||
<P>
|
||||
<H2><A NAME="ss4.12">4.12 ¿Por qué mi <EM>widget</EM> (ej. progressbar) no se actualiza?</A>
|
||||
</H2>
|
||||
|
||||
<P>
|
||||
<P>Probablemente usted está haciendo todos los cambios dentro de una función
|
||||
sin devolver el control a gtk_main. La mayoría de las actualizaciones de
|
||||
dibujo se colocan simplemente en una cola, la cual es procesada dentro de
|
||||
gtk_main. Puede forzar que se procese la cola de dibujado utilizando algo como:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
while (gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>dentro de la función que cambia el <EM>widget</EM>.
|
||||
<P>Lo que el fragmento anterior hace es correr todos los eventos pendientes y
|
||||
funciones ociosas de alta prioridad, luego regresa de inmediato (el dibujado
|
||||
se realiza en una función ociosa de alta prioridad).
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-5.html">Next</A>
|
||||
<A HREF="gtkfaq-es-3.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc4">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,92 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Acerca de gdk</TITLE>
|
||||
<LINK HREF="gtkfaq-es-6.html" REL=next>
|
||||
<LINK HREF="gtkfaq-es-4.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc5" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-6.html">Next</A>
|
||||
<A HREF="gtkfaq-es-4.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc5">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s5">5. Acerca de gdk</A></H2>
|
||||
|
||||
<H2><A NAME="ss5.1">5.1 ¿Qué es gdk?</A>
|
||||
</H2>
|
||||
|
||||
<P>gdk es básicamente una envoltura alrededor de las llamadas a funciones
|
||||
Xlib. Si estás familiarizado con Xlib, muchas de las funciones en gdk
|
||||
requerirán poco o ningún tiempo para acostumbrarse.
|
||||
Todas las funciones están escritas para proporcionar una manera fácil de
|
||||
acceder a las funciones Xlib en una manera un poco más intuitiva.
|
||||
Adicionalmente, ya que gdk utiliza glib (vea abajo), será más portable
|
||||
y seguro de utilizar en
|
||||
múltiples plataformas.
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss5.2">5.2 ¿Cómo utilizo la asignación de colores?</A>
|
||||
</H2>
|
||||
|
||||
<P>Una de las cosas agradables de GDK es que está basado sobre Xlib; esto
|
||||
también es un problema, especialmente en el área de administración
|
||||
de colores. Si usted quiere utilizar color en su programa (dibujando un
|
||||
rectángulo o algo por el estilo, su código debe lucir algo así:
|
||||
<P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
<PRE>
|
||||
{
|
||||
GdkColor *color;
|
||||
int width, height;
|
||||
GtkWidget *widget;
|
||||
GdkGC *gc;
|
||||
|
||||
...
|
||||
|
||||
/* primero, cree un GC (contexto grafico) en el cual dibujar */
|
||||
gc = gdk_gc_new(widget->window);
|
||||
|
||||
/* encuentre las dimensiones correctas para el rectangulo */
|
||||
gdk_window_get_size(widget->window, &width, &height);
|
||||
|
||||
/* el color que queremos utilizar */
|
||||
color = (GdkColor *)malloc(sizeof(GdkColor));
|
||||
|
||||
/* rojo, verde y azul son valores pasados, indicando el trio RGB
|
||||
* del color que queremos dibujar. Note que los valores de los componentes
|
||||
* RGB dentro de GdkColor son tomados de 0 a 65535, no de 0 a 255.
|
||||
*/
|
||||
color->red = red * (65535/255);
|
||||
color->green = green * (65535/255);
|
||||
color->blue = blue * (65535/255);
|
||||
|
||||
/* el valor de pixel indica el indice en el mapa de colores del color.
|
||||
* simplemente es una combinacion de los valores RGB colocados anteriormente
|
||||
*/
|
||||
color->pixel = (gulong)(red*65536 + green*256 + blue);
|
||||
|
||||
/* Sin embargo, el valor de pixel es solo valido en dispositivos de 24-bit
|
||||
* (color verdadero). Por lo tanto, esta llamada es requerida para que GDK
|
||||
* y X puedan darnos el color mas cercano disponible en el mapa de colores
|
||||
*/
|
||||
gdk_color_alloc(gtk_widget_get_colormap(widget), color);
|
||||
|
||||
/* colocar la parte delantera a nuestro color */
|
||||
gdk_gc_set_foreground(gc, color);
|
||||
|
||||
/* dibujar el rectangulo*/
|
||||
gdk_draw_rectangle(widget->window, gc, 1, 0, 0, width, height);
|
||||
|
||||
...
|
||||
}
|
||||
</PRE>
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-6.html">Next</A>
|
||||
<A HREF="gtkfaq-es-4.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc5">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,64 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Acerca de glib</TITLE>
|
||||
<LINK HREF="gtkfaq-es-7.html" REL=next>
|
||||
<LINK HREF="gtkfaq-es-5.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc6" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-7.html">Next</A>
|
||||
<A HREF="gtkfaq-es-5.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc6">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s6">6. Acerca de glib</A></H2>
|
||||
|
||||
<H2><A NAME="ss6.1">6.1 ¿Qué es glib?</A>
|
||||
</H2>
|
||||
|
||||
<P>glib es una librería de funciones y definiciones útiles disponibles
|
||||
para ser utilizadas cuando se crean aplicaciones GDK y GTK. Proporciona
|
||||
reemplazos para algunas funciones estándar de libc, como malloc, las
|
||||
cuales tienen errores en algunos sistemas.
|
||||
<P>También proporciona rutinas para manejar:
|
||||
<UL>
|
||||
<LI>Listas Doblemente Enlazadas</LI>
|
||||
<LI>Listas con Enlace Sencillo</LI>
|
||||
<LI>Cronómetros</LI>
|
||||
<LI>Manipulación de cadenas</LI>
|
||||
<LI>Un Analizador Léxico</LI>
|
||||
<LI>Funciones de Error</LI>
|
||||
</UL>
|
||||
<P>
|
||||
<P>
|
||||
<H2><A NAME="ss6.2">6.2 ¿Por qué utilizar g_print, g_malloc, g_strdup y funciones compañeras de glib?</A>
|
||||
</H2>
|
||||
|
||||
<P>Gracias a Tim Janik que escribió a gtk-list: (ligeramente modificado)
|
||||
<BLOCKQUOTE>
|
||||
Con respecto a g_malloc(), g_free() y hermanos, estas funciones son más
|
||||
seguras que sus equivalentes en libc. Por ejemplo, g_free() solo regresa si
|
||||
se llama con NULL. También, si se define USE_DMALLOC, la definición para
|
||||
estas funciones cambia (en glib.h) para utilizar MALLOC(), FREE() etc... Si
|
||||
MEM_PROFILE o MEM_CHECK se definen, hay incluso pequeñas estadísticas
|
||||
realizadas las cuales cuentan los tamaños de los bloques (mostrado por
|
||||
g_mem_profile() / g_mem_check()).
|
||||
<P>Considerando el hecho de que glib provee una interface para salvar espacio en
|
||||
pedazos de memoria si se tiene varios bloques que son siempre del mismo
|
||||
tamaño y para marcarlos ALLOC_ONLY si es necesario, es sencillo crear
|
||||
una pequeña envoltura para salvar (revisable para errores) alrededor del
|
||||
malloc/free normal asimismo - igual que gdk cubre Xlib. ;)
|
||||
<P>Utilizar g_error() y g_warning() dentro de aplicaciones como GIMP las cuales
|
||||
utilizan gtk por completo incluso da la oportunidad de hacer saltar una ventana
|
||||
que muestre los mensajes dentro de una ventana gtk con tu propio handler
|
||||
(utilizando g_set_error_handler()) con el mismo estilo que gtk_print()
|
||||
(dentro de gtkmain.c).
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-7.html">Next</A>
|
||||
<A HREF="gtkfaq-es-5.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc6">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,80 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ: Contribuciones al GTK+ FAQ, Mantenedores y Copyright</TITLE>
|
||||
<LINK HREF="gtkfaq-es-6.html" REL=previous>
|
||||
<LINK HREF="gtkfaq-es.html#toc7" REL=contents>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
Next
|
||||
<A HREF="gtkfaq-es-6.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc7">Contents</A>
|
||||
<HR NOSHADE>
|
||||
<H2><A NAME="s7">7. Contribuciones al GTK+ FAQ, Mantenedores y Copyright</A></H2>
|
||||
|
||||
<P>Si desea hacer una contribución al FAQ, envíe a alguno de nosotros
|
||||
un mensaje por correo electrónico con el texto exacto que cree que
|
||||
debería ser incluído (pregunta y respuesta). ¡Con su ayuda, este
|
||||
documento puede crecer y llegar a ser más útil!
|
||||
<P>Este documento es mantenido por Nathan Froyd
|
||||
<A HREF="mailto:maestrox@geocities.com"><maestrox@geocities.com></A>
|
||||
y Tony Gale
|
||||
<A HREF="mailto:gale@gimp.org"><gale@gimp.org></A>.
|
||||
Este FAQ fue creado por Shawn T. Amundson
|
||||
<A HREF="mailto:amundson@gimp.org"><amundson@gimp.org></A> quien continúa dando soporte.
|
||||
<P>El GTK+ FAQ está registrado Copyright (C) 1997, 1998 por Shawn T. Amundson,
|
||||
Nathan Froyd y tony Gale.
|
||||
<P>Se otorga permiso para hacer y distribuír copias textuales de este manual
|
||||
siempre y cuando la información de copyright y este permiso se preserven en
|
||||
todas las copias.
|
||||
<P>Se otorga permiso para copiar y distribuir versiones modificados de este
|
||||
documento bajo las condiciones para copiado textual, siempre y cuando esta
|
||||
noticia de copyright se incluya exáctamente como en el original, y
|
||||
que el trabajo resultante en su totalidad sea distribuído bajo los
|
||||
términos de una noticia de permiso idéntica a esta.
|
||||
<P>Se otorga permiso para copiar y distribuír traducciones de este documento
|
||||
a otro lenguaje, bajo las condiciones anteriores de versiones modificadas.
|
||||
<P>Si tiene intenciones de incorporar este documento en un trabajo publicado,
|
||||
por favor contacte a uno de los mantenedores, y nos aseguraremos de que
|
||||
obtenga la información más actual posible.
|
||||
<P>No hay garantía de que este documento logre su propósito. Este documento
|
||||
se proporciona simplemente como un recurso libre. Como tal, los autores y
|
||||
mantenedores de la información proporcionada en él no pueden dar
|
||||
garantía alguna de que la información es precisa.
|
||||
<P>
|
||||
<H2><A NAME="ss7.1">7.1 Nota del Traductor</A>
|
||||
</H2>
|
||||
|
||||
<P>Esta traducción fue realizada por
|
||||
<A HREF="http://www.talisman.com.pa">Ramsés Morales</A>.
|
||||
He intentado hacer
|
||||
la mejor adaptación posible de los términos técnicos, si tiene
|
||||
alguna sugerencia o mejora a estos términos y mi español, o alguna
|
||||
duda por causa de mi traducción, no dude en comunicármelo a
|
||||
<A HREF="mailto:ramses@computer.org"><ramses@computer.org></A><P>Gracias a
|
||||
<A HREF="mailto: e98cuenc@criens.u-psud.fr">Joaquín Cuenca</A> por todas sus sugerencias para mejorar la
|
||||
traducción, fueron de gran ayuda.
|
||||
<P>--------------------------------------
|
||||
<P>The GTK+ FAQ is Copyright (C) 1997,1998 by Shawn T. Amundson, Nathan Froyd and Tony Gale.
|
||||
<P>Permission is granted to make and distribute verbatim copies of this manual provided the
|
||||
copyright notice and this permission notice are preserved on all copies.
|
||||
<P>Permission is granted to copy and distribute modified versions of this document under the conditions
|
||||
for verbatim copying, provided that this copyright notice is included exactly as in the original,
|
||||
and that the entire resulting derived work is distributed under the terms of a permission
|
||||
notice identical to this one.
|
||||
<P>Permission is granted to copy and distribute translations of this document into another language,
|
||||
under the above conditions for modified versions.
|
||||
<P>If you are intending to incorporate this document into a published work, please contact one of
|
||||
the maintainers, and we will make an effort to ensure that you have the most up to date
|
||||
information available.
|
||||
<P>There is no guarentee that this document lives up to its intended
|
||||
purpose. This is simply provided as a free resource. As such,
|
||||
the authors and maintainers of the information provided within can
|
||||
not make any guarentee that the information is even accurate.
|
||||
<HR NOSHADE>
|
||||
Next
|
||||
<A HREF="gtkfaq-es-6.html">Previous</A>
|
||||
<A HREF="gtkfaq-es.html#toc7">Contents</A>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,103 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.6">
|
||||
<TITLE>GTK+ FAQ</TITLE>
|
||||
<LINK HREF="gtkfaq-es-1.html" REL=next>
|
||||
|
||||
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF">
|
||||
<A HREF="gtkfaq-es-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
<HR NOSHADE>
|
||||
<H1>GTK+ FAQ</H1>
|
||||
|
||||
|
||||
<H2>Nathan Froyd, Tony Gale, Shawn T. Amundson.</H2>Seis de Julio de 1998
|
||||
<P><HR NOSHADE>
|
||||
<EM>La intención de este documento es dar respuesta a las preguntas
|
||||
realizadas con más frecuencia por parte de los programadores que utilizan GTK+ o simplemente por personas que desean utilizar GTK+. </EM>
|
||||
<HR NOSHADE>
|
||||
<P>
|
||||
<H2><A NAME="toc1">1.</A> <A HREF="gtkfaq-es-1.html">Información General</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.1">1.1 Autores</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.2">1.2 ¿Qué es GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.3">1.3 ¿Qué es el + en GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.4">1.4 ¿La G en GTK+ significa General, Gimp, o GNU?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.5">1.5 ¿Dónde está la documentación para GTK?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.6">1.6 ¿Hay alguna lista de correo (o archivo de lista de correo) para GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.7">1.7 ¿La lista gtk-list no ha tenido tráfico alguno por días,</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.8">1.8 Cómo conseguir ayuda con GTK+</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.9">1.9 Cómo reportar errores en GTK+</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.10">1.10 ¿Qué aplicaciones se han escrito con GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-1.html#ss1.11">1.11 Estoy buscando una aplicación que escribir en GTK+. ¿Qué tal un cliente IRC?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc2">2.</A> <A HREF="gtkfaq-es-2.html">Cómo encontrar, configurar, instalar y comprobar GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.1">2.1 ¿Qué necesito para correr GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.2">2.2 ¿Dónde puedo conseguir GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.3">2.3 ¿Cómo configuro/compilo GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.4">2.4 Cuando compilo GTK+ obtengo un error como: <CODE>make: file `Makefile' line 456: Syntax error</CODE></A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.5">2.5 ¡He compilado e instalado GTK+, pero no puedo lograr que los programas se enlacen con él!</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.6">2.6 Cuando compilo programas con GTK+, obtengo mensajes de error del compilador diciendo que no es capaz de encontrar <CODE>"glibconfig.h"</CODE>.</A>
|
||||
<LI><A HREF="gtkfaq-es-2.html#ss2.7">2.7 Cuando instalo El GIMP, configure reporta que no puede encontrar GTK.</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc3">3.</A> <A HREF="gtkfaq-es-3.html">Desarrollo de GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.1">3.1 ¿Qué es esta cosa CVS de la cual todo el mundo habla, y cómo puedo acceder a ella?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.2">3.2 ¿Cómo puedo contribuír a GTK+?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.3">3.3 ¿Cómo averiguo si mi parche fue aplicado, y si no, por qué no?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.4">3.4 ¿Cuál es la política sobre la incorporación de nuevos <EM>widgets</EM> en la librería?</A>
|
||||
<LI><A HREF="gtkfaq-es-3.html#ss3.5">3.5 ¿Hay alguien trabajando en atamientos para otros lenguajes distintos a C?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc4">4.</A> <A HREF="gtkfaq-es-4.html">Desarrollo con GTK+</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.1">4.1 ¿Cómo empiezo?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.2">4.2 ¿Qué <EM>widgets</EM> existen en GTK?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.3">4.3 ¿GTK+ es seguro ante múltiples hilos?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.4">4.4 ¿Cómo puedo prevenir el redibujar y reacomodar tamaños mientras cambio múltiples <EM>widgets</EM>?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.5">4.5 ¿Cómo atrapo un evento de doble tecleo (en un <EM>widget</EM> de lista, por ejemplo)?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.6">4.6 ¿Cómo puedo averiguar cuál es la selección de un GtkList?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.7">4.7 ¿Acaso es posible desplegar un texto que se recorte para que quepa dentro del lugar que tenga asignado?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.8">4.8 ¿Por qué el contenido de un botón no se mueve al presionar el botón? Aquí les envío un parche para que funcione de esa forma...</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.9">4.9 ¿Cómo puedo definir una línea de separación como en un menú?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.10">4.10 ¿Cómo puedo darle justificación a la derecha a un menú, como Help, cuando utilizo MenuFactory?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.11">4.11 ¿Cómo hago mi ventana modal? / ¿Cómo hago una sóla ventana activa?</A>
|
||||
<LI><A HREF="gtkfaq-es-4.html#ss4.12">4.12 ¿Por qué mi <EM>widget</EM> (ej. progressbar) no se actualiza?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc5">5.</A> <A HREF="gtkfaq-es-5.html">Acerca de gdk</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-5.html#ss5.1">5.1 ¿Qué es gdk?</A>
|
||||
<LI><A HREF="gtkfaq-es-5.html#ss5.2">5.2 ¿Cómo utilizo la asignación de colores?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc6">6.</A> <A HREF="gtkfaq-es-6.html">Acerca de glib</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-6.html#ss6.1">6.1 ¿Qué es glib?</A>
|
||||
<LI><A HREF="gtkfaq-es-6.html#ss6.2">6.2 ¿Por qué utilizar g_print, g_malloc, g_strdup y funciones compañeras de glib?</A>
|
||||
</UL>
|
||||
<P>
|
||||
<H2><A NAME="toc7">7.</A> <A HREF="gtkfaq-es-7.html">Contribuciones al GTK+ FAQ, Mantenedores y Copyright</A></H2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="gtkfaq-es-7.html#ss7.1">7.1 Nota del Traductor</A>
|
||||
</UL>
|
||||
<HR NOSHADE>
|
||||
<A HREF="gtkfaq-es-1.html">Next</A>
|
||||
Previous
|
||||
Contents
|
||||
</BODY>
|
||||
</HTML>
|
||||
2583
docs/faq/gtkfaq.sgml
2583
docs/faq/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
198
docs/gdk.sgml
198
docs/gdk.sgml
@@ -1,198 +0,0 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
|
||||
<!-- Title information -->
|
||||
|
||||
<title>The GTK+ Drawing Kit Programming Manual
|
||||
<author>Shawn T. Amundson, Peter Mattis
|
||||
<date>July 26, 1998
|
||||
|
||||
<abstract>
|
||||
This document aims at teaching user how to effectively program in
|
||||
GDK, the GTK+ Drawing Kit, and to serve as a reference guide to
|
||||
more experienced GTK+ programmers. It is a work in progress.
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<!-- ***************************************************************** -->
|
||||
<sect>Introduction
|
||||
|
||||
<p>
|
||||
GDK is designed as a wrapper library that lies on top of Xlib. It
|
||||
performs many common and desired operations for a programmer instead
|
||||
of the programmer having to explicitly ask for such functionality from
|
||||
Xlib directly. For example, GDK provides a common interface to both
|
||||
regular and shared memory XImage types. By doing so, an application
|
||||
can nearly transparently use the fastest image type available. GDK
|
||||
also provides routines for determining the best available color depth
|
||||
and the best available visual which is not always the default visual
|
||||
for a screen.
|
||||
|
||||
GDK is distributed and developed with GTK+, and is licensed under the
|
||||
GNU Library General Public Licence (LGPL).
|
||||
|
||||
<sect>Getting Started
|
||||
|
||||
<sect1>Initialization
|
||||
<p>
|
||||
Initialization of GDK is easy. Simply call gdk_init() passing
|
||||
in the argc and argv parameters.
|
||||
|
||||
<tscreen><verb>
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
/* Initialize GDK. */
|
||||
gdk_init (&argc, &argv);
|
||||
|
||||
/* Cleanup of GDK is done automatically when the program exits. */
|
||||
return 0;
|
||||
}
|
||||
</verb></tscreen>
|
||||
|
||||
Generally, GDK initialization is done by gtk_init() in GTK+. This means
|
||||
that when using GTK+, you do not need to directly call gdk_init().
|
||||
|
||||
<sect1>An Example using GDK with GTK+
|
||||
<p>
|
||||
This example demonstrates drawing a line using the foreground
|
||||
color of the GtkDrawArea widget it is drawn inside. The example
|
||||
will end when you click inside the window, which is filled by the
|
||||
GtkDrawingArea widget.
|
||||
|
||||
The line is drawn during the expose event so that when the window
|
||||
drawing is done whenever it is needed.
|
||||
|
||||
<tscreen><verb>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* The expose callback does the drawing of the line */
|
||||
int
|
||||
expose_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkGC *gc;
|
||||
|
||||
printf("expose...\n");
|
||||
|
||||
|
||||
/* The GC is the Graphics Context. Here it is borrowed from the widget */
|
||||
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
|
||||
|
||||
gdk_draw_line (widget->window, /* GDK Window of GtkDrawingArea widget */
|
||||
gc, /* Graphics Context */
|
||||
0, /* x1, left */
|
||||
0, /* y1, top */
|
||||
200, /* x2, right */
|
||||
200); /* y2, bottom */
|
||||
}
|
||||
|
||||
/* This quits GTK+ */
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *darea;
|
||||
int events;
|
||||
|
||||
/* This initializes both GTK+ and GDK */
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create a window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (destroy), NULL);
|
||||
|
||||
/* Create a drawing area widget. This widget actually is just a
|
||||
simple widget which provides us an GDK window to draw on and
|
||||
takes care of all the toolkit integration, like providing the
|
||||
ability to add it to the window with gtk_contianer_add() */
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), darea);
|
||||
|
||||
/* Set the width and height (arguments are in that order) */
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 200, 200);
|
||||
|
||||
/* Drawing in the expose event is important to keep the
|
||||
draw line always on the GDK window */
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose_event",
|
||||
GTK_SIGNAL_FUNC (expose_callback), NULL);
|
||||
|
||||
/* We get the events, then add in button press. If we did not
|
||||
do this, we would not be notified of button press events in
|
||||
the GtkDrawingArea widget */
|
||||
events = gtk_widget_get_events (darea);
|
||||
gtk_widget_set_events (darea, events | GDK_BUTTON_PRESS_MASK);
|
||||
|
||||
/* If we click on the darea, the application will exit */
|
||||
gtk_signal_connect_object (GTK_OBJECT (darea), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (window));
|
||||
|
||||
gtk_widget_show (darea);
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* The GTK+ main idle loop */
|
||||
gtk_main();
|
||||
|
||||
/* Cleanup of GDK is done automatically when the program exits. */
|
||||
return 0;
|
||||
}
|
||||
</verb></tscreen>
|
||||
|
||||
<sect>The Graphics Context
|
||||
<p>
|
||||
The Graphics Context, or GC, defines how things should be drawn,
|
||||
including color, font, fill, tile, stipple, clipping mask, line
|
||||
width, line style, and join style.
|
||||
|
||||
<sect1>Color
|
||||
<p>
|
||||
Changing color is done by changing the forground or background color
|
||||
of the GC.
|
||||
|
||||
<sect>Drawing Commands
|
||||
<sect>Event Handling
|
||||
<sect>Understanding and Using Visuals
|
||||
<sect>Creating and Using New Windows
|
||||
<sect>Pixmaps
|
||||
<sect>Images
|
||||
<sect>Fonts
|
||||
<sect>
|
||||
|
||||
<sect>About this Document
|
||||
<sect1>History
|
||||
<P>
|
||||
This document was originially written by Peter Mattis and entitled
|
||||
"The General Drawing Kit". It was meant as a reference guide.
|
||||
|
||||
This version of the document has been renamed and is meant as a general
|
||||
programming guide.
|
||||
|
||||
<sect1>Copying
|
||||
<p>
|
||||
Copyright (c) 1996 Peter Mattis
|
||||
<p>
|
||||
Copyright (c) 1998 Shawn T. Amundson
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Peter Mattis.
|
||||
|
||||
</article>
|
||||
@@ -1,177 +0,0 @@
|
||||
Overview:
|
||||
========
|
||||
|
||||
This file describes the way that autogeneration
|
||||
works within the GTK+ source code.
|
||||
|
||||
The following files in the gdk/ subdirectory
|
||||
are autogenerated:
|
||||
|
||||
gdkkeysyms.h
|
||||
gdkcursors.h
|
||||
|
||||
The following files in the gtk/ subdirectory
|
||||
are autogenerated:
|
||||
|
||||
gtk.defs
|
||||
Description of GTK+ types (and some functions) in a lisp-style
|
||||
format.
|
||||
gtktypebuiltins.h
|
||||
Header file including declarations for internal types
|
||||
gtktypebuiltins_vars.c
|
||||
Variables for type values for internal types.
|
||||
gtktypebuiltins_ids.c
|
||||
Arrays holding information about each internal type.
|
||||
gtktypebuiltins_evals.c
|
||||
Arrays holding mapping between enumeration values
|
||||
and strings.
|
||||
|
||||
gtkmarshal.c
|
||||
gtkmarshal.h
|
||||
Autogenerated signal marshallers
|
||||
|
||||
GDK
|
||||
===
|
||||
|
||||
gdkkeysyms.h and gdkcursors.h are generated from
|
||||
the corresponding header files
|
||||
|
||||
X11/cursorfont.h
|
||||
X11/keysymdef.h
|
||||
|
||||
by some simple sed scripts. These are not actually
|
||||
run automatically because we want all the keysyms
|
||||
even on systems with a limited set.
|
||||
So the Gdk rule to generate both files (X-derived-headers)
|
||||
only needs to be rerun for every new release of the X Window
|
||||
System.
|
||||
|
||||
GTK+ - type definitions
|
||||
=======================
|
||||
|
||||
The type definitions are generated from several sources:
|
||||
|
||||
gtk-boxed.defs - definitions for boxed types
|
||||
GTK+ header files
|
||||
GDK header files
|
||||
|
||||
The makeenums.pl script does a heuristic parse of
|
||||
the header files and extracts all enumerations declarations.
|
||||
It also recognizes a number of pseudo-comments in the
|
||||
header files:
|
||||
|
||||
Two of these apply to individual enumeration values:
|
||||
|
||||
/*< skip >*/
|
||||
|
||||
This enumeration value should be skipped.
|
||||
|
||||
/*< nick=NICK >*/
|
||||
|
||||
The nickname for this value should NICK instead of the
|
||||
normally guessed value. For instance:
|
||||
|
||||
typedef enum {
|
||||
GTK_TARGET_SAME_APP = 1 << 0, /*< nick=same-app >*/
|
||||
GTK_TARGET_SAME_WIDGET = 1 << 1 /*< nick=same-widget >*/
|
||||
} GtkTargetFlags;
|
||||
|
||||
makes the nicks "same-app" and "same-widget", instead of
|
||||
"app" and "widget" that would normally be used.
|
||||
|
||||
The other two apply to entire enumeration declarations.
|
||||
|
||||
/*< prefix=PREFIX >*/
|
||||
|
||||
Specifies the prefix to be removed from the enumeration
|
||||
values to generate nicknames.
|
||||
|
||||
/*< flags >*/
|
||||
|
||||
Specifies that this enumeration is used as a bitfield.
|
||||
(makenums.pl normally guesses this from the presence of values
|
||||
with << operators). For instance:
|
||||
|
||||
typedef enum /*< flags >*/
|
||||
{
|
||||
GDK_IM_PREEDIT_AREA = 0x0001,
|
||||
GDK_IM_PREEDIT_CALLBACKS = 0x0002,
|
||||
[ ... ]
|
||||
} GdkIMStyle;
|
||||
|
||||
makeenums.pl can be run into two modes:
|
||||
|
||||
1) Generate the gtktypebuiltins_eval.c file (this
|
||||
contains arrays holding the mapping of
|
||||
string <=> enumeration value)
|
||||
|
||||
2) Generate the enumeration portion of gtk.defs.
|
||||
|
||||
The enumearation portion is added to the boxed type
|
||||
declarations in gtk-boxed.defs to create gtk.defs.
|
||||
|
||||
The makeetypes.awk program takes the gtk.defs file, and
|
||||
from that generates various files depending on the
|
||||
third parameter passed to it:
|
||||
|
||||
macros: gtktypebuiltins.h
|
||||
variables: gtktypebuiltins_vars.c
|
||||
entries: gtktypebuiltins_ids.c
|
||||
|
||||
GTK+ - marshallers
|
||||
==================
|
||||
|
||||
The files gtkmarshal.c and gtkmarshal.h include declarations
|
||||
and definitions for the marshallers needed inside of
|
||||
GTK+. The marshallers to be generated are listed in
|
||||
the file gtkmashal.list, which is processed
|
||||
by genmarshal.pl.
|
||||
|
||||
The format of this file is a list of lines:
|
||||
|
||||
<retval-type>:<arg1-type>,<arg2-type>,<arg3-type>
|
||||
|
||||
e.g.:
|
||||
|
||||
BOOL:POINTER,STRING,STRING,POINTER
|
||||
|
||||
A marshaller is generated for each line in the file.
|
||||
The possible types are:
|
||||
|
||||
NONE
|
||||
BOOL
|
||||
CHAR
|
||||
INT
|
||||
UINT
|
||||
LONG
|
||||
ULONG
|
||||
FLOAT
|
||||
DOUBLE
|
||||
STRING
|
||||
ENUM
|
||||
FLAGS
|
||||
BOXED
|
||||
POINTER
|
||||
OBJECT
|
||||
FOREIGN (gpointer data, GtkDestroyNotify notify)
|
||||
C_CALLBACK (GtkFunction func, gpointer func_data)
|
||||
SIGNAL (GtkSignalFunc f, gpointer data)
|
||||
ARGS (gint n_args, GtkArg *args)
|
||||
CALLBACK (GtkCallBackMarshal marshall,
|
||||
gpointer data,
|
||||
GtkDestroyNotify Notify)
|
||||
|
||||
Some of these types map to multiple return values - these
|
||||
are marked above with the return types in parantheses.
|
||||
|
||||
NOTES
|
||||
=====
|
||||
|
||||
When autogenerating GTK+ files, the autogenerated
|
||||
files are often rebuild resulting in the same result.
|
||||
|
||||
To prevent unecessary rebuilds of the entire directory, some files
|
||||
that multiple other source files depend on are not actually written
|
||||
to directly. Instead, an intermediate file is written, which
|
||||
is then compared to the old file, and only if it is different
|
||||
is it copied into the final location.
|
||||
455
docs/glib.texi
Normal file
455
docs/glib.texi
Normal file
@@ -0,0 +1,455 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename glib.info
|
||||
@settitle GLIB
|
||||
@setchapternewpage odd
|
||||
|
||||
@set edition 1.0
|
||||
@set update-date 3 Feburary 1998
|
||||
@set update-month Feburary 1998
|
||||
@c %**end of header
|
||||
|
||||
@ifinfo
|
||||
This file documents GLIB, A library of useful routines for C programming
|
||||
|
||||
Copyright (C) 1998 Gregory A McLean
|
||||
|
||||
Permission is granted to make and distributed verbatim copies of this
|
||||
manual, provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
@ignore
|
||||
Permission is granted to process this file throught TeX and print the
|
||||
results, provided the printed document carries copying permission notice
|
||||
identical to this one except for the removal of this paragraph (this
|
||||
paragraph not being relevant to the printed manual).
|
||||
|
||||
@end ignore
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Gregory McLean.
|
||||
@end ifinfo
|
||||
|
||||
@titlepage
|
||||
@title GLIB, Useful routines for C programming
|
||||
@subtitle Version 1.0
|
||||
@subtitle @value{update-month}
|
||||
@author by Gregory McLean
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1998 Gregory McLean
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Gregory McLean.
|
||||
@end titlepage
|
||||
|
||||
@dircategory Library of useful routines for 'C' programing
|
||||
@direntry
|
||||
* GLIB: (glib). useful routines for 'C' programming
|
||||
@end direntry
|
||||
|
||||
@node Top, Copying, (dir), (dir)
|
||||
@top useful routines for 'C' programming
|
||||
@ifinfo
|
||||
This is edition @value{edition} of the GLIB documentation,
|
||||
@w{@value{update-date}}.
|
||||
@end ifinfo
|
||||
|
||||
@menu
|
||||
* Copying:: Your rights.
|
||||
* Overview:: What is GLIB?
|
||||
* Doubly linked lists:: Doubly linked lists
|
||||
* Signly linked lists:: Singly linked lists
|
||||
* List allocators:: List Allocators
|
||||
* Hash tables:: Hash tables
|
||||
* Caches:: Cache handling
|
||||
* Trees:: Tree handling
|
||||
* Memory:: Memory handling
|
||||
* Timers:: Timer functions
|
||||
* Output:: Output handling
|
||||
* Utilities:: Utilitiy functions
|
||||
* Errors:: Error handling
|
||||
* String Chunks:: String Chunks
|
||||
* Strings:: String handling
|
||||
* Resizable arrays:: Resizeable arrays
|
||||
* GScanner:: Flexible lexical scanner
|
||||
* Miscellany:: Other stuff
|
||||
* Function Index:: Index of functions
|
||||
* Concept Index:: Index of concepts
|
||||
@end menu
|
||||
|
||||
@node Copying, Overview, Top, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Copying
|
||||
|
||||
@node Overview, Doubly linked lists, Copying, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter What is GLIB
|
||||
|
||||
@node Doubly linked lists, Signly linked lists, Overview, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Doubly linked lists
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GList* g_list_alloc (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_list_free (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_list_free_1 (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_append (GList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_prepend (GList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_insert (GList *@var{list}, gpointer @var{data}, gint @var{position})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_insert_sorted (GList *@var{list}, gpointer @var{data}, GCompareFunc @var{func})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_concat (GList *@var{list1}, GList *@var{list2})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_remove (GList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_remove_link (GList *@var{list}, GList *@var{link})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_reverse (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_nth (GList *@var{list}, gint @var{n})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_find (GList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_last (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* g_list_first (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint g_list_length (GList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_list_foreach (GList *@var{list}, GFunc @var{func}, gpointer @var{user_data})
|
||||
@end deftypefun
|
||||
|
||||
@node Signly linked lists, List allocators, Doubly linked lists, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Signly linked lists
|
||||
|
||||
@subsection Functions
|
||||
@deftypefun GSList* g_slist_alloc (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_slist_free (GSList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_slist_free_1 (GSList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_append (GSList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_prepend (GSList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_insert (GSList *@var{list}, gpointer @var{data}, gint @var{position})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_insert_sorted (GSList *@var{list}, gpointer @var{data}, GCompareFunc @var{func})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_concat (GSList *@var{list1}, GSList *@var{list2})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_remove (GSList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_remove_link (GSList *@var{list}, GSList *@var{link})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_reverse (GSList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_nth (GSList *@var{list}, gint @var{n})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_find (GSList *@var{list}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GSList* g_slist_last (GSList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint g_slist_length (GSList *@var{list})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_slist_foreach (GSList *@var{list}, GFunc @var{func}, gpointer @var{user_data})
|
||||
@end deftypefun
|
||||
|
||||
@node List allocators, Hash tables, Signly linked lists, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter List allocators
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GListAllocator* g_list_allocator_new (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_list_allocator_free (GListAllocator *@var{allocator})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GListAllocator* g_slist_set_allocator (GListAllocator *@var{allocator})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GListAllocator* g_list_set_allocator (GListAllocator *@var{allocator})
|
||||
@end deftypefun
|
||||
|
||||
@node Hash tables, Caches, List allocators, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Hash tables
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GHashTable* g_hash_table_new (GHashFunc @var{hash_func}, GCompareFunc @var{key_compare_func})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_destroy (GHashTable *@var{hash_table})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_insert (GHashTable *@var{hash_table}, gpointer @var{key}, gpointer @var{value})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_remove (GHashTable *@var{hash_table}, gpointer @var{key})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_hash_table_lookup (GHashTable *@var{hash_table}, gpointer @var{key})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_freeze (GHashTable *@var{hash_table})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_thaw (GHashTable *@var{hash_table})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_hash_table_foreach (GHashTable *@var{hash_table}, GHFunc @var{func}, gpointer @var{user_data})
|
||||
@end deftypefun
|
||||
|
||||
@node Caches, Trees, Hash tables, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Cache handling
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GCache* g_cache_new (GCacheNewFunc @var{value_new_func}, GCacheDestroyFunc @var{value_destroy_func}, GCacheDupFunc @var{key_dup_func}, GCacheDestroyFunc @var{key_destroy_func}, GHashFunc @var{hash_key_func}, GHashFunc @var{hash_value_func}, GCompareFunc @var{key_compare_func})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_cache_destroy (GCache *@var{cache})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_cache_insert (GCache *@var{cache}, gpointer @var{key})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_cache_remove (GCache *@var{cache}, gpointer @var{key})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_cache_key_foreach (GCache *@var{cache}, GHFunc @var{func}, gpointer @var{user_data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_cache_value_foreach (GCache *@var{cache}, GHFunc @var{func}, gpointer @var{user_data})
|
||||
@end deftypefun
|
||||
|
||||
@node Trees, Memory, Caches, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Tree handling
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GTree* g_tree_new (GCompareFunc @var{key_compare_func})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_tree_destroy (GTree *@var{tree})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_tree_remove (GTree *@var{tree}, gpointer @var{key}, gpointer @var{value})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_tree_lookup (GTree *@var{tree}, gpointer @var{key})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_tree_traverse (GTree *@var{tree}, GTraverseFunc @var{traverse_func}, GTraverseType @var{traverse_type}, gpointer @var{data}
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_tree_search (GTree *@var{tree}, GSearchFunc @var{search_func}, gpointer @var{data})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint g_tree_height (GTree *@var{tree})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint g_tree_nnodes (GTree *@var{tree})
|
||||
@end deftypefun
|
||||
|
||||
@node Memory, Timers, Trees, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Memory handling
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun gpointer g_malloc (gulong @var{size})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_malloc0 (gulong @var{size})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_realloc (gpointer @var{mem}, gulong @var{size})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_profile (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_check (gpointer @var{mem})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GMemChunk* g_mem_chunk_new (gchar *@var{name}, gint @var{atom_size}, gulong @var{area_size}, gint @var{type})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_destroy (GMemChunk *@var{mem_chunk})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer g_mem_chunk_alloc (GMemChunk *@var{mem_chunk})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_free (GMemChunk *@var{mem_chunk}, gpointer @var{mem})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_clean (GMemChunk *@var{mem_chunk})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_reset (GMemChunk *@var{mem_chunk})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_print (GMemChunk *@var{mem_chunk})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_mem_chunk_info (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_blow_chunks (void)
|
||||
Not what you might be thinking, @code{g_blow_chunks()} simply compresses all
|
||||
the chunks. This operation consists of freeing every memory area that should
|
||||
be freed (but which we haven't gotten around to doing yet).
|
||||
@end deftypefun
|
||||
|
||||
@node Timers, Output, Memory, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Timer functions
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GTimer* g_timer_new (void)
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_timer_destroy (GTimer *@var{timer})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_timer_start (GTimer *@var{timer})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_timer_stop (GTimer *@var{timer})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_timer_reset (GTimer *@var{timer})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gdouble g_timer_elapsed (GTimer *@var{timer}, gulong *@var{microseconds})
|
||||
@end deftypefun
|
||||
|
||||
@node Output, Utilities, Timers, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Output functions
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun void g_error (gchar *@var{format}, @dots{})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_warning (gchar *@var{format}, @dots{})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_message (gchar *@var{format}, @dots{})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void g_print (gchar *@var{format}, @dots{})
|
||||
@end deftypefun
|
||||
|
||||
@node Utilities, Errors, Output, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Utility functions
|
||||
|
||||
@node Errors, String Chunks, Utilities, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Error handling
|
||||
|
||||
@node String Chunks, Strings, Errors, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter String chunks
|
||||
|
||||
@node Strings, Resizable arrays, String Chunks, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter String handling
|
||||
|
||||
@node Resizable arrays, GScanner, Strings, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Resizable arrays
|
||||
|
||||
@node GScanner, Miscellany, Resizable arrays, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Flexible lexical scanner
|
||||
|
||||
@node Miscellany, Function Index, GScanner, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Other stuff
|
||||
|
||||
@node Function Index, Concept Index, Miscellany, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Function Index
|
||||
|
||||
@printindex fn
|
||||
|
||||
@node Concept Index, , Function Index, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Concept Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@summarycontents
|
||||
@contents
|
||||
@bye
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH GTK+ 1 "25 October 1998" Version @VERSION@
|
||||
.TH GTK+ 1 "11 May 1998" Version 1.0.2
|
||||
.SH NAME
|
||||
gtk-config - script to get information about the installed version of GTK+
|
||||
.SH SYNOPSIS
|
||||
@@ -40,7 +40,7 @@ and \-\-libs options. This option must be specified before any
|
||||
.BR gimp (1),
|
||||
.BR gimptool (1)
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 1998 Owen Taylor
|
||||
Copyright \(co 1995 Spencer Kimball and Peter Mattis
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
@@ -36,14 +36,6 @@ gtk-config takes the following flags:
|
||||
If PREFIX is specified, overrides the configured value of $exec_prefix.
|
||||
Otherwise, prints out the configured value of $exec_prefix
|
||||
|
||||
You may also add to the command line a list of additional
|
||||
libraries that gtk-config should supply the CFLAGS and LIBS
|
||||
for. The only currently supported library is 'gthread'.
|
||||
|
||||
As an example of this latter usage, you can get the
|
||||
appropriate cflags for a threaded program with:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
|
||||
Example of using gtk-config
|
||||
|
||||
717
docs/gtk.texi
717
docs/gtk.texi
@@ -1,6 +1,5 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c Copyright (C) 1996 by Peter Mattis. All rights reserved.
|
||||
@c Portions Copyright (C) 1998 Marius Vollmer
|
||||
@c
|
||||
@c %**start of header
|
||||
@setfilename gtk.info
|
||||
@@ -10,8 +9,8 @@
|
||||
@c %**end of header
|
||||
|
||||
@set edition 1.0
|
||||
@set update-date 23 August 1998
|
||||
@set update-month August 1998
|
||||
@set update-date 29 January 1998
|
||||
@set update-month January 1998
|
||||
|
||||
@ifinfo
|
||||
This file documents GTK, the GIMP Toolkit
|
||||
@@ -45,7 +44,7 @@ approved by Peter Mattis.
|
||||
@title The GIMP Toolkit
|
||||
@subtitle Version @value{edition}
|
||||
@subtitle @value{update-month}
|
||||
@author by Peter Mattis and the GTK+ team
|
||||
@author by Peter Mattis
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
@@ -79,13 +78,12 @@ approved by Peter Mattis.
|
||||
This is edition @value{edition} of the GTK documentation,
|
||||
@w{@value{update-date}}.
|
||||
@end ifinfo
|
||||
@c FIXME: Do an introduction to the GTK?
|
||||
@c FIXME: Do a introduction to the GTK?
|
||||
|
||||
@menu
|
||||
* Copying:: Your rights.
|
||||
* Overview:: What is GTK?
|
||||
* Types::
|
||||
* Objects::
|
||||
* Objects:: Object overview.
|
||||
* Signals:: Signals overview.
|
||||
* Widgets:: Widget overview.
|
||||
* Other Objects:: Utility objects.
|
||||
@@ -122,17 +120,17 @@ copies of GTK, you must give the recipients all the rights that you
|
||||
have. You must make sure that they, too, receive or can get the source
|
||||
code. And you must tell them their rights.
|
||||
|
||||
Also, for our own protection, we must make certain that everyone finds
|
||||
Also, for my own protection, we must make certain that everyone finds
|
||||
out that there is no warranty for GTK. If GTK is modified by someone
|
||||
else and passed on, we want their recipients to know that what they have
|
||||
is not what we distributed, so that any problems introduced by others
|
||||
will no reflect on our reputation.
|
||||
|
||||
The precise conditions of the licenses for GTK are found in the General
|
||||
Public Licenses that accompany it.
|
||||
Public Licenses that accompanies it.
|
||||
|
||||
|
||||
@node Overview, Types, Copying, Top
|
||||
@node Overview, Objects, Copying, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter What is GTK?
|
||||
@cindex Overview
|
||||
@@ -153,261 +151,26 @@ label. However, the child widget can also be a pixmap, image or any
|
||||
combination possible the programmer desires. This flexibility is adhered
|
||||
to throughout the library.
|
||||
|
||||
@c I think the next paragraph takes unproportionally much space for
|
||||
@c the thing it wants to say (compared to the rest of this overview).
|
||||
@c So Somebody please extend this overview with more generally interesting
|
||||
@c stuff. - mvo
|
||||
|
||||
To make life easier for you, GTK presents this flexibility in a uniform
|
||||
framework. Specifically, it implements its own support for object
|
||||
oriented programming that is well adapted to the purposes of a user
|
||||
interface toolkit and it aims at providing a reasonable sane and
|
||||
disciplined programming interface. This uniformity and discipline is
|
||||
intended to make it easy and reliable to access GTK from languages other
|
||||
than C. Especially more dynamic languages like Perl, Python or Scheme
|
||||
will find amble support, and in fact, bindings to these languages
|
||||
already exist.
|
||||
|
||||
@node Types, Objects, Overview, Top
|
||||
@node Objects, Signals, Overview, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Types
|
||||
@cindex type
|
||||
@cindex type system
|
||||
@cindex class
|
||||
@chapter Object Overview
|
||||
@cindex Objects
|
||||
|
||||
@flushright
|
||||
Other kid's games are all such a bore!
|
||||
They've gotta have rules and they gotta keep score!
|
||||
@*
|
||||
-- Calvin about CalvinBall(tm)
|
||||
@end flushright
|
||||
GTK implements a semi-simple class mechanism and an associated class
|
||||
hierarchy for widgets and several other useful objects. The GtkObject
|
||||
type is the root of the class hierarchy. It provides a few items needed
|
||||
by all classes, the foundation for the signal (@pxref{Signals})
|
||||
mechanism and the ``destroy'' method.
|
||||
|
||||
GTK implements a semi-simple type system with an associated class
|
||||
mechanism for widgets and several other useful objects. This type
|
||||
system is intended to be general enough to allow both a smooth binding
|
||||
of dynamically typed languages to Gtk, as well as to serve for a
|
||||
rigorous and formalistic definition of the larger part of the Gtk API.
|
||||
The class hierarchy is defined by a type hierarchy. This hierarchy
|
||||
allows queries to be made in regards to a type. The basic query that can
|
||||
be performed is asking whether a given type has an ``is a'' relation
|
||||
with another type. For instance, it is common to ask whether a general
|
||||
widget pointer is a type of specific widget so that runtime sanity
|
||||
checks can be made.
|
||||
|
||||
@c The GtkObject
|
||||
@c type is the root of the class hierarchy. It provides a few items needed
|
||||
@c by all classes, the foundation for the signal (@pxref{Signals})
|
||||
@c mechanism and the ``destroy'' method.
|
||||
|
||||
The classes for the individual widgets are by far the most important
|
||||
part of this type system, but before we get to them, we describe the
|
||||
basics of the type system itself. This is mostly of interest for widget
|
||||
writers and language binders, so you might want to skip ahead to the
|
||||
next chapter, which talks about the object oriented stuff.
|
||||
|
||||
@menu
|
||||
* Type introduction::
|
||||
* Basics::
|
||||
* Simple types::
|
||||
* Enumerations and flags::
|
||||
* Strings::
|
||||
* Boxed types::
|
||||
* Callbacks::
|
||||
* Composite types::
|
||||
@end menu
|
||||
|
||||
@node Type introduction, Basics, Types, Types
|
||||
@section Introduction to the Type System
|
||||
|
||||
Gtk defines its own system of types, much like a computer language
|
||||
defines what types it supports. Of course, the Gtk type system is build
|
||||
on top of the types that C provides, so it includes members like
|
||||
@samp{int}, @samp{long} and @samp{float}. But, compared to C, it allows
|
||||
only few carefully selected types and specifies a lot of restrictions on
|
||||
the way you can use values of these types. For example, there is no
|
||||
general facility for specifying @emph{pointer to X}. Instead, we take a
|
||||
more higher level approach and define such things as @samp{string},
|
||||
which is just like a @code{char*} but with additional rules about how to
|
||||
manage the memory that it points to.
|
||||
|
||||
The type system has two purposes: to define a formal system with which
|
||||
to describe the various exported features of Gtk; and to implement this
|
||||
system at run-time so that we get sound and flexible @dfn{dynamic} types
|
||||
for the dynamic languages that want to interface with Gtk.
|
||||
|
||||
Let me restate this with different words, because I think it is
|
||||
important to understand this idea. We will see in a moment that the
|
||||
type system is indeed well defined and all this detail is implemented
|
||||
with functions and data structures in Gtk. For example, every type (and
|
||||
there can be any number of them) can be represented with a unique
|
||||
integer and Gtk has support for the necessary bookkeeping for this.
|
||||
Every type also has a name and there are functions for converting
|
||||
between the name of a type and its unique number. Maybe more useful,
|
||||
there is a big discriminated union that can be used to pass around a
|
||||
value of any representable type, together with its precise type.
|
||||
|
||||
This is the run-time or dynamic side of the type system. Mostly, you do
|
||||
not need to use it when you don't want to. The compile-time or static
|
||||
side of the type system can is used to statically define the programming
|
||||
interface of Gtk. For example, suppose there is function @code{gtk_foo}
|
||||
in the Gtk API that has a prototype
|
||||
|
||||
@example
|
||||
char *gtk_foo (char *);
|
||||
@end example
|
||||
|
||||
This looks like it does something with strings. But what does it do
|
||||
with the memory of the string that has been passed in, and what are we
|
||||
supposed or allowed to do with the memory that the returned pointer
|
||||
points to? The more restricted type @samp{string} from the Gtk type
|
||||
system can be used to be more precise. In fact, the definition of
|
||||
@samp{string} below includes the rule that when a @samp{string} is
|
||||
passed to a function, that function is not allowed to retain a pointer
|
||||
into the string beyond the life time of that function call. So we are
|
||||
safe to deallocate it or override it when the function has returned.
|
||||
Likewise, the definition specifies that the memory of a @samp{string}
|
||||
that is returned from a function becomes the sole property of the
|
||||
calling function. The calling function is responsible for deallocating
|
||||
it eventually and it can be sure that nobody else scribbles in it. When
|
||||
@samp{gtk_foo} really obeys these rules, we can say that it takes one
|
||||
argument, which is a @samp{string}, and it returns a @samp{string}.
|
||||
|
||||
Now we can understand why it makes sense to have a more restrictive type
|
||||
system than that of C. With it, it is possible to be more precise and
|
||||
we actually have a framework where we can be sure that as long as we
|
||||
stay inside this framework we are not gratuitously causing trouble for
|
||||
languages that are more disciplined than C. Of course, you are not
|
||||
restricted to making all your interfaces expressible within the
|
||||
framework. There are valid reasons for breaking it, for performance or
|
||||
simply for convenience. But please try to provide all the functionality
|
||||
of your module in such a way that it can be described with this type
|
||||
system and treat the non-conforming functions as additional goodies that
|
||||
are nice to have but not essential. The reward is an instant
|
||||
accessibility of your code from a huge number of scripting and extension
|
||||
languages such as Perl, Python, and Guile.
|
||||
|
||||
These formal specifications of the Gtk interface are contained in
|
||||
special declarations in the header files of Gtk. They are ignored by
|
||||
the C compiler, but can be used by other language processors. For extra
|
||||
convenience, these declarations are also available in a more condensed
|
||||
form that is easier to parse. Tools for generating bindings of Gtk to
|
||||
other languages can read these declarations and---because all the
|
||||
important details are defined---automatically generate the bulk of the
|
||||
needed glue code. It is also possible to feed these declarations into a
|
||||
running application (an interface builder, say) and thus make it aware of
|
||||
new widgets and functions without recompiling anything.
|
||||
|
||||
The run-time side of the type system is also somewhat introspective.
|
||||
This means that you can query Gtk about all the members of an
|
||||
enumeration for example. Gtk provides tools that help you provide this
|
||||
introspection for your definitions also.
|
||||
|
||||
Types are not enough to completely specify an interface, so GTK also has
|
||||
@dfn{modes}. A mode specifies what happens to a value when it crosses a
|
||||
module boundary; it can be @samp{in}, @samp{out}, or @samp{inout}. Most
|
||||
fundamental types (and their derived types) support only mode @samp{in}.
|
||||
The modes @samp{out} and @samp{inout} can only be used with the
|
||||
composite types: lists and vectors. When argument of these types are
|
||||
marked as @samp{out} or @samp{inout} it means that the called module is
|
||||
allowed to change the contents of the composite value and that these
|
||||
changes need to be propagated back to the originator of the value. Mode
|
||||
@samp{out} means that the argument has no meaningful value at the
|
||||
beginning and should not be read. Mode @samp{in} specifies that the
|
||||
called module is not allowed to change the value in any way.
|
||||
|
||||
The type system allows for an unbounded number of types. Every widget
|
||||
is a type for example and you can add new widget types at any time
|
||||
without confusing the run-time implementation of the type system.
|
||||
Nevertheless, all types are derived from a certain @dfn{fundamental}
|
||||
type, and there are only a small and finite number of fundamental types.
|
||||
We only specify rules for the fundamental types and all other types
|
||||
inherit these rules from their fundamental type. For example,
|
||||
@samp{int} is a fundamental type, as is @samp{GtkObject}. All widgets
|
||||
derive from @samp{GtkObject} and so the rules for @samp{GtkObject} apply
|
||||
to all widgets as well.
|
||||
|
||||
This derivation defines a type hierarchy, but this hierarchy is not
|
||||
completely general. You can't derive from @samp{int} for example, and
|
||||
you can only have one level of derivation from @samp{enum}. The
|
||||
fundamental type @samp{GtkObject}, however, is the basis for the large
|
||||
and deep hierarchy of widget types.
|
||||
|
||||
The individual fundamental types are defined and explained in the
|
||||
following sections. Here is a complete list of them:
|
||||
|
||||
@table @samp
|
||||
@item none
|
||||
The not-a-value type, similar to @samp{void}.
|
||||
@item char
|
||||
A character. Internationalization issues are still undecided.
|
||||
@item bool
|
||||
True or false.
|
||||
@item byte, ubyte, int, uint, long, ulong, float, double
|
||||
The usual assortment of scalar types.
|
||||
@item string
|
||||
A string. Internationalization issues are still undecided.
|
||||
@item enum, flags
|
||||
Enumerations with a fixed set of literals. Either used to express a
|
||||
single choice from this set or to individually turn on and off several
|
||||
flags.
|
||||
@item boxed
|
||||
A pointer to an opaque structure that can be copied and destroyed.
|
||||
@item callback
|
||||
A pointer to a function with enough extra information so that it can
|
||||
also be used for functions written in languages completely different
|
||||
from C.
|
||||
@item GtkObject
|
||||
A pointer to a GtkObject or derived type. The fun starts here.
|
||||
@item args, slist, dlist, cvec, tvec
|
||||
An assortment of composite types like linked lists and counted or
|
||||
zero-terminated arrays.
|
||||
@item pointer, signal, c_callback
|
||||
Obsolete types.
|
||||
@end table
|
||||
|
||||
@node Basics, Simple types, Type introduction, Types
|
||||
@section Basic Concepts
|
||||
|
||||
The basis for the type system are the fundamental types. At run-time,
|
||||
they are represented by members of the @code{GtkFundamentalType}
|
||||
enumeration. For the static declarations, they are identified with a
|
||||
unique name.
|
||||
|
||||
@deftp {Enumeration} GtkFundamentalType
|
||||
This enumeration contains a member for each defined fundamental type.
|
||||
Most members are listed along with the description of their semantics,
|
||||
but one is listed here:
|
||||
|
||||
@table @code
|
||||
@item GTK_TYPE_INVALID
|
||||
No valid type is derived from this. Use @code{GTK_TYPE_INVALID} to
|
||||
express exceptional situations. This member does not really correspond
|
||||
to a fundamental type and thus there is no name for it.
|
||||
@end table
|
||||
@end deftp
|
||||
|
||||
@deftp {Data type} GtkType
|
||||
The type @code{GtkType} holds the run-time representation of a type. It
|
||||
is an integer of a certain size. The follwing macros are defined to
|
||||
access the basic properties of a @code{GtkType}:
|
||||
|
||||
@deftypefn {Macro} {unsigned int} GTK_TYPE_SEQNO (GtkType type)
|
||||
Returns the sequence number of @var{type}. The sequence numbers are
|
||||
guaranteed to be dense, i.e., you can use them to index a table and the
|
||||
table need not be much larger than the number of different GtkTypes that
|
||||
you might encounter.
|
||||
@end deftypefn
|
||||
|
||||
@deftypefn {Macro} GtkFundamentalType GTK_FUNDAMENTAL_TYPE (GtkType type)
|
||||
Returns the fundamental type of @var{type}.
|
||||
@end deftypefn
|
||||
|
||||
Both macros simply access different bit-fields of a @code{GtkType}, so
|
||||
they are very efficient.
|
||||
@end deftp
|
||||
|
||||
New types are registered with the @code{gtk_type_unique} function. Any
|
||||
kind oftype can be registered with @code{gtk_type_unique} but there are
|
||||
convenience functions for most fundamental types. Each fundamental type
|
||||
has its own interpretation of the rules below and these convenience
|
||||
functions should be used to automatically get the type registration
|
||||
right. So, don't be put off by the apparent complexity of the interface
|
||||
to @code{gtk_type_unique}. You will be using it only for new widgets,
|
||||
and there the rules are simple.
|
||||
@section Type utility functions
|
||||
|
||||
The @code{GtkTypeInfo} structure is used to communicate information to
|
||||
@code{gtk_type_unique} as opposed to passing in large numbers of
|
||||
@@ -423,257 +186,123 @@ struct _GtkTypeInfo
|
||||
guint class_size;
|
||||
GtkClassInitFunc class_init_func;
|
||||
GtkObjectInitFunc object_init_func;
|
||||
gpointer reserved_1;
|
||||
gpointer reserved_2;
|
||||
GtkClassInitFunc base_class_init_func;
|
||||
GtkArgSetFunc arg_set_func;
|
||||
GtkArgGetFunc arg_get_func;
|
||||
@}
|
||||
@end example
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
The @code{type_name} field refers to the name of the type. This is the
|
||||
same name that is used in the static definitions. It is convention for
|
||||
the type name to be closely related to the name of the underlying C
|
||||
type. For example, the type name of the @code{GtkObject} structure is
|
||||
``GtkObject'', and the name of the @code{GtkWindowType} enumeration is
|
||||
``GtkWindowType''. Note that the C type corresponding to ``GtkObject''
|
||||
is really a pointer to a @code{GtkObject} struct, but the name has no
|
||||
``*'' in it.
|
||||
The @code{type_name} field refers to the name of the type. It is
|
||||
convention for the type name to be the same as the C structure type. For
|
||||
example, the type name of the @code{GtkObject} structure is
|
||||
``GtkObject''.
|
||||
|
||||
@item
|
||||
The @code{object_size} field refers to the size in bytes of the C
|
||||
structure for types that have such a structure. The easiest (and
|
||||
portable) means of computing this size is by using the C @code{sizeof}
|
||||
operator. For instance, the sizeof of the @code{GtkObject} structure is
|
||||
computed by doing @code{sizeof (GtkObject)}. When the type has no
|
||||
associated structure or when you do not want to support the
|
||||
@code{gtk_type_new} function for the new type, set @code{object_size} to
|
||||
0. Only types derived from GTK_TYPE_OBJECT can be handled by
|
||||
@code{gtk_type_new}, anyway.
|
||||
structure. The easiest (and portable) means of computing this size is by
|
||||
using the C @code{sizeof} operator. For instance, the sizeof of the
|
||||
@code{GtkObject} structure is computed by doing @code{sizeof
|
||||
(GtkObject)}.
|
||||
|
||||
@item
|
||||
The @code{class_size} field refers to the size in bytes of the C
|
||||
structure for the class. Again, the @code{sizeof} operator should be
|
||||
used to compute this value. If you don't want to have a class structure
|
||||
for this type, set the field to 0. @code{gtk_type_class} will then
|
||||
always return @code{NULL}.
|
||||
structure for the class. Again, the @code{sizeof} operator should be
|
||||
used to compute this value.
|
||||
|
||||
@item
|
||||
The @code{class_init_func} and @code{base_class_init_func} fields are
|
||||
callbacks which are used by the type mechanism to initialize class
|
||||
specific fields. The single argument these functions take is a pointer to
|
||||
a class structure. When you do not need one or both of them, set the
|
||||
corresponding field to @code{NULL}. The @code{class_init_func} will be
|
||||
called at most once, right after the class structure of size
|
||||
@code{class_size} has been allocated. The interaction between
|
||||
@code{class_init_func} and @code{base_class_init_func} is only really
|
||||
useful for the full-fledged object system. It is described there
|
||||
@pxref{Objects}.
|
||||
The @code{class_init_func} field is a callback which is used by the type
|
||||
mechanism to initialize class specific fields. The single argument this
|
||||
function takes is a pointer to a class structure.
|
||||
|
||||
@item
|
||||
The @code{object_init_func} field is a callback which is used by the
|
||||
type mechanism to initialize object specific fields for structures that
|
||||
have been allocated via @code{gtk_type_new}. The single argument this
|
||||
functions takes is a pointer to an object structure. If you do not want
|
||||
any special object initialization to take place, set this to
|
||||
@code{NULL}. All object initialization functions for all types that are
|
||||
part of the inheritance chain are called, starting with the most basic
|
||||
type.
|
||||
type mechanism to initialize object specific fields. The single argument
|
||||
this functions takes is a pointer to an object structure.
|
||||
|
||||
@c FIXME!! Document the arg_set_func and arg_get_func..
|
||||
|
||||
@end itemize
|
||||
|
||||
@deftypefun guint gtk_type_unique (GtkType @var{parent_type}, GtkTypeInfo *@var{type_info})
|
||||
The @var{parent_type} is simply the new types parent type. If
|
||||
@var{parent_type} is GTK_TYPE_INVALID, then the new type is a new
|
||||
fundamental type. You should @b{never} register new fundamental types.
|
||||
@var{type_info} is a pointer to a structure which contains necessary
|
||||
information for construction of the new type.
|
||||
|
||||
You can only register a specific name once.
|
||||
@deftypefun guint gtk_type_unique (guint @var{parent_type}, GtkTypeInfo *@var{type_info})
|
||||
The @var{parent_type} is simply the value of the new types parent
|
||||
type. If @var{parent_type} is 0, then the new type is the root of the
|
||||
type hierarchy. @var{type_info} is a pointer to a structure which
|
||||
contains necessary information for construction of the new
|
||||
type. Specifically, the @code{type_name}, @code{object_size} and
|
||||
@code{class_size} fields are required. The @code{class_init_func},
|
||||
@code{object_init_func} and @code{value_init_func} fields may be NULL.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gchar* gtk_type_name (GtkType @var{type})
|
||||
@deftypefun gchar* gtk_type_name (guint @var{type})
|
||||
The returned string is the name of @var{type} as specified to
|
||||
@code{gtk_type_unique}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GtkType gtk_type_from_name (guchar *@var{name})
|
||||
@deftypefun guint gtk_type_from_name (guchar *@var{name})
|
||||
Return the type associated with @var{name}. If there is no type
|
||||
associated with @var{name}, then GTK_TYPE_INVALID will be returned.
|
||||
associated with @var{name}, then 0 will be returned.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GtkType gtk_type_parent (GtkType @var{type})
|
||||
Returns the parent type of @var{type} or GTK_TYPE_INVALID if @var{type}
|
||||
is a fundamental type.
|
||||
@deftypefun guint gtk_type_parent (guint @var{type})
|
||||
Returns the parent type of @var{type} or 0 if @var{type} is the root of
|
||||
the type hierarchy.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer gtk_type_class (GtkType @var{type})
|
||||
@deftypefun gpointer gtk_type_class (guint @var{type})
|
||||
Returns the initialized class structure for @var{type}. The class
|
||||
structure is actually created and initialized the first time it is
|
||||
needed. Refer to @pxref{Objects} for details on how this initialization works for GTK_TYPE_OBJECT derived types.
|
||||
|
||||
@c If creation and initialization occurs, the @code{class_size}
|
||||
@c field of the @code{GtkTypeInfo} structure used to initialize this type
|
||||
@c is used to determine how large the class structure is. The
|
||||
@c @code{class_init_func} field from the @code{GtkTypeInfo} structure is
|
||||
@c called for all the members in the types ancestry, including the
|
||||
@c type. The order of this invocation proceeds from the root on down. For
|
||||
@c example, the @code{GtkWidgetClass} is first initialized as an
|
||||
@c @code{GtkObjectClass} by the object class initialization routine and
|
||||
@c then by the widget class initialization routine. This allows the widget
|
||||
@c class initialization routine to override values set by the object class
|
||||
@c initialization routine.
|
||||
|
||||
The returned structure is shared by all objects of @var{type} and, as
|
||||
such, should not be modified.
|
||||
needed. If creation and initialization occurs, the @code{class_size}
|
||||
field of the @code{GtkTypeInfo} structure used to initialize this type
|
||||
is used to determine how large the class structure is. The
|
||||
@code{class_init_func} field from the @code{GtkTypeInfo} structure is
|
||||
called for all the members in the types ancestry, including the
|
||||
type. The order of this invocation proceeds from the root on down. For
|
||||
example, the @code{GtkWidgetClass} is first initialized as an
|
||||
@code{GtkObjectClass} by the object class initialization routine and
|
||||
then by the widget class initialization routine. This allows the widget
|
||||
class initialization routine to override values set by the object class
|
||||
initialization routine. The returned structure is shared by all objects
|
||||
of @var{type} and, as such, should not be modified.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gpointer gtk_type_new (GtkType @var{type})
|
||||
Returns a new instance of an @var{type} object. This works only for GTK_TYPE_OBJECT derived types. Please see @pxref{Objects}.
|
||||
@c The @code{object_size}
|
||||
@c and @code{object_init_func} fields of the @code{GtkTypeInfo} structure
|
||||
@c are used to determine the objects allocated size and the object specific
|
||||
@c initialization routine. Similarly to the class initialization, all the
|
||||
@c object initialization routines from the root on down to the particular
|
||||
@c type being created are invoked.
|
||||
@deftypefun gpointer gtk_type_new (guint @var{type})
|
||||
Returns a new instance of an @var{type} object. The object structure is
|
||||
created and initialized similarly to the class structure (as described
|
||||
above). The @code{object_size} and @code{object_init_func} fields of the
|
||||
@code{GtkTypeInfo} structure are used to determine the objects allocated
|
||||
size and the object specific initialization routine. Similarly to the
|
||||
class initialization, all the object initialization routines from the
|
||||
root on down to the particular type being created are invoked.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_type_describe_heritage (GtkType @var{type})
|
||||
@deftypefun void gtk_type_describe_heritage (guint @var{type})
|
||||
Prints the type heritage for @var{type}. The heritage for a type
|
||||
includes the type and all its parent types up the type tree.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_type_describe_tree (GtkType @var{type}, gboolean @var{show_size})
|
||||
@deftypefun void gtk_type_describe_tree (guint @var{type}, gint @var{show_size})
|
||||
Prints the type tree which starts at @var{type}. @var{show_size} is a
|
||||
boolean which determines whether type sizes are printed.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gboolean gtk_type_is_a (GtkType @var{type}, GtkType @var{is_a_type})
|
||||
@deftypefun gint gtk_type_is_a (guint @var{type}, guint @var{is_a_type})
|
||||
A predicate function which determines whether the relation @var{type}
|
||||
is_a @var{is_a_type} is true.
|
||||
@end deftypefun
|
||||
|
||||
@c @deftypefun void gtk_type_get_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
|
||||
@c @end deftypefun
|
||||
|
||||
@c @deftypefun void gtk_type_set_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
|
||||
@c @end deftypefun
|
||||
|
||||
Values of all types can be handled uniformly by storing them into a
|
||||
@code{GtkArg} structure. The @code{GtkArg} has the following fields:
|
||||
|
||||
@table @code
|
||||
@item gchar *name
|
||||
This can be used to give the value represented by this @code{GtkArg}
|
||||
structure a name. It is not used much.
|
||||
|
||||
@item GtkType type
|
||||
The type of this value.
|
||||
|
||||
@item union d
|
||||
A big union that has (at least conceptually) one member for each
|
||||
fundamental type. You should not access these members directly.
|
||||
Rather, use the @code{GTK_VALUE_*} macros. There is one macro for each
|
||||
fundamental type, and its name is derived from the name of the
|
||||
GtkFundamentalType enumeration members simply by replacing ``Gtk_TYPE''
|
||||
with ``GTK_VALUE''. All @code{GTK_VALUE_*} macros take a @code{GtkArg}
|
||||
structure as their only parameter (@emph{not} a pointer) and evaluate to
|
||||
a lvalue.
|
||||
@end table
|
||||
|
||||
For example, the accessor for the fundamental type GTK_TYPE_INT is
|
||||
called GTK_VALUE_INT and you could use it like this:
|
||||
|
||||
@example
|
||||
GtkArg value;
|
||||
|
||||
value.name = NULL;
|
||||
value.type = GTK_TYPE_INT;
|
||||
GTK_VALUE_INT(value) = 7;
|
||||
@end example
|
||||
|
||||
@node Simple types, Enumerations and flags, Basics, Types
|
||||
@section Simple Types
|
||||
|
||||
The Gtk type system has a full set of the usual simple types: integers,
|
||||
floating point numbers, but also boolean and character. You can not
|
||||
derive new types from these.
|
||||
|
||||
@multitable {GTK_TYPE_POINTER} {"gpointer"} {xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
|
||||
@item Enum @tab Name @tab Description
|
||||
@item GTK_TYPE_NONE @tab "void"
|
||||
@tab A type without value.
|
||||
@item GTK_TYPE_CHAR @tab "char"
|
||||
@tab A 8-bit unsigned number representing a character. Numbers
|
||||
between 0 and 127 are ASCII, the rest is undefined.
|
||||
@item GTK_TYPE_BOOL @tab "gboolean"
|
||||
@tab The boolean type. It is some small integer where the number 0
|
||||
represents false and 1 is true. No other values are allowed.
|
||||
@item GTK_TYPE_INT @tab "gint"
|
||||
@tab A signed integer with at least 32 bits.
|
||||
@item GTK_TYPE_UINT @tab "guint"
|
||||
@tab A unsigned integer with at least 32 bits.
|
||||
@item GTK_TYPE_LONG @tab "glong"
|
||||
@tab A signed integer with at least 32 bits.
|
||||
@item GTK_TYPE_ULONG @tab "gulong"
|
||||
@tab A unsigned integer with at least 32 bits. This is large enough to
|
||||
hold a coerced pointer.
|
||||
@item GTK_TYPE_FLOAT @tab "gfloat"
|
||||
@tab A single precision floating point number.
|
||||
@item GTK_TYPE_DOUBLE @tab "gfloat"
|
||||
@tab A souble precision floating point number.
|
||||
@item GTK_TYPE_POINTER @tab "gpointer"
|
||||
@tab A untyped pointer. Do not use this if you can avoid it.
|
||||
@end multitable
|
||||
|
||||
The values of these types are all represented `directly' with the C
|
||||
types that are indicated in the `name' column above. @pxref{Boxed
|
||||
types} for a discussion of this.
|
||||
|
||||
@node Enumerations and flags, Strings, Simple types, Types
|
||||
@section Enumerations and Flags
|
||||
|
||||
@node Strings, Boxed types, Enumerations and flags, Types
|
||||
@section Strings
|
||||
|
||||
@node Boxed types, Callbacks, Strings, Types
|
||||
@section Boxed Types
|
||||
|
||||
@node Callbacks, Composite types, Boxed types, Types
|
||||
@section Callbacks
|
||||
|
||||
@node Composite types, , Callbacks, Types
|
||||
@section Composite Types
|
||||
|
||||
@node Objects, Signals, Types, Top
|
||||
@chapter Objects
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@deftypefun void gtk_type_get_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_type_set_arg (GtkObject *@var{object}, GtkType @var{type}, GtkArg *@var{arg}, guint @var{arg_id})
|
||||
@end deftypefun
|
||||
|
||||
@section Object functions
|
||||
|
||||
The GtkObject type is the root of the type hierarchy used by GTK. It
|
||||
provides a minimal set of fields used to implement the actual object,
|
||||
class and signal mechanisms, as well as several utility routines which
|
||||
make dealing with objects easier.
|
||||
provides a minimal set of fields used to implement the actual
|
||||
object, class and signal mechanisms, as well as several utility routines
|
||||
which make dealing with objects easier.
|
||||
|
||||
For the adventurous, see @ref{Object Implementation}.
|
||||
|
||||
@@ -1109,7 +738,7 @@ opaque.
|
||||
All widget creation routines in GTK return pointers to GtkWidget
|
||||
structures. In reality, all widget creation routines create structures
|
||||
that can be viewed as equivalent to the GtkWidget structure, but often
|
||||
have contain additional information. @xref{Object Implementation}.
|
||||
have contain additional information. @xref{Object Implementation}
|
||||
|
||||
The widgets available for use are implemented in a hierarchy. Several
|
||||
widgets exist solely as common bases for more specific widgets. For
|
||||
@@ -1122,37 +751,36 @@ The available widgets (in alphabetical order):
|
||||
@menu
|
||||
* GtkAlignment:: The alignment widget.
|
||||
* GtkArrow:: The arrow widget.
|
||||
* GtkAspectFrame:: The aspect frame widget.
|
||||
* GtkAspectFrame:: The aspect frame widget.
|
||||
* GtkBin:: The bin widget.
|
||||
* GtkBox:: The box widget.
|
||||
* GtkButtonBox:: The button box widget.
|
||||
* GtkButtonBox:: The button box widget.
|
||||
* GtkButton:: The button widget.
|
||||
* GtkCheckButton:: The check button widget.
|
||||
* GtkCheckMenuItem:: The check menu item widget.
|
||||
* GtkCList:: The compound list widget.
|
||||
* GtkColorSelection:: The color selector widget.
|
||||
* GtkCombo:: The combo box widget.
|
||||
* GtkCList:: The compound list widget.
|
||||
* GtkColorSelection:: The color selector widget.
|
||||
* GtkCombo:: The combo box widget.
|
||||
* GtkContainer:: The container widget.
|
||||
* GtkCTree:: The multi-column tree widget.
|
||||
* GtkCurve:: The curve widget.
|
||||
* GtkGammaCurve:: The gamma curve widget.
|
||||
* GtkCurve:: The curve widget.
|
||||
* GtkGammaCurve:: The gamma curve widget.
|
||||
* GtkDialog:: The dialog widget.
|
||||
* GtkDrawingArea:: The drawing area widget.
|
||||
* GtkEntry:: The entry widget.
|
||||
* GtkEventBox:: The event box widget.
|
||||
* GtkEventBox:: The event box widget.
|
||||
* GtkFileSelection:: The file selection dialog widget.
|
||||
* GtkFixed:: The fixed widget.
|
||||
* GtkFixed:: The fixed widget.
|
||||
* GtkFrame:: The frame widget.
|
||||
* GtkGamma:: The gamma widget.
|
||||
* GtkGamma:: The gamma widget.
|
||||
* GtkHBox:: The horizontal box widget.
|
||||
* GtkHButtonBox:: The horizontal button box widget.
|
||||
* GtkHPaned:: The horizontal paned widget.
|
||||
* GtkHButtonBox:: The horizontal button box widget.
|
||||
* GtkHPaned:: The horizontal paned widget.
|
||||
* GtkHRuler:: The horizontal ruler widget.
|
||||
* GtkHScale:: The horizontal scale widget.
|
||||
* GtkHScrollbar:: The horizontal scrollbar widget.
|
||||
* GtkHSeparator:: The horizontal separator widget.
|
||||
* GtkImage:: The image widget.
|
||||
* GtkInputDialog:: The input dialog widget.
|
||||
* GtkInputDialog:: The input dialog widget.
|
||||
* GtkItem:: The item widget.
|
||||
* GtkLabel:: The label widget.
|
||||
* GtkList:: The list widget.
|
||||
@@ -1164,7 +792,7 @@ The available widgets (in alphabetical order):
|
||||
* GtkMisc:: The misc widget.
|
||||
* GtkNotebook:: The notebook widget.
|
||||
* GtkOptionMenu:: The option menu widget.
|
||||
* GtkPaned:: The paned widget.
|
||||
* GtkPaned:: The paned widget.
|
||||
* GtkPixmap:: The pixmap widget.
|
||||
* GtkPreview:: The preview widget.
|
||||
* GtkProgressBar:: The progress bar widget.
|
||||
@@ -1176,18 +804,18 @@ The available widgets (in alphabetical order):
|
||||
* GtkScrollbar:: The scrollbar widget.
|
||||
* GtkScrolledWindow:: The scrolled window widget.
|
||||
* GtkSeparator:: The separator widget.
|
||||
* GtkStatusbar:: The statusbar widget.
|
||||
* GtkStatusbar:: The statusbar widget.
|
||||
* GtkTable:: The table widget.
|
||||
* GtkText:: The text widget.
|
||||
* GtkToggleButton:: The toggle button widget.
|
||||
* GtkToolbar:: The tool bar widget.
|
||||
* GtkTooltips:: The tool tips widget.
|
||||
* GtkToolbar:: The tool bar widget.
|
||||
* GtkTooltips:: The tool tips widget.
|
||||
* GtkTree:: The tree widget.
|
||||
* GtkTreeItem:: The tree item widget.
|
||||
* GtkVBox:: The vertical box widget.
|
||||
* GtkVButtonBox:: The vertical button box widget.
|
||||
* GtkVButtonBox:: The vertical button box widget.
|
||||
* GtkViewport:: The viewport widget.
|
||||
* GtkVPaned:: The vertical paned widget.
|
||||
* GtkVPaned:: The vertical paned widget.
|
||||
* GtkVRuler:: The vertical ruler widget.
|
||||
* GtkVScale:: The vertical scale widget.
|
||||
* GtkVScrollbar:: The vertical scrollbar widget.
|
||||
@@ -1805,7 +1433,7 @@ values @var{label}. The new widget is returned as a pointer to a
|
||||
@gtkstdmacros{CheckButton, CHECK_BUTTON}
|
||||
|
||||
@page
|
||||
@node GtkCheckMenuItem, GtkCList, GtkCheckButton, Widgets
|
||||
@node GtkCheckMenuItem, GtkCList, GtkCheckButton, Widgets,
|
||||
@comment node-name, next, previous, up
|
||||
@section The check menu item widget
|
||||
|
||||
@@ -2146,7 +1774,7 @@ a @code{GtkWidget} object. @code{NULL} is returned on failure.
|
||||
@gtkstdmacros{Combo, COMBO}
|
||||
|
||||
@page
|
||||
@node GtkContainer, GtkCTree, GtkCombo, Widgets
|
||||
@node GtkContainer, GtkCurve, GtkCombo, Widgets
|
||||
@comment node-name, next, previous, up
|
||||
@section The container widget
|
||||
|
||||
@@ -2225,111 +1853,8 @@ Remove @var{widget} from @var{container}.
|
||||
|
||||
@gtkstdmacros{Container, CONTAINER}
|
||||
|
||||
@page
|
||||
@node GtkCTree, GtkCurve, GtkContainer, Widgets
|
||||
@comment node-name, next, previous, up
|
||||
@section The multi-column tree widget
|
||||
|
||||
@subsection Description
|
||||
|
||||
The GtkCTree widget is a multi-columned list with a designated column, the
|
||||
@code{tree column}, to display hierarchically-organized data. Each node is
|
||||
either a folder (a branch of the tree) or a leaf. Nodes can be
|
||||
(recursively) expanded, collapsed, (un)selected, removed, moved, sorted etc.
|
||||
|
||||
GtkCTree is a descendant of @pxref{GtkCList}. Therefore, a cell in a column
|
||||
other than the tree column can only contain a string, a pixmap, both or
|
||||
nothing. A node in the tree column can contain a string and up to two pixmaps
|
||||
and masks, indicating the "folder openend" and "folder closed" status.
|
||||
|
||||
Compared to GtkCList, there is no concept of row numbers. Therefore, a number
|
||||
of GtkCList methods had to be re-implemented taking @code{GList *node}
|
||||
arguments instead of @code{gint row}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@subsection Signals
|
||||
|
||||
@deftypefn Signal void GtkCTree::tree_expand (GtkCTree *@var{ctree}, GList *@var{node})
|
||||
@end deftypefn
|
||||
@deftypefn Signal void GtkCTree::tree_collapse (GtkCTree *@var{ctree}, GList *@var{node})
|
||||
@end deftypefn
|
||||
@deftypefn Signal void GtkCTree::tree_move (GtkCTree *@var{ctree}, GList *@var{node}, GList *@var{new_parent}, GList *@var{new_sibling})
|
||||
@end deftypefn
|
||||
@deftypefn Signal void GtkCTree::tree_select_row (GtkCTree *@var{ctree}, GList *@var{row}, gint @var{column})
|
||||
@end deftypefn
|
||||
@deftypefn Signal void GtkCTree::tree_unselect_row (GtkCTree *@var{ctree}, GList *@var{row}, gint @var{column})
|
||||
@end deftypefn
|
||||
|
||||
@subsection Functions
|
||||
|
||||
@deftypefun GtkType gtk_ctree_get_type (void)
|
||||
Returns the @code{GtkCTree} type identifier.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GtkWidget* gtk_ctree_new (gint @var{columns}, gint @var{tree_column})
|
||||
Creates a new GtkCTree widget with the given number of columns and the given tree column.
|
||||
|
||||
On success, a pointer to the newly created widget is returned, and @code{NULL} otherwise.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GtkWidget* gtk_ctree_new_with_titles (gint @var{columns}, gint @var{tree_column}, gchar *@var{titles[]})
|
||||
Creates a new GtkCTree widget with the given number of columns and the given tree column. The column titles are initialized to the strings of the array @var{titles}.
|
||||
|
||||
On success, a pointer to the newly created widget is returned, and @code{NULL} otherwise.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun GList* gtk_ctree_insert (GtkCTree *@var{ctree}, GList *@var{parent}, GList *@var{sibling}, gchar *@var{text[]}, guint8 @var{spacing}, GdkPixmap *@var{pixmap_closed}, GdkPixmap *@var{mask_closed}, GdkPixmap *@var{pixmap_opened}, GdkPixmap *@var{mask_opened}, gboolean @var{is_leaf}, gboolean @var{expanded})
|
||||
Inserts a new node at the given position. If @var{parent} == NULL, the node is
|
||||
inserted at root level. If @var{sibling} == NULL, the node is appended to the
|
||||
existing list of siblings. Otherwise, the node is inserted before @var{sibling}.
|
||||
If not NULL, the two pixmaps/masks are used to indicate the opened/closed status
|
||||
of the node. @var{spacing} is the number of pixels between pixmap and text.
|
||||
If @var{is_leaf} == TRUE, the node cannot have any children.
|
||||
The initial expanded/collapsed status is given by @var{expanded}.
|
||||
|
||||
On success, the pointer to the newly inserted node is returned, and NULL
|
||||
otherwise.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_ctree_remove (GtkCTree *@var{ctree}, GList *@var{node})
|
||||
Removes the given node and all its children.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_ctree_clear (GtkCTree *@var{ctree})
|
||||
Removes all nodes of @var{ctree}.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_ctree_post_recursive (GtkCTree *@var{ctree}, GList *@var{node}, GtkCTreeFunc @var{func}, gpointer @var{data})
|
||||
Apply @var{func} to @var{node} and all its children, traversing @var{ctree} in
|
||||
post-order.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gtk_ctree_pre_recursive (GtkCTree *@var{ctree}, GList *@var{node}, GtkCTreeFunc @var{func}, gpointer @var{data})
|
||||
Apply @var{func} to @var{node} and all its children, traversing @var{ctree} in
|
||||
pre-order.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gboolean gtk_ctree_is_visible (GtkCTree *@var{ctree}, GList *@var{node})
|
||||
Returns the visibility status of the given node. A node is said to be visible
|
||||
if in the chain of parent nodes every node is expanded. Or : the node is
|
||||
currently being displayed (but not necessarily inside the viewing area).
|
||||
@end deftypefun
|
||||
|
||||
@c @deftypefun void gtk_ctree_scroll_to (GtkCTree *@var{ctree}, gint @var{row}, gint@var{column}, gfloat @var{row_align}, gfloat @var{col_align})
|
||||
@c Scroll the viewing area of the @code{GtkCtree} in @var{ctree} to @var{column}
|
||||
@c and @var{row}. The @var{row_align} and @var{col_align} are between zero and
|
||||
@c one, representing the location the row should appear on screen. Setting
|
||||
@c @var{row_align} or the @var{col_align} to 0.0 will be the top or left of the
|
||||
@c viewing area. Setting the @var{row_align} or @var{col_align} to 1.0 will
|
||||
@c be the bottom or right of the viewing area. If the @var{row} or @var{column}
|
||||
@c is -1 then there is no change.
|
||||
@c @end deftypefun
|
||||
|
||||
@gtkstdmacros{CTree, CTREE}
|
||||
|
||||
@page
|
||||
@node GtkCurve, GtkGammaCurve, GtkCTree, Widgets
|
||||
@node GtkCurve, GtkGammaCurve, GtkContainer, Widgets
|
||||
@comment node-name, next, previous, up
|
||||
@section The curve widget
|
||||
|
||||
@@ -4899,7 +4424,7 @@ Returns the @code{GtkWidget} type identifier.
|
||||
|
||||
|
||||
@page
|
||||
@node GtkWindow, , GtkWidget, Widgets
|
||||
@node GtkWindow, , GtkWidget, Widgets
|
||||
@comment node-name, next, previous, up
|
||||
@section The window widget
|
||||
|
||||
@@ -5048,11 +4573,11 @@ above.
|
||||
|
||||
|
||||
@menu
|
||||
* GtkAcceleratorTable:: The accelerator table object.
|
||||
* GtkAcceleratorTable:: The accelerator table object.
|
||||
* GtkAdjustment:: The adjustment object.
|
||||
* GtkGC:: The GC object.
|
||||
* GtkGC:: The GC object.
|
||||
* GtkData:: The data object.
|
||||
* GtkStyle:: The style object.
|
||||
* GtkStyle:: The style object.
|
||||
@end menu
|
||||
|
||||
|
||||
@@ -5135,7 +4660,7 @@ Returns the @code{GtkData} type identifier.
|
||||
|
||||
@gtkstdmacros{Data, DATA}
|
||||
@page
|
||||
@node GtkStyle, , GtkData, Other Objects
|
||||
@node GtkStyle, ,GtkData, Other Objects
|
||||
@section The style object
|
||||
|
||||
@subsection Description
|
||||
@@ -5150,7 +4675,7 @@ Returns the @code{GtkData} type identifier.
|
||||
|
||||
@menu
|
||||
* Initialization and exit:: Initializing and exiting GTK.
|
||||
* Customization:: Customizing the library.
|
||||
* Customization:: Customizing the library.
|
||||
* Menu Factories:: Simplified menu creation.
|
||||
* Tree Factories:: Simplified tree creation.
|
||||
* Tool Tips:: Pop up help mechanism.
|
||||
@@ -5260,7 +4785,7 @@ you.
|
||||
@section Resource Files
|
||||
|
||||
@page
|
||||
@node Standard Macros, , Resource Files, Miscellaneous
|
||||
@node Standard Macros, , Resource Files, Miscellaneous
|
||||
@comment node-name, next, previous, up
|
||||
@section Macros defined by all objects
|
||||
|
||||
@@ -5290,7 +4815,7 @@ Cast a generic pointer to @code{Gtk<ObjectType>Class*}. Like
|
||||
@deftypefun gint GTK_IS_<ObjectType> (gpointer @var{obj})
|
||||
Determine if a generic pointer refers to a @code{Gtk<ObjectType>}
|
||||
object. This function is, in reality, a macro wrapper around the
|
||||
@code{gtk_type_is_a} function (@pxref{Types}).
|
||||
@code{gtk_type_is_a} function (@pxref{Objects}).
|
||||
@end deftypefun
|
||||
|
||||
|
||||
@@ -5446,7 +4971,7 @@ main (int argc, char *argv[])
|
||||
@end example
|
||||
|
||||
|
||||
@node Hello World III, , Hello World II, Examples
|
||||
@node Hello World III, , Hello World II, Examples
|
||||
@comment node-name, next, previous, up
|
||||
@section Making Hello World II robust
|
||||
|
||||
@@ -5634,7 +5159,7 @@ array instead of a linked list. This would shrink the overhead of the
|
||||
@printindex fn
|
||||
|
||||
|
||||
@node Concept Index, , Function Index, Top
|
||||
@node Concept Index, , Function Index, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Concept Index
|
||||
|
||||
@@ -5644,5 +5169,3 @@ array instead of a linked list. This would shrink the overhead of the
|
||||
@summarycontents
|
||||
@contents
|
||||
@bye
|
||||
|
||||
@c LocalWords: Gtk API formalistic
|
||||
|
||||
16268
docs/gtk_tut.sgml
16268
docs/gtk_tut.sgml
File diff suppressed because it is too large
Load Diff
17638
docs/gtk_tut_12.es.sgml
17638
docs/gtk_tut_12.es.sgml
File diff suppressed because it is too large
Load Diff
8600
docs/gtk_tut_fr.sgml
8600
docs/gtk_tut_fr.sgml
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
name="<imain@gtk.org>"></tt>,
|
||||
Tony Gale <tt><htmlurl url="mailto:gale@gtk.org"
|
||||
name="<gale@gtk.org>"></tt>
|
||||
<date>May 24th, 1998 - Traduzione aggiornata al 27 Maggio 1998
|
||||
<date>April 6th, 1998 - Traduzione aggiornata al 1 Maggio 1998
|
||||
|
||||
<abstract>Tradotto da Michel Morelli, <tt><htmlurl url="mailto:ziobudda@chiara.dei.unipd.it" name="ziobudda@chiara.dei.unipd.it"></tt>, Daniele Canazza, <tt><htmlurl url="mailto:dcanazz@tin.it" name="dcanazz@tin.it"></tt> e Antonio Schifano, <tt><htmlurl url="mailto:schifano@cli.di.unipi.it" name="schifano@cli.di.unipi.it"></tt>
|
||||
</abstract>
|
||||
@@ -342,7 +342,7 @@ La funzione specificata come terzo argomento è chiamata ``funzione di
|
||||
ritorno (callback)'', e dovrebbe essere della forma:
|
||||
|
||||
<tscreen><verb>
|
||||
void callback_func(GtkWidget *widget, gpointer callback_data);
|
||||
void callback_func(GtkWidget *widget, gpointer *callback_data);
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
Dove il primo argomento sarà un puntatore al widget che emette il segnale
|
||||
@@ -391,7 +391,7 @@ difficile farci invece qualcosa. Il prossimo esempio userà l'argomento pa
|
||||
per dire quale bottone è stato premuto.
|
||||
|
||||
<tscreen><verb>
|
||||
void hello (GtkWidget *widget, gpointer data)
|
||||
void hello (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello World\n");
|
||||
}
|
||||
@@ -423,7 +423,7 @@ chiamando gtk_main_quit(). Questa funzione dice a GTK che deve uscire da gtk_mai
|
||||
quando gli viene restituito il controllo.
|
||||
|
||||
<tscreen><verb>
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -661,13 +661,13 @@ l'impacchettamento dei widget.
|
||||
|
||||
/* La nostra funzione di callback migliorata. I dati passati a questa
|
||||
* vengono stampati su stdout. */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
|
||||
/* Un'altra callback */
|
||||
void delete_event (GtkWidget *widget, gpointer data)
|
||||
void delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -901,7 +901,7 @@ problemi nel seguirlo. Compilatelo voi stessi e provate a giocarci un po'.
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
void
|
||||
delete_event (GtkWidget *widget, gpointer data)
|
||||
delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -1348,13 +1348,13 @@ Ecco il codice sorgente:
|
||||
|
||||
/* la nostra funzione di ritorno.
|
||||
* i dati passati a questa funzione vengono stampati su stdout */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
|
||||
/* questa funzione fa uscire dal programma */
|
||||
void delete_event (GtkWidget *widget, gpointer data)
|
||||
void delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -1699,7 +1699,7 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
|
||||
}
|
||||
|
||||
/* la nostra solita funzione di callback */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
@@ -1922,7 +1922,7 @@ Nel seguente esempio creiamo un gruppo di tre radio-bottoni.
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -2059,8 +2059,8 @@ distribuito con GTK.
|
||||
Con alcuni widget (per esempio con l'etichetta) i suggerimenti non funzionano.
|
||||
<p>
|
||||
La prima chiamata che si usa per creare un nuovo tooltip è la seguente.
|
||||
In una data funzione, è necessario chiamarla una sola volta: il <tt/GtkTooltip/
|
||||
che viene restituito da questa funzione può essere usato per creare suggerimenti
|
||||
In una data funzione, è necessario chiamarla una sola volta: il GtkTooltip
|
||||
che viene ritornato da questa funzione può essere usato per creare suggerimenti
|
||||
multipli.
|
||||
|
||||
<tscreen><verb>
|
||||
@@ -2071,15 +2071,14 @@ Una volta creato un nuovo suggerimento e il widget su cui lo volete usare,
|
||||
basta usare la seguente chiamata per fare l'assegnazione:
|
||||
|
||||
<tscreen><verb>
|
||||
void gtk_tooltips_set_tip (GtkTooltips *tooltips,
|
||||
GtkWidget *widget,
|
||||
const gchar *tip_text,
|
||||
const gchar *tip_private);
|
||||
void gtk_tooltips_set_tips (GtkTooltips *tooltips,
|
||||
GtkWidget *widget,
|
||||
gchar *tips_text);
|
||||
</verb></tscreen>
|
||||
|
||||
Il primo argomento è il suggerimento che era già stato creato, che è seguito
|
||||
dal widget da cui volete che spunti il suggerimento e dal testo che volete
|
||||
venga mostrato. L'ultimo argomento può essere posto a NULL.
|
||||
venga mostrato.
|
||||
<p>
|
||||
Ecco un piccolo esempio:
|
||||
|
||||
@@ -2090,8 +2089,9 @@ GtkWidget *button;
|
||||
tooltips = gtk_tooltips_new ();
|
||||
button = gtk_button_new_with_label ("button 1");
|
||||
...
|
||||
gtk_tooltips_set_tips (tooltips, button, "This is button 1", NULL);
|
||||
gtk_tooltips_set_tips (tooltips, button, "This is button 1");
|
||||
</verb></tscreen>
|
||||
|
||||
Ci sono anche altre funzioni che si usano con i suggerimenti. Eccone una lista
|
||||
con una breve descrizione di quello che fanno.
|
||||
|
||||
@@ -2209,7 +2209,7 @@ void progress_r (void)
|
||||
pstat = FALSE;
|
||||
}
|
||||
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -2331,7 +2331,7 @@ GtkWidget* gtk_dialog_new (void);
|
||||
Per cui, per creare una nuova finestra di dialogo, uate:
|
||||
|
||||
<tscreen><verb>
|
||||
GtkWidget *window;
|
||||
GtkWidget window;
|
||||
window = gtk_dialog_new ();
|
||||
</verb></tscreen>
|
||||
|
||||
@@ -2521,12 +2521,12 @@ static const char * xpm_data[] = {
|
||||
|
||||
|
||||
/* quando invocata (con il segnale delete_event), termina l'applicazione. */
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
/* invocata se il bottone è clickato. Stampa semplicemente un messaggio */
|
||||
void button_clicked( GtkWidget *widget, gpointer data ) {
|
||||
void button_clicked( GtkWidget *widget, gpointer *data ) {
|
||||
printf( "button clicked\n" );
|
||||
}
|
||||
|
||||
@@ -2724,7 +2724,7 @@ static char * WheelbarrowFull_xpm[] = {
|
||||
|
||||
|
||||
/* quando invocata (con il segnale delete_event), termina l'applicazione. */
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -2884,7 +2884,7 @@ La sistemazione dell'area di disegno e dei righelli viene fatta usando una tabel
|
||||
|
||||
/* il controllo raggiunge questa routine quando si preme il bottone close
|
||||
*/
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -3010,7 +3010,7 @@ elementi sulla barra di stato e l'altro per riuovere l'ultimo elemento..
|
||||
|
||||
GtkWidget *status_bar;
|
||||
|
||||
void push_item (GtkWidget *widget, gpointer data)
|
||||
void push_item (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
static int count = 1;
|
||||
char buff[20];
|
||||
@@ -3021,7 +3021,7 @@ void push_item (GtkWidget *widget, gpointer data)
|
||||
return;
|
||||
}
|
||||
|
||||
void pop_item (GtkWidget *widget, gpointer data)
|
||||
void pop_item (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data );
|
||||
return;
|
||||
@@ -3559,7 +3559,7 @@ void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
|
||||
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
|
||||
}
|
||||
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -3752,7 +3752,7 @@ void remove_book (GtkButton *button, GtkNotebook *notebook)
|
||||
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
|
||||
}
|
||||
|
||||
void delete (GtkWidget *widget, gpointer data)
|
||||
void delete (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -3930,7 +3930,7 @@ visualizzata, mentre con GTK_POLICY_ALWAYS la barra verrà sempre mostrata
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void destroy(GtkWidget *widget, gpointer data)
|
||||
void destroy(GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
@@ -5116,7 +5116,7 @@ void gtk_menu_bar_append( GtkMenuBar *menu_bar, GtkWidget *menu_item);
|
||||
che nel nostro caso è:
|
||||
|
||||
<tscreen><verb>
|
||||
gtk_menu_bar_append( GTK_MENU_BAR(menu_bar), file_item );
|
||||
gtk_menu_bar_append( menu_bar, file_item );
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
@@ -5855,7 +5855,7 @@ caldamente di dare un'occhiata ai loro rispettivi file header nella
|
||||
distribuzione di GTK. I nomi delle funzioni di GTK sono molto descrittivi.
|
||||
Non appena si capisce come funzionano le cose, non è
|
||||
difficile dedurre il modo d'uso di un widget semplicemente guardando la
|
||||
dichiarazione di funzione associata ad esso. Aggiungendo a questo qualche
|
||||
dichiarazione di funzione ad esso associata. Aggiungendo a questo qualche
|
||||
spunto tratto dal codice di altri non dovrebbero esserci problemi.
|
||||
|
||||
Quando avrete raggiunto una comprensione globale di tutte le funzioni
|
||||
|
||||
2583
docs/gtkfaq.sgml
2583
docs/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
350
docs/make-todo
350
docs/make-todo
@@ -1,350 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import xmllib;
|
||||
import sys;
|
||||
import string
|
||||
import re
|
||||
|
||||
def html_subst(s):
|
||||
if s.group(1) != None:
|
||||
return s.group(0)
|
||||
elif s.group(2) != None:
|
||||
return '<a href="' + s.group(0) + '">' + s.group(0) + '</a>'
|
||||
elif s.group(3) != None:
|
||||
return '<a href="mailto:' + s.group(0) + '">' + s.group(0) + '</a>'
|
||||
|
||||
def htmlify(str):
|
||||
return re.sub ("(<[^>]*>)|(http://[~.:/\w-]+)|([\w._!-]+@[\w_-]+).[\w_-]+", html_subst, str)
|
||||
|
||||
def bug_subst(s):
|
||||
if s.group(1) != None:
|
||||
return s.group(0)
|
||||
else:
|
||||
n = s.group(2)
|
||||
return '<a href="http://bugs.gnome.org/db/%s/%s.html">#%s</a>' % (n[0:2], n, n)
|
||||
|
||||
def bugify(str):
|
||||
str = re.sub ("(<[^>]*>)|#(\d+)", bug_subst, str)
|
||||
return htmlify(str)
|
||||
|
||||
def make_id(str):
|
||||
return re.sub ("[^a-z]","-", string.lower(str))
|
||||
|
||||
class ParseError (Exception):
|
||||
pass
|
||||
|
||||
class Entry:
|
||||
def __init__(self):
|
||||
self.description = None
|
||||
self.title = None
|
||||
self.url = None
|
||||
self.contact = None
|
||||
self.bugs = None
|
||||
|
||||
def set_size(self, size):
|
||||
size = string.lower(size)
|
||||
if size == "small":
|
||||
self.size = "Small"
|
||||
elif size == "medium":
|
||||
self.size = "Medium"
|
||||
elif size == "big":
|
||||
self.size = "Big"
|
||||
else:
|
||||
raise ParseError, 'size must be "small", "medium", or "big"'
|
||||
|
||||
def output(self):
|
||||
if self.size == "Big":
|
||||
bgcolor = "#88bb88"
|
||||
elif self.size == "Medium":
|
||||
bgcolor = "#b4d4b4"
|
||||
else:
|
||||
bgcolor = "#d0e0d0"
|
||||
|
||||
print '''<table cellspacing="0" cellpadding="2" width="97%%" border="0" bgcolor="#000000">
|
||||
<tbody><tr><td colspan=2>
|
||||
<table cellspacing="0" cellpadding="5" width="100%%" border="0" bgcolor="#ffffff">
|
||||
<tbody>
|
||||
<tr bgcolor="%s">
|
||||
<td align="left"><font size="+1">%s</font></font></td>
|
||||
<td align="left" width="20%%"><b>Size</b>: %s</td>
|
||||
<td align="center" width="20%%"><b>Status</b>: %s</td>
|
||||
<td align="right" width="20%%"><b>Target Version</b>: %s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4>
|
||||
%s
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>''' % (bgcolor, self.title, self.size, self.status, self.target, htmlify(self.description))
|
||||
|
||||
if self.url != None:
|
||||
print '''<tr><td width="0"><b>More Info</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % htmlify (self.url)
|
||||
|
||||
if self.bugs != None:
|
||||
print '''<tr><td width="0"><b>Bug Reports</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % bugify (self.bugs)
|
||||
|
||||
if self.contact != None:
|
||||
print '''<tr><td width="0"><b>Contact</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % htmlify (self.contact)
|
||||
|
||||
print '''</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td></tr></tbody></table>
|
||||
'''
|
||||
|
||||
class Section:
|
||||
def __init__(self):
|
||||
self.title = None
|
||||
self.entries = []
|
||||
|
||||
def output(self):
|
||||
|
||||
print '<h2><a name="%s">%s</a></h2>' % (make_id(self.title), self.title)
|
||||
|
||||
first = 1
|
||||
for entry in self.entries:
|
||||
if not first:
|
||||
print "<br>"
|
||||
first = 0
|
||||
entry.output()
|
||||
|
||||
class TodoParser (xmllib.XMLParser):
|
||||
def __init__(self):
|
||||
xmllib.XMLParser.__init__(self)
|
||||
|
||||
self.in_todo = 0
|
||||
self.in_data = 0
|
||||
self.data = ""
|
||||
self.section = None
|
||||
self.entry = None
|
||||
self.logourl = None
|
||||
self.title = None
|
||||
self.sections = []
|
||||
|
||||
self.entitydefs = {}
|
||||
|
||||
def start_todo(self,attributes):
|
||||
if self.in_todo:
|
||||
raise ParseError, "<todo> tags may not be nested"
|
||||
if attributes.has_key ("logourl"):
|
||||
self.logourl = attributes["logourl"]
|
||||
self.in_todo = 1
|
||||
|
||||
def end_todo(self):
|
||||
self.in_todo = 0
|
||||
|
||||
def start_section(self,attributes):
|
||||
if self.section:
|
||||
raise ParseError, "<section> tags may not be nested"
|
||||
|
||||
self.section = Section()
|
||||
|
||||
def end_section(self):
|
||||
if self.section.title == None:
|
||||
raise ParseError, "<section> requires <title>"
|
||||
|
||||
self.sections.append(self.section)
|
||||
self.section = None
|
||||
|
||||
def start_title(self,attributes):
|
||||
if not self.in_todo:
|
||||
raise ParseError, "<title> tag must be in <todo>, <section> or <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <title> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_title(self):
|
||||
self.in_data = 0
|
||||
if self.entry:
|
||||
self.entry.title = self.data
|
||||
elif self.section:
|
||||
self.section.title = self.data
|
||||
else:
|
||||
self.title = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_description(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<description> tag must be in <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <description> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_description(self):
|
||||
self.in_data = 0
|
||||
self.entry.description = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_url(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<url> tag must be in <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <url> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_url(self):
|
||||
self.in_data = 0
|
||||
self.entry.url = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_contact(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<contact> tag must be in <contact>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <contact> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_contact(self):
|
||||
self.in_data = 0
|
||||
self.entry.contact = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_bugs(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<bugs> tag must be in <bugs>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <bugs> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_bugs(self):
|
||||
self.in_data = 0
|
||||
self.entry.bugs = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_entry(self,attributes):
|
||||
if not self.section:
|
||||
raise ParseError, "<entry> tag must be in <section>"
|
||||
if self.entry:
|
||||
raise ParseError, "<entry> tags may not be nested"
|
||||
|
||||
self.entry = Entry()
|
||||
|
||||
if not attributes.has_key("size"):
|
||||
raise ParseError, '"size" attribute required for entry'
|
||||
self.entry.set_size(attributes["size"])
|
||||
|
||||
if not attributes.has_key("status"):
|
||||
raise ParseError, '"status" attribute (completion percentage) required for entry'
|
||||
self.entry.status=attributes["status"]
|
||||
|
||||
if not attributes.has_key("target"):
|
||||
raise ParseError, '"target" attribute (target version) required for entry'
|
||||
self.entry.target=attributes["target"]
|
||||
|
||||
def end_entry(self):
|
||||
if self.entry.title == None:
|
||||
raise ParseError, "<entry> requires <title>"
|
||||
|
||||
if self.entry.description == None:
|
||||
raise ParseError, "<entry> requires <description>"
|
||||
|
||||
self.section.entries.append(self.entry)
|
||||
self.entry = None
|
||||
|
||||
def handle_data(self,data):
|
||||
if self.in_data:
|
||||
self.data = self.data + data
|
||||
|
||||
def unknown_starttag(self,tag,attributes):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unexpected start tag: " + tag
|
||||
else:
|
||||
self.data = self.data + "<" + tag
|
||||
for (key,val) in attributes.items():
|
||||
self.data = self.data + ' %s="%s"' % (key,val)
|
||||
self.data = self.data + ">"
|
||||
|
||||
def unknown_endtag(self,tag):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unexpected end tag: " + tag
|
||||
else:
|
||||
self.data = self.data + "</%s>" % tag
|
||||
|
||||
def syntax_error(self, err):
|
||||
if re.match("reference to unknown entity", err):
|
||||
pass
|
||||
else:
|
||||
xmllib.XMLParser.syntax_error (self, err)
|
||||
|
||||
def unknown_entityref(self,ref):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unknown entity &" + ref + ";"
|
||||
else:
|
||||
self.data = self.data + "&" + ref + ";"
|
||||
|
||||
file = open(sys.argv[1])
|
||||
parser = TodoParser()
|
||||
|
||||
lineno = 1
|
||||
while 1:
|
||||
line = file.readline()
|
||||
if line == "":
|
||||
break
|
||||
|
||||
try:
|
||||
parser.feed(line)
|
||||
except ParseError, err:
|
||||
sys.stderr.write("Parse error at line " + `lineno` + ": " + err.__str__() + "\n")
|
||||
sys.exit(1)
|
||||
except RuntimeError, err:
|
||||
sys.stderr.write(err.__str__() + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
lineno = lineno + 1
|
||||
|
||||
parser.close()
|
||||
if parser.title == None:
|
||||
sys.stderr.write ("<todo> Document must have a <title>\n")
|
||||
sys.exit (1)
|
||||
|
||||
print '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>%s</title>
|
||||
</head>
|
||||
<body bgcolor="#ffffff">
|
||||
<table width="100%%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<h1>%s</h1>''' % (parser.title, parser.title)
|
||||
|
||||
|
||||
for section in parser.sections:
|
||||
ntasks = len(section.entries)
|
||||
id = make_id (section.title)
|
||||
if ntasks == 1:
|
||||
print '<a href="#%s">%s</a> (1 item)<br>' % (id,section.title)
|
||||
else:
|
||||
print '<a href="#%s">%s</a> (%d items)<br>' % (id,section.title,ntasks)
|
||||
|
||||
print '''
|
||||
</td>'''
|
||||
if parser.logourl != None:
|
||||
print ''' <td align="right">
|
||||
<img src="%s" alt="Logo"></img>
|
||||
</td>''' % parser.logourl
|
||||
print '''
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
'''
|
||||
|
||||
first = 1
|
||||
for section in parser.sections:
|
||||
if not first:
|
||||
print "<br><br>"
|
||||
first = 0
|
||||
section.output()
|
||||
|
||||
print '''</body>
|
||||
</html>'''
|
||||
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
gtk_button - GTK+ push button widget
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <gtk/gtkbutton.h>
|
||||
|
||||
GtkType gtk_button_get_type (void);
|
||||
GtkWidget* gtk_button_new (void);
|
||||
GtkWidget* gtk_button_new_with_label (const gchar *label);
|
||||
void gtk_button_pressed (GtkButton *button);
|
||||
void gtk_button_released (GtkButton *button);
|
||||
void gtk_button_clicked (GtkButton *button);
|
||||
void gtk_button_enter (GtkButton *button);
|
||||
void gtk_button_leave (GtkButton *button);
|
||||
void gtk_button_set_relief (GtkButton *button,
|
||||
GtkReliefStyle style);
|
||||
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This widget is a standard push button widget. Push button widgets
|
||||
are generally used for allowing the user to click on them to initiate
|
||||
a command.
|
||||
|
||||
This widget is a container widget which contains one child.
|
||||
|
||||
=head1 OBJECT HIERARCHY
|
||||
|
||||
gtk_object
|
||||
gtk_widget
|
||||
gtk_container
|
||||
gtk_button
|
||||
|
||||
=head1 SIGNAL PROTOTYPES
|
||||
|
||||
"clicked" void user_function (GtkWidget *widget, gpointer data);
|
||||
"pressed" void user_function (GtkWidget *widget, gpointer data);
|
||||
"released" void user_function (GtkWidget *widget, gpointer data);
|
||||
"enter" void user_function (GtkWidget *widget, gpointer data);
|
||||
"leave" void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
=head2 Creation
|
||||
|
||||
The most common way to create a button is with a label in it, which
|
||||
contains text for the user to read. The child of the button will then
|
||||
be a L<gtk_label(3)> widget with the text you passwd in. You can
|
||||
do this in one command:
|
||||
|
||||
GtkWidget *button;
|
||||
button = gtk_button_new_with_label ("This is a button");
|
||||
|
||||
To create a gtk_button widget which does not already have a child,
|
||||
use gtk_button_new():
|
||||
|
||||
GtkWidget *button;
|
||||
button = gtk_button_new ();
|
||||
|
||||
After you have created a button you can then add a widget to the
|
||||
button (such as a label or pixmap) using gtk_container_add(). See
|
||||
L<gtk_container(3)> for more information on adding widgets to
|
||||
containers.
|
||||
|
||||
=head2 Creating a pixmap in a button in a window
|
||||
|
||||
After we have an empty gtk_button, such as above, and we have a gtk_pixmap,
|
||||
we can simply add the gtk_pixmap to the gtk_button with gtk_container_add().
|
||||
|
||||
The following code will open the file "gimp.xpm" and place it in a
|
||||
button.
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
GtkWidget *pixmap;
|
||||
GtkStyle *style;
|
||||
GdkPixmap *gdkpixmap;
|
||||
GdkBitmap *mask;
|
||||
char *filename = "gimp.xpm";
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), button);
|
||||
|
||||
/* The button is realized now, which creates button->window
|
||||
used below to create the pixmap. */
|
||||
gtk_widget_realize (button);
|
||||
|
||||
style = gtk_widget_get_style (button);
|
||||
gdkpixmap = gdk_pixmap_create_from_xpm (button->window, &mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
filename);
|
||||
pixmap = gtk_pixmap_new (gdkpixmap, mask);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), pixmap);
|
||||
|
||||
gtk_widget_show (pixmap);
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
=head2 Different reliefs
|
||||
|
||||
Reliefs affect how the shadowing of the button is drawn. The different
|
||||
types of relief styles are:
|
||||
|
||||
GTK_RELIEF_NORMAL
|
||||
GTK_RELIEF_HALF
|
||||
GTK_RELIEF_NONE
|
||||
|
||||
When set to a normal relief, the widget looks and acts like a normal
|
||||
button. When half or none relief is used, shadowing is only drawn when the
|
||||
mouse cursor is over the widget.
|
||||
|
||||
To set the relief, use gtk_button_set_relief(), like:
|
||||
|
||||
gtk_button_set_relief (button, GTK_RELIEF_HALF);
|
||||
|
||||
To get the current relief of a button, use gtk_button_get_relief():
|
||||
|
||||
GtkReliefStyle relief;
|
||||
relief = gtk_button_get_relief (GTK_BUTTON (button));
|
||||
|
||||
=head2 Executing a command when the button is pressed
|
||||
|
||||
To execute a function when a button is pressed, use
|
||||
gtk_signal_connect() to connect to the "clicked" signal.
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (user_function),
|
||||
NULL);
|
||||
|
||||
user_function is a user defined function, like the following:
|
||||
|
||||
void user_function (GtkWidget *button, gpointer data)
|
||||
{
|
||||
printf("clicked\n");
|
||||
}
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
GtkType gtk_button_get_type (void);
|
||||
|
||||
This function returns the GtkType which is assigned to the
|
||||
object class for gtk_button.
|
||||
|
||||
GtkWidget* gtk_button_new (void);
|
||||
|
||||
This functions returns a new button widget which can then be
|
||||
used as a container for another widget.
|
||||
|
||||
GtkWidget* gtk_button_new_with_label (const gchar *label);
|
||||
|
||||
This function returns a new button widget with a label widget
|
||||
as a child. The label widget will have the text passed into
|
||||
the commant.
|
||||
|
||||
void gtk_button_pressed (GtkButton *button);
|
||||
|
||||
This function sends a "pressed" signal to the button.
|
||||
|
||||
void gtk_button_released (GtkButton *button);
|
||||
|
||||
This function sends a "released" signal to the button.
|
||||
|
||||
void gtk_button_clicked (GtkButton *button);
|
||||
|
||||
This function sends a "clicked" signal to the button.
|
||||
|
||||
void gtk_button_enter (GtkButton *button);
|
||||
|
||||
This function sends a "enter" signal to the button.
|
||||
|
||||
void gtk_button_leave (GtkButton *button);
|
||||
|
||||
This function sends a "leave" signal to the button.
|
||||
|
||||
void gtk_button_set_relief (GtkButton *button, GtkReliefStyle style);
|
||||
|
||||
This function is sets the GtkReliefStyle of the button. The
|
||||
relief style is one of: GTK_RELIEF_NORMAL, GTK_RELIEF_HALF,
|
||||
or GTK_RELIEF_NONE. The relief determines when the shadow of
|
||||
the button is drawn.
|
||||
|
||||
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
|
||||
|
||||
This function returns the current relief of the button.
|
||||
|
||||
=head1 SIGNALS
|
||||
|
||||
"clicked"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the button is clicked. A click is
|
||||
a press and release of the button when the cursor is
|
||||
inside the button on release.
|
||||
|
||||
"pressed"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the left mouse button is pressed.
|
||||
|
||||
"released"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the left mouse button is released and
|
||||
the widget was previously pressed.
|
||||
|
||||
"enter"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Emitted when the mouse cursor enters the button.
|
||||
|
||||
"leave"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Emitted when the mouse cursor leaves the button.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
|
||||
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
# package_tutorial.sh - Package up the tutorial into various formats
|
||||
# Copyright (C) Tony Gale 1999
|
||||
# Contact: gale@gtk.org
|
||||
#
|
||||
# NOTE: This script requires the following to be installed:
|
||||
# o SGML Tools
|
||||
# o Latex
|
||||
# o DVI tools
|
||||
|
||||
TARGET=`pwd`/gtk_tut.sgml
|
||||
GIFS="`pwd`/*.gif"
|
||||
EXAMPLES=`pwd`/../examples
|
||||
|
||||
PATH=`pwd`:$PATH
|
||||
|
||||
DATE=`date '+%y%m%d'`
|
||||
|
||||
# Check top level directory
|
||||
if [ ! -d gtk_tutorial ]; then
|
||||
if [ -e gtk_tutorial ]; then
|
||||
echo "ERROR: gtk_tutorial is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir gtk_tutorial.$DATE
|
||||
fi
|
||||
|
||||
cd gtk_tutorial.$DATE
|
||||
|
||||
# SGML Format
|
||||
echo -n "Copy SGML and GIF's.... "
|
||||
if [ ! -d sgml ]; then
|
||||
if [ -e sgml ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir sgml
|
||||
fi
|
||||
|
||||
(cd sgml ; cp $TARGET . ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# HTML Format
|
||||
echo -n "Formatting into HTML.... "
|
||||
if [ ! -d html ]; then
|
||||
if [ -e html ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir html
|
||||
fi
|
||||
|
||||
(cd html ; sgml2html $TARGET ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# Text Format
|
||||
echo -n "Formatting into Text.... "
|
||||
if [ ! -d txt ]; then
|
||||
if [ -e txt ]; then
|
||||
echo "ERROR: txt is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir txt
|
||||
fi
|
||||
|
||||
(cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null )
|
||||
echo "done"
|
||||
|
||||
# PS and DVI Format
|
||||
echo -n "Formatting into PS and DVI.... "
|
||||
if [ ! -d ps ]; then
|
||||
if [ -e ps ]; then
|
||||
echo "ERROR: ps is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir ps
|
||||
fi
|
||||
|
||||
(cd ps ; sgml2latex --output=ps $TARGET > /dev/null)
|
||||
(cd ps ; sgml2latex $TARGET > /dev/null)
|
||||
echo "done"
|
||||
|
||||
# Copy examples
|
||||
echo -n "Copying examples"
|
||||
cp -R $EXAMPLES .
|
||||
(cd examples ; make clean ; rm -rf CVS */CVS)
|
||||
echo "done"
|
||||
|
||||
# Package it all up
|
||||
echo -n "Creating packages.... "
|
||||
cd ..
|
||||
tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE
|
||||
echo "done"
|
||||
|
||||
rm -rf gtk_tutorial.$DATE
|
||||
|
||||
echo
|
||||
echo Package gtk_tutorial.$DATE.tar.gz created.
|
||||
echo
|
||||
@@ -15,7 +15,7 @@ functions that follow these conventions:
|
||||
GtkObjects also provide the following functions:
|
||||
|
||||
*_destroy: Render an object `unusable', but as long as there are
|
||||
references to it, its allocated memory will not be freed.
|
||||
references to it, it's allocated memory will not be freed.
|
||||
*_sink: Clear a GtkObjects `floating' state and decrement the
|
||||
reference count by 1.
|
||||
|
||||
@@ -240,7 +240,7 @@ Taking care of proper referencing
|
||||
---------------------------------
|
||||
|
||||
There are some cases where referencing of widgets from outside the toolkit
|
||||
(on the application side) is needed.
|
||||
(on the application side is needed).
|
||||
Once the application performes an operation on a widget that will cause
|
||||
its reference count to drop, if it wants to take further actions on the
|
||||
widget, it needs to hold a reference to it.
|
||||
@@ -248,7 +248,7 @@ widget, it needs to hold a reference to it.
|
||||
Example code sequences that require reference wraps:
|
||||
|
||||
/* gtk_container_remove() will unparent the child and therefore
|
||||
* cause its reference count to be decremented by one.
|
||||
* cause it's reference count to be decremented by one.
|
||||
*/
|
||||
gtk_widget_ref (widget);
|
||||
gtk_container_remove (container, widget);
|
||||
|
||||
@@ -25,17 +25,13 @@ gtk_widget_set_rc_style ()
|
||||
restore the default style otherwise.
|
||||
This will override a previously set user style or rc style.
|
||||
|
||||
gtk_widget_reset_rc_styles ()
|
||||
Descends through a widget heirarchy and sets the rc style
|
||||
on all widgets that don't have a user style set.
|
||||
|
||||
gtk_widget_restore_default_style ()
|
||||
Reset the widget's style to the default style, this is only usefull if
|
||||
the widgets default style had been saved by previous calls to
|
||||
gtk_widget_set_style() or gtk_widget_set_rc_style().
|
||||
|
||||
gtk_widget_ensure_style ()
|
||||
Ensure that the widget either has a user style set, or an rc lookup
|
||||
Ensure taht the widget either has a user style set, or an rc lookup
|
||||
has been performed.
|
||||
|
||||
gtk_rc_get_style ()
|
||||
@@ -59,7 +55,7 @@ gtk_widget_set_parent ()
|
||||
that do not have a user style set.
|
||||
|
||||
gtk_style_copy ()
|
||||
This function can be used to copy a widget's style.
|
||||
This function can be used to copy a widgets style.
|
||||
The style can subsequntly be changed (e.g., by modifications to the
|
||||
red/green/blue values of a certain color) and then be applied to the
|
||||
widget via gtk_widget_set_style().
|
||||
@@ -88,13 +84,13 @@ GtkWidget::style_set
|
||||
Flag indications:
|
||||
|
||||
!GTK_RC_STYLE && !GTK_USER_STYLE:
|
||||
The widget has its default style set, no rc lookup has been
|
||||
The widget has it's default style set, no rc lookup has been
|
||||
performed, the widget has not been size requested yet and is
|
||||
therefore not yet realized.
|
||||
|
||||
GTK_USER_STYLE:
|
||||
GTK_RC_STYLE is not set.
|
||||
The widget has a user style assigned, and its default style has been
|
||||
The widget has a user style assigned, and it's default style has been
|
||||
saved.
|
||||
|
||||
GTK_RC_STYLE:
|
||||
|
||||
4692
docs/texinfo.tex
Normal file
4692
docs/texinfo.tex
Normal file
File diff suppressed because it is too large
Load Diff
@@ -398,7 +398,7 @@ according the the tab continuation of the previous line.
|
||||
Exposure and drawing:
|
||||
|
||||
Exposure is handled from the EXPOSE_TEXT function. It assumes that
|
||||
the LINE_START_CACHE and all its parameters are accurate and simply
|
||||
the LINE_START_CACHE and all it's parameters are accurate and simply
|
||||
exposes any line which is in the exposure region. It calls the
|
||||
CLEAR_AREA function to clear the background and/or lay down a pixmap
|
||||
background. The text widget has a scrollable pixmap background, which
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
name="<imain@gtk.org>"></tt>,
|
||||
Tony Gale <tt><htmlurl url="mailto:gale@gtk.org"
|
||||
name="<gale@gtk.org>"></tt>
|
||||
<date>May 24th, 1998 - Traduzione aggiornata al 27 Maggio 1998
|
||||
<date>April 6th, 1998 - Traduzione aggiornata al 1 Maggio 1998
|
||||
|
||||
<abstract>Tradotto da Michel Morelli, <tt><htmlurl url="mailto:ziobudda@chiara.dei.unipd.it" name="ziobudda@chiara.dei.unipd.it"></tt>, Daniele Canazza, <tt><htmlurl url="mailto:dcanazz@tin.it" name="dcanazz@tin.it"></tt> e Antonio Schifano, <tt><htmlurl url="mailto:schifano@cli.di.unipi.it" name="schifano@cli.di.unipi.it"></tt>
|
||||
</abstract>
|
||||
@@ -342,7 +342,7 @@ La funzione specificata come terzo argomento è chiamata ``funzione di
|
||||
ritorno (callback)'', e dovrebbe essere della forma:
|
||||
|
||||
<tscreen><verb>
|
||||
void callback_func(GtkWidget *widget, gpointer callback_data);
|
||||
void callback_func(GtkWidget *widget, gpointer *callback_data);
|
||||
</verb></tscreen>
|
||||
<p>
|
||||
Dove il primo argomento sarà un puntatore al widget che emette il segnale
|
||||
@@ -391,7 +391,7 @@ difficile farci invece qualcosa. Il prossimo esempio userà l'argomento pa
|
||||
per dire quale bottone è stato premuto.
|
||||
|
||||
<tscreen><verb>
|
||||
void hello (GtkWidget *widget, gpointer data)
|
||||
void hello (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello World\n");
|
||||
}
|
||||
@@ -423,7 +423,7 @@ chiamando gtk_main_quit(). Questa funzione dice a GTK che deve uscire da gtk_mai
|
||||
quando gli viene restituito il controllo.
|
||||
|
||||
<tscreen><verb>
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -661,13 +661,13 @@ l'impacchettamento dei widget.
|
||||
|
||||
/* La nostra funzione di callback migliorata. I dati passati a questa
|
||||
* vengono stampati su stdout. */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
|
||||
/* Un'altra callback */
|
||||
void delete_event (GtkWidget *widget, gpointer data)
|
||||
void delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -901,7 +901,7 @@ problemi nel seguirlo. Compilatelo voi stessi e provate a giocarci un po'.
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
void
|
||||
delete_event (GtkWidget *widget, gpointer data)
|
||||
delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -1348,13 +1348,13 @@ Ecco il codice sorgente:
|
||||
|
||||
/* la nostra funzione di ritorno.
|
||||
* i dati passati a questa funzione vengono stampati su stdout */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
|
||||
/* questa funzione fa uscire dal programma */
|
||||
void delete_event (GtkWidget *widget, gpointer data)
|
||||
void delete_event (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -1699,7 +1699,7 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
|
||||
}
|
||||
|
||||
/* la nostra solita funzione di callback */
|
||||
void callback (GtkWidget *widget, gpointer data)
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
@@ -1922,7 +1922,7 @@ Nel seguente esempio creiamo un gruppo di tre radio-bottoni.
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -2059,8 +2059,8 @@ distribuito con GTK.
|
||||
Con alcuni widget (per esempio con l'etichetta) i suggerimenti non funzionano.
|
||||
<p>
|
||||
La prima chiamata che si usa per creare un nuovo tooltip è la seguente.
|
||||
In una data funzione, è necessario chiamarla una sola volta: il <tt/GtkTooltip/
|
||||
che viene restituito da questa funzione può essere usato per creare suggerimenti
|
||||
In una data funzione, è necessario chiamarla una sola volta: il GtkTooltip
|
||||
che viene ritornato da questa funzione può essere usato per creare suggerimenti
|
||||
multipli.
|
||||
|
||||
<tscreen><verb>
|
||||
@@ -2071,15 +2071,14 @@ Una volta creato un nuovo suggerimento e il widget su cui lo volete usare,
|
||||
basta usare la seguente chiamata per fare l'assegnazione:
|
||||
|
||||
<tscreen><verb>
|
||||
void gtk_tooltips_set_tip (GtkTooltips *tooltips,
|
||||
GtkWidget *widget,
|
||||
const gchar *tip_text,
|
||||
const gchar *tip_private);
|
||||
void gtk_tooltips_set_tips (GtkTooltips *tooltips,
|
||||
GtkWidget *widget,
|
||||
gchar *tips_text);
|
||||
</verb></tscreen>
|
||||
|
||||
Il primo argomento è il suggerimento che era già stato creato, che è seguito
|
||||
dal widget da cui volete che spunti il suggerimento e dal testo che volete
|
||||
venga mostrato. L'ultimo argomento può essere posto a NULL.
|
||||
venga mostrato.
|
||||
<p>
|
||||
Ecco un piccolo esempio:
|
||||
|
||||
@@ -2090,8 +2089,9 @@ GtkWidget *button;
|
||||
tooltips = gtk_tooltips_new ();
|
||||
button = gtk_button_new_with_label ("button 1");
|
||||
...
|
||||
gtk_tooltips_set_tips (tooltips, button, "This is button 1", NULL);
|
||||
gtk_tooltips_set_tips (tooltips, button, "This is button 1");
|
||||
</verb></tscreen>
|
||||
|
||||
Ci sono anche altre funzioni che si usano con i suggerimenti. Eccone una lista
|
||||
con una breve descrizione di quello che fanno.
|
||||
|
||||
@@ -2209,7 +2209,7 @@ void progress_r (void)
|
||||
pstat = FALSE;
|
||||
}
|
||||
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -2331,7 +2331,7 @@ GtkWidget* gtk_dialog_new (void);
|
||||
Per cui, per creare una nuova finestra di dialogo, uate:
|
||||
|
||||
<tscreen><verb>
|
||||
GtkWidget *window;
|
||||
GtkWidget window;
|
||||
window = gtk_dialog_new ();
|
||||
</verb></tscreen>
|
||||
|
||||
@@ -2521,12 +2521,12 @@ static const char * xpm_data[] = {
|
||||
|
||||
|
||||
/* quando invocata (con il segnale delete_event), termina l'applicazione. */
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
/* invocata se il bottone è clickato. Stampa semplicemente un messaggio */
|
||||
void button_clicked( GtkWidget *widget, gpointer data ) {
|
||||
void button_clicked( GtkWidget *widget, gpointer *data ) {
|
||||
printf( "button clicked\n" );
|
||||
}
|
||||
|
||||
@@ -2724,7 +2724,7 @@ static char * WheelbarrowFull_xpm[] = {
|
||||
|
||||
|
||||
/* quando invocata (con il segnale delete_event), termina l'applicazione. */
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -2884,7 +2884,7 @@ La sistemazione dell'area di disegno e dei righelli viene fatta usando una tabel
|
||||
|
||||
/* il controllo raggiunge questa routine quando si preme il bottone close
|
||||
*/
|
||||
void close_application( GtkWidget *widget, gpointer data ) {
|
||||
void close_application( GtkWidget *widget, gpointer *data ) {
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
@@ -3010,7 +3010,7 @@ elementi sulla barra di stato e l'altro per riuovere l'ultimo elemento..
|
||||
|
||||
GtkWidget *status_bar;
|
||||
|
||||
void push_item (GtkWidget *widget, gpointer data)
|
||||
void push_item (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
static int count = 1;
|
||||
char buff[20];
|
||||
@@ -3021,7 +3021,7 @@ void push_item (GtkWidget *widget, gpointer data)
|
||||
return;
|
||||
}
|
||||
|
||||
void pop_item (GtkWidget *widget, gpointer data)
|
||||
void pop_item (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data );
|
||||
return;
|
||||
@@ -3559,7 +3559,7 @@ void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
|
||||
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
|
||||
}
|
||||
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
void destroy (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -3752,7 +3752,7 @@ void remove_book (GtkButton *button, GtkNotebook *notebook)
|
||||
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
|
||||
}
|
||||
|
||||
void delete (GtkWidget *widget, gpointer data)
|
||||
void delete (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
@@ -3930,7 +3930,7 @@ visualizzata, mentre con GTK_POLICY_ALWAYS la barra verrà sempre mostrata
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void destroy(GtkWidget *widget, gpointer data)
|
||||
void destroy(GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
@@ -5116,7 +5116,7 @@ void gtk_menu_bar_append( GtkMenuBar *menu_bar, GtkWidget *menu_item);
|
||||
che nel nostro caso è:
|
||||
|
||||
<tscreen><verb>
|
||||
gtk_menu_bar_append( GTK_MENU_BAR(menu_bar), file_item );
|
||||
gtk_menu_bar_append( menu_bar, file_item );
|
||||
</verb></tscreen>
|
||||
|
||||
|
||||
@@ -5855,7 +5855,7 @@ caldamente di dare un'occhiata ai loro rispettivi file header nella
|
||||
distribuzione di GTK. I nomi delle funzioni di GTK sono molto descrittivi.
|
||||
Non appena si capisce come funzionano le cose, non è
|
||||
difficile dedurre il modo d'uso di un widget semplicemente guardando la
|
||||
dichiarazione di funzione associata ad esso. Aggiungendo a questo qualche
|
||||
dichiarazione di funzione ad esso associata. Aggiungendo a questo qualche
|
||||
spunto tratto dal codice di altri non dovrebbero esserci problemi.
|
||||
|
||||
Quando avrete raggiunto una comprensione globale di tutte le funzioni
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
# package_tutorial.sh - Package up the tutorial into various formats
|
||||
# Copyright (C) Tony Gale 1999
|
||||
# Contact: gale@gtk.org
|
||||
#
|
||||
# NOTE: This script requires the following to be installed:
|
||||
# o SGML Tools
|
||||
# o Latex
|
||||
# o DVI tools
|
||||
|
||||
TARGET=`pwd`/gtk_tut.sgml
|
||||
GIFS="`pwd`/*.gif"
|
||||
EXAMPLES=`pwd`/../examples
|
||||
|
||||
PATH=`pwd`:$PATH
|
||||
|
||||
DATE=`date '+%y%m%d'`
|
||||
|
||||
# Check top level directory
|
||||
if [ ! -d gtk_tutorial ]; then
|
||||
if [ -e gtk_tutorial ]; then
|
||||
echo "ERROR: gtk_tutorial is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir gtk_tutorial.$DATE
|
||||
fi
|
||||
|
||||
cd gtk_tutorial.$DATE
|
||||
|
||||
# SGML Format
|
||||
echo -n "Copy SGML and GIF's.... "
|
||||
if [ ! -d sgml ]; then
|
||||
if [ -e sgml ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir sgml
|
||||
fi
|
||||
|
||||
(cd sgml ; cp $TARGET . ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# HTML Format
|
||||
echo -n "Formatting into HTML.... "
|
||||
if [ ! -d html ]; then
|
||||
if [ -e html ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir html
|
||||
fi
|
||||
|
||||
(cd html ; sgml2html $TARGET ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# Text Format
|
||||
echo -n "Formatting into Text.... "
|
||||
if [ ! -d txt ]; then
|
||||
if [ -e txt ]; then
|
||||
echo "ERROR: txt is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir txt
|
||||
fi
|
||||
|
||||
(cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null )
|
||||
echo "done"
|
||||
|
||||
# PS and DVI Format
|
||||
echo -n "Formatting into PS and DVI.... "
|
||||
if [ ! -d ps ]; then
|
||||
if [ -e ps ]; then
|
||||
echo "ERROR: ps is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir ps
|
||||
fi
|
||||
|
||||
(cd ps ; sgml2latex --output=ps $TARGET > /dev/null)
|
||||
(cd ps ; sgml2latex $TARGET > /dev/null)
|
||||
echo "done"
|
||||
|
||||
# Copy examples
|
||||
echo -n "Copying examples"
|
||||
cp -R $EXAMPLES .
|
||||
(cd examples ; make clean ; rm -rf CVS */CVS)
|
||||
echo "done"
|
||||
|
||||
# Package it all up
|
||||
echo -n "Creating packages.... "
|
||||
cd ..
|
||||
tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE
|
||||
echo "done"
|
||||
|
||||
rm -rf gtk_tutorial.$DATE
|
||||
|
||||
echo
|
||||
echo Package gtk_tutorial.$DATE.tar.gz created.
|
||||
echo
|
||||
@@ -391,7 +391,7 @@ When a widget receives the unmap signal, it must:
|
||||
2) If the widget does not have a window, unmap all child widgets
|
||||
3) Do any other functions related to taking the widget offscreen
|
||||
(for instance, removing popup windows...)
|
||||
4) Unset GTK_MAPPED
|
||||
3) Unset GTK_MAPPED
|
||||
|
||||
|
||||
The Unrealize signal
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
|
||||
SUBDIRS = arrow \
|
||||
aspectframe \
|
||||
base \
|
||||
buttonbox \
|
||||
buttons \
|
||||
calendar \
|
||||
clist \
|
||||
entry \
|
||||
eventbox \
|
||||
filesel \
|
||||
fixed \
|
||||
frame \
|
||||
gtkdial \
|
||||
helloworld \
|
||||
helloworld2 \
|
||||
label \
|
||||
list \
|
||||
menu \
|
||||
notebook \
|
||||
packbox \
|
||||
packer \
|
||||
paned \
|
||||
pixmap \
|
||||
progressbar \
|
||||
radiobuttons \
|
||||
rangewidgets \
|
||||
rulers \
|
||||
scribble-simple \
|
||||
scribble-xinput \
|
||||
scrolledwin \
|
||||
selection \
|
||||
spinbutton \
|
||||
statusbar \
|
||||
table \
|
||||
text \
|
||||
tictactoe \
|
||||
tree \
|
||||
wheelbarrow
|
||||
|
||||
all:
|
||||
list='$(SUBDIRS)'; \
|
||||
for subdir in $$list; do \
|
||||
(cd $$subdir && $(MAKE)); \
|
||||
done
|
||||
|
||||
clean:
|
||||
list='$(SUBDIRS)'; \
|
||||
for subdir in $$list; do \
|
||||
(cd $$subdir && $(MAKE) clean); \
|
||||
done
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
GTK Example Code - Tony Gale <gale@gtk.org> 980623
|
||||
--------------------------------------------------
|
||||
|
||||
I have written an awk script to automatically extract the code
|
||||
examples from the GTK Tutorial (in sgml), so they only have to be
|
||||
changed in one place.
|
||||
|
||||
It's called 'extract.awk', and there is a shell wrapper to invoke
|
||||
it called 'extract.sh'
|
||||
|
||||
It takes the following switches:
|
||||
-c : Just do checking rather than output files
|
||||
-f <filename> : Extract a specific file
|
||||
-d : Extract file(s) to current directory
|
||||
|
||||
Without the -d switch, the code will be placed in the appropriate
|
||||
sub-directory. Those sub-directories will be created if they do not
|
||||
exist.
|
||||
|
||||
Without the -f switch, all code examples will be extracted.
|
||||
|
||||
The shell wrapper assumes that the GTK Tutorial is in the
|
||||
file "../docs/gtk_tut.sgml"
|
||||
|
||||
It works by looking for sections of text in the tutorial surrounded
|
||||
by, for example:
|
||||
|
||||
/* example-start helloworld helloworld.c */
|
||||
|
||||
and
|
||||
|
||||
/* example-end */
|
||||
|
||||
Where "helloworld" is the directory into which the file will be
|
||||
placed (which can also be a directory spec like hello/hello1), and
|
||||
"helloworld.c" is the file name for the code.
|
||||
|
||||
So, the code between these lines would be extracted to the file
|
||||
helloworld/helloworld.c
|
||||
|
||||
It also handles replacing the sgml tag '&' with '&'
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
arrow: arrow.c
|
||||
$(CC) `gtk-config --cflags` arrow.c -o arrow `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o arrow
|
||||
@@ -1,74 +0,0 @@
|
||||
/* example-start arrow arrow.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Create an Arrow widget with the specified parameters
|
||||
* and pack it into a button */
|
||||
GtkWidget *create_arrow_button( GtkArrowType arrow_type,
|
||||
GtkShadowType shadow_type )
|
||||
{
|
||||
GtkWidget *button;
|
||||
GtkWidget *arrow;
|
||||
|
||||
button = gtk_button_new();
|
||||
arrow = gtk_arrow_new (arrow_type, shadow_type);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), arrow);
|
||||
|
||||
gtk_widget_show(button);
|
||||
gtk_widget_show(arrow);
|
||||
|
||||
return(button);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
/* GtkWidget is the storage type for widgets */
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
GtkWidget *box;
|
||||
|
||||
/* Initialize the toolkit */
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create a new window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Arrow Buttons");
|
||||
|
||||
/* It's a good idea to do this for all windows. */
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
|
||||
/* Sets the border width of the window. */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
/* Create a box to hold the arrows/buttons */
|
||||
box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Pack and show all our widgets */
|
||||
gtk_widget_show(box);
|
||||
|
||||
button = create_arrow_button(GTK_ARROW_UP, GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3);
|
||||
|
||||
button = create_arrow_button(GTK_ARROW_DOWN, GTK_SHADOW_OUT);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3);
|
||||
|
||||
button = create_arrow_button(GTK_ARROW_LEFT, GTK_SHADOW_ETCHED_IN);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3);
|
||||
|
||||
button = create_arrow_button(GTK_ARROW_RIGHT, GTK_SHADOW_ETCHED_OUT);
|
||||
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* Rest in gtk_main and wait for the fun to begin! */
|
||||
gtk_main ();
|
||||
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
@@ -2,7 +2,7 @@
|
||||
CC = gcc
|
||||
|
||||
aspectframe: aspectframe.c
|
||||
$(CC) `gtk-config --cflags` aspectframe.c -o aspectframe `gtk-config --libs`
|
||||
$(CC) `gtk-config --cflags` `gtk-config --libs` aspectframe.c -o aspectframe
|
||||
|
||||
clean:
|
||||
rm -f *.o aspectframe
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* example-start aspectframe aspectframe.c */
|
||||
/* aspectframe.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *aspect_frame;
|
||||
@@ -13,8 +13,8 @@ int main( int argc,
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Aspect Frame");
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
|
||||
gtk_container_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
/* Create an aspect_frame and add it to our toplevel window */
|
||||
|
||||
@@ -41,4 +41,3 @@ int main( int argc,
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
/* example-end */
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
base: base.c
|
||||
$(CC) `gtk-config --cflags` base.c -o base `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o base
|
||||
@@ -1,19 +0,0 @@
|
||||
/* example-start base base.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
buttonbox: buttonbox.c
|
||||
$(CC) `gtk-config --cflags` buttonbox.c -o buttonbox `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o buttonbox
|
||||
@@ -1,122 +0,0 @@
|
||||
/* example-start buttonbox buttonbox.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Create a Button Box with the specified parameters */
|
||||
GtkWidget *create_bbox( gint horizontal,
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint child_w,
|
||||
gint child_h,
|
||||
gint layout )
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
GtkWidget *button;
|
||||
|
||||
frame = gtk_frame_new (title);
|
||||
|
||||
if (horizontal)
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
else
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
/* Set the appearance of the Button Box */
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), spacing);
|
||||
gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), child_w, child_h);
|
||||
|
||||
button = gtk_button_new_with_label ("OK");
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label ("Cancel");
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
button = gtk_button_new_with_label ("Help");
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
|
||||
return(frame);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
static GtkWidget* window = NULL;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *frame_horz;
|
||||
GtkWidget *frame_vert;
|
||||
|
||||
/* Initialize GTK */
|
||||
gtk_init( &argc, &argv );
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_main_quit),
|
||||
NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread (spacing 40)", 40, 85, 20, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge (spacing 30)", 30, 85, 20, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start (spacing 20)", 20, 85, 20, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End (spacing 10)", 10, 85, 20, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread (spacing 5)", 5, 85, 20, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge (spacing 30)", 30, 85, 20, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start (spacing 20)", 20, 85, 20, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End (spacing 20)", 20, 85, 20, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
/* Enter the event loop */
|
||||
gtk_main ();
|
||||
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
@@ -2,7 +2,7 @@
|
||||
CC = gcc
|
||||
|
||||
buttons: buttons.c
|
||||
$(CC) `gtk-config --cflags` buttons.c -o buttons `gtk-config --libs`
|
||||
$(CC) `gtk-config --cflags` `gtk-config --libs` buttons.c -o buttons
|
||||
|
||||
clean:
|
||||
rm -f *.o buttons
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* example-start buttons buttons.c */
|
||||
/* This file extracted from the GTK tutorial. */
|
||||
|
||||
/* buttons.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Create a new hbox with an image and a label packed into it
|
||||
* and return the box. */
|
||||
/* create a new hbox with an image and a label packed into it
|
||||
* and return the box.. */
|
||||
|
||||
GtkWidget *xpm_label_box( GtkWidget *parent,
|
||||
gchar *xpm_filename,
|
||||
gchar *label_text )
|
||||
GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_text)
|
||||
{
|
||||
GtkWidget *box1;
|
||||
GtkWidget *label;
|
||||
@@ -16,24 +16,24 @@ GtkWidget *xpm_label_box( GtkWidget *parent,
|
||||
GdkBitmap *mask;
|
||||
GtkStyle *style;
|
||||
|
||||
/* Create box for xpm and label */
|
||||
/* create box for xpm and label */
|
||||
box1 = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box1), 2);
|
||||
gtk_container_border_width (GTK_CONTAINER (box1), 2);
|
||||
|
||||
/* Get the style of the button to get the
|
||||
* background color. */
|
||||
/* get style of button.. I assume it's to get the background color.
|
||||
* if someone knows the real reason, please enlighten me. */
|
||||
style = gtk_widget_get_style(parent);
|
||||
|
||||
/* Now on to the xpm stuff */
|
||||
/* now on to the xpm stuff.. load xpm */
|
||||
pixmap = gdk_pixmap_create_from_xpm (parent->window, &mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
xpm_filename);
|
||||
pixmapwid = gtk_pixmap_new (pixmap, mask);
|
||||
|
||||
/* Create a label for the button */
|
||||
/* create label for button */
|
||||
label = gtk_label_new (label_text);
|
||||
|
||||
/* Pack the pixmap and label into the box */
|
||||
/* pack the pixmap and label into the box */
|
||||
gtk_box_pack_start (GTK_BOX (box1),
|
||||
pixmapwid, FALSE, FALSE, 3);
|
||||
|
||||
@@ -42,19 +42,17 @@ GtkWidget *xpm_label_box( GtkWidget *parent,
|
||||
gtk_widget_show(pixmapwid);
|
||||
gtk_widget_show(label);
|
||||
|
||||
return(box1);
|
||||
return (box1);
|
||||
}
|
||||
|
||||
/* Our usual callback function */
|
||||
void callback( GtkWidget *widget,
|
||||
gpointer data )
|
||||
/* our usual callback function */
|
||||
void callback (GtkWidget *widget, gpointer *data)
|
||||
{
|
||||
g_print ("Hello again - %s was pressed\n", (char *) data);
|
||||
}
|
||||
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
/* GtkWidget is the storage type for widgets */
|
||||
GtkWidget *window;
|
||||
@@ -63,7 +61,7 @@ int main( int argc,
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create a new window */
|
||||
/* create a new window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Pixmap'd Buttons!");
|
||||
@@ -75,21 +73,22 @@ int main( int argc,
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gtk_exit), NULL);
|
||||
|
||||
/* Sets the border width of the window. */
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
/* sets the border width of the window. */
|
||||
gtk_container_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_widget_realize(window);
|
||||
|
||||
/* Create a new button */
|
||||
/* create a new button */
|
||||
button = gtk_button_new ();
|
||||
|
||||
/* Connect the "clicked" signal of the button to our callback */
|
||||
/* You should be getting used to seeing most of these functions by now */
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (callback), (gpointer) "cool button");
|
||||
|
||||
/* This calls our box creating function */
|
||||
/* this calls our box creating function */
|
||||
box1 = xpm_label_box(window, "info.xpm", "cool button");
|
||||
|
||||
/* Pack and show all our widgets */
|
||||
/* pack and show all our widgets */
|
||||
gtk_widget_show(box1);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), box1);
|
||||
@@ -100,9 +99,8 @@ int main( int argc,
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* Rest in gtk_main and wait for the fun to begin! */
|
||||
/* rest in gtk_main and wait for the fun to begin! */
|
||||
gtk_main ();
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
/* example-end */
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
calendar: calendar.c
|
||||
$(CC) `gtk-config --cflags` calendar.c -o calendar `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f calendar
|
||||
@@ -1,424 +0,0 @@
|
||||
/* example-start calendar calendar.c */
|
||||
/*
|
||||
* Copyright (C) 1998 Cesar Miquel, Shawn T. Amundson, Mattias Grönlund
|
||||
* Copyright (C) 2000 Tony Gale
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#define DEF_PAD 10
|
||||
#define DEF_PAD_SMALL 5
|
||||
|
||||
#define TM_YEAR_BASE 1900
|
||||
|
||||
typedef struct _CalendarData {
|
||||
GtkWidget *flag_checkboxes[5];
|
||||
gboolean settings[5];
|
||||
gchar *font;
|
||||
GtkWidget *font_dialog;
|
||||
GtkWidget *window;
|
||||
GtkWidget *prev2_sig;
|
||||
GtkWidget *prev_sig;
|
||||
GtkWidget *last_sig;
|
||||
GtkWidget *month;
|
||||
} CalendarData;
|
||||
|
||||
enum {
|
||||
calendar_show_header,
|
||||
calendar_show_days,
|
||||
calendar_month_change,
|
||||
calendar_show_week,
|
||||
calendar_monday_first
|
||||
};
|
||||
|
||||
/*
|
||||
* GtkCalendar
|
||||
*/
|
||||
|
||||
void calendar_date_to_string( CalendarData *data,
|
||||
char *buffer,
|
||||
gint buff_len )
|
||||
{
|
||||
struct tm tm;
|
||||
time_t time;
|
||||
|
||||
memset (&tm, 0, sizeof (tm));
|
||||
gtk_calendar_get_date (GTK_CALENDAR(data->window),
|
||||
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
|
||||
tm.tm_year -= TM_YEAR_BASE;
|
||||
time = mktime(&tm);
|
||||
strftime (buffer, buff_len-1, "%x", gmtime(&time));
|
||||
}
|
||||
|
||||
void calendar_set_signal_strings( char *sig_str,
|
||||
CalendarData *data)
|
||||
{
|
||||
gchar *prev_sig;
|
||||
|
||||
gtk_label_get (GTK_LABEL (data->prev_sig), &prev_sig);
|
||||
gtk_label_set (GTK_LABEL (data->prev2_sig), prev_sig);
|
||||
|
||||
gtk_label_get (GTK_LABEL (data->last_sig), &prev_sig);
|
||||
gtk_label_set (GTK_LABEL (data->prev_sig), prev_sig);
|
||||
gtk_label_set (GTK_LABEL (data->last_sig), sig_str);
|
||||
}
|
||||
|
||||
void calendar_month_changed( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "month_changed: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+15, 256-15);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
void calendar_day_selected( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "day_selected: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+14, 256-14);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
void calendar_day_selected_double_click( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
struct tm tm;
|
||||
char buffer[256] = "day_selected_double_click: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+27, 256-27);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
|
||||
memset (&tm, 0, sizeof (tm));
|
||||
gtk_calendar_get_date (GTK_CALENDAR(data->window),
|
||||
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
|
||||
tm.tm_year -= TM_YEAR_BASE;
|
||||
|
||||
if(GTK_CALENDAR(data->window)->marked_date[tm.tm_mday-1] == 0) {
|
||||
gtk_calendar_mark_day(GTK_CALENDAR(data->window),tm.tm_mday);
|
||||
} else {
|
||||
gtk_calendar_unmark_day(GTK_CALENDAR(data->window),tm.tm_mday);
|
||||
}
|
||||
}
|
||||
|
||||
void calendar_prev_month( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "prev_month: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+12, 256-12);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
void calendar_next_month( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "next_month: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+12, 256-12);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
void calendar_prev_year( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "prev_year: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+11, 256-11);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
void calendar_next_year( GtkWidget *widget,
|
||||
CalendarData *data )
|
||||
{
|
||||
char buffer[256] = "next_year: ";
|
||||
|
||||
calendar_date_to_string (data, buffer+11, 256-11);
|
||||
calendar_set_signal_strings (buffer, data);
|
||||
}
|
||||
|
||||
|
||||
void calendar_set_flags( CalendarData *calendar )
|
||||
{
|
||||
gint i;
|
||||
gint options=0;
|
||||
for (i=0;i<5;i++)
|
||||
if (calendar->settings[i])
|
||||
{
|
||||
options=options + (1<<i);
|
||||
}
|
||||
if (calendar->window)
|
||||
gtk_calendar_display_options (GTK_CALENDAR (calendar->window), options);
|
||||
}
|
||||
|
||||
void calendar_toggle_flag( GtkWidget *toggle,
|
||||
CalendarData *calendar )
|
||||
{
|
||||
gint i;
|
||||
gint j;
|
||||
j=0;
|
||||
for (i=0; i<5; i++)
|
||||
if (calendar->flag_checkboxes[i] == toggle)
|
||||
j = i;
|
||||
|
||||
calendar->settings[j]=!calendar->settings[j];
|
||||
calendar_set_flags(calendar);
|
||||
|
||||
}
|
||||
|
||||
void calendar_font_selection_ok( GtkWidget *button,
|
||||
CalendarData *calendar )
|
||||
{
|
||||
GtkStyle *style;
|
||||
GdkFont *font;
|
||||
|
||||
calendar->font = gtk_font_selection_dialog_get_font_name(
|
||||
GTK_FONT_SELECTION_DIALOG (calendar->font_dialog));
|
||||
if (calendar->window)
|
||||
{
|
||||
font = gtk_font_selection_dialog_get_font(GTK_FONT_SELECTION_DIALOG(calendar->font_dialog));
|
||||
if (font)
|
||||
{
|
||||
style = gtk_style_copy (gtk_widget_get_style (calendar->window));
|
||||
gdk_font_unref (style->font);
|
||||
style->font = font;
|
||||
gdk_font_ref (style->font);
|
||||
gtk_widget_set_style (calendar->window, style);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void calendar_select_font( GtkWidget *button,
|
||||
CalendarData *calendar )
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
if (!calendar->font_dialog) {
|
||||
window = gtk_font_selection_dialog_new ("Font Selection Dialog");
|
||||
g_return_if_fail(GTK_IS_FONT_SELECTION_DIALOG(window));
|
||||
calendar->font_dialog = window;
|
||||
|
||||
gtk_window_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
||||
&calendar->font_dialog);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->ok_button),
|
||||
"clicked", GTK_SIGNAL_FUNC(calendar_font_selection_ok),
|
||||
calendar);
|
||||
gtk_signal_connect_object (GTK_OBJECT (GTK_FONT_SELECTION_DIALOG (window)->cancel_button),
|
||||
"clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (calendar->font_dialog));
|
||||
}
|
||||
window=calendar->font_dialog;
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
}
|
||||
|
||||
void create_calendar()
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox, *vbox2, *vbox3;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *hbbox;
|
||||
GtkWidget *calendar;
|
||||
GtkWidget *toggle;
|
||||
GtkWidget *button;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *separator;
|
||||
GtkWidget *label;
|
||||
GtkWidget *bbox;
|
||||
static CalendarData calendar_data;
|
||||
gint i;
|
||||
|
||||
struct {
|
||||
char *label;
|
||||
} flags[] =
|
||||
{
|
||||
{ "Show Heading" },
|
||||
{ "Show Day Names" },
|
||||
{ "No Month Change" },
|
||||
{ "Show Week Numbers" },
|
||||
{ "Week Start Monday" }
|
||||
};
|
||||
|
||||
|
||||
calendar_data.window = NULL;
|
||||
calendar_data.font = NULL;
|
||||
calendar_data.font_dialog = NULL;
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
calendar_data.settings[i]=0;
|
||||
}
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title(GTK_WINDOW(window), "GtkCalendar Example");
|
||||
gtk_container_border_width (GTK_CONTAINER (window), 5);
|
||||
gtk_signal_connect(GTK_OBJECT(window), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_main_quit),
|
||||
NULL);
|
||||
gtk_signal_connect(GTK_OBJECT(window), "delete-event",
|
||||
GTK_SIGNAL_FUNC(gtk_false),
|
||||
NULL);
|
||||
|
||||
gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, TRUE);
|
||||
|
||||
vbox = gtk_vbox_new(FALSE, DEF_PAD);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
* The top part of the window, Calendar, flags and fontsel.
|
||||
*/
|
||||
|
||||
hbox = gtk_hbox_new(FALSE, DEF_PAD);
|
||||
gtk_box_pack_start (GTK_BOX(vbox), hbox, TRUE, TRUE, DEF_PAD);
|
||||
hbbox = gtk_hbutton_box_new();
|
||||
gtk_box_pack_start(GTK_BOX(hbox), hbbox, FALSE, FALSE, DEF_PAD);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(hbbox), GTK_BUTTONBOX_SPREAD);
|
||||
gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbbox), 5);
|
||||
|
||||
/* Calendar widget */
|
||||
frame = gtk_frame_new("Calendar");
|
||||
gtk_box_pack_start(GTK_BOX(hbbox), frame, FALSE, TRUE, DEF_PAD);
|
||||
calendar=gtk_calendar_new();
|
||||
calendar_data.window = calendar;
|
||||
calendar_set_flags(&calendar_data);
|
||||
gtk_calendar_mark_day ( GTK_CALENDAR(calendar), 19);
|
||||
gtk_container_add( GTK_CONTAINER( frame), calendar);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "month_changed",
|
||||
GTK_SIGNAL_FUNC (calendar_month_changed),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "day_selected",
|
||||
GTK_SIGNAL_FUNC (calendar_day_selected),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "day_selected_double_click",
|
||||
GTK_SIGNAL_FUNC (calendar_day_selected_double_click),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "prev_month",
|
||||
GTK_SIGNAL_FUNC (calendar_prev_month),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "next_month",
|
||||
GTK_SIGNAL_FUNC (calendar_next_month),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "prev_year",
|
||||
GTK_SIGNAL_FUNC (calendar_prev_year),
|
||||
&calendar_data);
|
||||
gtk_signal_connect (GTK_OBJECT (calendar), "next_year",
|
||||
GTK_SIGNAL_FUNC (calendar_next_year),
|
||||
&calendar_data);
|
||||
|
||||
|
||||
separator = gtk_vseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), separator, FALSE, TRUE, 0);
|
||||
|
||||
vbox2 = gtk_vbox_new(FALSE, DEF_PAD);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), vbox2, FALSE, FALSE, DEF_PAD);
|
||||
|
||||
/* Build the Right frame with the flags in */
|
||||
|
||||
frame = gtk_frame_new("Flags");
|
||||
gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, DEF_PAD);
|
||||
vbox3 = gtk_vbox_new(TRUE, DEF_PAD_SMALL);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox3);
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
toggle = gtk_check_button_new_with_label(flags[i].label);
|
||||
gtk_signal_connect (GTK_OBJECT (toggle),
|
||||
"toggled",
|
||||
GTK_SIGNAL_FUNC(calendar_toggle_flag),
|
||||
&calendar_data);
|
||||
gtk_box_pack_start (GTK_BOX (vbox3), toggle, TRUE, TRUE, 0);
|
||||
calendar_data.flag_checkboxes[i]=toggle;
|
||||
}
|
||||
/* Build the right font-button */
|
||||
button = gtk_button_new_with_label("Font...");
|
||||
gtk_signal_connect (GTK_OBJECT (button),
|
||||
"clicked",
|
||||
GTK_SIGNAL_FUNC(calendar_select_font),
|
||||
&calendar_data);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
|
||||
/*
|
||||
* Build the Signal-event part.
|
||||
*/
|
||||
|
||||
frame = gtk_frame_new("Signal events");
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, DEF_PAD);
|
||||
|
||||
vbox2 = gtk_vbox_new(TRUE, DEF_PAD_SMALL);
|
||||
gtk_container_add(GTK_CONTAINER(frame), vbox2);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Signal:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
calendar_data.last_sig = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.last_sig, FALSE, TRUE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Previous signal:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
calendar_data.prev_sig = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev_sig, FALSE, TRUE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Second previous signal:");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
|
||||
calendar_data.prev2_sig = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.prev2_sig, FALSE, TRUE, 0);
|
||||
|
||||
bbox = gtk_hbutton_box_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
|
||||
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit),
|
||||
NULL);
|
||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (button);
|
||||
|
||||
gtk_widget_show_all(window);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
gtk_set_locale ();
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
create_calendar();
|
||||
|
||||
gtk_main();
|
||||
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
clist: clist.c
|
||||
$(CC) `gtk-config --cflags` clist.c -o clist `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o clist
|
||||
@@ -1,174 +0,0 @@
|
||||
/* example-start clist clist.c */
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* User clicked the "Add List" button. */
|
||||
void button_add_clicked( gpointer data )
|
||||
{
|
||||
int indx;
|
||||
|
||||
/* Something silly to add to the list. 4 rows of 2 columns each */
|
||||
gchar *drink[4][2] = { { "Milk", "3 Oz" },
|
||||
{ "Water", "6 l" },
|
||||
{ "Carrots", "2" },
|
||||
{ "Snakes", "55" } };
|
||||
|
||||
/* Here we do the actual adding of the text. It's done once for
|
||||
* each row.
|
||||
*/
|
||||
for ( indx=0 ; indx < 4 ; indx++ )
|
||||
gtk_clist_append( (GtkCList *) data, drink[indx]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* User clicked the "Clear List" button. */
|
||||
void button_clear_clicked( gpointer data )
|
||||
{
|
||||
/* Clear the list using gtk_clist_clear. This is much faster than
|
||||
* calling gtk_clist_remove once for each row.
|
||||
*/
|
||||
gtk_clist_clear( (GtkCList *) data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* The user clicked the "Hide/Show titles" button. */
|
||||
void button_hide_show_clicked( gpointer data )
|
||||
{
|
||||
/* Just a flag to remember the status. 0 = currently visible */
|
||||
static short int flag = 0;
|
||||
|
||||
if (flag == 0)
|
||||
{
|
||||
/* Hide the titles and set the flag to 1 */
|
||||
gtk_clist_column_titles_hide((GtkCList *) data);
|
||||
flag++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Show the titles and reset flag to 0 */
|
||||
gtk_clist_column_titles_show((GtkCList *) data);
|
||||
flag--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we come here, then the user has selected a row in the list. */
|
||||
void selection_made( GtkWidget *clist,
|
||||
gint row,
|
||||
gint column,
|
||||
GdkEventButton *event,
|
||||
gpointer data )
|
||||
{
|
||||
gchar *text;
|
||||
|
||||
/* Get the text that is stored in the selected row and column
|
||||
* which was clicked in. We will receive it as a pointer in the
|
||||
* argument text.
|
||||
*/
|
||||
gtk_clist_get_text(GTK_CLIST(clist), row, column, &text);
|
||||
|
||||
/* Just prints some information about the selected row */
|
||||
g_print("You selected row %d. More specifically you clicked in "
|
||||
"column %d, and the text in this cell is %s\n\n",
|
||||
row, column, text);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
gchar *argv[] )
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *scrolled_window, *clist;
|
||||
GtkWidget *button_add, *button_clear, *button_hide_show;
|
||||
gchar *titles[2] = { "Ingredients", "Amount" };
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_usize(GTK_WIDGET(window), 300, 150);
|
||||
|
||||
gtk_window_set_title(GTK_WINDOW(window), "GtkCList Example");
|
||||
gtk_signal_connect(GTK_OBJECT(window),
|
||||
"destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_main_quit),
|
||||
NULL);
|
||||
|
||||
vbox=gtk_vbox_new(FALSE, 5);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
gtk_widget_show(vbox);
|
||||
|
||||
/* Create a scrolled window to pack the CList widget into */
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 0);
|
||||
gtk_widget_show (scrolled_window);
|
||||
|
||||
/* Create the CList. For this example we use 2 columns */
|
||||
clist = gtk_clist_new_with_titles( 2, titles);
|
||||
|
||||
/* When a selection is made, we want to know about it. The callback
|
||||
* used is selection_made, and its code can be found further down */
|
||||
gtk_signal_connect(GTK_OBJECT(clist), "select_row",
|
||||
GTK_SIGNAL_FUNC(selection_made),
|
||||
NULL);
|
||||
|
||||
/* It isn't necessary to shadow the border, but it looks nice :) */
|
||||
gtk_clist_set_shadow_type (GTK_CLIST(clist), GTK_SHADOW_OUT);
|
||||
|
||||
/* What however is important, is that we set the column widths as
|
||||
* they will never be right otherwise. Note that the columns are
|
||||
* numbered from 0 and up (to 1 in this case).
|
||||
*/
|
||||
gtk_clist_set_column_width (GTK_CLIST(clist), 0, 150);
|
||||
|
||||
/* Add the CList widget to the vertical box and show it. */
|
||||
gtk_container_add(GTK_CONTAINER(scrolled_window), clist);
|
||||
gtk_widget_show(clist);
|
||||
|
||||
/* Create the buttons and add them to the window. See the button
|
||||
* tutorial for more examples and comments on this.
|
||||
*/
|
||||
hbox = gtk_hbox_new(FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
|
||||
gtk_widget_show(hbox);
|
||||
|
||||
button_add = gtk_button_new_with_label("Add List");
|
||||
button_clear = gtk_button_new_with_label("Clear List");
|
||||
button_hide_show = gtk_button_new_with_label("Hide/Show titles");
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button_add, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button_clear, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox), button_hide_show, TRUE, TRUE, 0);
|
||||
|
||||
/* Connect our callbacks to the three buttons */
|
||||
gtk_signal_connect_object(GTK_OBJECT(button_add), "clicked",
|
||||
GTK_SIGNAL_FUNC(button_add_clicked),
|
||||
(gpointer) clist);
|
||||
gtk_signal_connect_object(GTK_OBJECT(button_clear), "clicked",
|
||||
GTK_SIGNAL_FUNC(button_clear_clicked),
|
||||
(gpointer) clist);
|
||||
gtk_signal_connect_object(GTK_OBJECT(button_hide_show), "clicked",
|
||||
GTK_SIGNAL_FUNC(button_hide_show_clicked),
|
||||
(gpointer) clist);
|
||||
|
||||
gtk_widget_show(button_add);
|
||||
gtk_widget_show(button_clear);
|
||||
gtk_widget_show(button_hide_show);
|
||||
|
||||
/* The interface is completely set up so we show the window and
|
||||
* enter the gtk_main loop.
|
||||
*/
|
||||
gtk_widget_show(window);
|
||||
gtk_main();
|
||||
|
||||
return(0);
|
||||
}
|
||||
/* example-end */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user