New stable 0.14 branch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/branches/stable@26659 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2008-06-15 04:43:15 +00:00
parent b1135b5045
commit cfa2f556f6
229 changed files with 91471 additions and 0 deletions

7
trunk/.cvsignore Normal file
View file

@ -0,0 +1,7 @@
autom4te.cache
config.h
config.log
config.status
config.cache
config.make
back.make

47
trunk/ANNOUNCE Normal file
View file

@ -0,0 +1,47 @@
1 ANNOUNCE
**********
This is version 0.14.0 of the GNUstep GUI Backend (`gnustep-back').
1.1 What is the GNUstep GUI Backend?
====================================
It is a back-end component for the GNUstep GUI Library. The
implementation of the GNUstep GUI Library is designed in two parts. The
first part is the front-end component which is independent of platform
and display system. This front-end is combined with a back-end
component which handles all of the display system dependent such as
specific calls to the X Window System. This design allows the GNUstep
applications to have the "look and feel" of the underlying display
system without any changes to the application, and the library can be
easily ported to other display systems.
The GNUstep GUI Backend is for platforms using the X-Window System or
Window's Systems. It works via a DPS emulation engine to emulate the
DPS functions required by the front-end system.
1.2 Noteworthy changes in version `0.14.0'
==========================================
Added code to automatically make any window which uses the
NSDesktopWindowLevel also be omnipresent.
Many glyph drawing improvements.
1.3 Where can you get it? How can you compile it?
==================================================
The gstep-back-0.14.0.tar.gz distribution file has been placed at
`ftp://ftp.gnustep.org/pub/gnustep/core'.
1.4 Where do I send bug reports?
================================
Bug reports can be sent to the GNUstep bug list <bug-gnustep@gnu.org>
1.5 Obtaining GNU Software
==========================
Check out the GNUstep web site. (`http://www.gnustep.org/') and the GNU
web site. (`http://www.gnu.org/')

675
trunk/COPYING Normal file
View file

@ -0,0 +1,675 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, 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
them 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 prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If 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 convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU 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
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state 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 program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 3 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, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

504
trunk/COPYING.LIB Normal file
View file

@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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!

4415
trunk/ChangeLog Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "http://www.gnustep.org/gsdoc-1_0_3.xml">
<gsdoc base="Back">
<head>
<title>Back</title>
<author name="Adam Fedor">
<email address="fedor@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
<copy>2005 Free Software Foundation, Inc.</copy>
</head>
<body>
<chapter>
<heading>Back</heading>
<p>
Documentation for understanding and writting GUI backends.
</p>
<list>
<item><uref url="WindowFocus.html">Window Focus</uref></item>
<item><uref url="DefaultsSummary.html">User Default Options</uref></item>
</list>
</chapter>
</body>
</gsdoc>

View file

@ -0,0 +1,243 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.3//EN" "/usr/GNUstep/System/Libraries/Resources/DTDs/gsdoc-1_0_3.dtd" >
<gsdoc base="DefaultsSummary">
<head>
<title>User Defaults Summary for GNUstep Backend</title>
<author name="Adam Fedor">
<email address="fedor@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
<copy>2005 Free Software Foundation, Inc.</copy>
</head>
<body>
<chapter>
<heading>Defaults Summary</heading>
<p>
This document contains a summary of available user default
values that one can set to control the operation of the GNUstep
backend.
</p>
<section>
<heading>Backend Defaults</heading>
<p>
Below is a list of defaults used to control the x11-based
backend. These defaults generally control system specific
display and user interaction options which may not be available
on all systems.
</p>
<deflist>
<term>NSDefaultVisual</term>
<desc>
<p>
An integer that specifies the X-Windows visual class to use
in the application. For instance one could display the
application using the PsuedoColor visual class by setting
the value to the id of this class. The default is the
X-Windows default visual class.
</p>
</desc>
<term>NSColorsPerChannel</term>
<desc>
<p>
An integer which limits the maximum number of colors to
display, per channel. For a psuedo-color display, this would
limit the total number of colors that the application could
use (normally 256). For a true-color display, this would
limit the range of red, green, and blue values that could be used.
</p>
</desc>
<term>GSAppOwnsMiniwindow</term>
<desc>
<p>
GSAppOwnsMiniwindow is for miniwindows (not app icons). If
it's YES or absent, GNUstep handles miniaturization itself
and doesn't let the window manager do it. If it's NO, the
window manager is allowed to do its own iconification. This
does not affect app icons at all.
</p>
</desc>
<term>GSFontAntiAlias</term>
<desc>
<p>
With the xlib backend, this is a boolean value which
defaults to <code>YES</code>. If set to
<code>YES</code> and X Windows system has the XFT
extension, then the application will use anti-aliased fonts
as provided by XFT. If set to <code>NO</code> anti-aliased fonts
will not be used even when available.
</p>
<p> With the art backend, A boolean value which defaults to
YES. If YES, text is anti-aliased at small sizes (9-16
pixels). The value is advisory (specific fonts can override this
setting).
</p>
</desc>
<term>GSFontMask</term>
<desc>
<p> [Xlib backend only]
A string value which defaults to <code>"*"</code>. It defines
the pattern used to get the installed fonts from the
X-Server. A value of <code>"*-iso8859-1"</code> would only
include fonts available with ISO Western encoding. This
feature might be helpfull if the font_cacher program is having
problem with the X-Server.
</p>
</desc>
<term>GSUseWMTaskBar</term>
<desc>
<p> [W32 backend only]
A string value which defaults to <code>YES</code>. If enabled, the
backend assumes that miniwindows are displayed in a task bar. In
this case, the app icon is not shown and the main menu behavior
is changed so it is not ordered out, but minimized, so clicking
on the minimized menu will activate the application.
</p>
</desc>
<term>GSXEnableFontSet</term>
<desc>
<p> A string value which defaults to <code>NO</code>. If set to
<code>YES</code>, then the backend font classes will support
full multi-byte/unicode characters. This is useful for using
many East Asian languages. However, the respose of the GUI is
somwhat slower when this is enabled.
</p>
</desc>
<term>GSXIMInputMethodStyle</term>
<desc>
<p> A string value used to specify the XIM input method for
entering characters. Valid values are
<code>RootWindow</code>, <code>OffTheSpot</code>, or
<code>OverTheSpot</code>.
</p>
</desc>
<term>GSX11HandlesWindowDecorations</term>
<desc>
<p> [X11-based backends only]
A boolean value, by default <code>YES</code>, which indicates if
the backend should let the window manager handle window
decorations. When set to <code>NO</code>, GNUstep-GUI will handle
the window decorations, which is particularly useful if you aren't
running any window manager.
</p>
</desc>
<term>GraphicCompositing</term>
<desc>
<p> [Xlib backend only]
A boolean value which defaults to <code>YES</code>. If set to
<code>YES</code>, then the application uses various tricks
to get alpha colors to work when compositing images. This
may slow down drawing of images, but it is generally
recommended anyway, particularly on fast systems.
</p>
</desc>
<term>Fast Drawing on 8-bit Displays</term>
<desc>
<p> [X11-based backends only]
This is not a user default, but if you are using an 8-bit display
and you define the standard X11 <code>BEST</code> colormap (via
<code>xstdcmap -best</code>), then GNUstep will use this colormap
and enable faster drawing onto 8-bit displays.
</p>
</desc>
<term>Keyboard Modifiers</term>
<desc>
<p>
The OPENstep specification requires three main different
keyboard modifiers: <code>CONTROL</code>,
<code>COMMAND</code> and <code>ALTERNATE</code> as well as
the <code>HELP</code> modifier for context help. Some systems
may not have these set up correctly. You can changed the defaults
with the default keys.
</p>
<list>
<item>GSFirstControlKey</item>
<item>GSSecondControlKey</item>
<item>GSFirstCommandKey</item>
<item>GSSecondCommandKey</item>
<item>GSFirstAlternateKey</item>
<item>GSSecondAlternateKey</item>
<item>GSFirstHelpKey</item>
<item>GSSecondHelpKey</item>
</list>
<p>
Default values are respectively:
</p>
<list>
<item>Control_L</item>
<item>Control_R</item>
<item>Alt_L</item>
<item>NoSymbol</item>
<item>Alt_R</item>
<item>NoSymbol</item>
<item>Help</item>
<item>Super_L</item>
</list>
<p>
These strings correspond to "keysyms" on X11 systems. On X11,
physical keys on the keyboard are equivalent to <em>keycodes</em>.
A single keysym may be associated to more than one keycode, and
can even be associated to a shifted key.
</p>
<p>
This is described more completely in the <uref
url="../../../User/Gui/KeyboardSetup.html">GUI documentation on
keyboard setup</uref>.
</p>
</desc>
<term>GSModifiersAreKeys</term>
<desc>
<p>
On some keyboards, the default X11 mapping includes keycodes that
are mapped to one or another modifier keysym depending on whether
'shift' (or in some cases, another key) is pressed. This is the
case on some Apple USB keyboards for example: one key to the left
of the spacebar maps to "Option" without shift pressed, and "Alt"
with shift pressed. Such keyboard mappings are often useful in
non-English contexts to access accents or non-Roman characters.
However if such a key is used as a modifier in GNUstep problems can
occur when trying to use the modifier in conjunction with a shifted
character. In particular, you will need to hit and release the
modifier and the shift key in a particular order, or else things
will not work as expected, and the modifier may become "stuck". If
you experience such a problem, set <code>GSModifiersAreKeys</code>
to <code>YES</code>.
</p>
</desc>
<term>UseWindowMakerIcons</term>
<desc>
<p>
UseWindowMakerIcons is for app icons, and has no effect when
the window manager isn't Window Maker. It displays the
application's icon window in the window Window Maker
provides instead of creating one controlled by the app. This
allows the icon to be docked. It is a boolean value which
defaults to <code>YES</code>.
</p>
</desc>
<term>XGPS-Shm</term>
<desc>
<p>
A boolean value which defaults to <code>YES</code> (as long as shared
memory is available). If set to <code>NO</code>, shared memory is not
used for various display specific operations.
</p>
</desc>
<term>GSOldClipboard</term>
<desc>
<p>[X backends only]
A boolean value which defaults to <code>NO</code>. If set to YES the
old GNUstep way of X clipboard interaction will be used. That is
PRIMARY as the general pasteboard and CLIPBOARD for the
selection. Whereas the new X standard is the other way around. This
setting may be needed for interaction in an old X enviornment.
</p>
</desc>
</deflist>
</section>
</chapter>
</body>
</gsdoc>

View file

@ -0,0 +1,49 @@
#
# Gui gsdoc makefile for the GNUstep Back Library
# Copyright (C) 2000 Free Software Foundation, Inc.
#
# Written by: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Back Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
include $(GNUSTEP_MAKEFILES)/common.make
# The documents to be generated
DOCUMENT_NAME = General
General_AGSDOC_FILES = \
Back.gsdoc \
DefaultsSummary.gsdoc \
WindowFocus.gsdoc
General_AGSDOC_FLAGS = \
-Up Back
General_DOC_INSTALL_DIR = Developer/Back
-include GNUmakefile.preamble
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/documentation.make
-include GNUmakefile.postamble

View file

@ -0,0 +1,118 @@
EWMH hints
==================================
[ ] : not implemented
[*] : partially implemented
[+] : supported
[-] : not applicable/ignored
Root Window Properties (and Related Messages)
[+] _NET_SUPPORTED // WM property
[-] _NET_CLIENT_LIST // WM property
[+] _NET_CLIENT_LIST_STACKING // WM property
[+] _NET_NUMBER_OF_DESKTOPS // WM property
[ ] _NET_DESKTOP_GEOMETRY // use this in preference to X calls?
[-] _NET_DESKTOP_VIEWPORT // WM property
[+] _NET_CURRENT_DESKTOP // WM property
[+] _NET_DESKTOP_NAMES // WM property
[ ] _NET_ACTIVE_WINDOW // "main" window?
[-] _NET_WORKAREA // WM property
[+] _NET_SUPPORTING_WM_CHECK // WM property
[-] _NET_VIRTUAL_ROOTS // WM property
[-] _NET_DESKTOP_LAYOUT // Pager property
[-] _NET_SHOWING_DESKTOP // WM property
Other Root Window Messages
[-] _NET_CLOSE_WINDOW // Pager property
[-] _NET_MOVERESIZE_WINDOW // Pager property
[ ] _NET_WM_MOVERESIZE // use with in-view mouse control?
Application Window Properties
[+] _NET_WM_NAME // need to implement
[ ] _NET_WM_VISIBLE_NAME // WM property
[+] _NET_WM_ICON_NAME // need to implement
[-] _NET_WM_VISIBLE_ICON_NAME // WM property
[+] _NET_WM_DESKTOP //
[+] _NET_WM_WINDOW_TYPE // use with or replace Window Level?
[*] _NET_WM_STATE // probably don't need this.
[-] _NET_WM_ALLOWED_ACTIONS // WM property
[-] _NET_WM_STRUT // GNUstep apps don't need this(?)
[-] _NET_WM_STRUT_PARTIAL // GNUstep apps don't need this(?)
[-] _NET_WM_ICON_GEOMETRY // GNUstep apps don't need this(?)
[+] _NET_WM_ICON //
[+] _NET_WM_PID
[-] _NET_WM_HANDLED_ICONS // Pager property
[ ] _NET_WM_USER_TIME // need to figure this out...
[+] _NET_FRAME_EXTENTS //
[+] _NET_REQUEST_FRAME_EXTENTS //
[+] _NET_WM_STATE_SKIP_PAGER //
[+] _NET_WM__WINDOW_OPACITY //
[+] _NET_WM__WINDOW_SHADOW //
Window Manager Protocols
[+] _NET_WM_PING // need to implement
WindowMaker Protocols and Client Messages
=========================================
_GNUSTEP_WM_MINIATURIZE_WINDOW
The _GNUSTEP_WM_MINIATURIZE_WINDOW protocol tells the WM that the
application can handle miniaturization of a window. The WM can then
send a CLientMessage of the WM_PROTOCOLS type telling the app to
miniaturize the window.
_GNUSTEP_TITLEBAR_STATE
The app can send a ClientMessage with the _GNUSTEP_TITLEBAR_STATE
message type, telling the WM which state the window is in, allowing the
WM to change the appearance of the title bar appropriately. The states are:
Key Window(0), Normal Window(1), Main Window(2). The main window is the window
the user is currently working in. The key window is the window that has
keyboard focus.
_GNUSTEP_WM_ATTR
Property for setting various attributes about the window. Can also
be sent as a Client Message for faster handling. The structure
passed in the property request is:
typedef struct {
CARD32 flags;
CARD32 window_style;
CARD32 window_level;
CARD32 reserved;
Pixmap miniaturize_pixmap; // pixmap for miniaturize button
Pixmap close_pixmap; // pixmap for close button
Pixmap miniaturize_mask; // miniaturize pixmap mask
Pixmap close_mask; // close pixmap mask
CARD32 extra_flags;
} GNUstepWMAttributes;
where flags is a set of ORed values:
WindowStyle(1<<0), WindowLevel(1<<1), MiniaturizePixmap(1<<3),
ClosePixmap(1<<4), MiniaturizeMask(1<<5), CloseMask(1<<6),
ExtraFlags(1<<7).
If ExtraFlags is set, then extra_flags can be:
DocumentEditedFlag(1<<0), WindowWillResizeNotificationsFlag(1<<1),
WindowWillMoveNotificationsFlag(1<<2), NoApplicationIconFlag(1<<5),
WMFHideOtherApplications(10), WMFHideApplication(12)
Window Style can be an ORed value consiting of any one or more of
NSBorderlessWindowMask(0), NSTitledWindowMask(1),
NSClosableWindowMask(2), NSMiniaturizableWindowMask(4),
NSResizableWindowMask(8), NSIconWindowMask(64) NSMiniWindowMask(128).
Window Level can be one of NSDesktopWindowLevel(-1000),
NSNormalWindowLevel(0), NSFloatingWindowLevel(3),
NSSubmenuWindowLevel(3), NSTornOffMenuWindowLevel(3),
NSMainMenuWindowLevel(20), NSStatusWindowLevel(21),
NSModalPanelWindowLevel(100), NSPopUpMenuWindowLevel(101),
NSScreenSaverWindowLevel(1000).

View file

@ -0,0 +1,210 @@
<?xml version="1.0"?>
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "/usr/GNUstep/System/Libraries/Resources/DTDs/gsdoc-0_7_0.dtd" >
<gsdoc base="WindowFocus">
<head>
<title>Window Focus Procedures</title>
<author name="Adam Fedor">
<email address="fedor@gnu.org"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
</author>
<version>$Revision$</version>
<date>$Date$</date>
<copy>2005 Free Software Foundation, Inc.</copy>
</head>
<body>
<chapter>
<heading>Window Focus</heading>
<p>
This document describes how various events and user actions
affect window focus of GNUstep applications. This document for
the most part describes focus changes that occur outside of
application control, since application window focus changes
are well described in the class documentation.
</p>
<section>
<heading>Application Focus</heading>
<p>
The application can get focus in several ways:
</p>
<list>
<item>Launch from the command line or another app</item>
<item>Another app looses focus (e.g. by terminating)</item>
<item>The user switches screens to the one the app is
displayed on</item>
<item>Double-click on the application icon</item>
</list>
<p>
The first case does not directly affect window focus (because
there are no windows at startup). However, as the application
begins to create and order front windows (including the main
menu) there will likely be a cascade of focus events generated
by the window manager for each window ordered in.
</p>
<p>
In the second and third case, the window manager will likely try
to give focus to the window that previously had it or perhaps to
some random window based on some internal window manager
code. GNUstep may ignore this request and try to give focus to
another window, typically the application's idea of the current
key window.
</p>
<p>
The last case is handled in the GUI front-end.
</p>
</section>
<section>
<heading>KeyboardFocus</heading>
<p>
The Key window is the window that has keyboard focus and has
keyboard events sent to it. When an application receives focus,
the window manager will typically ask one window to take
keyboard focus (see above, Application Focus).
</p>
<p>
When an application is launched, in many cases, only the application
icon and main menu may be displayed. In the OpenStep interface,
neither of these is really supposed to be a key window, and in
fact, many window managers control the application icon so this
cannot be made key anyway. In X-Windows, however, there is no
other way for an application to receive keyboard events unless a
visible window has been made key. This leaves the main menu.
</p>
<p>
When an application receives focus, or if all the windows in an
application are closed (see the private method
[NSWindow-_lossOfKeyOrMainWindow]), then the main menu will request
keyboard focus (see below).
</p>
<p>
The GUI front-end may function differently to accomadate
different window manager behavior. Below is a list of the
changes the front-end makes for different managers and windowing
systems:
</p>
<deflist>
<term>WindowMaker</term>
<desc>
<p>
WindowMaker controls the application icon so it cannot
receive keyboard events. The main menu is made key if there is
no other window capable of becoming key.
</p>
</desc>
</deflist>
</section>
<section>
<heading>Requesting Keyboard Focus</heading>
<p>
A window may request to get keyboard focus in serveral
instances. The window requests keyboard focus through the server
method -setinputfocus::
</p>
<list>
<item>If the window asks or is asked to become
key, through the [NSWindow-becomeKeyWindow] method</item>
<item>If the window is ordered front and the window is the key
window.
</item>
<item>If during _lossOfKeyOrMainWindow, only the main menu is able to
become key (for window systems where this is required).
</item>
</list>
</section>
<section>
<heading>Window Focus In/Out</heading>
<p>
The GUI front-end receives two types of focus events from the
back-end (through an NSEvent object). Both of these are subsets
of the NSAppKitDefined event: GSAppKitWindowFocusIn and
GSAppKitWindowFocusOut. A FocusIn event can be received for
several reasons:
</p>
<list>
<item>The window manager deminiaturized the window. The WM
should really tell the application to do this itself, but many
WMs don't. In this case the window just posts a notification
that it happened. </item>
<item>The application is in the process of hidding. As each
window is ordered out, the WM may send a focus message
(spuriously) to the next window in line. In this case the
message is just ignored. </item>
<item>If the previous cases do not apply, the window checks if it
can become key or main and activates the application if it is
not active. </item>
<item>If this window is the main menu, it looks for another
window to become the key window, if possible, through the
_lossOfKeyOrMainWindow mechanism</item>
</list>
<p>
The back-end should keep track of the last window that requested
to become key. This can be important in determining whether the
back-end should send a FocusIn event to a window when it
receives a signal from the window manager or windowing system.
Sending a FocusIn event to a window that already requested it,
may cause focus confusion in the GUI.
</p>
<p>
The front-end does nothing for FocusOut messages.
</p>
</section>
<section>
<heading>X-Windows messages</heading>
<p>
This section describes messages that X-Windows servers and the WM
generally send to the application. Other window servers may send
similar messages.
</p>
<deflist>
<term>Take Focus</term>
<desc>
<p>
A message from the WM telling a window it should take keyboard
focus. If the app is not active, the back-end should send a
FocusIn event. Otherwise, the back-end should only send a
FocusIn event to the front end if the message is due to a user
action, such as a click on the title bar (i.e. the target
window is not the current key window or the last window that
requested key status). The back-end may
also send an event if the window has just been mapped,
although this is not typically necessary, unless it's due to a
screen change.
</p>
<p>
In other cases, the back-end should do what is necessary to
make sure that the last window to request key status receives
it instead of the one the WM thinks should receive it.
</p>
</desc>
<term>Focus In</term>
<desc>
<p>
A message from the server telling the application that
keyboard focus has been set for a window. The back-end
should not send an event to the front-end in this
case. However, the back-end should use this information to
determine when to send a message in other cases (e.g. from a
Take Focus message).
</p>
</desc>
<term>Focus Out</term>
<desc>
<p>
A message from the server telling the application that focus
has left a window. If the focus has gone to a window that is
not part of the application, the back-end should tell the
NSApp to deactivate. Otherwise it should do nothing.
</p>
</desc>
</deflist>
</section>
</chapter>
</body>
</gsdoc>

View file

@ -0,0 +1,94 @@
#
# Documentation makefile for the GNUstep Backend Library
# Copyright (C) 1995 Free Software Foundation, Inc.
#
# Written by: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../back.make
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
# The documents to be generated
DOCUMENT_NAME =
SUBPROJECTS = Back
# The text documents to be generated
DOCUMENT_TEXT_NAME = \
INSTALL NEWS README ANNOUNCE
TOP_DOC_FILES = INSTALL NEWS README ANNOUNCE
INSTALL_TEXI_FILES = version.texi
INSTALL_TEXT_MAIN = install.texi
INSTALL_DOC_INSTALL_DIR = Developer/Back/ReleaseNotes/$(VERSION)
NEWS_TEXI_FILES = version.texi
NEWS_TEXT_MAIN = news.texi
NEWS_DOC_INSTALL_DIR = Developer/Back/ReleaseNotes/$(VERSION)
README_TEXI_FILES = version.texi
README_TEXT_MAIN = readme.texi
README_DOC_INSTALL_DIR = Developer/Back/ReleaseNotes/$(VERSION)
ANNOUNCE_TEXI_FILES = version.texi
ANNOUNCE_TEXT_MAIN = announce.texi
ANNOUNCE_DOC_INSTALL_DIR = Developer/Back/ReleaseNotes/$(VERSION)
-include Makefile.preamble
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/documentation.make
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include Makefile.postamble
regenerate: $(DOCUMENT_TEXT_NAME)
mv $(TOP_DOC_FILES) ..
version.texi: ../Version
rm -f version.texi
echo '@set GNUSTEP-BACK-VERSION' $(GNUSTEP_BACK_VERSION) \
> version.texi
echo '@set GNUSTEP-BACK-GCC $(GNUSTEP_BACK_GCC)' \
>> version.texi
echo '@set GNUSTEP-BACK-DGS $(GNUSTEP_BACK_DGS)' \
>> version.texi
if [ $(GNUSTEP_BACK_FTP_MACHINE) ]; then \
echo '@set GNUSTEP-BACK-FTP-MACHINE $(GNUSTEP_BACK_FTP_MACHINE)' \
>> version.texi; fi
if [ $(GNUSTEP_BACK_FTP_DIRECTORY) ]; then \
echo '@set GNUSTEP-BACK-FTP-DIRECTORY \
$(GNUSTEP_BACK_FTP_DIRECTORY)' \
>> version.texi; fi
if [ $(GNUSTEP_BACK_SNAP_FTP_MACHINE) ]; then \
echo '@set GNUSTEP-BACK-SNAP-FTP-MACHINE \
$(GNUSTEP_BACK_SNAP_FTP_MACHINE)' \
>> version.texi; fi
if [ $(GNUSTEP_BACK_SNAP_FTP_DIRECTORY) ]; then \
echo '@set GNUSTEP-BACK-SNAP-FTP-DIRECTORY \
$(GNUSTEP_BACK_SNAP_FTP_DIRECTORY)' \
>> version.texi; fi

View file

@ -0,0 +1,47 @@
@c -*- texinfo -*-
@chapter ANNOUNCE
@ifset TEXT-ONLY
@include version.texi
@end ifset
This is version @value{GNUSTEP-BACK-VERSION} of the GNUstep GUI Backend
(@samp{gnustep-back}).
@section What is the GNUstep GUI Backend?
It is a back-end component for the GNUstep GUI Library. The
implementation of the GNUstep GUI Library is designed in two parts. The
first part is the front-end component which is independent of platform
and display system. This front-end is combined with a back-end
component which handles all of the display system dependent such as
specific calls to the X Window System. This design allows the GNUstep
applications to have the "look and feel" of the underlying display
system without any changes to the application, and the library can be
easily ported to other display systems.
The GNUstep GUI Backend is for platforms using the X-Window System or
Window's Systems. It works via a DPS emulation engine to
emulate the DPS functions required by the front-end system.
@set ANNOUNCE-ONLY
@include news.texi
@clear ANNOUNCE-ONLY
@section Where can you get it? How can you compile it?
@ifset GNUSTEP-BACK-FTP-MACHINE
The gstep-back-@value{GNUSTEP-BACK-VERSION}.tar.gz distribution
file has been placed at @url{ftp://@value{GNUSTEP-BACK-FTP-MACHINE}/@value{GNUSTEP-BACK-FTP-DIRECTORY}}.
@end ifset
@section Where do I send bug reports?
Bug reports can be sent to the GNUstep bug list
@email{bug-gnustep@@gnu.org}
@section Obtaining GNU Software
Check out the GNUstep web site. (@url{http://www.gnustep.org/}) and the
GNU web site. (@url{http://www.gnu.org/})

View file

@ -0,0 +1,86 @@
@c -*- texinfo -*-
@chapter Installation
@node Top, Introduction, (dir), (dir)
@include version.texi
@menu
* Introduction::
* Configuration::
* Compilation::
* Installing::
@end menu
@node Introduction, Configuration, Top, Top
@section Introduction
This file documents the installation of the GNUstep Backend Library,
@samp{gnustep-back}. If you are installing this package as part of the
GNUstep core package, read the file GNUstep-HOWTO for more complete
instructions on how to install the entire GNUstep package (including
this library). GNUstep-HOWTO is located at @url{http://www.gnustep.org}
You must have installed gnustep-gui before installing this library.
@node Configuration, Compilation, Introduction, Top
@section Configuration
Configuration is performed by running the @file{configure} program at a
shell prompt. You may want to use some of the optional arguments to the
@file{configure} program. Type @code{configure --help} for a list. GNUstep
specific options are at the end of this list (if any).
The backend comes with several different window server and graphics
drawing implementations. If you do nothing, the default ones will be
chosen. You can can change this using configure. For instance,
to choose the art graphical drawing implementation, run
@example
configure --enable-graphics=art
@end example
Type @code{configure --help} for a list of graphical drawing
implementations.
You can also change the name of the backend when configuring it. This is
convienient if you want to have a different backend with different
configurations. For instance, to create an xlib and and art backend,
you could do this:
@example
configure --enable-graphics=xlib --with-name=xlib
make install
make distclean
configure --enable-graphics=art --with-name=art
make install
@end example
Before running an application, choose one backend using the defaults program:
@example
defaults write NSGlobalDomain GSBackend libgnustep-xlib
@end example
@node Compilation, Installing, Configuration, Top
@section Compilation
To compile this library, type make. After this is complete, type make
install (make sure you are the root user). Some additional options you
can use with make are @samp{debug=yes} to make a debugging version of
the library and @samp{shared=no} to make a static version of the
library. See the gstep-make package for more information on these options.
@node Installing, , Compilation, Top
@section Installing
To install, type
@example
make install
@end example
@bye

View file

@ -0,0 +1,202 @@
@c -*-texinfo-*-
@ifclear ANNOUNCE-ONLY
@chapter NEWS
@end ifclear
@ifset TEXT-ONLY
@include version.texi
@end ifset
@section Noteworthy changes in version @samp{0.14.0}
Added code to automatically make any window which uses the
NSDesktopWindowLevel also be omnipresent.
Many glyph drawing improvements.
@ifclear ANNOUNCE-ONLY
@section Noteworthy changes in version @samp{0.13.2}
Added basic implementation of window levels on Windows. In general a bunch of
improvements in the Windows backend.
Experimental patch for using cairo on Windows.
More support for RTF, TIFF and selctions in the pasteboard server.
There has been change in the interaction of devices with the gui frontend. This
version or greater of the backend needs to be used with gui 0.13.2
@section Noteworthy changes in version @samp{0.13.1}
Minor improvements.
@section Noteworthy changes in version @samp{0.13.0}
Many improvements to the cairo backend. Add DPSshfill for all backends.
Better handling of X event times.
@section Noteworthy changes in version @samp{0.12.0}
Big improvements to the cairo graphics and Window backend. Also better
support for OpenGL.
@section Noteworthy changes in version @samp{0.11.0}
Bugfixes to art and xlib.
There was some work on the Windows backend for the GDI interface by Christopher Armstrong.
@section Noteworthy changes in version @samp{0.10.3}
Fixes. A lot of Cairo backend work.
@section Noteworthy changes in version @samp{0.10.2}
The Backend can set UTF8 window titles where this is allowed.
@section Noteworthy changes in version @samp{0.10.1}
The art graphics module is the default now. As was previously the
case, if the proper libraries are not found, the configuration will
automatically switch to xlib on winlib (whichever is appropriate).
There was a great deal of work by Tom MacSween on the windows module to
get windows and taskbars working together, closing, opening, hiding, and just
general good window management.
The Cairo module has been significantly updated and now works with
Cariro version 1.0, although you need to make some minor changes to the
Cairo library before it will work with GNUstep. Due to this, this module
is still considered beta. Ask on the mailing lists for help with this.
@section Noteworthy changes in version @samp{0.10.0}
The installed name of the backend now includes an interface version number.
This avoids the potential version mismatch between the frontend (GUI) library
and the backend.
@itemize @bullet
@item Alpha blending was implemented for Windows, although it does not
seem to work on some machines.
@end itemize
@section Noteworthy changes in version @samp{0.9.5}
@itemize @bullet
@item Added support for window alpha on X servers.
@item Add support for old and new freetype libs.
@item Some improvements to the Windows backend.
@end itemize
@section Noteworthy changes in version @samp{0.9.4}
@itemize @bullet
@item Fast drawing on 8 bit displays was added (although it might only
speed things up on old X11 servers and/or remote servers).
@item GNUstep modifier keys are mapped to KeySyms instead of KeyCodes
@item Added a Cairo backend, although it is probably non-functional. Anyone
is invited to contribute to making it work.
@item art backend supports reading from a window.
@item Add internal window decoration handling.
@end itemize
@section Noteworthy changes in version @samp{0.9.3}
@itemize @bullet
@item A number of W32 window event enhancements
@item art backend glyph drawing with alpha enhancements.
@item libwraster is no longer checked for - image functions now in frontend
@end itemize
@section Noteworthy changes in version @samp{0.9.2}
@itemize @bullet
@item Art backend added support for grayscale, one-isblack colorspaces.
@item Windows pasteboard interaction handling added.
@item Better focus handling on Windows.
@item Better font and draw handling on Windows.
@end itemize
@section Noteworthy changes in version @samp{0.9.1}
Color on 8 bit displays works correctly now. WindowMaker properties are
always set now in case another manager is emulating WindowMaker styles.
@section Noteworthy changes in version @samp{0.9.0}
Some more improvements to copy/paste support following ICCCM specifications
(like COMPOUND_TEXT support).
@section Noteworthy changes in version @samp{0.8.9}
@itemize @bullet
@item Much improved pasting support between X apps and GNUstep apps.
@item Backend headers are no longer installed (now private).
@end itemize
@section Noteworthy changes in version @samp{0.8.8}
Full multi-byte/unicode support for East Asian languages was added to
the xlib backend. The X11 server now supports use of the XIM input
method for entering non-keyboard characters. Both contributions thanks
to Kazunobu Kuriyama.
@itemize @bullet
@item Also added slightly better EWMH support.
@item Art backend works with more versions of freetype.
@end itemize
@section Noteworthy changes in version @samp{0.8.7}
Handle NSBezierPath glyph drawing in art backend. art backend compiles
with all freetype except 2.1.3 via ifdefs.
@section Noteworthy changes in version @samp{0.8.6}
Bug fixes. See the gnustep-gui NEWS for changes.
@section Noteworthy changes in version @samp{0.8.5}
Text system improvements. See the gnustep-gui NEWS for changes.
@section Noteworthy changes in version @samp{0.8.3}
See the gnustep-gui NEWS for changes.
@section Noteworthy changes in version @samp{0.8.2}
Improved font handling in art backend. Improved compositing with
transformations and clipping in art backend.
@section Noteworthy changes in version @samp{0.8.1}
art (libart-based) backend added. Use ./configure --enable-graphics=art
to choose this backend.
@section Noteworthy changes in version @samp{0.8.0}
Bug fixes.
@section Noteworthy changes in version @samp{0.7.9}
Bug fixes.
@section Noteworthy changes in version @samp{0.7.8}
Simplified backend selection using --enable-server and
--enable-graphics. Add --with-library-flags and --with-include-flags
for adding additonal flags. Set name with --with-name
@section Noteworthy changes in version @samp{0.7.7}
First release. Most components extracted from xgps. The old backends,
xgps and xdps were depreciated in favor of this new backend, simply named
back, which can be configured for a variety of window server and
graphics implementations, and also allow for improved code sharing.
In addition there is now a window server backend for Windows computers,
although it is in a very alpha state.
@end ifclear

View file

@ -0,0 +1,35 @@
@c -*-texinfo-*-
@chapter README
@ifset TEXT-ONLY
@include version.texi
@end ifset
This is version @value{GNUSTEP-BACK-VERSION} of the GNUstep GUI Backend
(@samp{gnustep-back}).
Here is some introductory info to get you started:
@section Initial reading
@itemize @bullet
@item
The file @file{ANNOUNCE} contains a very brief overview of the library.
It also tells you where to get the most recent version.
@item
The file @file{NEWS} has the library's feature history.
@item
The file @file{INSTALL} gives instructions for installing the library.
@end itemize
@section How can you help?
@itemize @bullet
@item
Give us feedback! Tell us what you like; tell us what you think
could be better. Send us bug reports at @email{bug-gnustep@@gnu.org}.
@end itemize

40
trunk/Fonts/GNUmakefile Normal file
View file

@ -0,0 +1,40 @@
#
# Resources makefile for GNUstep Back Library
# Copyright (C) 2005 Free Software Foundation, Inc.
#
# Written by: Adam Fedor <fedor@doc.com>
# Date: Feb 2005
#
# This file is part of the GNUstep Back Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=../back.make
include $(GNUSTEP_MAKEFILES)/common.make
#RESOURCE_SET_NAME = back-resources
back-resources_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Fonts
back-resources_RESOURCE_FILES = $(FONT_INSTALL_FILES)
FONT_INSTALL_FILES = Helvetica.nfont
-include GNUmakefile.local
include $(GNUSTEP_MAKEFILES)/rules.make
-include GNUmakefile.postamble

View file

@ -0,0 +1,67 @@
#
# GNUmakefile.postamble
#
# Copyright (C) 2000 Free Software Foundation, Inc.
#
# Written: Adam Fedor <fedor@gnu.org>
# Date: Oct 2000
#
# This file is part of the GNUstep Base Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Things to do before compiling
# before-all::
# Things to do after compiling
# after-all::
# Things to do before installing
# before-install::
# Things to do after installing
after-install::
mkdir -p $(back-resources_INSTALL_DIR)
for file in $(FONT_INSTALL_FILES); do \
($(TAR) cfX - $(GNUSTEP_MAKEFILES)/tar-exclude-list $$file) | (cd $(back-resources_INSTALL_DIR); $(TAR) xf -) ;\
done
# Things to do before uninstalling
before-uninstall::
for file in $(FONT_INSTALL_FILES); do \
rm -rf $(back-resources_INSTALL_DIR)/$$file;\
done
# Things to do after uninstalling
# after-uninstall::
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
# after-clean::
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
# after-distclean::
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::

View file

@ -0,0 +1,37 @@
{
Version = 2;
Foundry = "URW";
Faces =
(
{
PostScriptName = "Helvetica";
Name = "Regular";
Files = ("n019003l.pfb","n019003l.pfm","n019003l.afm");
},
{
PostScriptName = "Helvetica-Bold";
Name = "Bold";
Files = ("n019004l.pfb","n019004l.pfm","n019004l.afm");
},
{
PostScriptName = "Helvetica-Italic";
Name = "Italic";
Files = ("n019023l.pfb","n019023l.pfm","n019023l.afm");
},
{
PostScriptName = "Helvetica-BoldItalic";
Name = "Bold Italic";
Files = ("n019024l.pfb","n019024l.pfm","n019024l.afm");
},
{
PostScriptName = "Helvetica-Oblique";
Name = "Oblique";
Files = ("n019023l.pfb","n019023l.pfm","n019023l.afm");
},
{
PostScriptName = "Helvetica-BoldOblique";
Name = "Bold Oblique";
Files = ("n019024l.pfb","n019024l.pfm","n019024l.afm");
}
);
}

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

63
trunk/GNUmakefile Normal file
View file

@ -0,0 +1,63 @@
#
# Top level makefile for GNUstep Backend
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
ifeq ($(GNUSTEP_MAKEFILES),)
GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
endif
ifeq ($(GNUSTEP_MAKEFILES),)
$(error You need to set GNUSTEP_MAKEFILES before compiling!)
endif
# Install into the system root by default
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
RPM_DISABLE_RELOCATABLE=YES
PACKAGE_NEEDS_CONFIGURE = YES
SVN_MODULE_NAME = back
SVN_BASE_URL = svn+ssh://svn.gna.org/svn/gnustep/libs
GNUSTEP_LOCAL_ADDITIONAL_MAKEFILES=back.make
include $(GNUSTEP_MAKEFILES)/common.make
PACKAGE_NAME = gnustep-back
include ./Version
#
# The list of subproject directories
#
SUBPROJECTS = Source Tools
ifneq ($(fonts), no)
SUBPROJECTS += Fonts
endif
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/aggregate.make
-include GNUmakefile.postamble

View file

@ -0,0 +1,74 @@
# -*-makefile-*-
# GNUmakefile.postamble
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Things to do before compiling
# before-all::
# Things to do after compiling
# after-all::
$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
$(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
# Things to do before installing
ifeq ($(BACKEND_BUNDLE),)
before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
$(INSTALL_DATA) back.make \
$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/back.make
endif
# Things to do after installing
# after-install::
# Things to do before uninstalling
# before-uninstall::
# Things to do after uninstalling
# after-uninstall::
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
# after-clean::
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
after-distclean::
rm -f config.status config.log config.cache TAGS config.h config.make back.make
back.make: back.make.in
./configure
config.mak: config.mak.in
./configure
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::

View file

@ -0,0 +1,37 @@
/* <title>ARTContext</title>
<abstract>ART backend drawing context.</abstract>
Copyright (C) 2005 Free Software Foundation, Inc.
Written By: Alexander Malmberg <alexander@malmberg.org>
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef ARTContext_h
#define ARTContext_h
#include "gsc/GSContext.h"
@interface ARTContext : GSContext
@end
#endif

View file

@ -0,0 +1,38 @@
/*
CairoContext.h
Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003
Written by Banlu Kemiyatorn <id at project-ile dot net>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CairoContext_h
#define CairoContext_h
#include "gsc/GSContext.h"
@interface CairoContext : GSContext
{
}
@end
#endif

View file

@ -0,0 +1,68 @@
/*
CairoFaceInfo.h
Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003
Written by Banlu Kemiyatorn <object at gmail dot com>
Base on code by Alexander Malmberg <alexander@malmberg.org>
Rewrite: Fred Kiefer <fredkiefer@gmx.de>
Date: Jan 2006
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CAIROFACEINFO_H
#define CAIROFACEINFO_H
#include <Foundation/Foundation.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include <cairo-ft.h>
@interface CairoFaceInfo : NSObject
{
int _weight;
unsigned int _traits;
cairo_font_face_t *_fontFace;
FcPattern *_pattern;
NSString *_familyName;
}
- (id) initWithfamilyName: (NSString *)familyName
weight: (int)weight
traits: (unsigned int)traits
pattern: (FcPattern *)pattern;
- (unsigned int) cacheSize;
- (int) weight;
- (void) setWeight: (int)weight;
- (unsigned int) traits;
- (void) setTraits: (unsigned int)traits;
- (NSString *) familyName;
- (void) setFamilyName: (NSString *)name;
- (cairo_font_face_t *)fontFace;
@end
#endif

View file

@ -0,0 +1,39 @@
/*
CairoFontEnumerator.h
Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003
Written by Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CairoFontEnumerator_h
#define CairoFontEnumerator_h
#include <GNUstepGUI/GSFontInfo.h>
#include <cairo.h>
#include "cairo/CairoFaceInfo.h"
@interface CairoFontEnumerator : GSFontEnumerator
+ (CairoFaceInfo *) fontWithName: (NSString *)name;
@end
#endif

View file

@ -0,0 +1,54 @@
/*
CairoFontInfo.h
Copyright (C) 2003 Free Software Foundation, Inc.
August 31, 2003
Written by Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CairoFontInfo_h
#define CairoFontInfo_h
#include <GNUstepGUI/GSFontInfo.h>
#include "cairo/CairoFaceInfo.h"
#include <cairo.h>
@interface CairoFontInfo : GSFontInfo
{
@public
cairo_scaled_font_t *_scaled;
CairoFaceInfo *_faceInfo;
BOOL _screenFont;
float lineHeight;
unsigned int _cacheSize;
unsigned int *_cachedGlyphs;
NSSize *_cachedSizes;
}
- (void) setCacheSize:(unsigned int)size;
- (void) drawGlyphs: (const NSGlyph*)glyphs
length: (int)length
on: (cairo_t*)ct;
@end
#endif

View file

@ -0,0 +1,49 @@
/*
Copyright (C) 2004 Free Software Foundation, Inc.
Author: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CairoGState_h
#define CairoGState_h
#include <cairo.h>
#include "gsc/GSGState.h"
@class CairoSurface;
@interface CairoGState : GSGState
{
@public
cairo_t *_ct;
CairoSurface *_surface;
int _strokeadjust;
}
- (void) GSCurrentSurface: (CairoSurface **)surface: (int *)x : (int *)y;
- (void) GSSetSurface: (CairoSurface *)surface : (int)x : (int)y;
- (void) showPage;
@end
#endif

View file

@ -0,0 +1,40 @@
/*
Copyright (C) 2007 Free Software Foundation, Inc.
Author: Fred Kiefer <fredkiefer@gmx.de>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XGCairoPDFSurface_h
#define XGCairoPDFSurface_h
#include "cairo/CairoSurface.h"
@interface CairoPDFSurface : CairoSurface
{
NSSize size;
}
- (void)setSize: (NSSize)newSize;
- (void)writeComment: (NSString *)comment;
@end
#endif

View file

@ -0,0 +1,40 @@
/*
Copyright (C) 2007 Free Software Foundation, Inc.
Author: Fred Kiefer <fredkiefer@gmx.de>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XGCairoPSSurface_h
#define XGCairoPSSurface_h
#include "cairo/CairoSurface.h"
@interface CairoPSSurface : CairoSurface
{
NSSize size;
}
- (void)setSize: (NSSize)newSize;
- (void)writeComment: (NSString *)comment;
@end
#endif

View file

@ -0,0 +1,48 @@
/*
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CairoSurface_h
#define CairoSurface_h
#include <cairo.h>
#include <Foundation/Foundation.h>
@interface CairoSurface : NSObject
{
@public
void *gsDevice;
cairo_surface_t *_surface;
}
- (id) initWithDevice: (void *)device;
- (NSSize) size;
- (void) setSize: (NSSize)newSize;
- (cairo_surface_t *) surface;
@end
#endif

View file

@ -0,0 +1,43 @@
/*
Win32CairoGlitzSurface.h
Copyright (C) 2008 Free Software Foundation, Inc.
March 2nd, 2008
Author: Xavier Glattard <xavier.glattard@free.fr>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef Win32CairoGlitzSurface_h
#define Win32CairoGlitzSurface_h
#include "win32/WIN32Server.h"
#include "cairo/CairoSurface.h"
@interface Win32CairoGlitzSurface : CairoSurface
{
}
@end
#endif

View file

@ -0,0 +1,43 @@
/*
Win32CairoSurface.h
Copyright (C) 2008 Free Software Foundation, Inc.
March 2nd, 2008
Author: Xavier Glattard <xavier.glattard@free.fr>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef Win32CairoSurface_h
#define Win32CairoSurface_h
#include "win32/WIN32Server.h"
#include "cairo/CairoSurface.h"
@interface Win32CairoSurface : CairoSurface
{
}
@end
#endif

View file

@ -0,0 +1,40 @@
/*
Copyright (C) 2004 Free Software Foundation, Inc.
Author: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XGCairoGlitzSurface_h
#define XGCairoGlitzSurface_h
#include "x11/XGServer.h"
#include "x11/XGServerWindow.h"
#include "cairo/CairoSurface.h"
@interface XGCairoGlitzSurface : CairoSurface
{
}
@end
#endif

View file

@ -0,0 +1,37 @@
/*
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XGCairoSurface_h
#define XGCairoSurface_h
#include "cairo/CairoSurface.h"
@interface XGCairoSurface : CairoSurface
{
}
@end
#endif

View file

@ -0,0 +1,41 @@
/*
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Banlu Kemiyatorn <object at gmail dot com>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XGCairoXImageSurface_h
#define XGCairoXImageSurface_h
#include "cairo/CairoSurface.h"
@class XWindowBuffer;
@interface XGCairoXImageSurface : CairoSurface
{
@private
XWindowBuffer *wi;
}
@end
#endif

View file

@ -0,0 +1,87 @@
/* <title>GSContext</title>
<abstract>Generic backend drawing context.</abstract>
Copyright (C) 2002 Free Software Foundation, Inc.
Written By: Adam Fedor <fedor@gnu.org>
Date: Mar 2002
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSContext_h_INCLUDE
#define _GSContext_h_INCLUDE
#include <Foundation/NSMapTable.h>
#include <AppKit/NSGraphicsContext.h>
@class GSGState;
@class GSDisplayServer;
@interface GSContext : NSGraphicsContext
{
@public
GSDisplayServer *server;
void *opstack;
void *gstack;
GSGState *gstate;
}
- (GSGState *) currentGState;
@end
/* Error Macros */
#define DPS_WARN(type, resp) \
NSDebugLLog(@"GSContext", type, resp)
#define DPS_ERROR(type, resp) \
NSLog(type, resp)
/* Current keys used for the info dictionary:
Key: Value:
DisplayName -- (NSString)name of X server
ScreenNumber -- (NSNumber)screen number
DebugContext -- (NSNumber)YES or NO
*/
extern NSString *DPSconfigurationerror;
extern NSString *DPSinvalidaccess;
extern NSString *DPSinvalidcontext;
extern NSString *DPSinvalidexit;
extern NSString *DPSinvalidfileaccess;
extern NSString *DPSinvalidfont;
extern NSString *DPSinvalidid;
extern NSString *DPSinvalidrestore;
extern NSString *DPSinvalidparam;
extern NSString *DPSioerror;
extern NSString *DPSlimitcheck;
extern NSString *DPSnocurrentpoint;
extern NSString *DPSnulloutput;
extern NSString *DPSrangecheck;
extern NSString *DPSstackoverflow;
extern NSString *DPSstackunderflow;
extern NSString *DPStypecheck;
extern NSString *DPSundefined;
extern NSString *DPSundefinedfilename;
extern NSString *DPSundefinedresult;
extern NSString *DPSVMerror;
#endif /* _GSContext_h_INCLUDE */

View file

@ -0,0 +1,67 @@
/* -*-objc-*-
GSFunction - PS Function for GSGState
Copyright (C) 2003 Free Software Foundation, Inc.
Author: Alexander Malmberg <alexander@malmberg.org>
Author: Fred Kiefer <fredkiefer@gmx.de>
Extracted into separate class.
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSFunction_h_INCLUDE
#define _GSFunction_h_INCLUDE
#include <Foundation/NSObject.h>
@interface GSFunction : NSObject
{
/* General information about the function. */
int num_in, num_out;
double *domain; /* num_in * 2 */
double *range; /* num_out * 2 */
/* Type specific information */
const unsigned char *data_source;
int *size; /* num_in */
int bits_per_sample;
double *encode; /* num_in * 2 */
double *decode; /* num_out * 2 */
}
- (id) initWith: (NSDictionary *)d;
- (double) getsample: (int)sample : (int) i;
- (void) eval: (double *)inValues : (double *)outValues;
@end
@interface GSFunction2in3out : GSFunction
{
/* sample cache for in == 2, out == 3 */
int sample_index[2];
double sample_cache[4][3];
}
- (NSRect) affectedRect;
@end
#endif // _GSFunction_h_INCLUDE

View file

@ -0,0 +1,111 @@
/* GSGState - Implements generic graphic state drawing for non-PS backends
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1995
Extracted from XGPS: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSGState_h_INCLUDE
#define _GSGState_h_INCLUDE
#include <AppKit/NSGraphicsContext.h> // needed for NSCompositingOperation
#include <Foundation/NSArray.h>
#include <Foundation/NSObject.h>
#include <gsc/gscolors.h>
@class NSAffineTransform;
@class NSBezierPath;
@class NSFont;
@class NSColorSpace;
@class GSContext;
typedef enum {
path_stroke, path_fill, path_eofill, path_clip, path_eoclip
} ctxt_object_t;
typedef enum {
COLOR_STROKE = 1,
COLOR_FILL = 2,
COLOR_BOTH = 3 /* COLOR_BOTH = COLOR_FILL || COLOR_STROKE */
} color_state_t;
@interface GSGState : NSObject <NSCopying>
{
@public
GSContext *drawcontext;
NSAffineTransform *ctm;
NSPoint offset; /* Offset from Drawable origin */
NSBezierPath *path; /* Current path */
GSFontInfo *font; /* Current font reference */
NSColorSpace *fillColorS; /* Colorspace used for fill drawing */
NSColorSpace *strokeColorS; /* Colorspace used for stroke drawing */
device_color_t fillColor; /* fill color */
device_color_t strokeColor; /* stroke color */
color_state_t cstate; /* state last time color was set */
NSImage *pattern; /* If set, image to draw with */
float charSpacing;
NSAffineTransform *textCtm; /* Text transform - concat with ctm */
GSTextDrawingMode textMode;
BOOL viewIsFlipped;
}
- initWithDrawContext: (GSContext *)context;
- deepen;
- (void) setOffset: (NSPoint)theOffset;
- (NSPoint) offset;
- (void) setColor: (device_color_t *)color state: (color_state_t)cState;
- (void) GSSetPatterColor: (NSImage*)image;
- (void) compositeGState: (GSGState *)source
fromRect: (NSRect)aRect
toPoint: (NSPoint)aPoint
op: (NSCompositingOperation)op;
- (void) dissolveGState: (GSGState *)source
fromRect: (NSRect)aRect
toPoint: (NSPoint)aPoint
delta: (float)delta;
- (void) compositeGState: (GSGState *)source
fromRect: (NSRect)aRect
toPoint: (NSPoint)aPoint
op: (NSCompositingOperation)op
fraction: (float)delta;
- (void) compositerect: (NSRect)aRect
op: (NSCompositingOperation)op;
- (NSPoint) pointInMatrixSpace: (NSPoint)point;
- (NSPoint) deltaPointInMatrixSpace: (NSPoint)point;
- (NSRect) rectInMatrixSpace: (NSRect)rect;
@end
#include "GSGStateOps.h"
#endif /* _GSGState_h_INCLUDE */

View file

@ -0,0 +1,159 @@
/* GSGStateOPS - Ops for GSGState
Copyright (C) 1998 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSGStateOps_h_INCLUDE
#define _GSGStateOps_h_INCLUDE
@interface GSGState (Ops)
/* ----------------------------------------------------------------------- */
/* Color operations */
/* ----------------------------------------------------------------------- */
- (void) DPScurrentalpha: (float*)a;
- (void) DPScurrentcmykcolor: (float*)c : (float*)m : (float*)y : (float*)k;
- (void) DPScurrentgray: (float*)gray;
- (void) DPScurrenthsbcolor: (float*)h : (float*)s : (float*)b;
- (void) DPScurrentrgbcolor: (float*)r : (float*)g : (float*)b;
- (void) DPSsetalpha: (float)a;
- (void) DPSsetcmykcolor: (float)c : (float)m : (float)y : (float)k;
- (void) DPSsetgray: (float)gray;
- (void) DPSsethsbcolor: (float)h : (float)s : (float)b;
- (void) DPSsetrgbcolor: (float)r : (float)g : (float)b;
- (void) GSSetFillColorspace: (void *)spaceref;
- (void) GSSetStrokeColorspace: (void *)spaceref;
- (void) GSSetFillColor: (const float *)values;
- (void) GSSetStrokeColor: (const float *)values;
/* ----------------------------------------------------------------------- */
/* Text operations */
/* ----------------------------------------------------------------------- */
- (void) DPSashow: (float)x : (float)y : (const char*)s;
- (void) DPSawidthshow: (float)cx : (float)cy : (int)c : (float)ax : (float)ay
: (const char*)s;
- (void) DPScharpath: (const char*)s : (int)b;
- (void) appendBezierPathWithPackedGlyphs: (const char *)packedGlyphs
path: (NSBezierPath*)aPath;
- (void) DPSshow: (const char*)s;
- (void) DPSwidthshow: (float)x : (float)y : (int)c : (const char*)s;
- (void) DPSxshow: (const char*)s : (const float*)numarray : (int)size;
- (void) DPSxyshow: (const char*)s : (const float*)numarray : (int)size;
- (void) DPSyshow: (const char*)s : (const float*)numarray : (int)size;
- (void) GSSetCharacterSpacing: (float)extra;
- (void) GSSetFont: (GSFontInfo *)fontref;
- (void) GSSetFontSize: (float)size;
- (NSAffineTransform *) GSGetTextCTM;
- (NSPoint) GSGetTextPosition;
- (void) GSSetTextCTM: (NSAffineTransform *)ctm;
- (void) GSSetTextDrawingMode: (GSTextDrawingMode)mode;
- (void) GSSetTextPosition: (NSPoint)loc;
- (void) GSShowText: (const char *)string : (size_t) length;
- (void) GSShowGlyphs: (const NSGlyph *)glyphs : (size_t) length;
/* ----------------------------------------------------------------------- */
/* Gstate operations */
/* ----------------------------------------------------------------------- */
- (void) DPSinitgraphics;
- (void) DPScurrentflat: (float*)flatness;
- (void) DPScurrentlinecap: (int*)linecap;
- (void) DPScurrentlinejoin: (int*)linejoin;
- (void) DPScurrentlinewidth: (float*)width;
- (void) DPScurrentmiterlimit: (float*)limit;
- (void) DPScurrentpoint: (float*)x : (float*)y;
- (void) DPScurrentstrokeadjust: (int*)b;
- (void) DPSsetdash: (const float*)pat : (int)size : (float)offset;
- (void) DPSsetflat: (float)flatness;
- (void) DPSsetlinecap: (int)linecap;
- (void) DPSsetlinejoin: (int)linejoin;
- (void) DPSsetlinewidth: (float)width;
- (void) DPSsetmiterlimit: (float)limit;
- (void) DPSsetstrokeadjust: (int)b;
/* ----------------------------------------------------------------------- */
/* Matrix operations */
/* ----------------------------------------------------------------------- */
- (void) DPSconcat: (const float*)m;
- (void) DPSinitmatrix;
- (void) DPSrotate: (float)angle;
- (void) DPSscale: (float)x : (float)y;
- (void) DPStranslate: (float)x : (float)y;
- (NSAffineTransform *) GSCurrentCTM;
- (void) GSSetCTM: (NSAffineTransform *)ctm;
- (void) GSConcatCTM: (NSAffineTransform *)ctm;
/* ----------------------------------------------------------------------- */
/* Paint operations */
/* ----------------------------------------------------------------------- */
- (NSPoint) currentPoint;
- (void) DPSarc: (float)x : (float)y : (float)r : (float)angle1
: (float)angle2;
- (void) DPSarcn: (float)x : (float)y : (float)r : (float)angle1
: (float)angle2;
- (void) DPSarct: (float)x1 : (float)y1 : (float)x2 : (float)y2 : (float)r;
- (void) DPSclip;
- (void) DPSclosepath;
- (void) DPScurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
: (float)x3 : (float)y3;
- (void) DPSeoclip;
- (void) DPSeofill;
- (void) DPSfill;
- (void) DPSflattenpath;
- (void) DPSinitclip;
- (void) DPSlineto: (float)x : (float)y;
- (void) DPSmoveto: (float)x : (float)y;
- (void) DPSnewpath;
- (void) DPSpathbbox: (float*)llx : (float*)lly : (float*)urx : (float*)ury;
- (void) DPSrcurveto: (float)x1 : (float)y1 : (float)x2 : (float)y2
: (float)x3 : (float)y3;
- (void) DPSrectclip: (float)x : (float)y : (float)w : (float)h;
- (void) DPSrectfill: (float)x : (float)y : (float)w : (float)h;
- (void) DPSrectstroke: (float)x : (float)y : (float)w : (float)h;
- (void) DPSreversepath;
- (void) DPSrlineto: (float)x : (float)y;
- (void) DPSrmoveto: (float)x : (float)y;
- (void) DPSstroke;
- (void) GSSendBezierPath: (NSBezierPath *)path;
- (void) GSRectClipList: (const NSRect *)rects : (int) count;
- (void) GSRectFillList: (const NSRect *)rects : (int) count;
- (NSDictionary *) GSReadRect: (NSRect)rect;
- (void)DPSimage: (NSAffineTransform*) matrix
: (int) pixelsWide : (int) pixelsHigh
: (int) bitsPerSample : (int) samplesPerPixel
: (int) bitsPerPixel : (int) bytesPerRow : (BOOL) isPlanar
: (BOOL) hasAlpha : (NSString *) colorSpaceName
: (const unsigned char *const [5]) data;
- (void) DPSshfill: (NSDictionary *)shader;
@end
#endif

View file

@ -0,0 +1,40 @@
/* GSStreamContext - Output Postscript to a stream
Copyright (C) 1999 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Mar 1999
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSStreamContext_h_INCLUDE
#define _GSStreamContext_h_INCLUDE
#include <stdio.h>
#include "gsc/GSContext.h"
@interface GSStreamContext : GSContext
{
FILE *gstream;
}
@end
#endif /* _GSStreamContext_h_INCLUDE */

View file

@ -0,0 +1,43 @@
/* GSGStreamState - Implements graphic state drawing for PS stream
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Sep 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GSStreamGState_h_INCLUDE
#define _GSStreamGState_h_INCLUDE
#include <gsc/GSGState.h>
@interface GSStreamGState : GSGState
{
@public
int clinecap, clinejoin;
float clinewidth, cmiterlimit;
float cstrokeadjust;
}
@end
#endif /* _GSStreamGState_h_INCLUDE */

View file

@ -0,0 +1,51 @@
/* gscolors - Color conversion routines
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1994
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _gscolors_h_INCLUDE
#define _gscolors_h_INCLUDE
#define AINDEX 5
typedef enum {
gray_colorspace, rgb_colorspace, hsb_colorspace, cmyk_colorspace
} device_colorspace_t;
typedef struct _device_color {
device_colorspace_t space;
float field[6];
} device_color_t;
/* Internal conversion of colors to pixels values */
extern void gsMakeColor(device_color_t *dst, device_colorspace_t space,
float a, float b, float c, float d);
extern void gsColorToRGB(device_color_t *color);
extern void gsColorToGray(device_color_t *color);
extern void gsColorToCMYK(device_color_t *color);
extern void gsColorToHSB(device_color_t *color);
#endif

View file

@ -0,0 +1,184 @@
/* WIN32Geometry - Implements coordinate transformations for MSWindows
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: April 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32Geometry_h_INCLUDE
#define _WIN32Geometry_h_INCLUDE
#include <Foundation/NSGeometry.h>
#include <windows.h>
@class WIN32Server;
static inline NSPoint
MSWindowPointToGS(WIN32Server *svr, HWND hwnd, int x, int y)
{
NSGraphicsContext *ctxt;
RECT rect;
float h, l, r, t, b;
NSPoint p1;
NSWindow *window;
ctxt = GSCurrentContext();
window = GSWindowWithNumber((int)hwnd);
GetClientRect(hwnd, &rect);
h = rect.bottom - rect.top;
[svr styleoffsets: &l : &r : &t : &b : [window styleMask]];
p1.x = x + l;
p1.y = h - y + b;
return p1;
}
static inline NSRect
MSWindowRectToGS(WIN32Server *svr, HWND hwnd, RECT r0)
{
NSGraphicsContext *ctxt;
RECT rect;
float h, l, r, t, b;
NSRect r1;
NSWindow *window;
ctxt = GSCurrentContext();
window = GSWindowWithNumber((int)hwnd);
GetClientRect(hwnd, &rect);
h = rect.bottom - rect.top;
[svr styleoffsets: &l : &r : &t : &b : [window styleMask]];
r1.origin.x = r0.left + l;
r1.origin.y = h - r0.bottom + b;
r1.size.width = r0.right - r0.left;
r1.size.height = r0.bottom - r0.top;
return r1;
}
static inline RECT
GSWindowRectToMS(WIN32Server *svr, HWND hwnd, NSRect r0)
{
NSGraphicsContext *ctxt;
RECT rect;
float h, l, r, t, b;
RECT r1;
NSWindow *window;
ctxt = GSCurrentContext();
window = GSWindowWithNumber((int)hwnd);
GetClientRect(hwnd, &rect);
h = rect.bottom - rect.top;
[svr styleoffsets: &l : &r : &t : &b : [window styleMask]];
r1.left = r0.origin.x - l;
r1.bottom = h - r0.origin.y + b;
r1.right = r1.left + r0.size.width;
r1.top = r1.bottom - r0.size.height;
return r1;
}
static inline
NSPoint MSWindowOriginToGS(HWND hwnd, int x, int y)
{
NSPoint p1;
RECT rect;
int h;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
GetWindowRect(hwnd, &rect);
h = rect.bottom - rect.top;
p1.x = x;
p1.y = screen_height - y - h;
return p1;
}
static inline
POINT GSWindowOriginToMS(HWND hwnd, NSPoint p)
{
POINT p1;
RECT rect;
int h;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
GetWindowRect(hwnd, &rect);
h = rect.bottom - rect.top;
p1.x = p.x;
p1.y = screen_height - p.y - h;
return p1;
}
static inline
NSPoint MSScreenPointToGS(int x, int y)
{
NSPoint p1;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
p1.x = x;
p1.y = screen_height - y;
return p1;
}
static inline
NSRect MSScreenRectToGS(RECT r, unsigned int styleMask, WIN32Server *self)
{
NSRect r1;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
r1.origin.x = r.left;
r1.origin.y = screen_height - r.bottom;
r1.size.width = r.right - r.left;
r1.size.height = r.bottom - r.top;
return r1;
}
static inline
POINT GSScreenPointToMS(NSPoint p)
{
POINT p1;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
p1.x = p.x;
p1.y = screen_height - p.y;
return p1;
}
static inline
RECT GSScreenRectToMS(NSRect r, unsigned int styleMask, WIN32Server *self)
{
RECT r1;
int screen_height = GetSystemMetrics(SM_CYSCREEN);
r1.left = r.origin.x;
r1.bottom = screen_height - r.origin.y;
r1.right = r.origin.x + r.size.width;
r1.top = screen_height - r.origin.y - r.size.height;
return r1;
}
#endif /* _WIN32Geometry_h_INCLUDE */

View file

@ -0,0 +1,62 @@
/* -*-ObjC-*- */
/* Win32OpenGL - openGL management using wgl
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Xavier Glattard
Date: Jan 2007
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_WIN32OpenGL
#define _GNUstep_H_WIN32OpenGL
#include <AppKit/NSOpenGL.h>
#define id _gs_avoid_id_collision
#define BOOL WINDOWSBOOL
#include <windows.h>
#undef id
#undef BOOL
@class NSView;
@class Win32Subwindow;
@class Win32GLPixelFormat;
@interface Win32GLContext : NSOpenGLContext
{
@public
HGLRC wgl_context;
Win32Subwindow *wsubwin;
Win32GLPixelFormat *format;
}
@end
@interface Win32GLPixelFormat : NSOpenGLPixelFormat
{
@public
PIXELFORMATDESCRIPTOR pfd;
HDC wgl_drawable;
int wgl_pixelformat;
}
- (void) _setDrawable: (HDC) aDrawable;
@end
#endif

View file

@ -0,0 +1,211 @@
/* WIN32Server - Implements window handling for MSWindows
Copyright (C) 2002,2005 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
Part of this code have been re-written by:
Tom MacSween <macsweent@sympatico.ca>
Date August 2005
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32Server_h_INCLUDE
#define _WIN32Server_h_INCLUDE
#include <Foundation/NSNotification.h>
#include <Foundation/NSDebug.h>
#include <Foundation/NSString.h>
#include <Foundation/NSArray.h>
#include <Foundation/NSValue.h>
#include <Foundation/NSConnection.h>
#include <Foundation/NSRunLoop.h>
#include <Foundation/NSTimer.h>
#include <AppKit/AppKitExceptions.h>
#include <AppKit/NSApplication.h>
#include <AppKit/NSGraphics.h>
#include <AppKit/NSMenu.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSView.h>
#include <AppKit/NSEvent.h>
#include <AppKit/NSCursor.h>
#include <AppKit/NSText.h>
#include <AppKit/NSPopUpButton.h>
#include <AppKit/NSPanel.h>
#include <AppKit/DPSOperators.h>
#include <AppKit/NSImage.h>
#include <GNUstepGUI/GSDisplayServer.h>
#include <windows.h>
/*
This standard windows macros are missing in MinGW. The definition
here is almost correct, but will fail for multi monitor systems
*/
#ifndef GET_X_LPARAM
#define GET_X_LPARAM(p) ((int)(short)LOWORD(p))
#endif
#ifndef GET_Y_LPARAM
#define GET_Y_LPARAM(p) ((int)(short)HIWORD(p))
#endif
#define EVENT_WINDOW(lp) (GSWindowWithNumber((int)lp))
DWORD windowStyleForGSStyle(unsigned int style);
typedef struct w32serverFlags {
int _last_WM_ACTIVATE;
int menuRef; // reference to menu window
unsigned int currentGS_Style; // what style is current event window
BOOL HOLD_MENU_FOR_MOVE; // override GS move event on hide
BOOL HOLD_MENU_FOR_SIZE; // override GS size event on hide
BOOL HOLD_MINI_FOR_SIZE; // override GS size event on miniturize
BOOL HOLD_MINI_FOR_MOVE; // override GS move event on miniturize
BOOL HOLD_TRANSIENT_FOR_SIZE; // override GS size event on popup context
BOOL HOLD_TRANSIENT_FOR_MOVE; // override GS move event on popup context
BOOL HAVE_MAIN_MENU; // do we have a main menu?
BOOL HOLD_PAINT_FOR_SIZING;
BOOL _is_menu; // is event window the main menu?
BOOL _eventHandled; // did we handle the event?
BOOL _is_cache; // is the event window a cache rep
BOOL _hasGSClassName; // does the event window have a GSclassName
int lastEventType;
int hold;
} serverFlags;
@interface WIN32Server : GSDisplayServer
{
BOOL handlesWindowDecorations;
BOOL usesNativeTaskbar;
serverFlags flags;
HINSTANCE hinstance;
HWND currentFocus;
HWND desiredFocus;
HWND currentActive;
HICON currentAppIcon;
// config window
NSWindow *configWindow;
NSPopUpButton * styleButton;
NSButton * taskbarButton;
NSButton * saveButton;
}
- (BOOL) handlesWindowDecorations;
- (void) setHandlesWindowDecorations: (BOOL) b;
- (BOOL) usesNativeTaskbar;
- (void) setUsesNativeTaskbar: (BOOL) b;
+ (void) initializeBackend;
- (LRESULT) windowEventProc: (HWND)hwnd : (UINT)uMsg
: (WPARAM)wParam : (LPARAM)lParam;
- (void) setFlagsforEventLoop: (HWND)hwnd;
- (DWORD) windowStyleForGSStyle: (unsigned int) style;
- (void) resizeBackingStoreFor: (HWND)hwnd;
@end
@interface WIN32Server (w32_activate)
- (LRESULT) decodeWM_ACTIVEParams: (WPARAM)wParam : (LPARAM)lParam
: (HWND)hwnd;
- (LRESULT) decodeWM_ACTIVEAPPParams: (HWND)hwnd : (WPARAM)wParam
: (LPARAM)lParam;
- (void) decodeWM_NCACTIVATEParams: (WPARAM)wParam : (LPARAM)lParam
: (HWND)hwnd;
@end
@interface WIN32Server (w32_movesize)
- (LRESULT) decodeWM_SIZEParams: (HWND)hwnd : (WPARAM)wParam : (LPARAM)lParam;
- (LRESULT) decodeWM_MOVEParams: (HWND)hwnd : (WPARAM)wParam : (LPARAM)lParam;
- (void) decodeWM_NCCALCSIZEParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_WINDOWPOSCHANGINGParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_WINDOWPOSCHANGEDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_GETMINMAXINFOParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_EXITSIZEMOVEParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_MOVINGParams: (HWND)hwnd : (WPARAM)wParam : (LPARAM)lParam;
- (void) decodeWM_SIZINGParams: (HWND)hwnd : (WPARAM)wParam : (LPARAM)lParam;
@end
@interface WIN32Server (w32_create)
- (LRESULT) decodeWM_NCCREATEParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_CREATEParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
@end
@interface WIN32Server (w32_windowdisplay)
- (void) decodeWM_SHOWWINDOWParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_NCPAINTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_ERASEBKGNDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_PAINTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_SYNCPAINTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_CAPTURECHANGEDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (HICON) decodeWM_GETICONParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (HICON) decodeWM_SETICONParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
@end
@interface WIN32Server (w32_text_focus)
//- (LRESULT) decodeWM_SETTEXTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (LRESULT) decodeWM_SETFOCUSParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_KILLFOCUSParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_GETTEXTParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
@end
@interface WIN32Server (w32_General)
- (void) decodeWM_CLOSEParams: (WPARAM)wParam :(LPARAM)lParam :(HWND)hwnd;
- (void) decodeWM_DESTROYParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_NCDESTROYParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_QUERYOPENParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_SYSCOMMANDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
- (void) decodeWM_COMMANDParams: (WPARAM)wParam : (LPARAM)lParam : (HWND)hwnd;
@end
typedef struct _win_intern {
int32_t level;
#define OFF_LEVEL 0
int32_t orderedIn;
#define OFF_ORDERED sizeof(int32_t)
BOOL useHDC;
BOOL backingStoreEmpty;
HDC hdc;
HGDIOBJ old;
MINMAXINFO minmax;
} WIN_INTERN;
#endif /* _WIN32Server_h_INCLUDE */

View file

@ -0,0 +1,39 @@
/* WIN32Context - Implements graphic context for MSWindows
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32Context_h_INCLUDE
#define _WIN32Context_h_INCLUDE
#include "gsc/GSContext.h"
@interface WIN32Context : GSContext
{
@public
}
@end
#endif /* _WIN32Context_h_INCLUDE */

View file

@ -0,0 +1,37 @@
/* Win32FontEnumerator - Implements font enumerator for MSWindows
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32FontEnumerator_h_INCLUDE
#define _WIN32FontEnumerator_h_INCLUDE
#include "GNUstepGUI/GSFontInfo.h"
@interface WIN32FontEnumerator : GSFontEnumerator
{
}
@end
#endif/* _WIN32FontEnumerator_h_INCLUDE */

View file

@ -0,0 +1,48 @@
/* Win32FontInfo - Implements font enumerator for MSWindows
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32FontInfo_h_INCLUDE
#define _WIN32FontInfo_h_INCLUDE
#include "windows.h"
#include "GNUstepGUI/GSFontInfo.h"
@interface WIN32FontInfo : GSFontInfo
{
HFONT hFont;
}
- (void) draw: (const char*)s length: (int)len
onDC: (HDC)hdc at: (POINT)p;
- (void) drawGlyphs: (const NSGlyph*)s
length: (int)len
onDC: (HDC)hdc
at: (POINT)p;
@end
#endif/* _WIN32FontInfo_h_INCLUDE */

View file

@ -0,0 +1,62 @@
/* WIN32GState - Implements graphic state drawing for MSWindows
Copyright (C) 2002 Free Software Foundation, Inc.
Written by: Fred Kiefer <FredKiefer@gmx.de>
Date: March 2002
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _WIN32GState_h_INCLUDE
#define _WIN32GState_h_INCLUDE
#include "gsc/GSGState.h"
#include "windows.h"
@interface WIN32GState : GSGState
{
@public
HWND window;
COLORREF wfcolor;
COLORREF wscolor;
int joinStyle;
int lineCap;
float lineWidth;
float miterlimit;
HRGN clipRegion;
HGDIOBJ oldBrush;
HGDIOBJ oldPen;
HRGN oldClipRegion;
}
- (void) setWindow: (HWND)number;
- (HWND) window;
// declared to fix conflicting type with super class warning during compile
- (void) compositeGState: (WIN32GState *) source
fromRect: (NSRect) sourceRect
toPoint: (NSPoint) destPoint
op: (NSCompositingOperation) op
fraction: (float)delta;
@end
#endif /* _WIN32GState_h_INCLUDE */

112
trunk/Headers/x11/StdCmap.h Normal file
View file

@ -0,0 +1,112 @@
/* $XConsortium: StdCmap.h,v 1.4 94/04/17 20:16:15 converse Exp $ */
/*
Copyright (c) 1988 X Consortium
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
*/
/*
* The interfaces described by this header file are for miscellaneous utilities
* and are not part of the Xlib standard.
*/
#ifndef _XMU_STDCMAP_H_
#define _XMU_STDCMAP_H_
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
Status XmuAllStandardColormaps(
#if NeedFunctionPrototypes
Display* /* dpy */
#endif
);
Status XmuCreateColormap(
#if NeedFunctionPrototypes
Display* /* dpy */,
XStandardColormap* /* colormap */
#endif
);
void XmuDeleteStandardColormap(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
Atom /* property */
#endif
);
Status XmuGetColormapAllocation(
#if NeedFunctionPrototypes
XVisualInfo* /* vinfo */,
Atom /* property */,
unsigned long* /* red_max_return */,
unsigned long* /* green_max_return */,
unsigned long* /* blue_max_return */
#endif
);
Status XmuLookupStandardColormap(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
VisualID /* visualid */,
unsigned int /* depth */,
Atom /* property */,
Bool /* replace */,
Bool /* retain */
#endif
);
XStandardColormap *XmuStandardColormap(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
VisualID /* visualid */,
unsigned int /* depth */,
Atom /* property */,
Colormap /* cmap */,
unsigned long /* red_max */,
unsigned long /* green_max */,
unsigned long /* blue_max */
#endif
);
Status XmuVisualStandardColormaps(
#if NeedFunctionPrototypes
Display* /* dpy */,
int /* screen */,
VisualID /* visualid */,
unsigned int /* depth */,
Bool /* replace */,
Bool /* retain */
#endif
);
_XFUNCPROTOEND
#endif /* _XMU_STDCMAP_H_ */

View file

@ -0,0 +1,72 @@
/* -*- mode: ObjC -*-
<title>XGDragView</title>
<abstract>View that is dragged during drag and drop</abstract>
Copyright (C) 2001-2005 Free Software Foundation, Inc.
Written By: <author name="Wim Oudshoorn"><email>woudshoo@xs4all.nl</email></author>
Date: Nov 2001
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include <AppKit/NSCell.h>
#include <AppKit/NSEvent.h>
#include <GNUstepGUI/GSDragView.h>
#include <Foundation/NSGeometry.h>
#include "x11/xdnd.h"
#include "x11/XGServerWindow.h"
/*"
Drag and drop support functions
"*/
void GSEnsureDndIsInitialized (void);
DndClass xdnd (void);
Atom GSActionForDragOperation(unsigned int op);
NSDragOperation GSDragOperationForAction(Atom xaction);
/*"
WRO (notes made 18 Nov 2001)
The object that is dragged over the screen.
It hijacks the event loop and manages the complete
drag and drop sequence.
"*/
@interface XGDragView : GSDragView
{
Atom *typelist;
}
+ (id) sharedDragView;
- (void) setupDragInfoFromXEvent: (XEvent *)xEvent;
- (void) updateDragInfoFromEvent: (NSEvent *)event;
- (void) resetDragInfo;
- (void) dragImage: (NSImage*)anImage
at: (NSPoint)screenLocation
offset: (NSSize)initialOffset
event: (NSEvent*)event
pasteboard: (NSPasteboard*)pboard
source: (id)sourceObject
slideBack: (BOOL)slideFlag;
- (Window) _xWindowAcceptingDnDunderX: (int) x Y: (int) y;
@end

View file

@ -0,0 +1,143 @@
/* Generic header info common to X backends for GNUstep
Copyright (C) 2000 Free Software Foundation, Inc.
Written by: Richard Frith-Macdonald <rfm@gnu.org>
Date: Mar 2000
This file is part of the GNUstep project
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef INCLUDED_XGGENERIC_H
#define INCLUDED_XGGENERIC_H
/*
* Flags to indicate which protocols the WindowManager follows
*/
typedef enum {
XGWM_UNKNOWN = 0,
XGWM_WINDOWMAKER = 1,
XGWM_GNOME = 2,
XGWM_KDE = 4,
XGWM_EWMH = 8
} XGWMProtocols;
typedef struct {
Atom win_type_atom;
Atom win_desktop_atom;
Atom win_normal_atom;
Atom win_floating_atom;
Atom win_menu_atom;
Atom win_dock_atom;
Atom win_modal_atom;
Atom win_utility_atom;
Atom win_splash_atom;
Atom win_override_atom;
Atom win_topmenu_atom;
Atom win_popup_menu_atom;
Atom win_dropdown_menu_atom;
Atom win_tooltip_atom;
Atom win_notification_atom;
Atom win_combo_atom;
Atom win_dnd_atom;
} XGWMWinTypes;
typedef struct {
Atom net_wm_state_atom;
Atom net_wm_state_skip_taskbar_atom;
Atom net_wm_state_skip_pager_atom;
Atom net_wm_state_sticky_atom;
} XGWMNetStates;
/*
* Frame offsets for window inside parent decoration window.
*/
typedef struct {
short l; // offset from left
short r; // offset from right
short t; // offset from top
short b; // offset from bottom
BOOL known; // obtained from Reparent event or just guessed?
} Offsets;
/*
* Structure containing ivars that are common to all X backend contexts.
*/
struct XGGeneric {
int wm;
struct {
unsigned useWindowMakerIcons:1;
unsigned appOwnsMiniwindow:1;
unsigned doubleParentWindow:1;
} flags;
// Time of last X event
Time lastTime;
// Approximate local time for last X event, used to decide
// if the last X event time is still valid.
NSTimeInterval lastTimeStamp;
// last reference time on X server, used to prevent time drift between
// local machine and X server.
Time baseXServerTime;
Time lastClick;
Window lastClickWindow;
int lastClickX;
int lastClickY;
Time lastMotion;
Atom protocols_atom;
Atom delete_win_atom;
Atom take_focus_atom;
Atom net_wm_ping_atom;
Atom miniaturize_atom;
Atom win_decor_atom;
Atom titlebar_state_atom;
char *rootName;
long currentFocusWindow;
long desiredFocusWindow;
unsigned long focusRequestNumber;
unsigned char lMouse;
unsigned char mMouse;
unsigned char rMouse;
unsigned char upMouse;
unsigned char downMouse;
int lMouseMask;
int mMouseMask;
int rMouseMask;
Window appRootWindow;
void *cachedWindow; // last gswindow_device_t used.
Offsets offsets[16];
XGWMWinTypes wintypes;
XGWMNetStates netstates;
};
/* GNOME Window layers */
#define WIN_LAYER_DESKTOP 0
#define WIN_LAYER_BELOW 2
#define WIN_LAYER_NORMAL 4
#define WIN_LAYER_ONTOP 6
#define WIN_LAYER_DOCK 8
#define WIN_LAYER_ABOVE_DOCK 10
#define WIN_LAYER_MENU 12
/* NET WM State */
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
#endif

View file

@ -0,0 +1,81 @@
/* XGInputServer - Keyboard input handling
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: January 2002
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_XGInputServer
#define _GNUstep_H_XGInputServer
#include <AppKit/NSInputServer.h>
#include <x11/XGServerWindow.h>
@protocol XInputFiltering
- (BOOL) filterEvent: (XEvent *)event;
- (NSString *) lookupStringForEvent: (XKeyEvent *)event
window: (gswindow_device_t *)window
keysym: (KeySym *)keysymptr;
@end
@interface XIMInputServer: NSInputServer <XInputFiltering>
{
id delegate;
NSString *server_name;
XIM xim;
XIMStyle xim_style;
NSMutableData *dbuf;
NSStringEncoding encoding;
/* Track the XIC:s and destroy them explicitly to work around an XFree86
bug:
http://www.xfree86.org/pipermail/xpert/2002-June/018370.html
*/
XIC *xics;
int num_xics;
}
- (id) initWithDelegate: (id)aDelegate
display: (Display *)dpy
name: (NSString *)name;
- (void) ximFocusICWindow: (gswindow_device_t *)windev;
- (void) ximCloseIC: (XIC)xic;
@end
// Public interface for the input methods
@interface XIMInputServer (InputMethod)
- (NSString *) inputMethodStyle;
- (NSString *) fontSize: (int *)size;
- (BOOL) clientWindowRect: (NSRect *)rect;
- (BOOL) statusArea: (NSRect *)rect;
- (BOOL) preeditArea: (NSRect *)rect;
- (BOOL) preeditSpot: (NSPoint *)p;
- (BOOL) setStatusArea: (NSRect *)rect;
- (BOOL) setPreeditArea: (NSRect *)rect;
- (BOOL) setPreeditSpot: (NSPoint *)p;
@end // XIMInputServer (InputMethod)
#endif

View file

@ -0,0 +1,86 @@
/* -*-ObjC-*- */
/* XGOpenGL - openGL management using glX
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Frederic De Jaeger
Date: Nov 2002
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_XGOpenGL
#define _GNUstep_H_XGOpenGL
#include <AppKit/NSOpenGL.h>
#define id _gs_avoid_id_collision
#define BOOL XWINDOWSBOOL
#include <GL/glx.h>
#undef id
#undef BOOL
@class NSView;
@class XGXSubWindow;
@class XGGLPixelFormat;
@interface XGGLContext : NSOpenGLContext
{
GLXContext glx_context;
GLXWindow glx_drawable;
XGXSubWindow *xSubWindow;
XGGLPixelFormat *pixelFormat;
}
- (GLXContext)glxcontext;
@end
@interface XGGLPixelFormat : NSOpenGLPixelFormat
{
@public
union
{
GLXFBConfig *fbconfig;
XVisualInfo *visualinfo;
} configurations;
int configurationCount;
}
- (XVisualInfo *)xvinfo;
- (GLXContext)createGLXContext: (XGGLContext *)share;
- (GLXWindow) drawableForWindow: (Window)xwindowid;
@end
static inline int
GSglxMinorVersion(Display *dpy)
{
int major, minor;
if (False == glXQueryVersion(dpy, &major, &minor))
{
return -1;
}
return minor;
}
#endif

View file

@ -0,0 +1,108 @@
/* <title>XGServer</title>
<abstract>Backend server using the X11.</abstract>
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Mar 2002
This file is part of the GNUstep Backend.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _XGServer_h_INCLUDE
#define _XGServer_h_INCLUDE
#include <GNUstepGUI/GSDisplayServer.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "x11/XGGeneric.h"
/*
* Enumerated type to say how we should draw pixels to the X display - used
* to select different drawing mechanisms to try to optimise.
*/
typedef enum {
XGDM_FAST15,
XGDM_FAST16,
XGDM_FAST32,
XGDM_FAST32_BGR,
XGDM_FAST8,
XGDM_PORTABLE
} XGDrawMechanism;
@interface XGServer : GSDisplayServer
{
Display *dpy;
int defScreen;
NSMapTable *screenList;
Window grabWindow;
struct XGGeneric generic;
id inputServer;
}
+ (Display*) currentXDisplay;
- (Display*) xDisplay;
- (Window) xAppRootWindow;
- (void *) xrContextForScreen: (int)screen_number;
- (XGDrawMechanism) drawMechanismForScreen: (int)screen_number;
- (Window) xDisplayRootWindowForScreen: (int)screen_number;
- (XColor) xColorFromColor: (XColor)color forScreen: (int)screen_number;
+ (void) waitAllContexts;
@end
/*
* Synchronize with X event queue - soak up events.
* Waits for up to 1 second for event.
*/
@interface XGServer (XSync)
- (BOOL) xSyncMap: (void*)window;
@end
@interface XGServer (XGGeneric)
- (NSRect) _OSFrameToXFrame: (NSRect)o for: (void*)window;
- (NSRect) _OSFrameToXHints: (NSRect)o for: (void*)window;
- (NSRect) _XFrameToOSFrame: (NSRect)x for: (void*)window;
- (NSRect) _XFrameToXHints: (NSRect)o for: (void*)window;
@end
// Public interface for the input methods.
@interface XGServer (InputMethod)
- (NSString *) inputMethodStyle;
- (NSString *) fontSize: (int *)size;
- (BOOL) clientWindowRect: (NSRect *)rect;
- (BOOL) statusArea: (NSRect *)rect;
- (BOOL) preeditArea: (NSRect *)rect;
- (BOOL) preeditSpot: (NSPoint *)p;
- (BOOL) setStatusArea: (NSRect *)rect;
- (BOOL) setPreeditArea: (NSRect *)rect;
- (BOOL) setPreeditSpot: (NSPoint *)p;
@end
@interface XGServer (TimeKeeping)
- (void) setLastTime: (Time)last;
- (Time) lastTime;
@end
#endif /* _XGServer_h_INCLUDE */

View file

@ -0,0 +1,137 @@
/* Window ops for X11 server
Copyright (C) 1999 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@gnu.org>
Date: Nov 1999
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _XGServerWindow_h_INCLUDE
#define _XGServerWindow_h_INCLUDE
#define BOOL XWINDOWSBOOL // prevent X windows BOOL
#include <X11/Xmd.h> // warning
#undef BOOL
#include <x11/XGServer.h>
/*
* WindowMaker window manager interaction
*
* NB. Despite the fact that all the fields in this table are notionally
* 32bit values (WindowMaker defines them as CARD32 and Pixmap types and
* the X protocol spec says Pixmap is 32bits) they actually all have to be
* long values (64bits on a 64bit processor). This is because of a bug in
* X-windows property functions, such that they assume that where property
* data is specified as 32bit it is actually a long.
* The X headers automatically adjust the size of a Pixmap to be that of
* a long, so we can declare Pixmap fields to be that size, but we must
* explicitly use 'unsigned long' rather than CARD32 foir the others.
*/
typedef struct {
unsigned long flags;
unsigned long window_style;
unsigned long window_level;
unsigned long reserved;
Pixmap miniaturize_pixmap; // pixmap for miniaturize button
Pixmap close_pixmap; // pixmap for close button
Pixmap miniaturize_mask; // miniaturize pixmap mask
Pixmap close_mask; // close pixmap mask
unsigned long extra_flags;
} GNUstepWMAttributes;
#define GSWindowStyleAttr (1<<0)
#define GSWindowLevelAttr (1<<1)
#define GSMiniaturizePixmapAttr (1<<3)
#define GSClosePixmapAttr (1<<4)
#define GSMiniaturizeMaskAttr (1<<5)
#define GSCloseMaskAttr (1<<6)
#define GSExtraFlagsAttr (1<<7)
#define GSDocumentEditedFlag (1<<0)
#define GSWindowWillResizeNotificationsFlag (1<<1)
#define GSWindowWillMoveNotificationsFlag (1<<2)
#define GSNoApplicationIconFlag (1<<5)
#define WMFHideOtherApplications 10
#define WMFHideApplication 12
/* Graphics Driver protocol. Setup in [NSGraphicsContext-contextDevice:] */
enum {
GDriverHandlesBacking = 1,
GDriverHandlesExpose = 2
};
typedef struct _gswindow_device_t {
Display *display; /* Display this window is on */
Window ident; /* Window handle */
Window root; /* Handle of root window */
Window parent; /* Handle of parent window */
int screen; /* Screeen this window is on */
GC gc; /* GC for drawing */
long number; /* Globally unique identifier */
unsigned int depth; /* Window depth */
unsigned int border; /* Border size */
int map_state; /* X map state */
int visibility; /* X visibility */
NSBackingStoreType type; /* Backing type */
NSRect xframe; /* Window frame */
unsigned int buffer_width; /* Size in pixels of the current buffers. */
unsigned int buffer_height;
Drawable buffer; /* Backing store pixmap */
Drawable alpha_buffer; /* Alpha buffer. Managed by gdriver
will be freed if HandlesBacking=0 */
BOOL is_exposed;
NSMutableArray *exposedRects; /* List of exposure event rects */
Region region; /* Used between several expose events */
XWMHints gen_hints;
XSizeHints siz_hints;
GNUstepWMAttributes win_attrs;
XSetWindowAttributes xwn_attrs;
int xoff;
int yoff;
int boff;
Atom protocols[4];
int numProtocols;
XIC ic;
void *gdriver; /* gdriver ident. Managed by gdriver */
int gdriverProtocol; /* Managed by gdriver */
BOOL ignore_take_focus;
} gswindow_device_t;
#define GET_XDRAWABLE(win) ((win)->buffer ? (win)->buffer: (win)->ident)
@interface XGServer (DPSWindow)
+ (gswindow_device_t *) _windowForXWindow: (Window)xWindow;
+ (gswindow_device_t *) _windowForXParent: (Window)xWindow;
+ (gswindow_device_t *) _windowWithTag: (int)windowNumber;
- (void) _addExposedRectangle: (XRectangle)rectangle : (int)win;
- (void) _processExposedRectangles: (int)win;
- (void) _initializeCursorForXWindow: (Window) win;
- (void) _destroyServerWindows;
/* This needs to go in GSDisplayServer */
- (void) _DPSsetcursor: (Cursor)c : (BOOL)set;
@end
extern Pixmap
xgps_cursor_mask(Display *xdpy, Drawable draw, const unsigned char *data,
int w, int h, int colors);
#endif

View file

@ -0,0 +1,142 @@
/*
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
Author: Alexander Malmberg <alexander@malmberg.org>
This file is part of GNUstep.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef XWindowBuffer_h
#define XWindowBuffer_h
#include <X11/extensions/XShm.h>
struct XWindowBuffer_depth_info_s
{
/* The drawing depth according to X. Usually the number of bits of color
data in each pixel. */
int drawing_depth;
/* The number of bytes used by a pixel. There is generally no
relationship between this and drawing_depth, except that
bytes_per_pixel*8>=drawing_depth. (Eg. 32-bit modes usually have a
drawing depth of 24.) */
int bytes_per_pixel;
/* If alpha is to be stored inside the normal data, this should be YES.
Otherwise, a separate buffer will be allocated for the alpha data (which
never does any harm, but it wastes memory if there's enough space in a
pixel, as in 32-bit modes. There needs to be 8 bits available for alpha
data at a byte boundary for this to work, though. (This could be fixed,
but in the mean time, just setting inline_alpha to NO is easier.)
inline_alpha_ofs should be the offset to the byte in each pixel that
holds the alpha value. */
BOOL inline_alpha;
int inline_alpha_ofs;
};
/*
XWindowBuffer maintains an XImage for a window. Each ARTGState that
renders to that window uses the same XWindowBuffer (and thus the same
buffer, etc.).
Many states might render to the same window, so we need to make sure
that there's only one XWindowBuffer for each window. */
@interface XWindowBuffer : NSObject
{
@public
gswindow_device_t *window;
@private
GC gc;
Drawable drawable;
XImage *ximage;
Display *display;
Pixmap pixmap;
int use_shm;
XShmSegmentInfo shminfo;
struct XWindowBuffer_depth_info_s DI;
/* While a XShmPutImage is in progress we don't try to call it
again. The pending updates are stored here, and when we get the
ShmCompletion event, we handle them. */
int pending_put; /* There are pending updates */
struct
{
int x, y, w, h;
} pending_rect; /* in this rectangle. */
int pending_event; /* We're waiting for the ShmCompletion event. */
/* This is for the ugly shape-hack */
unsigned char *old_shape;
int old_shape_size;
@public
unsigned char *data;
int sx, sy;
int bytes_per_line, bits_per_pixel, bytes_per_pixel;
/* If has_alpha is 1 and alpha is NULL, the alpha is stored in data
somehow. The drawing mechanism code should know how to deal with
it. A separate alpha buffer will always be exactly the right size,
so each row is sx bytes long.
If has_alpha is 0, the window is assumed to be completely opaque.
*/
unsigned char *alpha;
int has_alpha;
}
/*
Returns a _retained_ XWindowBuffer for the specified gswindow_device_t.
The depth info is only used if a new XWindowBuffer needs to be allocated.
*/
+ windowBufferForWindow: (gswindow_device_t *)awindow
depthInfo: (struct XWindowBuffer_depth_info_s *)aDI;
/*
Note that alpha is _not_ guaranteed to exist after this has been called;
you still need to check has_alpha. If the call fails, a message will be
logged.
(In ARTGState, I handle failures by simply ignoring the operation that
required alpha.)
The alpha channel is initialized to being completely opaque when first
created.
*/
-(void) needsAlpha;
-(void) _gotShmCompletion;
-(void) _exposeRect: (NSRect)r;
+(void) _gotShmCompletion: (Drawable)d;
@end
#endif

477
trunk/Headers/x11/wraster.h Normal file
View file

@ -0,0 +1,477 @@
/*
* Raster graphics library
*
* Copyright (c) 1997-2002 Alfredo K. Kojima
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* Environment variables:
*
* WRASTER_GAMMA <rgamma>/<ggamma>/<bgamma>
* gamma correction value. Must be greater than 0
* Only for PseudoColor visuals.
*
* Default:
* WRASTER_GAMMA 1/1/1
*
*
* If you want a specific value for a screen, append the screen number
* preceded by a hash to the variable name as in
* WRASTER_GAMMA#1
* for screen number 1
*/
#ifndef RLRASTER_H_
#define RLRASTER_H_
/* version of the header for the library: 0.21 */
#define WRASTER_HEADER_VERSION 21
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef XSHM
#include <X11/extensions/XShm.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* RBestMatchRendering or RDitheredRendering */
#define RC_RenderMode (1<<0)
/* number of colors per channel for colormap in PseudoColor mode */
#define RC_ColorsPerChannel (1<<1)
/* do gamma correction */
#define RC_GammaCorrection (1<<2)
/* visual id to use */
#define RC_VisualID (1<<3)
/* shared memory usage */
#define RC_UseSharedMemory (1<<4)
/* use default instead of best visual */
#define RC_DefaultVisual (1<<5)
/* filter type for smoothed scaling */
#define RC_ScalingFilter (1<<6)
/* standard colormap usage */
#define RC_StandardColormap (1<<7)
/* std colormap usage/creation modes */
enum {
RUseStdColormap, /* default. fallbacks to RIgnore.. if
there is none defined */
RCreateStdColormap,
RIgnoreStdColormap
};
typedef struct RContextAttributes {
int flags;
int render_mode;
int colors_per_channel; /* for PseudoColor */
float rgamma; /* gamma correction for red, */
float ggamma; /* green, */
float bgamma; /* and blue */
VisualID visualid; /* visual ID to use */
int use_shared_memory; /* True of False */
int scaling_filter;
int standard_colormap_mode; /* what to do with std cma */
} RContextAttributes;
/*
* describes a screen in terms of depth, visual, number of colors
* we can use, if we should do dithering, and what colors to use for
* dithering.
*/
typedef struct RContext {
Display *dpy;
int screen_number;
Colormap cmap;
RContextAttributes *attribs;
GC copy_gc;
Visual *visual;
int depth;
Window drawable; /* window to pass for XCreatePixmap().*/
/* generally = root */
int vclass;
unsigned long black;
unsigned long white;
int red_offset; /* only used in 24bpp */
int green_offset;
int blue_offset;
/* only used for pseudocolor and grayscale */
XStandardColormap *std_rgb_map; /* standard RGB colormap */
XStandardColormap *std_gray_map; /* standard grayscale colormap */
int ncolors; /* total number of colors we can use */
XColor *colors; /* internal colormap */
unsigned long *pixels; /* RContext->colors[].pixel */
struct {
unsigned int use_shared_pixmap:1;
unsigned int optimize_for_speed:1;
} flags;
struct RHermesData *hermes_data; /* handle for Hermes stuff */
} RContext;
typedef struct RColor {
unsigned char red;
unsigned char green;
unsigned char blue;
unsigned char alpha;
} RColor;
typedef struct RHSVColor {
unsigned short hue; /* 0-359 */
unsigned char saturation; /* 0-255 */
unsigned char value; /* 0-255 */
} RHSVColor;
typedef struct RPoint {
int x, y;
} RPoint;
typedef struct RSegment {
int x1, y1, x2, y2;
} RSegment;
/* image formats */
enum RImageFormat {
RRGBFormat,
RRGBAFormat
};
/*
* internal 24bit+alpha image representation
*/
typedef struct RImage {
unsigned char *data; /* image data RGBA or RGB */
int width, height; /* size of the image */
enum RImageFormat format;
RColor background; /* background color */
int refCount;
} RImage;
/*
* internal wrapper for XImage. Used for shm abstraction
*/
typedef struct RXImage {
XImage *image;
/* Private data. Do not access */
#ifdef XSHM
XShmSegmentInfo info;
char is_shared;
#endif
} RXImage;
/* image display modes */
enum {
RDitheredRendering = 0,
RBestMatchRendering = 1
};
/* smoothed scaling filter types */
enum {
RBoxFilter,
RTriangleFilter,
RBellFilter,
RBSplineFilter,
RLanczos3Filter,
RMitchellFilter
};
/* note that not all operations are supported in all functions */
enum {
RClearOperation, /* clear with 0 */
RCopyOperation,
RNormalOperation, /* same as combine */
RAddOperation,
RSubtractOperation
};
enum {
RAbsoluteCoordinates = 0,
RRelativeCoordinates = 1
};
enum {
RSunkenBevel = -1,
RNoBevel = 0,
RRaisedBevel = 1
};
/* bw compat */
#define RBEV_SUNKEN RSunkenBevel
/* 1 pixel wide */
#define RBEV_RAISED RRaisedBevel
/* 1 pixel wide on top/left 2 on bottom/right */
#define RBEV_RAISED2 2
/* 2 pixel width */
#define RBEV_RAISED3 3
enum {
RHorizontalGradient = 2,
RVerticalGradient = 3,
RDiagonalGradient = 4
};
/* for backwards compatibility */
#define RGRD_HORIZONTAL RHorizontalGradient
#define RGRD_VERTICAL RVerticalGradient
#define RGRD_DIAGONAL RDiagonalGradient
/* error codes */
#define RERR_NONE 0
#define RERR_OPEN 1 /* cant open file */
#define RERR_READ 2 /* error reading from file */
#define RERR_WRITE 3 /* error writing to file */
#define RERR_NOMEMORY 4 /* out of memory */
#define RERR_NOCOLOR 5 /* out of color cells */
#define RERR_BADIMAGEFILE 6 /* image file is corrupted or invalid */
#define RERR_BADFORMAT 7 /* image file format is unknown */
#define RERR_BADINDEX 8 /* no such image index in file */
#define RERR_BADVISUALID 16 /* invalid visual ID requested for context */
#define RERR_STDCMAPFAIL 17 /* failed to created std colormap */
#define RERR_XERROR 127 /* internal X error */
#define RERR_INTERNAL 128 /* should not happen */
/*
* Returns a NULL terminated array of strings containing the
* supported formats, such as: TIFF, XPM, PNG, JPEG, PPM, GIF
* Do not free the returned data.
*/
char **RSupportedFileFormats(void);
char *RGetImageFileFormat(char *file);
/*
* Xlib contexts
*/
RContext *RCreateContext(Display *dpy, int screen_number,
RContextAttributes *attribs);
void RDestroyContext(RContext *context);
Bool RGetClosestXColor(RContext *context, RColor *color, XColor *retColor);
/*
* RImage creation
*/
RImage *RCreateImage(unsigned width, unsigned height, int alpha);
RImage *RCreateImageFromXImage(RContext *context, XImage *image, XImage *mask);
RImage *RCreateImageFromDrawable(RContext *context, Drawable drawable,
Pixmap mask);
RImage *RLoadImage(RContext *context, char *file, int index);
RImage* RRetainImage(RImage *image);
void RReleaseImage(RImage *image);
/* Obsoleted function. Use RReleaseImage() instead. This was kept only to
* allow a smoother transition and to avoid breaking existing programs, but
* it will be removed in a future release. Right now is just an alias to
* RReleaseImage(). Do _NOT_ use RDestroyImage() anymore in your programs.
* Being an alias to RReleaseImage() this function no longer actually
* destroys the image, unless the image is no longer retained in some other
* place.
*/
void RDestroyImage(RImage *image);
RImage *RGetImageFromXPMData(RContext *context, char **xpmData);
/*
* RImage storing
*/
Bool RSaveImage(RImage *image, char *filename, char *format);
/*
* Area manipulation
*/
RImage *RCloneImage(RImage *image);
RImage *RGetSubImage(RImage *image, int x, int y, unsigned width,
unsigned height);
void RCombineImageWithColor(RImage *image, RColor *color);
void RCombineImages(RImage *image, RImage *src);
void RCombineArea(RImage *image, RImage *src, int sx, int sy, unsigned width,
unsigned height, int dx, int dy);
void RCombineImagesWithOpaqueness(RImage *image, RImage *src, int opaqueness);
void RCombineAreaWithOpaqueness(RImage *image, RImage *src, int sx, int sy,
unsigned width, unsigned height, int dx, int dy,
int opaqueness);
RImage *RScaleImage(RImage *image, unsigned new_width, unsigned new_height);
RImage *RSmoothScaleImage(RImage *src, unsigned new_width,
unsigned new_height);
RImage *RRotateImage(RImage *image, float angle);
RImage *RMakeTiledImage(RImage *tile, unsigned width, unsigned height);
RImage* RMakeCenteredImage(RImage *image, unsigned width, unsigned height,
RColor *color);
/*
* Drawing
*/
Bool RGetPixel(RImage *image, int x, int y, RColor *color);
void RPutPixel(RImage *image, int x, int y, RColor *color);
void ROperatePixel(RImage *image, int operation, int x, int y, RColor *color);
void RPutPixels(RImage *image, RPoint *points, int npoints, int mode,
RColor *color);
void ROperatePixels(RImage *image, int operation, RPoint *points,
int npoints, int mode, RColor *color);
int RDrawLine(RImage *image, int x0, int y0, int x1, int y1, RColor *color);
int ROperateLine(RImage *image, int operation, int x0, int y0, int x1, int y1,
RColor *color);
void RDrawLines(RImage *image, RPoint *points, int npoints, int mode,
RColor *color);
void ROperateLines(RImage *image, int operation, RPoint *points, int npoints,
int mode, RColor *color);
void RDrawSegments(RImage *image, RSegment *segs, int nsegs, RColor *color);
void ROperateSegments(RImage *image, int operation, RSegment *segs, int nsegs,
RColor *color);
/*
* Color convertion
*/
void RRGBtoHSV(RColor *color, RHSVColor *hsv);
void RHSVtoRGB(RHSVColor *hsv, RColor *rgb);
/*
* Painting
*/
void RClearImage(RImage *image, RColor *color);
void RFillImage(RImage *image, RColor *color);
void RBevelImage(RImage *image, int bevel_type);
RImage *RRenderGradient(unsigned width, unsigned height, RColor *from,
RColor *to, int style);
RImage *RRenderMultiGradient(unsigned width, unsigned height, RColor **colors,
int style);
RImage *RRenderInterwovenGradient(unsigned width, unsigned height,
RColor colors1[2], int thickness1,
RColor colors2[2], int thickness2);
/*
* Convertion into X Pixmaps
*/
int RConvertImage(RContext *context, RImage *image, Pixmap *pixmap);
int RConvertImageMask(RContext *context, RImage *image, Pixmap *pixmap,
Pixmap *mask, int threshold);
/*
* misc. utilities
*/
RXImage *RCreateXImage(RContext *context, int depth,
unsigned width, unsigned height);
RXImage *RGetXImage(RContext *context, Drawable d, int x, int y,
unsigned width, unsigned height);
void RDestroyXImage(RContext *context, RXImage *ximage);
void RPutXImage(RContext *context, Drawable d, GC gc, RXImage *ximage,
int src_x, int src_y, int dest_x, int dest_y,
unsigned width, unsigned height);
/* do not free the returned string! */
const char *RMessageForError(int errorCode);
int RBlurImage(RImage *image);
/****** Global Variables *******/
extern int RErrorCode;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

135
trunk/Headers/x11/xdnd.h Normal file
View file

@ -0,0 +1,135 @@
/*
xdnd.c, xdnd.h - C program library for handling the Xdnd protocol
Copyright (C) 1998 Paul Sheer
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
Further info can also be obtained by emailing the author at,
psheer@obsidian.co.za
*/
#ifndef _X_DND_H
#define _X_DND_H
#define XDND_VERSION 2
/* XdndEnter */
#define XDND_THREE 3
#define XDND_ENTER_SOURCE_WIN(e) ((e)->xclient.data.l[0])
#define XDND_ENTER_THREE_TYPES(e) (((e)->xclient.data.l[1] & 0x1UL) == 0)
#define XDND_ENTER_THREE_TYPES_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
#define XDND_ENTER_VERSION(e) ((e)->xclient.data.l[1] >> 24)
#define XDND_ENTER_VERSION_SET(e,v) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~(0xFF << 24)) | ((v) << 24)
#define XDND_ENTER_TYPE(e,i) ((e)->xclient.data.l[2 + i]) /* i => (0, 1, 2) */
/* XdndPosition */
#define XDND_POSITION_SOURCE_WIN(e) ((e)->xclient.data.l[0])
#define XDND_POSITION_ROOT_X(e) ((e)->xclient.data.l[2] >> 16)
#define XDND_POSITION_ROOT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFUL)
#define XDND_POSITION_ROOT_SET(e,x,y) (e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL)
#define XDND_POSITION_TIME(e) ((e)->xclient.data.l[3])
#define XDND_POSITION_ACTION(e) ((e)->xclient.data.l[4])
/* XdndStatus */
#define XDND_STATUS_TARGET_WIN(e) ((e)->xclient.data.l[0])
#define XDND_STATUS_WILL_ACCEPT(e) ((e)->xclient.data.l[1] & 0x1L)
#define XDND_STATUS_WILL_ACCEPT_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x1UL) | (((b) == 0) ? 0 : 0x1UL)
#define XDND_STATUS_WANT_POSITION(e) ((e)->xclient.data.l[1] & 0x2UL)
#define XDND_STATUS_WANT_POSITION_SET(e,b) (e)->xclient.data.l[1] = ((e)->xclient.data.l[1] & ~0x2UL) | (((b) == 0) ? 0 : 0x2UL)
#define XDND_STATUS_RECT_X(e) ((e)->xclient.data.l[2] >> 16)
#define XDND_STATUS_RECT_Y(e) ((e)->xclient.data.l[2] & 0xFFFFL)
#define XDND_STATUS_RECT_WIDTH(e) ((e)->xclient.data.l[3] >> 16)
#define XDND_STATUS_RECT_HEIGHT(e) ((e)->xclient.data.l[3] & 0xFFFFL)
#define XDND_STATUS_RECT_SET(e,x,y,w,h) {(e)->xclient.data.l[2] = ((x) << 16) | ((y) & 0xFFFFUL); (e)->xclient.data.l[3] = ((w) << 16) | ((h) & 0xFFFFUL); }
#define XDND_STATUS_ACTION(e) ((e)->xclient.data.l[4])
/* XdndLeave */
#define XDND_LEAVE_SOURCE_WIN(e) ((e)->xclient.data.l[0])
/* XdndDrop */
#define XDND_DROP_SOURCE_WIN(e) ((e)->xclient.data.l[0])
#define XDND_DROP_TIME(e) ((e)->xclient.data.l[2])
/* XdndFinished */
#define XDND_FINISHED_TARGET_WIN(e) ((e)->xclient.data.l[0])
typedef struct _DndClass DndClass;
struct _DndClass {
Display *display;
Atom XdndAware;
Atom XdndSelection;
Atom XdndEnter;
Atom XdndLeave;
Atom XdndPosition;
Atom XdndDrop;
Atom XdndFinished;
Atom XdndStatus;
Atom XdndActionCopy;
Atom XdndActionMove;
Atom XdndActionLink;
Atom XdndActionAsk;
Atom XdndActionPrivate;
Atom XdndTypeList;
Atom XdndActionList;
Atom XdndActionDescription;
Atom Xdnd_NON_PROTOCOL_ATOM;
Atom version;
Window root_window;
#define XDND_DROP_STAGE_IDLE 0
#define XDND_DRAG_STAGE_DRAGGING 1
#define XDND_DRAG_STAGE_ENTERED 2
#define XDND_DROP_STAGE_CONVERTING 3
#define XDND_DROP_STAGE_ENTERED 4
int stage;
int dragging_version;
int internal_drag;
int want_position;
int ready_to_drop;
int will_accept;
XRectangle rectangle;
Window dropper_window, dragger_window;
Atom *dragger_typelist;
Atom desired_type;
Atom supported_action;
Time time;
/* drop position from last XdndPosition */
int x, y;
/* block for only this many seconds on not receiving a XdndFinished from target, default : 10 */
int time_out;
};
void xdnd_init (DndClass * dnd, Display * display);
void xdnd_set_dnd_aware (DndClass * dnd, Window window, Atom * typelist);
int xdnd_is_dnd_aware (DndClass * dnd, Window window, int *version, Atom * typelist);
void xdnd_set_type_list (DndClass * dnd, Window window, Atom * typelist);
void xdnd_get_type_list (DndClass * dnd, Window window, Atom ** typelist);
void xdnd_send_enter (DndClass * dnd, Window window, Window from, Atom * typelist);
void xdnd_send_position (DndClass * dnd, Window window, Window from, Atom action, int x, int y, unsigned long etime);
void xdnd_send_status (DndClass * dnd, Window window, Window from, int will_accept,
int want_position, int x, int y, int w, int h, Atom action);
void xdnd_send_leave (DndClass * dnd, Window window, Window from);
void xdnd_send_drop (DndClass * dnd, Window window, Window from, unsigned long etime);
void xdnd_send_finished (DndClass * dnd, Window window, Window from, int error);
int xdnd_convert_selection (DndClass * dnd, Window window, Window requester, Atom type);
int xdnd_set_selection_owner (DndClass * dnd, Window window, Atom type);
void xdnd_selection_send (DndClass * dnd, XSelectionRequestEvent * request, unsigned char *data, int length);
#endif /* !_X_DND_H */

View file

@ -0,0 +1,137 @@
/*
NSDPSContext.h
Encapsulation of Display Postscript contexts
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Scott Christley <scottc@net-community.com>
Date: 1996
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _GNUstep_H_NSDPSContext
#define _GNUstep_H_NSDPSContext
/* Define this to avoid including redefinitions of ps functions introduced
by NSGraphicsContext */
#define _PSOperators_h_INCLUDE
#define BOOL XWINDOWSBOOL // prevent X windows BOOL
#include <X11/Xmd.h> // warning
#undef BOOL
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <DPS/dpsclient.h>
#include <DPS/psops.h>
#include <Foundation/NSObject.h>
#include <AppKit/AppKit.h>
#include <AppKit/NSGraphicsContext.h>
#include <stdarg.h>
typedef enum {
ALPHAIMAGE_EXT = 1,
COMPOSITE_EXT = 2,
COMPOSITERECT_EXT = 4,
DISSOLVE_EXT = 8,
READIMAGE_EXT = 16,
SETALPHA_EXT = 32,
FLUSHPAGE_EXT = 64
} op_extensions_t;
@class NSData;
@class NSMutableData;
@class NSAffineTransform;
@class GSDisplayServer;
//
// NSDPSContext class interface
//
@interface NSDPSContext : NSGraphicsContext
{
DPSContext dps_context;
BOOL is_screen_context;
DPSErrorProc error_proc;
DPSTextProc text_proc;
NSDPSContext *chained_parent;
NSDPSContext *chained_child;
BOOL is_output_traced;
BOOL is_synchronized;
float ctm[6], invctm[6];
int dps_revision;
op_extensions_t ext_flags;
NSDPSContext *next_context;
GSDisplayServer *server;
@public
void *context;
}
- (void)wait;
//
// Managing Returned Text and Errors
//
+ (NSString *)stringForDPSError:(const DPSBinObjSeqRec *)error;
- (DPSErrorProc)errorProc;
- (void)setErrorProc:(DPSErrorProc)proc;
- (void)setTextProc:(DPSTextProc)proc;
- (DPSTextProc)textProc;
//
// Managing Chained Contexts
//
- (void)chainChildContext:(NSDPSContext *)child;
- (NSDPSContext *)childContext;
- (NSDPSContext *)parentContext;
- (void)unchainContext;
//
// Debugging Aids
//
+ (BOOL)areAllContextsOutputTraced;
+ (BOOL)areAllContextsSynchronized;
+ (void)setAllContextsOutputTraced:(BOOL)flag;
+ (void)setAllContextsSynchronized:(BOOL)flag;
- (BOOL)isOutputTraced;
- (BOOL)isSynchronized;
- (void)setOutputTraced:(BOOL)flag;
- (void)setSynchronized:(BOOL)flag;
@end
@interface NSDPSContext (GNUstepXDPS)
- (Display *)xDisplay;
- (DPSContext)xDPSContext;
- (void *)xrContext;
- (NSPoint) userPointFromXPoint: (NSPoint)xPoint;
- (NSPoint) XPointFromUserPoint: (NSPoint)userPoint;
- (NSRect) userRectFromXRect: (NSRect)xrect;
- (NSRect) XRectFromUserRect: (NSRect)urect;
- (op_extensions_t) operatorExtensions;
@end
#endif /* _GNUstep_H_NSDPSContext */

View file

@ -0,0 +1,57 @@
/*
GSXftFontInfo
NSFont helper for GNUstep GUI X/GPS Backend
Copyright (C) 1996 Free Software Foundation, Inc.
Author: Fred Kiefer <fredkiefer@gmx.de>
Date: July 2001
This file is part of the GNUstep GUI X/GPS Backend.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
// Include this before we include any objC defines, otherwise id is defined
#include <X11/Xlib.h>
#define id xwindowsid
#include <X11/Xft/Xft.h>
#undef id
#include <GNUstepGUI/GSFontInfo.h>
@interface FcFontEnumerator : GSFontEnumerator
{
}
@end
@interface GSXftFontInfo : GSFontInfo
{
XftFont *font_info;
}
- (void) drawString: (NSString*)string
onDisplay: (Display*) xdpy drawable: (Drawable) draw
with: (GC) xgcntxt at: (XPoint) xp;
- (void) draw: (const char*) s length: (int) len
onDisplay: (Display*) xdpy drawable: (Drawable) draw
with: (GC) xgcntxt at: (XPoint) xp;
- (float) widthOf: (const char*) s length: (int) len;
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt;
@end

View file

@ -0,0 +1,39 @@
/* <title>XGContext</title>
<abstract>Backend drawing context using the Xlib library.</abstract>
Copyright (C) 1995 Free Software Foundation, Inc.
Written By: Adam Fedor <fedor@gnu.org>
Date: Nov 1998
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _XGContext_h_INCLUDE
#define _XGContext_h_INCLUDE
#include "gsc/GSContext.h"
@interface XGContext : GSContext
{
}
@end
#endif /* _XGContext_h_INCLUDE */

View file

@ -0,0 +1,83 @@
/* <title>XGFontSetFontInfo</title>
<abstract>NSFont helper for GNUstep X/GPS Backend</abstract>
Copyright (C) 2003-2005 Free Software Foundation, Inc.
Author: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com>
Date: July 2003
This file is part of the GNU Objective C User Interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __XGFontSetFontInfo_h
#define __XGFontSetFontInfo_h
#include <X11/Xlib.h>
#include <GNUstepGUI/GSFontInfo.h>
#ifdef X_HAVE_UTF8_STRING
#if 0 // Commented out till the implementation completes.
// ----------------------------------------------------------------------------
// XGFontSetEnumerator
// ----------------------------------------------------------------------------
@interface XGFontSetEnumerator : GSFontEnumerator
{
}
- (void) enumerateFontsAndFamilies;
@end // XGFontSetEnumerator : GSFontEnumerator
#endif // #if 0
// ----------------------------------------------------------------------------
// XGFontSetFontInfo
// ----------------------------------------------------------------------------
@interface XGFontSetFontInfo : GSFontInfo
{
XFontSet _font_set;
XFontStruct **_fonts;
int _num_fonts;
}
- (id) initWithFontName: (NSString *)name
matrix: (const float *)matrix
screenFont: (BOOL)screenFont;
- (void) dealloc;
- (NSSize) advancementForGlyph: (NSGlyph)glyph;
- (NSRect) boundingRectForGlyph: (NSGlyph)glyph;
- (BOOL) glyphIsEncoded: (NSGlyph)glyph;
- (NSGlyph) glyphWithName: (NSString *)glyphName;
- (void) drawGlyphs: (const NSGlyph *)glyphs
length: (int)len
onDisplay: (Display *)dpy
drawable: (Drawable)win
with: (GC)gc
at: (XPoint)xp;
- (float) widthOfGlyphs: (const NSGlyph *)glyphs
length: (int)len;
- (void) setActiveFor: (Display *)dpy
gc: (GC)gc;
@end // XGFontSetFontInfo : GSFontInfo
#endif // X_HAVE_UTF8_STRING defined
#endif // __XGFontSetFontInfo_h

View file

@ -0,0 +1,96 @@
/* XGGState - Implements graphic state drawing for Xlib
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1995
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _XGGState_h_INCLUDE
#define _XGGState_h_INCLUDE
#include <Foundation/NSArray.h>
#include <Foundation/NSObject.h>
#include "gsc/GSGState.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "x11/XGServer.h"
#ifdef HAVE_XFT
#define id xwindowsid
#include <X11/Xft/Xft.h>
#undef id
#endif
@class NSBezierPath;
@class NSFont;
@interface XGGState : GSGState
{
@public
void *context;
void *windevice;
XGDrawMechanism drawMechanism;
GC xgcntxt;
GC agcntxt;
XGCValues gcv;
Drawable draw;
Drawable alpha_buffer;
Region clipregion;
#ifdef HAVE_XFT
XftDraw *xft_draw;
XftDraw *xft_alpha_draw;
XftColor xft_color;
#endif
BOOL drawingAlpha;
BOOL sharedGC; /* Do we own the GC or share it? */
}
- (void) setWindowDevice: (void *)device;
- (void) setGraphicContext: (GC)xGraphicContext;
- (void) setGCValues: (XGCValues)values withMask: (int)mask;
- (void) setClipMask;
- (Region) xClipRegion;
- (BOOL) hasDrawable;
- (BOOL) hasGraphicContext;
- (void *) windevice;
- (Drawable) drawable;
- (GC) graphicContext;
- (NSRect) clipRect;
#ifdef HAVE_XFT
- (XftDraw *)xftDrawForDrawable: (Drawable)d;
- (XftColor)xftColor;
#endif
- (XPoint) viewPointToX: (NSPoint)aPoint;
- (XRectangle) viewRectToX: (NSRect)aRect;
- (XPoint) windowPointToX: (NSPoint)aPoint;
- (XRectangle) windowRectToX: (NSRect)aRect;
@end
@interface XGGState (Ops)
- (NSDictionary *) GSReadRect: (NSRect)rect;
@end
#endif /* _XGGState_h_INCLUDE */

View file

@ -0,0 +1,254 @@
/* -*- mode: ObjC -*-
<title>XGGeometry</title>
<abstract>Point and rectangle manipulations for X-structures</abstract>
Copyright (C) 2001-2005 Free Software Foundation, Inc.
Written by: <author name="Wim Oudshoorn">
<email>woudshoo@xs4all.nl</email></author>
Date: Nov, 2001
This file is part of the GNU Objective C User Interface Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/*
This file implements the NSGeometry manipulation functions for
the XPoint and XRectangle structures.
So most code is copied from NSGeometry, with only the structs changed
*/
#ifndef _XGGeometry_h_INCLUDE
#define _XGGeometry_h_INCLUDE
#include <AppKit/NSAffineTransform.h>
#include <X11/Xlib.h>
#include "xlib/XGGState.h"
#include "x11/XGServerWindow.h"
XRectangle
accessibleRectForWindow (gswindow_device_t *win);
void
clipXRectsForCopying (gswindow_device_t* winA, XRectangle* rectA,
gswindow_device_t* winB, XRectangle* rectB);
static inline XPoint
XGMakePoint (short x, short y)
{
XPoint p;
p.x = x;
p.y = y;
return p;
}
static inline XRectangle
XGMakeRect (short x, short y, unsigned short w, unsigned short h)
{
XRectangle rect;
rect.x = x;
rect.y = y;
rect.width = w;
rect.height = h;
return rect;
}
static inline short
XGMinX (XRectangle aRect)
{
return aRect.x;
}
static inline short
XGMinY (XRectangle aRect)
{
return aRect.y;
}
static inline short
XGMaxX (XRectangle aRect)
{
return aRect.x + aRect.width;
}
static inline short
XGMaxY (XRectangle aRect)
{
return aRect.y + aRect.height;
}
static inline short
XGWidth (XRectangle aRect)
{
return aRect.width;
}
static inline short
XGHeight (XRectangle aRect)
{
return aRect.height;
}
static inline XRectangle
XGIntersectionRect (XRectangle aRect, XRectangle bRect)
{
if (XGMaxX (aRect) <= XGMinX (bRect) || XGMaxX (bRect) <= XGMinX (aRect)
|| XGMaxY (aRect) <= XGMinY (bRect) || XGMaxY (bRect) <= XGMinY (aRect))
{
return XGMakeRect (0, 0, 0, 0);
}
else
{
XRectangle rect;
if (XGMinX (aRect) <= XGMinX (bRect))
rect.x = bRect.x;
else
rect.x = aRect.x;
if (XGMaxX (aRect) >= XGMaxX (bRect))
rect.width = XGMaxX (bRect) - rect.x;
else
rect.width = XGMaxX (aRect) - rect.x;
if (XGMinY (aRect) <= XGMinY (bRect))
rect.y = bRect.y;
else
rect.y = aRect.y;
if (XGMaxY (aRect) >= XGMaxY (bRect))
rect.height = XGMaxY (bRect) - rect.y;
else
rect.height = XGMaxY (aRect) - rect.y;
return rect;
}
}
static inline BOOL
XGIsEmptyRect (XRectangle aRect)
{
if (aRect.width == 0 || aRect.height == 0)
return YES;
else
return NO;
}
// Just in case this are not defined on a system
#ifndef SHRT_MAX
#define SHRT_MAX 32767
#endif
#ifndef SHRT_MIN
#define SHRT_MIN (-32768)
#endif
/* Quick floor using C casts <called gs_floor only to avoid clashes if
math.h is included>. This casts to short as this is the type X uses
for all geometry. */
static inline short gs_floor (float f)
{
if (f >= 0)
{
if (f > SHRT_MAX)
return SHRT_MAX;
else
return (short)f;
}
else
{
if (f < SHRT_MIN)
return SHRT_MIN;
else
{
int g = (int)f;
if (f - ((float)g) > 0)
{
return g - 1;
}
else
{
return g;
}
}
}
}
/*
* Inline functions to convert from OpenStep view coordinates or
* OpenStep window coordinates to X window coordinates.
*/
static inline XPoint
XGWindowPointToX (XGGState *s, NSPoint p)
{
XPoint newPoint;
newPoint.x = gs_floor(p.x - s->offset.x);
newPoint.y = gs_floor(s->offset.y - p.y);
return newPoint;
}
static inline XRectangle
XGWindowRectToX (XGGState *s, NSRect r)
{
XRectangle newRect;
newRect.x = gs_floor(r.origin.x - s->offset.x);
/* We gs_floor the extreme points, and get the width as the difference */
newRect.width = gs_floor(r.origin.x - s->offset.x + r.size.width)
- newRect.x;
newRect.y = gs_floor(s->offset.y - r.origin.y - r.size.height);
newRect.height = gs_floor(s->offset.y - r.origin.y) - newRect.y;
return newRect;
}
/*
* Inline functions to convert from OpenStep view coordinates or
* OpenStep window coordinates to X window coordinates.
*/
static inline XPoint
XGViewPointToX(XGGState *s, NSPoint p)
{
p = [s->ctm transformPoint: p];
return XGWindowPointToX(s, p);
}
static inline XRectangle
XGViewRectToX(XGGState *s, NSRect r)
{
r = [s->ctm rectInMatrixSpace: r];
return XGWindowRectToX(s, r);
}
#endif /* _XGGeometry_h_INCLUDE */

View file

@ -0,0 +1,116 @@
/*
XGPrivate.h
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Mar 2002
This file is part of the GNUstep GUI X/GPS Backend.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _XGPrivate_h_INCLUDE
#define _XGPrivate_h_INCLUDE
#ifdef HAVE_WRASTER_H
#include "wraster.h"
#else
#include "x11/wraster.h"
#endif
#include "x11/XGServer.h"
#include "xlib/XGContext.h"
#include <GNUstepGUI/GSFontInfo.h>
/* Font function (defined in XGFontManager) */
extern NSString *XGXFontName(NSString *fontName, float size);
/* Font functions (defined in XGCommonFont) */
extern NSString *XGFontCacheName(Display *dpy);
extern NSString *XGFontName(Display *dpy, XFontStruct *font_struct);
extern NSString *XGFontFamily(Display *dpy, XFontStruct *font_struct);
extern float XGFontPointSize(Display *dpy, XFontStruct *font_struct);
extern int XGWeightOfFont(Display *dpy, XFontStruct *info);
extern NSFontTraitMask XGTraitsOfFont(Display *dpy, XFontStruct *info);
extern BOOL XGFontIsFixedPitch(Display *dpy, XFontStruct *font_struct);
extern NSString *XGFontPropString(Display *dpy, XFontStruct *font_struct,
Atom atom);
extern unsigned long XGFontPropULong(Display *dpy, XFontStruct *font_struct,
Atom atom);
@interface XGFontEnumerator : GSFontEnumerator
{
}
@end
@interface XGFontInfo : GSFontInfo
{
XFontStruct *font_info;
}
@end
@interface GSFontInfo (XBackend)
- (void) drawString: (NSString*)string
onDisplay: (Display*) xdpy drawable: (Drawable) draw
with: (GC) xgcntxt at: (XPoint) xp;
- (void) draw: (const char*) s length: (int) len
onDisplay: (Display*) xdpy drawable: (Drawable) draw
with: (GC) xgcntxt at: (XPoint) xp;
- (float) widthOf: (const char*) s length: (int) len;
- (void) setActiveFor: (Display*) xdpy gc: (GC) xgcntxt;
- (void) drawGlyphs: (const NSGlyph *) glyphs length: (int) len
onDisplay: (Display*) xdpy drawable: (Drawable) draw
with: (GC) xgcntxt at: (XPoint) xp;
- (float) widthOfGlyphs: (const NSGlyph *) glyphs length: (int) len;
@end
/* In XGBitmap.m */
extern int _pixmap_combine_alpha(RContext *context,
RXImage *source_im, RXImage *source_alpha,
RXImage *dest_im, RXImage *dest_alpha,
XRectangle srect,
NSCompositingOperation op,
XGDrawMechanism drawMechanism,
float fraction);
extern int _bitmap_combine_alpha(RContext *context,
unsigned char * data_planes[5],
int width, int height,
int bits_per_sample, int samples_per_pixel,
int bits_per_pixel, int bytes_per_row,
int colour_space, BOOL one_is_black,
BOOL is_planar, BOOL has_alpha, BOOL fast_min,
RXImage *dest_im, RXImage *dest_alpha,
XRectangle srect, XRectangle drect,
NSCompositingOperation op,
XGDrawMechanism drawMechanism);
extern NSData *_pixmap_read_alpha(RContext *context,
RXImage *source_im, RXImage *source_alpha,
XRectangle srect,
XGDrawMechanism drawMechanism);
#endif

65
trunk/INSTALL Normal file
View file

@ -0,0 +1,65 @@
1 Installation
**************
1.1 Introduction
================
This file documents the installation of the GNUstep Backend Library,
`gnustep-back'. If you are installing this package as part of the
GNUstep core package, read the file GNUstep-HOWTO for more complete
instructions on how to install the entire GNUstep package (including
this library). GNUstep-HOWTO is located at `http://www.gnustep.org'
You must have installed gnustep-gui before installing this library.
1.2 Configuration
=================
Configuration is performed by running the `configure' program at a
shell prompt. You may want to use some of the optional arguments to the
`configure' program. Type `configure --help' for a list. GNUstep
specific options are at the end of this list (if any).
The backend comes with several different window server and graphics
drawing implementations. If you do nothing, the default ones will be
chosen. You can can change this using configure. For instance, to
choose the art graphical drawing implementation, run
configure --enable-graphics=art
Type `configure --help' for a list of graphical drawing
implementations.
You can also change the name of the backend when configuring it.
This is convienient if you want to have a different backend with
different configurations. For instance, to create an xlib and and art
backend, you could do this:
configure --enable-graphics=xlib --with-name=xlib
make install
make distclean
configure --enable-graphics=art --with-name=art
make install
Before running an application, choose one backend using the defaults
program:
defaults write NSGlobalDomain GSBackend libgnustep-xlib
1.3 Compilation
===============
To compile this library, type make. After this is complete, type make
install (make sure you are the root user). Some additional options you
can use with make are `debug=yes' to make a debugging version of the
library and `shared=no' to make a static version of the library. See
the gstep-make package for more information on these options.
1.4 Installing
==============
To install, type
make install

223
trunk/NEWS Normal file
View file

@ -0,0 +1,223 @@
1 NEWS
******
1.1 Noteworthy changes in version `0.14.0'
==========================================
Added code to automatically make any window which uses the
NSDesktopWindowLevel also be omnipresent.
Many glyph drawing improvements.
1.2 Noteworthy changes in version `0.13.2'
==========================================
Added basic implementation of window levels on Windows. In general a
bunch of improvements in the Windows backend.
Experimental patch for using cairo on Windows.
More support for RTF, TIFF and selctions in the pasteboard server.
There has been change in the interaction of devices with the gui
frontend. This version or greater of the backend needs to be used with
gui 0.13.2
1.3 Noteworthy changes in version `0.13.1'
==========================================
Minor improvements.
1.4 Noteworthy changes in version `0.13.0'
==========================================
Many improvements to the cairo backend. Add DPSshfill for all backends.
Better handling of X event times.
1.5 Noteworthy changes in version `0.12.0'
==========================================
Big improvements to the cairo graphics and Window backend. Also better
support for OpenGL.
1.6 Noteworthy changes in version `0.11.0'
==========================================
Bugfixes to art and xlib.
There was some work on the Windows backend for the GDI interface by
Christopher Armstrong.
1.7 Noteworthy changes in version `0.10.3'
==========================================
Fixes. A lot of Cairo backend work.
1.8 Noteworthy changes in version `0.10.2'
==========================================
The Backend can set UTF8 window titles where this is allowed.
1.9 Noteworthy changes in version `0.10.1'
==========================================
The art graphics module is the default now. As was previously the case,
if the proper libraries are not found, the configuration will
automatically switch to xlib on winlib (whichever is appropriate).
There was a great deal of work by Tom MacSween on the windows module
to get windows and taskbars working together, closing, opening, hiding,
and just general good window management.
The Cairo module has been significantly updated and now works with
Cariro version 1.0, although you need to make some minor changes to the
Cairo library before it will work with GNUstep. Due to this, this module
is still considered beta. Ask on the mailing lists for help with this.
1.10 Noteworthy changes in version `0.10.0'
===========================================
The installed name of the backend now includes an interface version
number. This avoids the potential version mismatch between the
frontend (GUI) library and the backend.
* Alpha blending was implemented for Windows, although it does not
seem to work on some machines.
1.11 Noteworthy changes in version `0.9.5'
==========================================
* Added support for window alpha on X servers.
* Add support for old and new freetype libs.
* Some improvements to the Windows backend.
1.12 Noteworthy changes in version `0.9.4'
==========================================
* Fast drawing on 8 bit displays was added (although it might only
speed things up on old X11 servers and/or remote servers).
* GNUstep modifier keys are mapped to KeySyms instead of KeyCodes
* Added a Cairo backend, although it is probably non-functional.
Anyone is invited to contribute to making it work.
* art backend supports reading from a window.
* Add internal window decoration handling.
1.13 Noteworthy changes in version `0.9.3'
==========================================
* A number of W32 window event enhancements
* art backend glyph drawing with alpha enhancements.
* libwraster is no longer checked for - image functions now in
frontend
1.14 Noteworthy changes in version `0.9.2'
==========================================
* Art backend added support for grayscale, one-isblack colorspaces.
* Windows pasteboard interaction handling added.
* Better focus handling on Windows.
* Better font and draw handling on Windows.
1.15 Noteworthy changes in version `0.9.1'
==========================================
Color on 8 bit displays works correctly now. WindowMaker properties are
always set now in case another manager is emulating WindowMaker styles.
1.16 Noteworthy changes in version `0.9.0'
==========================================
Some more improvements to copy/paste support following ICCCM
specifications (like COMPOUND_TEXT support).
1.17 Noteworthy changes in version `0.8.9'
==========================================
* Much improved pasting support between X apps and GNUstep apps.
* Backend headers are no longer installed (now private).
1.18 Noteworthy changes in version `0.8.8'
==========================================
Full multi-byte/unicode support for East Asian languages was added to
the xlib backend. The X11 server now supports use of the XIM input
method for entering non-keyboard characters. Both contributions thanks
to Kazunobu Kuriyama.
* Also added slightly better EWMH support.
* Art backend works with more versions of freetype.
1.19 Noteworthy changes in version `0.8.7'
==========================================
Handle NSBezierPath glyph drawing in art backend. art backend compiles
with all freetype except 2.1.3 via ifdefs.
1.20 Noteworthy changes in version `0.8.6'
==========================================
Bug fixes. See the gnustep-gui NEWS for changes.
1.21 Noteworthy changes in version `0.8.5'
==========================================
Text system improvements. See the gnustep-gui NEWS for changes.
1.22 Noteworthy changes in version `0.8.3'
==========================================
See the gnustep-gui NEWS for changes.
1.23 Noteworthy changes in version `0.8.2'
==========================================
Improved font handling in art backend. Improved compositing with
transformations and clipping in art backend.
1.24 Noteworthy changes in version `0.8.1'
==========================================
art (libart-based) backend added. Use ./configure -enable-graphics=art
to choose this backend.
1.25 Noteworthy changes in version `0.8.0'
==========================================
Bug fixes.
1.26 Noteworthy changes in version `0.7.9'
==========================================
Bug fixes.
1.27 Noteworthy changes in version `0.7.8'
==========================================
Simplified backend selection using -enable-server and -enable-graphics.
Add -with-library-flags and -with-include-flags for adding additonal
flags. Set name with -with-name
1.28 Noteworthy changes in version `0.7.7'
==========================================
First release. Most components extracted from xgps. The old backends,
xgps and xdps were depreciated in favor of this new backend, simply
named back, which can be configured for a variety of window server and
graphics implementations, and also allow for improved code sharing.
In addition there is now a window server backend for Windows
computers, although it is in a very alpha state.

24
trunk/README Normal file
View file

@ -0,0 +1,24 @@
1 README
********
This is version 0.14.0 of the GNUstep GUI Backend (`gnustep-back').
Here is some introductory info to get you started:
1.1 Initial reading
===================
* The file `ANNOUNCE' contains a very brief overview of the library.
It also tells you where to get the most recent version.
* The file `NEWS' has the library's feature history.
* The file `INSTALL' gives instructions for installing the library.
1.2 How can you help?
=====================
* Give us feedback! Tell us what you like; tell us what you think
could be better. Send us bug reports at <bug-gnustep@gnu.org>.

4
trunk/Source/.cvsignore Normal file
View file

@ -0,0 +1,4 @@
ix86
config.h
*_obj
*.bundle

View file

@ -0,0 +1,32 @@
/***
English.lproj/nfontFaceNames.strings
updated by make_strings 2003-06-28 15:21:29 +0200
add comments above this one
***/
/*** Strings from art/ftfont.m ***/
/* File: art/ftfont.m:183 */
"Bold" = "Bold";
/* File: art/ftfont.m:189 */
"Bold Italic" = "Bold Italic";
/* File: art/ftfont.m:190 */
"Bold Oblique" = "Bold Oblique";
/* File: art/ftfont.m:177 */
"Book" = "Book";
/* File: art/ftfont.m:181 */
"Demi" = "Demi";
/* File: art/ftfont.m:182 */
"Demibold" = "Demibold";
/* File: art/ftfont.m:184 */
"Heavy" = "Heavy";
/* File: art/ftfont.m:186 */
"Italic" = "Italic";
/* File: art/ftfont.m:180 */
"Medium" = "Medium";
/* File: art/ftfont.m:187 */
"Oblique" = "Oblique";
/* File: art/ftfont.m:178 */
"Regular" = "Regular";
/* File: art/ftfont.m:179 */
"Roman" = "Roman";

68
trunk/Source/GNUmakefile Normal file
View file

@ -0,0 +1,68 @@
#
# Top level makefile for GNUstep Backend
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Install into the system root by default
GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
include $(GNUSTEP_MAKEFILES)/common.make
include ../config.make
include ../Version
# The library to be compiled, as a library or as a bundle
ifeq ($(BACKEND_BUNDLE),)
BACKEND_FULL=$(BACKEND_NAME)
LIBRARY_NAME=libgnustep-$(BACKEND_FULL)
else
BACKEND_FULL=$(BACKEND_NAME)-$(INTERFACE_VERSION_NUMBER)
BUNDLE_NAME=libgnustep-$(BACKEND_FULL)
endif
#
# The list of subproject directories
#
SUBPROJECTS = gsc $(BUILD_SERVER) $(BUILD_GRAPHICS)
libgnustep-$(BACKEND_FULL)_SUBPROJECTS=$(SUBPROJECTS)
libgnustep-$(BACKEND_FULL)_OBJC_FILES=GSBackend.m
libgnustep-$(BACKEND_FULL)_PRINCIPAL_CLASS=GSBackend
libgnustep-$(BACKEND_FULL)_LOCALIZED_RESOURCE_FILES=nfontFaceNames.strings
libgnustep-$(BACKEND_FULL)_LANGUAGES=English Swedish
-include GNUmakefile.preamble
ifeq ($(BACKEND_BUNDLE),)
include $(GNUSTEP_MAKEFILES)/library.make
else
include $(GNUSTEP_MAKEFILES)/bundle.make
endif
-include GNUmakefile.postamble

View file

@ -0,0 +1,82 @@
#
# GNUakefile.postamble
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# Things to do before compiling
before-all:: $(GNUSTEP_TARGET_DIR)/config.h $(BUNDLE_NAME)Info.plist
# Things to do after compiling
# after-all::
# Things to do before installing
# before-install::
# Things to do after installing
# after-install::
# Things to do before uninstalling
# before-uninstall::
# Things to do after uninstalling
# after-uninstall::
# Things to do before cleaning
# before-clean::
# Things to do after cleaning
after-clean::
rm -f $(BUNDLE_NAME)Info.plist:
# Things to do before distcleaning
# before-distclean::
# Things to do after distcleaning
after-distclean::
rm -rf $(GNUSTEP_TARGET_DIR)/config.h
rm -rf $(GNUSTEP_TARGET_CPU)
# Things to do before checking
# before-check::
# Things to do after checking
# after-check::
#
# The config.h file is specific to a target
#
$(GNUSTEP_TARGET_DIR)/config.h: ../config.status
$(MKDIRS) $(GNUSTEP_TARGET_DIR)
-cp ../config.h $(GNUSTEP_TARGET_DIR)
#
# Make an Info.plist for the bundle
#
$(BUNDLE_NAME)Info.plist:
$(ECHO_CREATING)(echo "{"; \
echo " GSBundleShortVersionString = \"$(VERSION)\";"; \
echo " GSBundleVersion = $(VERSION_NUMBER);"; \
echo " CFBundleShortVersionString = \"$(VERSION)\";"; \
echo " CFBundleVersion = $(VERSION_NUMBER);"; \
echo "}") > $@$(END_ECHO)

View file

@ -0,0 +1,66 @@
#
# GNUmakefile.preamble
#
# Copyright (C) 2002 Free Software Foundation, Inc.
#
# Author: Adam Fedor <fedor@gnu.org>
#
# This file is part of the GNUstep Backend.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# Flags dealing with compiling and linking
#
# Additional flags to pass to the preprocessor
ADDITIONAL_CPPFLAGS += -Wall
# Additional flags to pass to the Objective-C compiler
#ADDITIONAL_OBJCFLAGS +=
# Additional flags to pass to the C compiler
ADDITIONAL_CFLAGS +=
# Additional include directories the compiler should search
ADDITIONAL_INCLUDE_DIRS += -I../Headers \
-I$(GNUSTEP_TARGET_DIR) $(GRAPHIC_CFLAGS)
# Additional LDFLAGS to pass to the linker
#ADDITIONAL_LDFLAGS +=
# Additional library directories the linker should search
ADDITIONAL_LIB_DIRS += $(GRAPHIC_LFLAGS)
#
# Flags for compiling as a bundle or library (if the system depends
# on having libraries specified).
#
libgnustep-$(BACKEND_FULL)_BUNDLE_LIBS = $(GRAPHIC_LIBS)
ifeq ($(BACKEND_BUNDLE),)
libgnustep-$(BACKEND_FULL)_LIBRARIES_DEPEND_UPON = \
-lgnustep-gui -l$(FOUNDATION_LIBRARY_NAME) $(GRAPHIC_LIBS)
endif
#
# The */*.m is a hack to get make_strings to pull in all the .m files in all
# sub-directories. Even if we aren't including a directory in the build, it is
# important that the strings files contains all strings.
#
MAKE_STRINGS_OPTIONS = --aggressive-match --aggressive-remove */*.m

95
trunk/Source/GSBackend.m Normal file
View file

@ -0,0 +1,95 @@
/* GSBackend - backend initialize class
Copyright (C) 2002 Free Software Foundation, Inc.
Author: Adam Fedor <fedor@gnu.org>
Date: Mar 2002
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; see the file COPYING.LIB.
If not, see <http://www.gnu.org/licenses/> or write to the
Free Software Foundation, 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include <Foundation/NSObject.h>
#include <Foundation/NSException.h>
#include <Foundation/NSUserDefaults.h>
@interface GSBackend : NSObject
{
}
+ (void) initializeBackend;
@end
#if BUILD_SERVER == SERVER_x11
#include <x11/XGServer.h>
@interface XGServer (Initialize)
+ (void) initializeBackend;
@end
#elif BUILD_SERVER == SERVER_win32
#include <win32/WIN32Server.h>
@interface WIN32Server (Initialize)
+ (void) initializeBackend;
@end
#endif
/* Call the correct initalization routines for the choosen
backend. This depends both on configuration data and defaults.
*/
@implementation GSBackend
+ (void) initializeBackend
{
Class contextClass;
NSString *context;
NSUserDefaults *defs = [NSUserDefaults standardUserDefaults];
/* Load in only one server */
#if BUILD_SERVER == SERVER_x11
[XGServer initializeBackend];
#elif BUILD_SERVER == SERVER_win32
[WIN32Server initializeBackend];
#else
[NSException raise: NSInternalInconsistencyException
format: @"No Window Server configured in backend"];
#endif
/* The way the frontend is currently structured
it's not possible to have more than one */
context = [NSString stringWithCString: STRINGIFY(BUILD_GRAPHICS)];
/* What backend context? */
if ([defs stringForKey: @"GSContext"])
context = [defs stringForKey: @"GSContext"];
if ([context isEqual: @"xdps"])
contextClass = objc_get_class("NSDPSContext");
else if ([context isEqual: @"art"])
contextClass = objc_get_class("ARTContext");
else if ([context isEqual: @"winlib"])
contextClass = objc_get_class("WIN32Context");
else if ([context isEqual: @"cairo"])
contextClass = objc_get_class("CairoContext");
else
contextClass = objc_get_class("XGContext");
[contextClass initializeBackend];
}
@end

View file

@ -0,0 +1,50 @@
/*
Translated by Alexander Malmberg.
Jag kan egentligen inte mycket svensk typografijargong; nagon som kan
borde dubbel-kolla oversattningen. (2003-06-28)
*/
/***
Swedish.lproj/nfontFaceNames.strings
updated by make_strings 2003-06-28 15:21:29 +0200
add comments above this one
***/
/*** Unmatched/untranslated keys ***/
/* File: art/ftfont.m:177 */
/* Flag: untranslated */
"Book" = "Book";
/* File: art/ftfont.m:179 */
/* Flag: untranslated */
"Roman" = "Roman";
/* File: art/ftfont.m:180 */
/* Flag: untranslated */
"Medium" = "Medium";
/* File: art/ftfont.m:184 */
/* Flag: untranslated */
"Heavy" = "Heavy";
/*** Strings from art/ftfont.m ***/
/* File: art/ftfont.m:183 */
"Bold" = "Fet";
/* File: art/ftfont.m:189 */
"Bold Italic" = "Fet Kursiv";
/* File: art/ftfont.m:190 */
"Bold Oblique" = "Fet Kursiv";
/* File: art/ftfont.m:181 */
"Demi" = "Halvfet";
/* File: art/ftfont.m:182 */
"Demibold" = "Halvfet";
/* File: art/ftfont.m:186 */
"Italic" = "Kursiv";
/* File: art/ftfont.m:187 */
"Oblique" = "Kursiv";
/* File: art/ftfont.m:178 */
"Regular" = "Vanlig";

View file

@ -0,0 +1,2 @@
Resources
*obj

Some files were not shown because too many files have changed in this diff Show more