Compare commits
74 Commits
gdk-object
...
GTK_1_2_3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ef2295c53 | ||
|
|
519fed9991 | ||
|
|
5e52b31fd7 | ||
|
|
bbe8b7ba61 | ||
|
|
f187c3bb24 | ||
|
|
6227a115be | ||
|
|
2f80acc28e | ||
|
|
30d6a30b01 | ||
|
|
7f9cb3548b | ||
|
|
17c8d9cd74 | ||
|
|
197950e184 | ||
|
|
bbf7b3a60f | ||
|
|
498b5eca13 | ||
|
|
658f736af1 | ||
|
|
edf4aa4bcd | ||
|
|
3046ab9f0f | ||
|
|
a654f96831 | ||
|
|
ff01cccfb9 | ||
|
|
0c177d15d1 | ||
|
|
be0f11a4d2 | ||
|
|
ed0db4cd4f | ||
|
|
1cc01ceb59 | ||
|
|
caf95cd161 | ||
|
|
83c4021614 | ||
|
|
fdb8efb35a | ||
|
|
9ad66ac6e8 | ||
|
|
3834ea83c0 | ||
|
|
e3b8c8ba92 | ||
|
|
e6828ec4e4 | ||
|
|
7ee4ba7781 | ||
|
|
3a03678080 | ||
|
|
badd841246 | ||
|
|
ffafb164d9 | ||
|
|
8286bd2493 | ||
|
|
ceb0f66e51 | ||
|
|
3de957405f | ||
|
|
4361369939 | ||
|
|
0d353949e2 | ||
|
|
80c5ac85d4 | ||
|
|
b44c5d0f0c | ||
|
|
7ac92e74e8 | ||
|
|
eaa98e5cfc | ||
|
|
db496116d9 | ||
|
|
d32d93cc3c | ||
|
|
da74d5d843 | ||
|
|
44dd4a430d | ||
|
|
fcc38c19d8 | ||
|
|
737580cc57 | ||
|
|
db025ebfb0 | ||
|
|
0ae73a09dd | ||
|
|
2c659472e2 | ||
|
|
0720955e17 | ||
|
|
0c90498103 | ||
|
|
bab8d95583 | ||
|
|
3f2cd052fd | ||
|
|
0362058f6e | ||
|
|
b59eefd649 | ||
|
|
287624f406 | ||
|
|
d4ecce94c8 | ||
|
|
536673ad38 | ||
|
|
8b424288ba | ||
|
|
f880eba7cd | ||
|
|
ac8d845b3d | ||
|
|
b691a88e07 | ||
|
|
af138bc287 | ||
|
|
29ce61fcf3 | ||
|
|
69d2eba366 | ||
|
|
efb837bdb6 | ||
|
|
5db63aaa6d | ||
|
|
7e8d27f327 | ||
|
|
8556b64654 | ||
|
|
12d38df79e | ||
|
|
7699e34d83 | ||
|
|
14ff63b93d |
@@ -15,6 +15,3 @@ ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
||||
|
||||
9106
ChangeLog.pre-1-2
9106
ChangeLog.pre-1-2
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-0
13994
ChangeLog.pre-2-0
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-10
13994
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-2
13994
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-4
13994
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-6
13994
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
13994
ChangeLog.pre-2-8
13994
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
23
INSTALL
23
INSTALL
@@ -7,12 +7,12 @@ 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.2.3.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.3 # 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
|
||||
================
|
||||
@@ -111,23 +111,18 @@ 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 ]
|
||||
=================================================
|
||||
Using an uninstalled copy of GLIB
|
||||
=================================
|
||||
|
||||
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
|
||||
./configure --with-glib=../glib-1.2.3
|
||||
|
||||
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
|
||||
========================
|
||||
@@ -169,7 +164,7 @@ 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 and 2.1, in which
|
||||
(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.)
|
||||
|
||||
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.
|
||||
|
||||
|
||||
18
Makefile.am
18
Makefile.am
@@ -1,13 +1,10 @@
|
||||
## Makefile.am for GTK+
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SRC_SUBDIRS = gdk gtk
|
||||
SUBDIRS = po $(SRC_SUBDIRS) docs
|
||||
|
||||
bin_SCRIPTS = gtk-config
|
||||
|
||||
# require automake 1.4
|
||||
AUTOMAKE_OPTIONS = 1.4
|
||||
|
||||
EXTRA_DIST = \
|
||||
HACKING \
|
||||
gtk+.spec.in \
|
||||
@@ -17,7 +14,6 @@ EXTRA_DIST = \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
intl/libgettext.h \
|
||||
intl/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
@@ -32,7 +28,7 @@ EXTRA_DIST = \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/calendar.c \
|
||||
examples/calendar/gcalendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
@@ -101,14 +97,8 @@ EXTRA_DIST = \
|
||||
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)
|
||||
dist-hook:
|
||||
cp gtk+.spec $(distdir)
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = gtk.m4
|
||||
|
||||
60
NEWS
60
NEWS
@@ -1,63 +1,3 @@
|
||||
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 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
|
||||
|
||||
8
README
8
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.2.3. 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.
|
||||
@@ -37,9 +37,9 @@ version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.7
|
||||
Version: 1.2.3
|
||||
|
||||
[ Please substitute 1.2.7 with the version of GTK+ that
|
||||
[ Please substitute 1.2.3 with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
@@ -82,7 +82,7 @@ From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: 1.2.7
|
||||
Version: 1.2.3
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
|
||||
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.
|
||||
18
TODO
18
TODO
@@ -12,14 +12,21 @@ Outstanding items:
|
||||
* 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)
|
||||
is TRUE.
|
||||
|
||||
* More dialogs: Print, maybe others...
|
||||
* gdk_expose_compress: ala-Xt, this would really help for opaque moves and
|
||||
such
|
||||
|
||||
* More dialogs: Print, GtkFontSelector, maybe others...
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* 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
|
||||
@@ -63,11 +70,6 @@ Outstanding items:
|
||||
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.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
Bugs:
|
||||
@@ -185,7 +187,7 @@ 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.
|
||||
of it's 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,
|
||||
|
||||
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>
|
||||
|
||||
@@ -19,17 +19,14 @@
|
||||
#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
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
32
acinclude.m4
32
acinclude.m4
@@ -21,7 +21,7 @@
|
||||
## 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
|
||||
# serial 39 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
@@ -34,7 +34,7 @@ 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 \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
@@ -66,11 +66,6 @@ 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"
|
||||
@@ -89,7 +84,7 @@ 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
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
@@ -305,6 +300,7 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
@@ -350,13 +346,14 @@ else
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
@@ -385,7 +382,6 @@ AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
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
|
||||
@@ -409,11 +405,9 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
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
|
||||
])
|
||||
|
||||
@@ -426,8 +420,8 @@ 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
|
||||
dnl This is just to quiet aclocal about the macro not being used
|
||||
if(a,b,[AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
@@ -476,24 +470,20 @@ AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_gettext_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
|
||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
gt_cv_func_gettext_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)
|
||||
|
||||
169
config.guess
vendored
169
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, 97, 1998 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,7 @@
|
||||
|
||||
# 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>.
|
||||
# Please send patches to the Autoconf mailing list <autoconf@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
|
||||
@@ -115,13 +114,7 @@ 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
|
||||
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
|
||||
@@ -156,9 +149,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 +158,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*:*:*|MIS*:SMP_DC-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
|
||||
@@ -331,18 +321,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
|
||||
@@ -427,7 +414,7 @@ EOF
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 )
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
@@ -459,7 +446,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
@@ -501,7 +488,7 @@ EOF
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
*9??*:MPE/iX:*:*)
|
||||
*9??*:MPE*:*:*)
|
||||
echo hppa1.0-hp-mpeix
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
@@ -520,9 +507,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 ;;
|
||||
@@ -556,13 +540,13 @@ EOF
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE}
|
||||
echo t3e-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,12 +559,12 @@ EOF
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@@ -594,7 +578,7 @@ EOF
|
||||
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/[-_].*/\./'`
|
||||
@@ -605,15 +589,6 @@ EOF
|
||||
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
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit 0 ;;
|
||||
@@ -624,6 +599,12 @@ EOF
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# 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
|
||||
@@ -636,70 +617,12 @@ 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 ;;
|
||||
armlinux) 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
|
||||
@@ -826,20 +749,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,15 +764,18 @@ 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
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:UnixWare:*:*)
|
||||
if /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
@@ -946,7 +862,7 @@ EOF
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
@@ -974,9 +890,6 @@ EOF
|
||||
*: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
|
||||
|
||||
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 */
|
||||
317
config.sub
vendored
317
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-97, 1998 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,33 +143,23 @@ 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 \
|
||||
tahoe | i860 | 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 \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \
|
||||
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| 1750a | dsp16xx | pdp11 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | fr30)
|
||||
| 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.
|
||||
@@ -195,45 +172,29 @@ 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[34567]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-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67] \
|
||||
| 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-* | armv*-*)
|
||||
;;
|
||||
# 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 +224,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 +300,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 +318,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 +333,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,16 +348,17 @@ case $basic_machine in
|
||||
hppa-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
hppaosf)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-osf
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
os=-mpeix
|
||||
;;
|
||||
hppro)
|
||||
basic_machine=hppa1.1-hp
|
||||
os=-proelf
|
||||
hp3k9[0-9][0-9] | hp9[0-9][0-9])
|
||||
basic_machine=hppa1.0-hp
|
||||
os=-mpeix
|
||||
;;
|
||||
i370-ibm* | ibm*)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
;;
|
||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
||||
i[34567]86v32)
|
||||
@@ -448,25 +377,6 @@ case $basic_machine in
|
||||
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 +405,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,28 +419,12 @@ 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
|
||||
basic_machine=armv4l-corel
|
||||
os=-linux
|
||||
;;
|
||||
news | news700 | news800 | news900)
|
||||
@@ -549,10 +439,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 +464,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,19 +484,19 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
pentium | p5 | k5 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86)
|
||||
pentiumpro | p6 | k6 | 6x86)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
pentium-* | p5-* | k5-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-*)
|
||||
pentiumpro-* | p6-* | k6-* | 6x86-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
@@ -650,20 +520,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 +533,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 +540,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 +584,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 +601,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 +624,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,9 +631,9 @@ case $basic_machine in
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
*mint | *MiNT)
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
@@ -807,15 +642,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 +664,7 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
sparc)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -850,16 +676,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 +729,14 @@ 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*)
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \
|
||||
| -openstep* | -mpeix* | -oskit*)
|
||||
# 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 +746,6 @@ case $os in
|
||||
-sunos6*)
|
||||
os=`echo $os | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
-opened*)
|
||||
os=-openedition
|
||||
;;
|
||||
-osfrose*)
|
||||
os=-osfrose
|
||||
;;
|
||||
@@ -955,9 +761,6 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
@@ -977,9 +780,6 @@ case $os in
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-qnx)
|
||||
os=-qnx4
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
@@ -992,12 +792,6 @@ case $os in
|
||||
# This must come after -sysvr4.
|
||||
-sysv*)
|
||||
;;
|
||||
-ose*)
|
||||
os=-ose
|
||||
;;
|
||||
-es1800*)
|
||||
os=-ose
|
||||
;;
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
@@ -1029,7 +823,7 @@ case $basic_machine in
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
arm*-rebel)
|
||||
arm*-corel)
|
||||
os=-linux
|
||||
;;
|
||||
arm*-semi)
|
||||
@@ -1053,15 +847,6 @@ 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
|
||||
;;
|
||||
@@ -1074,15 +859,6 @@ case $basic_machine in
|
||||
*-ibm)
|
||||
os=-aix
|
||||
;;
|
||||
*-wec)
|
||||
os=-proelf
|
||||
;;
|
||||
*-winbond)
|
||||
os=-proelf
|
||||
;;
|
||||
*-oki)
|
||||
os=-proelf
|
||||
;;
|
||||
*-hp)
|
||||
os=-hpux
|
||||
;;
|
||||
@@ -1146,15 +922,6 @@ case $basic_machine in
|
||||
f301-fujitsu)
|
||||
os=-uxpv
|
||||
;;
|
||||
*-rom68k)
|
||||
os=-coff
|
||||
;;
|
||||
*-*bug)
|
||||
os=-coff
|
||||
;;
|
||||
*-apple)
|
||||
os=-macos
|
||||
;;
|
||||
*-atari*)
|
||||
os=-mint
|
||||
;;
|
||||
@@ -1179,15 +946,15 @@ case $basic_machine in
|
||||
-aix*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-beos*)
|
||||
vendor=be
|
||||
;;
|
||||
-hpux*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-mpeix*)
|
||||
vendor=hp
|
||||
;;
|
||||
-hiux*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
@@ -1203,7 +970,7 @@ case $basic_machine in
|
||||
-genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
-mvs* | -opened*)
|
||||
-mvs*)
|
||||
vendor=ibm
|
||||
;;
|
||||
-ptx*)
|
||||
@@ -1215,12 +982,6 @@ case $basic_machine in
|
||||
-aux*)
|
||||
vendor=apple
|
||||
;;
|
||||
-hms*)
|
||||
vendor=hitachi
|
||||
;;
|
||||
-mpw* | -macos*)
|
||||
vendor=apple
|
||||
;;
|
||||
-*mint | -*MiNT)
|
||||
vendor=atari
|
||||
;;
|
||||
|
||||
203
configure.in
203
configure.in
@@ -28,10 +28,10 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
# 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=2
|
||||
GTK_MICRO_VERSION=3
|
||||
GTK_INTERFACE_AGE=1
|
||||
GTK_BINARY_AGE=3
|
||||
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
||||
dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
@@ -95,7 +95,6 @@ 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)
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
||||
|
||||
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
||||
@@ -157,33 +156,15 @@ AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
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 -n "$PERL" && perl -v | grep 'version 5.' > /dev/null ; then
|
||||
if test -n "$AWK" ; then
|
||||
REBUILD=
|
||||
fi
|
||||
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"
|
||||
ALL_LINGUAS="ca cs de es fi fr hr hu it ja ko nl no pl pt ru sl sk sv wa zh_TW.Big5"
|
||||
AM_GTK_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
|
||||
@@ -209,29 +190,11 @@ AC_TRY_RUN([#include <math.h>
|
||||
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)
|
||||
[No ANSI prototypes found in library. (-std1 didn't work.)])
|
||||
)
|
||||
)
|
||||
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;],
|
||||
@@ -252,16 +215,16 @@ fi
|
||||
if test x$with_glib = x ; then
|
||||
# Look for separately installed glib
|
||||
|
||||
AM_PATH_GLIB(1.3.1,,
|
||||
AM_PATH_GLIB(1.2.3,,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB 1.3.0 or better is required. The latest version of GLIB
|
||||
*** GLIB 1.2.3 or better is required. The latest version of GLIB
|
||||
*** is always available from ftp://ftp.gtk.org/.]),
|
||||
gobject gmodule gthread)
|
||||
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_cflags=`$GLIB_CONFIG glib gmodule --cflags`
|
||||
glib_thread_cflags="$GLIB_CFLAGS"
|
||||
glib_libs=`$GLIB_CONFIG glib gobject gmodule --libs`
|
||||
glib_libs=`$GLIB_CONFIG glib gmodule --libs`
|
||||
glib_thread_libs="$GLIB_LIBS"
|
||||
GLIB_LIBS="$glib_libs"
|
||||
GLIB_DEPLIBS="$glib_libs"
|
||||
@@ -294,7 +257,7 @@ else
|
||||
esac
|
||||
|
||||
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule.la"
|
||||
GLIB_DEPLIBS=
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
@@ -307,10 +270,6 @@ 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
|
||||
AC_PATH_XTRA
|
||||
@@ -410,9 +369,6 @@ 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"
|
||||
|
||||
@@ -457,8 +413,7 @@ 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
|
||||
@@ -492,29 +447,40 @@ else
|
||||
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])
|
||||
# Duplicate `widechar' tests from `glib'.
|
||||
# Check for wchar.h
|
||||
if test x = y; then
|
||||
# will not be executed
|
||||
# hack so as not to update `acconfig.h'
|
||||
AC_CHECK_HEADERS(wchar.h wctype.h)
|
||||
AC_CHECK_FUNCS(broken_wctype)
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wchar_h)
|
||||
|
||||
AC_MSG_CHECKING(for wchar.h)
|
||||
AC_TRY_CPP([#include <wchar.h>], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
ac_kludge=HAVE_WCHAR_H
|
||||
AC_DEFINE($ac_kludge)
|
||||
fi
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
|
||||
# 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])
|
||||
AC_TRY_CPP([#include <wctype.h>], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
ac_kludge=HAVE_WCTYPE_H
|
||||
AC_DEFINE($ac_kludge)
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wctype_h)
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
|
||||
# in Solaris 2.5, `iswalnum' is in -lw
|
||||
GDK_WLIBS=
|
||||
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
||||
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
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))
|
||||
@@ -529,97 +495,21 @@ AC_TRY_LINK([#include <stdlib.h>],[
|
||||
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
||||
#endif
|
||||
iswalnum((wchar_t) 0);
|
||||
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
||||
], gtk_ok=yes, gtk_ok=no)
|
||||
LIBS="$oLIBS"
|
||||
|
||||
if test $gdk_working_wctype = no; then
|
||||
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
||||
if test $gtk_ok = no; then
|
||||
ac_kludge=HAVE_BROKEN_WCTYPE
|
||||
AC_DEFINE($ac_kludge)
|
||||
GDK_WLIBS=
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_MSG_RESULT($gtk_ok)
|
||||
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
|
||||
@@ -628,9 +518,6 @@ 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])
|
||||
|
||||
@@ -18,5 +18,4 @@ Makefile.in
|
||||
*.vrs
|
||||
html
|
||||
text
|
||||
texinfo.tex
|
||||
gtk-config.1
|
||||
|
||||
@@ -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.
|
||||
@@ -101,7 +101,36 @@ FAQ_FILES=html/gtkfaq.html \
|
||||
html/gtkfaq-7.html \
|
||||
text/gtkfaq.txt
|
||||
|
||||
html/gtk_tut_table.gif: gdk.html gtk.html
|
||||
EXTRA_DIST = \
|
||||
gtk-config.1.in \
|
||||
texinfo.tex \
|
||||
macros.texi \
|
||||
gtkdocs_fix \
|
||||
gtkfaq.sgml \
|
||||
gtk-config.txt \
|
||||
gtk_tut.sgml \
|
||||
gtk_tut_it.sgml \
|
||||
gtk_tut_fr.sgml \
|
||||
debugging.txt \
|
||||
developers.txt \
|
||||
refcounting.txt \
|
||||
styles.txt \
|
||||
text_widget.txt \
|
||||
widget_system.txt \
|
||||
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)
|
||||
|
||||
.PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files
|
||||
|
||||
@@ -166,36 +195,3 @@ 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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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>
|
||||
2500
docs/faq/gtkfaq.sgml
2500
docs/faq/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
@@ -79,7 +79,7 @@ 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.
|
||||
@@ -288,7 +288,7 @@ 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
|
||||
running application (a 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.
|
||||
@@ -320,7 +320,7 @@ inherit these rules from their fundamental type. For example,
|
||||
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
|
||||
This derivation defines a type hierachy, but this hierachy 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
|
||||
@@ -382,7 +382,7 @@ to a fundamental type and thus there is no name for it.
|
||||
|
||||
@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
|
||||
is a 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)
|
||||
@@ -461,7 +461,7 @@ always return @code{NULL}.
|
||||
@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
|
||||
specific fields. The single argument these function taks 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
|
||||
|
||||
3199
docs/gtk_tut.sgml
3199
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
2500
docs/gtkfaq.sgml
2500
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>'''
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -88,13 +88,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:
|
||||
|
||||
@@ -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
@@ -27,7 +27,6 @@ SUBDIRS = arrow \
|
||||
rangewidgets \
|
||||
rulers \
|
||||
scribble-simple \
|
||||
scribble-xinput \
|
||||
scrolledwin \
|
||||
selection \
|
||||
spinbutton \
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *aspect_frame;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#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 *create_bbox (gint horizontal,
|
||||
char* title,
|
||||
gint spacing,
|
||||
gint child_w,
|
||||
gint child_h,
|
||||
gint layout)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
|
||||
@@ -75,6 +75,7 @@ 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);
|
||||
gtk_widget_realize(window);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
calendar: calendar.c
|
||||
$(CC) `gtk-config --cflags` calendar.c -o calendar `gtk-config --libs`
|
||||
gcalendar: gcalendar.c
|
||||
$(CC) `gtk-config --cflags` gcalendar.c -o gcalendar `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f calendar
|
||||
rm -f gcalendar
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/* example-start calendar calendar.c */
|
||||
/*
|
||||
/* G Calendar
|
||||
* 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
|
||||
@@ -28,18 +26,84 @@
|
||||
|
||||
#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 *selected;
|
||||
GtkWidget *selected_double_click;
|
||||
GtkWidget *month;
|
||||
} CalendarData;
|
||||
|
||||
void create_calendar();
|
||||
gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data);
|
||||
void destroy (GtkWidget *widget, gpointer data);
|
||||
void day_selected_double_click (GtkWidget *widget, gpointer data);
|
||||
int main(int argc, char *argv[]);
|
||||
void calendar_month_changed (GtkWidget *widget, CalendarData *data);
|
||||
void calendar_day_selected (GtkWidget *widget, CalendarData *data);
|
||||
void calendar_day_selected_double_click (GtkWidget *widget, CalendarData *data);
|
||||
|
||||
|
||||
void calendar_set_flags(CalendarData *calendar);
|
||||
void calendar_toggle_flag(GtkWidget * toggle, CalendarData *calendar);
|
||||
void calendar_font_selection_ok(GtkWidget * button, CalendarData *calendar);
|
||||
void calendar_font_selection_destroy(GtkWidget * button, GtkWidget widget);
|
||||
void calendar_select_font(GtkWidget * button, CalendarData *calendar);
|
||||
void calendar_create_window_destroy(GtkWidget * ignore, CalendarData *calendar);
|
||||
void calendar_create_window(GtkWidget * ignored, CalendarData * calendar);
|
||||
void calendar_window_destroy(GtkWidget * ignore, CalendarData *calendar);
|
||||
void create_calendar();
|
||||
|
||||
/*
|
||||
* GtkCalendar
|
||||
*/
|
||||
|
||||
void
|
||||
calendar_month_changed (GtkWidget *widget, CalendarData *data)
|
||||
{
|
||||
char buffer[256];
|
||||
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, 255, "%x", gmtime(&time));
|
||||
gtk_label_set (GTK_LABEL (data->month), buffer);
|
||||
}
|
||||
|
||||
void
|
||||
calendar_day_selected (GtkWidget *widget, CalendarData *data)
|
||||
{
|
||||
char buffer[256];
|
||||
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, 255, "%x", gmtime(&time));
|
||||
gtk_label_set (GTK_LABEL (data->selected), buffer);
|
||||
}
|
||||
|
||||
void
|
||||
calendar_day_selected_double_click (GtkWidget *widget, CalendarData *data)
|
||||
{
|
||||
char buffer[256];
|
||||
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, 255, "%x", gmtime(&time));
|
||||
gtk_label_set (GTK_LABEL (data->selected_double_click), buffer);
|
||||
}
|
||||
|
||||
enum {
|
||||
calendar_show_header,
|
||||
calendar_show_days,
|
||||
@@ -48,115 +112,8 @@ enum {
|
||||
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 )
|
||||
void
|
||||
calendar_set_flags(CalendarData *calendar)
|
||||
{
|
||||
gint i;
|
||||
gint options=0;
|
||||
@@ -169,8 +126,8 @@ void calendar_set_flags( CalendarData *calendar )
|
||||
gtk_calendar_display_options (GTK_CALENDAR (calendar->window), options);
|
||||
}
|
||||
|
||||
void calendar_toggle_flag( GtkWidget *toggle,
|
||||
CalendarData *calendar )
|
||||
void
|
||||
calendar_toggle_flag(GtkWidget * toggle, CalendarData *calendar)
|
||||
{
|
||||
gint i;
|
||||
gint j;
|
||||
@@ -183,15 +140,13 @@ void calendar_toggle_flag( GtkWidget *toggle,
|
||||
calendar_set_flags(calendar);
|
||||
|
||||
}
|
||||
|
||||
void calendar_font_selection_ok( GtkWidget *button,
|
||||
CalendarData *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));
|
||||
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));
|
||||
@@ -206,8 +161,8 @@ void calendar_font_selection_ok( GtkWidget *button,
|
||||
}
|
||||
}
|
||||
|
||||
void calendar_select_font( GtkWidget *button,
|
||||
CalendarData *calendar )
|
||||
void
|
||||
calendar_select_font(GtkWidget * button, CalendarData *calendar)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
@@ -238,7 +193,8 @@ void calendar_select_font( GtkWidget *button,
|
||||
|
||||
}
|
||||
|
||||
void create_calendar()
|
||||
void
|
||||
create_calendar()
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox, *vbox2, *vbox3;
|
||||
@@ -275,7 +231,6 @@ void create_calendar()
|
||||
}
|
||||
|
||||
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),
|
||||
@@ -302,7 +257,7 @@ void create_calendar()
|
||||
|
||||
/* Calendar widget */
|
||||
frame = gtk_frame_new("Calendar");
|
||||
gtk_box_pack_start(GTK_BOX(hbbox), frame, FALSE, TRUE, DEF_PAD);
|
||||
gtk_box_pack_start(GTK_BOX(hbbox), frame, TRUE, TRUE, DEF_PAD);
|
||||
calendar=gtk_calendar_new();
|
||||
calendar_data.window = calendar;
|
||||
calendar_set_flags(&calendar_data);
|
||||
@@ -317,18 +272,6 @@ void create_calendar()
|
||||
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 ();
|
||||
@@ -368,31 +311,30 @@ void create_calendar()
|
||||
|
||||
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);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Signal:");
|
||||
label = gtk_label_new ("Day selected:");
|
||||
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);
|
||||
calendar_data.selected = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.selected, FALSE, TRUE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Previous signal:");
|
||||
label = gtk_label_new ("Day selected double click:");
|
||||
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);
|
||||
calendar_data.selected_double_click = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.selected_double_click, FALSE, TRUE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 3);
|
||||
hbox = gtk_hbox_new (FALSE, 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
|
||||
label = gtk_label_new ("Second previous signal:");
|
||||
label = gtk_label_new ("Month change:");
|
||||
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);
|
||||
|
||||
calendar_data.month = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), calendar_data.month, 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);
|
||||
@@ -409,16 +351,12 @@ void create_calendar()
|
||||
}
|
||||
|
||||
|
||||
int main(int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
gtk_set_locale ();
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
create_calendar();
|
||||
|
||||
gtk_main();
|
||||
|
||||
return(0);
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
/* example-end */
|
||||
@@ -83,7 +83,7 @@ int main( int argc,
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox, *hbox;
|
||||
GtkWidget *scrolled_window, *clist;
|
||||
GtkWidget *clist;
|
||||
GtkWidget *button_add, *button_clear, *button_hide_show;
|
||||
gchar *titles[2] = { "Ingredients", "Amount" };
|
||||
|
||||
@@ -103,15 +103,7 @@ int main( int argc,
|
||||
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 */
|
||||
/* Create the GtkCList. 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
|
||||
@@ -129,8 +121,8 @@ int main( int argc,
|
||||
*/
|
||||
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);
|
||||
/* Add the GtkCList widget to the vertical box and show it. */
|
||||
gtk_box_pack_start(GTK_BOX(vbox), clist, TRUE, TRUE, 0);
|
||||
gtk_widget_show(clist);
|
||||
|
||||
/* Create the buttons and add them to the window. See the button
|
||||
|
||||
@@ -2,30 +2,28 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void enter_callback( GtkWidget *widget,
|
||||
GtkWidget *entry )
|
||||
void enter_callback(GtkWidget *widget, GtkWidget *entry)
|
||||
{
|
||||
gchar *entry_text;
|
||||
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
|
||||
printf("Entry contents: %s\n", entry_text);
|
||||
}
|
||||
|
||||
void entry_toggle_editable( GtkWidget *checkbutton,
|
||||
GtkWidget *entry )
|
||||
void entry_toggle_editable (GtkWidget *checkbutton,
|
||||
GtkWidget *entry)
|
||||
{
|
||||
gtk_entry_set_editable(GTK_ENTRY(entry),
|
||||
GTK_TOGGLE_BUTTON(checkbutton)->active);
|
||||
}
|
||||
|
||||
void entry_toggle_visibility( GtkWidget *checkbutton,
|
||||
GtkWidget *entry )
|
||||
void entry_toggle_visibility (GtkWidget *checkbutton,
|
||||
GtkWidget *entry)
|
||||
{
|
||||
gtk_entry_set_visibility(GTK_ENTRY(entry),
|
||||
GTK_TOGGLE_BUTTON(checkbutton)->active);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
|
||||
GtkWidget *window;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *event_box;
|
||||
|
||||
@@ -3,20 +3,17 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Get the selected filename and print it to the console */
|
||||
void file_ok_sel( GtkWidget *w,
|
||||
GtkFileSelection *fs )
|
||||
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 ();
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *filew;
|
||||
|
||||
@@ -32,8 +29,7 @@ int main( int argc,
|
||||
"clicked", (GtkSignalFunc) file_ok_sel, filew );
|
||||
|
||||
/* Connect the cancel_button to destroy the widget */
|
||||
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
|
||||
(filew)->cancel_button),
|
||||
gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button),
|
||||
"clicked", (GtkSignalFunc) gtk_widget_destroy,
|
||||
GTK_OBJECT (filew));
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ int main( int argc,
|
||||
button = gtk_button_new_with_label ("Press me");
|
||||
|
||||
/* When the button receives the "clicked" signal, it will call the
|
||||
* function move_button() passing it the Fixed Container as its
|
||||
* function move_button() passing it the Fixed Containter as its
|
||||
* argument. */
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (move_button), fixed);
|
||||
|
||||
@@ -30,7 +30,7 @@ int main( int argc,
|
||||
frame = gtk_frame_new(NULL);
|
||||
gtk_container_add(GTK_CONTAINER(window), frame);
|
||||
|
||||
/* Set the frame's label */
|
||||
/* Set the frames label */
|
||||
gtk_frame_set_label( GTK_FRAME(frame), "GTK Frame Widget" );
|
||||
|
||||
/* Align the label at the right of the frame */
|
||||
|
||||
@@ -275,14 +275,12 @@ gtk_dial_expose (GtkWidget *widget,
|
||||
GdkEventExpose *event)
|
||||
{
|
||||
GtkDial *dial;
|
||||
GdkPoint points[6];
|
||||
GdkPoint points[3];
|
||||
gdouble s,c;
|
||||
gdouble theta, last, increment;
|
||||
GtkStyle *blankstyle;
|
||||
gdouble theta;
|
||||
gint xc, yc;
|
||||
gint upper, lower;
|
||||
gint tick_length;
|
||||
gint i, inc;
|
||||
gint i;
|
||||
|
||||
g_return_val_if_fail (widget != NULL, FALSE);
|
||||
g_return_val_if_fail (GTK_IS_DIAL (widget), FALSE);
|
||||
@@ -293,93 +291,37 @@ gtk_dial_expose (GtkWidget *widget,
|
||||
|
||||
dial = GTK_DIAL (widget);
|
||||
|
||||
/* gdk_window_clear_area (widget->window,
|
||||
gdk_window_clear_area (widget->window,
|
||||
0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
*/
|
||||
|
||||
xc = widget->allocation.width/2;
|
||||
yc = widget->allocation.height/2;
|
||||
|
||||
upper = dial->adjustment->upper;
|
||||
lower = dial->adjustment->lower;
|
||||
|
||||
/* Erase old pointer */
|
||||
|
||||
s = sin(dial->last_angle);
|
||||
c = cos(dial->last_angle);
|
||||
dial->last_angle = dial->angle;
|
||||
|
||||
points[0].x = xc + s*dial->pointer_width/2;
|
||||
points[0].y = yc + c*dial->pointer_width/2;
|
||||
points[1].x = xc + c*dial->radius;
|
||||
points[1].y = yc - s*dial->radius;
|
||||
points[2].x = xc - s*dial->pointer_width/2;
|
||||
points[2].y = yc - c*dial->pointer_width/2;
|
||||
points[3].x = xc - c*dial->radius/10;
|
||||
points[3].y = yc + s*dial->radius/10;
|
||||
points[4].x = points[0].x;
|
||||
points[4].y = points[0].y;
|
||||
|
||||
blankstyle = gtk_style_new ();
|
||||
blankstyle->bg_gc[GTK_STATE_NORMAL] =
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
blankstyle->dark_gc[GTK_STATE_NORMAL] =
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
blankstyle->light_gc[GTK_STATE_NORMAL] =
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
blankstyle->black_gc =
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
|
||||
gtk_draw_polygon (blankstyle,
|
||||
widget->window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_OUT,
|
||||
points, 5,
|
||||
FALSE);
|
||||
|
||||
gtk_style_unref(blankstyle);
|
||||
|
||||
|
||||
/* Draw ticks */
|
||||
|
||||
if ((upper - lower) == 0)
|
||||
return;
|
||||
|
||||
increment = (100*M_PI)/(dial->radius*dial->radius);
|
||||
|
||||
inc = (upper - lower);
|
||||
|
||||
while (inc < 100) inc *=10;
|
||||
while (inc >= 1000) inc /=10;
|
||||
last = -1;
|
||||
|
||||
for (i=0; i<=inc; i++)
|
||||
for (i=0; i<25; i++)
|
||||
{
|
||||
theta = ((gfloat)i*M_PI/(18*inc/24.) - M_PI/6.);
|
||||
|
||||
if ((theta - last) < (increment))
|
||||
continue;
|
||||
last = theta;
|
||||
|
||||
theta = (i*M_PI/18. - M_PI/6.);
|
||||
s = sin(theta);
|
||||
c = cos(theta);
|
||||
|
||||
tick_length = (i%(inc/10) == 0) ? dial->pointer_width : dial->pointer_width/2;
|
||||
|
||||
tick_length = (i%6 == 0) ? dial->pointer_width : dial->pointer_width/2;
|
||||
|
||||
gdk_draw_line (widget->window,
|
||||
widget->style->fg_gc[widget->state],
|
||||
xc + c*(dial->radius - tick_length),
|
||||
yc - s*(dial->radius - tick_length),
|
||||
xc + c*dial->radius,
|
||||
yc - s*dial->radius);
|
||||
widget->style->fg_gc[widget->state],
|
||||
xc + c*(dial->radius - tick_length),
|
||||
yc - s*(dial->radius - tick_length),
|
||||
xc + c*dial->radius,
|
||||
yc - s*dial->radius);
|
||||
}
|
||||
|
||||
/* Draw pointer */
|
||||
|
||||
s = sin(dial->angle);
|
||||
c = cos(dial->angle);
|
||||
dial->last_angle = dial->angle;
|
||||
|
||||
|
||||
points[0].x = xc + s*dial->pointer_width/2;
|
||||
points[0].y = yc + c*dial->pointer_width/2;
|
||||
@@ -387,19 +329,14 @@ gtk_dial_expose (GtkWidget *widget,
|
||||
points[1].y = yc - s*dial->radius;
|
||||
points[2].x = xc - s*dial->pointer_width/2;
|
||||
points[2].y = yc - c*dial->pointer_width/2;
|
||||
points[3].x = xc - c*dial->radius/10;
|
||||
points[3].y = yc + s*dial->radius/10;
|
||||
points[4].x = points[0].x;
|
||||
points[4].y = points[0].y;
|
||||
|
||||
|
||||
gtk_draw_polygon (widget->style,
|
||||
widget->window,
|
||||
GTK_STATE_NORMAL,
|
||||
GTK_SHADOW_OUT,
|
||||
points, 5,
|
||||
points, 3,
|
||||
TRUE);
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ struct _GtkDial
|
||||
|
||||
/* Current angle */
|
||||
gfloat angle;
|
||||
gfloat last_angle;
|
||||
|
||||
/* Old values from adjustment stored so we know when something changes */
|
||||
gfloat old_value;
|
||||
|
||||
@@ -50,7 +50,7 @@ int main( int argc,
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
/* When the window is given the "delete_event" signal (this is given
|
||||
* by the window manager, usually by the "close" option, or on the
|
||||
* by the window manager, usually by the 'close' option, or on the
|
||||
* titlebar), we ask it to call the delete_event () function
|
||||
* as defined above. The data passed to the callback
|
||||
* function is NULL and is ignored in the callback function. */
|
||||
@@ -59,7 +59,7 @@ int main( int argc,
|
||||
|
||||
/* Here we connect the "destroy" event to a signal handler.
|
||||
* This event occurs when we call gtk_widget_destroy() on the window,
|
||||
* or if we return FALSE in the "delete_event" callback. */
|
||||
* or if we return 'FALSE' in the "delete_event" callback. */
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (destroy), NULL);
|
||||
|
||||
|
||||
@@ -11,12 +11,11 @@ void callback( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* another callback */
|
||||
gint delete_event( GtkWidget *widget,
|
||||
void delete_event( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
gpointer data )
|
||||
{
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
@@ -34,7 +33,7 @@ int main( int argc,
|
||||
/* Create a new window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
/* This is a new call, which just sets the title of our
|
||||
/* This is a new call, this just sets the title of our
|
||||
* new window to "Hello Buttons!" */
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Hello Buttons!");
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ int main( int argc,
|
||||
label = gtk_label_new ("This is an example of a line-wrapped, filled label. " \
|
||||
"It should be taking "\
|
||||
"up the entire width allocated to it. " \
|
||||
"Here is a sentence to prove "\
|
||||
"Here is a seneance to prove "\
|
||||
"my point. Here is another sentence. "\
|
||||
"Here comes the sun, do de do de do.\n"\
|
||||
" This is a new paragraph.\n"\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* example-start list list.c */
|
||||
|
||||
/* Include the GTK header files
|
||||
/* Include the gtk+ header files
|
||||
* Include stdio.h, we need that for the printf() function
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
@@ -13,7 +13,7 @@ const gchar *list_item_data_key="list_item_data";
|
||||
|
||||
|
||||
/* prototypes for signal handler that we are going to connect
|
||||
* to the List widget
|
||||
* to the GtkList widget
|
||||
*/
|
||||
static void sigh_print_selection( GtkWidget *gtklist,
|
||||
gpointer func_data);
|
||||
@@ -25,8 +25,8 @@ static void sigh_button_event( GtkWidget *gtklist,
|
||||
|
||||
/* Main function to set up the user interface */
|
||||
|
||||
gint main( int argc,
|
||||
gchar *argv[] )
|
||||
gint main (int argc,
|
||||
gchar *argv[])
|
||||
{
|
||||
GtkWidget *separator;
|
||||
GtkWidget *window;
|
||||
@@ -41,7 +41,7 @@ gint main( int argc,
|
||||
gchar buffer[64];
|
||||
|
||||
|
||||
/* Initialize GTK (and subsequently GDK) */
|
||||
/* Initialize gtk+ (and subsequently gdk) */
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
@@ -65,15 +65,15 @@ gint main( int argc,
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
gtk_widget_show(vbox);
|
||||
|
||||
/* This is the scrolled window to put the List widget inside */
|
||||
/* This is the scrolled window to put the GtkList widget inside */
|
||||
scrolled_window=gtk_scrolled_window_new(NULL, NULL);
|
||||
gtk_widget_set_usize(scrolled_window, 250, 150);
|
||||
gtk_container_add(GTK_CONTAINER(vbox), scrolled_window);
|
||||
gtk_widget_show(scrolled_window);
|
||||
|
||||
/* Create thekList widget.
|
||||
/* Create the GtkList widget.
|
||||
* Connect the sigh_print_selection() signal handler
|
||||
* function to the "selection_changed" signal of the List
|
||||
* function to the "selection_changed" signal of the GtkList
|
||||
* to print out the selected items each time the selection
|
||||
* has changed */
|
||||
gtklist=gtk_list_new();
|
||||
@@ -93,7 +93,7 @@ gint main( int argc,
|
||||
gtk_container_add(GTK_CONTAINER(vbox), frame);
|
||||
gtk_widget_show(frame);
|
||||
|
||||
/* Connect the sigh_button_event() signal handler to the List
|
||||
/* Connect the sigh_button_event() signal handler to the GtkList
|
||||
* which will handle the "arresting" of list items
|
||||
*/
|
||||
gtk_signal_connect(GTK_OBJECT(gtklist),
|
||||
@@ -106,7 +106,7 @@ gint main( int argc,
|
||||
gtk_container_add(GTK_CONTAINER(vbox), separator);
|
||||
gtk_widget_show(separator);
|
||||
|
||||
/* Finally create a button and connect its "clicked" signal
|
||||
/* Finally create a button and connect it's "clicked" signal
|
||||
* to the destruction of the window */
|
||||
button=gtk_button_new_with_label("Close");
|
||||
gtk_container_add(GTK_CONTAINER(vbox), button);
|
||||
@@ -117,8 +117,8 @@ gint main( int argc,
|
||||
GTK_OBJECT(window));
|
||||
|
||||
|
||||
/* Now we create 5 list items, each having its own
|
||||
* label and add them to the List using gtk_container_add()
|
||||
/* Now we create 5 list items, each having it's own
|
||||
* label and add them to the GtkList using gtk_container_add()
|
||||
* Also we query the text string from the label and
|
||||
* associate it with the list_item_data_key for each list item
|
||||
*/
|
||||
@@ -176,7 +176,7 @@ gint main( int argc,
|
||||
}
|
||||
|
||||
/* This is the signal handler that got connected to button
|
||||
* press/release events of the List
|
||||
* press/release events of the GtkList
|
||||
*/
|
||||
void sigh_button_event( GtkWidget *gtklist,
|
||||
GdkEventButton *event,
|
||||
@@ -218,7 +218,7 @@ void sigh_button_event( GtkWidget *gtklist,
|
||||
g_list_free(free_list);
|
||||
|
||||
/* If we have a new prisoner, remove him from the
|
||||
* List and put him into the frame "Prison".
|
||||
* GtkList and put him into the frame "Prison".
|
||||
* We need to unselect the item first.
|
||||
*/
|
||||
if (new_prisoner) {
|
||||
@@ -235,16 +235,16 @@ void sigh_button_event( GtkWidget *gtklist,
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the signal handler that gets called if List
|
||||
/* This is the signal handler that gets called if GtkList
|
||||
* emits the "selection_changed" signal
|
||||
*/
|
||||
void sigh_print_selection( GtkWidget *gtklist,
|
||||
gpointer func_data )
|
||||
gpointer func_data)
|
||||
{
|
||||
GList *dlist;
|
||||
|
||||
/* Fetch the doubly linked list of selected items
|
||||
* of the List, remember to treat this as read-only!
|
||||
* of the GtkList, remember to treat this as read-only!
|
||||
*/
|
||||
dlist=GTK_LIST(gtklist)->selection;
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
#include <strings.h>
|
||||
|
||||
/* Obligatory basic callback */
|
||||
static void print_hello( GtkWidget *w,
|
||||
gpointer data )
|
||||
{
|
||||
g_message ("Hello, World!\n");
|
||||
static void print_hello(GtkWidget *w, gpointer data) {
|
||||
g_message("Hello, World!\n");
|
||||
}
|
||||
|
||||
/* This is the GtkItemFactoryEntry structure used to generate new menus.
|
||||
@@ -29,33 +27,31 @@ static void print_hello( GtkWidget *w,
|
||||
"<RadioItem>" -> create a radio item
|
||||
<path> -> path of a radio item to link against
|
||||
"<Separator>" -> create a separator
|
||||
"<Branch>" -> create an item to hold sub items (optional)
|
||||
"<Branch>" -> create an item to hold sub items
|
||||
"<LastBranch>" -> create a right justified branch
|
||||
*/
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] = {
|
||||
{ "/_File", NULL, NULL, 0, "<Branch>" },
|
||||
{ "/File/_New", "<control>N", print_hello, 0, NULL },
|
||||
{ "/File/_Open", "<control>O", print_hello, 0, NULL },
|
||||
{ "/File/_Save", "<control>S", print_hello, 0, NULL },
|
||||
{ "/File/Save _As", NULL, NULL, 0, NULL },
|
||||
{ "/File/sep1", NULL, NULL, 0, "<Separator>" },
|
||||
{ "/File/Quit", "<control>Q", gtk_main_quit, 0, NULL },
|
||||
{ "/_Options", NULL, NULL, 0, "<Branch>" },
|
||||
{ "/Options/Test", NULL, NULL, 0, NULL },
|
||||
{ "/_Help", NULL, NULL, 0, "<LastBranch>" },
|
||||
{ "/_Help/About", NULL, NULL, 0, NULL },
|
||||
{"/_File", NULL, NULL, 0, "<Branch>"},
|
||||
{"/File/_New", "<control>N", print_hello, 0, NULL},
|
||||
{"/File/_Open", "<control>O", print_hello, 0, NULL},
|
||||
{"/File/_Save", "<control>S", print_hello, 0, NULL},
|
||||
{"/File/Save _As", NULL, NULL, 0, NULL},
|
||||
{"/File/sep1", NULL, NULL, 0, "<Separator>"},
|
||||
{"/File/Quit", "<control>Q", gtk_main_quit, 0, NULL},
|
||||
{"/_Options", NULL, NULL, 0, "<Branch>"},
|
||||
{"/Options/Test", NULL, NULL, 0, NULL},
|
||||
{"/_Help", NULL, NULL, 0, "<LastBranch>"},
|
||||
{"/_Help/About", NULL, NULL, 0, NULL},
|
||||
};
|
||||
|
||||
|
||||
void get_main_menu( GtkWidget *window,
|
||||
GtkWidget **menubar )
|
||||
{
|
||||
void get_main_menu(GtkWidget *window, GtkWidget ** menubar) {
|
||||
int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
|
||||
GtkItemFactory *item_factory;
|
||||
GtkAccelGroup *accel_group;
|
||||
gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
|
||||
|
||||
accel_group = gtk_accel_group_new ();
|
||||
accel_group = gtk_accel_group_new();
|
||||
|
||||
/* This function initializes the item factory.
|
||||
Param 1: The type of menu - can be GTK_TYPE_MENU_BAR, GTK_TYPE_MENU,
|
||||
@@ -65,49 +61,47 @@ void get_main_menu( GtkWidget *window,
|
||||
the accelerator table while generating menus.
|
||||
*/
|
||||
|
||||
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
|
||||
item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>",
|
||||
accel_group);
|
||||
|
||||
/* This function generates the menu items. Pass the item factory,
|
||||
the number of items in the array, the array itself, and any
|
||||
callback data for the the menu items. */
|
||||
gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
|
||||
gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL);
|
||||
|
||||
/* Attach the new accelerator group to the window. */
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
gtk_accel_group_attach (accel_group, GTK_OBJECT (window));
|
||||
|
||||
if (menubar)
|
||||
/* Finally, return the actual menu bar created by the item factory. */
|
||||
*menubar = gtk_item_factory_get_widget (item_factory, "<main>");
|
||||
*menubar = gtk_item_factory_get_widget(item_factory, "<main>");
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
GtkWidget *window;
|
||||
GtkWidget *main_vbox;
|
||||
GtkWidget *menubar;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit),
|
||||
"WM destroy");
|
||||
gtk_window_set_title (GTK_WINDOW(window), "Item Factory");
|
||||
gtk_widget_set_usize (GTK_WIDGET(window), 300, 200);
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect(GTK_OBJECT(window), "destroy",
|
||||
GTK_SIGNAL_FUNC(gtk_main_quit),
|
||||
"WM destroy");
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Item Factory");
|
||||
gtk_widget_set_usize(GTK_WIDGET(window), 300, 200);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 1);
|
||||
gtk_container_border_width (GTK_CONTAINER (main_vbox), 1);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
main_vbox = gtk_vbox_new(FALSE, 1);
|
||||
gtk_container_border_width(GTK_CONTAINER(main_vbox), 1);
|
||||
gtk_container_add(GTK_CONTAINER(window), main_vbox);
|
||||
gtk_widget_show(main_vbox);
|
||||
|
||||
get_main_menu (window, &menubar);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, TRUE, 0);
|
||||
gtk_widget_show (menubar);
|
||||
get_main_menu(window, &menubar);
|
||||
gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
|
||||
gtk_widget_show(menubar);
|
||||
|
||||
gtk_widget_show (window);
|
||||
gtk_main ();
|
||||
gtk_widget_show(window);
|
||||
gtk_main();
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
static gint button_press (GtkWidget *, GdkEvent *);
|
||||
static void menuitem_response (gchar *);
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
|
||||
GtkWidget *window;
|
||||
@@ -22,17 +21,17 @@ int main( int argc,
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* create a new window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_usize (GTK_WIDGET (window), 200, 100);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "GTK Menu Test");
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
(GtkSignalFunc) gtk_main_quit, NULL);
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_usize( GTK_WIDGET (window), 200, 100);
|
||||
gtk_window_set_title(GTK_WINDOW (window), "GTK Menu Test");
|
||||
gtk_signal_connect(GTK_OBJECT (window), "delete_event",
|
||||
(GtkSignalFunc) gtk_main_quit, NULL);
|
||||
|
||||
/* Init the menu-widget, and remember -- never
|
||||
* gtk_show_widget() the menu widget!!
|
||||
* This is the menu that holds the menu items, the one that
|
||||
* will pop up when you click on the "Root Menu" in the app */
|
||||
menu = gtk_menu_new ();
|
||||
menu = gtk_menu_new();
|
||||
|
||||
/* Next we make a little loop that makes three menu-entries for "test-menu".
|
||||
* Notice the call to gtk_menu_append. Here we are adding a list of
|
||||
@@ -40,64 +39,64 @@ int main( int argc,
|
||||
* signal on each of the menu items and setup a callback for it,
|
||||
* but it's omitted here to save space. */
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
/* Copy the names to the buf. */
|
||||
sprintf (buf, "Test-undermenu - %d", i);
|
||||
sprintf(buf, "Test-undermenu - %d", i);
|
||||
|
||||
/* Create a new menu-item with a name... */
|
||||
menu_items = gtk_menu_item_new_with_label (buf);
|
||||
menu_items = gtk_menu_item_new_with_label(buf);
|
||||
|
||||
/* ...and add it to the menu. */
|
||||
gtk_menu_append (GTK_MENU (menu), menu_items);
|
||||
gtk_menu_append(GTK_MENU (menu), menu_items);
|
||||
|
||||
/* Do something interesting when the menuitem is selected */
|
||||
gtk_signal_connect_object (GTK_OBJECT (menu_items), "activate",
|
||||
GTK_SIGNAL_FUNC (menuitem_response), (gpointer) g_strdup (buf));
|
||||
gtk_signal_connect_object(GTK_OBJECT(menu_items), "activate",
|
||||
GTK_SIGNAL_FUNC(menuitem_response), (gpointer) g_strdup(buf));
|
||||
|
||||
/* Show the widget */
|
||||
gtk_widget_show (menu_items);
|
||||
gtk_widget_show(menu_items);
|
||||
}
|
||||
|
||||
/* This is the root menu, and will be the label
|
||||
* displayed on the menu bar. There won't be a signal handler attached,
|
||||
* as it only pops up the rest of the menu when pressed. */
|
||||
root_menu = gtk_menu_item_new_with_label ("Root Menu");
|
||||
root_menu = gtk_menu_item_new_with_label("Root Menu");
|
||||
|
||||
gtk_widget_show (root_menu);
|
||||
gtk_widget_show(root_menu);
|
||||
|
||||
/* Now we specify that we want our newly created "menu" to be the menu
|
||||
* for the "root menu" */
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (root_menu), menu);
|
||||
gtk_menu_item_set_submenu(GTK_MENU_ITEM (root_menu), menu);
|
||||
|
||||
/* A vbox to put a menu and a button in: */
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
vbox = gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
gtk_widget_show(vbox);
|
||||
|
||||
/* Create a menu-bar to hold the menus and add it to our main window */
|
||||
menu_bar = gtk_menu_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), menu_bar, FALSE, FALSE, 2);
|
||||
gtk_widget_show (menu_bar);
|
||||
menu_bar = gtk_menu_bar_new();
|
||||
gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 2);
|
||||
gtk_widget_show(menu_bar);
|
||||
|
||||
/* Create a button to which to attach menu as a popup */
|
||||
button = gtk_button_new_with_label ("press me");
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "event",
|
||||
GTK_SIGNAL_FUNC (button_press), GTK_OBJECT (menu));
|
||||
gtk_box_pack_end (GTK_BOX (vbox), button, TRUE, TRUE, 2);
|
||||
gtk_widget_show (button);
|
||||
button = gtk_button_new_with_label("press me");
|
||||
gtk_signal_connect_object(GTK_OBJECT(button), "event",
|
||||
GTK_SIGNAL_FUNC (button_press), GTK_OBJECT(menu));
|
||||
gtk_box_pack_end(GTK_BOX(vbox), button, TRUE, TRUE, 2);
|
||||
gtk_widget_show(button);
|
||||
|
||||
/* And finally we append the menu-item to the menu-bar -- this is the
|
||||
* "root" menu-item I have been raving about =) */
|
||||
gtk_menu_bar_append (GTK_MENU_BAR (menu_bar), root_menu);
|
||||
gtk_menu_bar_append(GTK_MENU_BAR (menu_bar), root_menu);
|
||||
|
||||
/* always display the window as the last step so it all splashes on
|
||||
* the screen at once. */
|
||||
gtk_widget_show (window);
|
||||
gtk_widget_show(window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Respond to a button-press by posting a menu passed in as widget.
|
||||
@@ -106,13 +105,12 @@ int main( int argc,
|
||||
* the button that was pressed.
|
||||
*/
|
||||
|
||||
static gint button_press( GtkWidget *widget,
|
||||
GdkEvent *event )
|
||||
static gint button_press (GtkWidget *widget, GdkEvent *event)
|
||||
{
|
||||
|
||||
if (event->type == GDK_BUTTON_PRESS) {
|
||||
GdkEventButton *bevent = (GdkEventButton *) event;
|
||||
gtk_menu_popup (GTK_MENU (widget), NULL, NULL, NULL, NULL,
|
||||
gtk_menu_popup (GTK_MENU(widget), NULL, NULL, NULL, NULL,
|
||||
bevent->button, bevent->time);
|
||||
/* Tell calling code that we have handled this event; the buck
|
||||
* stops here. */
|
||||
@@ -126,8 +124,8 @@ static gint button_press( GtkWidget *widget,
|
||||
|
||||
/* Print a string when a menu item is selected */
|
||||
|
||||
static void menuitem_response( gchar *string )
|
||||
static void menuitem_response (gchar *string)
|
||||
{
|
||||
printf ("%s\n", string);
|
||||
printf("%s\n", string);
|
||||
}
|
||||
/* example-end */
|
||||
|
||||
@@ -3,15 +3,13 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* This function rotates the position of the tabs */
|
||||
void rotate_book( GtkButton *button,
|
||||
GtkNotebook *notebook )
|
||||
void rotate_book (GtkButton *button, GtkNotebook *notebook)
|
||||
{
|
||||
gtk_notebook_set_tab_pos (notebook, (notebook->tab_pos +1) %4);
|
||||
}
|
||||
|
||||
/* Add/Remove the page tabs and the borders */
|
||||
void tabsborder_book( GtkButton *button,
|
||||
GtkNotebook *notebook )
|
||||
void tabsborder_book (GtkButton *button, GtkNotebook *notebook)
|
||||
{
|
||||
gint tval = FALSE;
|
||||
gint bval = FALSE;
|
||||
@@ -25,8 +23,7 @@ void tabsborder_book( GtkButton *button,
|
||||
}
|
||||
|
||||
/* Remove a page from the notebook */
|
||||
void remove_book( GtkButton *button,
|
||||
GtkNotebook *notebook )
|
||||
void remove_book (GtkButton *button, GtkNotebook *notebook)
|
||||
{
|
||||
gint page;
|
||||
|
||||
@@ -37,16 +34,12 @@ void remove_book( GtkButton *button,
|
||||
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
|
||||
}
|
||||
|
||||
gint delete( GtkWidget *widget,
|
||||
GtkWidget *event,
|
||||
gpointer data )
|
||||
void delete (GtkWidget *widget, GtkWidget *event, gpointer data)
|
||||
{
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
@@ -77,7 +70,7 @@ int main( int argc,
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), notebook, 0,6,0,1);
|
||||
gtk_widget_show(notebook);
|
||||
|
||||
/* Let's append a bunch of pages to the notebook */
|
||||
/* Lets append a bunch of pages to the notebook */
|
||||
for (i=0; i < 5; i++) {
|
||||
sprintf(bufferf, "Append Frame %d", i+1);
|
||||
sprintf(bufferl, "Page %d", i+1);
|
||||
@@ -95,7 +88,7 @@ int main( int argc,
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), frame, label);
|
||||
}
|
||||
|
||||
/* Now let's add a page to a specific spot */
|
||||
/* Now lets add a page to a specific spot */
|
||||
checkbutton = gtk_check_button_new_with_label ("Check me please!");
|
||||
gtk_widget_set_usize(checkbutton, 100, 75);
|
||||
gtk_widget_show (checkbutton);
|
||||
@@ -103,7 +96,7 @@ int main( int argc,
|
||||
label = gtk_label_new ("Add page");
|
||||
gtk_notebook_insert_page (GTK_NOTEBOOK (notebook), checkbutton, label, 2);
|
||||
|
||||
/* Now finally let's prepend pages to the notebook */
|
||||
/* Now finally lets prepend pages to the notebook */
|
||||
for (i=0; i < 5; i++) {
|
||||
sprintf(bufferf, "Prepend Frame %d", i+1);
|
||||
sprintf(bufferl, "PPage %d", i+1);
|
||||
@@ -147,8 +140,7 @@ int main( int argc,
|
||||
|
||||
button = gtk_button_new_with_label ("tab position");
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) rotate_book,
|
||||
GTK_OBJECT(notebook));
|
||||
(GtkSignalFunc) rotate_book, GTK_OBJECT(notebook));
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), button, 3,4,1,2);
|
||||
gtk_widget_show(button);
|
||||
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
/* example-start packbox packbox.c */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
gint delete_event( GtkWidget *widget,
|
||||
void delete_event( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
gpointer data )
|
||||
{
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
/* Make a new hbox filled with button-labels. Arguments for the
|
||||
@@ -84,7 +82,7 @@ int main( int argc,
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf (stderr, "usage: packbox num, where num is 1, 2, or 3.\n");
|
||||
/* This just does cleanup in GTK and exits with an exit status of 1. */
|
||||
/* this just does cleanup in GTK, and exits with an exit status of 1. */
|
||||
gtk_exit (1);
|
||||
}
|
||||
|
||||
@@ -93,8 +91,8 @@ int main( int argc,
|
||||
/* Create our window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
/* You should always remember to connect the delete_event signal
|
||||
* to the main window. This is very important for proper intuitive
|
||||
/* You should always remember to connect the destroy signal to the
|
||||
* main window. This is very important for proper intuitive
|
||||
* behavior */
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (delete_event), NULL);
|
||||
@@ -130,7 +128,7 @@ int main( int argc,
|
||||
gtk_widget_show (box2);
|
||||
|
||||
/* Call our make box function - homogeneous = FALSE, spacing = 0,
|
||||
* expand = TRUE, fill = FALSE, padding = 0 */
|
||||
* expand = FALSE, fill = FALSE, padding = 0 */
|
||||
box2 = make_box (FALSE, 0, TRUE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
|
||||
gtk_widget_show (box2);
|
||||
@@ -144,8 +142,8 @@ int main( int argc,
|
||||
* but they are quite simple. */
|
||||
separator = gtk_hseparator_new ();
|
||||
|
||||
/* Pack the separator into the vbox. Remember each of these
|
||||
* widgets is being packed into a vbox, so they'll be stacked
|
||||
/* Cack the separator into the vbox. Remember each of these
|
||||
* widgets are being packed into a vbox, so they'll be stacked
|
||||
* vertically. */
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
|
||||
gtk_widget_show (separator);
|
||||
@@ -168,8 +166,7 @@ int main( int argc,
|
||||
|
||||
/* Another new separator. */
|
||||
separator = gtk_hseparator_new ();
|
||||
/* The last 3 arguments to gtk_box_pack_start are:
|
||||
* expand, fill, padding. */
|
||||
/* The last 3 arguments to gtk_box_pack_start are: expand, fill, padding. */
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
|
||||
gtk_widget_show (separator);
|
||||
|
||||
@@ -195,8 +192,7 @@ int main( int argc,
|
||||
gtk_widget_show (box2);
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
/* The last 3 arguments to gtk_box_pack_start are:
|
||||
* expand, fill, padding. */
|
||||
/* The last 3 arguments to gtk_box_pack_start are: expand, fill, padding. */
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 5);
|
||||
gtk_widget_show (separator);
|
||||
|
||||
@@ -259,13 +255,14 @@ int main( int argc,
|
||||
/* Our quit button. */
|
||||
button = gtk_button_new_with_label ("Quit");
|
||||
|
||||
/* Setup the signal to terminate the program when the button is clicked */
|
||||
/* Setup the signal to destroy the window. Remember that this will send
|
||||
* the "destroy" signal to the window which will be caught by our signal
|
||||
* handler as defined above. */
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_main_quit),
|
||||
GTK_OBJECT (window));
|
||||
/* Pack the button into the quitbox.
|
||||
* The last 3 arguments to gtk_box_pack_start are:
|
||||
* expand, fill, padding. */
|
||||
* The last 3 arguments to gtk_box_pack_start are: expand, fill, padding. */
|
||||
gtk_box_pack_start (GTK_BOX (quitbox), button, TRUE, FALSE, 0);
|
||||
/* pack the quitbox into the vbox (box1) */
|
||||
gtk_box_pack_start (GTK_BOX (box1), quitbox, FALSE, FALSE, 0);
|
||||
|
||||
@@ -81,7 +81,7 @@ main (int argv, char **argc)
|
||||
|
||||
info = g_malloc(sizeof(Info));
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
window = gtk_window_new(GTK_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (destroy), NULL);
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Create the list of "messages" */
|
||||
GtkWidget *create_list( void )
|
||||
GtkWidget *
|
||||
create_list (void)
|
||||
{
|
||||
|
||||
GtkWidget *scrolled_window;
|
||||
@@ -21,8 +22,8 @@ GtkWidget *create_list( void )
|
||||
|
||||
/* Create a new list and put it in the scrolled window */
|
||||
list = gtk_list_new ();
|
||||
gtk_scrolled_window_add_with_viewport (
|
||||
GTK_SCROLLED_WINDOW (scrolled_window), list);
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
list);
|
||||
gtk_widget_show (list);
|
||||
|
||||
/* Add some messages to the window */
|
||||
@@ -43,8 +44,8 @@ when our window is realized. We could also force our window to be
|
||||
realized with gtk_widget_realize, but it would have to be part of
|
||||
a hierarchy first */
|
||||
|
||||
void realize_text( GtkWidget *text,
|
||||
gpointer data )
|
||||
void
|
||||
realize_text (GtkWidget *text, gpointer data)
|
||||
{
|
||||
gtk_text_freeze (GTK_TEXT (text));
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL,
|
||||
@@ -61,7 +62,8 @@ void realize_text( GtkWidget *text,
|
||||
}
|
||||
|
||||
/* Create a scrolled text area that displays a "message" */
|
||||
GtkWidget *create_text( void )
|
||||
GtkWidget *
|
||||
create_text (void)
|
||||
{
|
||||
GtkWidget *table;
|
||||
GtkWidget *text;
|
||||
@@ -98,8 +100,8 @@ GtkWidget *create_text( void )
|
||||
return table;
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *vpaned;
|
||||
|
||||
@@ -29,24 +29,18 @@ static const char * xpm_data[] = {
|
||||
|
||||
/* when invoked (via signal delete_event), terminates the application.
|
||||
*/
|
||||
gint close_application( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
{
|
||||
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
|
||||
/* is invoked when the button is clicked. It just prints a message.
|
||||
*/
|
||||
void button_clicked( GtkWidget *widget,
|
||||
gpointer data ) {
|
||||
g_print( "button clicked\n" );
|
||||
void button_clicked( GtkWidget *widget, gpointer data ) {
|
||||
printf( "button clicked\n" );
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
/* GtkWidget is the storage type for widgets */
|
||||
GtkWidget *window, *pixmapwid, *button;
|
||||
|
||||
@@ -115,7 +115,7 @@ int main( int argc,
|
||||
gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 5);
|
||||
gtk_widget_show(align);
|
||||
|
||||
/* Create a Adjusment object to hold the range of the
|
||||
/* Create a GtkAdjusment object to hold the range of the
|
||||
* progress bar */
|
||||
adj = (GtkAdjustment *) gtk_adjustment_new (0, 1, 150, 0, 0, 0);
|
||||
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <glib.h>
|
||||
|
||||
gint close_application( GtkWidget *widget,
|
||||
void close_application( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
gpointer data )
|
||||
{
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
|
||||
@@ -102,7 +102,7 @@ void create_range_controls( void )
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
/* value, lower, upper, step_increment, page_increment, page_size */
|
||||
/* calue, lower, upper, step_increment, page_increment, page_size */
|
||||
/* Note that the page_size value only makes a difference for
|
||||
* scrollbar widgets, and the highest value you'll get is actually
|
||||
* (upper - page_size). */
|
||||
@@ -218,7 +218,7 @@ void create_range_controls( void )
|
||||
box2 = gtk_hbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
|
||||
/* An HScale widget for adjusting the number of digits on the
|
||||
/* A GtkHScale widget for adjusting the number of digits on the
|
||||
* sample scales. */
|
||||
label = gtk_label_new ("Scale Digits:");
|
||||
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
|
||||
@@ -238,7 +238,7 @@ void create_range_controls( void )
|
||||
box2 = gtk_hbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
|
||||
/* And, one last HScale widget for adjusting the page size of the
|
||||
/* And, one last GtkHScale widget for adjusting the page size of the
|
||||
* scrollbar. */
|
||||
label = gtk_label_new ("Scrollbar Page Size:");
|
||||
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
|
||||
|
||||
@@ -8,17 +8,12 @@
|
||||
#define YSIZE 400
|
||||
|
||||
/* This routine gets control when the close button is clicked */
|
||||
gint close_application( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
{
|
||||
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/* The main routine */
|
||||
int main( int argc,
|
||||
char *argv[] ) {
|
||||
int main( int argc, char *argv[] ) {
|
||||
GtkWidget *window, *table, *area, *hrule, *vrule;
|
||||
|
||||
/* Initialize GTK and create the main window */
|
||||
@@ -37,33 +32,28 @@ int main( int argc,
|
||||
gtk_drawing_area_size( (GtkDrawingArea *)area, XSIZE, YSIZE );
|
||||
gtk_table_attach( GTK_TABLE(table), area, 1, 2, 1, 2,
|
||||
GTK_EXPAND|GTK_FILL, GTK_FILL, 0, 0 );
|
||||
gtk_widget_set_events( area, GDK_POINTER_MOTION_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK );
|
||||
gtk_widget_set_events( area, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK );
|
||||
|
||||
/* The horizontal ruler goes on top. As the mouse moves across the
|
||||
* drawing area, a motion_notify_event is passed to the
|
||||
* appropriate event handler for the ruler. */
|
||||
/* The horizontal ruler goes on top. As the mouse moves across the drawing area,
|
||||
* a motion_notify_event is passed to the appropriate event handler for the ruler. */
|
||||
hrule = gtk_hruler_new();
|
||||
gtk_ruler_set_metric( GTK_RULER(hrule), GTK_PIXELS );
|
||||
gtk_ruler_set_range( GTK_RULER(hrule), 7, 13, 0, 20 );
|
||||
gtk_signal_connect_object( GTK_OBJECT(area), "motion_notify_event",
|
||||
(GtkSignalFunc)EVENT_METHOD(hrule,
|
||||
motion_notify_event),
|
||||
(GtkSignalFunc)EVENT_METHOD(hrule, motion_notify_event),
|
||||
GTK_OBJECT(hrule) );
|
||||
/* GTK_WIDGET_CLASS(GTK_OBJECT(hrule)->klass)->motion_notify_event, */
|
||||
gtk_table_attach( GTK_TABLE(table), hrule, 1, 2, 0, 1,
|
||||
GTK_EXPAND|GTK_SHRINK|GTK_FILL, GTK_FILL, 0, 0 );
|
||||
|
||||
/* The vertical ruler goes on the left. As the mouse moves across
|
||||
* the drawing area, a motion_notify_event is passed to the
|
||||
* appropriate event handler for the ruler. */
|
||||
/* The vertical ruler goes on the left. As the mouse moves across the drawing area,
|
||||
* a motion_notify_event is passed to the appropriate event handler for the ruler. */
|
||||
vrule = gtk_vruler_new();
|
||||
gtk_ruler_set_metric( GTK_RULER(vrule), GTK_PIXELS );
|
||||
gtk_ruler_set_range( GTK_RULER(vrule), 0, YSIZE, 10, YSIZE );
|
||||
gtk_signal_connect_object( GTK_OBJECT(area), "motion_notify_event",
|
||||
(GtkSignalFunc)
|
||||
GTK_WIDGET_CLASS(GTK_OBJECT(vrule)->klass)->
|
||||
motion_notify_event,
|
||||
GTK_WIDGET_CLASS(GTK_OBJECT(vrule)->klass)->motion_notify_event,
|
||||
GTK_OBJECT(vrule) );
|
||||
gtk_table_attach( GTK_TABLE(table), vrule, 0, 1, 1, 2,
|
||||
GTK_FILL, GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0 );
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
static GdkPixmap *pixmap = NULL;
|
||||
|
||||
/* Create a new backing pixmap of the appropriate size */
|
||||
static gint configure_event( GtkWidget *widget,
|
||||
GdkEventConfigure *event )
|
||||
static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
gdk_pixmap_unref(pixmap);
|
||||
@@ -46,8 +46,8 @@ static gint configure_event( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Redraw the screen from the backing pixmap */
|
||||
static gint expose_event( GtkWidget *widget,
|
||||
GdkEventExpose *event )
|
||||
static gint
|
||||
expose_event (GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
gdk_draw_pixmap(widget->window,
|
||||
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
|
||||
@@ -60,9 +60,8 @@ static gint expose_event( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Draw a rectangle on the screen */
|
||||
static void draw_brush( GtkWidget *widget,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
static void
|
||||
draw_brush (GtkWidget *widget, gdouble x, gdouble y)
|
||||
{
|
||||
GdkRectangle update_rect;
|
||||
|
||||
@@ -78,8 +77,8 @@ static void draw_brush( GtkWidget *widget,
|
||||
gtk_widget_draw (widget, &update_rect);
|
||||
}
|
||||
|
||||
static gint button_press_event( GtkWidget *widget,
|
||||
GdkEventButton *event )
|
||||
static gint
|
||||
button_press_event (GtkWidget *widget, GdkEventButton *event)
|
||||
{
|
||||
if (event->button == 1 && pixmap != NULL)
|
||||
draw_brush (widget, event->x, event->y);
|
||||
@@ -87,8 +86,8 @@ static gint button_press_event( GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gint motion_notify_event( GtkWidget *widget,
|
||||
GdkEventMotion *event )
|
||||
static gint
|
||||
motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
|
||||
{
|
||||
int x, y;
|
||||
GdkModifierType state;
|
||||
@@ -108,13 +107,14 @@ static gint motion_notify_event( GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void quit ()
|
||||
void
|
||||
quit ()
|
||||
{
|
||||
gtk_exit (0);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *drawing_area;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
CC = gcc
|
||||
|
||||
scribble-xinput: scribble-xinput.c
|
||||
$(CC) `gtk-config --cflags` scribble-xinput.c -o scribble-xinput `gtk-config --libs`
|
||||
|
||||
clean:
|
||||
rm -f *.o scribble-xinput
|
||||
@@ -1,270 +0,0 @@
|
||||
/* example-start scribble-xinput scribble-xinput.c */
|
||||
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Backing pixmap for drawing area */
|
||||
static GdkPixmap *pixmap = NULL;
|
||||
|
||||
/* Create a new backing pixmap of the appropriate size */
|
||||
static gint
|
||||
configure_event (GtkWidget *widget, GdkEventConfigure *event)
|
||||
{
|
||||
if (pixmap)
|
||||
gdk_pixmap_unref(pixmap);
|
||||
|
||||
pixmap = gdk_pixmap_new(widget->window,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height,
|
||||
-1);
|
||||
gdk_draw_rectangle (pixmap,
|
||||
widget->style->white_gc,
|
||||
TRUE,
|
||||
0, 0,
|
||||
widget->allocation.width,
|
||||
widget->allocation.height);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Redraw the screen from the backing pixmap */
|
||||
static gint
|
||||
expose_event (GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
gdk_draw_pixmap(widget->window,
|
||||
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
|
||||
pixmap,
|
||||
event->area.x, event->area.y,
|
||||
event->area.x, event->area.y,
|
||||
event->area.width, event->area.height);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Draw a rectangle on the screen, size depending on pressure,
|
||||
and color on the type of device */
|
||||
static void
|
||||
draw_brush (GtkWidget *widget, GdkInputSource source,
|
||||
gdouble x, gdouble y, gdouble pressure)
|
||||
{
|
||||
GdkGC *gc;
|
||||
GdkRectangle update_rect;
|
||||
|
||||
switch (source)
|
||||
{
|
||||
case GDK_SOURCE_MOUSE:
|
||||
gc = widget->style->dark_gc[GTK_WIDGET_STATE (widget)];
|
||||
break;
|
||||
case GDK_SOURCE_PEN:
|
||||
gc = widget->style->black_gc;
|
||||
break;
|
||||
case GDK_SOURCE_ERASER:
|
||||
gc = widget->style->white_gc;
|
||||
break;
|
||||
default:
|
||||
gc = widget->style->light_gc[GTK_WIDGET_STATE (widget)];
|
||||
}
|
||||
|
||||
update_rect.x = x - 10 * pressure;
|
||||
update_rect.y = y - 10 * pressure;
|
||||
update_rect.width = 20 * pressure;
|
||||
update_rect.height = 20 * pressure;
|
||||
gdk_draw_rectangle (pixmap, gc, TRUE,
|
||||
update_rect.x, update_rect.y,
|
||||
update_rect.width, update_rect.height);
|
||||
gtk_widget_draw (widget, &update_rect);
|
||||
}
|
||||
|
||||
static void
|
||||
print_button_press (guint32 deviceid)
|
||||
{
|
||||
GList *tmp_list;
|
||||
|
||||
/* gdk_input_list_devices returns an internal list, so we shouldn't
|
||||
free it afterwards */
|
||||
tmp_list = gdk_input_list_devices();
|
||||
|
||||
while (tmp_list)
|
||||
{
|
||||
GdkDeviceInfo *info = (GdkDeviceInfo *)tmp_list->data;
|
||||
|
||||
if (info->deviceid == deviceid)
|
||||
{
|
||||
g_print("Button press on device '%s'\n", info->name);
|
||||
return;
|
||||
}
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
button_press_event (GtkWidget *widget, GdkEventButton *event)
|
||||
{
|
||||
print_button_press (event->deviceid);
|
||||
|
||||
if (event->button == 1 && pixmap != NULL)
|
||||
draw_brush (widget, event->source, event->x, event->y, event->pressure);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gint
|
||||
motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
|
||||
{
|
||||
gdouble x, y;
|
||||
gdouble pressure;
|
||||
GdkModifierType state;
|
||||
|
||||
if (event->is_hint)
|
||||
gdk_input_window_get_pointer (event->window, event->deviceid,
|
||||
&x, &y, &pressure,
|
||||
NULL, NULL, &state);
|
||||
else
|
||||
{
|
||||
x = event->x;
|
||||
y = event->y;
|
||||
pressure = event->pressure;
|
||||
state = event->state;
|
||||
}
|
||||
|
||||
if (state & GDK_BUTTON1_MASK && pixmap != NULL)
|
||||
draw_brush (widget, event->source, x, y, pressure);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
input_dialog_destroy (GtkWidget *w, gpointer data)
|
||||
{
|
||||
*((GtkWidget **)data) = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
create_input_dialog ()
|
||||
{
|
||||
static GtkWidget *inputd = NULL;
|
||||
|
||||
if (!inputd)
|
||||
{
|
||||
inputd = gtk_input_dialog_new();
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(inputd), "destroy",
|
||||
(GtkSignalFunc)input_dialog_destroy, &inputd);
|
||||
gtk_signal_connect_object (GTK_OBJECT(GTK_INPUT_DIALOG(inputd)->close_button),
|
||||
"clicked",
|
||||
(GtkSignalFunc)gtk_widget_hide,
|
||||
GTK_OBJECT(inputd));
|
||||
gtk_widget_hide ( GTK_INPUT_DIALOG(inputd)->save_button);
|
||||
|
||||
gtk_widget_show (inputd);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!GTK_WIDGET_MAPPED(inputd))
|
||||
gtk_widget_show(inputd);
|
||||
else
|
||||
gdk_window_raise(inputd->window);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
quit ()
|
||||
{
|
||||
gtk_exit (0);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *drawing_area;
|
||||
GtkWidget *vbox;
|
||||
|
||||
GtkWidget *button;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_name (window, "Test Input");
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (quit), NULL);
|
||||
|
||||
/* Create the drawing area */
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA (drawing_area), 200, 200);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), drawing_area, TRUE, TRUE, 0);
|
||||
|
||||
gtk_widget_show (drawing_area);
|
||||
|
||||
/* Signals used to handle backing pixmap */
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (drawing_area), "expose_event",
|
||||
(GtkSignalFunc) expose_event, NULL);
|
||||
gtk_signal_connect (GTK_OBJECT(drawing_area),"configure_event",
|
||||
(GtkSignalFunc) configure_event, NULL);
|
||||
|
||||
/* Event signals */
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (drawing_area), "motion_notify_event",
|
||||
(GtkSignalFunc) motion_notify_event, NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (drawing_area), "button_press_event",
|
||||
(GtkSignalFunc) button_press_event, NULL);
|
||||
|
||||
gtk_widget_set_events (drawing_area, GDK_EXPOSURE_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK
|
||||
| GDK_BUTTON_PRESS_MASK
|
||||
| GDK_POINTER_MOTION_MASK
|
||||
| GDK_POINTER_MOTION_HINT_MASK);
|
||||
|
||||
/* The following call enables tracking and processing of extension
|
||||
events for the drawing area */
|
||||
gtk_widget_set_extension_events (drawing_area, GDK_EXTENSION_EVENTS_CURSOR);
|
||||
|
||||
/* .. And some buttons */
|
||||
button = gtk_button_new_with_label ("Input Dialog");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (create_input_dialog), NULL);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Quit");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (window));
|
||||
gtk_widget_show (button);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* example-end */
|
||||
@@ -2,14 +2,12 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void destroy( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void destroy(GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
static GtkWidget *window;
|
||||
GtkWidget *scrolled_window;
|
||||
@@ -21,7 +19,9 @@ int main( int argc,
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create a new dialog window for the scrolled window to be
|
||||
* packed into. */
|
||||
* packed into. A dialog is just like a normal window except it has a
|
||||
* vbox and a horizontal separator packed into it. It's just a shortcut
|
||||
* for creating dialogs */
|
||||
window = gtk_dialog_new ();
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
(GtkSignalFunc) destroy, NULL);
|
||||
@@ -54,8 +54,8 @@ int main( int argc,
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
|
||||
/* pack the table into the scrolled window */
|
||||
gtk_scrolled_window_add_with_viewport (
|
||||
GTK_SCROLLED_WINDOW (scrolled_window), table);
|
||||
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window),
|
||||
table);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* this simply creates a grid of toggle buttons on the table
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void selection_received( GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
gpointer data );
|
||||
void selection_received (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
gpointer data);
|
||||
|
||||
/* Signal handler invoked when user clicks on the "Get Targets" button */
|
||||
void get_targets( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void
|
||||
get_targets (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
static GdkAtom targets_atom = GDK_NONE;
|
||||
|
||||
@@ -22,9 +22,9 @@ void get_targets( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Signal handler called when the selections owner returns the data */
|
||||
void selection_received( GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
gpointer data )
|
||||
void
|
||||
selection_received (GtkWidget *widget, GtkSelectionData *selection_data,
|
||||
gpointer data)
|
||||
{
|
||||
GdkAtom *atoms;
|
||||
GList *item_list;
|
||||
@@ -60,8 +60,8 @@ void selection_received( GtkWidget *widget,
|
||||
return;
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include <time.h>
|
||||
|
||||
/* Callback when the user toggles the selection */
|
||||
void selection_toggled( GtkWidget *widget,
|
||||
gint *have_selection )
|
||||
void
|
||||
selection_toggled (GtkWidget *widget, gint *have_selection)
|
||||
{
|
||||
if (GTK_TOGGLE_BUTTON(widget)->active)
|
||||
{
|
||||
@@ -32,9 +32,9 @@ void selection_toggled( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Called when another application claims the selection */
|
||||
gint selection_clear( GtkWidget *widget,
|
||||
GdkEventSelection *event,
|
||||
gint *have_selection )
|
||||
gint
|
||||
selection_clear (GtkWidget *widget, GdkEventSelection *event,
|
||||
gint *have_selection)
|
||||
{
|
||||
*have_selection = FALSE;
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widget), FALSE);
|
||||
@@ -43,16 +43,15 @@ gint selection_clear( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* Supplies the current time as the selection. */
|
||||
void selection_handle( GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time_stamp,
|
||||
gpointer data )
|
||||
void
|
||||
selection_handle (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *timestr;
|
||||
time_t current_time;
|
||||
|
||||
current_time = time(NULL);
|
||||
current_time = time (NULL);
|
||||
timestr = asctime (localtime(¤t_time));
|
||||
/* When we return a single string, it should not be null terminated.
|
||||
That will be done for us */
|
||||
@@ -61,10 +60,11 @@ void selection_handle( GtkWidget *widget,
|
||||
8, timestr, strlen(timestr));
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
GtkWidget *selection_button;
|
||||
|
||||
static int have_selection = FALSE;
|
||||
@@ -91,12 +91,9 @@ int main( int argc,
|
||||
gtk_signal_connect (GTK_OBJECT(selection_button), "selection_clear_event",
|
||||
GTK_SIGNAL_FUNC (selection_clear), &have_selection);
|
||||
|
||||
gtk_selection_add_target (selection_button,
|
||||
GDK_SELECTION_PRIMARY,
|
||||
GDK_SELECTION_TYPE_STRING,
|
||||
1);
|
||||
gtk_signal_connect (GTK_OBJECT(selection_button), "selection_get",
|
||||
GTK_SIGNAL_FUNC (selection_handle), &have_selection);
|
||||
gtk_selection_add_handler (selection_button, GDK_SELECTION_PRIMARY,
|
||||
GDK_SELECTION_TYPE_STRING,
|
||||
selection_handle, NULL);
|
||||
|
||||
gtk_widget_show (selection_button);
|
||||
gtk_widget_show (window);
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
|
||||
GtkWidget *status_bar;
|
||||
|
||||
void push_item( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void push_item (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
static int count = 1;
|
||||
char buff[20];
|
||||
@@ -17,15 +16,13 @@ void push_item( GtkWidget *widget,
|
||||
return;
|
||||
}
|
||||
|
||||
void pop_item( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void pop_item (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_statusbar_pop( GTK_STATUSBAR(status_bar), GPOINTER_TO_INT(data) );
|
||||
return;
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
|
||||
GtkWidget *window;
|
||||
@@ -51,8 +48,7 @@ int main( int argc,
|
||||
gtk_box_pack_start (GTK_BOX (vbox), status_bar, TRUE, TRUE, 0);
|
||||
gtk_widget_show (status_bar);
|
||||
|
||||
context_id = gtk_statusbar_get_context_id(
|
||||
GTK_STATUSBAR(status_bar), "Statusbar example");
|
||||
context_id = gtk_statusbar_get_context_id( GTK_STATUSBAR(status_bar), "Statusbar example");
|
||||
|
||||
button = gtk_button_new_with_label("push item");
|
||||
gtk_signal_connect(GTK_OBJECT(button), "clicked",
|
||||
|
||||
@@ -11,12 +11,11 @@ void callback( GtkWidget *widget,
|
||||
}
|
||||
|
||||
/* This callback quits the program */
|
||||
gint delete_event( GtkWidget *widget,
|
||||
void delete_event( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
gpointer data )
|
||||
{
|
||||
gtk_main_quit ();
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
|
||||
@@ -19,14 +19,12 @@ void text_toggle_word_wrap (GtkWidget *checkbutton,
|
||||
GTK_TOGGLE_BUTTON(checkbutton)->active);
|
||||
}
|
||||
|
||||
void close_application( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void close_application( GtkWidget *widget, gpointer data )
|
||||
{
|
||||
gtk_main_quit();
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *box1;
|
||||
@@ -39,7 +37,7 @@ int main( int argc,
|
||||
GtkWidget *vscrollbar;
|
||||
GtkWidget *text;
|
||||
GdkColormap *cmap;
|
||||
GdkColor color;
|
||||
GdkColor colour;
|
||||
GdkFont *fixed_font;
|
||||
|
||||
FILE *infile;
|
||||
@@ -87,29 +85,28 @@ int main( int argc,
|
||||
GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (vscrollbar);
|
||||
|
||||
/* Get the system color map and allocate the color red */
|
||||
/* Get the system colour map and allocate the colour red */
|
||||
cmap = gdk_colormap_get_system();
|
||||
color.red = 0xffff;
|
||||
color.green = 0;
|
||||
color.blue = 0;
|
||||
if (!gdk_color_alloc(cmap, &color)) {
|
||||
g_error("couldn't allocate color");
|
||||
colour.red = 0xffff;
|
||||
colour.green = 0;
|
||||
colour.blue = 0;
|
||||
if (!gdk_color_alloc(cmap, &colour)) {
|
||||
g_error("couldn't allocate colour");
|
||||
}
|
||||
|
||||
/* Load a fixed font */
|
||||
fixed_font = gdk_font_load ("-misc-fixed-medium-r-*-*-*-140-*-*-*-*-*-*");
|
||||
|
||||
/* Realizing a widget creates a window for it,
|
||||
* ready for us to insert some text */
|
||||
/* Realizing a widget creates a window for it, ready for us to insert some text */
|
||||
gtk_widget_realize (text);
|
||||
|
||||
/* Freeze the text widget, ready for multiple updates */
|
||||
gtk_text_freeze (GTK_TEXT (text));
|
||||
|
||||
/* Insert some colored text */
|
||||
/* Insert some coloured text */
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL,
|
||||
"Supports ", -1);
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, &color, NULL,
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, &colour, NULL,
|
||||
"colored ", -1);
|
||||
gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL,
|
||||
"text and different ", -1);
|
||||
|
||||
@@ -68,10 +68,8 @@ tictactoe_class_init (TictactoeClass *class)
|
||||
tictactoe_signals[TICTACTOE_SIGNAL] = gtk_signal_new ("tictactoe",
|
||||
GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (TictactoeClass,
|
||||
tictactoe),
|
||||
gtk_signal_default_marshaller,
|
||||
GTK_TYPE_NONE, 0);
|
||||
GTK_SIGNAL_OFFSET (TictactoeClass, tictactoe),
|
||||
gtk_signal_default_marshaller, GTK_TYPE_NONE, 0);
|
||||
|
||||
|
||||
gtk_object_class_add_signals (object_class, tictactoe_signals, LAST_SIGNAL);
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "tictactoe.h"
|
||||
|
||||
void win( GtkWidget *widget,
|
||||
gpointer data )
|
||||
void
|
||||
win (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
g_print ("Yay!\n");
|
||||
tictactoe_clear (TICTACTOE (widget));
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *ttt;
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* for all the GtkItem:: and GtkTreeItem:: signals */
|
||||
static void cb_itemsignal( GtkWidget *item,
|
||||
gchar *signame )
|
||||
static void cb_itemsignal (GtkWidget *item, gchar *signame)
|
||||
{
|
||||
gchar *name;
|
||||
GtkLabel *label;
|
||||
|
||||
/* It's a Bin, so it has one child, which we know to be a
|
||||
/* It's a GtkBin, so it has one child, which we know to be a
|
||||
label, so get that */
|
||||
label = GTK_LABEL (GTK_BIN (item)->child);
|
||||
/* Get the text of the label */
|
||||
@@ -20,9 +19,8 @@ static void cb_itemsignal( GtkWidget *item,
|
||||
}
|
||||
|
||||
/* Note that this is never called */
|
||||
static void cb_unselect_child( GtkWidget *root_tree,
|
||||
GtkWidget *child,
|
||||
GtkWidget *subtree )
|
||||
static void cb_unselect_child (GtkWidget *root_tree, GtkWidget *child,
|
||||
GtkWidget *subtree)
|
||||
{
|
||||
g_print ("unselect_child called for root tree %p, subtree %p, child %p\n",
|
||||
root_tree, subtree, child);
|
||||
@@ -37,7 +35,7 @@ static void cb_select_child (GtkWidget *root_tree, GtkWidget *child,
|
||||
root_tree, subtree, child);
|
||||
}
|
||||
|
||||
static void cb_selection_changed( GtkWidget *tree )
|
||||
static void cb_selection_changed (GtkWidget *tree)
|
||||
{
|
||||
GList *i;
|
||||
|
||||
@@ -60,8 +58,7 @@ static void cb_selection_changed( GtkWidget *tree )
|
||||
}
|
||||
}
|
||||
|
||||
int main( int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *scrolled_win, *tree;
|
||||
static gchar *itemnames[] = {"Foo", "Bar", "Baz", "Quux",
|
||||
|
||||
@@ -120,16 +120,11 @@ static char * WheelbarrowFull_xpm[] = {
|
||||
|
||||
|
||||
/* When invoked (via signal delete_event), terminates the application */
|
||||
gint close_application( GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data )
|
||||
{
|
||||
void close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) {
|
||||
gtk_main_quit();
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
int main (int argc,
|
||||
char *argv[] )
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
/* GtkWidget is the storage type for widgets */
|
||||
GtkWidget *window, *pixmap, *fixed;
|
||||
|
||||
@@ -8,5 +8,3 @@ libgdk-1.1.la
|
||||
gdkcursors.h
|
||||
gdkkeysyms.h
|
||||
libgdk.la
|
||||
gdkconfig.h
|
||||
stamp-gc-h
|
||||
|
||||
504
gdk/COPYING
504
gdk/COPYING
@@ -1,504 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
158
gdk/Makefile.am
158
gdk/Makefile.am
@@ -1,110 +1,85 @@
|
||||
## Makefile.am for gtk+/gdk
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS=x11 win32
|
||||
gdkincludedir = $(includedir)/gdk
|
||||
|
||||
EXTRA_DIST = \
|
||||
gdkconfig.h.win32 \
|
||||
gdk.def \
|
||||
makefile.cygwin \
|
||||
makefile.msc
|
||||
lib_LTLIBRARIES = libgdk.la
|
||||
|
||||
INCLUDES = @STRIP_BEGIN@ \
|
||||
INCLUDES = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
@GTK_DEBUG_FLAGS@ \
|
||||
@GTK_XIM_FLAGS@ \
|
||||
@GTK_LOCALE_FLAGS@ \
|
||||
@GLIB_CFLAGS@ \
|
||||
@x_cflags@ \
|
||||
@STRIP_END@
|
||||
@x_cflags@
|
||||
|
||||
#
|
||||
# libraries to compile and install
|
||||
#
|
||||
lib_LTLIBRARIES = libgdk.la
|
||||
|
||||
# libtool stuff: set version and export symbols for resolving
|
||||
libgdkincludedir = $(includedir)/gdk
|
||||
libgdk_la_LDFLAGS = @STRIP_BEGIN@ \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
|
||||
-release $(LT_RELEASE) \
|
||||
-export-dynamic \
|
||||
@GLIB_DEPLIBS@ \
|
||||
@x_ldflags@ \
|
||||
@x_libs@ \
|
||||
-lm \
|
||||
@STRIP_END@
|
||||
|
||||
libgdk_la_LIBADD = \
|
||||
x11/libgdk-x11.la
|
||||
|
||||
#
|
||||
# setup source file variables
|
||||
#
|
||||
#
|
||||
# GDK header files for public installation (non-generated)
|
||||
#
|
||||
# Note: files added here may need to be be propagated to gdk_headers in gtk/Makefile.am
|
||||
#
|
||||
gdk_public_h_sources = @STRIP_BEGIN@ \
|
||||
gdk.h \
|
||||
gdkcc.h \
|
||||
gdkcolor.h \
|
||||
gdkcompat.h \
|
||||
gdkcursor.h \
|
||||
gdkcursors.h \
|
||||
gdkdnd.h \
|
||||
gdkdrawable.h \
|
||||
gdkevents.h \
|
||||
gdkfont.h \
|
||||
gdkgc.h \
|
||||
gdkkeysyms.h \
|
||||
gdki18n.h \
|
||||
gdkim.h \
|
||||
gdkimage.h \
|
||||
gdkinput.h \
|
||||
gdkpixmap.h \
|
||||
gdkprivate.h \
|
||||
gdkproperty.h \
|
||||
gdkregion.h \
|
||||
gdkrgb.h \
|
||||
gdkselection.h \
|
||||
gdktypes.h \
|
||||
gdkvisual.h \
|
||||
gdkwindow.h \
|
||||
@STRIP_END@
|
||||
gdk_c_sources = @STRIP_BEGIN@ \
|
||||
libgdk_la_SOURCES = \
|
||||
gdk.c \
|
||||
gdkcc.c \
|
||||
gdkcolor.c \
|
||||
gdkcursor.c \
|
||||
gdkdnd.c \
|
||||
gdkdraw.c \
|
||||
gdkevents.c \
|
||||
gdkfont.c \
|
||||
gdkgc.c \
|
||||
gdkglobals.c \
|
||||
gdkim.c \
|
||||
gdkimage.c \
|
||||
gdkinternals.h \
|
||||
gdkinput.c \
|
||||
gdkinput.h \
|
||||
gdkinputnone.h \
|
||||
gdkinputcommon.h\
|
||||
gdkinputgxi.h \
|
||||
gdkinputxfree.h \
|
||||
gdkpixmap.c \
|
||||
gdkproperty.c \
|
||||
gdkrgb.c \
|
||||
gdkrectangle.c \
|
||||
gdkregion.c \
|
||||
gdkselection.c \
|
||||
gdkvisual.c \
|
||||
gdkwindow.c \
|
||||
@STRIP_END@
|
||||
gdkxid.c \
|
||||
MwmUtil.h \
|
||||
gxid_lib.h \
|
||||
gxid_proto.h \
|
||||
gxid_lib.c
|
||||
## this last one is ifdef'd out unless XINPUT_GXI is defined
|
||||
## It's easier than trying to get automake to handle compiling
|
||||
## it conditionally
|
||||
|
||||
#
|
||||
# setup GDK sources and their dependancies
|
||||
#
|
||||
libgdkinclude_HEADERS = $(gdk_public_h_sources)
|
||||
libgdk_la_SOURCES = $(gdk_c_sources)
|
||||
MAINTAINERCLEANFILES +=
|
||||
EXTRA_HEADERS +=
|
||||
EXTRA_DIST +=
|
||||
EXTRA_DIST +=
|
||||
gdkinclude_HEADERS = \
|
||||
gdk.h \
|
||||
gdkcursors.h \
|
||||
gdkrgb.h \
|
||||
gdki18n.h \
|
||||
gdkkeysyms.h \
|
||||
gdkprivate.h \
|
||||
gdktypes.h \
|
||||
gdkx.h
|
||||
|
||||
LDADDS = \
|
||||
@x_ldflags@ \
|
||||
@x_libs@ \
|
||||
@GLIB_LIBS@ \
|
||||
-lm
|
||||
|
||||
libgdk_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) \
|
||||
@GLIB_DEPLIBS@ \
|
||||
@x_ldflags@ \
|
||||
@x_libs@ \
|
||||
-lm
|
||||
|
||||
EXTRA_PROGRAMS = gxid
|
||||
|
||||
bin_PROGRAMS = @xinput_progs@
|
||||
|
||||
gxid_SOURCES = gxid.c
|
||||
|
||||
gxid_LDADD = $(LDADDS)
|
||||
|
||||
#
|
||||
# rules to generate built sources
|
||||
#
|
||||
# we only need to remake these headers once a new X version is released
|
||||
X-derived-headers:
|
||||
sed -e 's/^#define[ ]*XC\([^ ]*\)[ ]*\([^ ]*\)[ ]*.*$$/GDK\1 = \2,/' \
|
||||
-e 'tb' -e 'd' -e ':b' \
|
||||
@@ -114,25 +89,6 @@ X-derived-headers:
|
||||
-e 'tb' -e 'd' -e ':b' -e 's/ 0X/ 0x/' \
|
||||
< @x_includes@/X11/keysymdef.h > gdkkeysyms.h
|
||||
|
||||
#
|
||||
# Rule to install gdkconfig.h header file
|
||||
#
|
||||
configexecincludedir = $(pkglibdir)/include
|
||||
#configexecinclude_DATA = gdkconfig.h
|
||||
install-exec-local: gdkconfig.h
|
||||
$(mkinstalldirs) $(DESTDIR)$(configexecincludedir)
|
||||
file=$(DESTDIR)$(configexecincludedir)/gdkconfig.h; \
|
||||
if test -r $$file && cmp -s gdkconfig.h $$file; then :; \
|
||||
else $(INSTALL_DATA) gdkconfig.h $$file; fi
|
||||
|
||||
BUILT_SOURCES = stamp-gc-h #note: not gdkconfig.h
|
||||
gdkconfig.h: stamp-gc-h
|
||||
@if test -f gdkconfig.h; then :; \
|
||||
else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi
|
||||
stamp-gc-h: ../config.status
|
||||
cd .. && CONFIG_FILES= CONFIG_HEADERS= CONFIG_OTHER=gdk/gdkconfig.h ./config.status
|
||||
echo timestamp > stamp-gc-h
|
||||
|
||||
.PHONY: files
|
||||
|
||||
files:
|
||||
|
||||
140
gdk/MwmUtil.h
Normal file
140
gdk/MwmUtil.h
Normal file
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of the GNU LessTif Library.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*
|
||||
* * Feb 21 1999 - George Lebl (jirka@5z.com)
|
||||
* Owen Taylor (otaylor@redhat.com)
|
||||
*
|
||||
* Modified so that the MotifWmHints structure defined here
|
||||
* is suitable for client side use on 64-bit architectures.
|
||||
* X expects fields with a format of 32 to be longs, even
|
||||
* when sizeof(long) == 8.
|
||||
**/
|
||||
|
||||
#ifndef MWMUTIL_H_INCLUDED
|
||||
#define MWMUTIL_H_INCLUDED
|
||||
|
||||
#include <X11/Xmd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
unsigned long flags;
|
||||
unsigned long functions;
|
||||
unsigned long decorations;
|
||||
long input_mode;
|
||||
unsigned long status;
|
||||
} MotifWmHints, MwmHints;
|
||||
|
||||
#define MWM_HINTS_FUNCTIONS (1L << 0)
|
||||
#define MWM_HINTS_DECORATIONS (1L << 1)
|
||||
#define MWM_HINTS_INPUT_MODE (1L << 2)
|
||||
#define MWM_HINTS_STATUS (1L << 3)
|
||||
|
||||
#define MWM_FUNC_ALL (1L << 0)
|
||||
#define MWM_FUNC_RESIZE (1L << 1)
|
||||
#define MWM_FUNC_MOVE (1L << 2)
|
||||
#define MWM_FUNC_MINIMIZE (1L << 3)
|
||||
#define MWM_FUNC_MAXIMIZE (1L << 4)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
|
||||
#define MWM_DECOR_ALL (1L << 0)
|
||||
#define MWM_DECOR_BORDER (1L << 1)
|
||||
#define MWM_DECOR_RESIZEH (1L << 2)
|
||||
#define MWM_DECOR_TITLE (1L << 3)
|
||||
#define MWM_DECOR_MENU (1L << 4)
|
||||
#define MWM_DECOR_MINIMIZE (1L << 5)
|
||||
#define MWM_DECOR_MAXIMIZE (1L << 6)
|
||||
|
||||
#define MWM_INPUT_MODELESS 0
|
||||
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
|
||||
#define MWM_INPUT_SYSTEM_MODAL 2
|
||||
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
|
||||
#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL
|
||||
|
||||
#define MWM_TEAROFF_WINDOW (1L<<0)
|
||||
|
||||
/*
|
||||
* atoms
|
||||
*/
|
||||
#define _XA_MOTIF_BINDINGS "_MOTIF_BINDINGS"
|
||||
#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS"
|
||||
#define _XA_MOTIF_WM_MESSAGES "_MOTIF_WM_MESSAGES"
|
||||
#define _XA_MOTIF_WM_OFFSET "_MOTIF_WM_OFFSET"
|
||||
#define _XA_MOTIF_WM_MENU "_MOTIF_WM_MENU"
|
||||
#define _XA_MOTIF_WM_INFO "_MOTIF_WM_INFO"
|
||||
#define _XA_MWM_HINTS _XA_MOTIF_WM_HINTS
|
||||
#define _XA_MWM_MESSAGES _XA_MOTIF_WM_MESSAGES
|
||||
#define _XA_MWM_MENU _XA_MOTIF_WM_MENU
|
||||
#define _XA_MWM_INFO _XA_MOTIF_WM_INFO
|
||||
|
||||
|
||||
/*
|
||||
* _MWM_INFO property
|
||||
*/
|
||||
typedef struct {
|
||||
long flags;
|
||||
Window wm_window;
|
||||
} MotifWmInfo;
|
||||
|
||||
typedef MotifWmInfo MwmInfo;
|
||||
|
||||
#define MWM_INFO_STARTUP_STANDARD (1L<<0)
|
||||
#define MWM_INFO_STARTUP_CUSTOM (1L<<1)
|
||||
|
||||
/*
|
||||
* _MWM_HINTS property
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long flags;
|
||||
unsigned long functions;
|
||||
unsigned long decorations;
|
||||
long inputMode;
|
||||
unsigned long status;
|
||||
} PropMotifWmHints;
|
||||
|
||||
typedef PropMotifWmHints PropMwmHints;
|
||||
|
||||
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5
|
||||
#define PROP_MWM_HINTS_ELEMENTS PROP_MOTIF_WM_HINTS_ELEMENTS
|
||||
|
||||
/*
|
||||
* _MWM_INFO property, slight return
|
||||
*/
|
||||
typedef struct {
|
||||
unsigned long flags;
|
||||
unsigned long wmWindow;
|
||||
} PropMotifWmInfo;
|
||||
|
||||
typedef PropMotifWmInfo PropMwmInfo;
|
||||
|
||||
#define PROP_MOTIF_WM_INFO_ELEMENTS 2
|
||||
#define PROP_MWM_INFO_ELEMENTS PROP_MOTIF_WM_INFO_ELEMENTS
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* MWMUTIL_H_INCLUDED */
|
||||
342
gdk/TODO
342
gdk/TODO
@@ -1,342 +0,0 @@
|
||||
General
|
||||
=======
|
||||
|
||||
- gdk_pointer_grab() and gdk_keyboard_grab() are logically member
|
||||
functions of GdkWindow.
|
||||
|
||||
X specific Functions that need to be moved out of the common header files
|
||||
=========================================================================
|
||||
|
||||
|
||||
Dir structure for ports
|
||||
=======================
|
||||
|
||||
The directory structure here is:
|
||||
|
||||
gdk/
|
||||
gdk/x11
|
||||
gdk/win32
|
||||
...
|
||||
|
||||
The gdk/ directory directly contains all public
|
||||
header files (that are not specific to one
|
||||
windowing system).
|
||||
|
||||
There, in general should be no system dependency
|
||||
|
||||
For each set of functionality, there are the following
|
||||
files:
|
||||
|
||||
gdkwindow.h: public header file
|
||||
gdkwindow.c: common implementation
|
||||
x11/gdkwindow.i: functionality specific to X11
|
||||
win32/gdkwindow.i: functionality specific to win32
|
||||
|
||||
The gdkwindow.c file looks like:
|
||||
|
||||
====
|
||||
#include "gdkwindow.h"
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include "x11/gdkwindow.i"
|
||||
#elif defined(GDK_WINDOW_WIN32)
|
||||
#include "win32/gdkwindow.i"
|
||||
fo#endif
|
||||
|
||||
[ generic implementation bits ]
|
||||
====
|
||||
|
||||
x11/gdkwindow.i should only assume that gdkwindow.h has been
|
||||
included and included all other dependencies explicitely.
|
||||
|
||||
The x11/ directory will contain:
|
||||
|
||||
.i files
|
||||
.c files specific to X
|
||||
.h files specific to X
|
||||
|
||||
And a Makefile.am that takes care of distributing the
|
||||
files in the directory, and also for building any
|
||||
X-specific utilities. (Such as the gxid daemon).
|
||||
|
||||
|
||||
Port Status for Files
|
||||
=====================
|
||||
|
||||
gdk
|
||||
|
||||
Much of the contents have been moved to x11/gtkmain.c.
|
||||
I've added a little argument-parsing abstraction.
|
||||
(Currently called gdk_arg_context_*) that allows
|
||||
arguments from multiple places to be combined - that
|
||||
probably needs to be either fixed up and moved into
|
||||
GLib or replaced with some existing solution like
|
||||
popt.
|
||||
|
||||
gdkcc
|
||||
|
||||
This will be removed for GTK+-1.4. Right now, it has been moved
|
||||
completely into the x11/ directory to avoid having to port it.
|
||||
|
||||
gdkcolor
|
||||
|
||||
There are a few common utility functions, and the rest
|
||||
is in the port-specific files.
|
||||
|
||||
gdkcursor
|
||||
|
||||
No shared code - completely port-specific.
|
||||
|
||||
gdkdnd
|
||||
|
||||
No shared code - completely arch-specific. It's possible that some
|
||||
common code for handling GdkDragContext could exist, but the
|
||||
GdkDragContextPrivate will be different on each port.
|
||||
|
||||
gdkdrawable
|
||||
|
||||
Pretty much done. GdkDrawable is completely virtualized.
|
||||
|
||||
gdkevents
|
||||
|
||||
There are a few common utility functions, and the rest
|
||||
is in the port-specific files.
|
||||
|
||||
gdkfont
|
||||
|
||||
Pretty much done for now - gdkfont.c contains a number of functions
|
||||
reimplemented as utility functions, and the rest is
|
||||
ports-specific. It will be obsoleted by pango before 1.4.
|
||||
|
||||
gdkgc
|
||||
|
||||
GdkGC is virtualized to go along with GdkDrawable. There are
|
||||
a couple of functions I punted on for now and moved into the
|
||||
port-specific files - the clipmask functions (because gdkregion
|
||||
is not finalized) and also gdk_gc_copy, which I'm not sure
|
||||
I like enough to put into the vtable.
|
||||
|
||||
gdkim
|
||||
|
||||
All in the port-specific directories. The abstraction here probably
|
||||
will be changed at some point to something more convenient and
|
||||
more Unicode-based.
|
||||
|
||||
gdkimage
|
||||
|
||||
GdkImage is virtualized - all of the code except for ref/unref
|
||||
is in the port-specific files.
|
||||
|
||||
gdkinput
|
||||
|
||||
Right now all the code is port-specific. It should be possible
|
||||
to share the code in gdkinputnone.c, but probably not worth it;
|
||||
I'd like to get rid of the gdk_input_vtable in X11 code -
|
||||
it doesn't make sense since you can't switch the type of input
|
||||
on the fly.
|
||||
|
||||
gdkpixmap
|
||||
|
||||
All moved into the port-specific file for now. The xpm loader
|
||||
should be changed to render with GdkRGB, and thus be
|
||||
windowing-system independent, but that requires
|
||||
first making GdkRGB able to render onto any arbitrary visual.
|
||||
|
||||
gdkproperty
|
||||
|
||||
All port-specific. Possibly should be X-specific with a higher-level
|
||||
clipboard API on top of it.
|
||||
|
||||
gdkregion
|
||||
|
||||
Right now punted to being port-specific, but that probably needs
|
||||
to change with the virtualized drawables and GC's.
|
||||
|
||||
gdkrgb
|
||||
|
||||
With a few changes to debugging code, it was already port-independent.
|
||||
|
||||
gdkselection
|
||||
|
||||
Completely port specific. (In fact, really doesn't make sense
|
||||
on anything other than X; a higher-level clipboard facility
|
||||
should be provided somewhere, though.)
|
||||
|
||||
gdkvisual
|
||||
|
||||
Completely port-specific. (The concepts are rather X-specific)
|
||||
|
||||
gdkwindow
|
||||
|
||||
The window-private data is split between windowing-system independent
|
||||
parts and windowing system dependent parts. There are a few
|
||||
functions in gdk/gdkwindow.c and the rest is moved off
|
||||
into x11/gdkwindow-x11.c
|
||||
|
||||
Virtualization
|
||||
==============
|
||||
|
||||
The concept of virtualization is that calls to draw
|
||||
on a drawable are dispatched through a function table.
|
||||
This potentially allows for:
|
||||
|
||||
Postscript drawables
|
||||
metafiles
|
||||
|
||||
It also provides a nice clean framework for multi-windowing
|
||||
support - instead of reimplementing a whole bunch of function
|
||||
calls, one provides an implementaiton for the vtables.
|
||||
|
||||
X works in this way internally - per-screen functions are
|
||||
virtualized inside a screen structure, and drawing functions
|
||||
are virtualized inside the GC structure.
|
||||
|
||||
For the virtualization of drawing, clearly GdkDrawable needs
|
||||
to be virtualized. Beyond that, one has to decide on
|
||||
a case-by-case basis whether a particular structure is
|
||||
drawing-mode independent (like GdkRectangle) or not.
|
||||
|
||||
The most important GDK structures that are involved drawing are:
|
||||
|
||||
GdkColor
|
||||
GdkGC
|
||||
GdkFont
|
||||
GdkRegion
|
||||
|
||||
The whole font aspect of Gdk is going to get heavily
|
||||
reworked with the introduction of "Pango".
|
||||
GdkRegion almost certainly needs to be virtualized,
|
||||
if you, way, want to do postscript drawables.
|
||||
|
||||
While doing so, the API of GdkRegion should be
|
||||
changed so that the region operations take 3 parameters
|
||||
instead of returning a newly created region.
|
||||
|
||||
|
||||
Drawable operations:
|
||||
destroy
|
||||
create_gc
|
||||
get_values
|
||||
set_values
|
||||
set_dashes
|
||||
copy
|
||||
|
||||
GC Operations:
|
||||
draw_point
|
||||
draw_line
|
||||
draw_rectangle
|
||||
draw_arc
|
||||
draw_polygon
|
||||
draw_string
|
||||
draw_text
|
||||
draw_text_wc
|
||||
draw_pixmap
|
||||
draw_bitmap
|
||||
draw_image
|
||||
draw_points
|
||||
draw_segments
|
||||
draw_lines
|
||||
|
||||
|
||||
Adding multi-screen, display support.
|
||||
=====================================
|
||||
|
||||
The following functions need to have per-display variants:
|
||||
|
||||
void gdk_pointer_ungrab (guint32 time);
|
||||
void gdk_keyboard_ungrab (guint32 time);
|
||||
gint gdk_pointer_is_grabbed (void);
|
||||
|
||||
gint gdk_screen_width (void);
|
||||
gint gdk_screen_height (void);
|
||||
|
||||
gint gdk_screen_width_mm (void);
|
||||
gint gdk_screen_height_mm (void);
|
||||
|
||||
void gdk_beep (void);
|
||||
|
||||
void gdk_key_repeat_disable (void);
|
||||
void gdk_key_repeat_restore (void);
|
||||
|
||||
gint gdk_visual_get_best_depth (void);
|
||||
GdkVisualType gdk_visual_get_best_type (void);
|
||||
GdkVisual* gdk_visual_get_system (void);
|
||||
GdkVisual* gdk_visual_get_best (void);
|
||||
GdkVisual* gdk_visual_get_best_with_depth (gint depth);
|
||||
GdkVisual* gdk_visual_get_best_with_type (GdkVisualType visual_type);
|
||||
GdkVisual* gdk_visual_get_best_with_both (gint depth,
|
||||
GdkVisualType visual_type);
|
||||
|
||||
void gdk_query_depths (gint **depths,
|
||||
gint *count);
|
||||
void gdk_query_visual_types (GdkVisualType **visual_types,
|
||||
gint *count);
|
||||
|
||||
GList* gdk_list_visuals (void);
|
||||
|
||||
void gdk_add_client_message_filter (GdkAtom message_type,
|
||||
GdkFilterFunc func,
|
||||
gpointer data);
|
||||
|
||||
guint32 gdk_drag_get_protocol (guint32 xid,
|
||||
GdkDragProtocol *protocol);
|
||||
|
||||
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
|
||||
GdkCursor* gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
GdkPixmap *mask,
|
||||
GdkColor *fg,
|
||||
GdkColor *bg,
|
||||
gint x,
|
||||
gint y);
|
||||
GdkColormap* gdk_colormap_get_system (void);
|
||||
gint gdk_colormap_get_system_size (void);
|
||||
|
||||
GdkFont* gdk_font_load (const gchar *font_name);
|
||||
GdkFont* gdk_fontset_load (gchar *fontset_name);
|
||||
|
||||
gint gdk_selection_owner_set (GdkWindow *owner,
|
||||
GdkAtom selection,
|
||||
guint32 time,
|
||||
gint send_event);
|
||||
GdkWindow* gdk_selection_owner_get (GdkAtom selection);
|
||||
|
||||
void gdk_selection_send_notify (guint32 requestor,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
GdkAtom property,
|
||||
guint32 time);
|
||||
gint gdk_text_property_to_text_list (GdkAtom encoding, gint format,
|
||||
guchar *text, gint length,
|
||||
gchar ***list);
|
||||
void gdk_free_text_list (gchar **list);
|
||||
gint gdk_string_to_compound_text (gchar *str,
|
||||
GdkAtom *encoding, gint *format,
|
||||
guchar **ctext, gint *length);
|
||||
void gdk_free_compound_text (guchar *ctext);
|
||||
GdkAtom gdk_atom_intern (const gchar *atom_name,
|
||||
gint only_if_exists);
|
||||
gchar* gdk_atom_name (GdkAtom atom);
|
||||
GList *gdk_input_list_devices (void);
|
||||
void gdk_input_set_source (guint32 deviceid,
|
||||
GdkInputSource source);
|
||||
gint gdk_input_set_mode (guint32 deviceid,
|
||||
GdkInputMode mode);
|
||||
void gdk_input_set_axes (guint32 deviceid,
|
||||
GdkAxisUse *axes);
|
||||
void gdk_input_set_key (guint32 deviceid,
|
||||
guint index,
|
||||
guint keyval,
|
||||
GdkModifierType modifiers);
|
||||
gint gdk_im_ready (void);
|
||||
void gdk_im_end (void);
|
||||
GdkIC* gdk_ic_new (GdkICAttr *attr,
|
||||
GdkICAttributesType mask);
|
||||
GdkRegion* gdk_region_new (void);
|
||||
void gdk_event_send_clientmessage_toall (GdkEvent *event);
|
||||
gboolean gdk_event_send_client_message (GdkEvent *event,
|
||||
guint32 xid);
|
||||
|
||||
And maybe:
|
||||
|
||||
void gdk_error_trap_push (void);
|
||||
gint gdk_error_trap_pop (void);
|
||||
347
gdk/gdk.def
347
gdk/gdk.def
@@ -1,347 +0,0 @@
|
||||
EXPORTS
|
||||
gdk_atom_intern
|
||||
gdk_atom_name
|
||||
gdk_beep
|
||||
gdk_bitmap_create_from_data
|
||||
gdk_char_height
|
||||
gdk_char_measure
|
||||
gdk_char_width
|
||||
gdk_char_width_wc
|
||||
gdk_color_alloc
|
||||
gdk_color_black
|
||||
gdk_color_change
|
||||
gdk_color_context_add_palette
|
||||
gdk_color_context_free
|
||||
gdk_color_context_free_dither
|
||||
gdk_color_context_get_index_from_palette
|
||||
gdk_color_context_get_pixel
|
||||
gdk_color_context_get_pixel_from_palette
|
||||
gdk_color_context_get_pixels
|
||||
gdk_color_context_get_pixels_incremental
|
||||
gdk_color_context_init_dither
|
||||
gdk_color_context_new
|
||||
gdk_color_context_new_mono
|
||||
gdk_color_context_query_color
|
||||
gdk_color_context_query_colors
|
||||
gdk_color_copy
|
||||
gdk_color_equal
|
||||
gdk_color_free
|
||||
gdk_color_hash
|
||||
gdk_color_parse
|
||||
gdk_color_white
|
||||
gdk_colormap_alloc_color
|
||||
gdk_colormap_alloc_colors
|
||||
gdk_colormap_change
|
||||
gdk_colormap_free_colors
|
||||
gdk_colormap_get_system
|
||||
gdk_colormap_get_system_size
|
||||
gdk_colormap_get_visual
|
||||
gdk_colormap_new
|
||||
gdk_colormap_ref
|
||||
gdk_colormap_unref
|
||||
gdk_colors_alloc
|
||||
gdk_colors_free
|
||||
gdk_colors_store
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_ref
|
||||
gdk_cursor_unref
|
||||
gdk_dnd_init
|
||||
gdk_drag_abort
|
||||
gdk_drag_begin
|
||||
gdk_drag_context_new
|
||||
gdk_drag_context_ref
|
||||
gdk_drag_context_unref
|
||||
gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_get_protocol
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_motion
|
||||
gdk_drag_status
|
||||
gdk_draw_arc
|
||||
gdk_draw_drawable
|
||||
gdk_draw_gray_image
|
||||
gdk_draw_image
|
||||
gdk_draw_indexed_image
|
||||
gdk_draw_line
|
||||
gdk_draw_lines
|
||||
gdk_draw_point
|
||||
gdk_draw_points
|
||||
gdk_draw_polygon
|
||||
gdk_draw_rectangle
|
||||
gdk_draw_rgb_32_image
|
||||
gdk_draw_rgb_image
|
||||
gdk_draw_rgb_image_dithalign
|
||||
gdk_draw_segments
|
||||
gdk_draw_string
|
||||
gdk_draw_text
|
||||
gdk_draw_text_wc
|
||||
gdk_drawable_alloc
|
||||
gdk_drawable_get_colormap
|
||||
gdk_drawable_get_size
|
||||
gdk_drawable_get_type
|
||||
gdk_drawable_get_visual
|
||||
gdk_drawable_ref
|
||||
gdk_drawable_set_colormap
|
||||
gdk_drawable_set_data
|
||||
gdk_drawable_unref
|
||||
gdk_drop_finish
|
||||
gdk_drop_reply
|
||||
gdk_error_code
|
||||
gdk_error_trap_pop
|
||||
gdk_error_trap_push
|
||||
gdk_error_warnings
|
||||
gdk_event_button_generate
|
||||
gdk_event_copy
|
||||
gdk_event_data
|
||||
gdk_event_free
|
||||
gdk_event_func
|
||||
gdk_event_get
|
||||
gdk_event_get_graphics_expose
|
||||
gdk_event_get_time
|
||||
gdk_event_handler_set
|
||||
gdk_event_new
|
||||
gdk_event_peek
|
||||
gdk_event_put
|
||||
gdk_event_queue_append
|
||||
gdk_event_queue_find_first
|
||||
gdk_event_queue_remove_link
|
||||
gdk_event_send_client_message
|
||||
gdk_event_send_clientmessage_toall
|
||||
gdk_event_unqueue
|
||||
gdk_events_pending
|
||||
gdk_exit
|
||||
gdk_flush
|
||||
gdk_font_equal
|
||||
gdk_font_full_name_free
|
||||
gdk_font_full_name_get
|
||||
gdk_font_id
|
||||
gdk_font_list_free
|
||||
gdk_font_list_new
|
||||
gdk_font_load
|
||||
gdk_font_ref
|
||||
gdk_font_unref
|
||||
gdk_fontset_load
|
||||
gdk_free_compound_text
|
||||
gdk_free_text_list
|
||||
gdk_gc_alloc
|
||||
gdk_gc_copy
|
||||
gdk_gc_get_values
|
||||
gdk_gc_new
|
||||
gdk_gc_new_with_values
|
||||
gdk_gc_ref
|
||||
gdk_gc_set_background
|
||||
gdk_gc_set_clip_mask
|
||||
gdk_gc_set_clip_origin
|
||||
gdk_gc_set_clip_rectangle
|
||||
gdk_gc_set_clip_region
|
||||
gdk_gc_set_dashes
|
||||
gdk_gc_set_exposures
|
||||
gdk_gc_set_fill
|
||||
gdk_gc_set_font
|
||||
gdk_gc_set_foreground
|
||||
gdk_gc_set_function
|
||||
gdk_gc_set_line_attributes
|
||||
gdk_gc_set_stipple
|
||||
gdk_gc_set_subwindow
|
||||
gdk_gc_set_tile
|
||||
gdk_gc_set_ts_origin
|
||||
gdk_gc_unref
|
||||
gdk_get_display
|
||||
gdk_get_show_events
|
||||
gdk_get_use_xshm
|
||||
gdk_ic_destroy
|
||||
gdk_ic_get_attr
|
||||
gdk_ic_get_events
|
||||
gdk_ic_get_style
|
||||
gdk_ic_get_values
|
||||
gdk_ic_new
|
||||
gdk_ic_set_attr
|
||||
gdk_ic_set_values
|
||||
gdk_im_begin
|
||||
gdk_im_decide_style
|
||||
gdk_im_end
|
||||
gdk_im_ready
|
||||
gdk_im_set_best_style
|
||||
gdk_image_bitmap_new
|
||||
gdk_image_get
|
||||
gdk_image_get_pixel
|
||||
gdk_image_new
|
||||
gdk_image_new_bitmap
|
||||
gdk_image_put_pixel
|
||||
gdk_image_ref
|
||||
gdk_image_unref
|
||||
gdk_init
|
||||
gdk_init_check
|
||||
gdk_input_add
|
||||
gdk_input_add_full
|
||||
gdk_input_exit
|
||||
gdk_input_init
|
||||
gdk_input_list_devices
|
||||
gdk_input_motion_events
|
||||
gdk_input_remove
|
||||
gdk_input_set_axes
|
||||
gdk_input_set_extension_events
|
||||
gdk_input_set_key
|
||||
gdk_input_set_mode
|
||||
gdk_input_set_source
|
||||
gdk_input_window_get_pointer
|
||||
gdk_key_repeat_disable
|
||||
gdk_key_repeat_restore
|
||||
gdk_keyboard_grab
|
||||
gdk_keyboard_ungrab
|
||||
gdk_keyval_from_name
|
||||
gdk_keyval_is_lower
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_name
|
||||
gdk_keyval_to_lower
|
||||
gdk_keyval_to_upper
|
||||
gdk_list_visuals
|
||||
gdk_mbstowcs
|
||||
gdk_null_window_warnings
|
||||
gdk_parent_root
|
||||
gdk_pixmap_colormap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_create_from_data
|
||||
gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_create_on_shared_image
|
||||
gdk_pixmap_foreign_new
|
||||
gdk_pixmap_new
|
||||
gdk_pointer_grab
|
||||
gdk_pointer_is_grabbed
|
||||
gdk_pointer_ungrab
|
||||
gdk_progclass
|
||||
gdk_property_change
|
||||
gdk_property_delete
|
||||
gdk_property_get
|
||||
gdk_query_depths
|
||||
gdk_query_visual_types
|
||||
gdk_rectangle_intersect
|
||||
gdk_rectangle_union
|
||||
gdk_region_destroy
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_get_clipbox
|
||||
gdk_region_intersect
|
||||
gdk_region_new
|
||||
gdk_region_offset
|
||||
gdk_region_point_in
|
||||
gdk_region_polygon
|
||||
gdk_region_rect_in
|
||||
gdk_region_shrink
|
||||
gdk_region_subtract
|
||||
gdk_region_union
|
||||
gdk_region_union_with_rect
|
||||
gdk_region_xor
|
||||
gdk_rgb_cmap_free
|
||||
gdk_rgb_cmap_new
|
||||
gdk_rgb_ditherable
|
||||
gdk_rgb_gc_set_background
|
||||
gdk_rgb_gc_set_foreground
|
||||
gdk_rgb_get_cmap
|
||||
gdk_rgb_get_visual
|
||||
gdk_rgb_init
|
||||
gdk_rgb_set_install
|
||||
gdk_rgb_set_min_colors
|
||||
gdk_rgb_set_verbose
|
||||
gdk_rgb_xpixel_from_rgb
|
||||
gdk_screen_height
|
||||
gdk_screen_height_mm
|
||||
gdk_screen_width
|
||||
gdk_screen_width_mm
|
||||
gdk_selection_convert
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_property
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
gdk_set_locale
|
||||
gdk_set_show_events
|
||||
gdk_set_sm_client_id
|
||||
gdk_set_use_xshm
|
||||
gdk_string_extents
|
||||
gdk_string_height
|
||||
gdk_string_measure
|
||||
gdk_string_to_compound_text
|
||||
gdk_string_width
|
||||
gdk_text_extents
|
||||
gdk_text_extents_wc
|
||||
gdk_text_height
|
||||
gdk_text_measure
|
||||
gdk_text_property_to_text_list
|
||||
gdk_text_width
|
||||
gdk_text_width_wc
|
||||
gdk_threads_enter
|
||||
gdk_threads_leave
|
||||
gdk_threads_mutex
|
||||
gdk_visual_get_best
|
||||
gdk_visual_get_best_depth
|
||||
gdk_visual_get_best_type
|
||||
gdk_visual_get_best_with_both
|
||||
gdk_visual_get_best_with_depth
|
||||
gdk_visual_get_best_with_type
|
||||
gdk_visual_get_system
|
||||
gdk_visual_ref
|
||||
gdk_visual_unref
|
||||
gdk_wcstombs
|
||||
gdk_window_add_filter
|
||||
gdk_window_at_pointer
|
||||
gdk_window_begin_paint_rect
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_destroy
|
||||
gdk_window_end_paint
|
||||
gdk_window_foreign_new
|
||||
gdk_window_get_children
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_events
|
||||
gdk_window_get_geometry
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_pointer
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_toplevels
|
||||
gdk_window_get_user_data
|
||||
gdk_window_hide
|
||||
gdk_window_invalidate_rect
|
||||
gdk_window_is_viewable
|
||||
gdk_window_is_visible
|
||||
gdk_window_lower
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_move
|
||||
gdk_window_move_resize
|
||||
gdk_window_new
|
||||
gdk_window_process_all_updates
|
||||
gdk_window_process_updates
|
||||
gdk_window_raise
|
||||
gdk_window_register_dnd
|
||||
gdk_window_remove_filter
|
||||
gdk_window_reparent
|
||||
gdk_window_resize
|
||||
gdk_window_set_back_pixmap
|
||||
gdk_window_set_background
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_set_cursor
|
||||
gdk_window_set_decorations
|
||||
gdk_window_set_events
|
||||
gdk_window_set_functions
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_set_group
|
||||
gdk_window_set_hints
|
||||
gdk_window_set_icon
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_set_role
|
||||
gdk_window_set_static_gravities
|
||||
gdk_window_set_title
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_set_user_data
|
||||
gdk_window_shape_combine_mask
|
||||
gdk_window_show
|
||||
gdk_window_withdraw
|
||||
gdk_xid_table_insert
|
||||
gdk_xid_table_lookup
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user