Compare commits
4 Commits
matthiasc/
...
AUTO_DENAT
Author | SHA1 | Date | |
---|---|---|---|
|
9a9aea79e1 | ||
|
eddc47d1a1 | ||
|
0e5e03edb9 | ||
|
f3d23741bf |
20
.cvsignore
20
.cvsignore
@@ -1,20 +0,0 @@
|
||||
*.lo
|
||||
config.log
|
||||
config.h
|
||||
config.h.in
|
||||
libtool
|
||||
config.status
|
||||
stamp-h
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
configure
|
||||
gtk-config
|
||||
config.cache
|
||||
ABOUT-NLS
|
||||
intl
|
||||
stamp-h.in
|
||||
gtk+.spec
|
||||
missing
|
||||
install-sh
|
||||
mkinstalldirs
|
32
AUTHORS
32
AUTHORS
@@ -1,32 +0,0 @@
|
||||
Original Authors
|
||||
----------------
|
||||
Peter Mattis <petm@xcf.berkeley.edu>
|
||||
Spencer Kimball <spencer@xcf.berkeley.edu>
|
||||
Josh MacDonald <jmacd@xcf.berkeley.edu>
|
||||
|
||||
Please do not mail the original authors asking questions about this
|
||||
version of GTK+.
|
||||
|
||||
The GTK+ Team (in alphabetical order)
|
||||
-------------------------------------
|
||||
Shawn T. Amundson <amundson@gtk.org>
|
||||
Jerome Bolliet <bolliet@gtk.org>
|
||||
Damon Chaplin <damon@gtk.org>
|
||||
Tony Gale <gale@gtk.org>
|
||||
Jeff Garzik <jgarzik@gtk.org>
|
||||
Lars Hamann <lars@gtk.org>
|
||||
Raja R Harinath <harinath@gtk.org>
|
||||
Carsten Haitzler <raster@gtk.org>
|
||||
Tim Janik <timj@gtk.org>
|
||||
Stefan Jeske <stefan@gtk.org>
|
||||
Elliot Lee <sopwith@gtk.org>
|
||||
Raph Levien <raph@gtk.org>
|
||||
Ian Main <imain@gtk.org>
|
||||
Federico Mena <quartic@gtk.org>
|
||||
Paolo Molaro <lupus@gtk.org>
|
||||
Jay Painter <jpaint@gtk.org>
|
||||
Manish Singh <manish@gtk.org>
|
||||
Owen Taylor <otaylor@gtk.org>
|
||||
|
||||
There are many others who have contributed patches; we thank them,
|
||||
GTK+ is much better because of them.
|
482
COPYING
482
COPYING
@@ -1,482 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 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 library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
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 Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, 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 or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the 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 a program 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.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, so that any problems introduced by others will not reflect on
|
||||
the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
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, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
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 compile 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) 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.
|
||||
|
||||
c) 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.
|
||||
|
||||
d) 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 source code 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 to
|
||||
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 Library 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 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.
|
||||
|
||||
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!
|
4961
ChangeLog.pre-1-0
4961
ChangeLog.pre-1-0
File diff suppressed because it is too large
Load Diff
9106
ChangeLog.pre-1-2
9106
ChangeLog.pre-1-2
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-0
3593
ChangeLog.pre-2-0
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-10
3593
ChangeLog.pre-2-10
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-2
3593
ChangeLog.pre-2-2
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-4
3593
ChangeLog.pre-2-4
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-6
3593
ChangeLog.pre-2-6
File diff suppressed because it is too large
Load Diff
3593
ChangeLog.pre-2-8
3593
ChangeLog.pre-2-8
File diff suppressed because it is too large
Load Diff
56
HACKING
56
HACKING
@@ -1,56 +0,0 @@
|
||||
If you want to hack on the Gtk+ project, it will make you life easier
|
||||
to have the following packages installed:
|
||||
|
||||
- GNU autoconf 2.13
|
||||
- GNU automake 1.4
|
||||
(Beta releases are at ftp://ftp.cygnus.com/pub/tromey)
|
||||
- GNU libtool 1.2d
|
||||
- indent (GNU indent 1.9.1 is known good)
|
||||
- GNU gettext 10.35
|
||||
Available in ftp://alpha.gnu.org/gnu
|
||||
|
||||
These should be available by ftp from ftp.gnu.org or any of the
|
||||
fine GNU mirrors. Beta software can be found at alpha.gnu.org.
|
||||
|
||||
In order to get CVS gtk+ installed on your system, you need to have
|
||||
the most recent CVS version of glib installed as well.
|
||||
The installation process of glib is similar to that of gtk+, but
|
||||
needs to be fulfilled prior to installation of gtk+.
|
||||
|
||||
To compile a CVS version of gtk+ on your system, you will need to take
|
||||
several steps to setup the tree for compilation. You can do all these
|
||||
steps at once by running:
|
||||
|
||||
cvsroot/gtk+# ./autogen.sh
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
cvsroot/gtk+# aclocal; automake; autoconf
|
||||
|
||||
The above commands create the "configure" script. Now you
|
||||
can run the configure script in cvsroot/gtk+ to create all
|
||||
the Makefiles.
|
||||
|
||||
Before running autogen.sh or configure, make sure you have libtool
|
||||
in your path.
|
||||
|
||||
Note that autogen.sh runs configure for you. If you wish to pass
|
||||
options like --prefix=/usr to configure you can give those options
|
||||
to autogen.sh and they will be passed on to configure.
|
||||
|
||||
If at all possible, please use CVS to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from cvs:
|
||||
|
||||
$ export CVSROOT=':pserver:anonymous@cvs.gimp.org:/debian/home/gnomecvs'
|
||||
$ cvs login
|
||||
(there is no password, just hit return)
|
||||
$ cvs -z9 checkout glib
|
||||
$ cvs -z9 checkout gtk+
|
||||
|
||||
Please submit patches to the gtk-list@redhat.com mailing list (you must
|
||||
subscribe before you post, e-mail gtk-list-request@redhat.com with a
|
||||
subject of "subscribe"). All kinds of contributions are accepted.
|
||||
Patches that you wish to go into the distribution should also be uploaded
|
||||
to ftp://ftp.gimp.org/incoming. Follow the rules there for naming your
|
||||
patches.
|
||||
|
187
INSTALL
187
INSTALL
@@ -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+-1.2.5.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-1.2.5 # 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-1.2.5
|
||||
|
||||
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 and 2.1, 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.
|
||||
|
||||
|
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.
|
||||
|
||||
|
138
Makefile.am
138
Makefile.am
@@ -1,138 +0,0 @@
|
||||
## Makefile.am for GTK+
|
||||
|
||||
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 \
|
||||
gtk.m4 \
|
||||
makecopyright \
|
||||
TODO \
|
||||
NEWS.pre-1-0 \
|
||||
ChangeLog.pre-1-0 \
|
||||
README.cvs-commits \
|
||||
README.win32 \
|
||||
intl/libgettext.h \
|
||||
intl/po2tbl.sed.in \
|
||||
examples/aspectframe/Makefile \
|
||||
examples/aspectframe/aspectframe.c \
|
||||
examples/Makefile \
|
||||
examples/README.1ST \
|
||||
examples/extract.awk \
|
||||
examples/extract.sh \
|
||||
examples/base/Makefile \
|
||||
examples/base/base.c \
|
||||
examples/buttons/Makefile \
|
||||
examples/buttons/buttons.c \
|
||||
examples/buttons/info.xpm \
|
||||
examples/calendar/Makefile \
|
||||
examples/calendar/gcalendar.c \
|
||||
examples/clist/Makefile \
|
||||
examples/clist/clist.c \
|
||||
examples/entry/Makefile \
|
||||
examples/entry/entry.c \
|
||||
examples/eventbox/Makefile \
|
||||
examples/eventbox/eventbox.c \
|
||||
examples/filesel/Makefile \
|
||||
examples/filesel/filesel.c \
|
||||
examples/gtkdial/Makefile \
|
||||
examples/gtkdial/dial_test.c \
|
||||
examples/gtkdial/gtkdial.c \
|
||||
examples/gtkdial/gtkdial.h \
|
||||
examples/helloworld/Makefile \
|
||||
examples/helloworld/helloworld.c \
|
||||
examples/helloworld2/Makefile \
|
||||
examples/helloworld2/helloworld2.c \
|
||||
examples/list/Makefile \
|
||||
examples/list/list.c \
|
||||
examples/menu/Makefile \
|
||||
examples/menu/menu.c \
|
||||
examples/menu/itemfactory.c \
|
||||
examples/notebook/Makefile \
|
||||
examples/notebook/notebook.c \
|
||||
examples/packbox/Makefile \
|
||||
examples/packbox/packbox.c \
|
||||
examples/packer/Makefile \
|
||||
examples/packer/pack.c \
|
||||
examples/paned/Makefile \
|
||||
examples/paned/paned.c \
|
||||
examples/pixmap/Makefile \
|
||||
examples/pixmap/pixmap.c \
|
||||
examples/progressbar/Makefile \
|
||||
examples/progressbar/progressbar.c \
|
||||
examples/radiobuttons/Makefile \
|
||||
examples/radiobuttons/radiobuttons.c \
|
||||
examples/rangewidgets/Makefile \
|
||||
examples/rangewidgets/rangewidgets.c \
|
||||
examples/rulers/Makefile \
|
||||
examples/rulers/rulers.c \
|
||||
examples/scribble-simple/Makefile \
|
||||
examples/scribble-simple/scribble-simple.c \
|
||||
examples/scrolledwin/Makefile \
|
||||
examples/scrolledwin/scrolledwin.c \
|
||||
examples/selection/Makefile \
|
||||
examples/selection/gettargets.c \
|
||||
examples/selection/setselection.c \
|
||||
examples/statusbar/Makefile \
|
||||
examples/statusbar/statusbar.c \
|
||||
examples/table/Makefile \
|
||||
examples/table/table.c \
|
||||
examples/text/Makefile \
|
||||
examples/text/text.c \
|
||||
examples/tictactoe/Makefile \
|
||||
examples/tictactoe/tictactoe.c \
|
||||
examples/tictactoe/tictactoe.h \
|
||||
examples/tictactoe/ttt_test.c \
|
||||
examples/tree/Makefile \
|
||||
examples/tree/tree.c \
|
||||
examples/wheelbarrow/Makefile \
|
||||
examples/wheelbarrow/wheelbarrow.c \
|
||||
examples/fixed/fixed.c \
|
||||
examples/fixed/Makefile \
|
||||
examples/frame/frame.c \
|
||||
examples/frame/Makefile \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
|
||||
dist-hook: gtk+.spec
|
||||
if test -e $(srcdir)/INSTALL.in && test -e $(srcdir)/README.in ; then \
|
||||
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
|
||||
CONFIG_HEADERS= \
|
||||
$(SHELL) config.status \
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi \
|
||||
&& cp gtk+.spec $(distdir)
|
||||
|
||||
m4datadir = $(datadir)/aclocal
|
||||
m4data_DATA = gtk.m4
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
echo $$p; \
|
||||
done
|
||||
@for subdir in $(SUBDIRS); do \
|
||||
files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
|
||||
for file in $$files; do \
|
||||
echo $$subdir/$$file; \
|
||||
done; \
|
||||
done
|
||||
|
||||
release:
|
||||
rm -rf .deps */.deps
|
||||
$(MAKE) distcheck
|
||||
|
||||
sanity:
|
||||
./sanity_check $(VERSION)
|
||||
|
||||
|
||||
snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
|
411
NEWS
411
NEWS
@@ -1,411 +0,0 @@
|
||||
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
|
||||
* Check for dgettext (for systems with old versions of GNU Gettext)
|
||||
* Many bug fixes (see ChangeLog for details)
|
||||
|
||||
Overview of Changes in GTK+ 1.2.2:
|
||||
|
||||
* Improved Dnd behaviour with Motif applications.
|
||||
* Bug fixes for the Gtk selection code.
|
||||
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
|
||||
* Bug fixes and leak plugs for the Gdk IM code.
|
||||
* Added gtk_object_get() facility to retrive object arguments easily.
|
||||
The var args list expects ("arg-name", &value) pairs.
|
||||
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
|
||||
problems where closed pipes were no longer signalling GDK_INPUT_READ on
|
||||
systems with a native poll().
|
||||
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
|
||||
anymore).
|
||||
* We don't attempt to lookup xpm color "None" anymore, this should prevent
|
||||
eXodus (commercial X windows server) from popping up a color dialog every
|
||||
time a transparent pixmap is created.
|
||||
* Fixed bug where Gtk timout/idle handlers would execute without the global
|
||||
Gdk lock being held.
|
||||
* Other minor bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 1.2.1:
|
||||
|
||||
* Many Bug fixes have been applied to the menu and accelerator code.
|
||||
* GtkItemFactory can "adopt" foreign menu items now and manage their
|
||||
accelerator installation. This is often required to get GtkItemFactory
|
||||
like accelerator propagation between different windows with the same
|
||||
menu heirarchy and for centralized parsing and saving of accelerators.
|
||||
* GtkCList/GtkCTree buttons should always display correctly now.
|
||||
* Miscellaneous other bug fixes.
|
||||
|
||||
What's New in GTK+ 1.2.0 (since 1.0.x):
|
||||
|
||||
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
|
||||
GtkInvisible, GtkCalendar, GtkLayout, GtkPlug, GtkSocket
|
||||
* Many new features and robustness for existing widgets
|
||||
* Theme support
|
||||
* New DND implementation
|
||||
* Internationalization of standard dialogs
|
||||
* New key binding system
|
||||
* Tearoff menus and menu accelerators
|
||||
* Wide character support for entry and text
|
||||
* Resizing code has been overhauled
|
||||
* Queued redraws of partial areas
|
||||
* Far better support for object arguments
|
||||
* Speed optimizations
|
||||
* Runtime loading of dynamic modules
|
||||
* Support for GLib log domains
|
||||
* Tutorial improvements
|
||||
* A bug fix or two
|
||||
|
||||
Overview of Changes in GTK+ 1.1.16:
|
||||
|
||||
* Major fixes and improvements for handlebox
|
||||
* A change to the way widget->requisition works. Now,
|
||||
widget->requisition is always what the widget requested,
|
||||
unmodified by the usize. See Changes-1.2.txt for details.
|
||||
This correct various bugs with gtk_widget_set_usize().
|
||||
* Fixes for XIM on X11R5 systems
|
||||
* Don't allow cut-and-paste of text in password-style entries
|
||||
* --enable-debug is now on by default for the development releaes.
|
||||
(When compiling for "production", use --enable-debug=minimum)
|
||||
* Handle systems where Helvetica is not present more gracefully
|
||||
* Fixes for memory leaks
|
||||
* CList and CTree fixes
|
||||
* Bug fixes for drawing problems.
|
||||
* Miscellaneous bug fixes to GtkLabel, GtkCList, GtkCTree,
|
||||
GtkColorsel, Focusing, DND
|
||||
* Tutorial improvements
|
||||
|
||||
Overview of Changes in GTK+ 1.1.15:
|
||||
|
||||
* Tutorial Updates
|
||||
* Added --libs gthread to gtk-config
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.14:
|
||||
|
||||
* Additions to docs/Changes-1.2.txt
|
||||
* Just warn when loading theme engine fails
|
||||
* CLAMP GtkScale digits to a meaningful range
|
||||
* GTK_LOCALDIR is now defined in a better fashion
|
||||
* New functions (feature freeze, we know...):
|
||||
gtk_menu_set_title()
|
||||
gtk_toggle_button_get_active()
|
||||
* Some locale fixups in gtkrc code
|
||||
* Fixes to make gtk_radio_button_set_group() keep only
|
||||
one radio button in the group active
|
||||
* Foreign windows are now always treated as viewable; this fixes
|
||||
a problem where updating didn't occure properly in GtkPlug
|
||||
* DND fixes for 64 bit architectures, and for specifying operations
|
||||
with modifier keys.
|
||||
* Major revisions to GtkLayout: avoid having to create window
|
||||
for NO_WINDOW children, adjust allocations of children as
|
||||
scrolled so queued draws work, and a resize is queued instead
|
||||
of allocating directly in a put() or move()
|
||||
|
||||
What is new in GTK+ 1.1.13:
|
||||
|
||||
* Dnd and selection bug fixes and memory purification.
|
||||
* Widget sensitivity fixups.
|
||||
* Tooltips windows are now named "gtk-tooltips" so rc file rules
|
||||
can match tooltips windows. Fixed interaction of tooltips and NO_WINDOW
|
||||
widgets.
|
||||
* Spin buttons now update their values upon value retrival.
|
||||
* Overhaul of the resizing vs. redrawing logic to reduce redrawing needs
|
||||
a lot. Gtk makes full use of the draw_area coalescing code now, which
|
||||
got minorly improved as well.
|
||||
* Containers map their Gdk windows after their children now to reduce
|
||||
expose event generation.
|
||||
* Gdk event queue fixups, this solves the double-click problems people were
|
||||
recently having.
|
||||
* Account for the fact that GSource's are only properly reentrant from
|
||||
within dispatch(), thus we don't do Gdk event processing from within
|
||||
check() or prepare() anymore.
|
||||
* Rc files feature a bg_pixmap value of "<none>" now.
|
||||
* Improved session management support in Gdk.
|
||||
* Automatic disabling of NLS if no gettext is found should work now.
|
||||
* Removed deprecated functions, docs/Changes-1.2.txt gives an overview.
|
||||
* Gtk+ development now requires GNU autoconf 2.13, GNU automake 1.4
|
||||
and GNU libtool 1.2d.
|
||||
* More bug fixes all over the place.
|
||||
|
||||
What is new in GTK+ 1.1.12:
|
||||
|
||||
* Korean translation added
|
||||
* Fixed memory leaks
|
||||
* A few other bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.11:
|
||||
|
||||
* Dutch, Japanese, Swedish, Polish, and Norwegian translations
|
||||
* Removed deprecated _interp variants: gtk_container_foreach_interp,
|
||||
gtk_idle_add_interp, gtk_timeout_add_interp, gtk_signal_connect_interp
|
||||
* Lots of cast corrections
|
||||
* Many fixes
|
||||
|
||||
What is new in GTK+ 1.1.9:
|
||||
|
||||
* Check for broken glibc 2.0 mb functions and avoid them
|
||||
* Label and Entry display fixes
|
||||
* Move main thread back to GDK, for locking when translating events
|
||||
* Bug fixes
|
||||
|
||||
What is new in GTK+ 1.1.8:
|
||||
|
||||
* Added support for gettext and the localization of the standard
|
||||
dialogs.
|
||||
* Added line-wrapping for the label, and JUSTIFY_FILL
|
||||
* Support reordering via drag and drop in CList and CTree.
|
||||
* Replaced GtkDrawWindow widget with a GTK_USER_DRAW flag
|
||||
* Extended gtkpaned API to support minimum sizes and proportional
|
||||
resizing.
|
||||
* Changed the handling of shared memory segments so as to
|
||||
remove the need for GTK+ to set up signal handlers.
|
||||
* Re-implemented event loop in terms of the event loop
|
||||
that has been added to GLib 1.1.8
|
||||
* Added 'grab_focus' signal to allow keyboard accelerators
|
||||
for entries.
|
||||
* Load locale specific RC files if present.
|
||||
* Bug fixes.
|
||||
|
||||
What is new in GTK+ 1.1.7:
|
||||
|
||||
* Fixed memory mis-allocation in default files code
|
||||
* Various event handling fixes
|
||||
* Wide character support for entry and text
|
||||
* Destroy widgets _after_ propagating unrealize signals through
|
||||
widget heirarchy
|
||||
* Only build XIM-support if available
|
||||
* Tutorial and examples updates
|
||||
* Added gtk_drag_source_unset()
|
||||
|
||||
What is new in GTK+ 1.1.6:
|
||||
|
||||
* The signal system now features emission hooks whith special semantics,
|
||||
refer to the ChangeLog for this.
|
||||
* Minor? speedups and memory reductions to the emission handling of the
|
||||
signal system.
|
||||
* _interp() function variants are deprecated now. the corresponding *_full()
|
||||
variants are provided for a long time now.
|
||||
* Dnd abort timeout increased to 10 minutes.
|
||||
* GtkScrolledWindow inherits from GtkBin now.
|
||||
* GTK_POLICY_NEVER is implemented for scrolled windows now.
|
||||
* Lots of API clean ups.
|
||||
* Incremental freezing abilities.
|
||||
* Integrated widgets from the GNOME tree: GtkLayout, GtkPlug and GtkSocket.
|
||||
* New window functions for transient relationship, default size, and
|
||||
geometry hints
|
||||
* Default rc files are now read in (<sysconfdir/etc/gtkrc and ~/.gtkrc)
|
||||
GTK_RC_FILES environment variable and functions are provided to configure
|
||||
this behavior
|
||||
* Read doc/Changes-1.2.txt to properly adapt your code.
|
||||
* Bug Fixes.
|
||||
|
||||
What is new in GTK+ 1.1.5:
|
||||
|
||||
* Theme integration
|
||||
* Widget style modification is now handled through GtkRcStyles
|
||||
* GtkPixmaps now grey out pixmaps when insensitive
|
||||
* Notebook enhancements
|
||||
* Shadow configurability for menubars and handleboxes
|
||||
* DND enhancements
|
||||
* gtkfilesel now supports automounters better
|
||||
* Implementation of expose compression
|
||||
* Queued redraws of partial areas
|
||||
* Scrolledwindow (+Viewport) source incompatibilities, children that are added
|
||||
to a scrolled window don't get an automatic viewport anymore. a convenience
|
||||
function gtk_scrolled_window_add_with_viewport() is suplied for this task
|
||||
* Deprecated functions will now issue a message, informing the programmer about
|
||||
the use of this function. These functions will get removed in future versions
|
||||
* Non-functional functions got removed entirely
|
||||
* gtk_widget_new() and gtk_object_new() will now auto-construct new objects.
|
||||
A new function gtk_object_default_construct() is provided now which should
|
||||
be called after every gtk_type_new() to perfom the auto-construction
|
||||
* Improved argument support of several widgets
|
||||
* Bug Fixes
|
||||
|
||||
What is new in GTK+ 1.1.3:
|
||||
|
||||
* GtkCList/GtkCTree now have the ability to:
|
||||
- hide/show individual columns
|
||||
- disable/enable column resizing
|
||||
- set min and max for column widths
|
||||
- set expander style of the ctree
|
||||
- set/get row and cell styles
|
||||
- set spacing between tree expander and cell contents in ctree
|
||||
- toggle auto_resize for columns
|
||||
* Must enhanced DND support, removed old DND code
|
||||
* Idle functions are now implemented via GHook, giving a slight speed
|
||||
improvement
|
||||
* An environment variable GTK_MODULES which takes a colon seperated
|
||||
list of module names GTK+ will now automatically load at gtk_init() startup
|
||||
* GtkFontSel now has support for an extra 'base' filter
|
||||
* New function gdk_window_set_root_origin to get the real geometry taking
|
||||
into account window manager offsets
|
||||
* New function gtk_text_set_line_wrap to toggle line wrapping
|
||||
* New function gtk_widget_add_events which safely adds additional
|
||||
events to a widget's event mask
|
||||
* New function gdk_event_get_time to get the timestamp from a generic
|
||||
event
|
||||
* New widget GtkCalendar
|
||||
* New widget GtkInvisible - InputOnly offscreen windows used for reliable
|
||||
pointer grabs and selection handling in DND code
|
||||
* New functions gtk_object_remove_no_notify[_by_id] to remove a certain
|
||||
data portion without invokation of its destroy notifier
|
||||
* gtk_spin_button_construct is now deprecated, use gtk_spin_button_configure
|
||||
instead
|
||||
* gtk_clist_set_border is now deprecated, use gtk_clist_set_shadow_type
|
||||
instead
|
||||
* Removed functions gtk_object_set_data_destroy[_by_id]
|
||||
* Documentation additions/updates
|
||||
* HTML and plain text files are now included in the distribution
|
||||
* Bug fixes, typeness corrections, and general fixups
|
||||
|
||||
What is new in GTK+ 1.1.2:
|
||||
|
||||
* Gtk+ is now featuring runtime loading of dynamic modules via the
|
||||
--gtk-modules= command line switch. such modules have to export a
|
||||
G_MODULE_EXPORT void gtk_module_init (gint *argc, gchar ***argv);
|
||||
function which will be invoked to initialize the module. since such
|
||||
modules may create new widget types, they are always resident.
|
||||
* The tutorial has been updated again.
|
||||
* Changes to menus including tearoff menus and accelerators.
|
||||
* Better support for modal dialogs.
|
||||
* Removed CAN_FOCUS by default from scrollbars and button children of toolbar.
|
||||
* More improvements and fixes for GtkCList and GtkCTree (i.e. row sorting).
|
||||
* GtkCTree rows can be unselectable now.
|
||||
* The GtkCTree API has undergone major renames (see ChangeLog entry from Lars
|
||||
Hamann on Tue Aug 18 00:29:13 1998).
|
||||
* A bunch of varargs functions changed to get va_lists working on systems that
|
||||
implement va_lists as arrays.
|
||||
* Improvements to the gdkrgb code.
|
||||
* Improvements to Gdk color handling so we greatly reduce server traffic and
|
||||
don't leak colors anymore.
|
||||
* Improved internal widget tree iterators (the GtkContainer::foreach signal
|
||||
vanished because of this).
|
||||
* Option menus can have the keyboard focus now.
|
||||
* More fixups to the text widget.
|
||||
* GtkFileSelection should behave much more nicely in combination with AFS now.
|
||||
* Support for label underlining.
|
||||
* Support for GLib 1.1.3 log domains.
|
||||
* Documentation improvements.
|
||||
* Configuration fixes on various platforms.
|
||||
* Miscellaneous fixes to XInput support.
|
||||
* Build with shared library dependencies on Linux
|
||||
* Fix for a major bug in the type systems memory allocation code that could
|
||||
cause random crashes.
|
||||
* Libtool update to version 1.2b.
|
||||
* Lots of bugfixes and cleanups again ;)
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.1:
|
||||
|
||||
* Tutorial updates and additions.
|
||||
* Key binding support for GtkListItems and GtkList.
|
||||
* Extended selection mode and autoscrolling for GtkLists.
|
||||
* A GtkCtree now operates on GtkCTreeNode* structures rather than GList*.
|
||||
* GtkCTreeNodes can now be created from GNode trees.
|
||||
* Bug fixes for GtkNotebook, GtkCList, GtkCombo and GdkWindow reparentation.
|
||||
|
||||
|
||||
What is new in GTK+ 1.1.0:
|
||||
|
||||
* New widget GtkFontSelector.
|
||||
* New featurefull progress bar.
|
||||
* New container widget GtkPacker.
|
||||
* New object GtkItemFactory, GtkMenuFactory is deprecated.
|
||||
* New key binding system, configurable via rcfiles, similar to styles.
|
||||
* New widget GtkCTree with drag selections and keyboard movement and
|
||||
and horizontal scrolling. Features also implemented for GtkCList.
|
||||
* Significant speedups to widget creation and destruction through caching
|
||||
colormap and visual queries to the XServer.
|
||||
* Speedups for type creation and especially gtk_type_is_a() checks.
|
||||
* Speedups in signal lookup, creation and emissions and connection handling.
|
||||
* Minor speedups with object data allocation and destruction.
|
||||
* Additions to the signal handling API (e.g. *_emitv).
|
||||
* Support for rc-file reparsing.
|
||||
* Resizing logic is now implemented on container widget basis, rather than
|
||||
for toplevel GtkWindows only.
|
||||
* Buttons support relief styles now.
|
||||
* Some widgets are now allocated through memchunks to behave more memory wise.
|
||||
* Newly included file gtkfeatures.h which defines compatibility macros to
|
||||
test for certain API features upon program compilation.
|
||||
* Child arguments support for container widgets.
|
||||
* Far better support for object arguments, revamp of the underlying
|
||||
mechanism for speed and reusability. Child/object arguments don't
|
||||
need to be preceeded by the "GtkType::" portion anymore.
|
||||
* Removed GtkAcceleratorTable in favour of GtkAccelGroup, accelerator display
|
||||
is now performed by a new widget GtkAccelLabel.
|
||||
* Overhaul of the resizing code. Resizing behaviour can now be specified
|
||||
on GtkContainer basis, so the underlying algorithm isn't only available
|
||||
for GtkWindows.
|
||||
* GtkTables are now fully resizable.
|
||||
* The GtkType system now supports an additional base class initialization
|
||||
function.
|
||||
* GtkStyles and key bindings can now be looked up depending on the base
|
||||
types of a widget, through a new keyword `class' in rc files.
|
||||
* GtkButton derives from GtkBin (finally).
|
||||
* More descriptive error messages on rc parsing.
|
||||
* Runtime information is available to query enum/flag definition values.
|
||||
* Upgrade to libtool-1.2
|
||||
* Legions of bug fixes, memory leaks, segfaults, of-by-something errors...
|
||||
including those that already went into the 1.0.x branch.
|
||||
* A big bunch of features and cosmetic fixups that just got lost in
|
||||
the masses of changes.
|
124
NEWS.pre-1-0
124
NEWS.pre-1-0
@@ -1,124 +0,0 @@
|
||||
|
||||
Overview of Changes in GTK+ 1.0.0:
|
||||
|
||||
* A few bug fixes.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.10:
|
||||
|
||||
* Lots of bug fixes
|
||||
* Documentation improvements
|
||||
* Better looking handlebox
|
||||
* A few convenience functions
|
||||
|
||||
Overview of Changes in GTK+ 0.99.9:
|
||||
|
||||
* Added examples directory, even more examples soon
|
||||
* Added optional word wrap to gtktext
|
||||
* Changes to gtkhandlebox
|
||||
* Lots of bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.8:
|
||||
|
||||
* Compilation and configuration fixes
|
||||
* DND Fixes
|
||||
* New test in testgtk: cursors
|
||||
* Tutorial updates/additions
|
||||
* Few more FAQ additions
|
||||
* More prep for 1.0
|
||||
|
||||
Overview of Changes in GTK+ 0.99.7:
|
||||
|
||||
* This release is mainly because 0.99.6 did not compile completely
|
||||
due to a missing file.
|
||||
* Fixes to Gtk's quit handlers.
|
||||
|
||||
Overview of Changes in GTK+ 0.99.6:
|
||||
|
||||
* Intermediate release to become 1.0.
|
||||
* More signedness corrections for handler functions in gtkmain.h.
|
||||
* Semantics of GtkWidget::delete_event changed.
|
||||
* Documentation updates.
|
||||
* Inclusion of Gtk tutorial.
|
||||
* Implementation of a new shutdown method for GtkObject's executed prior to
|
||||
actual destruction. WARNING: this breaks binary compatibility, programs using
|
||||
Gtk need to be recompiled.
|
||||
* Clean ups due to compiler warnings.
|
||||
* Various widget fixes.
|
||||
|
||||
Overview of Fixes in GTK+ 0.99.5:
|
||||
|
||||
* Signal signedness and naming corrections
|
||||
* rc/style fixes
|
||||
* text, entry widget fixes
|
||||
* gtkeditable fixes
|
||||
* scrollbar flickering fixed
|
||||
* check casts are more descriptive
|
||||
* DND fixes
|
||||
* FAQ updates
|
||||
* Bug fixes
|
||||
|
||||
Overview of Changes in GTK+ 0.99.4:
|
||||
|
||||
* Reference counting revolution integrated.
|
||||
Refer to docs/refcounting.txt on this issue.
|
||||
* Implementation of a decent debugging system, you would want
|
||||
to export GTK_DEBUG=objects if you are going to develop gtk applications,
|
||||
refer to docs/debugging.txt for further information.
|
||||
* Additions on the signal code for querying information about certain signals,
|
||||
and pending handlers of signals.
|
||||
* Support for user signals, and major changes to internal signal handler
|
||||
handling for proper signal removal and invokation of after signals.
|
||||
* Additional signals for various widgets e.g, GtkHandleBox::child_attached,
|
||||
GtkHandleBox::child_detached, GtkWidget::style_set, GtkWidget::parent_set.
|
||||
* GtkTooltips became a true descendant of GtkObject via derivation from
|
||||
GtkData and facilitates an extra tip string which can be used as e.g. an
|
||||
index into context help.
|
||||
* Split up of the widget/object flags into a private and a public portion,
|
||||
consult docs/widget_system.txt on this.
|
||||
* Support for hot keys on gtk programs via gtk_key_snooper_install().
|
||||
* Reimplementation of the *_interp functions as *_full functions to provide
|
||||
simple callback functions as well.
|
||||
* Idle functions are now prioritized.
|
||||
* Many enhancements to GtkNotebook.
|
||||
* New widget GtkSpinButton, check out testgtk.
|
||||
* New widget GtkTipsQuery for letting the user query tooltips of widgets.
|
||||
* Addition of GtkEditable base widget to encapsulate selection and
|
||||
clipboard handling. (GtkEntry and GtkText use this)
|
||||
* Text widget more complete.
|
||||
* Additions to GtkStatusBar to make it complete.
|
||||
* Gdk now supports regions.
|
||||
* Access masks for widget arguments (GTK_ARG_READABLE/GTK_ARG_WRITABLE).
|
||||
* Function replacements:
|
||||
g_string_hash() -> g_str_hash()
|
||||
g_string_equal() -> g_str_equal()
|
||||
gtk_tooltips_set_tips() -> gtk_tooltips_set_tip()
|
||||
* Support for quit handlers in gtk_main().
|
||||
* Motif window mangaer hints support.
|
||||
* Widget arguments are now flagged for readability/writability.
|
||||
* Additions to documentation.
|
||||
* Various FAQ updates. (FAQ now included)
|
||||
* Clean ups and many many bug fixes by a lot of people all over the place.
|
||||
* New, long and descriptive ChangeLog entries for bored readers ;)
|
||||
|
||||
Overview of Changes in GTK+ 0.99.3:
|
||||
|
||||
* Filesel enhancement / stability changes
|
||||
* New widget, gtkcombo
|
||||
* Widgets in the toolbar do not get the focus
|
||||
* New widget, gtkstatusbar (still in-progress)
|
||||
* g_string_equal renamed g_str_equal
|
||||
* g_string_hash renamed g_str_hash
|
||||
* new gtkbox functions to allow modification of the child
|
||||
linkage after the widget tree is setup
|
||||
* gtk_*_get_arg() and gtk_*_set_arg() fixes and implementations
|
||||
* DND changes/fixes
|
||||
* Entry widget now has set_max_length function
|
||||
* Handlebox widget changes/fixes
|
||||
* Some work on text widget (still in-progress)
|
||||
* Now the toolbar supports arbitrary widgets as well
|
||||
* CList has resizable columns again
|
||||
* CList now looks consistant with scrolled windows
|
||||
* Remove flickering from entry widget
|
||||
* Added switch_page signal to notebook widget
|
||||
* Documentation additions
|
||||
* Other bug fixes...
|
101
README
101
README
@@ -1,101 +0,0 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 1.2.0. 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: 1.2.0
|
||||
|
||||
[ Please substitute 1.2.0 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: 1.2.0
|
||||
|
||||
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".
|
@@ -1,63 +0,0 @@
|
||||
GTK+ is part of the GNOME CVS repository. At the current time, any
|
||||
person with write access to the GNOME repository, can make changes to
|
||||
GTK+. This is a good thing, in that it encourages many people to work
|
||||
on GTK+, and progress can be made quickly. However, GTK+ is a fairly
|
||||
large and complicated package that many other things depend on, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK+ that has been built up over the last 18 months, we'd like
|
||||
to ask people commiting to GTK+ to follow a few rules:
|
||||
|
||||
0) Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've
|
||||
been working on GTK+ for a while it probably isn't necessary
|
||||
to ask. But when in doubt, ask. Even if your change is correct,
|
||||
somebody may know a better way to do things.
|
||||
|
||||
If you are making changes to GTK+, you should be subscribed
|
||||
to gtk-devel-list@redhat.com. (Subscription address:
|
||||
gtk-devel-list-request@redhat.com.) This is a good place to ask
|
||||
about intended changes.
|
||||
|
||||
If you just want to make a trivial change, and don't want to subscribe,
|
||||
you can also mail gtk-bugs@gtk.org. Or, alternatively, you can look in
|
||||
the ChangeLog for somebody who has been making changes to the file
|
||||
you want to change and email them.
|
||||
|
||||
#gimp on byxnet (irc.gimp.org, irc2.gimp.org, irc3.gimp.org,
|
||||
irc.germany.gimp.org...)s also a good place to find GTK+ developers to
|
||||
discuss changes with, however, email to gtk-devel-list is the most
|
||||
certain and preferred method.
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
2) There must be a ChangeLog for every commit. (If you discover that
|
||||
you only committed half the files you meant to and need to fix that
|
||||
up, or something, you don't need a new ChangeLog entry. But in general,
|
||||
ChangeLog entries are mandatory.) Changes with out ChangeLog entries
|
||||
will be reverted.
|
||||
|
||||
3) There _must_ be a ChangeLog for every commit.
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are going to be changing many files in an experimental fashion,
|
||||
it probably is a good idea to create a separate branch for your changes.
|
||||
|
||||
* The ChangeLog entries should preferrably match in date format
|
||||
with the existing entries. You can set how emacs does this
|
||||
by using customize mode:
|
||||
|
||||
- M-x customize
|
||||
- set Programming/Tools/ChangeLog/Add Log Time Format to
|
||||
'Old Format'
|
||||
|
||||
Or, set the add-log-time-format to 'current-time-string in
|
||||
your .emacs file.
|
||||
|
||||
Owen Taylor
|
||||
13 Aug 1998
|
||||
|
||||
|
||||
|
||||
|
||||
|
101
README.in
101
README.in
@@ -1,101 +0,0 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version @GTK_VERSION@. GTK+, which stands for the Gimp ToolKit,
|
||||
is a library for creating graphical user interfaces for the X Window
|
||||
System. It is designed to be small, efficient, and flexible. GTK+ is
|
||||
written in C with a very object-oriented approach.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
A mailing list is located at:
|
||||
gtk-list@redhat.com
|
||||
|
||||
To subscribe: mail -s subscribe gtk-list-request@redhat.com < /dev/null
|
||||
(Send mail to gtk-list-request@redhat.com with the subject "subscribe")
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking
|
||||
system. (http://bugs.gnome.org). To report a problem
|
||||
about GTK+, send mail to submit@bugs.gnome.org.
|
||||
|
||||
The subject of the mail should describe your problem.
|
||||
In the body of the mail, you should first include
|
||||
a "pseudo-header" that gives the package and
|
||||
version number. This should be separated by a blank
|
||||
line from the actual headers.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
[ Please substitute @GTK_VERSION@ with the version of GTK+ that
|
||||
you have installed ]
|
||||
|
||||
Then describe the bug. Include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with the testgtk program that is built
|
||||
in the gtk/ subdirectory, that will be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior.
|
||||
As a last resort, you can also provide a pointer to a larger piece
|
||||
of software that can be downloaded.
|
||||
|
||||
(Bugs that can be reproduced within the GIMP are almost as good
|
||||
as bugs that can be reproduced in testgtk. If you are reporting a
|
||||
bug found with the GIMP, please include the version number of the GIMP
|
||||
you are using)
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out
|
||||
when the crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but
|
||||
is not necessary. If you do send a stack trace, and the error
|
||||
is an X error, it will be more useful if the stacktrace
|
||||
is produced running the test program with the --sync command
|
||||
line option.
|
||||
|
||||
An example of a bug report:
|
||||
|
||||
====
|
||||
To: submit@bugs.gnome.org
|
||||
From: yourname@your.address.org
|
||||
Subject: handlebox test in testgtk is misnamed.
|
||||
|
||||
Package: gtk+
|
||||
Version: @GTK_VERSION@
|
||||
|
||||
When I run gtk/testgtk, the button "handle box"
|
||||
is misnamed. There are multiple handle boxes in
|
||||
the demo, so it should be "handle boxes", to
|
||||
be like "buttons" or "check buttons".
|
||||
===
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches can be uploaded to the incoming/ directory on
|
||||
ftp.gtk.org. Please follow the instructions there, and include
|
||||
your name and email address in the README file.
|
||||
|
||||
If the patch fixes a bug, it is usually a good idea to include
|
||||
all the information described in "How to Report Bugs".
|
39
README.win32
39
README.win32
@@ -1,39 +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/ .
|
||||
|
||||
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||
tools, or gcc-2.95 or later running under cygwin-b20.1 or
|
||||
later. Compile in gdk\win32 and gtk with `nmake -f makefile.msc` or
|
||||
`make -f makefile.cygwin`. Before doing a install, check the BIN
|
||||
definition in gdk\win32\makefile.msc (or makefile.cygwin) and
|
||||
gtk\makefile.msc (or makefile.cygwin).
|
||||
|
||||
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 as 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.
|
200
TODO
200
TODO
@@ -1,200 +0,0 @@
|
||||
|
||||
Outstanding items:
|
||||
|
||||
* focus handling for GtkOptionMenu (needs the previous)
|
||||
|
||||
* implement gtk_default_draw_oval and other missing things in gtkstyle.c.
|
||||
|
||||
* enforce invariants on *_RESIZE* and *_REDRAW* flags.
|
||||
|
||||
* GtkToolTips: allocate GtkTooltipsData from memchunks
|
||||
|
||||
* 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)
|
||||
|
||||
* More dialogs: Print, maybe others...
|
||||
|
||||
* make the gtk_main callbacks consistent in their add/remove behaviour.
|
||||
|
||||
* Check return values on all calls to XIC[Get/Set]Values
|
||||
|
||||
* The "--geometry" option should be supported
|
||||
|
||||
- Having gdk_init() parse the geometry option. (putting it into
|
||||
GDK means you can use XParseGeometry() without wrapping it)
|
||||
|
||||
- Add a call gdk_get_geometry() that retrieves the results
|
||||
in a form like that returned by XParseGeometry()
|
||||
|
||||
- The application then can modify the results (as would gemvt)
|
||||
then call a routine gtk_window_set_geometry() on whatever
|
||||
it considers to be its main window.
|
||||
|
||||
- Then in some manner GtkWindow takes that into account when
|
||||
setting its hints. (Probably it uses the size and position
|
||||
as the current uposition and usize, and modulates that
|
||||
be the equivalents of the X flags
|
||||
|
||||
XValue, YValue, WidthValue, HeightValue, XNegative, or YNegative
|
||||
|
||||
( You'd have to extend gdk_window_set_hints to accept the
|
||||
window gravity option to get it right. )
|
||||
|
||||
* Allow moving the separator for paned widgets by dragging
|
||||
it directly instead of using the handle.
|
||||
|
||||
* Check into XAddConnectionWatch - is this needed for XIM?
|
||||
|
||||
* Places where a _full variant is needed:
|
||||
|
||||
gtk_init_add
|
||||
gtk_menu_popup
|
||||
gtk_toolbar_prepend_element
|
||||
gtk_toolbar_insert_element
|
||||
|
||||
* Try to rationally deal with someone else deleting one of our
|
||||
windows??? This would mean keeping track of our window heirarchy
|
||||
ourselves, for one thing, and will never be safe, because of
|
||||
race conditions.
|
||||
|
||||
* Should all the default handlers really return FALSE? This can
|
||||
cause confusing presses to be sent to containers that actually
|
||||
want to get events on themselves.
|
||||
|
||||
* The menu code should skip separators during keyboard navigation,
|
||||
whether they are sensitive or insensitive.
|
||||
|
||||
* OwnerButtonPressGrab needs to go!
|
||||
|
||||
Text/Edit widget:
|
||||
|
||||
Bugs:
|
||||
|
||||
- Really big font (150 pt), plus lots of editing caused segfault
|
||||
|
||||
Improvements:
|
||||
|
||||
- Unify the key binding support in some fashion between the
|
||||
Entry and Text widget widgets, use GtkBindings for this.
|
||||
|
||||
- Figure out a way not to recompute the geometry on insertions/deletions
|
||||
which are large, but not a significant fraction of the
|
||||
entire text. (e.g., compute the changes as when the widget
|
||||
is not frozen, but without the actual scrolling)
|
||||
|
||||
- Prune the line start cache. But since it is only 68 bytes
|
||||
per line, and it is a lot faster when lines are in the cache,
|
||||
it may be better not to, at least for now.
|
||||
|
||||
- Show the non-editable state by changing colors. (Use the
|
||||
style entries for insensitive?)
|
||||
|
||||
- Multibyte support for the Text widget.
|
||||
|
||||
- Unicode support to do the multi-byte right.
|
||||
|
||||
- Support an .inputrc. (The readline one doesn't really work,
|
||||
unless it is extended because it can't represent X keysyms,
|
||||
just terminal type input)
|
||||
|
||||
- A vi mode
|
||||
|
||||
- Word wrap, instead of line folding. (Should the continuation
|
||||
characters be shown?)
|
||||
|
||||
- Horizontal scrolling
|
||||
|
||||
- Disable pasting compound text
|
||||
|
||||
- When showing background pixmap (not editable) actually set
|
||||
the background pixmap as the windows bg pixmap, to improve
|
||||
appearance on exposes. But this would require using another
|
||||
window to get the origins.
|
||||
|
||||
- In word wrap mode, break:
|
||||
|
||||
aaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
|
||||
as:
|
||||
| Maximum column
|
||||
aaaaaaaaaaa bbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbb |
|
||||
|
||||
Instead of:
|
||||
|
|
||||
aaaaaaaaaaa |
|
||||
bbbbbbbbbbbbbbbbbbbbbbb|
|
||||
bbbbbbbbbbbbbbbbbbbb |
|
||||
|
||||
- Blinking cursor
|
||||
|
||||
- API's : gtk_text_clear, gtk_text_delete_lines (gint start, gint end),
|
||||
gtk_text_append/prepend, gtk_text_insert_at (gint row, gint column),
|
||||
some function to get the row/column from the x/y-coordinates of a
|
||||
mouse click, some function to get the word/line under the mouse pointer
|
||||
[ From: Stefan Jeske <jeske@braunschweig.netsurf.de> ]
|
||||
|
||||
- "changed" emitted when doing deletes on empty Text widget.
|
||||
|
||||
- Delete IC in editable->unrealize, not editable->finalize?
|
||||
|
||||
Themes
|
||||
======
|
||||
|
||||
- When a scale gets shown/hidden only queue a redraw on the
|
||||
non-window portion, not the whole area.
|
||||
|
||||
- In various places, to avoid shaping windows excessively,
|
||||
we set parent relative backgrounds. This is an ugly
|
||||
hack and needs a better solution. Plus, I don't think
|
||||
these parent-relative backgrounds always persist to
|
||||
when they are actually needed.
|
||||
|
||||
Such calls exist in: GtkButton, GtkHandeBox, GtkItem,
|
||||
GtkListItem, GtkMenu, GtkMenuItem, GtkMisc,
|
||||
GtkNoteBook, GtkOptionMenu, GtkPaned, GtkPreview,
|
||||
GtkSpinButton and GtkTreeItem.
|
||||
|
||||
- For menus and for GtkWindow's, the realize() function
|
||||
calls paint(), so that background pixmaps can be set
|
||||
ahead of time, and prevent flashing when the window is
|
||||
shown. This is an ugly hack and needs a better solution.
|
||||
|
||||
=======
|
||||
|
||||
Calendar Widget:
|
||||
|
||||
- The widget should be nicely resizeable vertical too.
|
||||
|
||||
- CALENDAR_MARGIN should be removed, uses INNER_BORDER and
|
||||
style->class->[xy]thickness insted.
|
||||
|
||||
- Flag to choose between using standard three letter abbreviated
|
||||
weekday name or just the first character from it. It looks like
|
||||
that is what most other calendar-widgets do.
|
||||
|
||||
- Arrows should resize with the header-font.
|
||||
|
||||
- The keyboard support has to be finished.
|
||||
|
||||
DND
|
||||
===
|
||||
|
||||
- Use a cursor instead of an ICON when over Motif windows,
|
||||
to get rid of the current junk that Motif leaves because
|
||||
of its XCopyArea stupidity for doing highlighting.
|
||||
|
||||
- Add a GTK_DRAG_VERIFY target flag and a "drag_data_verify"
|
||||
signal so that apps can easily check if a, say,
|
||||
text/uri-list URL looks OK during the drop.
|
||||
|
||||
- Check more for memory leaks.
|
||||
|
||||
- Drag and drop for Entry and Text widgets.
|
||||
|
||||
- Send synthetic motion events on structure changes so
|
||||
drag_enter/leave get sent properly. (See the popup
|
||||
in testdnd)
|
400
TODO.xml
400
TODO.xml
@@ -1,400 +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@redhat.com</contact>
|
||||
<bugs>#3958</bugs>
|
||||
</entry>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Internationalization</title>
|
||||
|
||||
<entry size="big" status="0%" 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="20%" 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="0%" target="1.4">
|
||||
<title>Rewrite Input Method Support</title>
|
||||
<description>
|
||||
<p>
|
||||
Current support for Input Methods 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>
|
||||
While adding the above support, it may be desirable to
|
||||
generalize the input-method support to the point where
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-i18n-list@redhat.com</contact>
|
||||
</entry>
|
||||
</section>
|
||||
|
||||
<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@redhat.com</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@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>GTK+ Widgets</title>
|
||||
|
||||
<entry size="small" status="0%" 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@redhat.com</contact>
|
||||
</entry>
|
||||
|
||||
<entry size="big" status="50%" 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. There are a number
|
||||
of possible candidates for a replacement, with the most
|
||||
promising at the current time being Havoc Pennington's
|
||||
(hp@redhat.com) port of the Tk Text widget.
|
||||
</p>
|
||||
<p>
|
||||
As part of this job it will be necessary to add
|
||||
<a href="http://www.pango.org">Pango</a> support to the
|
||||
replacement. The structure of the Tk text widget port seems
|
||||
suited to this as it works paragraph-by-paragraph, and
|
||||
Pango works at a sub-paragraph scale.
|
||||
</p>
|
||||
</description>
|
||||
<contact>gtk-devel-list@redhat.com</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@redhat.com</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@redhat.com</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@redhat.com</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@redhat.com</contact>
|
||||
</entry>
|
||||
</section>
|
||||
</todo>
|
59
acconfig.h
59
acconfig.h
@@ -1,59 +0,0 @@
|
||||
/* acconfig.h
|
||||
This file is in the public domain.
|
||||
|
||||
Descriptive text for the C preprocessor macros that
|
||||
the distributed Autoconf macros can define.
|
||||
No software package will use all of them; autoheader copies the ones
|
||||
your configure.in uses into your configuration header file templates.
|
||||
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). Although this order
|
||||
can split up related entries, it makes it easier to check whether
|
||||
a given entry is in the file.
|
||||
|
||||
Leave the following blank line there!! Autoheader needs it. */
|
||||
|
||||
|
||||
/* Other stuff */
|
||||
#undef ENABLE_NLS
|
||||
#undef GTK_COMPILED_WITH_DEBUGGING
|
||||
|
||||
#undef HAVE_CATGETS
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_GETTEXT
|
||||
#undef HAVE_IPC_H
|
||||
#undef HAVE_LC_MESSAGES
|
||||
#undef HAVE_PWD_H
|
||||
#undef HAVE_SHM_H
|
||||
#undef HAVE_STPCPY
|
||||
#undef HAVE_XSHM_H
|
||||
#undef HAVE_SHAPE_EXT
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
#undef HAVE_SYS_TIME_H
|
||||
#undef HAVE_XCONVERTCASE
|
||||
|
||||
#undef NO_FD_SET
|
||||
|
||||
#undef RESOURCE_BASE
|
||||
|
||||
/* Define to use X11R6 additions to XIM */
|
||||
#undef USE_X11R6_XIM
|
||||
|
||||
#undef XINPUT_NONE
|
||||
#undef XINPUT_GXI
|
||||
#undef XINPUT_XFREE
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Most machines will be happy with int or void. IRIX requires '...' */
|
||||
#undef SIGNAL_ARG_TYPE
|
||||
|
||||
/* #undef PACKAGE */
|
||||
/* #undef VERSION */
|
||||
|
||||
|
||||
/* Leave that blank line there!! Autoheader needs it.
|
||||
If you're adding to this file, keep in mind:
|
||||
The entries are in sort -df order: alphabetical, case insensitive,
|
||||
ignoring punctuation (such as underscores). */
|
761
acinclude.m4
761
acinclude.m4
@@ -1,761 +0,0 @@
|
||||
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
|
||||
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
|
||||
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation; either version 2 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful, but
|
||||
## WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
## General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program; if not, write to the Free Software
|
||||
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
##
|
||||
## As a special exception to the GNU General Public License, if you
|
||||
## distribute this file as part of a program that contains a
|
||||
## configuration script generated by Autoconf, you may include it under
|
||||
## the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$host" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_SUBST(LD)
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
AC_SUBST(NM)
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$host" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
||||
# Macro to add for using GNU gettext.
|
||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||
#
|
||||
# Modified to never use included libintl.
|
||||
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
|
||||
#
|
||||
#
|
||||
# This file can be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_GTK_WITH_NLS,
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
[ --disable-nls do not use Native Language Support],
|
||||
USE_NLS=$enableval, USE_NLS=yes)
|
||||
AC_MSG_RESULT($USE_NLS)
|
||||
AC_SUBST(USE_NLS)
|
||||
|
||||
USE_INCLUDED_LIBINTL=no
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
# AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
# nls_cv_force_use_gnu_gettext=$withval,
|
||||
# nls_cv_force_use_gnu_gettext=no)
|
||||
# AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
||||
nls_cv_force_use_gnu_gettext="no"
|
||||
|
||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||
dnl User does not insist on using GNU NLS library. Figure out what
|
||||
dnl to use. If gettext or catgets are available (in this order) we
|
||||
dnl use this. Else we have to fall back to GNU NLS library.
|
||||
dnl catgets is only used if permitted by option --with-catgets.
|
||||
nls_cv_header_intl=
|
||||
nls_cv_header_libgt=
|
||||
CATOBJEXT=NONE
|
||||
|
||||
AC_CHECK_HEADER(libintl.h,
|
||||
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
|
||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
|
||||
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes"; then
|
||||
AC_CHECK_LIB(intl, bindtextdomain,
|
||||
[AC_CACHE_CHECK([for dgettext in libintl],
|
||||
gt_cv_func_dgettext_libintl,
|
||||
[AC_CHECK_LIB(intl, dgettext,
|
||||
gt_cv_func_dgettext_libintl=yes,
|
||||
gt_cv_func_dgettext_libintl=no)],
|
||||
gt_cv_func_dgettext_libintl=no)])
|
||||
fi
|
||||
|
||||
if test "$gt_cv_func_dgettext_libc" = "yes" \
|
||||
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETTEXT)
|
||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||
if test "$MSGFMT" != "no"; then
|
||||
AC_CHECK_FUNCS(dcgettext)
|
||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr],
|
||||
[CATOBJEXT=.gmo
|
||||
DATADIRNAME=share],
|
||||
[CATOBJEXT=.mo
|
||||
DATADIRNAME=lib])
|
||||
INSTOBJEXT=.mo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Added by Martin Baulig 12/15/98 for libc5 systems
|
||||
if test "$gt_cv_func_dgettext_libc" != "yes" \
|
||||
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
|
||||
INTLLIBS=-lintl
|
||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
AC_MSG_CHECKING([whether catgets can be used])
|
||||
AC_ARG_WITH(catgets,
|
||||
[ --with-catgets use catgets functions if available],
|
||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
||||
|
||||
if test "$nls_cv_use_catgets" = "yes"; then
|
||||
dnl No gettext in C library. Try catgets next.
|
||||
AC_CHECK_LIB(i, main)
|
||||
AC_CHECK_FUNC(catgets,
|
||||
[AC_DEFINE(HAVE_CATGETS)
|
||||
INTLOBJS="\$(CATOBJS)"
|
||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
||||
# if test "$GENCAT" != "no"; then
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
||||
# if test "$GMSGFMT" = "no"; then
|
||||
# AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
||||
# fi
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.cat
|
||||
# INSTOBJEXT=.cat
|
||||
# DATADIRNAME=lib
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
# fi
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$CATOBJEXT" = "NONE"; then
|
||||
dnl Neither gettext nor catgets in included in the C library.
|
||||
dnl Fall back on GNU gettext library.
|
||||
nls_cv_use_gnu_gettext=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$nls_cv_use_gnu_gettext" != "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
else
|
||||
# Unset this variable since we use the non-zero value as a flag.
|
||||
CATOBJEXT=
|
||||
# dnl Mark actions used to generate GNU NLS library.
|
||||
# INTLOBJS="\$(GETTOBJS)"
|
||||
# AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
|
||||
# AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||
# AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||
# [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||
# AC_SUBST(MSGFMT)
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# CATOBJEXT=.gmo
|
||||
# INSTOBJEXT=.mo
|
||||
# DATADIRNAME=share
|
||||
# INTLDEPS='$(top_builddir)/intl/libintl.a'
|
||||
# INTLLIBS=$INTLDEPS
|
||||
# LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
||||
# nls_cv_header_intl=intl/libintl.h
|
||||
# nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
|
||||
dnl Test whether we really found GNU xgettext.
|
||||
if test "$XGETTEXT" != ":"; then
|
||||
dnl If it is no GNU xgettext we define it as : so that the
|
||||
dnl Makefiles still can work.
|
||||
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
|
||||
: ;
|
||||
else
|
||||
AC_MSG_RESULT(
|
||||
[found xgettext program is not GNU xgettext; ignore it])
|
||||
XGETTEXT=":"
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need to process the po/ directory.
|
||||
POSUB=po
|
||||
else
|
||||
DATADIRNAME=share
|
||||
nls_cv_header_intl=intl/libintl.h
|
||||
nls_cv_header_libgt=intl/libgettext.h
|
||||
fi
|
||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
||||
AC_OUTPUT_COMMANDS(
|
||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
||||
esac])
|
||||
|
||||
|
||||
# # If this is used in GNU gettext we have to set USE_NLS to `yes'
|
||||
# # because some of the sources are only built for this goal.
|
||||
# if test "$PACKAGE" = gettext; then
|
||||
# USE_NLS=yes
|
||||
# USE_INCLUDED_LIBINTL=yes
|
||||
# fi
|
||||
|
||||
dnl These rules are solely for the distribution goal. While doing this
|
||||
dnl we only have to keep exactly one list of the available catalogs
|
||||
dnl in configure.in.
|
||||
for lang in $ALL_LINGUAS; do
|
||||
GMOFILES="$GMOFILES $lang.gmo"
|
||||
POFILES="$POFILES $lang.po"
|
||||
done
|
||||
|
||||
dnl Make all variables we use known to autoconf.
|
||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||
AC_SUBST(CATALOGS)
|
||||
AC_SUBST(CATOBJEXT)
|
||||
AC_SUBST(DATADIRNAME)
|
||||
AC_SUBST(GMOFILES)
|
||||
AC_SUBST(INSTOBJEXT)
|
||||
AC_SUBST(INTLDEPS)
|
||||
AC_SUBST(INTLLIBS)
|
||||
AC_SUBST(INTLOBJS)
|
||||
AC_SUBST(POFILES)
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GTK_GNU_GETTEXT,
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_REQUIRE([AC_C_CONST])dnl
|
||||
AC_REQUIRE([AC_C_INLINE])dnl
|
||||
AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||
|
||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
||||
unistd.h sys/param.h])
|
||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
||||
strdup __argz_count __argz_stringify __argz_next])
|
||||
|
||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
||||
AC_CHECK_FUNCS(stpcpy)
|
||||
fi
|
||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
||||
AC_DEFINE(HAVE_STPCPY)
|
||||
fi
|
||||
|
||||
AM_LC_MESSAGES
|
||||
AM_GTK_WITH_NLS
|
||||
|
||||
if test "x$CATOBJEXT" != "x"; then
|
||||
if test "x$ALL_LINGUAS" = "x"; then
|
||||
LINGUAS=
|
||||
else
|
||||
AC_MSG_CHECKING(for catalogs to be installed)
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
||||
esac
|
||||
done
|
||||
LINGUAS=$NEW_LINGUAS
|
||||
AC_MSG_RESULT($LINGUAS)
|
||||
fi
|
||||
|
||||
dnl Construct list of names of catalog files to be constructed.
|
||||
if test -n "$LINGUAS"; then
|
||||
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
||||
dnl must be resolved because we cannot expect the users of this
|
||||
dnl to define HAVE_LOCALE_H.
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
||||
else
|
||||
INCLUDE_LOCALE_H="\
|
||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
||||
fi
|
||||
AC_SUBST(INCLUDE_LOCALE_H)
|
||||
|
||||
dnl Determine which catalog format we have (if any is needed)
|
||||
dnl For now we know about two different formats:
|
||||
dnl Linux libc-5 and the normal X/Open format
|
||||
test -d intl || mkdir intl
|
||||
if test "$CATOBJEXT" = ".cat"; then
|
||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
||||
|
||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
||||
dnl cannot handle comments.
|
||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
||||
fi
|
||||
dnl po2tbl.sed is always needed.
|
||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
||||
|
||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
||||
dnl only sense for gettext. We comment this out for non-gettext
|
||||
dnl packages.
|
||||
if test "$PACKAGE" = "gettext"; then
|
||||
GT_NO="#NO#"
|
||||
GT_YES=
|
||||
else
|
||||
GT_NO=
|
||||
GT_YES="#YES#"
|
||||
fi
|
||||
AC_SUBST(GT_NO)
|
||||
AC_SUBST(GT_YES)
|
||||
|
||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
||||
dnl Try to locate is.
|
||||
MKINSTALLDIRS=
|
||||
if test -n "$ac_aux_dir"; then
|
||||
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||
fi
|
||||
if test -z "$MKINSTALLDIRS"; then
|
||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||
fi
|
||||
AC_SUBST(MKINSTALLDIRS)
|
||||
|
||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
||||
l=
|
||||
AC_SUBST(l)
|
||||
|
||||
dnl Generate list of files to be processed by xgettext which will
|
||||
dnl be included in po/Makefile.
|
||||
test -d po || mkdir po
|
||||
if test "x$srcdir" != "x."; then
|
||||
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
|
||||
posrcprefix="$srcdir/"
|
||||
else
|
||||
posrcprefix="../$srcdir/"
|
||||
fi
|
||||
else
|
||||
posrcprefix="../"
|
||||
fi
|
||||
rm -f po/POTFILES
|
||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
||||
])
|
||||
|
86
autogen.sh
86
autogen.sh
@@ -1,86 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=Gtk+
|
||||
TEST_TYPE=-d
|
||||
FILE=gdk
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have automake installed to compile $PROJECT."
|
||||
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
if test -z "$ACLOCAL_FLAGS"; then
|
||||
|
||||
acdir=`aclocal --print-ac-dir`
|
||||
m4list="glib.m4 gettext.m4"
|
||||
|
||||
for file in $m4list
|
||||
do
|
||||
if [ ! -f "$acdir/$file" ]; then
|
||||
echo "WARNING: aclocal's directory is $acdir, but..."
|
||||
echo " no file $acdir/$file"
|
||||
echo " You may see fatal macro warnings below."
|
||||
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
|
||||
echo " environment variable to \"-I /some/dir\", or install"
|
||||
echo " $acdir/$file."
|
||||
echo ""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Running gettextize... Ignore non-fatal messages."
|
||||
# Hmm, we specify --force here, since otherwise things dont'
|
||||
# get added reliably, but we don't want to overwrite intl
|
||||
# while making dist.
|
||||
echo "no" | gettextize --copy --force
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
|
||||
# optionally feature autoheader
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
|
||||
|
||||
automake -a $am_opt
|
||||
autoconf
|
||||
cd $ORIGDIR
|
||||
|
||||
$srcdir/configure --enable-maintainer-mode "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile $PROJECT."
|
1087
config.guess
vendored
1087
config.guess
vendored
File diff suppressed because it is too large
Load Diff
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 */
|
1215
config.sub
vendored
1215
config.sub
vendored
File diff suppressed because it is too large
Load Diff
634
configure.in
634
configure.in
@@ -1,634 +0,0 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(gdk/gdktypes.h)
|
||||
|
||||
# In the following, there are a the following variants
|
||||
# of GLib cflags and libs variables
|
||||
#
|
||||
# GLIB_CFLAGS: cflags for compiling libraries and example progs
|
||||
# GLIB_LIBS: libraries for linking example programs
|
||||
# GLIB_DEPLIBS: libraries for linking libraries against
|
||||
# glib_cflags: cflags to store in gtk-config
|
||||
# glib_libs: libs to store in gtk-config
|
||||
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
|
||||
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
|
||||
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
|
||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
#
|
||||
# Making releases:
|
||||
# GTK_MICRO_VERSION += 1;
|
||||
# GTK_INTERFACE_AGE += 1;
|
||||
# GTK_BINARY_AGE += 1;
|
||||
# if any functions have been added, set GTK_INTERFACE_AGE to 0.
|
||||
# if backwards compatibility has been broken,
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
#
|
||||
GTK_MAJOR_VERSION=1
|
||||
GTK_MINOR_VERSION=3
|
||||
GTK_MICRO_VERSION=0
|
||||
GTK_INTERFACE_AGE=0
|
||||
GTK_BINARY_AGE=0
|
||||
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
|
||||
dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_SUBST(GTK_MAJOR_VERSION)
|
||||
AC_SUBST(GTK_MINOR_VERSION)
|
||||
AC_SUBST(GTK_MICRO_VERSION)
|
||||
AC_SUBST(GTK_INTERFACE_AGE)
|
||||
AC_SUBST(GTK_BINARY_AGE)
|
||||
AC_SUBST(GTK_VERSION)
|
||||
|
||||
# libtool versioning
|
||||
LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
|
||||
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
|
||||
LT_REVISION=$GTK_INTERFACE_AGE
|
||||
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
|
||||
AC_SUBST(LT_RELEASE)
|
||||
AC_SUBST(LT_CURRENT)
|
||||
AC_SUBST(LT_REVISION)
|
||||
AC_SUBST(LT_AGE)
|
||||
|
||||
# For automake.
|
||||
VERSION=$GTK_VERSION
|
||||
PACKAGE=gtk+
|
||||
|
||||
# Save this value here, since automake will set cflags later
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
dnl Initialize automake stuff
|
||||
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
|
||||
|
||||
# Specify a configuration file
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Initialize libtool
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl Initialize maintainer mode
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
dnl figure debugging default, prior to $ac_help setup
|
||||
dnl
|
||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
|
||||
debug_default=yes
|
||||
else
|
||||
debug_default=minimum
|
||||
fi
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
dnl declare --enable-* args and collect ac_help strings
|
||||
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
|
||||
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
|
||||
echo $enable_shm, enable_shm="yes")
|
||||
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
|
||||
, enable_ansi=no)
|
||||
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
|
||||
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
|
||||
, enable_xim="yes")
|
||||
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
|
||||
, enable_xim_inst="maybe")
|
||||
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
|
||||
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
|
||||
|
||||
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
|
||||
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
|
||||
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
|
||||
else
|
||||
if test "x$enable_debug" = "xno"; then
|
||||
GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
|
||||
else
|
||||
GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
|
||||
|
||||
# Build time sanity check...
|
||||
AM_SANITY_CHECK
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
|
||||
if test "x$enable_ansi" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-ansi[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -ansi" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-pedantic[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -pedantic" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
|
||||
# define a MAINT-like variable REBUILD which is set if Perl
|
||||
# and awk are found, so autogenerated sources can be rebuilt
|
||||
|
||||
AC_PROG_AWK
|
||||
AC_CHECK_PROGS(PERL, perl5 perl)
|
||||
|
||||
# We would like indent, but don't require it.
|
||||
AC_CHECK_PROG(INDENT, indent, indent)
|
||||
|
||||
REBUILD=\#
|
||||
if test "x$enable_rebuilds" = "xyes" && \
|
||||
test -n "$PERL" && \
|
||||
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
|
||||
test -n "$AWK" ; then
|
||||
REBUILD=
|
||||
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_END=')'
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
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 ru sk sl sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
|
||||
AM_GTK_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
|
||||
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
|
||||
# this is the directory where the *.{mo,gmo} files are installed
|
||||
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
|
||||
AC_SUBST(gtklocaledir)
|
||||
|
||||
dnl The DU4 header files don't provide library prototypes unless
|
||||
dnl -std1 is given to the native cc.
|
||||
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
|
||||
|
||||
gtk_save_LIBS=$LIBS
|
||||
LIBS="$LIBS -lm"
|
||||
AC_TRY_RUN([#include <math.h>
|
||||
int main (void) { return (log(1) != log(1.)); }],
|
||||
AC_MSG_RESULT(none needed),
|
||||
gtk_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -std1"
|
||||
AC_TRY_RUN([#include <math.h>
|
||||
int main (void) { return (log(1) != log(1.)); }],
|
||||
AC_MSG_RESULT(-std1),
|
||||
AC_MSG_RESULT()
|
||||
CFLAGS=$gtk_save_CFLAGS
|
||||
AC_MSG_WARN(
|
||||
[No ANSI prototypes found in library. (-std1 didn't work.)]),
|
||||
true
|
||||
),
|
||||
AC_MSG_RESULT(none needed)
|
||||
)
|
||||
LIBS=$gtk_save_LIBS
|
||||
|
||||
MATH_LIB=-lm
|
||||
GTK_LIBS_EXTRA=
|
||||
AC_MSG_CHECKING(for the BeOS)
|
||||
case $host in
|
||||
*-*-beos*)
|
||||
AC_MSG_RESULT(yes)
|
||||
GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
|
||||
MATH_LIB=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(MATH_LIB)
|
||||
AC_SUBST(GTK_LIBS_EXTRA)
|
||||
|
||||
dnl NeXTStep cc seems to need this
|
||||
AC_MSG_CHECKING([for extra flags for POSIX compliance])
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
AC_MSG_RESULT(none needed),
|
||||
gtk_save_CFLAGS=$CFLAGS
|
||||
CFLAGS="$CFLAGS -posix"
|
||||
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
|
||||
AC_MSG_RESULT(-posix),
|
||||
AC_MSG_RESULT()
|
||||
CFLAGS=$gtk_save_CFLAGS
|
||||
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
|
||||
|
||||
if test x$with_glib = xyes ; then
|
||||
AC_MSG_ERROR([
|
||||
*** Directory must be specified for --with-glib])
|
||||
fi
|
||||
|
||||
if test x$with_glib = x ; then
|
||||
# Look for separately installed glib
|
||||
|
||||
AM_PATH_GLIB(1.3.0,,
|
||||
AC_MSG_ERROR([
|
||||
*** GLIB 1.3.0 or better is required. The latest version of GLIB
|
||||
*** is always available from ftp://ftp.gtk.org/.]),
|
||||
gmodule gthread)
|
||||
|
||||
# we do not want to make all gtk progs to link to thread libraries.
|
||||
glib_cflags=`$GLIB_CONFIG glib gmodule --cflags`
|
||||
glib_thread_cflags="$GLIB_CFLAGS"
|
||||
glib_libs=`$GLIB_CONFIG glib gmodule --libs`
|
||||
glib_thread_libs="$GLIB_LIBS"
|
||||
GLIB_LIBS="$glib_libs"
|
||||
GLIB_DEPLIBS="$glib_libs"
|
||||
else
|
||||
# Use uninstalled glib (assume they got the version right)
|
||||
|
||||
GLIB_CONFIG=$with_glib/glib-config
|
||||
if test -x $GLIB_CONFIG ; then
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
|
||||
fi
|
||||
|
||||
# For use in gtk-config
|
||||
glib_cflags=`$GLIB_CONFIG --cflags gmodule`
|
||||
glib_thread_cflags=`$GLIB_CONFIG --cflags gmodule gthread`
|
||||
glib_libs=`$GLIB_CONFIG --libs gmodule`
|
||||
glib_thread_libs=`$GLIB_CONFIG --libs gmodule gthread`
|
||||
|
||||
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
|
||||
|
||||
# canonicalize relative paths
|
||||
case $with_glib in
|
||||
/*)
|
||||
glib_dir=$with_glib
|
||||
;;
|
||||
*)
|
||||
glib_dir="\$(top_builddir)/$with_glib"
|
||||
;;
|
||||
esac
|
||||
|
||||
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
|
||||
GLIB_LIBS="$glib_dir/libglib.la $glib_dir/gmodule/libgmodule.la"
|
||||
GLIB_DEPLIBS=
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AC_SUBST(glib_cflags)
|
||||
AC_SUBST(glib_libs)
|
||||
AC_SUBST(glib_thread_cflags)
|
||||
AC_SUBST(glib_thread_libs)
|
||||
AC_SUBST(GLIB_DEPLIBS)
|
||||
|
||||
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
|
||||
AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
|
||||
AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
|
||||
|
||||
# Find the X11 include and library directories
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$x_includes" = "x"; then
|
||||
x_includes="/usr/include"
|
||||
fi
|
||||
|
||||
saved_cflags="$CFLAGS"
|
||||
saved_ldflags="$LDFLAGS"
|
||||
|
||||
CFLAGS="$CFLAGS $X_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
||||
|
||||
if test "x$no_x" = "xyes"; then
|
||||
AC_MSG_ERROR([
|
||||
*** X libraries or include files not found. Check 'config.log' for
|
||||
*** more details.])
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
# Check for the X11 library
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
|
||||
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
|
||||
$X_EXTRA_LIBS)
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for the Xext library (needed for XShm extention)
|
||||
AC_CHECK_LIB(Xext, XShmAttach,
|
||||
x_libs="-lXext $x_libs",
|
||||
# On AIX, it is in XextSam instead, but we still need -lXext
|
||||
AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
no_xext_lib=yes, $x_libs),
|
||||
$x_libs)
|
||||
fi
|
||||
|
||||
# Check for shaped window extension
|
||||
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask,
|
||||
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
|
||||
x_libs="-lXext $x_libs"
|
||||
fi
|
||||
AC_DEFINE(HAVE_SHAPE_EXT),
|
||||
,
|
||||
$x_libs)
|
||||
|
||||
# Check for XConvertCase (X11R6 specific)
|
||||
|
||||
AC_CHECK_LIB(X11, XConvertCase,
|
||||
AC_DEFINE(HAVE_XCONVERTCASE),
|
||||
,
|
||||
$x_libs)
|
||||
|
||||
# Check for XIM support.
|
||||
|
||||
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
|
||||
: ,
|
||||
enable_xim_inst="no",
|
||||
$x_libs)
|
||||
|
||||
# On Solaris, calling XRegisterIMInstantiateCallback seems to
|
||||
# cause an immediate segfault, so we disable it, unless
|
||||
# the user specifically forces it to be on.
|
||||
|
||||
if test x$enable_xim_inst = xmaybe ; then
|
||||
case host in
|
||||
*-*-solaris*)
|
||||
enable_xim_inst="no"
|
||||
;;
|
||||
*)
|
||||
enable_xim_inst="yes"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "x$enable_xim" = "xyes"; then
|
||||
GTK_XIM_FLAGS="-DUSE_XIM"
|
||||
if test "x$enable_xim_inst" = "xyes"; then
|
||||
AC_DEFINE(USE_X11R6_XIM)
|
||||
fi
|
||||
fi
|
||||
|
||||
x_cflags="$X_CFLAGS"
|
||||
x_ldflags="$X_LDFLAGS $X_LIBS"
|
||||
|
||||
# set up things for XInput
|
||||
|
||||
if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
|
||||
AC_DEFINE(XINPUT_GXI)
|
||||
xinput_progs=gxid
|
||||
x_libs="-lXi $x_libs"
|
||||
elif test "x$with_xinput" = "xxfree"; then
|
||||
AC_DEFINE(XINPUT_XFREE)
|
||||
x_libs="-lXi $x_libs"
|
||||
else
|
||||
AC_DEFINE(XINPUT_NONE)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
|
||||
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
|
||||
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
AC_SUBST(x_ldflags)
|
||||
AC_SUBST(x_libs)
|
||||
AC_SUBST(xinput_progs)
|
||||
|
||||
if test "x$enable_shm" = "xyes"; then
|
||||
# Check for shared memory
|
||||
AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
|
||||
AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
|
||||
|
||||
# Check for the X shared memory extension header file
|
||||
AC_MSG_CHECKING(X11/extensions/XShm.h)
|
||||
if test "x$no_xext_lib" = "xyes"; then
|
||||
AC_MSG_RESULT(no)
|
||||
no_xshm=yes
|
||||
else
|
||||
if test -f "$x_includes/X11/extensions/XShm.h"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_XSHM_H)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
no_xshm=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if X_LOCALE definition is necessary
|
||||
|
||||
AC_MSG_CHECKING(need -DX_LOCALE)
|
||||
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return setlocale (LC_ALL, "${with_locale}") == NULL;
|
||||
}],
|
||||
need_x_locale=no,
|
||||
need_x_locale=yes,
|
||||
need_x_locale=no)
|
||||
AC_MSG_RESULT($need_x_locale)
|
||||
|
||||
if test $need_x_locale = yes; then
|
||||
GTK_LOCALE_FLAGS="-DX_LOCALE"
|
||||
fi
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
# Checks for library functions.
|
||||
AC_TYPE_SIGNAL
|
||||
AC_FUNC_MMAP
|
||||
|
||||
# Check if <sys/select.h> needs to be included for fd_set
|
||||
AC_MSG_CHECKING([for fd_set])
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],
|
||||
[fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
|
||||
if test $gtk_ok = yes; then
|
||||
AC_MSG_RESULT([yes, found in sys/types.h])
|
||||
else
|
||||
AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
|
||||
if test $gtk_ok = yes; then
|
||||
AC_DEFINE(HAVE_SYS_SELECT_H)
|
||||
AC_MSG_RESULT([yes, found in sys/select.h])
|
||||
else
|
||||
AC_DEFINE(NO_FD_SET)
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
# `widechar' tests for gdki18n.h
|
||||
AC_MSG_CHECKING(for wchar.h)
|
||||
AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
|
||||
if test $gdk_wchar_h = yes; then
|
||||
AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wchar_h)
|
||||
|
||||
# Check for wctype.h (for iswalnum)
|
||||
AC_MSG_CHECKING(for wctype.h)
|
||||
AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
|
||||
if test $gdk_wctype_h = yes; then
|
||||
AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_wctype_h)
|
||||
|
||||
# in Solaris 2.5, `iswalnum' is in -lw
|
||||
GDK_WLIBS=
|
||||
AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
|
||||
|
||||
oLIBS="$LIBS"
|
||||
LIBS="$LIBS $GDK_WLIBS"
|
||||
# The following is necessary for Linux libc-5.4.38
|
||||
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
|
||||
AC_TRY_LINK([#include <stdlib.h>],[
|
||||
#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
|
||||
# ifdef HAVE_WCTYPE_H
|
||||
# include <wctype.h>
|
||||
# else
|
||||
# ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
|
||||
#endif
|
||||
iswalnum((wchar_t) 0);
|
||||
], gdk_working_wctype=yes, gdk_working_wctype=no)
|
||||
LIBS="$oLIBS"
|
||||
|
||||
if test $gdk_working_wctype = no; then
|
||||
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
|
||||
GDK_WLIBS=
|
||||
fi
|
||||
AC_MSG_RESULT($gdk_working_wctype)
|
||||
AC_SUBST(GDK_WLIBS)
|
||||
|
||||
AC_SUBST(GTK_DEBUG_FLAGS)
|
||||
AC_SUBST(GTK_XIM_FLAGS)
|
||||
AC_SUBST(GTK_LOCALE_FLAGS)
|
||||
|
||||
AC_OUTPUT_COMMANDS([
|
||||
|
||||
## Generate `gdk/gdkconfig.h' in two cases
|
||||
## 1. `config.status' is run either explicitly, or via configure.
|
||||
## Esp. not when it is run in `Makefile' to generate makefiles and
|
||||
## config.h
|
||||
## 2. CONFIG_OTHER is set explicitly
|
||||
##
|
||||
## Case 1 is difficult. We know that `automake' sets one of
|
||||
## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
|
||||
## only when AM_CONFIG_HEADER is set, however.
|
||||
|
||||
if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
|
||||
# Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
|
||||
CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
|
||||
fi
|
||||
case "$CONFIG_OTHER" in
|
||||
*gdk/gdkconfig.h*)
|
||||
echo creating gdk/gdkconfig.h
|
||||
outfile=gdkconfig.h-tmp
|
||||
cat > $outfile <<\_______EOF
|
||||
/* gdkconfig.h
|
||||
*
|
||||
* This is a generated file. Please modify `configure.in'
|
||||
*/
|
||||
|
||||
#ifndef GDKCONFIG_H
|
||||
#define GDKCONFIG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
$gdk_windowing
|
||||
$gdk_wc
|
||||
_______EOF
|
||||
|
||||
cat >>$outfile <<_______EOF
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* GDKCONFIG_H */
|
||||
_______EOF
|
||||
|
||||
|
||||
if cmp -s $outfile gdk/gdkconfig.h; then
|
||||
echo gdk/gdkconfig.h is unchanged
|
||||
rm -f $outfile
|
||||
else
|
||||
mv $outfile gdk/gdkconfig.h
|
||||
fi ;;
|
||||
esac
|
||||
],[
|
||||
# Currently we always use X11 on those systems where we run configure...
|
||||
gdk_windowing='
|
||||
#define GDK_WINDOWING_X11'
|
||||
if test x$gdk_wchar_h = xyes; then
|
||||
gdk_wc='
|
||||
#define GDK_HAVE_WCHAR_H 1'
|
||||
fi
|
||||
if test x$gdk_wctype_h = xyes; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_WCTYPE_H 1"
|
||||
fi
|
||||
if test x$gdk_working_wctype = xno; then
|
||||
gdk_wc="\$gdk_wc
|
||||
#define GDK_HAVE_BROKEN_WCTYPE 1"
|
||||
fi
|
||||
|
||||
|
||||
])
|
||||
|
||||
AC_OUTPUT([
|
||||
gtk+.spec
|
||||
docs/gtk-config.1
|
||||
Makefile
|
||||
gtk-config
|
||||
po/Makefile.in
|
||||
docs/Makefile
|
||||
gdk/Makefile
|
||||
gdk/x11/Makefile
|
||||
gdk/win32/Makefile
|
||||
gtk/Makefile
|
||||
gtk/gtkfeatures.h
|
||||
gtk/gtkcompat.h
|
||||
], [chmod +x gtk-config])
|
18
debian/README.debian
vendored
18
debian/README.debian
vendored
@@ -1,18 +0,0 @@
|
||||
libgtk1 for Debian
|
||||
----------------------
|
||||
|
||||
The GIMP Tool Kit (gtk) is a set of widgets to help you program
|
||||
programs for the X Windowing System easily and powerfully.
|
||||
|
||||
gtk is the moving force behind The GNU Image Manipulation Program (The
|
||||
GIMP) -- the number one freely-available image editing and creation
|
||||
program available.
|
||||
|
||||
gtk is rapidly under development, and the source tree has officially
|
||||
been separated from The GIMP now, as other teams of programmers
|
||||
are beginning to write software using its great widget set -- like
|
||||
GNOME, a desktop interface for X, and gzilla, a freely available
|
||||
web browser for X.
|
||||
|
||||
Ben Gertzfield <che@debian.org>, Mon, 29 Sep 1997 13:11:45 -0700
|
||||
|
62
debian/build
vendored
62
debian/build
vendored
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Adjust debian/changelog and build a new
|
||||
# Debian package of a CVS archive.
|
||||
|
||||
# Written 17 November 1998 by Ben Gertzfield
|
||||
# <che@debian.org>
|
||||
|
||||
# This work is released under the GNU
|
||||
# General Public License, version 2 or
|
||||
# later.
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use File::Copy;
|
||||
|
||||
my $maintainer = 'Ben Gertzfield <che@debian.org>';
|
||||
|
||||
my @date = localtime;
|
||||
|
||||
my $datestr = sprintf("%d%.2d%.2d", $date[5] + 1900, $date[4] + 1, $date[3]);
|
||||
my $revision = '01';
|
||||
|
||||
open (CHANGELOG, 'debian/changelog') or die "Couldn't open debian/changelog: $!\n";
|
||||
|
||||
$_ = <CHANGELOG>;
|
||||
chomp;
|
||||
|
||||
close CHANGELOG;
|
||||
|
||||
my ($package, $last_date, $last_revision) = /^(.*?) \((.*?)\.(.*)?\)/;
|
||||
|
||||
if ($last_date eq $datestr) {
|
||||
$revision = sprintf("%.2d", $last_revision + 1);
|
||||
}
|
||||
|
||||
my $new_version = "$datestr.$revision";
|
||||
|
||||
copy('debian/changelog', 'debian/changelog.old') or die "Couldn't copy debian/changelog to debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWCHANGELOG, ">debian/changelog") or die "Couldn't open debian/changelog for writing: $!\n";
|
||||
|
||||
print NEWCHANGELOG "$package ($new_version) unstable; urgency=low\n\n * CVS snapshot build at " . scalar localtime() . "\n\n -- $maintainer " . `date -R` . "\n";
|
||||
|
||||
open(OLDCHANGELOG, "debian/changelog.old") or die "Couldn't open debian/changelog.old: $!\n";
|
||||
|
||||
while (<OLDCHANGELOG>) {
|
||||
print NEWCHANGELOG;
|
||||
}
|
||||
|
||||
close OLDCHANGELOG;
|
||||
close NEWCHANGELOG;
|
||||
|
||||
unlink('debian/changelog.old') or die "Couldn't unlink debian/changelog.old: $!\n";
|
||||
|
||||
open(NEWVERSION, '>debian/version') or die "Couldn't open debian/version for writing: $!\n";
|
||||
print NEWVERSION "$new_version\n";
|
||||
close NEWVERSION;
|
||||
|
||||
system('dpkg-buildpackage -b -rfakeroot -us -uc');
|
||||
unlink 'debian/version' or die "Couldn't unlink debian/version: $!\n";
|
||||
|
10
debian/changelog
vendored
10
debian/changelog
vendored
@@ -1,10 +0,0 @@
|
||||
gtk+-cvs (19981116.01) unstable; urgency=low
|
||||
|
||||
* First test build from CVS
|
||||
|
||||
-- Ben Gertzfield <che@debian.org> Tue, 17 Nov 1998 12:02:13 -0800
|
||||
|
||||
Local variables:
|
||||
mode: debian-changelog
|
||||
add-log-mailing-address: "che@debian.org"
|
||||
End:
|
81
debian/control
vendored
81
debian/control
vendored
@@ -1,81 +0,0 @@
|
||||
Source: gtk+-cvs
|
||||
Priority: extra
|
||||
Section: libs
|
||||
Maintainer: Ben Gertzfield <che@debian.org>
|
||||
Standards-Version: 2.4.0.0
|
||||
|
||||
Package: libgtk-cvs-1.1
|
||||
Architecture: any
|
||||
Section: libs
|
||||
Depends: ${shlibs:Depends}
|
||||
Conflicts: libgtk-dev (<< 1:1.0.2), libgtk1.1
|
||||
Description: CVS build of the GIMP Toolkit set of widgets for X
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
The GIMP Toolkit is a freely available set of widgets for X.
|
||||
GTK is easy to use, and has been implemented in such projects as
|
||||
The GNU Image Manipulation Program (The GIMP), GNOME, a GNU
|
||||
desktop set of utilities for X, and gzilla, a GNU web-browser.
|
||||
.
|
||||
This is the unstable 1.1 branch of GTK. It is not intended for use
|
||||
with stable projects!
|
||||
|
||||
Package: libgtk-cvs-dev
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (=${Source-Version}), libglib-cvs-dev
|
||||
Suggests: libgtk-cvs-doc
|
||||
Provides: libgtk1.1-dev
|
||||
Replaces: libgtk1.1-dev
|
||||
Conflicts: libgtk-dev, libgtk1 (<< 1:1.0.4), libgtk1.1-dev
|
||||
Description: CVS build of development files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the header files and static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to develop your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to compile your own plug-ins for
|
||||
The GIMP.
|
||||
|
||||
Package: libgtk-cvs-doc
|
||||
Architecture: all
|
||||
Section: doc
|
||||
Conflicts: libgtk-dev (<< 1:0.99.4), libgtk-doc, libgtk1.1-doc
|
||||
Description: CVS build of documentation for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains lots of info-files, HTML docs, FAQs, and
|
||||
other handy documentation about the GIMP Toolkit set of widgets
|
||||
for X.
|
||||
.
|
||||
This package documents the unstable 1.1 release of the GIMP Toolkit.
|
||||
.
|
||||
Install this package if you want to have lots of info about the
|
||||
GIMP toolkit when you're programming.
|
||||
|
||||
Package: libgtk-cvs-dbg
|
||||
Architecture: any
|
||||
Section: devel
|
||||
Depends: libgtk-cvs-1.1 (= ${Source-Version}), libgtk-cvs-dev (= ${Source-Version})
|
||||
Suggests: libgtk-cvs-doc
|
||||
Conflicts: libgtk1.1-dbg
|
||||
Description: CVS build of debugging files for the GIMP Toolkit
|
||||
**THIS IS NOT AN OFFICIAL DEBIAN PACKAGE! THIS IS AN AUTOMATED CVS
|
||||
BUILD OF THE GTK+ LIBRARIES! BEWARE! IT MAY NOT WORK!**
|
||||
.
|
||||
This package contains the debugging static libraries for the
|
||||
GIMP Toolkit set of widgets for X.
|
||||
.
|
||||
This is the unstable, 1.1 branch of GTK+. This is not intended for
|
||||
use with stable releases of programs!
|
||||
.
|
||||
Install this package if you wish to debug your own X programs using
|
||||
the GIMP Toolkit 1.1, or if you wish to debug your own plug-ins for
|
||||
The GIMP.
|
8
debian/copyright
vendored
8
debian/copyright
vendored
@@ -1,8 +0,0 @@
|
||||
This package was debianized by Ben Gertzfield <che@debian.org> on
|
||||
Tue, 17 Nov 1998 12:07:17 -0800
|
||||
|
||||
It was produced from the CVS repository at cvs.gimp.org.
|
||||
|
||||
It may be redistributed under the terms of the GNU LGPL, Version 2 or
|
||||
later, found on Debian systems in the file /usr/doc/copyright/LGPL.
|
||||
|
9
debian/libgtk-cvs-dev.files
vendored
9
debian/libgtk-cvs-dev.files
vendored
@@ -1,9 +0,0 @@
|
||||
usr/lib/libgdk.so
|
||||
usr/lib/libgdk.a
|
||||
usr/lib/libgtk.so
|
||||
usr/lib/libgtk.a
|
||||
usr/include/gdk/
|
||||
usr/include/gtk/
|
||||
usr/bin/gtk-config
|
||||
usr/man/man1/gtk-config.1
|
||||
usr/share/aclocal/gtk.m4
|
5
debian/libgtk-cvs-dev.postinst
vendored
5
debian/libgtk-cvs-dev.postinst
vendored
@@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
#DEBHELPER#
|
6
debian/libgtk-cvs-dev.prerm
vendored
6
debian/libgtk-cvs-dev.prerm
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
|
||||
#DEBHELPER#
|
8
debian/libgtk-cvs-doc.files
vendored
8
debian/libgtk-cvs-doc.files
vendored
@@ -1,8 +0,0 @@
|
||||
usr/info/gdk.info
|
||||
usr/info/gtk.info
|
||||
usr/info/gtk.info-1
|
||||
usr/info/gtk.info-2
|
||||
usr/info/gtk.info-3
|
||||
usr/info/gtk.info-4
|
||||
usr/info/gtk.info-5
|
||||
|
11
debian/libgtk-cvs-doc.postinst
vendored
11
debian/libgtk-cvs-doc.postinst
vendored
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
install-info --quiet --description="The GIMP Toolkit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gtk.info.gz
|
||||
|
||||
install-info --quiet --description="The GIMP Drawing Kit." \
|
||||
--section "The GIMP" "The GIMP" /usr/info/gdk.info.gz
|
||||
|
||||
#DEBHELPER#
|
7
debian/libgtk-cvs-doc.prerm
vendored
7
debian/libgtk-cvs-doc.prerm
vendored
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
install-info --quiet --remove gtk
|
||||
install-info --quiet --remove gdk
|
||||
|
||||
#DEBHELPER#
|
7
debian/postinst
vendored
7
debian/postinst
vendored
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
ldconfig
|
||||
|
||||
#DEBHELPER#
|
160
debian/rules
vendored
160
debian/rules
vendored
@@ -1,160 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# debian/rules file for gtk+ Debian package
|
||||
# written April 1998 by Ben Gertzfield <che@debian.org
|
||||
|
||||
build: build-stamp
|
||||
build-stamp:
|
||||
dh_testdir
|
||||
./autogen.sh --prefix=/usr --with-xinput=xfree
|
||||
$(MAKE)
|
||||
cd docs && make distdocs
|
||||
cd ..
|
||||
touch build-stamp
|
||||
|
||||
build-dbg: build-dbg-stamp
|
||||
build-dbg-stamp:
|
||||
dh_testdir
|
||||
./configure --prefix=/usr --with-xinput=xfree --enable-debug=yes
|
||||
$(MAKE)
|
||||
touch build-dbg-stamp
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean
|
||||
|
||||
clean-dbg:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp build-dbg-stamp install-stamp install-dbg-stamp
|
||||
# Add here commands to clean up after the build process.
|
||||
-$(MAKE) clean
|
||||
cd docs
|
||||
-$(MAKE) maintainer-clean
|
||||
cd ..
|
||||
-$(MAKE) distclean
|
||||
find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
|
||||
dh_clean -k
|
||||
|
||||
install: install-stamp
|
||||
install-stamp: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
$(MAKE) prefix=`pwd`/debian/tmp/usr install
|
||||
touch install-stamp
|
||||
|
||||
install-dbg: install-dbg-stamp
|
||||
install-dbg-stamp: build-dbg
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
$(MAKE) prefix=`pwd`/debian/libgtk-cvs-dbg/usr install
|
||||
touch install-dbg-stamp
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install libgtk-cvs-doc
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install libgtk-cvs-dev libgtk-cvs-1.1 libgtk-cvs-dbg
|
||||
|
||||
libgtk-cvs-1.1: build
|
||||
dh_testdir -plibgtk-cvs-1.1
|
||||
dh_testroot -plibgtk-cvs-1.1
|
||||
dh_installdirs -plibgtk-cvs-1.1
|
||||
# Add here commands to install the files into debian/tmp
|
||||
rm -rf debian/tmp/usr/bin debian/tmp/usr/include debian/tmp/usr/info debian/tmp/usr/lib/glib debian/tmp/usr/share/aclocal debian/tmp/usr/man debian/tmp/usr/lib/*.la
|
||||
dh_installdocs -plibgtk-cvs-1.1
|
||||
dh_installchangelogs -plibgtk-cvs-1.1
|
||||
dh_strip -plibgtk-cvs-1.1
|
||||
dh_compress -plibgtk-cvs-1.1
|
||||
dh_fixperms -plibgtk-cvs-1.1
|
||||
dh_installdeb -plibgtk-cvs-1.1
|
||||
dh_shlibdeps -plibgtk-cvs-1.1
|
||||
dh_gencontrol -plibgtk-cvs-1.1
|
||||
dh_makeshlibs -plibgtk-cvs-1.1 -V 'libgtk-cvs-1.1 (='`cat debian/version`')'
|
||||
dh_md5sums -plibgtk-cvs-1.1
|
||||
dh_builddeb -plibgtk-cvs-1.1
|
||||
|
||||
libgtk-cvs-dev: build
|
||||
dh_testdir -plibgtk-cvs-dev
|
||||
dh_testroot -plibgtk-cvs-dev
|
||||
dh_clean -plibgtk-cvs-dev -k
|
||||
dh_installdirs -plibgtk-cvs-dev
|
||||
# Add here commands to install the files into debian/tmp
|
||||
dh_movefiles -plibgtk-cvs-dev
|
||||
cp gtk-config debian/tmp/usr/bin
|
||||
dh_installdocs -plibgtk-cvs-dev
|
||||
dh_installchangelogs -plibgtk-cvs-dev
|
||||
dh_strip -plibgtk-cvs-dev
|
||||
dh_compress -plibgtk-cvs-dev
|
||||
dh_fixperms -plibgtk-cvs-dev
|
||||
dh_installdeb -plibgtk-cvs-dev
|
||||
dh_shlibdeps -plibgtk-cvs-dev
|
||||
dh_gencontrol -plibgtk-cvs-dev
|
||||
dh_md5sums -plibgtk-cvs-dev
|
||||
dh_builddeb -plibgtk-cvs-dev
|
||||
|
||||
libgtk-cvs-doc:
|
||||
dh_testdir -plibgtk-cvs-doc
|
||||
dh_testroot -plibgtk-cvs-doc
|
||||
dh_clean -plibgtk-cvs-doc -k
|
||||
dh_installdirs -plibgtk-cvs-doc usr/doc/libgtk-cvs-doc/faq-html \
|
||||
usr/doc/libgtk-cvs-doc/tutorial-html usr/doc/libgtk-cvs-doc/italian-tutorial-html usr/doc/libgtk-cvs-doc/french-tutorial-html usr/doc/libgtk-cvs-doc/gdk-html
|
||||
dh_movefiles -plibgtk-cvs-doc
|
||||
cp docs/html/gtkfaq*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/faq-html
|
||||
cp docs/html/gtk_tut-*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/tutorial-html
|
||||
cp docs/html/gtk_tut_it*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/italian-tutorial-html
|
||||
cp docs/html/gtk_tut_fr*.html debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/*.gif debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/french-tutorial-html
|
||||
cp docs/html/gdk* debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/gdk-html
|
||||
cp docs/text/*.txt debian/libgtk-cvs-doc/usr/doc/libgtk-cvs-doc/
|
||||
|
||||
dh_installdocs -plibgtk-cvs-doc docs/{debugging,developers,styles,text_widget,widget_system,gtk-config,refcounting}.txt TODO NEWS
|
||||
dh_installchangelogs -plibgtk-cvs-doc
|
||||
dh_strip -plibgtk-cvs-doc
|
||||
dh_compress -plibgtk-cvs-doc
|
||||
dh_fixperms -plibgtk-cvs-doc
|
||||
dh_installdeb -plibgtk-cvs-doc
|
||||
dh_shlibdeps -plibgtk-cvs-doc
|
||||
dh_gencontrol -plibgtk-cvs-doc
|
||||
dh_md5sums -plibgtk-cvs-doc
|
||||
dh_builddeb -plibgtk-cvs-doc
|
||||
|
||||
libgtk-cvs-dbg: clean-dbg install-dbg
|
||||
dh_testdir -plibgtk-cvs-dbg
|
||||
dh_testroot -plibgtk-cvs-dbg
|
||||
dh_installdirs -plibgtk-cvs-dbg
|
||||
# Add here commands to install the files into debian/libgtk-cvs-dbg
|
||||
rm -rf debian/libgtk-cvs-dbg/usr/bin debian/libgtk-cvs-dbg/usr/include debian/libgtk-cvs-dbg/usr/info debian/libgtk-cvs-dbg/usr/lib/glib debian/libgtk-cvs-dbg/usr/man debian/libgtk-cvs-dbg/usr/share debian/libgtk-cvs-dbg/usr/lib/*.{la,so*}
|
||||
for file in `find debian/libgtk-cvs-dbg/usr/lib -name '*.a'` ; do \
|
||||
mv $$file debian/libgtk-cvs-dbg/usr/lib/`basename $$file .a`_g.a; \
|
||||
done
|
||||
dh_installdocs -plibgtk-cvs-dbg
|
||||
dh_installchangelogs -plibgtk-cvs-dbg
|
||||
dh_compress -plibgtk-cvs-dbg
|
||||
dh_fixperms -plibgtk-cvs-dbg
|
||||
dh_installdeb -plibgtk-cvs-dbg
|
||||
dh_shlibdeps -plibgtk-cvs-dbg
|
||||
dh_gencontrol -plibgtk-cvs-dbg
|
||||
dh_md5sums -plibgtk-cvs-dbg
|
||||
dh_builddeb -plibgtk-cvs-dbg
|
||||
|
||||
source diff:
|
||||
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary
|
@@ -1,22 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.html
|
||||
*.info*
|
||||
*.dvi
|
||||
*.ps
|
||||
*.pg
|
||||
*.ky
|
||||
*.cp
|
||||
*.fn
|
||||
*.tp
|
||||
*.vr
|
||||
*.log
|
||||
*.aux
|
||||
*.toc
|
||||
*.cps
|
||||
*.fns
|
||||
*.vrs
|
||||
html
|
||||
text
|
||||
texinfo.tex
|
||||
gtk-config.1
|
@@ -1,274 +0,0 @@
|
||||
Incompatible Changes from GTK+-1.0 to GTK+-1.2:
|
||||
|
||||
* GtkAcceleratorTable has been replaced with GtkAccelGroup
|
||||
|
||||
* GtkMenuFactory has been replaced with GtkItemFactory, although
|
||||
a version of GtkMenuFactory is currently still provided to ease
|
||||
the migration phase.
|
||||
|
||||
* The GtkTypeInfo structures used in the gtk_*_type_init() functions have
|
||||
changed a bit, the old format:
|
||||
GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
(GtkArgSetFunc) NULL,
|
||||
(GtkArgGetFunc) NULL,
|
||||
};
|
||||
|
||||
needs to be converted to:
|
||||
|
||||
static const GtkTypeInfo bin_info =
|
||||
{
|
||||
"GtkBin",
|
||||
sizeof (GtkBin),
|
||||
sizeof (GtkBinClass),
|
||||
(GtkClassInitFunc) gtk_bin_class_init,
|
||||
(GtkObjectInitFunc) gtk_bin_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
};
|
||||
|
||||
the GtkArgSetFunc and GtkArgGetFunc functions are not supported from the
|
||||
type system anymore, and you should make sure that your code only fills
|
||||
in these fields with NULL and doesn't use the deprecated function typedefs
|
||||
(GtkArgSetFunc) and (GtkArgGetFunc) anymore.
|
||||
|
||||
* A number of Gtk functions were renamed. For compatibility, gtkcompat.h
|
||||
#define's the old 1.0.x function names in terms of the new names.
|
||||
To assure your Gtk program doesn't rely on outdated function
|
||||
variants, compile your program with -DGTK_DISABLE_COMPAT_H to disable
|
||||
the compatibility aliases.
|
||||
|
||||
Here is the list of the old names and replacements:
|
||||
|
||||
Old: Replacement:
|
||||
|
||||
gtk_accel_label_accelerator_width gtk_accel_label_get_accel_width
|
||||
gtk_check_menu_item_set_state gtk_check_menu_item_set_active
|
||||
gtk_container_border_width gtk_container_set_border_width
|
||||
gtk_label_set gtk_label_set_text
|
||||
gtk_notebook_current_page gtk_notebook_get_current_page
|
||||
gtk_packer_configure gtk_packer_set_child_packing
|
||||
gtk_paned_gutter_size gtk_paned_set_gutter_size
|
||||
gtk_paned_handle_size gtk_paned_set_handle_size
|
||||
gtk_scale_value_width gtk_scale_get_value_width
|
||||
gtk_style_apply_default_pixmap gtk_style_apply_default_background (1)
|
||||
gtk_toggle_button_set_state gtk_toggle_button_set_active
|
||||
gtk_window_position gtk_window_set_position
|
||||
|
||||
(1) gtk_style_apply_default_background() has an additional
|
||||
argument, gboolean set_bg. This parameter should be FALSE if
|
||||
the background is being set for a NO_WINDOW widget, otherwise
|
||||
true.
|
||||
|
||||
* During the development phase of the 1.1.x line of Gtk certain functions
|
||||
were deprecated and later removed. Functions affected are:
|
||||
|
||||
Removed: Replacement:
|
||||
gtk_clist_set_border gtk_clist_set_shadow_type
|
||||
gtk_container_block_resize gtk_container_set_resize_mode
|
||||
gtk_container_unblock_resize gtk_container_set_resize_mode
|
||||
gtk_container_need_resize gtk_container_check_resize
|
||||
gtk_ctree_show_stub gtk_ctree_set_show_stub
|
||||
gtk_ctree_set_reorderable gtk_clist_set_reorderable
|
||||
gtk_ctree_set_use_drag_icons gtk_clist_set_use_drag_icons
|
||||
gtk_entry_adjust_scroll (1)
|
||||
gtk_object_class_add_user_signal gtk_object_class_user_signal_new
|
||||
gtk_preview_put_row gtk_preview_put
|
||||
gtk_progress_bar_construct gtk_progress_set_adjustment
|
||||
gtk_scrolled_window_construct gtk_scrolled_window_set_{h|v}adjustment
|
||||
gtk_spin_button_construct gtk_spin_button_configure
|
||||
gtk_widget_thaw_accelerators gtk_widget_unlock_accelerators
|
||||
gtk_widget_freeze_accelerators gtk_widget_lock_accelerators
|
||||
|
||||
(1) This function is no longer needed as GtkEntry should automatically
|
||||
keep the scroll adjusted properly.
|
||||
|
||||
* Additionally, all gtk_*_interp functions were removed.
|
||||
gtk_*_full versions were provided as of GTK+-1.0 and should
|
||||
be used instead.
|
||||
|
||||
* GtkButton has been changed to derive from GtkBin.
|
||||
To access a button's child, use GTK_BIN (button)->child, instead
|
||||
of the old GTK_BUTTON (button)->child.
|
||||
|
||||
* The selection API has been slightly modified:
|
||||
|
||||
gtk_selection_add_handler() and gtk_selection_add_handler_full()
|
||||
have been removed. To supply the selection, one now register
|
||||
the targets one is interested in with:
|
||||
|
||||
void gtk_selection_add_target (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GdkAtom target,
|
||||
guint info);
|
||||
|
||||
or:
|
||||
|
||||
void gtk_selection_add_targets (GtkWidget *widget,
|
||||
GdkAtom selection,
|
||||
GtkTargetEntry *targets,
|
||||
guint ntargets);
|
||||
|
||||
When a request for a selection is received, the new "selection_get"
|
||||
signal will be called:
|
||||
|
||||
void "selection_get" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint info,
|
||||
guint time);
|
||||
|
||||
A "time" parameter has also been added to the "selection_received"
|
||||
signal.
|
||||
|
||||
void "selection_received" (GtkWidget *widget,
|
||||
GtkSelectionData *selection_data,
|
||||
guint time);
|
||||
|
||||
* The old drag and drop API has been completely removed and replaced.
|
||||
See the reference documentation for details on the new API.
|
||||
|
||||
* Support for Themes has been added. In general, this does
|
||||
not affect application code, however, a few new rules should
|
||||
be observed:
|
||||
|
||||
- To set a shape for a window, you must use
|
||||
gtk_widget_shape_combine_mask() instead of
|
||||
gdk_window_shape_combine_mask(), or the shape will be
|
||||
reset when switching themes.
|
||||
|
||||
- It is no longer permissable to draw directly on an arbitrary
|
||||
widget, or to set an arbitrary widget's background pixmap.
|
||||
If you need to do that, use a GtkDrawingArea or (for a
|
||||
toplevel) the new GtkDrawWindow widget.
|
||||
|
||||
* The ScrolledWindow widget no longer creates a Viewport
|
||||
automatically. Instead, it has been generalized to accept
|
||||
any "self-scrolling" widget.
|
||||
|
||||
The self-scrolling widgets in the Gtk+ core are GtkViewport,
|
||||
GtkCList, GtkCTree, GtkText, and GtkLayout. All of these widgets can
|
||||
be added to a scrolled window as normal children with
|
||||
gtk_container_add() and scrollbars will be set up automatically.
|
||||
|
||||
To add scrollbars to a non self-scrolling widget, (such as a GtkList),
|
||||
first add it to a viewport, then add the viewport to a scrolled window.
|
||||
The scrolled window code provides a convenience function to do this:
|
||||
|
||||
void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrollwin,
|
||||
GtkWidget *child);
|
||||
|
||||
This does exactly what it says - it creates a Viewport, adds the child
|
||||
widget to it, then adds the Viewport to the scrolled window.
|
||||
|
||||
The scrollbars have been removed from the GtkCList and GtkCTree,
|
||||
because they are now scrolled by simply adding them to a Scrolled
|
||||
Window. The scrollbar policy is set on the scrolled window with
|
||||
gtk_scrolled_window_set_policy() and not on the child widgets
|
||||
(e.g. GtkCList's gtk_clist_set_policy() was removed).
|
||||
|
||||
* The "main loop" of GTK+ has been moved to GLib. This should not
|
||||
affect existing programs, since compatibility functions have
|
||||
been provided. However, you may want to consider migrating
|
||||
your code to use the GLib main loop directly.
|
||||
|
||||
* the GTK_BASIC flag was removed, and with it the corresponding
|
||||
macro and function GTK_WIDGET_BASIC() and gtk_widget_basic().
|
||||
|
||||
* All freeze/thaw methods are now recursive - that is, if you
|
||||
freeze a widget n times, you must also thaw it n times.
|
||||
|
||||
Therefore, if you have code like:
|
||||
|
||||
gboolean frozen;
|
||||
frozen = GTK_CLIST_FROZEN (clist);
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
if (!frozen)
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
it will not work anymore. It must be, simply:
|
||||
|
||||
gtk_clist_freeze (clist);
|
||||
[...]
|
||||
gtk_clist_thaw (clist);
|
||||
|
||||
* The thread safety in GTK+ 1.2 is slightly different than
|
||||
that which appeared in early versions in the 1.1
|
||||
development track. The main difference is that it relies on
|
||||
the thread primitives in GLib, and on the thread-safe
|
||||
GLib main loop.
|
||||
|
||||
This means:
|
||||
|
||||
- You must call g_thread_init() before executing any
|
||||
other GTK+ or GDK functions in a threaded GTK+ program.
|
||||
|
||||
- Idles, timeouts, and input functions are executed outside
|
||||
of the main GTK+ lock. So, if you need to call GTK+
|
||||
inside of such a callback, you must surround the callback
|
||||
with a gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
[ However, signals are still executed within the main
|
||||
GTK+ lock ]
|
||||
|
||||
In particular, this means, if you are writing widgets
|
||||
that might be used in threaded programs, you _must_
|
||||
surround timeouts and idle functions in this matter.
|
||||
|
||||
As always, you must also surround any calls to GTK+
|
||||
not made within a signal handler with a
|
||||
gdk_threads_enter()/gdk_threads_leave() pair.
|
||||
|
||||
- There is no longer a special --with-threads configure
|
||||
option for GTK+. To use threads in a GTK+ program, you
|
||||
must:
|
||||
|
||||
a) If you want to use the native thread implementation,
|
||||
make sure GLib found this in configuration, otherwise,
|
||||
call you must provide a thread implementation to
|
||||
g_thread_init().
|
||||
|
||||
b) Link with the libraries returned by:
|
||||
|
||||
gtk-config --libs gthread
|
||||
|
||||
and use the cflags from:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
You can get these CFLAGS and LIBS by passing gthread
|
||||
as the fourth parameter to the AM_PATH_GTK automake
|
||||
macro.
|
||||
|
||||
* Prior to GTK+-1.2, there were two conflicting interpretations
|
||||
of widget->requistion. It was either taken to be
|
||||
the size that the widget requested, or that size
|
||||
modified by calls to gtk_widget_set_usize(). In GTK+-1.2,
|
||||
it is always interpreted the first way.
|
||||
|
||||
Container widgets are affected in two ways by this:
|
||||
|
||||
1) Container widgets should not pass widget->requisition
|
||||
as the second parameter to gtk_widget_size_request().
|
||||
Instead they should call it like:
|
||||
|
||||
GtkRequisition child_requisition;
|
||||
gtk_widget_size_request (widget, &child_requisition);
|
||||
|
||||
2) Container widgets should not access child->requisition
|
||||
directly. Either they should use the values returned
|
||||
by gtk_widget_size_request(), or they should call
|
||||
the new function:
|
||||
|
||||
void gtk_widget_get_child_requisition (GtkWidget *widget,
|
||||
GtkRequisition *requisition);
|
||||
|
||||
which returns the requisition of the given widget, modified
|
||||
by calls to gtk_widget_set_usize().
|
||||
|
@@ -1,21 +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.
|
201
docs/Makefile.am
201
docs/Makefile.am
@@ -1,201 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
info_TEXINFOS = gdk.texi gtk.texi
|
||||
|
||||
man_MANS = gtk-config.1
|
||||
|
||||
TUTORIAL_FR_FILES=html/gtk_tut_fr-1.html \
|
||||
html/gtk_tut_fr-2.html \
|
||||
html/gtk_tut_fr-3.html \
|
||||
html/gtk_tut_fr-4.html \
|
||||
html/gtk_tut_fr-5.html \
|
||||
html/gtk_tut_fr-6.html \
|
||||
html/gtk_tut_fr-7.html \
|
||||
html/gtk_tut_fr-8.html \
|
||||
html/gtk_tut_fr-9.html \
|
||||
html/gtk_tut_fr-10.html \
|
||||
html/gtk_tut_fr-11.html \
|
||||
html/gtk_tut_fr-12.html \
|
||||
html/gtk_tut_fr-13.html \
|
||||
html/gtk_tut_fr-14.html \
|
||||
html/gtk_tut_fr-15.html \
|
||||
html/gtk_tut_fr-16.html \
|
||||
html/gtk_tut_fr-17.html \
|
||||
html/gtk_tut_fr-18.html \
|
||||
html/gtk_tut_fr-19.html \
|
||||
html/gtk_tut_fr-20.html \
|
||||
html/gtk_tut_fr-21.html \
|
||||
html/gtk_tut_fr-22.html \
|
||||
html/gtk_tut_fr-23.html \
|
||||
html/gtk_tut_fr-24.html \
|
||||
html/gtk_tut_fr.html text/gtk_tut_fr.txt
|
||||
|
||||
TUTORIAL_FILES=text/gtk_tut.txt html/gtk_tut.html \
|
||||
html/gtk_tut.html \
|
||||
html/gtk_tut-1.html \
|
||||
html/gtk_tut-2.html \
|
||||
html/gtk_tut-3.html \
|
||||
html/gtk_tut-4.html \
|
||||
html/gtk_tut-5.html \
|
||||
html/gtk_tut-6.html \
|
||||
html/gtk_tut-7.html \
|
||||
html/gtk_tut-8.html \
|
||||
html/gtk_tut-9.html \
|
||||
html/gtk_tut-10.html \
|
||||
html/gtk_tut-11.html \
|
||||
html/gtk_tut-12.html \
|
||||
html/gtk_tut-13.html \
|
||||
html/gtk_tut-14.html \
|
||||
html/gtk_tut-15.html \
|
||||
html/gtk_tut-16.html \
|
||||
html/gtk_tut-17.html \
|
||||
html/gtk_tut-18.html \
|
||||
html/gtk_tut-19.html \
|
||||
html/gtk_tut-20.html \
|
||||
html/gtk_tut-21.html \
|
||||
html/gtk_tut-22.html \
|
||||
html/gtk_tut-23.html \
|
||||
html/gtk_tut-24.html \
|
||||
html/gtk_tut-25.html \
|
||||
html/gtk_tut-26.html \
|
||||
html/gtk_tut-27.html \
|
||||
html/gtk_tut-28.html \
|
||||
html/gtk_tut-29.html \
|
||||
html/gtk_tut-30.html \
|
||||
html/gtk_tut-31.html
|
||||
|
||||
TUTORIAL_IT_FILES= html/gtk_tut_it.html \
|
||||
html/gtk_tut_it-1.html \
|
||||
html/gtk_tut_it-2.html \
|
||||
html/gtk_tut_it-3.html \
|
||||
html/gtk_tut_it-4.html \
|
||||
html/gtk_tut_it-5.html \
|
||||
html/gtk_tut_it-6.html \
|
||||
html/gtk_tut_it-7.html \
|
||||
html/gtk_tut_it-8.html \
|
||||
html/gtk_tut_it-9.html \
|
||||
html/gtk_tut_it-10.html \
|
||||
html/gtk_tut_it-11.html \
|
||||
html/gtk_tut_it-12.html \
|
||||
html/gtk_tut_it-13.html \
|
||||
html/gtk_tut_it-14.html \
|
||||
html/gtk_tut_it-15.html \
|
||||
html/gtk_tut_it-16.html \
|
||||
html/gtk_tut_it-17.html \
|
||||
html/gtk_tut_it-18.html \
|
||||
html/gtk_tut_it-19.html \
|
||||
html/gtk_tut_it-20.html \
|
||||
html/gtk_tut_it-21.html \
|
||||
html/gtk_tut_it-22.html \
|
||||
html/gtk_tut_it-23.html \
|
||||
html/gtk_tut_it-24.html \
|
||||
text/gtk_tut_it.txt
|
||||
|
||||
FAQ_FILES=html/gtkfaq.html \
|
||||
html/gtkfaq-1.html \
|
||||
html/gtkfaq-2.html \
|
||||
html/gtkfaq-3.html \
|
||||
html/gtkfaq-4.html \
|
||||
html/gtkfaq-5.html \
|
||||
html/gtkfaq-6.html \
|
||||
html/gtkfaq-7.html \
|
||||
text/gtkfaq.txt
|
||||
|
||||
html/gtk_tut_table.gif: gdk.html gtk.html
|
||||
|
||||
.PHONY: html htmldir faq tutorial tutorial_it tutorial_fr files
|
||||
|
||||
distdocs: gdk.html gtk.html faq tutorial tutorial_it tutorial_fr
|
||||
|
||||
htmldir:
|
||||
(cd $(srcdir); mkdir -p html; cp gtk_tut*gif html)
|
||||
|
||||
textdir:
|
||||
mkdir -p $(srcdir)/text
|
||||
|
||||
gdk.html gdk_toc.html: gdk.texi
|
||||
(cd $(srcdir); texi2html gdk.texi)
|
||||
|
||||
gtk.html gtk_toc.html: gtk.texi
|
||||
(cd $(srcdir); texi2html gtk.texi)
|
||||
|
||||
html/gdk.html html/gdk_toc.html: htmldir gdk.html gdk_toc.html
|
||||
(cd $(srcdir); cp gdk.html gdk_toc.html html/)
|
||||
|
||||
html/gtk.html html/gtk_toc.html: htmldir gtk.html gtk_toc.html
|
||||
(cd $(srcdir); cp gtk.html gtk_toc.html html/)
|
||||
|
||||
$(FAQ_FILES): faq
|
||||
|
||||
faq: htmldir textdir
|
||||
(cd $(srcdir); sgml2html gtkfaq.sgml; \
|
||||
perl gtkdocs_fix gtkfaq*html; \
|
||||
mv gtkfaq*html html/; \
|
||||
sgml2txt gtkfaq.sgml; \
|
||||
mv gtkfaq.txt text/)
|
||||
|
||||
$(TUTORIAL_FILES): tutorial
|
||||
|
||||
$(TUTORIAL_FR_FILES): tutorial_fr
|
||||
|
||||
$(TUTORIAL_IT_FILES): tutorial_it
|
||||
|
||||
tutorial: htmldir textdir
|
||||
(cd $(srcdir); sgml2html gtk_tut.sgml; \
|
||||
perl gtkdocs_fix gtk_tut*html; \
|
||||
mv gtk_tut*html html/; \
|
||||
sgml2txt gtk_tut.sgml; \
|
||||
mv gtk_tut.txt text/)
|
||||
|
||||
tutorial_it: htmldir textdir
|
||||
(cd $(srcdir); sgml2html --language=it gtk_tut_it.sgml; \
|
||||
perl gtkdocs_fix gtk_tut_it*html; \
|
||||
mv gtk_tut_it*html html/; \
|
||||
sgml2txt --language=it gtk_tut_it.sgml; \
|
||||
mv gtk_tut_it.txt text/)
|
||||
|
||||
tutorial_fr: htmldir textdir
|
||||
(cd $(srcdir); sgml2html --language=fr gtk_tut_fr.sgml; \
|
||||
perl gtkdocs_fix gtk_tut_fr*html; \
|
||||
mv gtk_tut_fr*html html/; \
|
||||
sgml2txt --language=fr gtk_tut_fr.sgml; \
|
||||
mv gtk_tut_fr.txt text/)
|
||||
|
||||
|
||||
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,97 +0,0 @@
|
||||
The GLIB, GDK, and GTK libraries have extensive support for
|
||||
debugging the library and your programs.
|
||||
|
||||
The amount of debugging being done can be determined both
|
||||
at run time and compile time.
|
||||
|
||||
COMPILE TIME OPTIONS
|
||||
--------------------
|
||||
|
||||
At compile time, the amount of debugging support included is
|
||||
determined by four macros:
|
||||
|
||||
G_ENABLE_DEBUG
|
||||
If set, enable support for runtime checking.
|
||||
|
||||
G_DISABLE_ASSERT
|
||||
If set, disable g_assert macros
|
||||
|
||||
G_DISABLE_CHECKS
|
||||
If set, disable the g_return_if_fail and g_return_val_if_fail macros
|
||||
|
||||
GTK_NO_CHECK_CASTS
|
||||
If set, don't check casts between different object types
|
||||
|
||||
|
||||
Whether these macros are defined is controlled at configuration
|
||||
time by the --enable-debug option.
|
||||
|
||||
--enable-debug=minimum [default]
|
||||
Enable only inexpensive sanity checking
|
||||
sets GTK_NO_CHECK_CASTS
|
||||
|
||||
--enable-debug=yes
|
||||
Enable all debugging support
|
||||
sets G_ENABLE_DEBUG
|
||||
|
||||
--enable-debug=no (or --disable-debug)
|
||||
Disable all debugging support (fastest)
|
||||
sets G_DISABLE_ASSERT, G_DISABLE_CHECKS, and GTK_NO_CHECK_CASTS
|
||||
|
||||
|
||||
RUN TIME OPTIONS
|
||||
----------------
|
||||
|
||||
At run time, if GTK+ was compiled with debugging enabled, different
|
||||
types of debugging information can be printed out. This is controlled
|
||||
by the:
|
||||
|
||||
GTK_DEBUG and GDK_DEBUG environment variables
|
||||
--gtk-debug and --gdk-debug command line options
|
||||
--gtk-no-debug and --gdk-no-debug command line options
|
||||
|
||||
First the environment variables are applied, then the command line
|
||||
options are applied in the order given on the command line.
|
||||
|
||||
Each of these can either be the special value 'all', or a sequence of
|
||||
':' separated options. (case is ignored). The environment variables
|
||||
and the --gtk-debug and --gdk-debug options add debugging options and
|
||||
the --gtk-no-debug and --gdk-no-debug options remove them.
|
||||
|
||||
As noted below, some of these are useful in application debugging, but
|
||||
most are only interested to those debugging the libraries
|
||||
|
||||
For instance:
|
||||
|
||||
GDK_DEBUG_FLAGS=misc:dnd testgtk --gdk-no-debug dnd --gdk-debug events
|
||||
|
||||
runs testgtk with the 'misc' and 'events' debugging options.
|
||||
|
||||
GTK_DEBUG
|
||||
---------
|
||||
|
||||
Application relevant options:
|
||||
|
||||
'objects' - Trace the creation and destruction of objects, print
|
||||
out a summary at program termination
|
||||
|
||||
Options only interesting to library maintainers:
|
||||
|
||||
GDK_DEBUG
|
||||
---------
|
||||
|
||||
Application relevant options:
|
||||
|
||||
'events' - Show all events received by GTK
|
||||
|
||||
Options only interesting to library maintainers:
|
||||
|
||||
'misc' - Miscellaneous information
|
||||
'dnd' - Information about drag-and-drop
|
||||
'color-context' - Information about the internal workings of
|
||||
GdkColorContext
|
||||
'xim' - Information about X Input Method support
|
||||
|
||||
|
||||
- Owen Taylor <owt1@cornell.edu>
|
||||
98/02/19
|
@@ -1,69 +0,0 @@
|
||||
Things to care about when using/programing for GTK+
|
||||
===================================================
|
||||
|
||||
This file is meant to collect some frequently triggered failures when
|
||||
programming for/with Gtk, having the spirit of a developers FAQ.
|
||||
It is also the correct place to list up things that programmers should
|
||||
care about in general.
|
||||
|
||||
In the hope that this text might be usefull to someone,
|
||||
|
||||
- Tim Janik <timj@gimp.org>
|
||||
1998/02/11
|
||||
|
||||
|
||||
Automatic destruction of widgets on removal from parent
|
||||
-------------------------------------------------------
|
||||
|
||||
This is a reference counting issue, you would want to refer
|
||||
to refcounting.txt on it.
|
||||
|
||||
|
||||
What are all the widget flags about?
|
||||
------------------------------------
|
||||
|
||||
Refer to the file widget_system.txt which covers widget flags and the
|
||||
resulting invariants in a detailed way.
|
||||
|
||||
|
||||
GdkWindow pointers may be NULL in GdkEvents
|
||||
-------------------------------------------
|
||||
|
||||
The notification nature of the signal mechanism might cause events to
|
||||
be emitted that have their GdkWindow pointer set to NULL.
|
||||
This is due to the fact that certain events need to be emitted after the
|
||||
real GdkWindow of a widget is not any longer pertinent.
|
||||
It's up to the signal handling function (application) to check for the
|
||||
window field of the event structure to be != NULL, if it is going to
|
||||
perform any operations through Gdk calls on it.
|
||||
Events that a likely to trigger a missing check for the window pointer
|
||||
currently are (and correspond to the trailing signals):
|
||||
|
||||
GDK_SELECTION_CLEAR GtkWidget::selection_clear_event
|
||||
GDK_FOCUS_CHANGE GtkWidget::focus_in_event
|
||||
GtkWidget::focus_out_event
|
||||
|
||||
Events that are asured to have a valid GdkEvent.any.window field are
|
||||
|
||||
GDK_EXPOSE GtkWidget::expose_event
|
||||
|
||||
|
||||
gtk_widget_ref() vs. gtk_object_ref()
|
||||
-------------------------------------
|
||||
|
||||
The widget referencing functions gtk_widget_ref() and gtk_widget_unref()
|
||||
are currently just wrappers about the corresponding referencing functions
|
||||
for objects. Still you should use the widget referencing functions if you
|
||||
are sure the referenced object is of type GTK_WIDGET_TYPE.
|
||||
|
||||
|
||||
Writing Gdk functions
|
||||
---------------------
|
||||
|
||||
When writing Gdk functions that operate on GdkWindow structures in any
|
||||
maeningfull sense, that is casting to a GdkWindowPrivate structure for
|
||||
access to fields other then GdkWindow.user_data, the programmer is
|
||||
recommended to check for the GdkWindowPrivate.destroyed field to be ==
|
||||
FALSE, especially if the GdkWindowPrivate.xwindow field is used.
|
||||
Silent abortion of the Gdk function is the correct behaviour if this
|
||||
condition isn't met.
|
@@ -1,210 +0,0 @@
|
||||
This document describes some of the internals of the DND handling
|
||||
code.
|
||||
|
||||
Organization
|
||||
============
|
||||
|
||||
The DND code is split between a lowlevel part - gdkdnd.c and a
|
||||
highlevel part - gtkdnd.c. To put it simply, gdkdnd.c contain the
|
||||
portions of DND code that are easiest to do in raw X, while gtkdnd.c
|
||||
contains the portions of DND that are easiest to do with an event loop
|
||||
and high level selection handling.
|
||||
|
||||
Except for a few details of selection handling, most of the
|
||||
dependencies on the DND protocol are confined to gdkdnd.c.
|
||||
There are two or three supported protocols - Motif DND,
|
||||
Xdnd and a pseudo-protocol ROOTWIN, which is used for drops
|
||||
on root windows that aren't really accepting drops.
|
||||
gdkdnd.c divides into 4 pieces:
|
||||
|
||||
1) Utility functions (finding client windows)
|
||||
2) Motif specific code (the biggest chunk)
|
||||
3) Xdnd specific code
|
||||
4) The public interfaces
|
||||
|
||||
The code in gtkdnd.c roughly consists of three parts
|
||||
|
||||
1) General utility functions
|
||||
2) Destination side code
|
||||
3) Source side code.
|
||||
|
||||
Both on the source and dest side, there is some division
|
||||
between the low level layers and the default handlers,
|
||||
though they are rather mixed in many cases.
|
||||
|
||||
Structures and Memory Management
|
||||
================================
|
||||
|
||||
Information about source sites and drop sites is stored
|
||||
in the structures GtkSourceSite and GtkDestSite.
|
||||
|
||||
Information about in-progress drags and drops is stored
|
||||
in the structures GtkSourceInfo and GtkDestInfo.
|
||||
|
||||
The GtkSourceInfo structure is created when the drag
|
||||
begins, and persists until the drag either completes
|
||||
or times out. A pointer to it is stored in
|
||||
dataset-data for the GdkDragContext, however there
|
||||
is no ownership. If the SourceInfo is destroyed
|
||||
before the context, the field is simply cleared.
|
||||
|
||||
A GtkDestInfo is attached to each GdkDragContext
|
||||
that is received for an incoming drag. In contrast
|
||||
to the SourceInfo the DestInfo is "owned" by the
|
||||
context, and when the context is destroyed, destroyed.
|
||||
|
||||
The GDK API
|
||||
===========
|
||||
|
||||
It is expect that the GDK DND API will never be
|
||||
used by anything other than the DND code in GTK+.
|
||||
|
||||
/* Drag and Drop */
|
||||
|
||||
GdkDragContext * gdk_drag_context_new (void);
|
||||
void gdk_drag_context_ref (GdkDragContext *context);
|
||||
void gdk_drag_context_unref (GdkDragContext *context);
|
||||
|
||||
These create and refcount GdkDragContexts in a
|
||||
straightforward manner.
|
||||
|
||||
/* Destination side */
|
||||
|
||||
void gdk_drag_status (GdkDragContext *context,
|
||||
GdkDragAction action,
|
||||
guint32 time);
|
||||
void gdk_drop_reply (GdkDragContext *context,
|
||||
gboolean ok,
|
||||
guint32 time);
|
||||
void gdk_drop_finish (GdkDragContext *context,
|
||||
gboolean success,
|
||||
guint32 time);
|
||||
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
||||
|
||||
/* Source side */
|
||||
|
||||
GdkDragContext * gdk_drag_begin (GdkWindow *window,
|
||||
GList *targets,
|
||||
GdkDragAction actions);
|
||||
gboolean gdk_drag_get_protocol (guint32 xid,
|
||||
GdkDragProtocol *protocol);
|
||||
void gdk_drag_find_window (GdkDragContext *context,
|
||||
GdkWindow *drag_window,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
GdkWindow **dest_window,
|
||||
GdkDragProtocol *protocol);
|
||||
gboolean gdk_drag_motion (GdkDragContext *context,
|
||||
GdkWindow *dest_window,
|
||||
GdkDragProtocol protocol,
|
||||
gint x_root,
|
||||
gint y_root,
|
||||
GdkDragAction action,
|
||||
guint32 time);
|
||||
void gdk_drag_drop (GdkDragContext *context,
|
||||
guint32 time);
|
||||
void gdk_drag_abort (GdkDragContext *context,
|
||||
guint32 time);
|
||||
|
||||
GdkAtom gdk_drag_get_selection (GdkDragContext *context);
|
||||
|
||||
Retrieves the selection that will be used to communicate
|
||||
the data for the drag context (valid on both source
|
||||
and dest sides)
|
||||
|
||||
Cursors and window heirarchies
|
||||
==============================
|
||||
|
||||
The DND code, when possible (and it isn't possible over
|
||||
Motif window) uses a shaped window as a drag icon.
|
||||
Because the cursor may fall inside this window during the
|
||||
drag, we actually have to figure out which window
|
||||
the cursor is in _ourselves_ so we can ignore the
|
||||
drag icon properly. (Oh for OutputOnly windows!)
|
||||
|
||||
To avoid obscene amounts of server traffic (which are only
|
||||
slighly observerable locally, but would really kill a
|
||||
session over a slow link), the code in GDK does
|
||||
XGetWindowAttributes for every child of the root window at
|
||||
the beginning of the drag, then selects with
|
||||
SubstructureNotifyMask on the root window, so that
|
||||
it can update this list.
|
||||
|
||||
It probably would be easier to just reread the entire
|
||||
list when one of these events occurs, instead of
|
||||
incrementally updating, but updating the list in
|
||||
sync was sort of fun code, so I did it that way ;-)
|
||||
|
||||
There is also a problem of trying to follow the
|
||||
mouse cursor as well as possible. Currently, the
|
||||
code uses PointerMotionHint, and an XQueryPointer
|
||||
on MotionNotify events. This results in pretty
|
||||
good syncing, but may result in somewhat poor
|
||||
accuracy for drops. (Because the coordinates of
|
||||
the drop are the coordinates when the server receives
|
||||
the button press, which might actually be before
|
||||
the XQueryPointer for the previous MotionNotify
|
||||
event is done.)
|
||||
|
||||
Probably better is doing MotionNotify compression
|
||||
and discarding MotionNotify events when there
|
||||
are more on the queue before the next ButtonPress/Release.
|
||||
|
||||
Proxying
|
||||
========
|
||||
|
||||
A perhaps rather unusual feature of GTK's DND is proxying. A
|
||||
dest site can be specified as a proxy drop site for another
|
||||
window. This is most needed for the plug-socket code - the
|
||||
socket needs to pass on drags to the plug since the original
|
||||
source only sees toplevel windows. However, it can also be
|
||||
used as a user visible proxy - i.e., dragging to buttons on
|
||||
the taskbar.
|
||||
|
||||
Internally, when the outer drag enters a proxy dest site, a
|
||||
new source drag is created, with SourceInfo and
|
||||
GdkDragContext. From the GDK side, it looks much like a
|
||||
normal source drag; on the GTK+ side, most of the code is
|
||||
disjoint. The need to pass in a specific target window
|
||||
is the reason why the GDK DND API splits
|
||||
gdk_drag_find_window() and gdk_drag_motion().
|
||||
|
||||
For proxy drags, the GtkDestInfo and GtkSourceInfo for the
|
||||
drag point at each other.
|
||||
|
||||
Because the abstraction of the drag protocol is at the GDK
|
||||
level, a proxy drag from Motif to Xdnd or vice versa happens
|
||||
pretty much automatically during the drag, though the
|
||||
drop can get complicated. For Xdnd <-> Motif,
|
||||
Motif <-> Xdnd, or Motif <-> Motif drags, it is necessary to
|
||||
for the Proxy to retrieve the data and pass it on to
|
||||
the true destination, since either the selection names
|
||||
differ or (Motif<->Motif), the proxy needs to know
|
||||
about the XmDRAG_SUCCESS/FAILURE selection targets.
|
||||
|
||||
Further Reading:
|
||||
================
|
||||
|
||||
Xdnd:
|
||||
|
||||
The spec is at:
|
||||
|
||||
http://www.cco.caltech.edu/~jafl/xdnd/
|
||||
|
||||
Motif:
|
||||
|
||||
The Motif DND protocol is best described in the
|
||||
Hungry Programmers _Inside Lesstif_ book, available
|
||||
from:
|
||||
|
||||
http://www.igpm.rwth-aachen.de/~albrecht/hungry.html
|
||||
|
||||
Harald Albrecht and Mitch Miers have done a far
|
||||
better job at documenting the DND protocol then
|
||||
anything the OpenGroup has produced.
|
||||
|
||||
|
||||
|
||||
Owen Taylor
|
||||
otaylor@redhat.com
|
||||
Oct 18, 1998
|
2744
docs/faq/gtkfaq.sgml
2744
docs/faq/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
198
docs/gdk.sgml
198
docs/gdk.sgml
@@ -1,198 +0,0 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
|
||||
<!-- Title information -->
|
||||
|
||||
<title>The GTK+ Drawing Kit Programming Manual
|
||||
<author>Shawn T. Amundson, Peter Mattis
|
||||
<date>July 26, 1998
|
||||
|
||||
<abstract>
|
||||
This document aims at teaching user how to effectively program in
|
||||
GDK, the GTK+ Drawing Kit, and to serve as a reference guide to
|
||||
more experienced GTK+ programmers. It is a work in progress.
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<!-- ***************************************************************** -->
|
||||
<sect>Introduction
|
||||
|
||||
<p>
|
||||
GDK is designed as a wrapper library that lies on top of Xlib. It
|
||||
performs many common and desired operations for a programmer instead
|
||||
of the programmer having to explicitly ask for such functionality from
|
||||
Xlib directly. For example, GDK provides a common interface to both
|
||||
regular and shared memory XImage types. By doing so, an application
|
||||
can nearly transparently use the fastest image type available. GDK
|
||||
also provides routines for determining the best available color depth
|
||||
and the best available visual which is not always the default visual
|
||||
for a screen.
|
||||
|
||||
GDK is distributed and developed with GTK+, and is licensed under the
|
||||
GNU Library General Public Licence (LGPL).
|
||||
|
||||
<sect>Getting Started
|
||||
|
||||
<sect1>Initialization
|
||||
<p>
|
||||
Initialization of GDK is easy. Simply call gdk_init() passing
|
||||
in the argc and argv parameters.
|
||||
|
||||
<tscreen><verb>
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
/* Initialize GDK. */
|
||||
gdk_init (&argc, &argv);
|
||||
|
||||
/* Cleanup of GDK is done automatically when the program exits. */
|
||||
return 0;
|
||||
}
|
||||
</verb></tscreen>
|
||||
|
||||
Generally, GDK initialization is done by gtk_init() in GTK+. This means
|
||||
that when using GTK+, you do not need to directly call gdk_init().
|
||||
|
||||
<sect1>An Example using GDK with GTK+
|
||||
<p>
|
||||
This example demonstrates drawing a line using the foreground
|
||||
color of the GtkDrawArea widget it is drawn inside. The example
|
||||
will end when you click inside the window, which is filled by the
|
||||
GtkDrawingArea widget.
|
||||
|
||||
The line is drawn during the expose event so that when the window
|
||||
drawing is done whenever it is needed.
|
||||
|
||||
<tscreen><verb>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* The expose callback does the drawing of the line */
|
||||
int
|
||||
expose_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
GdkGC *gc;
|
||||
|
||||
printf("expose...\n");
|
||||
|
||||
|
||||
/* The GC is the Graphics Context. Here it is borrowed from the widget */
|
||||
gc = widget->style->fg_gc[GTK_STATE_NORMAL];
|
||||
|
||||
gdk_draw_line (widget->window, /* GDK Window of GtkDrawingArea widget */
|
||||
gc, /* Graphics Context */
|
||||
0, /* x1, left */
|
||||
0, /* y1, top */
|
||||
200, /* x2, right */
|
||||
200); /* y2, bottom */
|
||||
}
|
||||
|
||||
/* This quits GTK+ */
|
||||
void destroy (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *darea;
|
||||
int events;
|
||||
|
||||
/* This initializes both GTK+ and GDK */
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* Create a window */
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
GTK_SIGNAL_FUNC (destroy), NULL);
|
||||
|
||||
/* Create a drawing area widget. This widget actually is just a
|
||||
simple widget which provides us an GDK window to draw on and
|
||||
takes care of all the toolkit integration, like providing the
|
||||
ability to add it to the window with gtk_contianer_add() */
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), darea);
|
||||
|
||||
/* Set the width and height (arguments are in that order) */
|
||||
gtk_drawing_area_size (GTK_DRAWING_AREA (darea), 200, 200);
|
||||
|
||||
/* Drawing in the expose event is important to keep the
|
||||
draw line always on the GDK window */
|
||||
gtk_signal_connect (GTK_OBJECT (darea), "expose_event",
|
||||
GTK_SIGNAL_FUNC (expose_callback), NULL);
|
||||
|
||||
/* We get the events, then add in button press. If we did not
|
||||
do this, we would not be notified of button press events in
|
||||
the GtkDrawingArea widget */
|
||||
events = gtk_widget_get_events (darea);
|
||||
gtk_widget_set_events (darea, events | GDK_BUTTON_PRESS_MASK);
|
||||
|
||||
/* If we click on the darea, the application will exit */
|
||||
gtk_signal_connect_object (GTK_OBJECT (darea), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroy),
|
||||
GTK_OBJECT (window));
|
||||
|
||||
gtk_widget_show (darea);
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* The GTK+ main idle loop */
|
||||
gtk_main();
|
||||
|
||||
/* Cleanup of GDK is done automatically when the program exits. */
|
||||
return 0;
|
||||
}
|
||||
</verb></tscreen>
|
||||
|
||||
<sect>The Graphics Context
|
||||
<p>
|
||||
The Graphics Context, or GC, defines how things should be drawn,
|
||||
including color, font, fill, tile, stipple, clipping mask, line
|
||||
width, line style, and join style.
|
||||
|
||||
<sect1>Color
|
||||
<p>
|
||||
Changing color is done by changing the forground or background color
|
||||
of the GC.
|
||||
|
||||
<sect>Drawing Commands
|
||||
<sect>Event Handling
|
||||
<sect>Understanding and Using Visuals
|
||||
<sect>Creating and Using New Windows
|
||||
<sect>Pixmaps
|
||||
<sect>Images
|
||||
<sect>Fonts
|
||||
<sect>
|
||||
|
||||
<sect>About this Document
|
||||
<sect1>History
|
||||
<P>
|
||||
This document was originially written by Peter Mattis and entitled
|
||||
"The General Drawing Kit". It was meant as a reference guide.
|
||||
|
||||
This version of the document has been renamed and is meant as a general
|
||||
programming guide.
|
||||
|
||||
<sect1>Copying
|
||||
<p>
|
||||
Copyright (c) 1996 Peter Mattis
|
||||
<p>
|
||||
Copyright (c) 1998 Shawn T. Amundson
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Peter Mattis.
|
||||
|
||||
</article>
|
334
docs/gdk.texi
334
docs/gdk.texi
@@ -1,334 +0,0 @@
|
||||
\input texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename gdk.info
|
||||
@settitle GDK
|
||||
@setchapternewpage odd
|
||||
@c %**end of header
|
||||
|
||||
@set edition 1.0
|
||||
@set update-date 16 May 1996
|
||||
@set update-month May 1996
|
||||
|
||||
@ifinfo
|
||||
This file documents GDK, the General Drawing Kit
|
||||
|
||||
Copyright (C) 1996 Peter Mattis
|
||||
|
||||
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
|
||||
|
||||
@ignore
|
||||
Permission is granted to process this file throught TeX and print the
|
||||
results, provided the printed document carries copying permission notice
|
||||
identical to this one except for the removal of this paragraph (this
|
||||
paragraph not being relevant to the printed manual).
|
||||
|
||||
@end ignore
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Peter Mattis.
|
||||
@end ifinfo
|
||||
|
||||
@titlepage
|
||||
@title The General Drawing Kit
|
||||
@subtitle Version 1.0
|
||||
@subtitle @value{update-month}
|
||||
@author by Peter Mattis
|
||||
|
||||
@page
|
||||
@vskip 0pt plus 1filll
|
||||
Copyright @copyright{} 1996 Peter Mattis
|
||||
|
||||
Permission is granted to make and distribute verbatim copies of this
|
||||
manual provided the copyright notice and this permission notice are
|
||||
preserved on all copies.
|
||||
|
||||
Permission is granted to copy and distribute modified versions of this
|
||||
manual under the conditions for verbatim copying, provided that the
|
||||
entire resulting derived work is distributed under the terms of a
|
||||
permission notice identical to this one.
|
||||
|
||||
Permission is granted to copy and distribute translations of this manual
|
||||
into another language, under the above conditions for modified versions,
|
||||
except that this permission notice may be stated in a translation
|
||||
approved by Peter Mattis.
|
||||
@end titlepage
|
||||
|
||||
@dircategory User Interface Toolkit
|
||||
@direntry
|
||||
* GDK: (gdk). The General Drawing Kit
|
||||
@end direntry
|
||||
|
||||
@node Top, Copying, (dir), (dir)
|
||||
@top The General Drawing Kit
|
||||
@ifinfo
|
||||
This is edition @value{edition} of the GDK documentation,
|
||||
@w{@value{update-date}}.
|
||||
@end ifinfo
|
||||
|
||||
@menu
|
||||
* Copying:: Your rights.
|
||||
* Overview:: What is GDK?
|
||||
* Initialization:: Initialization and exit.
|
||||
* Events:: Event handling.
|
||||
* Visuals:: Understanding and using visuals.
|
||||
* Windows:: Creating and using windows.
|
||||
* Graphics Contexts:: Creating and modifying GCs.
|
||||
* Pixmaps:: Creating pixmaps.
|
||||
* Images:: Creating images.
|
||||
* Color:: Specifying color.
|
||||
* Fonts:: Creating fonts.
|
||||
* Drawing:: Drawing commands.
|
||||
* XInput Support:: Using extended devices.
|
||||
* Miscellany:: Other stuff.
|
||||
* Examples:: Using GDK.
|
||||
* Function Index:: Index of functions
|
||||
* Concept Index:: Index of concepts
|
||||
@end menu
|
||||
|
||||
@node Copying, Overview, Top, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Copying
|
||||
|
||||
GDK is @dfn{free}; this means that everyone is free to use it and free
|
||||
to redestribute it on a free basis. GDK is not in the public domain; it
|
||||
is copyrighted and there are restrictions on its distribution, but these
|
||||
restrictions are designed to permit everything that a good cooperating
|
||||
citizen would want to do. What is not allowed is to try to prevent
|
||||
others from further sharing any version of GDK that they might get from
|
||||
you.
|
||||
|
||||
Specifically, we want to make sure that you have the right to give away
|
||||
copies of GDK, that you receive source code or else can get it if you
|
||||
want it, that you can change GDK or use pieces of it in new free
|
||||
programs, and that you know you can do these things.
|
||||
|
||||
To make sure that everyone has such rights, we have to forbid you to
|
||||
deprive anyone else of these rights. For example, if you distribute
|
||||
copies of GDK, you must give the recipients all the rights that you
|
||||
have. You must make sure that they, too, receive or can get the source
|
||||
code. And you must tell them their rights.
|
||||
|
||||
Also, for my own protection, we must make certain that everyone finds
|
||||
out that there is no warranty for GDK. If GDK is modified by someone
|
||||
else and passed on, we want their recipients to know that what they have
|
||||
is not what we distributed, so that any problems introduced by others
|
||||
will no reflect on our reputation.
|
||||
|
||||
The precise conditions of the licenses for GDK are found in the General
|
||||
Public Licenses that accompanies it.
|
||||
|
||||
|
||||
@node Overview, Initialization, Copying, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter What is GDK?
|
||||
@cindex Overview
|
||||
|
||||
GDK is designed as a wrapper library that lies on top of Xlib. It
|
||||
performs many common and desired operations for a programmer instead
|
||||
of the programmer having to explicitly ask for such functionality from
|
||||
Xlib directly. For example, GDK provides a common interface to both
|
||||
regular and shared memory XImage types. By doing so, an application
|
||||
can nearly transparently use the fastest image type available. GDK
|
||||
also provides routines for determining the best available color depth
|
||||
and the best available visual which is not always the default visual
|
||||
for a screen.
|
||||
|
||||
@node Initialization, Events, Overview, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Initialization and exit
|
||||
@cindex Initialization
|
||||
@cindex Exit
|
||||
|
||||
Initializing GDK is easy. Simply call @code{gdk_init} passing in the
|
||||
@var{argc} and @var{argv} parameters. Exit is similarly easy. Just
|
||||
call @code{gdk_exit}.
|
||||
|
||||
@deftypefun void gdk_init (int *@var{argc}, char ***@var{argv})
|
||||
Initializes the GDK library. The arguments @var{argc} and @var{argv}
|
||||
are scanned and any arguments that GDK recognizes are handled and
|
||||
removed. The @var{argc} and @var{argv} parameters are the values
|
||||
passed to @code{main} upon program invocation.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gdk_exit (int @var{errorcode})
|
||||
Exit GDK and perform any necessary cleanup. @code{gdk_exit} will call
|
||||
the systems @code{exit} function passing @var{errorcode} as the
|
||||
parameter.
|
||||
@end deftypefun
|
||||
|
||||
@example
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
@{
|
||||
/* Initialize GDK. */
|
||||
gdk_init (&argc, &argv);
|
||||
|
||||
/* Exit from GDK...this call will never return. */
|
||||
gdk_exit (0);
|
||||
|
||||
/* Keep compiler from issuing a warning */
|
||||
return 0;
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Events, Visuals, Initialization, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Event handling
|
||||
@cindex Events
|
||||
|
||||
Events are the means by which GDK lets the programmer know of user
|
||||
interaction. An event is normally a button or key press or some other
|
||||
indirect user action, such as a the mouse cursor entering or leaving a
|
||||
window.
|
||||
|
||||
There exist only a few functions for getting events and event
|
||||
information. These are @code{gdk_events_pending},
|
||||
@code{gdk_event_get}, @code{gdk_events_record} and
|
||||
@code{gdk_events_playback}. The latter two functions are useful for
|
||||
automatic testing of a software package and should normally not be
|
||||
needed in a program.
|
||||
|
||||
@deftypefun gint gdk_events_pending (void)
|
||||
Returns the number of events pending on the event queue.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint gdk_event_get (GdkEvent *@var{event})
|
||||
Return the next available event in the @var{event}
|
||||
structure. @code{gdk_event_get} will return @code{TRUE} on success and
|
||||
@code{FALSE} on failure. Success and failure is determined by whether
|
||||
an event arrived before the timeout period expired.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gdk_events_record (char *@var{filename})
|
||||
Turn on recording of events. User events and certain system events will
|
||||
be saved in the file named by the variable @var{filename}. This stream
|
||||
of events can later be played back and ``should'' produce the same
|
||||
results as when the original events were handled. However, the
|
||||
programmer does need to be careful in that the state of the program must
|
||||
be the same when @code{gdk_events_record} is called and when
|
||||
@code{gdk_events_playback} is called. For this reason,
|
||||
@code{gdk_events_record} is normally not called directly, but is instead
|
||||
invoked indirectly by specifying the ``-record'' command line option.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gdk_events_playback (char *@var{filename})
|
||||
Start playback of events from a file. (See the above description of
|
||||
@code{gdk_events_record}). Normally this function is not called directly
|
||||
but is invoked by the ``-playback'' command line option.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun void gdk_events_stop (void)
|
||||
Stop recording and playback of events.
|
||||
@end deftypefun
|
||||
|
||||
@example
|
||||
void
|
||||
handle_event ()
|
||||
@{
|
||||
GdkEvent event;
|
||||
|
||||
if (gdk_event_get (&event))
|
||||
@{
|
||||
switch (event.type)
|
||||
@{
|
||||
@dots{}
|
||||
@}
|
||||
@}
|
||||
@}
|
||||
@end example
|
||||
|
||||
|
||||
@node Visuals, Windows, Events, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Understanding and using visuals
|
||||
@cindex Visuals
|
||||
|
||||
@node Windows, Graphics Contexts, Visuals, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Creating and using windows
|
||||
@cindex Windows
|
||||
|
||||
@node Graphics Contexts, Pixmaps, Windows, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Creating and modifying GCs
|
||||
@cindex Graphics Contexts
|
||||
@cindex GC
|
||||
|
||||
@node Pixmaps, Images, Graphics Contexts, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Creating pixmaps
|
||||
@cindex Pixmaps
|
||||
|
||||
@node Images, Color, Pixmaps, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Creating images
|
||||
@cindex Images
|
||||
|
||||
@node Color, Fonts, Images, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Specifying color
|
||||
@cindex Color
|
||||
|
||||
@node Fonts, Drawing, Color, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Creating Fonts
|
||||
@cindex Fonts
|
||||
|
||||
@node Drawing, XInput Support, Fonts, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Drawing Commands
|
||||
@cindex Drawing
|
||||
|
||||
@node XInput Support, Miscellany, Drawing, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Using extended devices
|
||||
@cindex Overview
|
||||
@cindex Using extended device capabilities
|
||||
@cindex Controlling extended devices
|
||||
|
||||
@node Miscellany, Examples, XInput Support, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Other stuff
|
||||
@cindex Timers
|
||||
@cindex Debugging
|
||||
@cindex Miscellaneous
|
||||
|
||||
|
||||
@node Examples, Function Index, Miscellany, Top
|
||||
@comment node-name, next, previous, up
|
||||
@chapter Using GDK
|
||||
@cindex Examples
|
||||
|
||||
|
||||
@node Function Index, Concept Index, Examples, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Variable Index
|
||||
|
||||
@printindex fn
|
||||
|
||||
@node Concept Index, , Function Index, Top
|
||||
@comment node-name, next, previous, up
|
||||
@unnumbered Concept Index
|
||||
|
||||
@printindex cp
|
||||
|
||||
@summarycontents
|
||||
@contents
|
||||
@bye
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -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.
|
@@ -1,49 +0,0 @@
|
||||
.TH GTK+ 1 "25 October 1998" Version @VERSION@
|
||||
.SH NAME
|
||||
gtk-config - script to get information about the installed version of GTK+
|
||||
.SH SYNOPSIS
|
||||
.B gtk-config
|
||||
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
\fIgtk-config\fP is a tool that is used to configure to determine
|
||||
the compiler and linker flags that should be used to compile
|
||||
and link programs that use \fIGTK+\fP. It is also used internally
|
||||
to the .m4 macros for GNU autoconf that are included with \fIGTK+\fP.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.l
|
||||
\fIgtk-config\fP accepts the following options:
|
||||
.TP 8
|
||||
.B \-\-version
|
||||
Print the currently installed version of \fIGTK+\fP on the standard output.
|
||||
.TP 8
|
||||
.B \-\-libs
|
||||
Print the linker flags that are necessary to link a \fIGTK+\fP program.
|
||||
.TP 8
|
||||
.B \-\-cflags
|
||||
Print the compiler flags that are necessary to compile a \fIGTK+\fP program.
|
||||
.TP 8
|
||||
.B \-\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation prefix that \fIGTK+\fP
|
||||
was built with when computing the output for the \-\-cflags and
|
||||
\-\-libs options. This option is also used for the exec prefix
|
||||
if \-\-exec\-prefix was not specified. This option must be specified
|
||||
before any \-\-libs or \-\-cflags options.
|
||||
.TP 8
|
||||
.B \-\-exec\-prefix=PREFIX
|
||||
If specified, use PREFIX instead of the installation exec prefix that
|
||||
\fIGTK+\fP was built with when computing the output for the \-\-cflags
|
||||
and \-\-libs options. This option must be specified before any
|
||||
\-\-libs or \-\-cflags options.
|
||||
.SH SEE ALSO
|
||||
.BR gimp (1),
|
||||
.BR gimptool (1)
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 1998 Owen Taylor
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation.
|
@@ -1,236 +0,0 @@
|
||||
CONFIGURING PACKAGES TO WORK WITH GTK
|
||||
-------------------------------------
|
||||
|
||||
Compiling a program succesfully against the GTK, GDK, and GLIB
|
||||
libraries can require a large number of command line options
|
||||
to your compiler and linker that are hard to guess correctly.
|
||||
The additional libraries required may, for example, depend on the
|
||||
manner which GTK was configured
|
||||
|
||||
Several tools are included in this package to make process
|
||||
easier.
|
||||
|
||||
First, there is the shell script 'gtk-config' (installed in
|
||||
$exec_prefix/bin):
|
||||
|
||||
Invoking gtk-config
|
||||
-------------------
|
||||
|
||||
gtk-config takes the following flags:
|
||||
|
||||
--version
|
||||
Prints out the version of GTK installed
|
||||
|
||||
--cflags
|
||||
Prints '-I' flags pointing to the installed header files.
|
||||
|
||||
--libs
|
||||
Prints out the linker flags necessary to link a program against GTK
|
||||
|
||||
--prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $prefix.
|
||||
(And of exec-prefix, unless --exec-prefix is also specified)
|
||||
Otherwise, prints out the configured value of $prefix
|
||||
|
||||
--exec-prefix[=PREFIX]
|
||||
If PREFIX is specified, overrides the configured value of $exec_prefix.
|
||||
Otherwise, prints out the configured value of $exec_prefix
|
||||
|
||||
You may also add to the command line a list of additional
|
||||
libraries that gtk-config should supply the CFLAGS and LIBS
|
||||
for. The only currently supported library is 'gthread'.
|
||||
|
||||
As an example of this latter usage, you can get the
|
||||
appropriate cflags for a threaded program with:
|
||||
|
||||
gtk-config --cflags gthread
|
||||
|
||||
|
||||
Example of using gtk-config
|
||||
---------------------------
|
||||
|
||||
Typically, gtk-config will be used within a configure script,
|
||||
as described below. It, however, can also be used directly
|
||||
from the command line to compile a simple program. For example:
|
||||
|
||||
cc -o simple `gtk-config --cflags` simple.c `gtk-config --libs`
|
||||
|
||||
This command line might expand to (for example):
|
||||
|
||||
cc -o simple -I/usr/local/lib/glib/include -I/usr/local/include \
|
||||
-I/usr/X11R6/include simple.c -L/usr/local/lib -L/usr/X11R6/lib \
|
||||
-lgtk -lgdk -lglib -lXi -lXext -lX11 -lm
|
||||
|
||||
Not only is the form using gtk-config easier to type, it will
|
||||
work on any system, no matter how GTK was configured.
|
||||
|
||||
|
||||
AM_PATH_GTK
|
||||
-----------
|
||||
|
||||
For packages configured using GNU automake, GTK also provides
|
||||
a macro to automate the process of running GTK.
|
||||
|
||||
AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
|
||||
This macro:
|
||||
|
||||
* Determines the location of GTK using gtk-config, which is either
|
||||
found in the user's path, or from the environment variable
|
||||
GTK_CONFIG
|
||||
|
||||
* Tests the installed libraries to make sure that there version
|
||||
is later than MINIMUM-VERSION. (A default version will be used
|
||||
if not specified)
|
||||
|
||||
* If the required version was found, sets the GTK_CFLAGS variable to
|
||||
the output of `gtk-config --cflags` and the GTK_LIBS variable to
|
||||
the output of `gtk-config --libs`, and calls AC_SUBST() for these
|
||||
variables so they can be used in generated makefiles, and then
|
||||
executes ACTION-IF-FOUND.
|
||||
|
||||
* If the required version was not found, sets GTK_CFLAGS and GTK_LIBS
|
||||
to empty strings, and executes ACTION-IF-NOT-FOUND.
|
||||
|
||||
This macro is in file 'gtk.m4' which is installed in $datadir/aclocal.
|
||||
Note that if automake was installed with a different --prefix than
|
||||
GTK, you will either have to manually move gtk.m4 to automake's
|
||||
$datadir/aclocal, or give aclocal the -I option when running it.
|
||||
|
||||
|
||||
Configuring a package that uses AM_PATH_GTK
|
||||
-------------------------------------------
|
||||
|
||||
Simply make sure that gtk-config is in your path, and run
|
||||
the configure script.
|
||||
|
||||
Notes:
|
||||
|
||||
* The directory where the GTK libraries are installed needs
|
||||
to be found by your system's dynamic linker.
|
||||
|
||||
This is generally done by
|
||||
|
||||
editing /etc/ld.so.conf and running ldconfig
|
||||
|
||||
Or by:
|
||||
|
||||
setting the environment variable LD_LIBRARY_PATH,
|
||||
|
||||
or, as a last resort,
|
||||
|
||||
Giving a -R or -rpath flag (depending on your linker) when
|
||||
running configure, for instance:
|
||||
|
||||
LDFLAGS=-R/usr/home/owen/lib ./configure
|
||||
|
||||
* You can also specify a gtk-config not in your path by
|
||||
setting the GTK_CONFIG environment variable to the
|
||||
name of the executable
|
||||
|
||||
* If you move the GTK package from its installed location,
|
||||
you will need either need to modify gtk-config script
|
||||
manually to point to the new location or rebuild GTK.
|
||||
|
||||
Advanced note:
|
||||
|
||||
* configure flags
|
||||
|
||||
--with-gtk-prefix=PREFIX
|
||||
--with-gtk-exec-prefix=PREFIX
|
||||
|
||||
are provided to override the prefix and exec-prefix that were stored
|
||||
in the gtk-config shell script by GTK's configure. You are generally
|
||||
better off configuring GTK with the right path to begin with.
|
||||
|
||||
Example of a package using AM_PATH_GTK
|
||||
--------------------------------------
|
||||
|
||||
The following shows how to build a simple package using automake
|
||||
and the AM_PATH_GTK macro. The program used here is the testinput.c
|
||||
|
||||
You should first read the introductory portions of the automake
|
||||
Manual, if you are not already familiar with it.
|
||||
|
||||
Two files are needed, 'configure.in', which is used to build the
|
||||
configure script:
|
||||
|
||||
==configure.in===
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(testinput.c)
|
||||
|
||||
AM_INIT_AUTOMAKE(testinput.c, 1.0.0)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AM_PATH_GTK(0.99.5,
|
||||
[LIBS="$LIBS $GTK_LIBS"
|
||||
CFLAGS="$CFLAGS $GTK_CFLAGS"],
|
||||
AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
=================
|
||||
|
||||
The only command in this which is not standard for automake
|
||||
is the AM_PATH_GTK() macro.
|
||||
|
||||
That command does the following:
|
||||
|
||||
If a GTK version greater than 0.99.5 is found, adds $GTK_LIBS to
|
||||
$LIBS and $GTK_CFLAGS to $CFLAGS. Otherwise, dies with the error
|
||||
message "Cannot find GTK: Is gtk-config in path?"
|
||||
|
||||
And the 'Makefile.am', which will be used to build the Makefile.
|
||||
|
||||
== Makefile.am ==
|
||||
bin_PROGRAMS = testinput
|
||||
testinput_SOURCES = testinput.c
|
||||
=================
|
||||
|
||||
This Makefile.am, says that we are building a single executable,
|
||||
from a single sourcefile 'testinput.c'. Since every program
|
||||
we are building uses GTK we simply added the GTK options
|
||||
to $LIBS and $CFLAGS, but in other circumstances, we might
|
||||
want to specify them on a per-program basis: for instance by
|
||||
adding the lines:
|
||||
|
||||
testinput_LDADD = $(GTK_LIBS)
|
||||
INCLUDES = $(GTK_CFLAGS)
|
||||
|
||||
to the Makefile.am.
|
||||
|
||||
To try this example out, create a new directory, add the two
|
||||
files above two it, and copy the testinput.c file from
|
||||
the gtk/ subdirectory to the new directory. Edit the line:
|
||||
|
||||
#include "gtk.h"
|
||||
|
||||
in testgtk.c, to read:
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
Now execute the following commands:
|
||||
|
||||
automake --add-missing
|
||||
aclocal
|
||||
autoconf
|
||||
|
||||
You now have a package that can be built in the normal fashion
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are converting a package that used a pre-1.0 version of
|
||||
GTK, you should remove the autoconf tests for X. The results
|
||||
of these tests are included in gtk-config and will be added
|
||||
to GTK_LIBS and GTK_CFLAGS by the AM_PATH_GTK macro.
|
||||
|
||||
Owen Taylor
|
||||
14 Mar 1997
|
5648
docs/gtk.texi
5648
docs/gtk.texi
File diff suppressed because it is too large
Load Diff
18447
docs/gtk_tut.sgml
18447
docs/gtk_tut.sgml
File diff suppressed because it is too large
Load Diff
8600
docs/gtk_tut_fr.sgml
8600
docs/gtk_tut_fr.sgml
File diff suppressed because it is too large
Load Diff
10090
docs/gtk_tut_it.sgml
10090
docs/gtk_tut_it.sgml
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Stupid script to fix look of html files created with sgml2html...
|
||||
|
||||
foreach (@ARGV) {
|
||||
print "Fixing... $_\n";
|
||||
system("mv $_ $_.orig");
|
||||
system("sed -e 's/<BODY>/<BODY BGCOLOR=\"#FFFFFF\">/g' -e 's/<HR>/<HR NOSHADE>/g' $_.orig > $_");
|
||||
unlink("$_.orig");
|
||||
}
|
||||
|
2744
docs/gtkfaq.sgml
2744
docs/gtkfaq.sgml
File diff suppressed because it is too large
Load Diff
@@ -1,18 +0,0 @@
|
||||
@macro gtkstdmacros {p, q}
|
||||
|
||||
@deftypefun Gtk\p\* GTK_\q\ (gpointer @var{obj})
|
||||
Cast a generic pointer to @code{Gtk\p\*}. @xref{Standard Macros}, for
|
||||
more info.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun Gtk\p\Class* GTK_\q\_CLASS (gpointer @var{class})
|
||||
Cast a generic pointer to @code{Gtk\p\Class*}. @xref{Standard Macros},
|
||||
for more info.
|
||||
@end deftypefun
|
||||
|
||||
@deftypefun gint GTK_IS_\q\ (gpointer @var{obj})
|
||||
Determine if a generic pointer refers to a @code{Gtk\p\}
|
||||
object. @xref{Standard Macros}, for more info.
|
||||
@end deftypefun
|
||||
|
||||
@end macro
|
350
docs/make-todo
350
docs/make-todo
@@ -1,350 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import xmllib;
|
||||
import sys;
|
||||
import string
|
||||
import re
|
||||
|
||||
def html_subst(s):
|
||||
if s.group(1) != None:
|
||||
return s.group(0)
|
||||
elif s.group(2) != None:
|
||||
return '<a href="' + s.group(0) + '">' + s.group(0) + '</a>'
|
||||
elif s.group(3) != None:
|
||||
return '<a href="mailto:' + s.group(0) + '">' + s.group(0) + '</a>'
|
||||
|
||||
def htmlify(str):
|
||||
return re.sub ("(<[^>]*>)|(http://[~.:/\w-]+)|([\w._!-]+@[\w_-]+).[\w_-]+", html_subst, str)
|
||||
|
||||
def bug_subst(s):
|
||||
if s.group(1) != None:
|
||||
return s.group(0)
|
||||
else:
|
||||
n = s.group(2)
|
||||
return '<a href="http://bugs.gnome.org/db/%s/%s.html">#%s</a>' % (n[0:2], n, n)
|
||||
|
||||
def bugify(str):
|
||||
str = re.sub ("(<[^>]*>)|#(\d+)", bug_subst, str)
|
||||
return htmlify(str)
|
||||
|
||||
def make_id(str):
|
||||
return re.sub ("[^a-z]","-", string.lower(str))
|
||||
|
||||
class ParseError (Exception):
|
||||
pass
|
||||
|
||||
class Entry:
|
||||
def __init__(self):
|
||||
self.description = None
|
||||
self.title = None
|
||||
self.url = None
|
||||
self.contact = None
|
||||
self.bugs = None
|
||||
|
||||
def set_size(self, size):
|
||||
size = string.lower(size)
|
||||
if size == "small":
|
||||
self.size = "Small"
|
||||
elif size == "medium":
|
||||
self.size = "Medium"
|
||||
elif size == "big":
|
||||
self.size = "Big"
|
||||
else:
|
||||
raise ParseError, 'size must be "small", "medium", or "big"'
|
||||
|
||||
def output(self):
|
||||
if self.size == "Big":
|
||||
bgcolor = "#88bb88"
|
||||
elif self.size == "Medium":
|
||||
bgcolor = "#b4d4b4"
|
||||
else:
|
||||
bgcolor = "#d0e0d0"
|
||||
|
||||
print '''<table cellspacing="0" cellpadding="2" width="97%%" border="0" bgcolor="#000000">
|
||||
<tbody><tr><td colspan=2>
|
||||
<table cellspacing="0" cellpadding="5" width="100%%" border="0" bgcolor="#ffffff">
|
||||
<tbody>
|
||||
<tr bgcolor="%s">
|
||||
<td align="left"><font size="+1">%s</font></font></td>
|
||||
<td align="left" width="20%%"><b>Size</b>: %s</td>
|
||||
<td align="center" width="20%%"><b>Status</b>: %s</td>
|
||||
<td align="right" width="20%%"><b>Target Version</b>: %s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4>
|
||||
%s
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>''' % (bgcolor, self.title, self.size, self.status, self.target, htmlify(self.description))
|
||||
|
||||
if self.url != None:
|
||||
print '''<tr><td width="0"><b>More Info</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % htmlify (self.url)
|
||||
|
||||
if self.bugs != None:
|
||||
print '''<tr><td width="0"><b>Bug Reports</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % bugify (self.bugs)
|
||||
|
||||
if self.contact != None:
|
||||
print '''<tr><td width="0"><b>Contact</b>:</td>
|
||||
<td>%s</td>
|
||||
</tr>''' % htmlify (self.contact)
|
||||
|
||||
print '''</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</td></tr></tbody></table>
|
||||
'''
|
||||
|
||||
class Section:
|
||||
def __init__(self):
|
||||
self.title = None
|
||||
self.entries = []
|
||||
|
||||
def output(self):
|
||||
|
||||
print '<h2><a name="%s">%s</a></h2>' % (make_id(self.title), self.title)
|
||||
|
||||
first = 1
|
||||
for entry in self.entries:
|
||||
if not first:
|
||||
print "<br>"
|
||||
first = 0
|
||||
entry.output()
|
||||
|
||||
class TodoParser (xmllib.XMLParser):
|
||||
def __init__(self):
|
||||
xmllib.XMLParser.__init__(self)
|
||||
|
||||
self.in_todo = 0
|
||||
self.in_data = 0
|
||||
self.data = ""
|
||||
self.section = None
|
||||
self.entry = None
|
||||
self.logourl = None
|
||||
self.title = None
|
||||
self.sections = []
|
||||
|
||||
self.entitydefs = {}
|
||||
|
||||
def start_todo(self,attributes):
|
||||
if self.in_todo:
|
||||
raise ParseError, "<todo> tags may not be nested"
|
||||
if attributes.has_key ("logourl"):
|
||||
self.logourl = attributes["logourl"]
|
||||
self.in_todo = 1
|
||||
|
||||
def end_todo(self):
|
||||
self.in_todo = 0
|
||||
|
||||
def start_section(self,attributes):
|
||||
if self.section:
|
||||
raise ParseError, "<section> tags may not be nested"
|
||||
|
||||
self.section = Section()
|
||||
|
||||
def end_section(self):
|
||||
if self.section.title == None:
|
||||
raise ParseError, "<section> requires <title>"
|
||||
|
||||
self.sections.append(self.section)
|
||||
self.section = None
|
||||
|
||||
def start_title(self,attributes):
|
||||
if not self.in_todo:
|
||||
raise ParseError, "<title> tag must be in <todo>, <section> or <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <title> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_title(self):
|
||||
self.in_data = 0
|
||||
if self.entry:
|
||||
self.entry.title = self.data
|
||||
elif self.section:
|
||||
self.section.title = self.data
|
||||
else:
|
||||
self.title = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_description(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<description> tag must be in <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <description> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_description(self):
|
||||
self.in_data = 0
|
||||
self.entry.description = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_url(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<url> tag must be in <entry>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <url> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_url(self):
|
||||
self.in_data = 0
|
||||
self.entry.url = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_contact(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<contact> tag must be in <contact>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <contact> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_contact(self):
|
||||
self.in_data = 0
|
||||
self.entry.contact = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_bugs(self,attributes):
|
||||
if not self.entry:
|
||||
raise ParseError, "<bugs> tag must be in <bugs>"
|
||||
if self.in_data:
|
||||
raise ParseError, "Unexpected <bugs> tag in content"
|
||||
self.in_data = 1
|
||||
|
||||
def end_bugs(self):
|
||||
self.in_data = 0
|
||||
self.entry.bugs = self.data
|
||||
self.data = ""
|
||||
|
||||
def start_entry(self,attributes):
|
||||
if not self.section:
|
||||
raise ParseError, "<entry> tag must be in <section>"
|
||||
if self.entry:
|
||||
raise ParseError, "<entry> tags may not be nested"
|
||||
|
||||
self.entry = Entry()
|
||||
|
||||
if not attributes.has_key("size"):
|
||||
raise ParseError, '"size" attribute required for entry'
|
||||
self.entry.set_size(attributes["size"])
|
||||
|
||||
if not attributes.has_key("status"):
|
||||
raise ParseError, '"status" attribute (completion percentage) required for entry'
|
||||
self.entry.status=attributes["status"]
|
||||
|
||||
if not attributes.has_key("target"):
|
||||
raise ParseError, '"target" attribute (target version) required for entry'
|
||||
self.entry.target=attributes["target"]
|
||||
|
||||
def end_entry(self):
|
||||
if self.entry.title == None:
|
||||
raise ParseError, "<entry> requires <title>"
|
||||
|
||||
if self.entry.description == None:
|
||||
raise ParseError, "<entry> requires <description>"
|
||||
|
||||
self.section.entries.append(self.entry)
|
||||
self.entry = None
|
||||
|
||||
def handle_data(self,data):
|
||||
if self.in_data:
|
||||
self.data = self.data + data
|
||||
|
||||
def unknown_starttag(self,tag,attributes):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unexpected start tag: " + tag
|
||||
else:
|
||||
self.data = self.data + "<" + tag
|
||||
for (key,val) in attributes.items():
|
||||
self.data = self.data + ' %s="%s"' % (key,val)
|
||||
self.data = self.data + ">"
|
||||
|
||||
def unknown_endtag(self,tag):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unexpected end tag: " + tag
|
||||
else:
|
||||
self.data = self.data + "</%s>" % tag
|
||||
|
||||
def syntax_error(self, err):
|
||||
if re.match("reference to unknown entity", err):
|
||||
pass
|
||||
else:
|
||||
xmllib.XMLParser.syntax_error (self, err)
|
||||
|
||||
def unknown_entityref(self,ref):
|
||||
if not self.in_data:
|
||||
raise ParseError, "Unknown entity &" + ref + ";"
|
||||
else:
|
||||
self.data = self.data + "&" + ref + ";"
|
||||
|
||||
file = open(sys.argv[1])
|
||||
parser = TodoParser()
|
||||
|
||||
lineno = 1
|
||||
while 1:
|
||||
line = file.readline()
|
||||
if line == "":
|
||||
break
|
||||
|
||||
try:
|
||||
parser.feed(line)
|
||||
except ParseError, err:
|
||||
sys.stderr.write("Parse error at line " + `lineno` + ": " + err.__str__() + "\n")
|
||||
sys.exit(1)
|
||||
except RuntimeError, err:
|
||||
sys.stderr.write(err.__str__() + "\n")
|
||||
sys.exit(1)
|
||||
|
||||
lineno = lineno + 1
|
||||
|
||||
parser.close()
|
||||
if parser.title == None:
|
||||
sys.stderr.write ("<todo> Document must have a <title>\n")
|
||||
sys.exit (1)
|
||||
|
||||
print '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>%s</title>
|
||||
</head>
|
||||
<body bgcolor="#ffffff">
|
||||
<table width="100%%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<h1>%s</h1>''' % (parser.title, parser.title)
|
||||
|
||||
|
||||
for section in parser.sections:
|
||||
ntasks = len(section.entries)
|
||||
id = make_id (section.title)
|
||||
if ntasks == 1:
|
||||
print '<a href="#%s">%s</a> (1 item)<br>' % (id,section.title)
|
||||
else:
|
||||
print '<a href="#%s">%s</a> (%d items)<br>' % (id,section.title,ntasks)
|
||||
|
||||
print '''
|
||||
</td>'''
|
||||
if parser.logourl != None:
|
||||
print ''' <td align="right">
|
||||
<img src="%s" alt="Logo"></img>
|
||||
</td>''' % parser.logourl
|
||||
print '''
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
'''
|
||||
|
||||
first = 1
|
||||
for section in parser.sections:
|
||||
if not first:
|
||||
print "<br><br>"
|
||||
first = 0
|
||||
section.output()
|
||||
|
||||
print '''</body>
|
||||
</html>'''
|
||||
|
||||
|
@@ -1,242 +0,0 @@
|
||||
|
||||
=head1 NAME
|
||||
|
||||
gtk_button - GTK+ push button widget
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
#include <gtk/gtkbutton.h>
|
||||
|
||||
GtkType gtk_button_get_type (void);
|
||||
GtkWidget* gtk_button_new (void);
|
||||
GtkWidget* gtk_button_new_with_label (const gchar *label);
|
||||
void gtk_button_pressed (GtkButton *button);
|
||||
void gtk_button_released (GtkButton *button);
|
||||
void gtk_button_clicked (GtkButton *button);
|
||||
void gtk_button_enter (GtkButton *button);
|
||||
void gtk_button_leave (GtkButton *button);
|
||||
void gtk_button_set_relief (GtkButton *button,
|
||||
GtkReliefStyle style);
|
||||
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This widget is a standard push button widget. Push button widgets
|
||||
are generally used for allowing the user to click on them to initiate
|
||||
a command.
|
||||
|
||||
This widget is a container widget which contains one child.
|
||||
|
||||
=head1 OBJECT HIERARCHY
|
||||
|
||||
gtk_object
|
||||
gtk_widget
|
||||
gtk_container
|
||||
gtk_button
|
||||
|
||||
=head1 SIGNAL PROTOTYPES
|
||||
|
||||
"clicked" void user_function (GtkWidget *widget, gpointer data);
|
||||
"pressed" void user_function (GtkWidget *widget, gpointer data);
|
||||
"released" void user_function (GtkWidget *widget, gpointer data);
|
||||
"enter" void user_function (GtkWidget *widget, gpointer data);
|
||||
"leave" void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
=head1 USAGE
|
||||
|
||||
=head2 Creation
|
||||
|
||||
The most common way to create a button is with a label in it, which
|
||||
contains text for the user to read. The child of the button will then
|
||||
be a L<gtk_label(3)> widget with the text you passwd in. You can
|
||||
do this in one command:
|
||||
|
||||
GtkWidget *button;
|
||||
button = gtk_button_new_with_label ("This is a button");
|
||||
|
||||
To create a gtk_button widget which does not already have a child,
|
||||
use gtk_button_new():
|
||||
|
||||
GtkWidget *button;
|
||||
button = gtk_button_new ();
|
||||
|
||||
After you have created a button you can then add a widget to the
|
||||
button (such as a label or pixmap) using gtk_container_add(). See
|
||||
L<gtk_container(3)> for more information on adding widgets to
|
||||
containers.
|
||||
|
||||
=head2 Creating a pixmap in a button in a window
|
||||
|
||||
After we have an empty gtk_button, such as above, and we have a gtk_pixmap,
|
||||
we can simply add the gtk_pixmap to the gtk_button with gtk_container_add().
|
||||
|
||||
The following code will open the file "gimp.xpm" and place it in a
|
||||
button.
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
GtkWidget *pixmap;
|
||||
GtkStyle *style;
|
||||
GdkPixmap *gdkpixmap;
|
||||
GdkBitmap *mask;
|
||||
char *filename = "gimp.xpm";
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), button);
|
||||
|
||||
/* The button is realized now, which creates button->window
|
||||
used below to create the pixmap. */
|
||||
gtk_widget_realize (button);
|
||||
|
||||
style = gtk_widget_get_style (button);
|
||||
gdkpixmap = gdk_pixmap_create_from_xpm (button->window, &mask,
|
||||
&style->bg[GTK_STATE_NORMAL],
|
||||
filename);
|
||||
pixmap = gtk_pixmap_new (gdkpixmap, mask);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (button), pixmap);
|
||||
|
||||
gtk_widget_show (pixmap);
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
=head2 Different reliefs
|
||||
|
||||
Reliefs affect how the shadowing of the button is drawn. The different
|
||||
types of relief styles are:
|
||||
|
||||
GTK_RELIEF_NORMAL
|
||||
GTK_RELIEF_HALF
|
||||
GTK_RELIEF_NONE
|
||||
|
||||
When set to a normal relief, the widget looks and acts like a normal
|
||||
button. When half or none relief is used, shadowing is only drawn when the
|
||||
mouse cursor is over the widget.
|
||||
|
||||
To set the relief, use gtk_button_set_relief(), like:
|
||||
|
||||
gtk_button_set_relief (button, GTK_RELIEF_HALF);
|
||||
|
||||
To get the current relief of a button, use gtk_button_get_relief():
|
||||
|
||||
GtkReliefStyle relief;
|
||||
relief = gtk_button_get_relief (GTK_BUTTON (button));
|
||||
|
||||
=head2 Executing a command when the button is pressed
|
||||
|
||||
To execute a function when a button is pressed, use
|
||||
gtk_signal_connect() to connect to the "clicked" signal.
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (user_function),
|
||||
NULL);
|
||||
|
||||
user_function is a user defined function, like the following:
|
||||
|
||||
void user_function (GtkWidget *button, gpointer data)
|
||||
{
|
||||
printf("clicked\n");
|
||||
}
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
GtkType gtk_button_get_type (void);
|
||||
|
||||
This function returns the GtkType which is assigned to the
|
||||
object class for gtk_button.
|
||||
|
||||
GtkWidget* gtk_button_new (void);
|
||||
|
||||
This functions returns a new button widget which can then be
|
||||
used as a container for another widget.
|
||||
|
||||
GtkWidget* gtk_button_new_with_label (const gchar *label);
|
||||
|
||||
This function returns a new button widget with a label widget
|
||||
as a child. The label widget will have the text passed into
|
||||
the commant.
|
||||
|
||||
void gtk_button_pressed (GtkButton *button);
|
||||
|
||||
This function sends a "pressed" signal to the button.
|
||||
|
||||
void gtk_button_released (GtkButton *button);
|
||||
|
||||
This function sends a "released" signal to the button.
|
||||
|
||||
void gtk_button_clicked (GtkButton *button);
|
||||
|
||||
This function sends a "clicked" signal to the button.
|
||||
|
||||
void gtk_button_enter (GtkButton *button);
|
||||
|
||||
This function sends a "enter" signal to the button.
|
||||
|
||||
void gtk_button_leave (GtkButton *button);
|
||||
|
||||
This function sends a "leave" signal to the button.
|
||||
|
||||
void gtk_button_set_relief (GtkButton *button, GtkReliefStyle style);
|
||||
|
||||
This function is sets the GtkReliefStyle of the button. The
|
||||
relief style is one of: GTK_RELIEF_NORMAL, GTK_RELIEF_HALF,
|
||||
or GTK_RELIEF_NONE. The relief determines when the shadow of
|
||||
the button is drawn.
|
||||
|
||||
GtkReliefStyle gtk_button_get_relief (GtkButton *button);
|
||||
|
||||
This function returns the current relief of the button.
|
||||
|
||||
=head1 SIGNALS
|
||||
|
||||
"clicked"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the button is clicked. A click is
|
||||
a press and release of the button when the cursor is
|
||||
inside the button on release.
|
||||
|
||||
"pressed"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the left mouse button is pressed.
|
||||
|
||||
"released"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Gets emitted when the left mouse button is released and
|
||||
the widget was previously pressed.
|
||||
|
||||
"enter"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Emitted when the mouse cursor enters the button.
|
||||
|
||||
"leave"
|
||||
|
||||
void user_function (GtkWidget *widget, gpointer data);
|
||||
|
||||
Emitted when the mouse cursor leaves the button.
|
||||
|
||||
=head1 AUTHORS
|
||||
|
||||
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
|
||||
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.
|
||||
|
||||
|
@@ -1,99 +0,0 @@
|
||||
#! /bin/sh
|
||||
# package_tutorial.sh - Package up the tutorial into various formats
|
||||
# Copyright (C) Tony Gale 1999
|
||||
# Contact: gale@gtk.org
|
||||
#
|
||||
# NOTE: This script requires the following to be installed:
|
||||
# o SGML Tools
|
||||
# o Latex
|
||||
# o DVI tools
|
||||
|
||||
TARGET=`pwd`/gtk_tut.sgml
|
||||
GIFS="`pwd`/*.gif"
|
||||
EXAMPLES=`pwd`/../examples
|
||||
|
||||
PATH=`pwd`:$PATH
|
||||
|
||||
DATE=`date '+%y%m%d'`
|
||||
|
||||
# Check top level directory
|
||||
if [ ! -d gtk_tutorial ]; then
|
||||
if [ -e gtk_tutorial ]; then
|
||||
echo "ERROR: gtk_tutorial is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir gtk_tutorial.$DATE
|
||||
fi
|
||||
|
||||
cd gtk_tutorial.$DATE
|
||||
|
||||
# SGML Format
|
||||
echo -n "Copy SGML and GIF's.... "
|
||||
if [ ! -d sgml ]; then
|
||||
if [ -e sgml ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir sgml
|
||||
fi
|
||||
|
||||
(cd sgml ; cp $TARGET . ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# HTML Format
|
||||
echo -n "Formatting into HTML.... "
|
||||
if [ ! -d html ]; then
|
||||
if [ -e html ]; then
|
||||
echo "ERROR: html is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir html
|
||||
fi
|
||||
|
||||
(cd html ; sgml2html $TARGET ; cp $GIFS .)
|
||||
echo "done"
|
||||
|
||||
# Text Format
|
||||
echo -n "Formatting into Text.... "
|
||||
if [ ! -d txt ]; then
|
||||
if [ -e txt ]; then
|
||||
echo "ERROR: txt is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir txt
|
||||
fi
|
||||
|
||||
(cd txt ; sgml2txt -f $TARGET 2>&1 > /dev/null )
|
||||
echo "done"
|
||||
|
||||
# PS and DVI Format
|
||||
echo -n "Formatting into PS and DVI.... "
|
||||
if [ ! -d ps ]; then
|
||||
if [ -e ps ]; then
|
||||
echo "ERROR: ps is not a directory"
|
||||
exit
|
||||
fi
|
||||
mkdir ps
|
||||
fi
|
||||
|
||||
(cd ps ; sgml2latex --output=ps $TARGET > /dev/null)
|
||||
(cd ps ; sgml2latex $TARGET > /dev/null)
|
||||
echo "done"
|
||||
|
||||
# Copy examples
|
||||
echo -n "Copying examples"
|
||||
cp -R $EXAMPLES .
|
||||
(cd examples ; make clean ; rm -rf CVS */CVS)
|
||||
echo "done"
|
||||
|
||||
# Package it all up
|
||||
echo -n "Creating packages.... "
|
||||
cd ..
|
||||
tar cvfz gtk_tutorial.$DATE.tar.gz gtk_tutorial.$DATE
|
||||
echo "done"
|
||||
|
||||
rm -rf gtk_tutorial.$DATE
|
||||
|
||||
echo
|
||||
echo Package gtk_tutorial.$DATE.tar.gz created.
|
||||
echo
|
@@ -1,315 +0,0 @@
|
||||
The Reference Counting Scheme of GDK an GTK+
|
||||
============================================
|
||||
|
||||
Each data structure that provides reference counting offers a bunch of
|
||||
functions that follow these conventions:
|
||||
|
||||
*_new: Create a new structure with a reference count of 1.
|
||||
*_ref: Increase ref count by one.
|
||||
*_unref: Decrease ref count by one. If the count drops to zero,
|
||||
run appropriate finalization code and free the memory.
|
||||
For data structures with a _destroy function, it will be
|
||||
invoked at this point, if the data structure is not
|
||||
already in a destroyed state.
|
||||
|
||||
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.
|
||||
*_sink: Clear a GtkObjects `floating' state and decrement the
|
||||
reference count by 1.
|
||||
|
||||
GdkWindow
|
||||
---------
|
||||
|
||||
A GdkWindow has to be explicitely destroyed with gdk_window_destroy.
|
||||
This will send out a request to destroy this window and all its
|
||||
children, and will decrement the ref_count of the GdkWindow by one.
|
||||
Thus, it releases the inital reference created by gdk_window_new.
|
||||
|
||||
All GdkWindows are kept in a hash table to translate from their XId to
|
||||
the actual structure and the pointer in the hash table is reflected in
|
||||
the reference count. When a DestroyNotify event is received for a
|
||||
particular GdkWindow, it is removed from the hash table and the
|
||||
ref_count is updated accordingly.
|
||||
|
||||
You can call gdk_window_destroy more than once on a particular
|
||||
GdkWindow, it will only be destroyed when it hasn't been yet. The
|
||||
ref_count is *always* decremented, tho. Be careful.
|
||||
|
||||
Remark: When writing NO_WINDOW widgets, care should be taken about
|
||||
proper referencing/unreferencing of the parent's GdkWindow
|
||||
that is used by the widget.
|
||||
|
||||
GdkPixmap
|
||||
---------
|
||||
|
||||
There is no gdk_pixmap_destroy function. The Pixmap is destroyed when
|
||||
the last reference to it vanishes.
|
||||
|
||||
GdkPixmaps are kept in the same hash table as GdkWindows but the
|
||||
pointer in the hash table is *not* reflected in the ref_count.
|
||||
|
||||
This works only when Pixmaps never get XEvents. I'm not sure if this
|
||||
is the case.
|
||||
|
||||
GdkBitmap
|
||||
---------
|
||||
|
||||
A GdkBitmap is only another name for a special use of GdkPixmap.
|
||||
|
||||
GdkVisual
|
||||
---------
|
||||
|
||||
There are no *_new or *_destroy functions and the *_ref and *_unref
|
||||
functions are noops. GdkVisuals are static structures and thus do not
|
||||
need reference counting. The ref counting functions are only there
|
||||
for extra defensive programming.
|
||||
|
||||
GdkColormap
|
||||
-----------
|
||||
|
||||
Nothing special. There is no gdk_colormap_destroy function.
|
||||
|
||||
GdkFont / GdkFontSet
|
||||
--------------------
|
||||
|
||||
GdkFont and GdkFontSet are equivalent as far as ref counting is
|
||||
concerned. Use gdk_font_ref and gdk_font_unref for both.
|
||||
|
||||
There is no gdk_font_free or gdk_fontset_free function.
|
||||
|
||||
GtkAcceleratorTable
|
||||
-------------------
|
||||
|
||||
There is no gtk_accelerator_table_destroy function.
|
||||
|
||||
GtkTooltips
|
||||
-----------
|
||||
|
||||
There is no gtk_tooltips_destroy function.
|
||||
|
||||
GtkStyle
|
||||
--------
|
||||
|
||||
There is no gtk_style_destroy function.
|
||||
|
||||
GtkObject
|
||||
---------
|
||||
|
||||
GtkObjects follow the usual ref_counting strategy, but with a twist.
|
||||
|
||||
They are created with a ref_count of 1. GtkObjects are able to
|
||||
run finalization code when the ref_count drops to zero but you cannot
|
||||
register arbitrary signal handlers to run at finalization time.
|
||||
|
||||
There is also the old gtk_object_destroy function and the "destroy"
|
||||
signal but they are somewhat independent from finalization. Just as
|
||||
stated at the top of this text, gtk_object_destroy merely renders an
|
||||
object unusable. When the object is a container widget for example,
|
||||
it unrealizes that widget, removes all children and disconnects all
|
||||
signal handlers. The finalization code is different, it would for
|
||||
example free associated memory for text strings and release the
|
||||
attached style.
|
||||
|
||||
This is the biggest change. Every widget must be revised to have a
|
||||
proper "destroy" function, etc. Such a destroy function will only
|
||||
be called once and is expected to leave the widget in a minimal but
|
||||
consistent state. Widgets that have been "destroyed" but not yet
|
||||
finalized are flagged with GTK_DESTROY. The "finalization" function
|
||||
is new and should perform last-minute cleanup actions, in contrast
|
||||
to the destroy function it will not be emitted as signal though.
|
||||
It can assume that the "destroy" function has been called as the
|
||||
last function on this widget.
|
||||
|
||||
Essentially, the old "destroy" function has been split into a
|
||||
"finalize" plus a "destroy" function.
|
||||
|
||||
It is not possible to create GtkObjects with a ref_count of 0
|
||||
because the first ref/unref pair will destroy it unintentionally.
|
||||
|
||||
To be mostly backward compatible with existing practice, a GtkObject
|
||||
leads a more complicated life than the other reference counted structures.
|
||||
|
||||
When a GtkObject is created, it starts out in a special state called
|
||||
"floating" (this is the twist). This means that it is alive and has a
|
||||
reference to it, but the `owner' of this reference is not known.
|
||||
There are certain `potential owners' that will adopt a floating
|
||||
GtkObject. For GtkWidgets the most common adopters are the parent
|
||||
widget.
|
||||
|
||||
When you want to adopt a possibly floating GtkObject, you call
|
||||
gtk_object_sink on it. This clears the floating state of the
|
||||
GtkObject and decrements the ref_count by one, if it has been floating
|
||||
previously. Once the floating state has been cleared, it will never
|
||||
be set again.
|
||||
|
||||
All widgets that are part of the display are linked into a
|
||||
parent/child tree. The link from the parent to a child is reflected
|
||||
in the ref_count of the child, but the link from the child to the
|
||||
parent is not reflected in the ref_count of the parent.
|
||||
|
||||
Like a GtkObject, a GtkWidget is created with a ref_count of 1 and
|
||||
initially flagged as `floating'. As soon as it is added as a child to
|
||||
a parent, the `floating' flag is cleared and never will be set again.
|
||||
Not even when it is later unparented. The act of clearing the
|
||||
`floating' flag also decrements the ref_count of the widget by one.
|
||||
|
||||
When the widget is unparented, its underlying GdkWindow is destroyed
|
||||
(when it has one), it loses its reference from the parent and
|
||||
naturally the ref_count is decremented.
|
||||
|
||||
It is considered a bug if a widget still has a GdkWindow when it is
|
||||
being freed.
|
||||
|
||||
Toplevel widgets, which don't have a `natural' parent, are adopted by
|
||||
special registering functions. Because the of the reference count that
|
||||
is set by the registering functions, toplevel widgets will have to be
|
||||
explicitly destroyed, with the exception of GtkMenus. GtkMenus are a
|
||||
special case of toplevel widgets in that they will be `attached' to and
|
||||
`detached' from other widgets. The act of attaching a GtkMenu to a
|
||||
widget will be reflected in its reference count. The act of detaching
|
||||
a GtkMenu will revert that. Therefore GtkMenus naturally get destroyed
|
||||
and finalized once they are detached from their reference holder.
|
||||
|
||||
So, the typical career of a GtkWindow a GtMenu attached to a
|
||||
GtkOptionMenu looks like this:
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
/* window is created with ref_count == 1. It is not flagged as
|
||||
* `floating' because it has already been registered as a toplevel
|
||||
* widget.
|
||||
*/
|
||||
|
||||
option_menu = gtk_option_menu_new ();
|
||||
/* option_menu->ref_count == 1 and it is flagged as `floating'.
|
||||
*/
|
||||
|
||||
gtk_container_add (window, option_menu);
|
||||
/* option_menu->ref_count still == 1, but it is no longer `floating'.
|
||||
*/
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
/* menu->ref_count == 1 and it is flagged as `floating'.
|
||||
*/
|
||||
|
||||
menu_item = gtk_menu_item_new_with_label ("Choose Me");
|
||||
/* menu_item->ref_count == 1 and it is flagged as `floating'.
|
||||
*/
|
||||
|
||||
gtk_menu_append (GTK_MENU (menu), menu_item);
|
||||
/* menu_item->ref_count still == 1, but it is no longer `floating'.
|
||||
*/
|
||||
|
||||
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
|
||||
/* menu->ref_count still == 1, but it is no longer `floating'.
|
||||
*/
|
||||
|
||||
gtk_widget_show (menu_item);
|
||||
gtk_widget_show (option_menu);
|
||||
gtk_widget_show (window);
|
||||
|
||||
/* The widgets get their GdkWindows, nothing significant happens to
|
||||
* the ref_counts.
|
||||
*/
|
||||
|
||||
Then, when the user wants to get rid of the window:
|
||||
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
/* The GdkWindow of `window' and all its child GdkWindows are
|
||||
* destroyed.
|
||||
*
|
||||
* window is unregistered from the loplevel list and its ref_count
|
||||
* drops to zero. The destroy code of `window' destroyes `option_menu'.
|
||||
*
|
||||
* The destroy code of `option_menu' causes the `menu' to be detached
|
||||
* from it and its reference count drops to zero.
|
||||
*
|
||||
* The destroy code of `menu' destroyes `menu_item'.
|
||||
*
|
||||
* The destruction of `menu_item' removes it from its parent, the
|
||||
* menu_item->ref_count drops to zero and `menu_item' is finalized (freed).
|
||||
*
|
||||
* Now `menu', `option_menu' and `window' will be destroyed and finalized,
|
||||
* in this order, since the reference count of each is zero.
|
||||
*/
|
||||
|
||||
|
||||
Taking care of proper referencing
|
||||
---------------------------------
|
||||
|
||||
There are some cases where referencing of widgets from outside the toolkit
|
||||
(on the application side) is needed.
|
||||
Once the application performes an operation on a widget that will cause
|
||||
its reference count to drop, if it wants to take further actions on the
|
||||
widget, it needs to hold a reference to it.
|
||||
|
||||
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.
|
||||
*/
|
||||
gtk_widget_ref (widget);
|
||||
gtk_container_remove (container, widget);
|
||||
/* without the reference count, the widget would have been destroyed here.
|
||||
*/
|
||||
gtk_container_add (container, widget);
|
||||
gtk_widget_unref (widget);
|
||||
|
||||
|
||||
/* all items in item_list need to be referenced
|
||||
* before gtk_list_remove_items() is invoked.
|
||||
* this is somewhat tricky as gtk_list_append_items/gtk_list_prepend_items/
|
||||
* gtk_list_insert_items will take over the lists nodes.
|
||||
* we therefore have an extra GSList `*slist' for later unreferencing.
|
||||
*/
|
||||
slist = NULL;
|
||||
for (list = item_list; list; list = list->next)
|
||||
{
|
||||
gtk_widget_ref (GTK_WIDGET (list->data));
|
||||
slist = g_slist_prepend (slist, list->data);
|
||||
}
|
||||
gtk_list_remove_items (list, item_list);
|
||||
gtk_list_append_items (other_list, item_list);
|
||||
/* gtk_list_prepend_items (other_list, item_list); */
|
||||
/* gtk_list_insert_items (other_list, item_list, 3); */
|
||||
while (slist)
|
||||
{
|
||||
GSList *tmp;
|
||||
|
||||
tmp = slist;
|
||||
slist = slist->next;
|
||||
gtk_widget_unref (GTK_WIDGET (tmp->data));
|
||||
g_slist_free_1 (tmp);
|
||||
}
|
||||
|
||||
/* Alternatively to the removal above you could just use
|
||||
* gtk_list_remove_items_no_unref() which will add the additional
|
||||
* reference count to the widget.
|
||||
*/
|
||||
gtk_list_remove_items_no_unref (list, item_list);
|
||||
gtk_list_prepend_items (other_list, item_list);
|
||||
|
||||
|
||||
Now a (hopefully) complete list of functions that require
|
||||
wrappers similar to the examples above:
|
||||
|
||||
void gtk_container_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
void gtk_list_remove_items (GtkList *list,
|
||||
GList *items);
|
||||
void gtk_tree_remove_items (GtkTree *tree,
|
||||
GList *items);
|
||||
void gtk_tree_item_remove_subtree (GtkTreeItem *tree_item);
|
||||
void gtk_menu_item_remove_submenu (GtkMenuItem *menu_item);
|
||||
void gtk_option_menu_remove_menu (GtkOptionMenu *option_menu);
|
||||
|
||||
|
||||
|
||||
Initial proposal:
|
||||
- Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
Some modifications/additions, "Taking care of proper referencing" and
|
||||
reference counting solution for GtkMenus:
|
||||
- Tim Janik <timj@gimp.org>
|
@@ -1,7 +0,0 @@
|
||||
Damon Chaplin <damon@karuna.freeserve.co.uk> and others.
|
||||
|
||||
See:
|
||||
|
||||
http://www.gtk.org/rdp/status.html
|
||||
|
||||
for a complete list.
|
@@ -1,30 +0,0 @@
|
||||
This work may be reproduced and distributed in whole or in part, in
|
||||
any medium, physical or electronic, so as long as this copyright
|
||||
notice remains intact and unchanged on all copies. Commercial
|
||||
redistribution is permitted and encouraged, but you may not
|
||||
redistribute, in whole or in part, under terms more restrictive than
|
||||
those under which you received it. If you redistribute a modified or
|
||||
translated version of this work, you must also make the source code to
|
||||
the modified or translated version available in electronic form
|
||||
without charge. However, mere aggregation as part of a larger work
|
||||
shall not count as a modification for this purpose.
|
||||
|
||||
All code examples in this work are placed into the public domain,
|
||||
and may be used, modified and redistributed without restriction.
|
||||
|
||||
BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE WORK "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. SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY REPAIR OR CORRECTION.
|
||||
|
||||
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 WORK 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
|
||||
WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
@@ -1,223 +0,0 @@
|
||||
2000-02-28 Damon Chaplin <damon@helixcode.com>
|
||||
|
||||
* gtk/tmpl/gtkradiomenuitem.sgml:
|
||||
* gtk/tmpl/gtkmenuitem.sgml:
|
||||
* gtk/tmpl/gtknotebook.sgml: new menu item sections and minor update to
|
||||
notebook section from Nicolas GEORGE <nicolas.george@ens.fr>.
|
||||
|
||||
2000-02-18 Damon Chaplin <damon@helixcode.com>
|
||||
|
||||
* gtk/tmpl/gtktooltips.sgml: patch from
|
||||
David Benson <daveb@idealab.com> to note that gtk_tooltips_set_colors()
|
||||
does not work.
|
||||
|
||||
2000-02-09 Damon Chaplin <damon@helixcode.com>
|
||||
|
||||
* gdk/tmpl/input_methods.sgml: minor fix.
|
||||
|
||||
2000-02-03 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gdk/gdk-sections.txt: rearranged a bit.
|
||||
|
||||
* gdk/tmpl/event_structs.sgml: updated.
|
||||
|
||||
* gtk/gtk-sections.txt: added INCLUDE tag for Private Info section.
|
||||
|
||||
* gdk/tmpl/color_contexts.sgml: added note saying it is deprecated.
|
||||
* gdk/tmpl/dnd.sgml: added note saying read the GTK+ DnD docs.
|
||||
|
||||
2000-02-02 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gdk/tmpl/*.sgml: ran make templates.
|
||||
|
||||
* gdk/gdk-docs.sgml: rearranged sections.
|
||||
|
||||
* gdk/tmpl/events.sgml: documented.
|
||||
|
||||
* gdk/tmpl/general.sgml: documented.
|
||||
|
||||
* gdk/tmpl/rgb.sgml: fixed a few '@' -> '#'.
|
||||
|
||||
* gdk/gdk-sections.txt: rearranged a few bits, including moving
|
||||
GdkWChar and related functions from the input method section to the
|
||||
font section, and GdkCapStyle etc. from Drawing Primitives to GCs.
|
||||
|
||||
* gdk/tmpl/images.sgml: documented.
|
||||
|
||||
* gdk/tmpl/drawing.sgml: updated.
|
||||
|
||||
* gdk/tmpl/regions.sgml: updated.
|
||||
|
||||
* gdk/tmpl/input_contexts.sgml: documented.
|
||||
|
||||
* gdk/tmpl/input_methods.sgml: documented.
|
||||
|
||||
* gdk/tmpl/selections.sgml: changed xref to a link since Jade says
|
||||
a xref to a RefEntry is not supported.
|
||||
|
||||
2000-01-19 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkscrollbar.sgml: Started.
|
||||
|
||||
2000-01-08 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: update from Paul Schifferer
|
||||
<isengard@geocities.com>
|
||||
|
||||
Wed Jan 5 10:23:41 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkprogress.sgml: Missing </listitem>, remove extra <para>
|
||||
* gtk/tmpl/gtkobject.sgml: dos2unix
|
||||
* gtk/tmpl/gtkcurve.sgml: missing </para>
|
||||
* gtk/tmpl/gtkarg.sgml: dos2unix, missing </para>
|
||||
* gtk/tmpl/gtkcolorsel.sgml: Missing </listitem>'s
|
||||
* gtk/tmpl/gtksignal.sgml (signal): dos2unix, missing </para>'s
|
||||
* gtk/tmpl/gtkmarshal.sgml: Missing </refsect2>
|
||||
|
||||
1999-11-16 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkmenubar.sgml: fixed minor error - using <em>.
|
||||
|
||||
* gtk/tmpl/gtknotebook.sgml:
|
||||
* gtk/tmpl/gtklist.sgml: new sections from
|
||||
Nicolas George <george@clipper.ens.fr>, with help from
|
||||
"Bob Springett" <bobspringett@claranet.fr>.
|
||||
|
||||
* gtk/tmpl/gtkobject.sgml:
|
||||
* gtk/tmpl/gtkarg.sgml: new sections from
|
||||
David Benson <daveb@idealab.com>.
|
||||
|
||||
* gtk/tmpl/gtkvbox.sgml:
|
||||
* gtk/tmpl/gtkhbox.sgml: fixed line endings.
|
||||
|
||||
* gtk/tmpl/gtkvbbox.sgml: update from Lee Mallabone
|
||||
<lee0@callnetuk.com>
|
||||
|
||||
* gdk/tmpl/drawing.sgml: fixed error in gdk_draw_arc() @angle2 param
|
||||
- it is relative to @angle1 rather than from the 3 o'clock position.
|
||||
|
||||
* gtk/tmpl/gtkfontseldlg.sgml: changed enums to use @ fields.
|
||||
|
||||
* gtk/tmpl/gtkcolorsel.sgml:
|
||||
* gtk/tmpl/gtkcolorseldlg.sgml:
|
||||
* gtk/tmpl/gtkprogress.sgml:
|
||||
* gtk/tmpl/gtkprogressbar.sgml: new sections from Tom Martone
|
||||
<tom@martoneconsulting.com>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: partially written documentation from
|
||||
Paul Schifferer <isengard@geocities.com> who won't be able to finish it
|
||||
|
||||
1999-09-22 Martin Norb<72>ck <d95mback@dtek.chalmers.se>
|
||||
|
||||
* gtk/tmpl/gtkclist.sgml: Added information about the sorting functions
|
||||
|
||||
Tue Oct 26 16:50:15 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkrc.sgml: Added information about widget
|
||||
paths and pattern matching.
|
||||
|
||||
1999-09-22 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/*.sgml: ran make templates, to fix problems with structs.
|
||||
|
||||
* gtk/gtk-sections.txt: rearranged GtkCombo section.
|
||||
|
||||
* gtk/tmpl/gtkvseparator.sgml:
|
||||
* gtk/tmpl/gtkhseparator.sgml:
|
||||
* gtk/tmpl/gtkgc.sgml:
|
||||
* gtk/tmpl/gtkfeatures.sgml:
|
||||
* gtk/tmpl/gtktipsquery.sgml:
|
||||
* gtk/tmpl/gtkitem.sgml:
|
||||
* gtk/tmpl/gtkinvisible.sgml:
|
||||
* gtk/tmpl/gtkgamma.sgml:
|
||||
* gtk/tmpl/gtkdata.sgml:
|
||||
* gtk/tmpl/gtkcurve.sgml:
|
||||
* gtk/tmpl/gtkcombo.sgml:
|
||||
* gtk/tmpl/gtkaccellabel.sgml: documented.
|
||||
|
||||
1999-09-20 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/gtk-docs.sgml: added role="no-toc" to the GTK+ Widgets & Objects
|
||||
chapter since we've created our own special contents page.
|
||||
|
||||
1999-09-19 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkmarshal.sgml:
|
||||
* gtk/tmpl/gtksignal.sgml: new sections from
|
||||
David Benson <daveb@idealab.com>.
|
||||
|
||||
* gtk/gtk-sections.txt: rearranged signal sections, and made most
|
||||
marshallers private. Moved GtkSignalRunType to signals section.
|
||||
|
||||
* gtk/tmpl/gtkradiobutton.sgml: new section from Lee Mallabone.
|
||||
|
||||
1999-09-17 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/gtk-docs.sgml: removed menu factory and debugging sections.
|
||||
|
||||
* gtk/gtk-sections.txt: made menu factory stuff private since it is
|
||||
deprecated. Also made debugging stuff private since it is only useful
|
||||
within GTK+.
|
||||
|
||||
1999-09-14 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkfilesel.sgml: fixed mismatched parentheses.
|
||||
|
||||
1999-09-02 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gdk/tmpl/event_structs.sgml:
|
||||
* gdk/tmpl/drawing.sgml: minor fixes.
|
||||
|
||||
1999-09-20 David C. Mason <dcm@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkimage.sgml: first pass at gtkimage... not complete
|
||||
|
||||
1999-08-28 Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
* gtk/tmpl/gtkbbox.sgml: new section from Lee Mallabone.
|
||||
|
||||
* gdk/gdk-sections.txt: rearranged rgb, regions, and drawing sections.
|
||||
|
||||
* gdk/tmpl/rgb.sgml: new section from Raph Levien, with a few changes
|
||||
by me, including a little example app.
|
||||
|
||||
* gdk/tmpl/regions.sgml:
|
||||
* gdk/tmpl/event_structs.sgml:
|
||||
* gdk/tmpl/drawing.sgml: my first attempt.
|
||||
* gdk/tmpl/cursors.sgml: tiny changes.
|
||||
|
||||
Tue Aug 17 09:14:01 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtktypeutils.sgml: Fix corrupted end tag.
|
||||
|
||||
* gtk/tmpl/gtkselection.sgml gtk/tmpl/gtkrc.sgml
|
||||
gtk/tmpl/gtkdnd.sgml gtk/tmpl/gtkarrow.sgml
|
||||
gtk/tmpl/gtkpaned.sgml gtk/tmpl/gtkmisc.sgml
|
||||
gtk/tmpl/gtkhandlebox.sgml gtk/tmpl/gtkctree.sgml:
|
||||
Added missing close tags.
|
||||
|
||||
Thu Aug 19 14:43:08 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/tmpl/gcs.sgml gdk/gdk-sections.txt: Added section.
|
||||
(Written a while ago but fell through the cracks)
|
||||
|
||||
* gtk/gtk-docs.sgml: Add a &hash; entity here as a
|
||||
temporary hack. (There is no standard entity
|
||||
for '#', and no way of escaping '#' in gtk-doc)
|
||||
|
||||
* gtk/tmpl/gtkrc.sgml: Use the above to fix up #rrggbb
|
||||
string literals.
|
||||
|
||||
* gtk/tmpl/gtkdrawingarea.sgml: Fixed a couple
|
||||
of errors in the example. (pointed out by
|
||||
Nick Lamb)
|
||||
|
||||
Mon Aug 16 6:60:53 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/tmpl/properties.sgml
|
||||
gdk/tmpl/selections.sgml
|
||||
gdk/tmpl/input_devices.sgml: Documented
|
||||
|
||||
* gdk/gdk-sections.txt: Moved around types for
|
||||
input devices properties and selections, marked
|
||||
a few functions as private.
|
@@ -1,62 +0,0 @@
|
||||
This package contains the reference documentation
|
||||
for GTK+. For more information about GTK+
|
||||
see:
|
||||
|
||||
http://www.gtk.org
|
||||
|
||||
For information about contributing to the
|
||||
GLib/GTK+ reference documentation project, see:
|
||||
|
||||
http://www.gtk.org/rdp/
|
||||
|
||||
The GTK+ reference documentation is freely redistributable,
|
||||
see the file COPYING for details.
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
============
|
||||
|
||||
To build the documentation, you must have the gtk-doc
|
||||
package installed. To rebuild the template files,
|
||||
you must have the current version of the GTK+
|
||||
header files installed.
|
||||
|
||||
|
||||
BUILD
|
||||
=====
|
||||
|
||||
First, run configure to generate the makefiles for this
|
||||
module. There is one option specific to this package
|
||||
|
||||
--with-html-dir=DIR top of installed HTML documentation tree
|
||||
|
||||
|
||||
The Makefiles in the gdk/ and gtk/ subdirs each define three targets:
|
||||
|
||||
templates:
|
||||
|
||||
Scan the headers and merge the results with the current
|
||||
template files
|
||||
|
||||
sgml:
|
||||
|
||||
Generate SGML files using the DocBook DTD from
|
||||
the template files
|
||||
|
||||
html:
|
||||
|
||||
Generate HTML from the SGML files.
|
||||
|
||||
To build the documentation, do:
|
||||
|
||||
make sgml
|
||||
make html
|
||||
|
||||
You should only run the 'make templates' step if you
|
||||
need to regenerate the templates for a more recent
|
||||
version of the GTK+ sources.
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
make install
|
@@ -1,39 +0,0 @@
|
||||
Before making any changes to this module, please
|
||||
contact:
|
||||
|
||||
Damon Chaplin <damon@karuna.freeserve.co.uk>
|
||||
|
||||
This will ensure that duplicate work does not occur,
|
||||
and also make sure we know who has written what
|
||||
parts of the documentation. See
|
||||
|
||||
http://www.gtk.org/rdp/
|
||||
|
||||
for more information.
|
||||
|
||||
By contributing work to the Reference Documentation
|
||||
Project, you agree that it will be covered under the
|
||||
license terms described in the file COPYING
|
||||
included in this directory.
|
||||
|
||||
|
||||
Other notes:
|
||||
|
||||
- Do not run 'make templates' unless you have
|
||||
the latest cvs version of the gtk-1-2
|
||||
branch of GTK+ and the latest CVS version
|
||||
of gtk-doc.
|
||||
|
||||
(This is very important. Otherwise, the template
|
||||
files may be come corrupted.)
|
||||
|
||||
Make sure that gtk-config --prefix points
|
||||
to the correct version of GTK+.
|
||||
|
||||
- As always, ChangeLog entries should be made for
|
||||
each commit. These can be really brief
|
||||
"documented GHashTable"; but if you are editing
|
||||
something someone else wrote, please be specific.
|
||||
(Or better, send the changes to them for their
|
||||
approval, first)
|
||||
|
@@ -1,6 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
sgml
|
||||
html
|
||||
gdk-decl-list.txt
|
||||
gdk-unused.txt
|
@@ -1,50 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
|
||||
# We could alternatively use this for using installed headers.
|
||||
INCLUDE_DIR=`gtk-config --prefix`/include/gdk
|
||||
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
scan:
|
||||
gtkdoc-scan --module=$(DOC_MODULE) $(INCLUDE_DIR)/gdk.h $(INCLUDE_DIR)/gdktypes.h $(INCLUDE_DIR)/gdkrgb.h
|
||||
|
||||
templates: scan
|
||||
gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
|
||||
sgml:
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE)
|
||||
|
||||
html:
|
||||
if ! test -d html ; then mkdir html ; fi
|
||||
-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
|
||||
|
||||
maintainer-clean-local: clean
|
||||
rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
install -d -m 0755 $(TARGET_DIR)
|
||||
install -m 0644 html/*.html $(TARGET_DIR)
|
||||
install -m 0644 html/index.sgml $(TARGET_DIR)
|
||||
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
gdk-overrides.txt \
|
||||
gdk-decl.txt
|
||||
|
||||
dist-hook:
|
||||
mkdir $(distdir)/tmpl
|
||||
cp -p tmpl/*.sgml $(distdir)/tmpl
|
||||
|
||||
.PHONY : html sgml templates scan
|
File diff suppressed because it is too large
Load Diff
@@ -1,72 +0,0 @@
|
||||
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
|
||||
<!entity gdk-General SYSTEM "sgml/general.sgml">
|
||||
<!entity gdk-Bitmaps-and-Pixmaps SYSTEM "sgml/pixmaps.sgml">
|
||||
<!entity gdk-Images SYSTEM "sgml/images.sgml">
|
||||
<!entity gdk-GdkRGB SYSTEM "sgml/rgb.sgml">
|
||||
<!entity gdk-Colormaps-and-Colors SYSTEM "sgml/colors.sgml">
|
||||
<!entity gdk-Fonts SYSTEM "sgml/fonts.sgml">
|
||||
<!entity gdk-Drawing-Primitives SYSTEM "sgml/drawing.sgml">
|
||||
<!entity gdk-Graphics-Contexts SYSTEM "sgml/gcs.sgml">
|
||||
<!entity gdk-Visuals SYSTEM "sgml/visuals.sgml">
|
||||
<!entity gdk-Windows SYSTEM "sgml/windows.sgml">
|
||||
<!entity gdk-Selections SYSTEM "sgml/selections.sgml">
|
||||
<!entity gdk-Properties-and-Atoms SYSTEM "sgml/properties.sgml">
|
||||
<!entity gdk-Input-Methods SYSTEM "sgml/input_methods.sgml">
|
||||
<!entity gdk-Input-Contexts SYSTEM "sgml/input_contexts.sgml">
|
||||
<!entity gdk-Color-Contexts SYSTEM "sgml/color_contexts.sgml">
|
||||
<!entity gdk-Points-Rectangles-and-Regions SYSTEM "sgml/regions.sgml">
|
||||
<!entity gdk-Threads SYSTEM "sgml/threads.sgml">
|
||||
<!entity gdk-Key-Values SYSTEM "sgml/keys.sgml">
|
||||
<!entity gdk-Input-Devices SYSTEM "sgml/input_devices.sgml">
|
||||
<!entity gdk-Events SYSTEM "sgml/events.sgml">
|
||||
<!entity gdk-Event-Structures SYSTEM "sgml/event_structs.sgml">
|
||||
<!entity gdk-Cursors SYSTEM "sgml/cursors.sgml">
|
||||
<!entity gdk-Input SYSTEM "sgml/input.sgml">
|
||||
<!entity gdk-Drag-and-Drop SYSTEM "sgml/dnd.sgml">
|
||||
]>
|
||||
<book id="index">
|
||||
<bookinfo>
|
||||
<title>GDK Reference Manual</title>
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="gdk">
|
||||
<title>GDK</title>
|
||||
&gdk-General;
|
||||
|
||||
&gdk-Points-Rectangles-and-Regions;
|
||||
&gdk-Graphics-Contexts;
|
||||
&gdk-Drawing-Primitives;
|
||||
|
||||
&gdk-Bitmaps-and-Pixmaps;
|
||||
&gdk-GdkRGB;
|
||||
&gdk-Images;
|
||||
|
||||
&gdk-Colormaps-and-Colors;
|
||||
&gdk-Color-Contexts;
|
||||
&gdk-Visuals;
|
||||
|
||||
&gdk-Fonts;
|
||||
&gdk-Cursors;
|
||||
|
||||
&gdk-Windows;
|
||||
|
||||
&gdk-Events;
|
||||
&gdk-Event-Structures;
|
||||
|
||||
&gdk-Selections;
|
||||
&gdk-Drag-and-Drop;
|
||||
|
||||
&gdk-Properties-and-Atoms;
|
||||
|
||||
&gdk-Threads;
|
||||
|
||||
&gdk-Input;
|
||||
|
||||
&gdk-Input-Devices;
|
||||
|
||||
&gdk-Key-Values;
|
||||
|
||||
&gdk-Input-Methods;
|
||||
&gdk-Input-Contexts;
|
||||
</chapter>
|
||||
</book>
|
@@ -1,23 +0,0 @@
|
||||
|
||||
# GdkPixmap, GdkBitmap and GdkDrawable are the same as GdkWindow.
|
||||
<STRUCT>
|
||||
<NAME>GdkPixmap</NAME>
|
||||
struct GdkPixmap
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkBitmap</NAME>
|
||||
struct GdkBitmap
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
||||
<STRUCT>
|
||||
<NAME>GdkDrawable</NAME>
|
||||
struct GdkDrawable
|
||||
{
|
||||
gpointer user_data;
|
||||
};
|
||||
</STRUCT>
|
@@ -1,622 +0,0 @@
|
||||
|
||||
<INCLUDE>gdk/gdk.h</INCLUDE>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>General</TITLE>
|
||||
<FILE>general</FILE>
|
||||
gdk_init
|
||||
gdk_init_check
|
||||
gdk_exit
|
||||
gdk_set_locale
|
||||
gdk_set_sm_client_id
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_display
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_flush
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_screen_width
|
||||
gdk_screen_height
|
||||
gdk_screen_width_mm
|
||||
gdk_screen_height_mm
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_pointer_grab
|
||||
gdk_pointer_ungrab
|
||||
gdk_pointer_is_grabbed
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyboard_grab
|
||||
gdk_keyboard_ungrab
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_key_repeat_disable
|
||||
gdk_key_repeat_restore
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_beep
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_use_xshm
|
||||
gdk_set_use_xshm
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_error_trap_push
|
||||
gdk_error_trap_pop
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkStatus
|
||||
gdk_time_get
|
||||
gdk_timer_get
|
||||
gdk_timer_set
|
||||
gdk_timer_enable
|
||||
gdk_timer_disable
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Bitmaps and Pixmaps</TITLE>
|
||||
<FILE>pixmaps</FILE>
|
||||
GdkPixmap
|
||||
gdk_pixmap_new
|
||||
gdk_bitmap_create_from_data
|
||||
gdk_pixmap_create_from_data
|
||||
gdk_pixmap_create_from_xpm
|
||||
gdk_pixmap_colormap_create_from_xpm
|
||||
gdk_pixmap_create_from_xpm_d
|
||||
gdk_pixmap_colormap_create_from_xpm_d
|
||||
gdk_pixmap_ref
|
||||
gdk_pixmap_unref
|
||||
GdkBitmap
|
||||
gdk_bitmap_ref
|
||||
gdk_bitmap_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Images</TITLE>
|
||||
<FILE>images</FILE>
|
||||
GdkImage
|
||||
gdk_image_new
|
||||
GdkImageType
|
||||
gdk_image_new_bitmap
|
||||
gdk_image_get
|
||||
gdk_image_destroy
|
||||
<SUBSECTION>
|
||||
gdk_image_put_pixel
|
||||
gdk_image_get_pixel
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>GdkRGB</TITLE>
|
||||
<FILE>rgb</FILE>
|
||||
gdk_rgb_init
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_rgb_image
|
||||
gdk_draw_rgb_image_dithalign
|
||||
gdk_draw_indexed_image
|
||||
gdk_draw_gray_image
|
||||
gdk_draw_rgb_32_image
|
||||
GdkRgbDither
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_cmap_new
|
||||
gdk_rgb_cmap_free
|
||||
GdkRgbCmap
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_gc_set_foreground
|
||||
gdk_rgb_gc_set_background
|
||||
gdk_rgb_xpixel_from_rgb
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_rgb_set_install
|
||||
gdk_rgb_set_min_colors
|
||||
gdk_rgb_get_visual
|
||||
gdk_rgb_get_cmap
|
||||
gdk_rgb_ditherable
|
||||
gdk_rgb_set_verbose
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Colormaps and Colors</TITLE>
|
||||
<FILE>colors</FILE>
|
||||
GdkColor
|
||||
GdkColormap
|
||||
gdk_colormap_new
|
||||
gdk_colormap_ref
|
||||
gdk_colormap_unref
|
||||
gdk_colormap_get_system
|
||||
gdk_colormap_get_system_size
|
||||
gdk_colormap_change
|
||||
gdk_colormap_alloc_colors
|
||||
gdk_colormap_alloc_color
|
||||
gdk_colormap_free_colors
|
||||
gdk_colormap_get_visual
|
||||
gdk_colors_store
|
||||
gdk_color_copy
|
||||
gdk_color_free
|
||||
gdk_colors_alloc
|
||||
gdk_colors_free
|
||||
gdk_color_white
|
||||
gdk_color_black
|
||||
gdk_color_parse
|
||||
gdk_color_alloc
|
||||
gdk_color_change
|
||||
gdk_color_equal
|
||||
gdk_color_hash
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Fonts</TITLE>
|
||||
<FILE>fonts</FILE>
|
||||
GdkFont
|
||||
GdkFontType
|
||||
gdk_font_load
|
||||
gdk_fontset_load
|
||||
gdk_font_ref
|
||||
gdk_font_unref
|
||||
gdk_font_id
|
||||
gdk_font_equal
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_string_extents
|
||||
gdk_text_extents
|
||||
gdk_text_extents_wc
|
||||
gdk_string_width
|
||||
gdk_text_width
|
||||
gdk_text_width_wc
|
||||
gdk_char_width
|
||||
gdk_char_width_wc
|
||||
gdk_string_measure
|
||||
gdk_text_measure
|
||||
gdk_char_measure
|
||||
gdk_string_height
|
||||
gdk_text_height
|
||||
gdk_char_height
|
||||
|
||||
<SUBSECTION>
|
||||
GdkWChar
|
||||
gdk_wcstombs
|
||||
gdk_mbstowcs
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Drawing Primitives</TITLE>
|
||||
<FILE>drawing</FILE>
|
||||
gdk_draw_point
|
||||
gdk_draw_points
|
||||
gdk_draw_line
|
||||
gdk_draw_lines
|
||||
gdk_draw_segments
|
||||
GdkSegment
|
||||
gdk_draw_rectangle
|
||||
gdk_draw_arc
|
||||
gdk_draw_polygon
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_string
|
||||
gdk_draw_text
|
||||
gdk_draw_text_wc
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_draw_pixmap
|
||||
gdk_draw_image
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_draw_bitmap
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Graphics Contexts</TITLE>
|
||||
<FILE>gcs</FILE>
|
||||
GdkGC
|
||||
GdkGCValues
|
||||
GdkGCValuesMask
|
||||
|
||||
GdkFunction
|
||||
|
||||
gdk_gc_new
|
||||
gdk_gc_new_with_values
|
||||
gdk_gc_ref
|
||||
gdk_gc_unref
|
||||
gdk_gc_destroy
|
||||
gdk_gc_get_values
|
||||
gdk_gc_set_foreground
|
||||
gdk_gc_set_background
|
||||
gdk_gc_set_font
|
||||
gdk_gc_set_function
|
||||
gdk_gc_set_fill
|
||||
GdkFill
|
||||
gdk_gc_set_tile
|
||||
gdk_gc_set_stipple
|
||||
gdk_gc_set_ts_origin
|
||||
gdk_gc_set_clip_origin
|
||||
gdk_gc_set_clip_mask
|
||||
gdk_gc_set_clip_rectangle
|
||||
gdk_gc_set_clip_region
|
||||
gdk_gc_set_subwindow
|
||||
GdkSubwindowMode
|
||||
gdk_gc_set_exposures
|
||||
gdk_gc_set_line_attributes
|
||||
GdkLineStyle
|
||||
GdkCapStyle
|
||||
GdkJoinStyle
|
||||
gdk_gc_set_dashes
|
||||
gdk_gc_copy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Visuals</TITLE>
|
||||
<FILE>visuals</FILE>
|
||||
GdkVisual
|
||||
GdkVisualType
|
||||
GdkByteOrder
|
||||
gdk_query_depths
|
||||
gdk_query_visual_types
|
||||
gdk_list_visuals
|
||||
|
||||
gdk_visual_get_best_depth
|
||||
gdk_visual_get_best_type
|
||||
gdk_visual_get_system
|
||||
gdk_visual_get_best
|
||||
gdk_visual_get_best_with_depth
|
||||
gdk_visual_get_best_with_type
|
||||
gdk_visual_get_best_with_both
|
||||
gdk_visual_ref
|
||||
gdk_visual_unref
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Windows</TITLE>
|
||||
<FILE>windows</FILE>
|
||||
GdkWindowAttr
|
||||
GdkWindow
|
||||
GdkWindowType
|
||||
GdkWindowClass
|
||||
GdkWindowAttributesType
|
||||
GdkWindowHints
|
||||
GdkGeometry
|
||||
|
||||
gdk_window_new
|
||||
gdk_window_destroy
|
||||
gdk_window_ref
|
||||
gdk_window_unref
|
||||
gdk_window_at_pointer
|
||||
gdk_window_show
|
||||
gdk_window_hide
|
||||
gdk_window_is_visible
|
||||
gdk_window_is_viewable
|
||||
gdk_window_withdraw
|
||||
gdk_window_move
|
||||
gdk_window_resize
|
||||
gdk_window_move_resize
|
||||
gdk_window_reparent
|
||||
gdk_window_clear
|
||||
gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_copy_area
|
||||
gdk_window_raise
|
||||
gdk_window_lower
|
||||
gdk_window_register_dnd
|
||||
gdk_window_set_user_data
|
||||
gdk_window_set_override_redirect
|
||||
gdk_window_add_filter
|
||||
gdk_window_remove_filter
|
||||
GdkFilterFunc
|
||||
GdkFilterReturn
|
||||
GdkXEvent
|
||||
gdk_window_shape_combine_mask
|
||||
gdk_window_set_child_shapes
|
||||
gdk_window_merge_child_shapes
|
||||
gdk_window_set_static_gravities
|
||||
gdk_window_set_hints
|
||||
gdk_window_set_title
|
||||
gdk_window_set_background
|
||||
gdk_window_set_back_pixmap
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_window_set_cursor
|
||||
gdk_window_set_colormap
|
||||
gdk_window_get_user_data
|
||||
gdk_window_get_geometry
|
||||
gdk_window_set_geometry_hints
|
||||
gdk_window_get_position
|
||||
gdk_window_get_root_origin
|
||||
gdk_window_get_size
|
||||
gdk_window_get_visual
|
||||
gdk_window_get_colormap
|
||||
gdk_window_get_type
|
||||
gdk_window_get_origin
|
||||
gdk_window_get_deskrelative_origin
|
||||
gdk_window_get_pointer
|
||||
GdkModifierType
|
||||
gdk_window_get_parent
|
||||
gdk_window_get_toplevel
|
||||
gdk_window_get_children
|
||||
gdk_window_get_events
|
||||
gdk_window_set_events
|
||||
gdk_window_set_icon
|
||||
gdk_window_set_icon_name
|
||||
gdk_window_set_transient_for
|
||||
gdk_window_set_role
|
||||
gdk_window_set_group
|
||||
gdk_window_set_decorations
|
||||
GdkWMDecoration
|
||||
gdk_window_set_functions
|
||||
GdkWMFunction
|
||||
gdk_window_get_toplevels
|
||||
GdkDrawable
|
||||
gdk_drawable_set_data
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Selections</TITLE>
|
||||
<FILE>selections</FILE>
|
||||
GdkSelection
|
||||
GdkSelectionType
|
||||
GdkTarget
|
||||
gdk_selection_owner_set
|
||||
gdk_selection_owner_get
|
||||
gdk_selection_convert
|
||||
gdk_selection_property_get
|
||||
gdk_selection_send_notify
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Properties and Atoms</TITLE>
|
||||
<FILE>properties</FILE>
|
||||
GdkAtom
|
||||
GDK_NONE
|
||||
gdk_text_property_to_text_list
|
||||
gdk_free_text_list
|
||||
gdk_string_to_compound_text
|
||||
gdk_free_compound_text
|
||||
gdk_atom_intern
|
||||
gdk_atom_name
|
||||
gdk_property_get
|
||||
gdk_property_change
|
||||
GdkPropMode
|
||||
gdk_property_delete
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Methods</TITLE>
|
||||
<FILE>input_methods</FILE>
|
||||
GdkIMStyle
|
||||
gdk_im_ready
|
||||
gdk_im_decide_style
|
||||
gdk_im_set_best_style
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_im_begin
|
||||
gdk_im_end
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Contexts</TITLE>
|
||||
<FILE>input_contexts</FILE>
|
||||
GdkIC
|
||||
gdk_ic_new
|
||||
gdk_ic_destroy
|
||||
gdk_ic_get_events
|
||||
gdk_ic_get_style
|
||||
gdk_ic_get_attr
|
||||
gdk_ic_set_attr
|
||||
|
||||
<SUBSECTION>
|
||||
GdkICAttr
|
||||
GdkICAttributesType
|
||||
gdk_ic_attr_new
|
||||
gdk_ic_attr_destroy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Color Contexts</TITLE>
|
||||
<FILE>color_contexts</FILE>
|
||||
GdkColorContext
|
||||
GdkColorContextDither
|
||||
GdkColorContextMode
|
||||
|
||||
gdk_color_context_new
|
||||
gdk_color_context_new_mono
|
||||
gdk_color_context_free
|
||||
gdk_color_context_get_pixel
|
||||
gdk_color_context_get_pixels
|
||||
gdk_color_context_get_pixels_incremental
|
||||
gdk_color_context_query_color
|
||||
gdk_color_context_query_colors
|
||||
gdk_color_context_add_palette
|
||||
gdk_color_context_init_dither
|
||||
gdk_color_context_free_dither
|
||||
gdk_color_context_get_pixel_from_palette
|
||||
gdk_color_context_get_index_from_palette
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Points, Rectangles and Regions</TITLE>
|
||||
<FILE>regions</FILE>
|
||||
GdkPoint
|
||||
|
||||
<SUBSECTION>
|
||||
GdkRectangle
|
||||
gdk_rectangle_intersect
|
||||
gdk_rectangle_union
|
||||
|
||||
<SUBSECTION>
|
||||
GdkRegion
|
||||
gdk_region_new
|
||||
gdk_region_polygon
|
||||
GdkFillRule
|
||||
gdk_region_destroy
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_regions_intersect
|
||||
gdk_regions_union
|
||||
gdk_regions_subtract
|
||||
gdk_regions_xor
|
||||
gdk_region_union_with_rect
|
||||
gdk_region_offset
|
||||
gdk_region_shrink
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_region_empty
|
||||
gdk_region_equal
|
||||
gdk_region_point_in
|
||||
gdk_region_rect_in
|
||||
GdkOverlapType
|
||||
gdk_region_get_clipbox
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Threads</TITLE>
|
||||
<FILE>threads</FILE>
|
||||
gdk_threads_mutex
|
||||
GDK_THREADS_ENTER
|
||||
GDK_THREADS_LEAVE
|
||||
gdk_threads_enter
|
||||
gdk_threads_leave
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Key Values</TITLE>
|
||||
<FILE>keys</FILE>
|
||||
gdk_keyval_name
|
||||
gdk_keyval_from_name
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_is_lower
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_to_upper
|
||||
gdk_keyval_to_lower
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input Devices</TITLE>
|
||||
<FILE>input_devices</FILE>
|
||||
GDK_CORE_POINTER
|
||||
gdk_input_list_devices
|
||||
GdkDeviceInfo
|
||||
GdkDeviceKey
|
||||
gdk_input_set_extension_events
|
||||
GdkExtensionMode
|
||||
gdk_input_set_source
|
||||
GdkInputSource
|
||||
gdk_input_set_mode
|
||||
GdkInputMode
|
||||
gdk_input_set_axes
|
||||
GdkAxisUse
|
||||
gdk_input_set_key
|
||||
gdk_input_window_get_pointer
|
||||
gdk_input_motion_events
|
||||
GdkTimeCoord
|
||||
|
||||
<SUBSECTION Private>
|
||||
gdk_input_init
|
||||
gdk_input_exit
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Events</TITLE>
|
||||
<FILE>events</FILE>
|
||||
GdkEventType
|
||||
GdkEventMask
|
||||
GDK_CURRENT_TIME
|
||||
GDK_PRIORITY_EVENTS
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_events_pending
|
||||
gdk_event_peek
|
||||
gdk_event_get
|
||||
gdk_event_get_graphics_expose
|
||||
gdk_event_put
|
||||
gdk_event_copy
|
||||
gdk_event_free
|
||||
gdk_event_get_time
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_event_handler_set
|
||||
GdkEventFunc
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_event_send_client_message
|
||||
gdk_event_send_clientmessage_toall
|
||||
gdk_add_client_message_filter
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_get_show_events
|
||||
gdk_set_show_events
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Event Structures</TITLE>
|
||||
<FILE>event_structs</FILE>
|
||||
GdkEvent
|
||||
|
||||
<SUBSECTION>
|
||||
GdkEventAny
|
||||
GdkEventKey
|
||||
GdkEventButton
|
||||
GdkEventMotion
|
||||
GdkEventExpose
|
||||
GdkEventVisibility
|
||||
GdkEventCrossing
|
||||
GdkEventFocus
|
||||
GdkEventConfigure
|
||||
GdkEventProperty
|
||||
GdkEventSelection
|
||||
GdkEventDND
|
||||
GdkEventProximity
|
||||
GdkEventClient
|
||||
GdkEventNoExpose
|
||||
|
||||
<SUBSECTION>
|
||||
GdkVisibilityState
|
||||
GdkCrossingMode
|
||||
GdkNotifyType
|
||||
GdkPropertyState
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Cursors</TITLE>
|
||||
<FILE>cursors</FILE>
|
||||
GdkCursor
|
||||
GdkCursorType
|
||||
gdk_cursor_new
|
||||
gdk_cursor_new_from_pixmap
|
||||
gdk_cursor_destroy
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Input</TITLE>
|
||||
<FILE>input</FILE>
|
||||
gdk_input_add_full
|
||||
GdkInputCondition
|
||||
GdkInputFunction
|
||||
GdkDestroyNotify
|
||||
gdk_input_add
|
||||
gdk_input_remove
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Drag and Drop</TITLE>
|
||||
<FILE>dnd</FILE>
|
||||
gdk_drag_get_selection
|
||||
gdk_drag_abort
|
||||
gdk_drop_reply
|
||||
gdk_drag_context_new
|
||||
gdk_drag_drop
|
||||
gdk_drag_find_window
|
||||
gdk_drag_context_ref
|
||||
gdk_drag_begin
|
||||
gdk_drag_motion
|
||||
gdk_drop_finish
|
||||
gdk_drag_get_protocol
|
||||
GdkDragProtocol
|
||||
gdk_drag_context_unref
|
||||
GdkDragContext
|
||||
GdkDragAction
|
||||
gdk_drag_status
|
||||
</SECTION>
|
@@ -1,207 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Color Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
routines for allocating colors (deprecated).
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkColorContext type is used for allocating groups of colors.
|
||||
</para>
|
||||
<para>
|
||||
It is now deprecated in favor of the gdk_colormap_*() functions described in
|
||||
the <link linkend="gdk-Colormaps-and-Colors">Colormaps and Colors</link>
|
||||
section.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkColorContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@num_colors:
|
||||
@max_colors:
|
||||
@num_allocated:
|
||||
@mode:
|
||||
@need_to_free_colormap:
|
||||
@std_cmap_atom:
|
||||
@clut:
|
||||
@cmap:
|
||||
@color_hash:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@fast_dither:
|
||||
|
||||
<!-- ##### STRUCT GdkColorContextDither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@fast_rgb:
|
||||
@fast_err:
|
||||
@fast_erg:
|
||||
@fast_erb:
|
||||
|
||||
<!-- ##### ENUM GdkColorContextMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CC_MODE_UNDEFINED:
|
||||
@GDK_CC_MODE_BW:
|
||||
@GDK_CC_MODE_STD_CMAP:
|
||||
@GDK_CC_MODE_TRUE:
|
||||
@GDK_CC_MODE_MY_GRAY:
|
||||
@GDK_CC_MODE_PALETTE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_new_mono ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@visual:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixels_incremental ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@reds:
|
||||
@greens:
|
||||
@blues:
|
||||
@ncolors:
|
||||
@used:
|
||||
@colors:
|
||||
@nallocated:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_color ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@color:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_query_colors ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@colors:
|
||||
@num_colors:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_add_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@palette:
|
||||
@num_palette:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_init_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_free_dither ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_pixel_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_context_get_index_from_palette ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cc:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@failed:
|
||||
@Returns:
|
||||
|
||||
|
@@ -1,390 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Colormaps and Colors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
manipulation of colors and colormaps.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions are used to modify colormaps.
|
||||
A colormap is an object that contains the mapping
|
||||
between the color values stored in memory and
|
||||
the RGB values that are used to display color
|
||||
values. In general, colormaps only contain
|
||||
significant information for pseudo-color visuals,
|
||||
but even for other visual types, a colormap object
|
||||
is required in some circumstances.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are a couple of special colormaps that can
|
||||
be retrieved. The system colormap (retrieved
|
||||
with gdk_colormap_get_system()) is the default
|
||||
colormap of the system. If you are using GdkRGB,
|
||||
there is another colormap that is important - the
|
||||
colormap in which GdkRGB works, retrieved with
|
||||
gdk_rgb_get_cmap(). However, when using GdkRGB,
|
||||
it is not generally necessary to allocate colors
|
||||
directly.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In previous revisions of this interface, a number
|
||||
of functions that take a #GdkColormap parameter
|
||||
were replaced with functions whose names began
|
||||
with "gdk_colormap_". This process will probably
|
||||
be extended somewhat in the future -
|
||||
gdk_color_white(), gdk_color_black(), and
|
||||
gdk_color_change() will probably become aliases.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkColor ##### -->
|
||||
<para>
|
||||
The #GdkColor structure is used to describe an
|
||||
allocated or unallocated color.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>pixel</structfield></entry>
|
||||
<entry>For allocated colors, the value used to
|
||||
draw this color on the screen.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>red</structfield></entry>
|
||||
<entry>The red component of the color. This is
|
||||
a value between 0 and 65535, with 65535 indicating
|
||||
full intensitiy.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>green</structfield></entry>
|
||||
<entry>the blue component of the color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>blue</structfield></entry>
|
||||
<entry>the green component of the color..</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@pixel:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
|
||||
<!-- ##### STRUCT GdkColormap ##### -->
|
||||
<para>
|
||||
The colormap structure contains the following public
|
||||
fields.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>size</structfield></entry>
|
||||
<entry>For pseudo-color colormaps, the number of colors
|
||||
in the colormap..</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>colors</structfield></entry>
|
||||
<entry>An array containing the current values in the
|
||||
colormap. This can be used to map from pixel values
|
||||
back to RGB values. This is only meaningful for
|
||||
pseudo-color colormaps.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@colors:
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_new ##### -->
|
||||
<para>
|
||||
Create a new colormap for the given visual.
|
||||
</para>
|
||||
|
||||
@visual: a #GdkVisual.
|
||||
@allocate: if %TRUE, the newly created colormap will be
|
||||
a private colormap, and all colors in it will be
|
||||
allocated for the applications use.
|
||||
@Returns: the new #GdkColormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a colormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
@Returns: @cmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a colormap. If the
|
||||
resulting reference count is zero, destroys the colormap.
|
||||
</para>
|
||||
|
||||
@cmap: a #GdkColormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
|
||||
<para>
|
||||
Returns the system's default colormap.
|
||||
</para>
|
||||
|
||||
@Returns: the default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
|
||||
<para>
|
||||
Returns the size of the system's default colormap.
|
||||
(See the description of struct #GdkColormap for an
|
||||
explanation of the size of a colormap.)
|
||||
</para>
|
||||
|
||||
@Returns: the size of the system's default colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_change ##### -->
|
||||
<para>
|
||||
Change the value of the first @ncolors in a private colormap
|
||||
to match the values in the <structfield>colors</structfield>
|
||||
array in the color map. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
|
||||
<para>
|
||||
Allocates colors from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: The color values to allocate. On return, the pixel
|
||||
values for allocated colors will be filled in.
|
||||
@ncolors: The number of colors in @colors.
|
||||
@writeable: If %TRUE, the colors are allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the colors cannot be allocated as
|
||||
requested.
|
||||
@success: An array of length @ncolors. On return, this
|
||||
indicates whether the corresponding color in @colors was
|
||||
sucessfully allocated or not.
|
||||
@Returns: The number of colors that were not sucessfully
|
||||
allocated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
|
||||
<para>
|
||||
Allocate a single color from a colormap.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the color to allocate. On return the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in if allocation succeeds.
|
||||
@writeable: If %TRUE, the color is allocated writeable
|
||||
(their values can later be changed using gdk_color_change()).
|
||||
Writeable colors cannot be shared between applications.
|
||||
@best_match: If %TRUE, GDK will attempt to do matching against
|
||||
existing colors if the color cannot be allocated as
|
||||
requested.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
|
||||
<para>
|
||||
Free previously allocated colors.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the colors to free.
|
||||
@ncolors: the number of colors in @colors.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
|
||||
<para>
|
||||
Return the visual for which a given colormap was created.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@Returns: the visual of the colormap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_store ##### -->
|
||||
<para>
|
||||
Change the value of the first @ncolors colors in
|
||||
a private colormap. This function is obsolete and
|
||||
should not be used. See gdk_color_change().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@colors: the new color values.
|
||||
@ncolors: the number of colors to change.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_copy ##### -->
|
||||
<para>
|
||||
Make a copy of a color structure. The result
|
||||
must be freed using gdk_color_free().
|
||||
</para>
|
||||
|
||||
@color: a #GdkColor.
|
||||
@Returns: a copy of @color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_free ##### -->
|
||||
<para>
|
||||
Free a color structure created with
|
||||
gdk_color_copy().
|
||||
</para>
|
||||
|
||||
@color: a #GdkColor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_alloc ##### -->
|
||||
<para>
|
||||
Allocate colors from a colormap. This function
|
||||
is obsolete. See gdk_colormap_alloc_colors().
|
||||
For full documentation of the fields, see
|
||||
the Xlib documentation for XAllocColorCells.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@contiguous: if %TRUE, the colors should be allocated
|
||||
in contiguous color cells.
|
||||
@planes: an array in which to store the plane masks.
|
||||
@nplanes: the number of planes to allocate. (Or zero,
|
||||
to indicate that the color allocation should not be
|
||||
planar.)
|
||||
@pixels: an array into which to store allocated pixel
|
||||
values.
|
||||
@npixels: the number of pixels in each plane to allocate.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_colors_free ##### -->
|
||||
<para>
|
||||
Free colors allocated with gdk_colors_alloc(). This
|
||||
function is obsolete. See gdk_colormap_free_colors().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@pixels: the pixel values of the colors to free.
|
||||
@npixels: the number of values in @pixels.
|
||||
@planes: the plane masks for all planes to free, OR'd
|
||||
together.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_white ##### -->
|
||||
<para>
|
||||
Return the white color for a given colormap. The resulting
|
||||
value has already allocated been allocated.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_black ##### -->
|
||||
<para>
|
||||
Return the black color for a given colormap. The resulting
|
||||
value has already benn allocated.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: the location to store the color.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_parse ##### -->
|
||||
<para>
|
||||
Parse a textual specification of a color and fill in
|
||||
the <structfield>red</structfield>,
|
||||
<structfield>green</structfield>, and
|
||||
<structfield>blue</structfield> fields of a
|
||||
#GdkColor structure. The color is <emphasis>not</emphasis>
|
||||
allocated, you must call gdk_colormap_alloc_color() yourself.
|
||||
The text string can be in any of the forms accepted
|
||||
by <function>XParseColor</function>; these include
|
||||
name for a color from <filename>rgb.txt</filename>, such as
|
||||
<literal>DarkSlateGray</literal>, or a hex specification
|
||||
such as <literal>305050</literal>.
|
||||
</para>
|
||||
|
||||
@spec: the string specifying the color.
|
||||
@color: the #GdkColor to fill in
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_alloc ##### -->
|
||||
<para>
|
||||
Allocate a single color from a colormap.
|
||||
This function is obsolete. See gdk_colormap_alloc_color().
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: The color to allocate. On return, the
|
||||
<structfield>pixel</structfield> field will be
|
||||
filled in.
|
||||
@Returns: %TRUE if the allocation succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_change ##### -->
|
||||
<para>
|
||||
Change the value of a color that has already
|
||||
been allocated. If @colormap is not a private
|
||||
colormap, then the color must have been allocated
|
||||
using gdk_colormap_alloc_colors() with the
|
||||
@writeable set to %TRUE.
|
||||
</para>
|
||||
|
||||
@colormap: a #GdkColormap.
|
||||
@color: a #GdkColor, with the color to change
|
||||
in the <structfield>pixel</structfield> field,
|
||||
and the new value in the remaining fields.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_equal ##### -->
|
||||
<para>
|
||||
Compare two colors.
|
||||
</para>
|
||||
|
||||
@colora: a #GdkColor.
|
||||
@colorb: another #GdkColor.
|
||||
@Returns: %TRUE if the two colors compare equal
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_color_hash ##### -->
|
||||
<para>
|
||||
A hash function suitable for using for a hash
|
||||
table that stores #GdkColor's.
|
||||
</para>
|
||||
|
||||
@colora: a #GdkColor.
|
||||
@colorb: NOT USED.
|
||||
@Returns: The hash function appled to @colora
|
||||
|
||||
|
@@ -1,99 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Cursors
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
standard and pixmap cursors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkCursor ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type:
|
||||
|
||||
<!-- ##### ENUM GdkCursorType ##### -->
|
||||
<para>
|
||||
The standard cursors available.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new ##### -->
|
||||
<para>
|
||||
Creates a new standard cursor.
|
||||
</para>
|
||||
|
||||
@cursor_type: the type of the cursor.
|
||||
@Returns: a new #GdkCursor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_new_from_pixmap ##### -->
|
||||
<para>
|
||||
Creates a new cursor from a given pixmap and mask. Both the pixmap and mask
|
||||
must have a depth of 1 (i.e. each pixel has only 2 values - on or off).
|
||||
The standard cursor size is 16 by 16 pixels.
|
||||
</para>
|
||||
<example><title>Creating a custom cursor.</title>
|
||||
<programlisting>
|
||||
/* This data is in X bitmap format, and can be created with the 'bitmap'
|
||||
utility. */
|
||||
#define cursor1_width 16
|
||||
#define cursor1_height 16
|
||||
static unsigned char cursor1_bits[] = {
|
||||
0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
|
||||
0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
|
||||
0x10, 0x08, 0x20, 0x04, 0x40, 0x02, 0x80, 0x01};
|
||||
|
||||
static unsigned char cursor1mask_bits[] = {
|
||||
0x80, 0x01, 0xc0, 0x03, 0x60, 0x06, 0x30, 0x0c, 0x18, 0x18, 0x8c, 0x31,
|
||||
0xc6, 0x63, 0x63, 0xc6, 0x63, 0xc6, 0xc6, 0x63, 0x8c, 0x31, 0x18, 0x18,
|
||||
0x30, 0x0c, 0x60, 0x06, 0xc0, 0x03, 0x80, 0x01};
|
||||
|
||||
|
||||
GdkCursor *cursor;
|
||||
GdkPixmap *source, *mask;
|
||||
GdkColor fg = { 0, 65535, 0, 0 }; /* Red. */
|
||||
GdkColor bg = { 0, 0, 0, 65535 }; /* Blue. */
|
||||
|
||||
|
||||
source = gdk_bitmap_create_from_data (NULL, cursor1_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
mask = gdk_bitmap_create_from_data (NULL, cursor1mask_bits,
|
||||
cursor1_width, cursor1_height);
|
||||
cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8);
|
||||
gdk_pixmap_unref (source);
|
||||
gdk_pixmap_unref (mask);
|
||||
|
||||
|
||||
gdk_window_set_cursor (widget->window, cursor);
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
@source: the pixmap specifying the cursor.
|
||||
@mask: the pixmap specifying the mask, which must be the same size as @source.
|
||||
@fg: the foreground color, used for the bits in the source which are 1.
|
||||
The color does not have to be allocated first.
|
||||
@bg: the background color, used for the bits in the source which are 0.
|
||||
The color does not have to be allocated first.
|
||||
@x: the horizontal offset of the 'hotspot' of the cursor.
|
||||
@y: the vertical offset of the 'hotspot' of the cursor.
|
||||
@Returns: a new #GdkCursor.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_cursor_destroy ##### -->
|
||||
<para>
|
||||
Destroys a cursor, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
@cursor: a #GdkCursor.
|
||||
|
||||
|
@@ -1,194 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drag and Drop
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for controlling drag and drop handling.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide a low level interface for drag and drop.
|
||||
GDK supports both the Xdnd and Motif drag and drop protocols transparently.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ provides a higher level abstraction based on top of these functions,
|
||||
and so they are not normally needed in GTK+ applications.
|
||||
See the <link linkend="gtk-Drag-and-Drop">Drag and Drop</link> section of
|
||||
the GTK+ documentation for more information.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_abort ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_reply ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@ok:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_drop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_find_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@drag_window:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_ref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_begin ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@window:
|
||||
@targets:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@actions:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_motion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@dest_window:
|
||||
@protocol:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@suggested_action:
|
||||
@possible_actions:
|
||||
@time:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drop_finish ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@success:
|
||||
@time:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_get_protocol ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@xid:
|
||||
@protocol:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkDragProtocol ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_DRAG_PROTO_MOTIF:
|
||||
@GDK_DRAG_PROTO_XDND:
|
||||
@GDK_DRAG_PROTO_ROOTWIN:
|
||||
@GDK_DRAG_PROTO_NONE:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_context_unref ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDragContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@protocol:
|
||||
@is_source:
|
||||
@source_window:
|
||||
@dest_window:
|
||||
@targets:
|
||||
@actions:
|
||||
@suggested_action:
|
||||
@action:
|
||||
@start_time:
|
||||
|
||||
<!-- ##### ENUM GdkDragAction ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_ACTION_DEFAULT:
|
||||
@GDK_ACTION_COPY:
|
||||
@GDK_ACTION_MOVE:
|
||||
@GDK_ACTION_LINK:
|
||||
@GDK_ACTION_PRIVATE:
|
||||
@GDK_ACTION_ASK:
|
||||
|
||||
<!-- ##### FUNCTION gdk_drag_status ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@action:
|
||||
@time:
|
||||
|
||||
|
@@ -1,239 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Drawing Primitives
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for drawing points, lines, arcs, and text.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
These functions provide support for drawing points, lines, arcs and text
|
||||
onto what are called 'drawables'. Drawables, as the name suggests, are things
|
||||
which support drawing onto them, and are either #GdkWindow or #GdkPixmap
|
||||
objects.
|
||||
</para>
|
||||
<para>
|
||||
Many of the drawing operations take a #GdkGC argument, which represents a
|
||||
graphics context. This #GdkGC contains a number of drawing attributes such
|
||||
as foreground color, background color and line width, and is used to reduce
|
||||
the number of arguments needed for each drawing operation. See the
|
||||
<link linkend="gdk-Graphics-Contexts">Graphics Contexts</link> section for
|
||||
more information.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_point ##### -->
|
||||
<para>
|
||||
Draws a point, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the point.
|
||||
@y: the y coordinate of the point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_points ##### -->
|
||||
<para>
|
||||
Draws a number of points, using the foreground color and other attributes of
|
||||
the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures.
|
||||
@npoints: the number of points to be drawn.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_line ##### -->
|
||||
<para>
|
||||
Draws a line, using the foreground color and other attributes of the #GdkGC.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@x1: the x coordinate of the start point.
|
||||
@y1: the y coordinate of the start point.
|
||||
@x2: the x coordinate of the end point.
|
||||
@y2: the y coordinate of the end point.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_lines ##### -->
|
||||
<para>
|
||||
Draws a series of lines connecting the given points.
|
||||
The way in which joins between lines are draw is determined by the
|
||||
#GdkCapStyle value in the #GdkGC. This can be set with
|
||||
gdk_gc_set_line_attributes().
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@points: an array of #GdkPoint structures specifying the endpoints of the
|
||||
lines.
|
||||
@npoints: the size of the @points array.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_segments ##### -->
|
||||
<para>
|
||||
Draws a number of unconnected lines.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@segs: an array of #GdkSegment structures specifying the start and end points
|
||||
of the lines to be drawn,
|
||||
@nsegs: the number of line segments to draw, i.e. the size of the @segs array.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkSegment ##### -->
|
||||
<para>
|
||||
Specifies the start and end point of a line for use by the gdk_draw_segments()
|
||||
function.
|
||||
</para>
|
||||
|
||||
@x1: the x coordinate of the start point.
|
||||
@y1: the y coordinate of the start point.
|
||||
@x2: the x coordinate of the end point.
|
||||
@y2: the y coordinate of the end point.
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_rectangle ##### -->
|
||||
<para>
|
||||
Draws a rectangular outline or filled rectangle, using the foreground color
|
||||
and other attributes of the #GdkGC.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A rectangle drawn filled is 1 pixel smaller in both dimensions than a rectangle
|
||||
outlined. Calling gdk_draw_rectangle (window, gc, TRUE, 0, 0, 20, 20) results
|
||||
in a filled rectangle 20 pixels wide and 20 pixels high. Calling
|
||||
gdk_draw_rectangle (window, gc, FALSE, 0, 0, 20, 20) results in an outlined
|
||||
rectangle with corners at (0, 0), (0, 20), (20, 20), and (20, 0), which
|
||||
makes it 21 pixels wide and 21 pixels high.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the rectangle should be filled.
|
||||
@x: the x coordinate of the left edge of the rectangle.
|
||||
@y: the y coordinate of the top edge of the rectangle.
|
||||
@width: the width of the rectangle.
|
||||
@height: the height of the rectangle.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_arc ##### -->
|
||||
<para>
|
||||
Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
|
||||
rectangle of the entire ellipse, and the start and end angles of the part of
|
||||
the ellipse to be drawn.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the arc should be filled, producing a 'pie slice'.
|
||||
@x: the x coordinate of the left edge of the bounding rectangle.
|
||||
@y: the y coordinate of the top edge of the bounding rectangle.
|
||||
@width: the width of the bounding rectangle.
|
||||
@height: the height of the bounding rectangle.
|
||||
@angle1: the start angle of the arc, relative to the 3 o'clock position,
|
||||
counter-clockwise, in 1/64ths of a degree.
|
||||
@angle2: the end angle of the arc, relative to @angle1, in 1/64ths of a degree.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_polygon ##### -->
|
||||
<para>
|
||||
Draws an outlined or filled polygon.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@filled: TRUE if the polygon should be filled. The polygon is closed
|
||||
automatically, connecting the last point to the first point if necessary.
|
||||
@points: an array of #GdkPoint structures specifying the points making up the
|
||||
polygon.
|
||||
@npoints: the number of points.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_string ##### -->
|
||||
<para>
|
||||
Draws a string of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@string: the string of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text ##### -->
|
||||
<para>
|
||||
Draws a number of characters in the given font or fontset.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the characters to draw.
|
||||
@text_length: the number of characters of @text to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_text_wc ##### -->
|
||||
<para>
|
||||
Draws a number of wide characters using the given font of fontset.
|
||||
If the font is a 1-byte font, the string is converted into 1-byte characters
|
||||
(discarding the high bytes) before output.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@font: a #GdkFont.
|
||||
@gc: a #GdkGC.
|
||||
@x: the x coordinate of the left edge of the text.
|
||||
@y: the y coordinate of the baseline of the text.
|
||||
@text: the wide characters to draw.
|
||||
@text_length: the number of characters to draw.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_pixmap ##### -->
|
||||
<para>
|
||||
Draws a pixmap, or a part of a pixmap, onto another drawable.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@src: the source #GdkPixmap to draw.
|
||||
@xsrc: the left edge of the source rectangle within @src.
|
||||
@ysrc: the top of the source rectangle within @src.
|
||||
@xdest: the x coordinate of the destination within @drawable.
|
||||
@ydest: the y coordinate of the destination within @drawable.
|
||||
@width: the width of the area to be copied, or -1 to make the area extend to
|
||||
the right edge of the source pixmap.
|
||||
@height: the height of the area to be copied, or -1 to make the area extend
|
||||
to the bottom edge of the source pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_draw_image ##### -->
|
||||
<para>
|
||||
Draws a #GdkImage onto a drawable.
|
||||
The depth of the #GdkImage must match the depth of the #GdkDrawable.
|
||||
</para>
|
||||
|
||||
@drawable: a #GdkDrawable (a #GdkWindow or a #GdkPixmap).
|
||||
@gc: a #GdkGC.
|
||||
@image: the #GdkImage to draw.
|
||||
@xsrc: the left edge of the source rectangle within @image.
|
||||
@ysrc: the top of the source rectangle within @image.
|
||||
@xdest: the x coordinate of the destination within @drawable.
|
||||
@ydest: the y coordinate of the destination within @drawable.
|
||||
@width: the width of the area to be copied, or -1 to make the area extend to
|
||||
the right edge of @image.
|
||||
@height: the height of the area to be copied, or -1 to make the area extend
|
||||
to the bottom edge of @image.
|
||||
|
||||
|
@@ -1,368 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Event Structures
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
data structures specific to each type of event.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The event structs contain data specific to each type of event in GDK.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
A common mistake is to forget to set the event mask of a widget so that the
|
||||
required events are received. See gtk_widget_set_events().
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### UNION GdkEvent ##### -->
|
||||
<para>
|
||||
The #GdkEvent struct contains a union of all of the event structs,
|
||||
and allows access to the data fields in a number of ways.
|
||||
</para>
|
||||
<para>
|
||||
The event type is always the first field in all of the event structs, and
|
||||
can always be accessed with the following code, no matter what type of event
|
||||
it is:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
GdkEventType type;
|
||||
|
||||
type = event->type;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To access other fields of the event structs, the pointer to the event can be
|
||||
cast to the appropriate event struct pointer, or the union member name can be
|
||||
used. For example if the event type is %GDK_BUTTON_PRESS then the x coordinate
|
||||
of the button press can be accessed with:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = ((GdkEventButton*)event)->x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
or:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
GdkEvent *event;
|
||||
gdouble x;
|
||||
|
||||
x = event->button.x;
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkEventAny ##### -->
|
||||
<para>
|
||||
Contains the fields which are common to all event structs.
|
||||
Any event pointer can safely be cast to a pointer to a #GdkEventAny to access
|
||||
these fields.
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
|
||||
<!-- ##### STRUCT GdkEventKey ##### -->
|
||||
<para>
|
||||
Describes a key press or key release event.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_KEY_RELEASE or %GDK_KEY_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@keyval: the key that was pressed or released. See the <gdk/gdkkeysym.h>
|
||||
header file for a complete list of GDK key codes.
|
||||
@length: the length of @string.
|
||||
@string: a null-terminated multi-byte string containing the composed characters
|
||||
resulting from the key press. When text is being input, in a GtkEntry for
|
||||
example, it is these characters which should be added to the input buffer.
|
||||
When using <link linkend="gdk-Input-Methods"> Input Methods</link> to support
|
||||
internationalized text input, the composed characters appear here after the
|
||||
pre-editing has been completed.
|
||||
|
||||
<!-- ##### STRUCT GdkEventButton ##### -->
|
||||
<para>
|
||||
Used for button press and button release events. The
|
||||
<structfield>type</structfield> field will be one of %GDK_BUTTON_PRESS,
|
||||
%GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS, and %GDK_BUTTON_RELEASE.
|
||||
</para>
|
||||
<para>
|
||||
Double and triple-clicks result in a sequence of events being received.
|
||||
For double-clicks the order of events will be:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
Note that the first click is received just like a normal
|
||||
button press, while the second click results in a %GDK_2BUTTON_PRESS being
|
||||
received just after the %GDK_BUTTON_PRESS.
|
||||
</para>
|
||||
<para>
|
||||
Triple-clicks are very similar to double-clicks, except that %GDK_3BUTTON_PRESS
|
||||
is inserted after the third click. The order of the events is:
|
||||
<orderedlist>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_2BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_3BUTTON_PRESS</para></listitem>
|
||||
<listitem><para>%GDK_BUTTON_RELEASE</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
<para>
|
||||
For a double click to occur, the second button press must occur within 1/4 of
|
||||
a second of the first. For a triple click to occur, the third button press
|
||||
must also occur within 1/2 second of the first button press.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS,
|
||||
%GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@time: the time of the event in milliseconds.
|
||||
@x: the x coordinate of the mouse relative to the window.
|
||||
@y: the y coordinate of the mouse relative to the window.
|
||||
@pressure: the pressure of the button press, intended for input devices such
|
||||
as graphics tablets. It defaults to 0.5.
|
||||
@xtilt: the horizontal tilt of the input device. Defaults to 0.
|
||||
@ytilt: the vertical tilt of the input device. Defaults to 0.
|
||||
@state: a bit-mask representing the state of the modifier keys (e.g. Control,
|
||||
Shift and Alt) and the pointer buttons. See #GdkModifierType.
|
||||
@button: the button which was pressed or released, numbered from 1 to 5.
|
||||
Normally button 1 is the left mouse button, 2 is the middle button,
|
||||
and 3 is the right button. On 2-button mice, the middle button can often
|
||||
be simulated by pressing both mouse buttons together.
|
||||
@source: the input device where the event came from, usually %GDK_SOURCE_MOUSE.
|
||||
@deviceid: the input device ID, usually %GDK_CORE_POINTER but may be
|
||||
different if touch screens or graphics tablets are being used.
|
||||
@x_root: the x coordinate of the mouse relative to the root of the screen.
|
||||
@y_root: the y coordinate of the mouse relative to the root of the screen.
|
||||
|
||||
<!-- ##### STRUCT GdkEventMotion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@time:
|
||||
@x:
|
||||
@y:
|
||||
@pressure:
|
||||
@xtilt:
|
||||
@ytilt:
|
||||
@state:
|
||||
@is_hint:
|
||||
@source:
|
||||
@deviceid:
|
||||
@x_root:
|
||||
@y_root:
|
||||
|
||||
<!-- ##### STRUCT GdkEventExpose ##### -->
|
||||
<para>
|
||||
Generated when all or part of a window becomes visible and needs to be
|
||||
redrawn.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_EXPOSE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@area: the area that needs to be redrawn.
|
||||
@count: the number of contiguous %GDK_EXPOSE events following this one.
|
||||
The only use for this is "exposure compression", i.e. handling all contiguous
|
||||
%GDK_EXPOSE events in one go, though GDK performs some exposure compression
|
||||
so this is not normally needed.
|
||||
|
||||
<!-- ##### STRUCT GdkEventVisibility ##### -->
|
||||
<para>
|
||||
Generated when the window visibility status has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_VISIBILITY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@state: the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED,
|
||||
%GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED).
|
||||
|
||||
<!-- ##### ENUM GdkVisibilityState ##### -->
|
||||
<para>
|
||||
Specifies the visiblity status of a window for a #GdkEventVisibility.
|
||||
</para>
|
||||
|
||||
@GDK_VISIBILITY_UNOBSCURED: the window is completely visible.
|
||||
@GDK_VISIBILITY_PARTIAL: the window is partially visible.
|
||||
@GDK_VISIBILITY_FULLY_OBSCURED: the window is not visible at all.
|
||||
|
||||
<!-- ##### STRUCT GdkEventCrossing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@subwindow:
|
||||
@time: the time of the event in milliseconds.
|
||||
@x:
|
||||
@y:
|
||||
@x_root:
|
||||
@y_root:
|
||||
@mode:
|
||||
@detail:
|
||||
@focus:
|
||||
@state:
|
||||
|
||||
<!-- ##### ENUM GdkCrossingMode ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_CROSSING_NORMAL:
|
||||
@GDK_CROSSING_GRAB:
|
||||
@GDK_CROSSING_UNGRAB:
|
||||
|
||||
<!-- ##### ENUM GdkNotifyType ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GDK_NOTIFY_ANCESTOR:
|
||||
@GDK_NOTIFY_VIRTUAL:
|
||||
@GDK_NOTIFY_INFERIOR:
|
||||
@GDK_NOTIFY_NONLINEAR:
|
||||
@GDK_NOTIFY_NONLINEAR_VIRTUAL:
|
||||
@GDK_NOTIFY_UNKNOWN:
|
||||
|
||||
<!-- ##### STRUCT GdkEventFocus ##### -->
|
||||
<para>
|
||||
Describes a change of keyboard focus.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_FOCUS_CHANGE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@in: TRUE if the window has gained the keyboard focus, FALSE if it has lost
|
||||
the focus.
|
||||
|
||||
<!-- ##### STRUCT GdkEventConfigure ##### -->
|
||||
<para>
|
||||
Generated when a window size or position has changed.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CONFIGURE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@x: the new x coordinate of the window, relative to its parent.
|
||||
@y: the new y coordinate of the window, relative to its parent.
|
||||
@width: the new width of the window.
|
||||
@height: the new height of the window.
|
||||
|
||||
<!-- ##### STRUCT GdkEventProperty ##### -->
|
||||
<para>
|
||||
Describes a property change on a window.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_PROPERTY_NOTIFY).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@atom: the property that was changed.
|
||||
@time: the time of the event in milliseconds.
|
||||
@state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
|
||||
deleted (%GDK_PROPERTY_DELETE).
|
||||
|
||||
<!-- ##### ENUM GdkPropertyState ##### -->
|
||||
<para>
|
||||
Specifies the type of a property change for a #GdkEventProperty.
|
||||
</para>
|
||||
|
||||
@GDK_PROPERTY_NEW_VALUE: the property value wan changed.
|
||||
@GDK_PROPERTY_DELETE: the property was deleted.
|
||||
|
||||
<!-- ##### STRUCT GdkEventSelection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@selection:
|
||||
@target:
|
||||
@property:
|
||||
@requestor:
|
||||
@time: the time of the event in milliseconds.
|
||||
|
||||
<!-- ##### STRUCT GdkEventDND ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@context:
|
||||
@time: the time of the event in milliseconds.
|
||||
@x_root:
|
||||
@y_root:
|
||||
|
||||
<!-- ##### STRUCT GdkEventProximity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@type: the type of the event.
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@time: the time of the event in milliseconds.
|
||||
@source:
|
||||
@deviceid:
|
||||
|
||||
<!-- ##### STRUCT GdkEventClient ##### -->
|
||||
<para>
|
||||
An event sent by another client application.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_CLIENT_EVENT).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
@message_type: the type of the message, which can be defined by the
|
||||
application.
|
||||
@data_format: the format of the data, given as the number of bits in each
|
||||
data element, i.e. 8, 16, or 32. 8-bit data uses the b array of the data
|
||||
union, 16-bit data uses the s array, and 32-bit data uses the l array.
|
||||
|
||||
<!-- ##### STRUCT GdkEventNoExpose ##### -->
|
||||
<para>
|
||||
Generated when the area of a #GdkDrawable being copied, with gdk_draw_pixmap()
|
||||
or gdk_window_copy_area(), was completely available.
|
||||
</para>
|
||||
<para>
|
||||
FIXME: add more here.
|
||||
</para>
|
||||
|
||||
@type: the type of the event (%GDK_NO_EXPOSE).
|
||||
@window: the window which received the event.
|
||||
@send_event: TRUE if the event was sent explicitly (e.g. using XSendEvent).
|
||||
|
@@ -1,303 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Events
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for handling events from the window system.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes functions dealing with events from the window system.
|
||||
</para>
|
||||
<para>
|
||||
In GTK+ applications the events are handled automatically in
|
||||
gtk_main_do_event() and passed on to the appropriate widgets, so these
|
||||
functions are rarely needed. Though some of the fields in the
|
||||
<link linkend="gdk-Event-Structures">Event Structures</link> are useful.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Event-Structures">Event Structures</link></term>
|
||||
<listitem><para>
|
||||
The structs used for each type of event.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkEventType ##### -->
|
||||
<para>
|
||||
Specifies the type of the event.
|
||||
</para>
|
||||
<para>
|
||||
Do not confuse these events with the signals that GTK+ widgets emit.
|
||||
Although many of these events result in corresponding signals being emitted,
|
||||
the events are often transformed or filtered along the way.
|
||||
</para>
|
||||
|
||||
@GDK_NOTHING: a special code to indicate a null event.
|
||||
@GDK_DELETE: the window manager has requested that the toplevel window be
|
||||
hidden or destroyed, usually when the user clicks on a special icon in the
|
||||
title bar.
|
||||
@GDK_DESTROY: the window has been destroyed.
|
||||
@GDK_EXPOSE: all or part of the window has become visible and needs to be
|
||||
redrawn.
|
||||
@GDK_MOTION_NOTIFY: the pointer (usually a mouse) has moved.
|
||||
@GDK_BUTTON_PRESS: a mouse button has been pressed.
|
||||
@GDK_2BUTTON_PRESS: a mouse button has been double-clicked (clicked twice
|
||||
within a short period of time). Note that each click also generates a
|
||||
%GDK_BUTTON_PRESS event.
|
||||
@GDK_3BUTTON_PRESS: a mouse button has been clicked 3 times in a short period
|
||||
of time. Note that each click also generates a %GDK_BUTTON_PRESS event.
|
||||
@GDK_BUTTON_RELEASE: a mouse button has been released.
|
||||
@GDK_KEY_PRESS: a key has been pressed.
|
||||
@GDK_KEY_RELEASE: a key has been released.
|
||||
@GDK_ENTER_NOTIFY: the pointer has entered the window.
|
||||
@GDK_LEAVE_NOTIFY: the pointer has left the window.
|
||||
@GDK_FOCUS_CHANGE: the keyboard focus has entered or left the window.
|
||||
@GDK_CONFIGURE: the size, position or stacking order of the window has changed.
|
||||
Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows.
|
||||
@GDK_MAP: the window has been mapped.
|
||||
@GDK_UNMAP: the window has been unmapped.
|
||||
@GDK_PROPERTY_NOTIFY: a property on the window has been changed or deleted.
|
||||
@GDK_SELECTION_CLEAR: the application has lost ownership of a selection.
|
||||
@GDK_SELECTION_REQUEST: another application has requested a selection.
|
||||
@GDK_SELECTION_NOTIFY: a selection has been received.
|
||||
@GDK_PROXIMITY_IN: an input device has moved into contact with a sensing
|
||||
surface (e.g. a touchscreen or graphics tablet).
|
||||
@GDK_PROXIMITY_OUT: an input device has moved out of contact with a sensing
|
||||
surface.
|
||||
@GDK_DRAG_ENTER: the mouse has entered the window while a drag is in progress.
|
||||
@GDK_DRAG_LEAVE: the mouse has left the window while a drag is in progress.
|
||||
@GDK_DRAG_MOTION: the mouse has moved in the window while a drag is in
|
||||
progress.
|
||||
@GDK_DRAG_STATUS: the status of the drag operation initiated by the window
|
||||
has changed.
|
||||
@GDK_DROP_START: a drop operation onto the window has started.
|
||||
@GDK_DROP_FINISHED: the drop operation initiated by the window has completed.
|
||||
@GDK_CLIENT_EVENT: a message has been received from another application.
|
||||
@GDK_VISIBILITY_NOTIFY: the window visibility status has changed.
|
||||
@GDK_NO_EXPOSE: indicates that the source region was completely available
|
||||
when parts of a drawable were copied. This is not very useful.
|
||||
|
||||
<!-- ##### ENUM GdkEventMask ##### -->
|
||||
<para>
|
||||
A set of bit-flags to indicate which events a window is to receive.
|
||||
Most of these masks map onto one or more of the #GdkEventType event types
|
||||
above.
|
||||
</para>
|
||||
<para>
|
||||
%GDK_POINTER_MOTION_HINT_MASK is a special mask which is used to reduce the
|
||||
number of %GDK_MOTION_NOTIFY events received. Normally a %GDK_MOTION_NOTIFY
|
||||
event is received each time the mouse moves. However, if the application
|
||||
spends a lot of time processing the event (updating the display, for example),
|
||||
it can easily lag behind the position of the mouse. When using the
|
||||
%GDK_POINTER_MOTION_HINT_MASK the server will only send %GDK_MOTION_NOTIFY
|
||||
events when the application asks for them, by calling gdk_window_get_pointer().
|
||||
</para>
|
||||
|
||||
@GDK_EXPOSURE_MASK:
|
||||
@GDK_POINTER_MOTION_MASK:
|
||||
@GDK_POINTER_MOTION_HINT_MASK:
|
||||
@GDK_BUTTON_MOTION_MASK:
|
||||
@GDK_BUTTON1_MOTION_MASK:
|
||||
@GDK_BUTTON2_MOTION_MASK:
|
||||
@GDK_BUTTON3_MOTION_MASK:
|
||||
@GDK_BUTTON_PRESS_MASK:
|
||||
@GDK_BUTTON_RELEASE_MASK:
|
||||
@GDK_KEY_PRESS_MASK:
|
||||
@GDK_KEY_RELEASE_MASK:
|
||||
@GDK_ENTER_NOTIFY_MASK:
|
||||
@GDK_LEAVE_NOTIFY_MASK:
|
||||
@GDK_FOCUS_CHANGE_MASK:
|
||||
@GDK_STRUCTURE_MASK:
|
||||
@GDK_PROPERTY_CHANGE_MASK:
|
||||
@GDK_VISIBILITY_NOTIFY_MASK:
|
||||
@GDK_PROXIMITY_IN_MASK:
|
||||
@GDK_PROXIMITY_OUT_MASK:
|
||||
@GDK_SUBSTRUCTURE_MASK:
|
||||
@GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
|
||||
|
||||
<!-- ##### MACRO GDK_CURRENT_TIME ##### -->
|
||||
<para>
|
||||
Represents the current time, and can be used anywhere a time is expected.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_PRIORITY_EVENTS ##### -->
|
||||
<para>
|
||||
This is the priority that events from the X server are given in the
|
||||
<link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link>.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_events_pending ##### -->
|
||||
<para>
|
||||
Checks if any events are waiting to be processed.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if any events are pending.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_peek ##### -->
|
||||
<para>
|
||||
Gets a copy of the first #GdkEvent in the event queue.
|
||||
(Note that this function will not get more events from the X server.
|
||||
It only checks the events that have already been moved to the GDK event queue.)
|
||||
</para>
|
||||
|
||||
@Returns: a copy of the first #GdkEvent on the event queue, or NULL if no
|
||||
events are in the queue. The returned #GdkEvent should be freed with
|
||||
gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get ##### -->
|
||||
<para>
|
||||
Gets the next #GdkEvent to be processed, fetching events from the X server if
|
||||
necessary.
|
||||
</para>
|
||||
|
||||
@Returns: the next #GdkEvent to be processed, or NULL if no events are pending.
|
||||
The returned #GdkEvent should be freed with gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_graphics_expose ##### -->
|
||||
<para>
|
||||
Waits for a GraphicsExpose or NoExpose event from the X server.
|
||||
This is used in the #GtkText and #GtkCList widgets in GTK+ to make sure any
|
||||
GraphicsExpose events are handled before the widget is scrolled.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow to wait for the events for.
|
||||
@Returns: a #GdkEventExpose if a GraphicsExpose was received, or NULL if a
|
||||
NoExpose event was received.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_put ##### -->
|
||||
<para>
|
||||
Appends a copy of the given event onto the front of the event queue.
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_copy ##### -->
|
||||
<para>
|
||||
Copies a #GdkEvent, copying or incrementing the reference count of the
|
||||
resources associated with it (e.g. #GdkWindow's and strings).
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
@Returns: a copy of @event. The returned #GdkEvent should be freed with
|
||||
gdk_event_free().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_free ##### -->
|
||||
<para>
|
||||
Frees a #GdkEvent, freeing or decrementing any resources associated with it.
|
||||
Note that this function should only be called with events returned from
|
||||
gdk_event_peek(), gdk_event_get(), gdk_event_get_graphics_expose() and
|
||||
gdk_event_copy().
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_get_time ##### -->
|
||||
<para>
|
||||
Gets the timestamp from a #GdkEvent.
|
||||
</para>
|
||||
|
||||
@event: a #GdkEvent.
|
||||
@Returns: the timestamp from @event, or #GDK_CURRENT_TIME if the event has
|
||||
no timestamp.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_handler_set ##### -->
|
||||
<para>
|
||||
Sets the function to call to handle all events from GDK.
|
||||
</para>
|
||||
<para>
|
||||
Note that GTK+ uses this to install its own event handler, so it is probably
|
||||
not useful for GTK+ applications.
|
||||
</para>
|
||||
|
||||
@func: the function to call to handle events from GDK.
|
||||
@data: user data to pass to the function.
|
||||
@notify: the function to call when the handler function is removed, i.e. when
|
||||
gdk_event_handler_set() is called with another event handler.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkEventFunc ##### -->
|
||||
<para>
|
||||
Specifies the type of function passed to gdk_event_handler_set() to handle
|
||||
all GDK events.
|
||||
</para>
|
||||
|
||||
@event: the #GdkEvent to process.
|
||||
@data: user data set when the event handler was installed with
|
||||
gdk_event_handler_set().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_client_message ##### -->
|
||||
<para>
|
||||
Sends an X ClientMessage event to a given window.
|
||||
</para>
|
||||
<para>
|
||||
This could be used for communicating between different applications,
|
||||
though the amount of data is limited to 20 bytes.
|
||||
</para>
|
||||
|
||||
@event: the #GdkEvent to send, which should be a #GdkEventClient.
|
||||
@xid: the window to send the X ClientMessage event to.
|
||||
@Returns: non-zero on success.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_event_send_clientmessage_toall ##### -->
|
||||
<para>
|
||||
Sends an X ClientMessage event to all toplevel windows.
|
||||
</para>
|
||||
<para>
|
||||
Toplevel windows are determined by checking for the WM_STATE property, as
|
||||
described in the Inter-Client Communication Conventions Manual (ICCCM).
|
||||
If no windows are found with the WM_STATE property set, the message is sent
|
||||
to all children of the root window.
|
||||
</para>
|
||||
|
||||
@event: the #GdkEvent to send, which should be a #GdkEventClient.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_add_client_message_filter ##### -->
|
||||
<para>
|
||||
Adds a filter to be called when X ClientMessage events are received.
|
||||
</para>
|
||||
|
||||
@message_type: the type of ClientMessage events to receive. This will be
|
||||
checked against the <structfield>message_type</structfield> field of the
|
||||
XClientMessage event struct.
|
||||
@func: the function to call to process the event.
|
||||
@data: user data to pass to @func.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_show_events ##### -->
|
||||
<para>
|
||||
Returns non-zero if event debugging output is enabled.
|
||||
</para>
|
||||
|
||||
@Returns: non-zero if event debugging output is enabled.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_show_events ##### -->
|
||||
<para>
|
||||
Sets whether event debugging information is output.
|
||||
Note that GTK+ must be compiled with debugging enabled, i.e. using the
|
||||
'--enable-debug' configure option.
|
||||
</para>
|
||||
|
||||
@show_events: TRUE to output event debugging information.
|
||||
|
||||
|
@@ -1,643 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
loading and manipulating fonts
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The GdkFont data type represents a font for drawing on
|
||||
the screen. These functions provide support for
|
||||
loading fonts, and also for determining the dimensions
|
||||
of characters and strings when drawn with a particular
|
||||
font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fonts in X are specified by a
|
||||
<firstterm>X Logical Font Description</firstterm>.
|
||||
The following description is considerably simplified.
|
||||
For definitive information about XLFD's see the
|
||||
X reference documentation. A X Logical Font Description (XLFD)
|
||||
consists of a sequence of fields separated (and surrounded by) '-'
|
||||
characters. For example, Adobe Helvetica Bold 12 pt, has the
|
||||
full description:
|
||||
|
||||
<programlisting>
|
||||
"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The fields in the XLFD are:
|
||||
|
||||
<informaltable pgwide=1 frame="none">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>Foundry</entry>
|
||||
<entry>the company or organization where the font originated.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Family</entry>
|
||||
<entry>the font family (a group of related font designs).</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Weight</entry>
|
||||
<entry>A name for the font's typographic weight
|
||||
For example, 'bold' or 'medium').</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Slant</entry>
|
||||
<entry>The slant of the font. Common values are 'R' for Roman,
|
||||
'I' for italoc, and 'O' for oblique.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Set Width</entry>
|
||||
<entry>A name for the width of the font. For example,
|
||||
'normal' or 'condensed'.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Add Style</entry>
|
||||
<entry>Additional information to distinguish a font from
|
||||
other fonts of the same family.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Pixel Size</entry>
|
||||
<entry>The body size of the font in pixels.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Point Size</entry>
|
||||
<entry>The body size of the font in 10ths of a point.
|
||||
(A <firstterm>point</firstterm> is 1/72.27 inch) </entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution X</entry>
|
||||
<entry>The horizontal resolution that the font was designed for.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Resolution Y</entry>
|
||||
<entry>The vertical resolution that the font was designed for .</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Spacing</entry>
|
||||
<entry>The type of spacing for the font - can be 'p' for proportional,
|
||||
'm' for monospaced or 'c' for charcell.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Average Width</entry>
|
||||
<entry>The average width of a glyph in the font. For monospaced
|
||||
and charcell fonts, all glyphs in the font have this width</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Registry</entry>
|
||||
<entry>The registration authority that owns the encoding for
|
||||
the font. Together with the Charset Encoding field, this
|
||||
defines the character set for the font.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>Charset Encoding</entry>
|
||||
<entry>An identifier for the particular character set encoding.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When specifying a font via a X logical Font Description,
|
||||
'*' can be used as a wildcard to match any portion of
|
||||
the XLFD. For instance, the above example could
|
||||
also be specified as
|
||||
|
||||
<programlisting>
|
||||
"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"
|
||||
</programlisting>
|
||||
|
||||
It is generally a good idea to use wildcards for any
|
||||
portion of the XLFD that your program does not care
|
||||
about specifically, since that will improve the
|
||||
chances of finding a matching font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A <firstterm>fontset</firstterm> is a list of fonts
|
||||
that is used for drawing international text that may
|
||||
contain characters from a number of different character
|
||||
sets. It is represented by a list of XLFD's.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The font for a given character set is determined by going
|
||||
through the list of XLFD's in order. For each one, if
|
||||
the registry and and encoding fields match the desired
|
||||
character set, then that font is used, otherwise if
|
||||
the XLFD contains wild-cards for the registry and encoding
|
||||
fields, the registry and encoding for the desired character
|
||||
set are subsituted in and a lookup is done. If a match is found
|
||||
that font is used. Otherwise, processing continues
|
||||
on to the next font in the list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The functions for determining the metrics of a string
|
||||
come in several varieties that can take a number
|
||||
of forms of string input:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>8-bit string</term>
|
||||
<listitem><para>
|
||||
When using functions like gdk_string_width() that
|
||||
take a <type>gchar *</type>, if the font is of type
|
||||
%GDK_FONT_FONT and is an 8-bit font, then each
|
||||
<type>gchar</type> indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>16-bit string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONT, and is a 16-bit
|
||||
font, then the <type>gchar *</type> argument is
|
||||
interpreted as a <type>guint16 *</type> cast to
|
||||
a <type>gchar *</type> and each <type>guint16</type>
|
||||
indexes the glyphs in the font directly.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Multibyte string</term>
|
||||
<listitem><para>
|
||||
For functions taking a <type>gchar *</type>, if the
|
||||
font is of type %GDK_FONT_FONTSET, then the input
|
||||
string is interpreted as a <firstterm>multibyte</firstterm>
|
||||
encoded according to the current locale. (A multibyte
|
||||
string is one in which each character may consist
|
||||
of one or more bytes, with different lengths for different
|
||||
characters in the string). They can be converted to and
|
||||
from wide character strings (see below) using
|
||||
gdk_wcstombs() and gdk_mbstowcs().) The string will
|
||||
be rendered using one or more different fonts from
|
||||
the fontset.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Wide character string</term>
|
||||
<listitem><para>
|
||||
For a number of the text-measuring functions, GTK+
|
||||
provides a variant (such as gdk_text_width_wc()) which
|
||||
takes a <type>GdkWChar *</type> instead of a
|
||||
<type>gchar *</type>. The input is then taken to
|
||||
be a wide character string in the encoding of the
|
||||
current locale. (A wide character string is a string
|
||||
in which each character consists of several bytes,
|
||||
and the width of each character in the string is
|
||||
constant.)
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GDK provides functions to determine a number of different
|
||||
measurements (metrics) for a given string. (Need diagram
|
||||
here).
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>ascent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the top of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>descent</term>
|
||||
<listitem><para>
|
||||
The vertical distance from the origin of the drawing
|
||||
opereration to the bottom of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>left bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the left-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>right bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the right-most part of the drawn character.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>width bearing</term>
|
||||
<listitem><para>
|
||||
The horizontal distance from the origin of the drawing
|
||||
operation to the correct origin for drawing another
|
||||
string to follow the current one. Depending on the
|
||||
font, this could be greater than or less than the
|
||||
right bearing.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkFont ##### -->
|
||||
<para>
|
||||
The GdkFont structure represents a font or fontset. It
|
||||
contains the following public fields. A new GdkFont
|
||||
structure is returned by gdk_font_load() or gdk_fontset_load(),
|
||||
and is reference counted with gdk_font_ref() and gdk_font_unref()
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry><structfield>type</structfield></entry>
|
||||
<entry>a value of type #GdkFontType which indicates
|
||||
whether this font is a single font or a fontset.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>ascent</structfield></entry>
|
||||
<entry>the maximum distance that the font, when drawn,
|
||||
ascends above the baseline.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><structfield>descent</structfield></entry>
|
||||
<entry>the maximum distance that the font, when drawn,
|
||||
descends below the baseline.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@type:
|
||||
@ascent:
|
||||
@descent:
|
||||
|
||||
<!-- ##### ENUM GdkFontType ##### -->
|
||||
<para>
|
||||
Indicates the type of a font. The possible values
|
||||
are currently:
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_FONT_FONT</entry>
|
||||
<entry>the font is a single font.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_FONT_FONT</entry>
|
||||
<entry>the font is a fontset.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_FONT_FONT:
|
||||
@GDK_FONT_FONTSET:
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_load ##### -->
|
||||
<para>
|
||||
Loads a font.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Currently, this function will always return a new
|
||||
font, however, in the future, it may be changed to
|
||||
look up the font in a cache. You should make no
|
||||
assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@font_name: a XLFD describing the font to load.
|
||||
@Returns: a #GdkFont, or NULL if the font could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_fontset_load ##### -->
|
||||
<para>
|
||||
Loads a fontset.
|
||||
</para>
|
||||
<para>
|
||||
Currently this function will always return a new
|
||||
font, however, in the future, it may be changed to
|
||||
look up the font in a cache. You should make no
|
||||
assumptions about the initial reference count.
|
||||
</para>
|
||||
|
||||
@fontset_name: a comma-separated list of XLFDs describing
|
||||
the component fonts of the fontset to load.
|
||||
@Returns: a #GdkFont, or NULL if the fontset could not be loaded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a count by one.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@Returns: @font
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a count by one.
|
||||
If the result is zero, destroys the font.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_id ##### -->
|
||||
<para>
|
||||
Returns the X Font ID for the given font.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont.
|
||||
@Returns: the numeric X Font ID
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_font_equal ##### -->
|
||||
<para>
|
||||
Compares two fonts for equality. Single fonts compare equal
|
||||
if they have the same X font ID. This operation does
|
||||
not currently work correctly for fontsets.
|
||||
</para>
|
||||
|
||||
@fonta: a #GdkFont.
|
||||
@fontb: another #GdkFont.
|
||||
@Returns: %TRUE if the fonts are equal.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a NULL-terminated string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont.
|
||||
@string: the NULL-terminated string to measure.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure
|
||||
@text_length: the length of the text in bytes. (If the
|
||||
font is a 16-bit font, this is twice the length
|
||||
of the text in characters.)
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_extents_wc ##### -->
|
||||
<para>
|
||||
Returns the metrics of a string of wide characters.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in character.
|
||||
@lbearing: the left bearing of the string.
|
||||
@rbearing: the right bearing of the string.
|
||||
@width: the width of the string.
|
||||
@ascent: the ascent of the string.
|
||||
@descent: the descent of the string.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_width ##### -->
|
||||
<para>
|
||||
Determine the width of a NULL-terminated string.
|
||||
(The distance from the origin of the string to the
|
||||
point where the next string in a sequence of strings
|
||||
should be drawn)
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width ##### -->
|
||||
<para>
|
||||
Determine the width of a given string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_width_wc ##### -->
|
||||
<para>
|
||||
Determine the width of a given wide-character string.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in characters.
|
||||
@Returns: the width of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width ##### -->
|
||||
<para>
|
||||
Determine the width of a given character.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_width_wc ##### -->
|
||||
<para>
|
||||
Determine the width of a given wide character. (Encoded
|
||||
in the wide-character encoding of the current locale).
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the width of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a NULL-terminated string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_string_width().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a string when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
See gdk_text_width().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the right bearing of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_measure ##### -->
|
||||
<para>
|
||||
Determines the distance from the origin to the rightmost
|
||||
portion of a character when drawn. This is not the
|
||||
correct value for determining the origin of the next
|
||||
portion when drawing text in multiple pieces.
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the right bearing of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_string_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given NULL-terminated
|
||||
string. This value is not generally useful, because you
|
||||
cannot determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_string_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@string: the NULL-terminated string to measure.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_text_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given string.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@text: the text to measure.
|
||||
@text_length: the length of the text in bytes.
|
||||
@Returns: the height of the string in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_char_height ##### -->
|
||||
<para>
|
||||
Determines the total height of a given character.
|
||||
This value is not generally useful, because you cannot
|
||||
determine how this total height will be drawn in
|
||||
relation to the baseline. See gdk_text_extents().
|
||||
</para>
|
||||
|
||||
@font: a #GdkFont
|
||||
@character: the character to measure.
|
||||
@Returns: the height of the character in pixels.
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GdkWChar ##### -->
|
||||
<para>
|
||||
Specifies a wide character type, used to represent character codes.
|
||||
This is needed since some native languages have character sets which have
|
||||
more than 256 characters (Japanese and Chinese, for example).
|
||||
</para>
|
||||
<para>
|
||||
Wide character values between 0 and 127 are always identical in meaning to
|
||||
the ASCII character codes. The wide character value 0 is often used to
|
||||
terminate strings of wide characters in a similar way to normal strings
|
||||
using the char type.
|
||||
</para>
|
||||
<para>
|
||||
An alternative to wide characters is multi-byte characters, which extend
|
||||
normal char strings to cope with larger character sets. As the name suggests,
|
||||
multi-byte characters use a different number of bytes to store different
|
||||
character codes. For example codes 0-127 (i.e. the ASCII codes) often
|
||||
use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
|
||||
Multi-byte characters have the advantage that they can often be used in an
|
||||
application with little change, since strings are still represented as arrays
|
||||
of char values. However multi-byte strings are much easier to manipulate since
|
||||
the character are all of the same size.
|
||||
</para>
|
||||
<para>
|
||||
Applications typically use wide characters to represent character codes
|
||||
internally, and multi-byte strings when saving the characters to a file.
|
||||
The gdk_wcstombs() and gdk_mbstowcs() functions can be used to convert from
|
||||
one representation to the other.
|
||||
</para>
|
||||
<para>
|
||||
See the 'Extended Characters' section of the GNU C Library Reference Manual
|
||||
for more detailed information on wide and multi-byte characters.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_wcstombs ##### -->
|
||||
<para>
|
||||
Converts a wide character string to a multi-byte string.
|
||||
(The function name comes from an acronym of 'Wide Character String TO
|
||||
Multi-Byte String').
|
||||
</para>
|
||||
|
||||
@src: a wide character string.
|
||||
@Returns: the multi-byte string corresponding to @src, or NULL if the
|
||||
conversion failed. The returned string should be freed with g_free() when no
|
||||
longer needed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_mbstowcs ##### -->
|
||||
<para>
|
||||
Converts a multi-byte string to a wide character string.
|
||||
(The function name comes from an acronym of 'Multi-Byte String TO Wide
|
||||
Character String').
|
||||
</para>
|
||||
|
||||
@dest: the space to place the converted wide character string into.
|
||||
@src: the multi-byte string to convert, which must be null-terminated.
|
||||
@dest_max: the maximum number of wide characters to place in @dest.
|
||||
@Returns: the number of wide characters written into @dest, or -1 if the
|
||||
conversion failed.
|
||||
|
||||
|
@@ -1,639 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Graphics Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
objects to encapsulate drawing properties.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
All drawing operations in GDK take a
|
||||
<firstterm>graphics context</firstterm> (GC) argument.
|
||||
A graphics context encapsulates information about
|
||||
the way things are drawn, such as the foreground
|
||||
color or line width. By using graphics contexts,
|
||||
the number of arguments to each drawing call is
|
||||
greatly reduced, and communication overhead is
|
||||
minimized, since identical arguments do not need
|
||||
to be passed repeatedly.
|
||||
</para>
|
||||
<para>
|
||||
Most values of a graphics context can be set at
|
||||
creation time by using gdk_gc_new_with_values(),
|
||||
or can be set one-by-one using functions such
|
||||
as gdk_gc_set_foreground(). A few of the values
|
||||
in the GC, such as the dash pattern, can only
|
||||
be set by the latter method.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkGC ##### -->
|
||||
<para>
|
||||
The #GdkGC structure represents a graphics context.
|
||||
It is an opaque structure with no user-visible
|
||||
elements.
|
||||
</para>
|
||||
|
||||
@dummy_var:
|
||||
|
||||
<!-- ##### STRUCT GdkGCValues ##### -->
|
||||
<para>
|
||||
The #GdkGCValues structure holds a set of values used
|
||||
to create or modify a graphics context.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>#GdkColor foreground;</entry>
|
||||
<entry>the foreground color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkColor background;</entry>
|
||||
<entry>the background color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFont *font;</entry>
|
||||
<entry>the default font..</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFunction function;</entry>
|
||||
<entry>the bitwise operation used when drawing.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkFill fill;</entry>
|
||||
<entry>the fill style.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *tile;</entry>
|
||||
<entry>the tile pixmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *stipple;</entry>
|
||||
<entry>the stipple bitmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkPixmap *clip_mask;</entry>
|
||||
<entry>the clip mask bitmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkSubwindowMode subwindow_mode;</entry>
|
||||
<entry>the subwindow mode.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint ts_x_origin;</entry>
|
||||
<entry>the x origin of the tile or stipple.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint ts_y_origin;</entry>
|
||||
<entry>the y origin of the tile or stipple.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint clip_x_origin;</entry>
|
||||
<entry>the x origin of the clip mask.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint clip_y_origin;</entry>
|
||||
<entry>the y origin of the clip mask.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint graphics_exposures;</entry>
|
||||
<entry>whether graphics exposures are enabled.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#gint line_width;</entry>
|
||||
<entry>the line width</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkLineStyle line_style;</entry>
|
||||
<entry>the way dashed lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkCapStyle cap_style;</entry>
|
||||
<entry>the way the ends of lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>#GdkJoinStyle join_style;</entry>
|
||||
<entry>the way joins between lines are drawn</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@foreground:
|
||||
@background:
|
||||
@font:
|
||||
@function:
|
||||
@fill:
|
||||
@tile:
|
||||
@stipple:
|
||||
@clip_mask:
|
||||
@subwindow_mode:
|
||||
@ts_x_origin:
|
||||
@ts_y_origin:
|
||||
@clip_x_origin:
|
||||
@clip_y_origin:
|
||||
@graphics_exposures:
|
||||
@line_width:
|
||||
@line_style:
|
||||
@cap_style:
|
||||
@join_style:
|
||||
|
||||
<!-- ##### ENUM GdkGCValuesMask ##### -->
|
||||
<para>
|
||||
A set of bit flags used to indicate which fields
|
||||
#GdkGCValues structure are set.
|
||||
</para>
|
||||
|
||||
@GDK_GC_FOREGROUND:
|
||||
@GDK_GC_BACKGROUND:
|
||||
@GDK_GC_FONT:
|
||||
@GDK_GC_FUNCTION:
|
||||
@GDK_GC_FILL:
|
||||
@GDK_GC_TILE:
|
||||
@GDK_GC_STIPPLE:
|
||||
@GDK_GC_CLIP_MASK:
|
||||
@GDK_GC_SUBWINDOW:
|
||||
@GDK_GC_TS_X_ORIGIN:
|
||||
@GDK_GC_TS_Y_ORIGIN:
|
||||
@GDK_GC_CLIP_X_ORIGIN:
|
||||
@GDK_GC_CLIP_Y_ORIGIN:
|
||||
@GDK_GC_EXPOSURES:
|
||||
@GDK_GC_LINE_WIDTH:
|
||||
@GDK_GC_LINE_STYLE:
|
||||
@GDK_GC_CAP_STYLE:
|
||||
@GDK_GC_JOIN_STYLE:
|
||||
|
||||
<!-- ##### ENUM GdkFunction ##### -->
|
||||
<para>
|
||||
Determines how the bit values for the source pixels are combined with
|
||||
the bit values for destination pixels to produce the final result. The
|
||||
sixteen values here correspond to the 16 different possible 2x2 truth
|
||||
tables. Only a couple of these values are usually useful; for colored
|
||||
images, only %GDK_COPY, %GDK_XOR and %GDK_INVERT are generally
|
||||
useful. For bitmaps, %GDK_AND and %GDK_OR are also useful.
|
||||
</para>
|
||||
|
||||
@GDK_COPY:
|
||||
@GDK_INVERT:
|
||||
@GDK_XOR:
|
||||
@GDK_CLEAR:
|
||||
@GDK_AND:
|
||||
@GDK_AND_REVERSE:
|
||||
@GDK_AND_INVERT:
|
||||
@GDK_NOOP:
|
||||
@GDK_OR:
|
||||
@GDK_EQUIV:
|
||||
@GDK_OR_REVERSE:
|
||||
@GDK_COPY_INVERT:
|
||||
@GDK_OR_INVERT:
|
||||
@GDK_NAND:
|
||||
@GDK_SET:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new ##### -->
|
||||
<para>
|
||||
Create a new graphics context with default values.
|
||||
</para>
|
||||
|
||||
@window: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_new_with_values ##### -->
|
||||
<para>
|
||||
Create a new GC with the given initial values.
|
||||
</para>
|
||||
|
||||
@window: a #GdkDrawable. The created GC must always be used
|
||||
with drawables of the same depth as this one.
|
||||
@values: a structure containing initial values for the GC.
|
||||
@values_mask: a bit mask indicating which fields in @values
|
||||
are set.
|
||||
@Returns: the new graphics context.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count on a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@Returns: @gc.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count on a graphics context. If
|
||||
the resulting reference count is zero, the graphics
|
||||
context will be destroyed.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_destroy ##### -->
|
||||
<para>
|
||||
Identical to gdk_gc_unref(). This function is obsolete
|
||||
and should not be used.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_get_values ##### -->
|
||||
<para>
|
||||
Retrieves the current values from a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@values: the #GdkGCValues structure in which to store the results.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_foreground ##### -->
|
||||
<para>
|
||||
Sets the foreground color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@color: the new foreground color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_background ##### -->
|
||||
<para>
|
||||
Sets the background color for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@color: the new background color.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_font ##### -->
|
||||
<para>
|
||||
Sets the font for a graphics context. (Note that
|
||||
all text-drawing functions in GDK take a @font
|
||||
argument; the value set here is used when that
|
||||
argument is %NULL.)
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@font: the new font.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_function ##### -->
|
||||
<para>
|
||||
Determines how the current pixel values and the
|
||||
pixel values being drawn are combined to produce
|
||||
the final pixel values.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@function:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_fill ##### -->
|
||||
<para>
|
||||
Set the fill mode for a graphics context.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@fill: the new fill mode.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkFill ##### -->
|
||||
<para>
|
||||
Determines how primitives are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_SOLID</entry>
|
||||
<entry>draw with the foreground color.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_TILED</entry>
|
||||
<entry>draw with a tiled pixmap.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_STIPPLED</entry>
|
||||
<entry>draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be left untouched.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_OPAQUE_STIPPLED</entry>
|
||||
<entry>draw using the stipple bitmap. Pixels corresponding
|
||||
to bits in the stipple bitmap that are set will be drawn in the
|
||||
foreground color; pixels corresponding to bits that are
|
||||
not set will be drawn with the background color.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_SOLID:
|
||||
@GDK_TILED:
|
||||
@GDK_STIPPLED:
|
||||
@GDK_OPAQUE_STIPPLED:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_tile ##### -->
|
||||
<para>
|
||||
Set a tile pixmap for a graphics context.
|
||||
This will only be used if the fill mode
|
||||
is %GDK_TILED.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@tile: the new tile pixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_stipple ##### -->
|
||||
<para>
|
||||
Set the stipple bitmap for a graphics context. The
|
||||
stipple will only be used if the fill mode is
|
||||
%GDK_STIPPLED or %GDK_OPAQUE_STIPPLED.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@stipple: the new stipple bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_ts_origin ##### -->
|
||||
<para>
|
||||
Set the origin when using tiles or stipples with
|
||||
the GC. The tile or stipple will be aligned such
|
||||
that the upper left corner of the tile or stipple
|
||||
will coincide with this point.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_origin ##### -->
|
||||
<para>
|
||||
Sets the origin of the clip mask. The coordinates are
|
||||
interpreted relative to the upper-left corner of
|
||||
the destination drawable of the current operation.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@x: the x-coordinate of the origin.
|
||||
@y: the y-coordinate of the origin.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_mask ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a bitmap.
|
||||
The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc: the #GdkGC.
|
||||
@mask: a bitmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_rectangle ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a
|
||||
rectangle. The clip mask is interpreted relative to the clip
|
||||
origin. (See gdk_gc_set_clip_origin()).
|
||||
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@rectangle: the rectangle to clip to.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_clip_region ##### -->
|
||||
<para>
|
||||
Sets the clip mask for a graphics context from a region structure.
|
||||
The clip mask is interpreted relative to the clip origin. (See
|
||||
gdk_gc_set_clip_origin()).
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@region: the #GdkRegion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_subwindow ##### -->
|
||||
<para>
|
||||
Sets how drawing with this GC on a window will affect child
|
||||
windows of that window.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@mode: the subwindow mode.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkSubwindowMode ##### -->
|
||||
<para>
|
||||
|
||||
Determines how drawing onto a window will affect child
|
||||
windows of that window.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="3*"><colspec colwidth="7*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CLIP_BY_CHILDREN</entry>
|
||||
<entry>only draw onto the window itself.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INCLUDE_INFERIORS</entry>
|
||||
<entry>Draw onto the window and child windows.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_CLIP_BY_CHILDREN:
|
||||
@GDK_INCLUDE_INFERIORS:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_exposures ##### -->
|
||||
<para>
|
||||
Sets whether copying non-visible portions of a drawable
|
||||
using this graphics context generate exposure events
|
||||
for the corresponding regions of the destination
|
||||
drawable. (See gdk_draw_pixmap()).
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@exposures: if %TRUE, exposure events will be generated.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_line_attributes ##### -->
|
||||
<para>
|
||||
Sets various attributes of how lines are drawn. See
|
||||
the corresponding members of GdkGCValues for full
|
||||
explanations of the arguments.
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@line_width: the width of lines.
|
||||
@line_style: the dash-style for lines.
|
||||
@cap_style: the manner in which the ends of lines are drawn.
|
||||
@join_style: the in which lines are joined together.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkLineStyle ##### -->
|
||||
<para>
|
||||
Determines how lines are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_SOLID</entry>
|
||||
<entry>lines are drawn solid.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_ON_OFF_DASH</entry>
|
||||
<entry>even segments are drawn; odd segments are not drawn.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_LINE_DOUBLE_DASH</entry>
|
||||
<entry>even segments are normally. Odd segments are drawn
|
||||
in the background color if the fill style is %GDK_SOLID,
|
||||
or in the background color masked by the stipple if the
|
||||
fill style is %GDK_STIPPLED.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_LINE_SOLID:
|
||||
@GDK_LINE_ON_OFF_DASH:
|
||||
@GDK_LINE_DOUBLE_DASH:
|
||||
|
||||
<!-- ##### ENUM GdkCapStyle ##### -->
|
||||
<para>
|
||||
Determines how the end of lines are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_NOT_LAST</entry>
|
||||
<entry>the same as %GDK_CAP_BUTT for lines of non-zero width.
|
||||
for zero width lines, the final point on the line
|
||||
will not be drawn.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_BUTT</entry>
|
||||
<entry>the ends of the lines are drawn squared off and extending
|
||||
to the coordinates of the end point.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_ROUND</entry>
|
||||
<entry>the ends of the lines are drawn as semicircles with the
|
||||
diameter equal to the line width and centered at the
|
||||
end point.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_CAP_PROJECTING</entry>
|
||||
<entry>the ends of the lines are drawn squared off and extending
|
||||
half the width of the line beyond the end point.</entry>
|
||||
</row>
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_CAP_NOT_LAST:
|
||||
@GDK_CAP_BUTT:
|
||||
@GDK_CAP_ROUND:
|
||||
@GDK_CAP_PROJECTING:
|
||||
|
||||
<!-- ##### ENUM GdkJoinStyle ##### -->
|
||||
<para>
|
||||
Determines how the joins between segments of a polygon are drawn.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="struct">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_MITER</entry>
|
||||
<entry>the sides of each line are extended to meet at an angle.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_ROUND</entry>
|
||||
<entry>the sides of the two lines are joined by a circular arc.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_JOIN_BEVEL</entry>
|
||||
<entry>the sides of the two lines are joined by a straight line which
|
||||
makes an equal angle with each line.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_JOIN_MITER:
|
||||
@GDK_JOIN_ROUND:
|
||||
@GDK_JOIN_BEVEL:
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_set_dashes ##### -->
|
||||
<para>
|
||||
Sets the way dashed-lines are drawn. Lines will be
|
||||
drawn with alternating on and off segments of the
|
||||
lengths specified in @dash_list. The manner in
|
||||
which the on and off segments are drawn is determined
|
||||
by the @line_style value of the GC. (This can
|
||||
be changed with gdk_gc_set_line_attributes)
|
||||
</para>
|
||||
|
||||
@gc: a #GdkGC.
|
||||
@dash_offset: the
|
||||
@dash_list: an array of dash lengths.
|
||||
@n: the number of elements in @dash_list.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_gc_copy ##### -->
|
||||
<para>
|
||||
Copy the set of values from one graphics context
|
||||
onto another graphics context.
|
||||
</para>
|
||||
|
||||
@dst_gc: the destination graphics context.
|
||||
@src_gc: the source graphics context.
|
||||
|
||||
|
@@ -1,346 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
General
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
library initialization and miscellaneous functions.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
This section describes the GDK initialization functions and miscellaneous
|
||||
utility functions.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_init ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server.
|
||||
If initialization fails, a warning message is output and the application
|
||||
terminates with a call to exit(1).
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_init_check ##### -->
|
||||
<para>
|
||||
Initializes the GDK library and connects to the X server, returning TRUE on
|
||||
success.
|
||||
</para>
|
||||
<para>
|
||||
Any arguments used by GDK are removed from the array and @argc and @argv are
|
||||
updated accordingly.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
|
||||
by GTK+ applications.
|
||||
</para>
|
||||
|
||||
@argc: the number of command line arguments.
|
||||
@argv: the array of command line arguments.
|
||||
@Returns: TRUE if initialization succeeded.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_exit ##### -->
|
||||
<para>
|
||||
Exits the application using the exit() system call.
|
||||
</para>
|
||||
<para>
|
||||
This routine is provided mainly for backwards compatability, since it used to
|
||||
perform tasks necessary to exit the application cleanly. Those tasks are now
|
||||
performed in a function which is automatically called on exit (via the use
|
||||
of g_atexit()).
|
||||
</para>
|
||||
|
||||
@error_code: the error code to pass to the exit() call.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_locale ##### -->
|
||||
<para>
|
||||
Initializes the support for internationalization by calling the setlocale()
|
||||
system call. This function is called by gtk_set_locale() and so GTK+
|
||||
applications should use that instead.
|
||||
</para>
|
||||
<para>
|
||||
The locale to use is determined by the LANG environment variable,
|
||||
so to run an application in a certain locale you can do something like this:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
export LANG="fr"
|
||||
... run application ...
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
If the locale is not supported by X then it is reset to the standard "C"
|
||||
locale.
|
||||
</para>
|
||||
|
||||
@Returns: the resulting locale.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
|
||||
<para>
|
||||
Sets the SM_CLIENT_ID property on the application's leader window so that
|
||||
the window manager can save the application's state using the X11R6 ICCCM
|
||||
session management protocol.
|
||||
</para>
|
||||
<para>
|
||||
The leader window is automatically created by GDK and never shown. It's only
|
||||
use is for session management. The WM_CLIENT_LEADER property is automatically
|
||||
set on all X windows created by the application to point to the leader window.
|
||||
</para>
|
||||
<para>
|
||||
See the X Session Management Library documentation for more information on
|
||||
session management and the Inter-Client Communication Conventions Manual
|
||||
(ICCCM) for information on the WM_CLIENT_LEADER property. (Both documents are
|
||||
part of the X Windows distribution.)
|
||||
</para>
|
||||
|
||||
@sm_client_id: the client id assigned by the session manager when the
|
||||
connection was opened, or NULL to remove the property.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_display ##### -->
|
||||
<para>
|
||||
Gets the name of the display, which usually comes from the DISPLAY
|
||||
environment variable or the --display command line option.
|
||||
</para>
|
||||
|
||||
@Returns: the name of the display.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_flush ##### -->
|
||||
<para>
|
||||
Flushes the X output buffer and waits until all requests have been processed
|
||||
by the server. This is rarely needed by applications. It's main use is for
|
||||
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width ##### -->
|
||||
<para>
|
||||
Returns the width of the screen in pixels.
|
||||
</para>
|
||||
|
||||
@Returns: the width of the screen in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height ##### -->
|
||||
<para>
|
||||
Returns the height of the screen in pixels.
|
||||
</para>
|
||||
|
||||
@Returns: the height of the screen in pixels.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
|
||||
<para>
|
||||
Returns the width of the screen in millimeters.
|
||||
Note that on many X servers this value will not be correct.
|
||||
</para>
|
||||
|
||||
@Returns: the width of the screen in millimeters, though it is not always
|
||||
correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
|
||||
<para>
|
||||
Returns the height of the screen in millimeters.
|
||||
Note that on many X servers this value will not be correct.
|
||||
</para>
|
||||
|
||||
@Returns: the height of the screen in millimeters, though it is not always
|
||||
correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_grab ##### -->
|
||||
<para>
|
||||
Grabs the pointer (usually a mouse) so that all events are passed to this
|
||||
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
|
||||
the grab window becomes unviewable.
|
||||
This overrides any previous pointer grab by this client.
|
||||
</para>
|
||||
<para>
|
||||
Pointer grabs are used for operations which need complete control over mouse
|
||||
events, even if the mouse leaves the application.
|
||||
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
|
||||
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
|
||||
widgets.
|
||||
</para>
|
||||
<para>
|
||||
Note that if the event mask of an X window has selected both button press and
|
||||
button release events, then a button press event will cause an automatic
|
||||
pointer grab until the button is released.
|
||||
X does this automatically since most applications expect to receive button
|
||||
press and release events in pairs.
|
||||
It is equivalent to a pointer grab on the window with @owner_events set to
|
||||
TRUE.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if FALSE then all pointer events are reported with respect to
|
||||
@window and are only reported if selected by @event_mask. If TRUE then pointer
|
||||
events for this application are reported as normal, but pointer events outside
|
||||
this application are reported with respect to @window and only if selected by
|
||||
@event_mask. In either mode, unreported events are discarded.
|
||||
@event_mask: specifies the event mask, which is used in accordance with
|
||||
@owner_events.
|
||||
@confine_to: TRUE to confine the pointer to @window. If the pointer is outside
|
||||
@window, it will automatically be moved to the closest edge of @window and
|
||||
enter and leave events will be generated as necessary.
|
||||
@cursor: the cursor to display while the grab is active. If this is NULL then
|
||||
the normal cursors are used for @window and its descendants, and the cursor
|
||||
for @window is used for all other windows.
|
||||
@time: the timestamp of the event which led to this pointer grab. This usually
|
||||
comes from a #GdkEventButton struct, though #GDK_CURRENT_TIME can be used if
|
||||
the time isn't known.
|
||||
@Returns: 0 if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
|
||||
<para>
|
||||
Ungrabs the pointer, if it is grabbed by this application.
|
||||
</para>
|
||||
|
||||
@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
|
||||
<para>
|
||||
Returns TRUE if the pointer is currently grabbed by this application.
|
||||
</para>
|
||||
<para>
|
||||
Note that the return value is not completely reliable since the X server may
|
||||
automatically ungrab the pointer, without informing the application, if the
|
||||
grab window becomes unviewable. It also does not take passive pointer grabs
|
||||
into account.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if the pointer is currently grabbed by this application.
|
||||
Though this value is not always correct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
|
||||
<para>
|
||||
Grabs the keyboard so that all events are passed to this
|
||||
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
|
||||
This overrides any previous keyboard grab by this client.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow which will own the grab (the grab window).
|
||||
@owner_events: if FALSE then all keyboard events are reported with respect to
|
||||
@window. If TRUE then keyboard events for this application are reported as
|
||||
normal, but keyboard events outside this application are reported with respect
|
||||
to @window. Both key press and key release events are alwasy reported,
|
||||
independant of the event mask set by the application.
|
||||
@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
@Returns: 0 if the grab was successful.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
|
||||
<para>
|
||||
Ungrabs the keyboard, if it is grabbed by this application.
|
||||
</para>
|
||||
|
||||
@time: a timestamp from a #GdkEvent, or #GDK_CURRENT_TIME if no timestamp is
|
||||
available.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_key_repeat_disable ##### -->
|
||||
<para>
|
||||
Disables the keyboard auto-repeat mode.
|
||||
This should be used with care as it may affect other applications.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_key_repeat_restore ##### -->
|
||||
<para>
|
||||
Restores the keyboard auto-repeat mode to its state when the application was
|
||||
started.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_beep ##### -->
|
||||
<para>
|
||||
Emits a short beep.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
|
||||
<para>
|
||||
Returns TRUE if GDK will attempt to use the MIT-SHM shared memory extension.
|
||||
</para>
|
||||
<para>
|
||||
The shared memory extension is used for #GdkImage, and consequently for
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link>.
|
||||
It enables much faster drawing by communicating with the X server through
|
||||
SYSV shared memory calls. However, it can only be used if the X client and
|
||||
server are on the same machine and the server supports it.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if use of the MIT shared memory extension will be attempted.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_set_use_xshm ##### -->
|
||||
<para>
|
||||
Sets whether the use of the MIT shared memory extension should be attempted.
|
||||
This function is mainly for internal use. It is only safe for an application
|
||||
to set this to FALSE, since if it is set to TRUE and the server does not
|
||||
support the extension it may cause warning messages to be output.
|
||||
</para>
|
||||
|
||||
@use_xshm: TRUE if use of the MIT shared memory extension should be attempted.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_push ##### -->
|
||||
<para>
|
||||
This function allows X errors to be trapped instead of the normal behavior
|
||||
of exiting the application. It should only be used if it is not possible to
|
||||
avoid the X error in any other way.
|
||||
</para>
|
||||
<example>
|
||||
<title>Trapping an X error.</title>
|
||||
<programlisting>
|
||||
gdk_error_trap_push ();
|
||||
|
||||
/* ... Call the X function which may cause an error here ... */
|
||||
|
||||
/* Flush the X queue to catch errors now. */
|
||||
gdk_flush ();
|
||||
|
||||
if (gdk_error_trap_pop ())
|
||||
{
|
||||
/* ... Handle the error here ... */
|
||||
}
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
|
||||
<para>
|
||||
Removes the X error trap installed with gdk_error_trap_push().
|
||||
</para>
|
||||
|
||||
@Returns: the X error code, or 0 if no error occurred.
|
||||
|
||||
|
@@ -1,156 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Images
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
an area for bit-mapped graphics stored on the X Windows client.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GdkImage type represents an area for drawing graphics.
|
||||
It has now been superceded to a large extent by the much more flexible
|
||||
<link linkend="gdk-GdkRGB">GdkRGB</link> functions.
|
||||
</para>
|
||||
<para>
|
||||
To create an empty #GdkImage use gdk_image_new().
|
||||
To create a #GdkImage from bitmap data use gdk_image_new_bitmap().
|
||||
To create an image from part of a #GdkWindow use gdk_image_get().
|
||||
</para>
|
||||
<para>
|
||||
The image can be manipulated with gdk_image_get_pixel() and
|
||||
gdk_image_put_pixel(), or alternatively by changing the actual pixel data.
|
||||
Though manipulating the pixel data requires complicated code to cope with
|
||||
the different formats that may be used.
|
||||
</para>
|
||||
<para>
|
||||
To draw a #GdkImage in a #GdkWindow or #GdkPixmap use gdk_draw_image().
|
||||
</para>
|
||||
<para>
|
||||
To destroy a #GdkImage use gdk_image_destroy().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Bitmaps-and-Pixmaps">Bitmaps and Pixmaps</link></term>
|
||||
<listitem><para>
|
||||
Graphics which are stored on the X Windows server.
|
||||
Since these are stored on the server they can be drawn very quickly, and all
|
||||
of the <link linkend="gdk-Drawing-Primitives">Drawing Primitives</link> can be
|
||||
used to draw on them. Their main disadvantage is that manipulating individual
|
||||
pixels can be very slow.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-GdkRGB">GdkRGB</link></term>
|
||||
<listitem><para>
|
||||
Built on top of #GdkImage, this provides much more functionality,
|
||||
including the dithering of colors to produce better output on low-color
|
||||
displays.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkImage ##### -->
|
||||
<para>
|
||||
The #GdkImage struct contains information on the image and the pixel data.
|
||||
</para>
|
||||
|
||||
@type: the type of the image.
|
||||
@visual: the visual.
|
||||
@byte_order: the byte order.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@depth: the depth of the image, i.e. the number of bits per pixel.
|
||||
@bpp: the number of bytes per pixel.
|
||||
@bpl: the number of bytes per line of the image.
|
||||
@mem: the pixel data.
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkImage.
|
||||
</para>
|
||||
|
||||
@type: the type of the #GdkImage, one of %GDK_IMAGE_NORMAL, %GDK_IMAGE_SHARED
|
||||
and %GDK_IMAGE_FASTEST. %GDK_IMAGE_FASTEST is probably the best choice, since
|
||||
it will try creating a %GDK_IMAGE_SHARED image first and if that fails it will
|
||||
then use %GDK_IMAGE_NORMAL.
|
||||
@visual: the #GdkVisual to use for the image.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@Returns: a new #GdkImage, or NULL if the image could not be created.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkImageType ##### -->
|
||||
<para>
|
||||
Specifies the type of a #GdkImage.
|
||||
</para>
|
||||
|
||||
@GDK_IMAGE_NORMAL: The original X image type, which is quite slow since the
|
||||
image has to be transferred from the client to the server to display it.
|
||||
@GDK_IMAGE_SHARED: A faster image type, which uses shared memory to transfer
|
||||
the image data between client and server. However this will only be available
|
||||
if client and server are on the same machine and the shared memory extension
|
||||
is supported by the server.
|
||||
@GDK_IMAGE_FASTEST: Specifies that %GDK_IMAGE_SHARED should be tried first,
|
||||
and if that fails then %GDK_IMAGE_NORMAL will be used.
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_new_bitmap ##### -->
|
||||
<para>
|
||||
Creates a new #GdkImage with a depth of 1 from the given data.
|
||||
</para>
|
||||
|
||||
@visual: the #GdkVisual to use for the image.
|
||||
@data: the pixel data.
|
||||
@width: the width of the image in pixels.
|
||||
@height: the height of the image in pixels.
|
||||
@Returns: a new #GdkImage.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get ##### -->
|
||||
<para>
|
||||
Gets part of a #GdkWindow and stores it in a new #GdkImage.
|
||||
</para>
|
||||
|
||||
@window: the #GdkWindow to copy from.
|
||||
@x: the left edge of the rectangle to copy from @window.
|
||||
@y: the top edge of the rectangle to copy from @window.
|
||||
@width: the width of the area to copy, in pixels.
|
||||
@height: the height of the area to copy, in pixels.
|
||||
@Returns: a new #GdkImage with a copy of the given area of @window.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_destroy ##### -->
|
||||
<para>
|
||||
Destroys a #GdkImage, freeing any resources allocated for it.
|
||||
</para>
|
||||
|
||||
@image: a #GdkImage.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_put_pixel ##### -->
|
||||
<para>
|
||||
Sets a pixel in a #GdkImage to a given pixel value.
|
||||
</para>
|
||||
|
||||
@image: a #GdkImage.
|
||||
@x: the x coordinate of the pixel to set.
|
||||
@y: the y coordinate of the pixel to set.
|
||||
@pixel: the pixel value to set.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_image_get_pixel ##### -->
|
||||
<para>
|
||||
Gets a pixel value at a specified position in a #GdkImage.
|
||||
</para>
|
||||
|
||||
@image: a #GdkImage.
|
||||
@x: the x coordinate of the pixel to get.
|
||||
@y: the y coordinate of the pixel to get.
|
||||
@Returns: the pixel value at the given position.
|
||||
|
||||
|
@@ -1,130 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Callbacks on file descriptors.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The functions in this section are used to establish
|
||||
callbacks when some condition becomes true for
|
||||
a file descriptor. They are currently just wrappers around
|
||||
the <link linkend="glib-IO-Channels">IO Channel</link>
|
||||
facility.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term>
|
||||
<listitem><para>The main loop in which input callbacks run.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><link linkend="glib-IO-Channels">IO Channels</link></term>
|
||||
<listitem><para>A newer and more flexible way of doing IO
|
||||
callbacks.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add_full ##### -->
|
||||
<para>
|
||||
Establish a callback when a condition becomes true on
|
||||
a file descriptor.
|
||||
</para>
|
||||
|
||||
@source: a file descriptor.
|
||||
@condition: the condition.
|
||||
@function: the callback function.
|
||||
@data: callback data passed to @function.
|
||||
@destroy: callback function to call with @data when the input
|
||||
handler is removed.
|
||||
@Returns: a tag that can later be used as an argument to
|
||||
gdk_input_remove().
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputCondition ##### -->
|
||||
<para>
|
||||
A set of bit flags used to specify conditions for which
|
||||
an input callback will be triggered. The three members
|
||||
of this enumeration correspond to the @readfds,
|
||||
@writefds, and @exceptfds arguments to the
|
||||
<function>select</function> system call.
|
||||
|
||||
<informaltable pgwide=1 frame="none" role="enum">
|
||||
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
|
||||
<tbody>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_READ</entry>
|
||||
<entry>the file descriptor has become available for reading.
|
||||
(Or, as is standard in Unix, a socket or pipe was closed
|
||||
at the other end; this is the case if a subsequent read
|
||||
on the file descriptor returns a count of zero.)</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_WRITE</entry>
|
||||
<entry>the file descriptor has become available for writing.</entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry>GDK_INPUT_EXCEPTION</entry>
|
||||
<entry>an exception was raised on the file descriptor.</entry>
|
||||
</row>
|
||||
|
||||
</tbody></tgroup></informaltable>
|
||||
</para>
|
||||
|
||||
@GDK_INPUT_READ:
|
||||
@GDK_INPUT_WRITE:
|
||||
@GDK_INPUT_EXCEPTION:
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkInputFunction ##### -->
|
||||
<para>
|
||||
A callback function that will be called when some condition
|
||||
occurs.
|
||||
</para>
|
||||
|
||||
@data: the user data passed to gdk_input_add() or gdk_input_add_full().
|
||||
@source: the source where the condition occurred.
|
||||
@condition: the triggering condition.
|
||||
|
||||
|
||||
<!-- ##### USER_FUNCTION GdkDestroyNotify ##### -->
|
||||
<para>
|
||||
A callback function called when a piece of user data is
|
||||
no longer being stored by GDK. Will typically free the
|
||||
structure or object that @data points to.
|
||||
</para>
|
||||
|
||||
@data: the user data.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_add ##### -->
|
||||
<para>
|
||||
Establish a callback when a condition becomes true on
|
||||
a file descriptor.
|
||||
</para>
|
||||
|
||||
@source: a file descriptor.
|
||||
@condition: the condition.
|
||||
@function: the callback function.
|
||||
@data: callback data passed to @function.
|
||||
@Returns: a tag that can later be used as an argument to
|
||||
gdk_input_remove().
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_remove ##### -->
|
||||
<para>
|
||||
Remove a callback added with gdk_input_add() or
|
||||
gdk_input_add_full().
|
||||
</para>
|
||||
|
||||
@tag: the tag returned when the callback was set up.
|
||||
|
||||
|
@@ -1,243 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Contexts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
internationalized text input properties.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GdkIC input context is used for each user interface element which supports
|
||||
internationalized text input. See the
|
||||
<link linkend="gdk-Input-Methods">Input Methods</link> section for an overview
|
||||
of how internationalized text input works in GTK+.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkIC ##### -->
|
||||
<para>
|
||||
The #GdkIC struct is an opaque structure representing an input context
|
||||
for use with the global <link linkend="gdk-Input-Methods">Input Method</link>.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkIC using the given attributes.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a new #GdkIC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_destroy ##### -->
|
||||
<para>
|
||||
Destroys the input context.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_events ##### -->
|
||||
<para>
|
||||
Returns the mask of events that the input method needs to function properly.
|
||||
This is typically called in a widget's realize method after creating the
|
||||
#GdkIC. The returned event mask is then combined with the widget's
|
||||
own event mask and applied using gdk_window_set_events().
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the mask of events that the input method needs to function
|
||||
properly.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_style ##### -->
|
||||
<para>
|
||||
Returns the pre-edit and status style of the #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@Returns: the pre-edit and status style of the #GdkIC.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_get_attr ##### -->
|
||||
<para>
|
||||
Gets attributes of a #GdkIC.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct to contain the returned attributes.
|
||||
@mask: a #GdkICAttributesType mask specifying which attributes to get.
|
||||
@Returns: a #GdkICAttributesType mask specifying which of the attributes
|
||||
were not retrieved succesfully.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_set_attr ##### -->
|
||||
<para>
|
||||
Sets attributes of the #GdkIC.
|
||||
</para>
|
||||
<para>
|
||||
Note that the GDK_IC_STYLE and GDK_IC_CLIENT_WINDOW attributes can only be set
|
||||
when creating the #GdkIC, and the GDK_IC_FILTER_EVENTS attribute is read-only.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkIC.
|
||||
@attr: a #GdkICAttr struct containing attributes to use for the input context.
|
||||
@mask: a #GdkICAttributesType mask specifying which of the attributes in @attr
|
||||
are set.
|
||||
@Returns: a #GdkICAttributesType mask indicating which of the attributes
|
||||
were not set successfully.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkICAttr ##### -->
|
||||
<para>
|
||||
The #GdkICAttr struct is used when getting and setting attributes of the
|
||||
input context. It is used together with a #GdkICAttributesType mask which
|
||||
specifies which of the fields are being set or returned.
|
||||
</para>
|
||||
|
||||
@style: the pre-edit and status style. This attribute is required when
|
||||
creating the #GdkIC, and cannot be changed.
|
||||
@client_window: the #GdkWindow in which the input method will display its
|
||||
pre-edit and status areas or create subwindows.
|
||||
The preedit_area and status_area attributes are specified relative to this
|
||||
window. This attribute is required when creating the #GdkIC, and cannot be
|
||||
changed.
|
||||
@focus_window: the #GdkWindow which is to be used when editing text.
|
||||
gdk_im_begin() sets this attribute before starting the text input process,
|
||||
so it is normally not necessary to set it elsewhere.
|
||||
@filter_events: the mask of events that the input method requires.
|
||||
See the gdk_ic_get_events() function. This attribute is read-only and is
|
||||
never changed.
|
||||
@spot_location: the position of the insertion cursor, for use with the
|
||||
%GDK_IM_PREEDIT_POSITION style. The y coordinate specifies the baseline of
|
||||
the text.
|
||||
@line_spacing: the line spacing to be used in the pre-edit and status areas
|
||||
when displaying multi-line text.
|
||||
@cursor: the cursor to use in the input method's windows.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_fontset: the font to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_area: the area in which the input method will display pre-editing
|
||||
data, used for the %GDK_IM_PREEDIT_POSITION and %GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_area_needed: the area that the input method requests for displaying
|
||||
pre-editing data, used for the %GDK_IM_PREEDIT_POSITION and
|
||||
%GDK_IM_PREEDIT_AREA styles.
|
||||
@preedit_foreground: the foreground color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_background: the background color to use for the pre-edit area.
|
||||
This color must already be allocated in the preedit_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_pixmap: the background pixmap to use for the pre-edit area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@preedit_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
@status_fontset: the font to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_area: the are that the input method will display status information in.
|
||||
This is used for the %GDK_IM_STATUS_AREA style.
|
||||
@status_area_needed: the size that the input method requests for displaying
|
||||
status information, for the %GDK_IM_STATUS_AREA style.
|
||||
@status_foreground: the foreground color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_background: the background color to use for the status area.
|
||||
This color must already be allocated in the status_colormap.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_pixmap: the background pixmap to use for the status area.
|
||||
If this attribute isn't set it is determined by the input method.
|
||||
@status_colormap: the colormap the input method should use to allocate colors.
|
||||
The default value is the colormap of client_window.
|
||||
|
||||
<!-- ##### ENUM GdkICAttributesType ##### -->
|
||||
<para>
|
||||
The #GdkICAttributesType contains a set of bit-flags which are used to
|
||||
specify which of the attributes in a #GdkICAttr are being set or returned.
|
||||
</para>
|
||||
<para>
|
||||
It also contains several combinations of the flags which specify required
|
||||
attributes for the various styles:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_ALL_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of attributes required for all styles.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_AREA pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_PREEDIT_POSITION_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_PREEDIT_POSITION pre-edit style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>%GDK_IC_STATUS_AREA_REQ:</term>
|
||||
<listitem><para>
|
||||
the set of additional attributes required for the
|
||||
%GDK_IM_STATUS_AREA status style.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
@GDK_IC_STYLE:
|
||||
@GDK_IC_CLIENT_WINDOW:
|
||||
@GDK_IC_FOCUS_WINDOW:
|
||||
@GDK_IC_FILTER_EVENTS:
|
||||
@GDK_IC_SPOT_LOCATION:
|
||||
@GDK_IC_LINE_SPACING:
|
||||
@GDK_IC_CURSOR:
|
||||
@GDK_IC_PREEDIT_FONTSET:
|
||||
@GDK_IC_PREEDIT_AREA:
|
||||
@GDK_IC_PREEDIT_AREA_NEEDED:
|
||||
@GDK_IC_PREEDIT_FOREGROUND:
|
||||
@GDK_IC_PREEDIT_BACKGROUND:
|
||||
@GDK_IC_PREEDIT_PIXMAP:
|
||||
@GDK_IC_PREEDIT_COLORMAP:
|
||||
@GDK_IC_STATUS_FONTSET:
|
||||
@GDK_IC_STATUS_AREA:
|
||||
@GDK_IC_STATUS_AREA_NEEDED:
|
||||
@GDK_IC_STATUS_FOREGROUND:
|
||||
@GDK_IC_STATUS_BACKGROUND:
|
||||
@GDK_IC_STATUS_PIXMAP:
|
||||
@GDK_IC_STATUS_COLORMAP:
|
||||
@GDK_IC_ALL_REQ:
|
||||
@GDK_IC_PREEDIT_AREA_REQ:
|
||||
@GDK_IC_PREEDIT_POSITION_REQ:
|
||||
@GDK_IC_STATUS_AREA_REQ:
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_new ##### -->
|
||||
<para>
|
||||
Creates a new #GdkICAttr struct, with all fields set to 0.
|
||||
The #GdkICAttr struct should be freed with gdk_ic_attr_destroy() when no
|
||||
longer needed.
|
||||
</para>
|
||||
|
||||
@Returns: a new #GdkICAttr struct.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_ic_attr_destroy ##### -->
|
||||
<para>
|
||||
Destroys the given #GdkICAttr struct, freeing the allocated memory.
|
||||
</para>
|
||||
|
||||
@attr: a #GdkICAttr struct.
|
||||
|
||||
|
@@ -1,301 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Devices
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Functions for handling extended input devices.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
In addition to the normal keyboard and mouse input devices, GTK+ also
|
||||
contains support for <firstterm>extended input devices</firstterm>. In
|
||||
particular, this support is targeted at graphics tablets. Graphics
|
||||
tablets typically return sub-pixel positioning information and possibly
|
||||
information about the pressure and tilt of the stylus. Under
|
||||
X, the support for extended devices is done through the
|
||||
<firstterm>XInput</firstterm> extension.
|
||||
</para>
|
||||
<para>
|
||||
Because handling extended input devices may involve considerable
|
||||
overhead, they need to be turned on for each #GdkWindow
|
||||
individually using gdk_input_set_extension_events().
|
||||
(Or, more typically, for GtkWidgets, using gtk_widget_set_extension_events()).
|
||||
As an additional complication, depending on the support from
|
||||
the windowing system, its possible that a normal mouse
|
||||
cursor will not be displayed for a particular extension
|
||||
device. If an application does not want to deal with displaying
|
||||
a cursor itself, it can ask only to get extension events
|
||||
from devices that will display a cursor, by passing the
|
||||
%GDK_EXTENSION_EVENTS_CURSOR value to
|
||||
gdk_input_set_extension_events(). Otherwise, the application
|
||||
must retrieve the device information using gdk_input_list_devices(),
|
||||
check the <structfield>has_cursor</structfield> field, and,
|
||||
if it is %FALSE, draw a cursor itself when it receives
|
||||
motion events.
|
||||
</para>
|
||||
<para>
|
||||
Each pointing device is assigned a unique integer ID; events from a
|
||||
particular device can be identified by the
|
||||
<structfield>deviceid</structfield> field in the event structure. The
|
||||
events generated by pointer devices have also been extended to contain
|
||||
<structfield>pressure</structfield>, <structfield>xtilt</structfield>
|
||||
and <structfield>ytilt</structfield> fields which contain the extended
|
||||
information reported as additional <firstterm>valuators</firstterm>
|
||||
from the device. The <structfield>pressure</structfield> field is a
|
||||
a double value ranging from 0.0 to 1.0, while the tilt fields are
|
||||
double values ranging from -1.0 to 1.0. (With -1.0 representing the
|
||||
maximum title to the left or up, and 1.0 representing the maximum
|
||||
tilt to the right or down.)
|
||||
</para>
|
||||
<para>
|
||||
One additional field in each event is the
|
||||
<structfield>source</structfield> field, which contains an
|
||||
enumeration value describing the type of device; this currently
|
||||
can be one of
|
||||
%GDK_SOURCE_MOUSE,
|
||||
%GDK_SOURCE_PEN,
|
||||
%GDK_SOURCE_ERASER,
|
||||
or %GDK_SOURCE_CURSOR. This field is present to allow simple
|
||||
applications to (for instance) delete when they detect eraser
|
||||
devices without having to keep track of complicated per-device
|
||||
settings.
|
||||
</para>
|
||||
<para>
|
||||
Various aspects of each device may be configured. The easiest way of
|
||||
creating a GUI to allow the user to conifigure such a device
|
||||
is to use to use the #GtkInputDialog widget in GTK+.
|
||||
However, even when using this widget, application writers
|
||||
will need to directly query and set the configuration parameters
|
||||
in order to save the state between invocations of the application.
|
||||
The configuration of devices is queried using gdk_input_list_devices.
|
||||
Each device must is activated using gdk_input_set_mode(), which
|
||||
also controls whether the device's range is mapped to the
|
||||
entire screen or to a single window. The mapping of the valuators of
|
||||
the device onto the predefined valuator types is set using
|
||||
gdk_input_set_axes. And the source type for each device
|
||||
can be set with gdk_input_set_source().
|
||||
</para>
|
||||
<para>
|
||||
Devices may also have associated <firstterm>keys</firstterm>
|
||||
or macro buttons. Such keys can be globally set to map
|
||||
into normal X keyboard events. The mapping is set using
|
||||
gdk_input_set_key().
|
||||
</para>
|
||||
<para>
|
||||
The interfaces in this section will most likely be considerably
|
||||
modified in the future to accomodate devices that may have different
|
||||
sets of additional valuators than the pressure xtilt and ytilt.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### MACRO GDK_CORE_POINTER ##### -->
|
||||
<para>
|
||||
This macro contains an integer value representing
|
||||
the device ID for the core pointer device.
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_list_devices ##### -->
|
||||
<para>
|
||||
Lists all available input devices, along with their
|
||||
configuration information.
|
||||
</para>
|
||||
|
||||
@Returns: A #GList of #GdkDeviceInfo structures. This list
|
||||
is internal data of GTK+ and should not be modified
|
||||
or freed.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceInfo ##### -->
|
||||
<para>
|
||||
The #GdkDeviceInfo structure contains information about a
|
||||
device. It has the following fields:
|
||||
</para>
|
||||
|
||||
@deviceid: a unique integer ID for this device.
|
||||
@name: the human-readable name for the device.
|
||||
@source: the type of device.
|
||||
@mode: a value indicating whether the device is enabled and
|
||||
how the device coordinates map to the screen.
|
||||
@has_cursor: if %TRUE, a cursor will be displayed indicating
|
||||
the current on-screen location to the user. Otherwise,
|
||||
the application is responsible for drawing a cursor
|
||||
itself.
|
||||
@num_axes: the number of axes for this device.
|
||||
@axes: a pointer to an array of GdkAxisUse values which
|
||||
give the mapping of axes onto the possible valuators
|
||||
for a GDK device.
|
||||
@num_keys: the number of macro buttons.
|
||||
@keys: a pointer to an array of #GdkDeviceKey structures
|
||||
which describe what key press events are generated
|
||||
for each macro button.
|
||||
|
||||
<!-- ##### STRUCT GdkDeviceKey ##### -->
|
||||
<para>
|
||||
The #GdkDeviceKey structure contains information
|
||||
about the mapping of one device macro button onto
|
||||
a normal X key event. It has the following fields:
|
||||
</para>
|
||||
|
||||
@keyval: the keyval to generate when the macro button is pressed.
|
||||
If this is 0, no keypress will be generated.
|
||||
@modifiers: the modifiers set for the generated key event.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_extension_events ##### -->
|
||||
<para>
|
||||
Turns extension events on or off for a particular window,
|
||||
and specifies the event mask for extension events.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@mask: the event mask
|
||||
@mode: the type of extension events that are desired.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkExtensionMode ##### -->
|
||||
<para>
|
||||
An enumeration used to specify which extension events
|
||||
are desired for a particular widget.
|
||||
</para>
|
||||
|
||||
@GDK_EXTENSION_EVENTS_NONE: no extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_ALL: all extension events are desired.
|
||||
@GDK_EXTENSION_EVENTS_CURSOR: extension events are desired only if a cursor
|
||||
will be displayed for the device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_source ##### -->
|
||||
<para>
|
||||
Sets the source type for a device.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure
|
||||
@source: the new source type.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputSource ##### -->
|
||||
<para>
|
||||
An enumeration describing the type of an input device
|
||||
in general terms.
|
||||
</para>
|
||||
|
||||
@GDK_SOURCE_MOUSE: the device is a mouse. (This will be reported for the core
|
||||
pointer, even if it is something else, such as a trackball.)
|
||||
@GDK_SOURCE_PEN: the device is a stylus of a graphics tablet or similar device.
|
||||
@GDK_SOURCE_ERASER: the device is an eraser. Typically, this would be the other end
|
||||
of a stylus on a graphics tablet.
|
||||
@GDK_SOURCE_CURSOR: the device is a graphics tablet "puck" or similar device.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_mode ##### -->
|
||||
<para>
|
||||
Enables or disables a device, and determines how the
|
||||
device maps onto the screen.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@mode: the new mode.
|
||||
@Returns: %TRUE if the device supports the given mode, otherwise
|
||||
%FALSE and the device's mode is unchanged.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkInputMode ##### -->
|
||||
<para>
|
||||
An enumeration that describes the mode of an input device.
|
||||
</para>
|
||||
|
||||
@GDK_MODE_DISABLED: the device is disabled and will not report any events.
|
||||
@GDK_MODE_SCREEN: the device is enabled. The device's coordinate space
|
||||
maps to the entire screen.
|
||||
@GDK_MODE_WINDOW: the device is enabled. The device's coordinate space
|
||||
is mapped to a single window. The manner in which this window
|
||||
is chosen is undefined, but it will typically be the same
|
||||
way in which the focus window for key events is determined.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_axes ##### -->
|
||||
<para>
|
||||
Sets the mapping of the axes (valuators) of a device
|
||||
onto the predefined valuator types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@axes: an array of GdkAxisUse. This length of this array
|
||||
must match the number of axes for the device.
|
||||
|
||||
|
||||
<!-- ##### ENUM GdkAxisUse ##### -->
|
||||
<para>
|
||||
An enumeration describing the way in which a device
|
||||
axis (valuator) maps onto the predefined valuator
|
||||
types that GTK+ understands.
|
||||
</para>
|
||||
|
||||
@GDK_AXIS_IGNORE: the axis is ignored.
|
||||
@GDK_AXIS_X: the axis is used as the x axis.
|
||||
@GDK_AXIS_Y: the axis is used as the y axis.
|
||||
@GDK_AXIS_PRESSURE: the axis is used for pressure information.
|
||||
@GDK_AXIS_XTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_YTILT: the axis is used for x tilt information.
|
||||
@GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_set_key ##### -->
|
||||
<para>
|
||||
Sets the key event generated when a macro button is pressed.
|
||||
</para>
|
||||
|
||||
@deviceid: the device to configure.
|
||||
@index: the index of the macro button.
|
||||
@keyval: the key value for the #GdkKeypressEvent to generate.
|
||||
(a value of 0 means no event will be generated.)
|
||||
@modifiers: the modifier field for the generated
|
||||
#GdkKeyPressEvent.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_window_get_pointer ##### -->
|
||||
<para>
|
||||
Returns information about the current position of the pointer
|
||||
within a window, including extended device information.
|
||||
Any of the return parameters may be %NULL, in which case,
|
||||
they will be ignored.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: a device ID.
|
||||
@x: location to store current x postion.
|
||||
@y: location to store current y postion.
|
||||
@pressure: location to store current pressure.
|
||||
@xtilt: location to store current tilt in the x direction.
|
||||
@ytilt: location to store current tilt in the y direction.
|
||||
@mask: location to store the current modifier state.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_input_motion_events ##### -->
|
||||
<para>
|
||||
Retrieves the motion history for a given device/window pair.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow.
|
||||
@deviceid: the device for which to retrieve motion history.
|
||||
@start: the start time.
|
||||
@stop: the stop time.
|
||||
@nevents_return: location to store the number of events returned.
|
||||
@Returns: a newly allocated array containing all the events
|
||||
from @start to @stop. This array should be freed
|
||||
with g_free() when you are finished using it.
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkTimeCoord ##### -->
|
||||
<para>
|
||||
The #GdkTimeCoord structure stores a single event in a
|
||||
motion history. It contains the following fields:
|
||||
</para>
|
||||
|
||||
@time: The timestamp for this event.
|
||||
@x: the x position.
|
||||
@y: the y position.
|
||||
@pressure: the pressure.
|
||||
@xtilt: the tilt in the x direction.
|
||||
@ytilt: the tilt in the y direction.
|
||||
|
@@ -1,213 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Input Methods
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
support for internationalized text input.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Input Methods provide a way for complex character sets to be used in GTK+.
|
||||
Languages such as Chinese, Japanese, and Korean (often abbreviated to CJK)
|
||||
use a large number of ideographs, making it impossible to support all
|
||||
characters with a simple keyboard. Instead, text is usually
|
||||
<emphasis>pre-edited</emphasis> using a phonetic alphabet and then
|
||||
<emphasis>composed</emphasis> to form the ideographs.
|
||||
</para>
|
||||
<para>
|
||||
GTK+ makes use of the input method mechanism provided by the X Windows
|
||||
platform. When a GTK+ application is started, it opens a connection to the
|
||||
input method appropriate for the current locale (if any).
|
||||
</para>
|
||||
<para>
|
||||
Widgets which handle textual input, such as #GtkEntry, need to do a number of
|
||||
things to support internationalized text input:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>When the widget is realized:</term>
|
||||
<listitem><para>Check if an input method is being used with gdk_im_ready().
|
||||
If it is, create a new <link linkend="gdk-Input-Contexts">Input Context</link>
|
||||
using gdk_ic_new(). Find out which events the
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> needs to receive
|
||||
with gdk_ic_get_events(), and make sure that the widget's window receives
|
||||
these events using gdk_window_set_events().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget's size, state or cursor position changes:</term>
|
||||
<listitem><para>
|
||||
Update the appropriate
|
||||
<link linkend="gdk-Input-Contexts">Input Context</link> attributes
|
||||
using gdk_ic_set_attr().
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the keyboard focus enters or leaves the widget:</term>
|
||||
<listitem><para>
|
||||
Call gdk_im_begin() or gdk_im_end() to start or finish editing the text.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget receives a key_press event:</term>
|
||||
<listitem><para>
|
||||
The <structfield>string</structfield> and <structfield>length</structfield>
|
||||
fields of the #GdkEventKey struct should be used to insert the composed text
|
||||
into the widget.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>When the widget is unrealized:</term>
|
||||
<listitem><para>
|
||||
Destroy the <link linkend="gdk-Input-Contexts">Input Context</link>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
<para>
|
||||
See the XLib reference manual for more detailed information on input methods,
|
||||
and the #GtkEntry and #GtkText widgets for some example code.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><link linkend="gdk-Input-Contexts">Input Contexts</link></term>
|
||||
<listitem><para>
|
||||
Used for each widget that handles internationalized text input using the
|
||||
global input method.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ENUM GdkIMStyle ##### -->
|
||||
<para>
|
||||
A set of bit-flags used to specify the input method styles which are supported
|
||||
or which are currently in use. The flags can be divided into 2 groups, the
|
||||
pre-edit flags and the status flags.
|
||||
</para>
|
||||
<para>
|
||||
The pre-edit flags specify how pre-editing data is displayed.
|
||||
For example, this could display the text being typed in in the phonetic
|
||||
alphabet before it is composed and inserted as an ideograph.
|
||||
</para>
|
||||
<para>
|
||||
The status flags specify how status information is displayed.
|
||||
The status information can be thought of as an extension of the
|
||||
standard keyboard mode indicators, such as the Caps Lock indicator.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The %GDK_IM_PREEDIT_CALLBACKS and %GDK_IM_STATUS_CALLBACKS styles are not
|
||||
currently supported in GTK+.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@GDK_IM_PREEDIT_AREA: The application provides the input method with an area
|
||||
in which to perform <emphasis>off-the-spot</emphasis> pre-editing.
|
||||
@GDK_IM_PREEDIT_CALLBACKS: The application registers a number of callback
|
||||
functions which are used to display pre-editing data.
|
||||
@GDK_IM_PREEDIT_POSITION: The application provides the input method with the
|
||||
position of the insertion cursor, for <emphasis>over-the-spot</emphasis>
|
||||
pre-editing. The input method creates its own window over the widget to
|
||||
display the pre-editing data.
|
||||
@GDK_IM_PREEDIT_NOTHING: The input method uses the root X window to perform
|
||||
pre-editing, so the application does not need to do anything.
|
||||
@GDK_IM_PREEDIT_NONE: No pre-editing is done by the input method, or no
|
||||
pre-editing data needs to be displayed.
|
||||
@GDK_IM_PREEDIT_MASK: A bit-mask containing all the pre-edit flags.
|
||||
@GDK_IM_STATUS_AREA: The application provides the input method with an area
|
||||
in which to display status information.
|
||||
@GDK_IM_STATUS_CALLBACKS: The applications registers a number of callback
|
||||
functions which are used to display status information.
|
||||
@GDK_IM_STATUS_NOTHING: The input method uses the root X window to display
|
||||
status information, so the application does not need to do anything.
|
||||
@GDK_IM_STATUS_NONE: The input method does not display status information.
|
||||
@GDK_IM_STATUS_MASK: A bit-mask containing all the status flags.
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_ready ##### -->
|
||||
<para>
|
||||
Checks if an input method is to be used for the current locale.
|
||||
If GTK+ has been compiled without support for input methods, or the current
|
||||
locale doesn't need an input method, then this will return FALSE.
|
||||
</para>
|
||||
|
||||
@Returns: TRUE if an input method is available and should be used.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_decide_style ##### -->
|
||||
<para>
|
||||
Decides which input method style should be used, by comparing the styles given
|
||||
in @supported_style with those of the available input method.
|
||||
</para>
|
||||
|
||||
@supported_style: styles which are supported by the widget.
|
||||
@Returns: the best style in @supported_style that is also supported by the
|
||||
available input method.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_set_best_style ##### -->
|
||||
<para>
|
||||
Sets the best pre-edit and/or status style which should be used.
|
||||
This will affect the style chosen in gdk_im_decide_style().
|
||||
</para>
|
||||
<para>
|
||||
The order of the pre-edit styles is (from worst to best):
|
||||
%GDK_IM_PREEDIT_NONE, %GDK_IM_PREEDIT_NOTHING, %GDK_IM_PREEDIT_AREA,
|
||||
%GDK_IM_PREEDIT_POSITION, %GDK_IM_PREEDIT_CALLBACKS.
|
||||
The order of the status styles is:
|
||||
%GDK_IM_STATUS_NONE, %GDK_IM_STATUS_NOTHING, %GDK_IM_STATUS_AREA,
|
||||
%GDK_IM_STATUS_CALLBACKS.
|
||||
</para>
|
||||
<para>
|
||||
So, for example, to set the best allowed pre-edit style to %GDK_IM_PREEDIT_AREA
|
||||
you would do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
|
||||
Or to set the best allowed pre-edit style to %GDK_IM_PREEDIT_POSITION and the
|
||||
best allowed status style to %GDK_IM_STATUS_NOTHING you can do this:
|
||||
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NOTHING);
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
@best_allowed_style: a bit-mask with the best pre-edit style and/or the best
|
||||
status style to use. If 0 is used, then the current bit-mask of all allowed
|
||||
styles is returned.
|
||||
@Returns: a bit-mask of all the styles allowed.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_begin ##### -->
|
||||
<para>
|
||||
Starts editing, using the given input context and #GdkWindow.
|
||||
This should be called when the widget receives the input focus, typically in
|
||||
the widget's focus_in_event method.
|
||||
</para>
|
||||
|
||||
@ic: a #GdkInputContext.
|
||||
@window: the #GdkWindow which will be receiving the key press events.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_im_end ##### -->
|
||||
<para>
|
||||
Stops editing using the input method.
|
||||
This should be called when the widget loses the input focus, typically in
|
||||
the widget's focus_out_event method.
|
||||
</para>
|
||||
|
||||
|
||||
|
@@ -1,93 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Key Values
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
functions for manipulating keyboard codes.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Key values are the codes which are sent whenever a key is pressed or released.
|
||||
They appear in the <structfield>keyval</structfield> field of the
|
||||
#GdkEventKey structure, which is passed to signal handlers for the
|
||||
"key-press-event" and "key-release-event" signals.
|
||||
The complete list of key values can be found in the <gdk/gdkkeysyms.h>
|
||||
header file.
|
||||
</para>
|
||||
<para>
|
||||
Key values can be converted into a string representation using
|
||||
gdk_keyval_name(). The reverse function, converting a string to a key value,
|
||||
is provided by gdk_keyval_from_name().
|
||||
</para>
|
||||
<para>
|
||||
The case of key values can be determined using gdk_keyval_is_upper() and
|
||||
gdk_keyval_is_lower(). Key values can be converted to upper or lower case
|
||||
using gdk_keyval_to_upper() and gdk_keyval_to_lower().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_name ##### -->
|
||||
<para>
|
||||
Converts a key value into a symbolic name.
|
||||
The names are the same as those in the <gdk/gdkkeysyms.h> header file
|
||||
but without the leading "GDK_".
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: a string containing the name of the key, or NULL if @keyval is not
|
||||
a valid key. The string should not be modified.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_from_name ##### -->
|
||||
<para>
|
||||
Converts a key name to a key value.
|
||||
</para>
|
||||
|
||||
@keyval_name: a key name.
|
||||
@Returns: the corresponding key value, or %GDK_VoidSymbol if the key name is
|
||||
not a valid key.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_upper ##### -->
|
||||
<para>
|
||||
Returns TRUE if the given key value is in upper case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: TRUE if @keyval is in upper case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_is_lower ##### -->
|
||||
<para>
|
||||
Returns TRUE if the given key value is in lower case.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: TRUE if @keyval is in lower case, or if @keyval is not subject to
|
||||
case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_upper ##### -->
|
||||
<para>
|
||||
Converts a key value to upper case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the upper case form of @keyval, or @keyval itself if it is already
|
||||
in upper case or it is not subject to case conversion.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_keyval_to_lower ##### -->
|
||||
<para>
|
||||
Converts a key value to lower case, if applicable.
|
||||
</para>
|
||||
|
||||
@keyval: a key value.
|
||||
@Returns: the lower case form of @keyval, or @keyval itself if it is already
|
||||
in lower case or it is not subject to case conversion.
|
||||
|
||||
|
@@ -1,196 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Bitmaps and Pixmaps
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
Offscreen drawables.
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
Pixmaps are offscreen drawables. They can be drawn upon with the
|
||||
standard drawing primitives, then copied to another drawable (such as
|
||||
a #GdkWindow) with gdk_pixmap_draw(). The depth of a pixmap
|
||||
is the number of bits per pixels. Bitmaps are simply pixmaps
|
||||
with a depth of 1. (That is, they are monochrome bitmaps - each
|
||||
pixel can be either on or off).
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GdkPixmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable.
|
||||
Pointers to structures of type #GdkPixmap, #GdkBitmap,
|
||||
and #GdkWindow, can often be used interchangeably.
|
||||
The type #GdkDrawable refers generically to any of
|
||||
these types.
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_new ##### -->
|
||||
<para>
|
||||
Create a new pixmap with a given size and depth.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @depth is specified,
|
||||
@width: The width of the new pixmap in pixels.
|
||||
@height: The height of the new pixmap in pixels.
|
||||
@depth: The depth (number of bits per pixel) of the new pixmap.
|
||||
If -1, and @window is not %NULL, the depth of the new
|
||||
pixmap will be equal to that of @window.
|
||||
@Returns: the #GdkBitmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
|
||||
<para>
|
||||
Creates a new bitmap from data in XBM format.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL, in which case the root window is
|
||||
used.
|
||||
@data: a pointer to the XBM data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@Returns: the #GdkBitmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
|
||||
<para>
|
||||
Create a two-color pixmap from data in XBM data.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL, if the depth is given.
|
||||
@data: a pointer to the data.
|
||||
@width: the width of the new pixmap in pixels.
|
||||
@height: the height of the new pixmap in pixels.
|
||||
@depth: the depth (number of bits per pixel) of the new pixmap.
|
||||
@fg: the foreground color.
|
||||
@bg: the background color.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
|
||||
<para>
|
||||
Create a pixmap from a XPM file using a particular colormap.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@filename: the filename of a file containing XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap.
|
||||
@mask: Pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: This color will be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
|
||||
<para>
|
||||
Create a pixmap from data in XPM format using a particular
|
||||
colormap.
|
||||
</para>
|
||||
|
||||
@window: a #GdkWindow, used to determine default values for the
|
||||
new pixmap. Can be %NULL if @colormap is given.
|
||||
@colormap: the #GdkColormap that the new pixmap will be use.
|
||||
If omitted, the colormap for @window will be used.
|
||||
@mask: a pointer to a place to store a bitmap representing
|
||||
the transparency mask of the XPM file. Can be %NULL,
|
||||
in which case transparency will be ignored.
|
||||
@transparent_color: the color to be used for the pixels
|
||||
that are transparent in the input file. Can be %NULL,
|
||||
in which case a default color will be used.
|
||||
@data: Pointer to a string containing the XPM data.
|
||||
@Returns: the #GdkPixmap.
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a pixmap.
|
||||
</para>
|
||||
|
||||
@pixmap: a #GdkPixmap
|
||||
@Returns: @pixmap
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixmap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a pixmap. If the resulting
|
||||
reference count is zero, destroy the pixmap.
|
||||
</para>
|
||||
|
||||
@pixmap: a #GdkPixmap
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkBitmap ##### -->
|
||||
<para>
|
||||
An opaque structure representing an offscreen drawable of depth
|
||||
1. Pointers to structures of type GdkPixmap, #GdkBitmap, and
|
||||
#GdkWindow, can often be used interchangeably. The type #GdkDrawable
|
||||
refers generically to any of these types.
|
||||
</para>
|
||||
|
||||
@user_data:
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_ref ##### -->
|
||||
<para>
|
||||
Increase the reference count of a bitmap. An alias
|
||||
for gdk_pixmap_ref().
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_bitmap_unref ##### -->
|
||||
<para>
|
||||
Decrease the reference count of a bitmap. An alias
|
||||
for gdk_pixmap_unref().
|
||||
</para>
|
||||
|
||||
@pixmap:
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user