Commit 33da844e authored by Raja R Harinath's avatar Raja R Harinath Committed by Owen Taylor
Browse files

Adapt cast macros to standard.

Fri Nov 19 10:34:41 1999  Owen Taylor  <>

	* gtk/gtkgamma.h: Adapt cast macros to standard.

[ Merges from 1.2 ]

Tue Nov 16 10:15:54 1999  Owen Taylor  <>

	* gtk/gtkitemfactory.c (gtk_item_factory_parse_path):
	If translation does not include a '/', use entire
	translation instead of crashing.

Sun Oct 31 22:21:11 1999  Tim Janik  <>

	* docs/gtk_tut.sgml:

Sat Oct 30 09:09:09 1999  Owen Taylor  <>

	* gtk/gtkselection.c (gtk_target_list_remove): Use
	g_list_remove_link, not g_list_remove.

	[ From Geert Bevin <> ]

Sun Oct 24 07:41:40 1999  Tim Janik  <>

	* gtk/gtkclist.c (real_undo_selection): commented out g_print()
	statement upon unselection (how the heck did that slip in?).

Sat Oct 23 03:03:08 1999  Tim Janik  <>

	* gtk/gtktext.c (gtk_text_freeze):
	(gtk_text_thaw): undraw/draw cursor here to avoi...
parent 14237d13
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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
* --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)
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
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
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:
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:
* 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
use_stdc_env False
in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
Overview of Changes in GTK+ 1.2.6:
* 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 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
* 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
* 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,
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:
The official web site is:
A mailing list is located at:
To subscribe: mail -s subscribe < /dev/null
(Send mail to with the subject "subscribe")
See the file 'INSTALL'
How to report bugs
Bugs should be reported to the GNOME bug tracking
system. ( To report a problem
about GTK+, send mail to
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:
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 can be uploaded to the incoming/ directory on 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".
......@@ -147,7 +147,7 @@ changequote([,])dnl
# Honor aclocal flags
# define a MAINT-like variable REBUILD which is set if Perl
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
......@@ -207,8 +207,10 @@ AC_TRY_RUN([#include <math.h>
[No ANSI prototypes found in library. (-std1 didn't work.)])
[No ANSI prototypes found in library. (-std1 didn't work.)]),
AC_MSG_RESULT(none needed)
......@@ -453,11 +455,12 @@ main ()
return setlocale (LC_ALL, "${with_locale}") == NULL;
if test $need_x_locale = yes; then
# Checks for header files.
b\input texinfo @c -*-texinfo-*-
\input texinfo @c -*-texinfo-*-
@c %**start of header
@settitle GDK
This file describes the way that autogeneration
works within the GTK+ source code.
The following files in the gdk/ subdirectory
are autogenerated:
The following files in the gtk/ subdirectory
are autogenerated:
Description of GTK+ types (and some functions) in a lisp-style
Header file including declarations for internal types
Variables for type values for internal types.
Arrays holding information about each internal type.
Arrays holding mapping between enumeration values
and strings.
Autogenerated signal marshallers
gdkkeysyms.h and gdkcursors.h are generated from
the corresponding header files
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
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 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.
( normally guesses this from the presence of values
with << operators). For instance:
typedef enum /*< flags >*/
[ ... ]
} GdkIMStyle; 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
The format of this file is a list of lines:
A marshaller is generated for each line in the file.
The possible types are:
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.
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.
......@@ -81,7 +81,7 @@ main (int argv, char **argc)
info = g_malloc(sizeof(Info));
window = gtk_window_new(GTK_TOPLEVEL);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
# Note that this is NOT a relocatable package