libdockapp: Add version 0.6.3 to repository.

Obtained from:
http://sourceforge.net/projects/libdockapp/files/libdockapp-0.6.3.tar.gz/download
This commit is contained in:
Doug Torrance 2014-11-28 10:22:47 -06:00 committed by Carlos R. Mafra
parent c34aababd9
commit 2dd42394ac
46 changed files with 46568 additions and 0 deletions

13
libdockapp/AUTHORS Normal file
View file

@ -0,0 +1,13 @@
Alfredo K. Kojima <kojima@windowmaker.org>
Original creator and maintainer of libdockapp.
Pascal G. Hofstee <daeron@windowmaker.org>
Took over development and maintenance from Alfredo when he couldn't
find time for it anymore (due to the development of Window Maker and
work).
Alban G. Hertroys <dalroi@solfertje.student.utwente.nl>
Co-maintainer while Pascal was responsible for maintenance. Took over
the responsibility (and development/maintainence) after Pascal became
too bussy in turn.

5
libdockapp/BUGS Normal file
View file

@ -0,0 +1,5 @@
20050716:
- The standard options -h -v and -w cannot be combined into mixed options
like the user specified ones. For example, if there's a user specified
option -s and <command> -ws is executed, the -w option gets ignored.

19
libdockapp/COPYING Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 1999 Alfredo K. Kojima
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
AUTHOR 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.

150
libdockapp/ChangeLog Normal file
View file

@ -0,0 +1,150 @@
This file is maintained by dtorrance@monmouthcollege.edu
Changelog for all libDockApp users.
----------------------------------
This file contains a reverse chronology of changes.
The contents of this file will apply mostly to developers of dockapps.
Please read this when you update.
20140606
Release of libdockapp 0.6.3.
Updated autotools input files.
Added dockapp.pc file for use with pkg-config.
20050716:
Release of libDockapp 0.6.1.
Fixed parsing of multi-char short options.
20050522:
Release of libDockapp 0.6.0.
20050420:
Added DAError and DAWarning functions.
20050414:
Added DAFreeShapedPixmap.
20050408:
Added functions to read an XPM file dynamically.
Added a function to retrieve the program name from the program
arguments.
20030210:
Added a new global variable DAIcon. The value of this variable is
None if the dockapp runs in "windowed mode".
Added functions DAGetIconWindow() and
DASetIconWindow(Window icon_window). The "...Window"-part is because
X discerns between icon windows and icon pixmaps.
DAWindow now always points to the shown window. Normally this is the
icon window (DAIcon), but in "windowed mode" this is the leader window
(DALeader).
20030131:
Bumped the version of the library to 2.
20030130:
Added WMProtocol for WM_DELETE_WINDOW. Dockapps run in "windowed
mode" will have a proper close-button now.
Child windows of a dockapp are now mapped as well when calling
DAShow().
Revamped the Changelog. Changedates have become important now that we
use them for backward compatibility.
20030126:
Added expected against actual version matching system. This has the
purpose of keeping the library backward compatible, even when the API
changes (as happened with DAGetDisplay).
Use the function DASetExpectedVersion(<changelog date>) in your dockapp
to ensure backward compatibility.
!!! COMPATIBILITY WARNING !!!
Renamed DAGetDisplay() to DAOpenDisplay(). The function opened a
display, this name makes more sense and there was a potential namespace
conflict (see below).
Added functions:
Display* DAGetDisplay(char *display, ...)
Window DAGetWindow()
Window DAGetLeader()
int DAGetDepth()
Visual* DAGetVisual()
DAGetDisplay(Display *display)
DAGetWindow(Window window)
DAGetLeader(Window leader)
DAGetDepth(int depth)
DAGetVisual(Visual *visual)
These functions just wrap the global variables DADisplay, DAWindow,
DALeader, DADepth and DAVisual. The globals are still available, and
will probably remain in future releases (The wrappers are for calls
from other dynamic objects).
If DASetExpectedVersion is before 20030126 (or not set), DAGetDisplay
will behave in the old way, opening the display instead of reading out
the variable. The NEW version of DAGetDisplay should be called as:
Display *d = DAGetDisplay(NULL);
20021220:
Added event handling for DestroyNotify, EnterWindow and LeaveWindow.
20021016:
Added a more complex example ("rectangles") showing the use of 'action
rectangles' and the handling of _all_ recognised event types; this one
may need some simplification.
Added an example ("shapes") of using the shaped pixmap API. No code
yet, just a directory.
20020926:
Added programming examples. There are three examples in the make: A
relatively simple example ("basic") without event handling and with
only basic shape implementation.
20020924:
Added a 7-segment display font. This font was donated by Jim Knoble.
Thanks Jim (It doesn't get installed, yet. I still need to make a
Makefile for this...).
20020922:
Added DAShapedPixmap type and functions to work with it. There is an
entire API around shaped pixmaps now, keeping pixmap, mask and geometry
together. It allows copying areas from both the pixmap and the mask to
another shaped pixmap, etc.
Added new global GC: DAClearGC. If you want to draw parts, you will
also want to erase parts.
20020921:
Added default colors as X-resources: DockApp*foreground and
DockApp*background. These colors are the foreground colors of DAGC and
DAClearGC respectively.
20020905:
"Inherited" the project from Pascal Hofstee. He stopped maintaining it,
and gave his okay when I asked to maintain it. We used to work on this
together, I'll continue the effort alone.
Release of libDockapp 0.4
Since libDockApp 0.2
--------------------
DockApps can now change shape on the fly.
Motion Events are properly handled now.
Code review/cleanup
Added DARect and DAActionRect structures. These allow You to easily
specify regions, and functions that should be called when clicked in
these regions.
DAEventLoop now finaly no longer causes Huge CPU-usage.
Turned out I had to disable the GCGraphicsExposures GC-Values, which
were generating huge amounts of "NoExpose" events which were simply
discarded anyway.
--
Before this, libdockapp was maintained and copyright by Alfredo Kojima.

370
libdockapp/INSTALL Normal file
View file

@ -0,0 +1,370 @@
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

26
libdockapp/Makefile.am Normal file
View file

@ -0,0 +1,26 @@
if COND_FONT
COND_FONT = fonts
else
COND_FONT =
endif
if COND_EXAMPLES
COND_XMPS = examples
endif
SUBDIRS = src $(COND_FONT) $(COND_XMPS)
pkgconfigdir = $(libdir)/pkgconfig
dist_pkgconfig_DATA = dockapp.pc
dockapp.pc: Makefile
@echo "Generating $@"
@echo 'Name: dockapp' > $@
@echo 'Description: Window Maker dockapp support' >> $@
@echo 'URL: http://libdockapp.sourceforge.net' >> $@
@echo 'Version: $(VERSION)' >> $@
@echo 'Requires: x11 xext xpm' >> $@
@echo 'Libs: -L${libdir} -ldockapp' >> $@
@echo 'Cflags: -I${includedir}' >> $@
EXTRA_DIST = BUGS

867
libdockapp/Makefile.in Normal file
View file

@ -0,0 +1,867 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(dist_pkgconfig_DATA) COPYING compile config.guess config.sub \
install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
DATA = $(dist_pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = src fonts examples
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DFLAGS = @DFLAGS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FCCACHE = @FCCACHE@
FGREP = @FGREP@
FONTDIR = @FONTDIR@
FONTROOTDIR = @FONTROOTDIR@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKFONTDIR = @MKFONTDIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RUN_FCCACHE = @RUN_FCCACHE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
Xext_CFLAGS = @Xext_CFLAGS@
Xext_LIBS = @Xext_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xpm_CFLAGS = @xpm_CFLAGS@
xpm_LIBS = @xpm_LIBS@
@COND_FONT_FALSE@COND_FONT =
@COND_FONT_TRUE@COND_FONT = fonts
@COND_EXAMPLES_TRUE@COND_XMPS = examples
SUBDIRS = src $(COND_FONT) $(COND_XMPS)
pkgconfigdir = $(libdir)/pkgconfig
dist_pkgconfig_DATA = dockapp.pc
EXTRA_DIST = BUGS
all: all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
install-dist_pkgconfigDATA: $(dist_pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-dist_pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-dist_pkgconfigDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-dist_pkgconfigDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-dist_pkgconfigDATA install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am \
uninstall-dist_pkgconfigDATA
dockapp.pc: Makefile
@echo "Generating $@"
@echo 'Name: dockapp' > $@
@echo 'Description: Window Maker dockapp support' >> $@
@echo 'URL: http://libdockapp.sourceforge.net' >> $@
@echo 'Version: $(VERSION)' >> $@
@echo 'Requires: x11 xext xpm' >> $@
@echo 'Libs: -L${libdir} -ldockapp' >> $@
@echo 'Cflags: -I${includedir}' >> $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

74
libdockapp/NEWS Normal file
View file

@ -0,0 +1,74 @@
This file is maintained by dtorrance@monmouthcollege.edu, and available
from http://libdockapp.sourceforge.net
News for dockApp developers.
----------------------------------
This file contains a reverse chronology of important additions and API-changes.
The contents of this file will apply mostly to developers of dockapps.
Please read this when you update.
20140606
Release of libdockapp 0.6.3.
Updated autotools input files.
Added dockapp.pc file for use with pkg-config.
20050716:
Release of libdockapp 0.6.1
Fixed parsing multi-character short options.
20050522:
Release of libDockapp 0.6.0.
20050420:
Added DAError and DAWarning functions.
20050414:
Added DAFreeShapedPixmap.
20050408:
Added functions to read an XPM file dynamically.
Added a function to retrieve the program name from the program
arguments.
20030210:
Added a new global variable DAIcon. The value of this variable is
None if the dockapp runs in "windowed mode".
Added functions DAGetIconWindow() and
DASetIconWindow(Window icon_window). The "...Window"-part is because
X discerns between icon windows and icon pixmaps.
DAWindow now always points to the shown window. Normally this is the
icon window (DAIcon), but in "windowed mode" this is the leader window
(DALeader).
20030130:
Added WMProtocol for WM_DELETE_WINDOW. Dockapps run in normal window
mode will have a proper close-button now.
Child windows of a dockapp are now mapped as well when calling
DAShow().
Reworked basic example to use a Window instead of drawing and erasing
pixmaps by hand. This removes a lot of the complex parts of the
example.
20030126:
The function DAGetDisplay() has been renamed to DAOpenDisplay(). This
is unfortunate for backwards compatibility, but it was a bad name for
the function, and I needed the name for another function.
New functions DAGetDisplay(), DAGetWindow(), DAGetLeader(),
DAGetDepth(), DAGetVisual(), and their Set... couterparts
(DASetDisplay(), etc) were added. These get and set the global
DA...-variables (see: dockapp.h), and are mainly for use from within
code that is not directly connected to the library (e.g. from within
another library).
A system to match the expected version of libDockApp against the linked
version was added, to prevent backward compatibility problems in the
future.

61
libdockapp/README Normal file
View file

@ -0,0 +1,61 @@
DockApp Development Standard Library
Alban G. Hertroys <dalroi@solfertje.student.utwente.nl>
Alfredo K. Kojima <kojima@windowmaker.org>
Pascal G. Hofstee <daeron@windowmaker.org>
...............................................................................
You must have libXpm library installed and the shape extension supported
by your X server to be able to build and install libdockapp.
To compile libDockApp enter the libdockapp directory and type:
./configure
make install
You can choose to not install the examples or the fonts with configure
options:
--with-font install the dockapp font (default=yes)
--with-examples install the examples (default=yes)
The API is described in dockapp.h
There are some examples in the examples directory. These aren't build by
default. You will need imake and xmkmf to compile these.
You can compile them like:
cd examples/basic
xmkmf -a
make
Optionally you can "make install" if you really like the example application.
License:
Copyright (c) 1999-2003 Alfredo K. Kojima, Pascal Hofstee, Alban G. Hertroys
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

10300
libdockapp/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load diff

347
libdockapp/compile Executable file
View file

@ -0,0 +1,347 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, 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/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

1558
libdockapp/config.guess vendored Executable file

File diff suppressed because it is too large Load diff

1791
libdockapp/config.sub vendored Executable file

File diff suppressed because it is too large Load diff

15702
libdockapp/configure vendored Executable file

File diff suppressed because it is too large Load diff

61
libdockapp/configure.ac Normal file
View file

@ -0,0 +1,61 @@
AC_INIT([libdockapp],[0.6.3])
AC_CONFIG_SRCDIR([src/dockapp.h])
AM_INIT_AUTOMAKE
LT_INIT
dnl Specify whether to install font and examples
dnl ============================================
AC_ARG_WITH(font,
[ --with-font install the dockapp font (default=yes)],
with_font=$withval,
with_font=yes)
AC_ARG_WITH(examples,
[ --with-examples install the examples (default=yes)],
with_examples=$withval,
with_examples=yes)
AM_CONDITIONAL(COND_FONT, [test "$with_font" = yes])
AM_CONDITIONAL(COND_EXAMPLES, [test "$with_examples" = yes])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Checks for libraries.
AC_PATH_XTRA
PKG_CHECK_MODULES([X11],[x11])
PKG_CHECK_MODULES([Xext],[xext])
PKG_CHECK_MODULES([xpm],[xpm])
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Debugging
dnl =========
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging ],, enable_debug=no)
if test "$enable_debug" = yes; then
DFLAGS="-Wall -g -ansi -pedantic"
fi
AC_SUBST(DFLAGS)
dnl Font-util macros
dnl ================
m4_ifndef([XORG_FONT_MACROS_VERSION],
[m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
XORG_FONT_MACROS_VERSION(1.1)
XORG_FONT_COMMON_UTILS()
XORG_FONTDIR([misc])
AC_CONFIG_FILES([Makefile
src/Makefile
fonts/Makefile
examples/Makefile])
AC_OUTPUT

7
libdockapp/dockapp.pc Normal file
View file

@ -0,0 +1,7 @@
Name: dockapp
Description: Window Maker dockapp support
URL: http://libdockapp.sourceforge.net
Version: 0.6.3
Requires: x11 xext xpm
Libs: -L/usr/local/lib -ldockapp
Cflags: -I/usr/local/include

View file

@ -0,0 +1,9 @@
nobase_doc_DATA = README \
basic/Imakefile \
basic/README \
basic/ball_red.xpm \
basic/basic.c \
rectangles/Imakefile \
rectangles/rectangles.c
EXTRA_DIST = $(nobase_doc_DATA)

View file

@ -0,0 +1,504 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = examples
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(docdir)"
DATA = $(nobase_doc_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DFLAGS = @DFLAGS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FCCACHE = @FCCACHE@
FGREP = @FGREP@
FONTDIR = @FONTDIR@
FONTROOTDIR = @FONTROOTDIR@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKFONTDIR = @MKFONTDIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RUN_FCCACHE = @RUN_FCCACHE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
Xext_CFLAGS = @Xext_CFLAGS@
Xext_LIBS = @Xext_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xpm_CFLAGS = @xpm_CFLAGS@
xpm_LIBS = @xpm_LIBS@
nobase_doc_DATA = README \
basic/Imakefile \
basic/README \
basic/ball_red.xpm \
basic/basic.c \
rectangles/Imakefile \
rectangles/rectangles.c
EXTRA_DIST = $(nobase_doc_DATA)
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu examples/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-nobase_docDATA: $(nobase_doc_DATA)
@$(NORMAL_INSTALL)
@list='$(nobase_doc_DATA)'; test -n "$(docdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
fi; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for file in $$files; do \
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo " $(MKDIR_P) '$(DESTDIR)$(docdir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(docdir)/$$dir"; }; \
echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(docdir)/$$dir'"; \
$(INSTALL_DATA) $$xfiles "$(DESTDIR)$(docdir)/$$dir" || exit $$?; }; \
done
uninstall-nobase_docDATA:
@$(NORMAL_UNINSTALL)
@list='$(nobase_doc_DATA)'; test -n "$(docdir)" || list=; \
$(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(docdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-nobase_docDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-nobase_docDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-nobase_docDATA install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
ps ps-am tags-am uninstall uninstall-am \
uninstall-nobase_docDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View file

@ -0,0 +1,43 @@
About the examples
------------------
In this directory you find the example applications for libDockApp. This is a
work in progress. It is not easy to come up with good examples of how to use
features without bloating it with "stuff you don't need to know". That's why it
is far from finished, and that's also why I INVITE YOU TO SUBMIT simple dockapps
that provide good examples of certain features.
The examples:
------------
basic:
This is an example that uses a few simple shapes; a rectangle containing
a bouncing ball.
It shows how to use the abstracted DAShapedPixmap structs and how to use
X Window types for overlaying one shape on top of another (something
much easier and more flexible than trying to blend the pixmaps
together).
It also shows some simple event handling (a timeout event and a window
close event).
rectangles:
This example shows how to use "action rectangles". Those are areas that
you define callbacks for events on.
The example got rather mixed up with X drawing calls, and creating
shapes by hand from X regions. I'm thinking about either stripping it of
most functionality to make it a proper example of what it tries to show,
or to rename it to "tangles".
It even uses some deprecated features...
shapes:
NOT IMPLEMENTED YET.
And maybe a tad superfluous, as "basic" already show how to use shapes.
Needed examples:
---------------
I need examples that show one or more of the following (less is better):
- Something very basic; just showing how to get started.
- Command line parameter parsing.
- Action rectangles; my example isn't very good.
- How to handle different icon sizes flexibly (I think that could result in some
new library functions to be added).
- Loading pixmaps in runtime.

View file

@ -0,0 +1,30 @@
# $Id: Imakefile,v 1.4 2002/10/16 07:19:18 dalroi Exp $
STD_INCLUDES = $(INC_PATH) -I/usr/local/include -I.
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(LIB_PATH) -L/usr/local/lib -L/usr/X11R6/lib \
-L../../src/.libs \
-ldockapp -lXpm -lX11
SRCS = basic.c
OBJS = basic.o
XCOMM -----------------------------------------------------------------------
XCOMM knowledge about availability of library-functions
XCOMM -----------------------------------------------------------------------
# Has srandomdev function?
# + FreeBSD 4.6, OpenBSD 3.1, 4.2BSD, MacOS X
# - Linux, Solaris, HP UX 11.00
#if defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) || \
defined(NetBSDArchitecture) || defined(DarwinArchitecture)
CFLAGS += -DHAS_SRANDOMDEV
#endif
CFLAGS += -DSRANDOMFUNC=$(SRANDOM_FUNC)
ComplexProgramTargetNoMan(basic)

View file

@ -0,0 +1,169 @@
This example dockapp is public domain. It may freely be used as a basis for
any application. The original version was made by Alban G. Hertroys
(dalroi@solfertje.student.utwente.nl).
The red ball in the example originates from the public domain icons provided
with the Apache server distribution. The following statement was included
with these icons:
-----------------------------------------------------------------------------
Public Domain Icons
These icons were originally made for Mosaic for X and have been
included in the NCSA httpd and Apache server distributions in the
past. They are in the public domain and may be freely included in any
application. The originals were done by Kevin Hughes
(kevinh@kevcom.com).
Many thanks to Andy Polyakov for tuning the icon colors and adding a
few new images. If you'd like to contribute additions or ideas to
this set, please let me know.
Almost all of these icons are 20x22 pixels in size. There are
alternative icons in the "small" directory that are 16x16 in size,
provided by Mike Brown (mike@hyperreal.org).
Suggested Uses
The following are a few suggestions, to serve as a starting point for ideas.
Please feel free to tweak and rename the icons as you like.
a.gif
This might be used to represent PostScript or text layout
languages.
alert.black.gif, alert.red.gif
These can be used to highlight any important items, such as a
README file in a directory.
back.gif, forward.gif
These can be used as links to go to previous and next areas.
ball.gray.gif, ball.red.gif
These might be used as bullets.
binary.gif
This can be used to represent binary files.
binhex.gif
This can represent BinHex-encoded data.
blank.gif
This can be used as a placeholder or a spacing element.
bomb.gif
This can be used to repreesnt core files.
box1.gif, box2.gif
These icons can be used to represent generic 3D applications and
related files.
broken.gif
This can represent corrupted data.
burst.gif
This can call attention to new and important items.
c.gif
This might represent C source code.
comp.blue.gif, comp.red.gif
These little computer icons can stand for telnet or FTP
sessions.
compressed.gif
This may represent compressed data.
continued.gif
This can be a link to a continued listing of a directory.
down.gif, up.gif, left.gif, right.gif
These can be used to scroll up, down, left and right in a
listing or may be used to denote items in an outline.
dvi.gif
This can represent DVI files.
f.gif
This might represent FORTRAN or Forth source code.
folder.gif, folder.open.gif, folder.sec.gif
The folder can represent directories. There is also a version
that can represent secure directories or directories that cannot
be viewed.
generic.gif, generic.sec.gif, generic.red.gif
These can represent generic files, secure files, and important
files, respectively.
hand.right.gif, hand.up.gif
These can point out important items (pun intended).
image1.gif, image2.gif, image3.gif
These can represent image formats of various types.
index.gif
This might represent a WAIS index or search facility.
layout.gif
This might represent files and formats that contain graphics as
well as text layout, such as HTML and PDF files.
link.gif
This might represent files that are symbolic links.
movie.gif
This can represent various movie formats.
p.gif
This may stand for Perl or Python source code.
pie0.gif ... pie8.gif
These icons can be used in applications where a list of
documents is returned from a search. The little pie chart images
can denote how relevant the documents may be to your search
query.
patch.gif
This may stand for patches and diff files.
portal.gif
This might be a link to an online service or a 3D world.
ps.gif, quill.gif
These may represent PostScript files.
screw1.gif, screw2.gif
These may represent CAD or engineering data and formats.
script.gif
This can represent any of various interpreted languages, such as
Perl, python, TCL, and shell scripts, as well as server
configuration files.
sound1.gif, sound2.gif
These can represent sound files.
sphere1.gif, sphere2.gif
These can represent 3D worlds or rendering applications and
formats.
tex.gif
This can represent TeX files.
text.gif
This can represent generic (plain) text files.
transfer.gif
This can represent FTP transfers or uploads/downloads.
unknown.gif
This may represent a file of an unknown type.
uuencoded.gif
This can stand for uuencoded data.
world1.gif, world2.gif
These can represent 3D worlds or other 3D formats.
-----------------------------------------------------------------------------

View file

@ -0,0 +1,20 @@
/* XPM */
static char * ball_red_xpm[] = {
"10 11 6 1",
" c None",
". c #000000",
"+ c #FF9999",
"@ c #FF3333",
"# c #FFFFFF",
"$ c #660000",
" .... ",
" .+++@. ",
" .+#+@@$. ",
".++#++@@$.",
".@+@+@$$$.",
".+@+@@@$..",
".@@@@$$$..",
".@@$@$$...",
" .$$$$.$. ",
" .$.... ",
" .... "};

View file

@ -0,0 +1,210 @@
/* $Id: basic.c,v 1.10 2003/02/10 12:35:03 dalroi Exp $
*
* Copyright (c) 2002 Alban G. Hertroys
*
* Basic example of libDockapp usage
*
* This dockapp will draw a rectangle with a
* bouncing ball in it.
*/
/* also includes Xlib, Xresources, XPM, stdlib and stdio */
#include <dockapp.h>
/* include the pixmap to use */
#include "ball_red.xpm"
#define SPEED 20
#define MAX_MOVE 4
/*
* Prototypes for local functions
*/
void drawRelief();
void moveBall();
void destroy();
/*
* Global variables
*/
Window ballWin;
DAShapedPixmap *ballPix;
/*
* M A I N
*/
int
main(int argc, char **argv)
{
unsigned int x=1, y=1;
Pixmap back;
DACallbacks eventCallbacks = {
destroy, /* destroy */
NULL, /* buttonPress */
NULL, /* buttonRelease */
NULL, /* motion (mouse) */
NULL, /* mouse enters window */
NULL, /* mouse leaves window */
moveBall /* timeout */
};
/* provide standard command-line options */
DAParseArguments(
argc, argv, /* Where the options come from */
NULL, 0, /* Our list with options - none as you can see */
"This is the help text for the basic example of how to "
"use libDockapp.\n",
"Basic example version 1.1");
/* Tell libdockapp what version we expect it to be (a date from the
* ChangeLog should do).
*/
DASetExpectedVersion(20020126);
DAOpenDisplay(
NULL /* default display */,
argc, argv /* needed by libdockapp */
);
DACreateIcon(
"daBasicExample" /* WM_CLASS hint; don't use chars in [.?*: ] */,
48, 48 /* geometry of dockapp internals */,
argc, argv /* needed by libdockapp */
);
/* The pixmap that makes up the background of the dockapp */
back = DAMakePixmap();
drawRelief(back);
DASetPixmap(back);
XFreePixmap(DADisplay, back);
/* A window(!) for the ball pixmap.
* Moving a window is a lot easier then erasing/copying the pixmap all
* the time.
*
* I use a DAShapedPixmap here, which contains all the information
* related to the pixmap: pixmap, mask and geometry.
*/
ballPix = DAMakeShapedPixmapFromData(ball_red_xpm);
ballWin = XCreateSimpleWindow(DADisplay, DAWindow,
x, y,
/* Use the geometry of the shaped pixmap */
ballPix->geometry.width, ballPix->geometry.height,
0, 0, 0);
DASPSetPixmapForWindow(ballWin, ballPix);
/* Respond to destroy and timeout events (the ones not NULL in the
* eventCallbacks variable.
*/
DASetCallbacks(&eventCallbacks);
/* Set the time for timeout events (in msec) */
DASetTimeout(SPEED);
/* Randomize movement variation.
* Run multiple versions of the dockapp simultaneously to see the effect
* best.
* (which function to use is set from the Imakefile)
*/
#ifdef HAS_RANDOMDEV
srandomdev();
#else
srandom(time(NULL));
#endif
DAShow(); /* Show the dockapp window. */
/* Process events and keep the dockapp running */
DAEventLoop();
/* not reached */
exit(EXIT_SUCCESS);
}
void
drawRelief(Pixmap pixmap)
{
XGCValues gcv;
GC lightGrayGC, darkGrayGC;
/* GC's */
gcv.foreground = DAGetColor("Navy");
XChangeGC(DADisplay, DAClearGC, GCForeground, &gcv);
gcv.foreground = DAGetColor("lightGray");
gcv.graphics_exposures = False;
lightGrayGC = XCreateGC(DADisplay, DAWindow,
GCForeground|GCGraphicsExposures, &gcv);
gcv.foreground = DAGetColor("#222222");
darkGrayGC = XCreateGC(DADisplay, DAWindow,
GCForeground|GCGraphicsExposures, &gcv);
/* Drawing */
XFillRectangle(DADisplay, pixmap, DAClearGC, 1, 1, 46, 46);
XDrawLine(DADisplay, pixmap, darkGrayGC, 0, 0, 0, 46);
XDrawLine(DADisplay, pixmap, darkGrayGC, 1, 0, 47, 0);
XDrawLine(DADisplay, pixmap, lightGrayGC, 0, 47, 47, 47);
XDrawLine(DADisplay, pixmap, lightGrayGC, 47, 1, 47, 46);
/* Free the GC's, we don't use them anymore */
XFreeGC(DADisplay, lightGrayGC);
XFreeGC(DADisplay, darkGrayGC);
}
void
moveBall()
{
static int x = 1;
static int y = 1;
static int dx = 0;
static int dy = 0;
signed int var = random()%3 -1;
if (dx == 0) dx = var;
if (dy == 0) dy = var;
if (dx > MAX_MOVE) dx = MAX_MOVE;
if (dy > MAX_MOVE) dy = MAX_MOVE;
/* calculate new position */
x += dx;
y += dy;
if (x < 1) {
x = 1;
dx = -dx + var;
}
if (y < 1) {
y = 1;
dy = -dy + var;
}
if (x + ballPix->geometry.width > 46) {
x = 46 - ballPix->geometry.width;
dx = -dx + var;
}
if (y + ballPix->geometry.height > 46) {
y = 46 - ballPix->geometry.height;
dy = -dy + var;
}
XMoveWindow(DADisplay, ballWin, x, y);
}
void
destroy(void)
{
XFreePixmap(DADisplay, ballPix->pixmap);
XFreePixmap(DADisplay, ballPix->shape);
fprintf(stderr, "Destroyed!\n");
/* exit is done by libdockapp */
}

View file

@ -0,0 +1,21 @@
# $Id: Imakefile,v 1.1 2002/10/16 07:19:18 dalroi Exp $
STD_INCLUDES = $(INC_PATH) -I/usr/local/include -I.
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(LIB_PATH) -L/usr/local/lib -L/usr/X11R6/lib \
-L../../src/.libs \
-ldockapp -lXpm -lX11
SRCS = rectangles.c
OBJS = rectangles.o
XCOMM -----------------------------------------------------------------------
XCOMM knowledge about availability of library-functions
XCOMM -----------------------------------------------------------------------
CFLAGS += -Wall -ansi -pedantic -ggdb
ComplexProgramTargetNoMan(rectangles)

View file

@ -0,0 +1,651 @@
/* $Id: rectangles.c,v 1.4 2005/05/22 12:30:52 dalroi Exp $
*
* Copyright (c) 2002 Alban G. Hertroys
*
* libDockapp example - Usage of action rectangles
*
* Some clickable and draggable areas for you to play
* with.
*
* There's a bit much in here...
*/
/* The cursor font - stamdard cursor glyphs. */
#include <X11/cursorfont.h>
/* Required because we don't use a pixmap for the shape (using a DASetShape
* variation). Instead we use the XLib call "XShapeCombineRegion".
* Window shapes are an extension (since X11R5).
*/
#include <X11/extensions/shape.h>
#include <dockapp.h>
/* already includes Xlib, Xresources, XPM, stdlib and stdio */
/*
* Type definitions
*/
/* I like to keep my graphic contexts (GCs) together */
struct Colors {
GC white; /* foreground color from X-resource, or default */
GC black; /* background color, idem */
GC lightGray; /* Some GC's we'll have to define for colors */
GC darkGray;
GC slider; /* draw-color when not highlighted,
* dark-color when highlighted
*/
GC sliderLight; /* draw-color when highlighted */
GC sliderDark; /* dark-color when not highlighted */
};
/*
* Global variables
*/
Pixmap pixmap; /* pixmap pixmap */
DARect *buttonDown = NULL;
struct Colors *colors; /* our colors */
DAActionRect **actionRects;
float sliderPos = 0.7;
int mouseIn = 0;
Cursor pointer;
/*
* Prototypes for local functions
*/
struct Colors* setGCs(Drawable d);
unsigned long adjustColor(unsigned long color, signed int adjustment);
/* drawing routines */
void createBtn(DARect rect);
void drawRaisedFrame(DARect rect);
void drawSunkenFrame(DARect rect);
void createSquare(DARect rect);
void drawSquare(DARect rect, int button);
void createSlider(DARect rect);
void drawSlider(DARect rect);
void setPointerColor(GC);
/* utility functions */
DAActionRect setRectAction(DARect rect, DARectCallback action);
/* event handlers functions */
void destroy(void);
void buttonPress(int button, int state, int x, int y);
void buttonRelease(int button, int state, int x, int y);
void mouseMove(int x, int y);
void mouseEnter(void);
void mouseLeave(void);
/* what to do for a specific event for every 'item' in the dockapp */
/* Button that can be pressed "down" and jumps back "up" again */
void btnDown(int x, int y, DARect rect, void *data);
void btnUp(int x, int y, DARect rect, void *data);
void btnLeave(int x, int y, DARect rect, void *data);
/* Square that tells which button was pressed (number) */
void squareDown(int x, int y, DARect rect, void *data);
/* A draggable slider that highlights when the mouse is over it */
void sliderDown(int x, int y, DARect rect, void *data);
void sliderUp(int x, int y, DARect rect, void *data);
void sliderMove(int x, int y, DARect rect, void *data);
void sliderEnter(int x, int y, DARect rect, void *data);
void sliderLeave(int x, int y, DARect rect, void *data);
/*
* M A I N
*/
int
main(int argc, char **argv)
{
/* define the event handlers for the events */
DACallbacks eventCallbacks = {
destroy, /* destroy */
buttonPress, /* buttonPress */
buttonRelease, /* buttonRelease */
mouseMove, /* motion (mouse) */
mouseEnter, /* mouse enters window */
mouseLeave, /* mouse leaves window */
NULL /* timeout */
};
/* define regions (x, y, width, height) that need event-handling */
Region clipRegion = XCreateRegion();
DARect btn = {0, 0, 16, 16},
square = {0, 25, 22, 22},
slider = {24, 0, 23, 48};
/* define what to do if an event occurs in a rectangle */
DAActionRect *buttonPressRects, *buttonReleaseRects,
*mouseMoveRects, *mouseEnterRects, *mouseLeaveRects;
buttonPressRects = malloc(3 * sizeof(DAActionRect));
buttonPressRects[0] = setRectAction(btn, btnDown);
buttonPressRects[1] = setRectAction(square, squareDown);
buttonPressRects[2] = setRectAction(slider, sliderDown);
buttonReleaseRects = malloc(2 * sizeof(DAActionRect));
buttonReleaseRects[0] = setRectAction(btn, btnUp);
buttonReleaseRects[1] = setRectAction(slider, sliderUp);
mouseMoveRects = malloc(sizeof(DAActionRect));
mouseMoveRects[0] = setRectAction(slider, sliderMove);
mouseEnterRects = malloc(sizeof(DAActionRect));
mouseEnterRects[0] = setRectAction(slider, sliderEnter);
mouseLeaveRects = malloc(2 * sizeof(DAActionRect));
mouseLeaveRects[0] = setRectAction(btn, btnLeave);
mouseLeaveRects[1] = setRectAction(slider, sliderLeave);
/* XXX: make action rectangles available outside main()
* ...libDockapp should be able to do this... (reminder)
*/
actionRects = malloc(6 * sizeof(DAActionRect*));
actionRects[0] = buttonPressRects;
actionRects[1] = buttonReleaseRects;
actionRects[2] = mouseMoveRects;
actionRects[3] = mouseEnterRects;
actionRects[4] = mouseLeaveRects;
actionRects[5] = NULL;
/* provide standard command-line options */
DAParseArguments(
argc, argv, /* Where the options come from */
NULL, 0, /* Our list with options - none as you can see */
"This is the help text for the rectangle example of how to "
"use libDockapp.\n",
"Rectangle example version 1.0");
/* Tell libdockapp what version we expect it to be, so that you can use
* older programs with newer versions of libdockapp with less risc for
* compatibility problems.
*/
DASetExpectedVersion(20030126);
/* Initialize a dockapp */
DAInitialize(
"", /* Use default display */
"daRectangleExample", /* WM_CLASS hint; don't use chars in [.?*: ] */
48, 48, /* geometry of dockapp internals */
argc, argv /* (needed internally) */
);
/* Create a pixmap to draw on, and to display */
pixmap = DAMakePixmap(); /* size == dockapp geometry (48,48) */
colors = setGCs(pixmap);
XFillRectangle(DADisplay, pixmap, DAClearGC, 0, 0, 48, 48);
XClearWindow(DADisplay, DAWindow);
/* Make a "Region" from the shapes we have */
XUnionRectWithRegion(&btn, clipRegion, clipRegion);
XUnionRectWithRegion(&square, clipRegion, clipRegion);
XUnionRectWithRegion(&slider, clipRegion, clipRegion);
/* Make this region a window shape mask */
XShapeCombineRegion(DADisplay, DAWindow, ShapeBounding,
0, 0, clipRegion, ShapeSet);
/* We don't need the region anymore (it is copied by XShapeCombineRegion).
* XXX: That's not certain, it is not documented. XSetRegion does so,
* though, so it is a likely assumption that it does copy.
*/
XDestroyRegion(clipRegion);
/* The cursor we want to use.
* Specify 'None' for the default,
* or one from X11/cursorfont.h
*/
pointer = XCreateFontCursor(DADisplay, XC_based_arrow_up);
XDefineCursor(DADisplay, DAWindow, pointer);
/* a square with an image that changes when clicked (A button). */
createBtn(btn);
/* a square that shows the number of the mouse-button pressed on click. */
createSquare(square);
/* a slider a using two dashed line GC's. */
createSlider(slider);
/* Tell libdockapp this is the pixmap that we want to show */
DASetPixmap(pixmap);
/* Process events every 100ms */
DASetTimeout(100);
/* set event callbacks */
DASetCallbacks(&eventCallbacks);
/* Display the pixmap we said it to show */
DAShow();
/* Process events and keep the dockapp running */
DAEventLoop();
return 0;
}
/* Create our GC's to draw colored lines and such */
struct Colors*
setGCs(Drawable d)
{
struct Colors *colors;
XGCValues gcv;
unsigned long origColor;
char dashList[2] = {3, 1};
colors = malloc(sizeof(struct Colors));
if (colors == NULL)
return NULL;
/* Get the GC-values of the default GC */
XGetGCValues(DADisplay, DAGC,
GCForeground|GCBackground|GCGraphicsExposures, &gcv);
origColor = gcv.foreground;
/* don't send expose events */
gcv.graphics_exposures = False;
/* GC for white color */
gcv.foreground = WhitePixel(DADisplay, DefaultScreen(DADisplay));
colors->white = XCreateGC(DADisplay, d,
GCForeground|GCGraphicsExposures, &gcv);
/* GC for dark blue color */
#if 1
gcv.foreground = DAGetColor("navy");
#else
gcv.foreground = 0;
#endif
colors->black = XCreateGC(DADisplay, d,
GCForeground|GCGraphicsExposures, &gcv);
/* GC for light borders */
gcv.foreground = DAGetColor("lightGray");
colors->lightGray = XCreateGC(DADisplay, d,
GCForeground|GCGraphicsExposures, &gcv);
/* GC for dark borders (note re-use of gcv-values) */
gcv.foreground = DAGetColor("#222222");
colors->darkGray = XCreateGC(DADisplay, d,
GCForeground|GCGraphicsExposures, &gcv);
/* GC for the un-/highlighted colors and dashed line of the slider */
gcv.foreground = origColor;
gcv.line_width = 9;
gcv.line_style = LineOnOffDash;
colors->slider = XCreateGC(DADisplay, d,
GCForeground|GCBackground|GCGraphicsExposures|
GCLineWidth|GCLineStyle, &gcv);
XSetDashes(DADisplay, colors->slider, 1, dashList, 2);
/* light slider GC */
gcv.foreground = adjustColor(origColor, +0x40);
colors->sliderLight = XCreateGC(DADisplay, d,
GCForeground|GCBackground|GCGraphicsExposures|
GCLineWidth|GCLineStyle, &gcv);
XSetDashes(DADisplay, colors->sliderLight, 1, dashList, 2);
/* dark slider GC */
gcv.foreground = adjustColor(origColor, -0x40);
colors->sliderDark = XCreateGC(DADisplay, d,
GCForeground|GCBackground|GCGraphicsExposures|
GCLineWidth|GCLineStyle, &gcv);
XSetDashes(DADisplay, colors->sliderDark, 1, dashList, 2);
return colors;
}
/* Make a (GC) color lighter or darker */
unsigned long
adjustColor(unsigned long color, signed int adjustment)
{
signed long r, g, b;
r = color >> 16;
g = (color - (r << 16)) >> 8;
b = (color - (g << 8) - (r << 16));
r += adjustment;
g += adjustment;
b += adjustment;
if (r > 0xff) r = 0xff;
if (g > 0xff) g = 0xff;
if (b > 0xff) b = 0xff;
if (r < 0) r = 0;
if (g < 0) g = 0;
if (b < 0) b = 0;
return ((unsigned short)r << 16) +
((unsigned short)g << 8) +
(unsigned short)b;
}
void
setPointerColor(GC color)
{
XGCValues gcv;
XColor fcolor, bcolor;
XGetGCValues(DADisplay, color, GCForeground, &gcv);
fcolor.pixel = gcv.foreground;
fcolor.flags = DoRed|DoGreen|DoBlue;
bcolor.red = 0;
bcolor.green = 0;
bcolor.blue = 0;
XRecolorCursor(DADisplay, pointer, &fcolor, &bcolor);
}
/* event handlers functions */
void destroy(void){}
void buttonPress(int button, int state, int x, int y)
{
int *data = malloc(sizeof(int*));
*data = button;
DAProcessActionRects(x, y, actionRects[0], 3, (void*)data);
free(data);
}
void buttonRelease(int button, int state, int x, int y)
{
DAProcessActionRects(x, y, actionRects[1], 2, NULL);
}
void
mouseMove(int x, int y)
{
DAProcessActionRects(x, y, actionRects[2], 1, NULL);
}
void
mouseEnter(void)
{
mouseIn = 1;
drawSlider(actionRects[3][0].rect);
}
void
mouseLeave(void)
{
mouseIn = 0;
/* mouse pointer left the dockapp window */
DAProcessActionRects(0, 0, actionRects[4], 2, NULL);
/* if the button is still depressed, make it go up again. */
/* TODO: Use data in actionRects[4] here instead of below check */
if (buttonDown != NULL) {
btnUp(0, 0, *buttonDown, NULL);
}
drawSlider(actionRects[4][1].rect);
}
/* what to do for a specific event for every 'item' in the dockapp */
/* Button that can be pressed "down" and jumps back "up" again */
void
btnDown(int x, int y, DARect rect, void *data)
{
buttonDown = &rect;
drawSunkenFrame(rect);
}
void
btnUp(int x, int y, DARect rect, void *data)
{
buttonDown = NULL;
drawRaisedFrame(rect);
}
void
btnLeave(int x, int y, DARect rect, void *data)
{
if (buttonDown == NULL) return;
drawRaisedFrame(rect);
}
/* Square that tells which button was pressed (number) */
void
squareDown(int x, int y, DARect rect, void *data)
{
int button;
if (data) {
int *tmp = (int*)data;
button = *tmp;
} else
button = 0;
drawSquare(rect, button);
}
/* A draggable slider that highlights when the mouse is over it */
void
sliderDown(int x, int y, DARect rect, void *data)
{
buttonDown = &rect;
setPointerColor(colors->sliderDark);
}
void
sliderUp(int x, int y, DARect rect, void *data)
{
buttonDown = NULL;
setPointerColor(colors->black);
}
void
sliderMove(int x, int y, DARect rect, void *data)
{
if (buttonDown == NULL /* ||
rect.x != buttonDown->x ||
rect.y != buttonDown->y ||
rect.width != buttonDown->width ||
rect.height != buttonDown->height */)
{
return;
}
sliderPos = (float)(rect.height - y)/(float)rect.height;
if (sliderPos > 1.0) sliderPos = 1.0;
if (sliderPos < 0.0) sliderPos = 0.0;
drawSlider(rect);
}
void sliderEnter(int x, int y, DARect rect, void *data) {}
void sliderLeave(int x, int y, DARect rect, void *data) {}
/*
* Drawing functions
*/
void
createBtn(DARect rect)
{
/* fill square excluding borders */
XFillRectangle(DADisplay, pixmap, colors->lightGray,
rect.x +1, rect.y +1, rect.width -2, rect.height -2);
drawRaisedFrame(rect);
}
void
drawRaisedFrame(DARect rect)
{
/* left border */
XDrawLine(DADisplay, pixmap, colors->white,
rect.x, rect.y, rect.x, rect.y + rect.height -2);
/* top border */
XDrawLine(DADisplay, pixmap, colors->white,
rect.x +1, rect.y, rect.width -1, rect.y);
/* bottom border */
XDrawLine(DADisplay, pixmap, colors->darkGray,
rect.x, rect.y + rect.height -1,
rect.x + rect.width -1, rect.y + rect.height -1);
/* right border */
XDrawLine(DADisplay, pixmap, colors->darkGray,
rect.x + rect.width -1, rect.y +1,
rect.x + rect.width -1, rect.y + rect.height -2);
DASetPixmap(pixmap);
}
void
drawSunkenFrame(DARect rect)
{
/* left border */
XDrawLine(DADisplay, pixmap, colors->darkGray,
rect.x, rect.y, rect.x, rect.y + rect.height -2);
/* top border */
XDrawLine(DADisplay, pixmap, colors->darkGray,
rect.x +1, rect.y, rect.width -1, rect.y);
/* bottom border */
XDrawLine(DADisplay, pixmap, colors->white,
rect.x, rect.y + rect.height -1,
rect.x + rect.width -1, rect.y + rect.height -1);
/* right border */
XDrawLine(DADisplay, pixmap, colors->white,
rect.x + rect.width -1, rect.y +1,
rect.x + rect.width -1, rect.y + rect.height -2);
DASetPixmap(pixmap);
}
void
createSquare(DARect rect)
{
/* fill square excluding borders */
XFillRectangle(DADisplay, pixmap, colors->black,
rect.x +1, rect.y +1, rect.width -2, rect.height -2);
XDrawRectangle(DADisplay, pixmap, colors->lightGray,
rect.x, rect.y, rect.width -1, rect.height -1);
drawSquare(rect, 0);
}
void
drawSquare(DARect rect, int button)
{
char label[3];
XFillRectangle(DADisplay, pixmap, colors->black,
rect.x +1, rect.y +1, rect.width -2, rect.height -2);
snprintf(label, 3, "%2d", button);
XDrawString(DADisplay, pixmap, colors->white,
rect.x +3, rect.y + rect.height -5, label, 2);
DASetPixmap(pixmap);
}
void
createSlider(DARect rect)
{
/* fill square excluding borders */
XFillRectangle(DADisplay, pixmap, colors->black,
rect.x +1, rect.y +1, rect.width -2, rect.height -2);
drawSunkenFrame(rect);
drawSlider(rect);
}
void
drawSlider(DARect rect)
{
GC highColor, lowColor; /* determine colors to use */
if (mouseIn) {
highColor = colors->sliderLight;
lowColor = colors->slider;
} else {
highColor = colors->slider;
lowColor = colors->sliderDark;
}
/* Draw two lines from bottom to sliderPos fraction of height */
if (sliderPos < 1.0) {
XDrawLine(DADisplay, pixmap, highColor,
rect.x + 6, rect.y + rect.height -2,
rect.x + 6, rect.y + (1.0 - sliderPos) * (rect.height -2));
XDrawLine(DADisplay, pixmap, highColor,
rect.x + 17, rect.y + rect.height -2,
rect.x + 17, rect.y + (1.0 - sliderPos) * (rect.height -2));
}
if (sliderPos > 0.0) {
XDrawLine(DADisplay, pixmap, lowColor,
rect.x + 6, rect.y +1,
rect.x + 6, rect.y + (1.0 - sliderPos) * (rect.height -2));
XDrawLine(DADisplay, pixmap, lowColor,
rect.x + 17, rect.y +1,
rect.x + 17, rect.y + (1.0 - sliderPos) * (rect.height -2));
}
DASetPixmap(pixmap);
}
DAActionRect
setRectAction(DARect rect, DARectCallback action)
{
DAActionRect ar;
ar.rect = rect;
ar.action = action;
return ar;
}

View file

@ -0,0 +1,8 @@
fontdir = @FONTDIR@
dist_font_DATA = luxel-ascii-06x09.pcf.gz \
seg7-ascii-05x07.pcf.gz
install-data-hook:
@rm -f $(DESTDIR)$(fontdir)/font.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@

View file

@ -0,0 +1,503 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = fonts
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(dist_font_DATA)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(fontdir)"
DATA = $(dist_font_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DFLAGS = @DFLAGS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FCCACHE = @FCCACHE@
FGREP = @FGREP@
FONTDIR = @FONTDIR@
FONTROOTDIR = @FONTROOTDIR@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKFONTDIR = @MKFONTDIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RUN_FCCACHE = @RUN_FCCACHE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
Xext_CFLAGS = @Xext_CFLAGS@
Xext_LIBS = @Xext_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xpm_CFLAGS = @xpm_CFLAGS@
xpm_LIBS = @xpm_LIBS@
fontdir = @FONTDIR@
dist_font_DATA = luxel-ascii-06x09.pcf.gz \
seg7-ascii-05x07.pcf.gz
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fonts/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu fonts/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-dist_fontDATA: $(dist_font_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_font_DATA)'; test -n "$(fontdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(fontdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(fontdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(fontdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(fontdir)" || exit $$?; \
done
uninstall-dist_fontDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_font_DATA)'; test -n "$(fontdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(fontdir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(fontdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-dist_fontDATA
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-dist_fontDATA
.MAKE: install-am install-data-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
install-data-hook install-dist_fontDATA install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags-am uninstall uninstall-am uninstall-dist_fontDATA
install-data-hook:
@rm -f $(DESTDIR)$(fontdir)/font.dir
$(MKFONTDIR) $(DESTDIR)$(fontdir)
@RUN_FCCACHE@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

Binary file not shown.

Binary file not shown.

527
libdockapp/install-sh Executable file
View file

@ -0,0 +1,527 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 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 CONNEC-
# TION 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 deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

9661
libdockapp/ltmain.sh Normal file

File diff suppressed because it is too large Load diff

215
libdockapp/missing Executable file
View file

@ -0,0 +1,215 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU programs.
scriptversion=2013-10-28.13; # UTC
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, 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/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
case $1 in
--is-lightweight)
# Used by our autoconf macros to check whether the available missing
# script is modern enough.
exit 0
;;
--run)
# Back-compat with the calling convention used by older automake.
shift
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported PROGRAM values:
aclocal autoconf autoheader autom4te automake makeinfo
bison yacc flex lex help2man
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: unknown '$1' option"
echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
# Run the given program, remember its exit status.
"$@"; st=$?
# If it succeeded, we are done.
test $st -eq 0 && exit 0
# Also exit now if we it failed (or wasn't found), and '--version' was
# passed; such an option is passed most likely to detect whether the
# program is present and works.
case $2 in --version|--help) exit $st;; esac
# Exit code 63 means version mismatch. This often happens when the user
# tries to use an ancient version of a tool on a file that requires a
# minimum version.
if test $st -eq 63; then
msg="probably too old"
elif test $st -eq 127; then
# Program was missing.
msg="missing on your system"
else
# Program was found and executed, but failed. Give up.
exit $st
fi
perl_URL=http://www.perl.org/
flex_URL=http://flex.sourceforge.net/
gnu_software_URL=http://www.gnu.org/software
program_details ()
{
case $1 in
aclocal|automake)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/autoconf>"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
autoconf|autom4te|autoheader)
echo "The '$1' program is part of the GNU Autoconf package:"
echo "<$gnu_software_URL/autoconf/>"
echo "It also requires GNU m4 and Perl in order to run:"
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
esac
}
give_advice ()
{
# Normalize program name to check for.
normalized_program=`echo "$1" | sed '
s/^gnu-//; t
s/^gnu//; t
s/^g//; t'`
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
case $normalized_program in
autoconf*)
echo "You should only need it if you modified 'configure.ac',"
echo "or m4 files included by it."
program_details 'autoconf'
;;
autoheader*)
echo "You should only need it if you modified 'acconfig.h' or"
echo "$configure_deps."
program_details 'autoheader'
;;
automake*)
echo "You should only need it if you modified 'Makefile.am' or"
echo "$configure_deps."
program_details 'automake'
;;
aclocal*)
echo "You should only need it if you modified 'acinclude.m4' or"
echo "$configure_deps."
program_details 'aclocal'
;;
autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
program_details 'autom4te'
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
lex*|flex*)
echo "You should only need it if you modified a '.l' file."
echo "You may want to install the Fast Lexical Analyzer package:"
echo "<$flex_URL>"
;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
echo "You might want to install the Texinfo package:"
echo "<$gnu_software_URL/texinfo/>"
echo "The spurious makeinfo call might also be the consequence of"
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
echo "often tells you about the needed prerequisites for installing"
echo "this package. You may also peek at any GNU archive site, in"
echo "case some other package contains this missing '$1' program."
;;
esac
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
-e '2,$s/^/ /' >&2
# Propagate the correct exit status (expected to be 127 for a program
# not found, 63 for a program that failed due to version mismatch).
exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

View file

@ -0,0 +1,30 @@
# $Id: Makefile.am,v 1.7 2005/04/08 15:46:33 dalroi Exp $
AUTOMAKE_OPTIONS = no-dependencies
lib_LTLIBRARIES = libdockapp.la
libdockapp_la_LDFLAGS = -version-info 2:0:0 @X_LIBS@
include_HEADERS = dockapp.h
libdockapp_la_SOURCES = \
dockapp.h \
daargs.c\
dacallback.c \
dacolor.c \
daevent.c \
damain.c \
dapixmap.c \
darect.c \
dashaped.c \
dautil.c
# Include these in a distribution, but don't install
noinst_HEADERS = daargs.h dautil.h
AM_CFLAGS = $(X11_CFLAGS) $(Xext_CFLAGS) $(xpm_CFLAGS)
AM_CPPFLAGS = @X_CFLAGS@ @CPPFLAGS@ @DFLAGS@
LIBS += $(X11_LIBS) $(Xext_LIBS) $(xpm_LIBS)
LIBLIST = libdockapp.la @XLIBS@

676
libdockapp/src/Makefile.in Normal file
View file

@ -0,0 +1,676 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# $Id: Makefile.am,v 1.7 2005/04/08 15:46:33 dalroi Exp $
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(include_HEADERS) $(noinst_HEADERS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libdockapp_la_LIBADD =
am_libdockapp_la_OBJECTS = daargs.lo dacallback.lo dacolor.lo \
daevent.lo damain.lo dapixmap.lo darect.lo dashaped.lo \
dautil.lo
libdockapp_la_OBJECTS = $(am_libdockapp_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libdockapp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libdockapp_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libdockapp_la_SOURCES)
DIST_SOURCES = $(libdockapp_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(include_HEADERS) $(noinst_HEADERS)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DFLAGS = @DFLAGS@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FCCACHE = @FCCACHE@
FGREP = @FGREP@
FONTDIR = @FONTDIR@
FONTROOTDIR = @FONTROOTDIR@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ $(X11_LIBS) $(Xext_LIBS) $(xpm_LIBS)
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MKFONTDIR = @MKFONTDIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
RUN_FCCACHE = @RUN_FCCACHE@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
Xext_CFLAGS = @Xext_CFLAGS@
Xext_LIBS = @Xext_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
xpm_CFLAGS = @xpm_CFLAGS@
xpm_LIBS = @xpm_LIBS@
AUTOMAKE_OPTIONS = no-dependencies
lib_LTLIBRARIES = libdockapp.la
libdockapp_la_LDFLAGS = -version-info 2:0:0 @X_LIBS@
include_HEADERS = dockapp.h
libdockapp_la_SOURCES = \
dockapp.h \
daargs.c\
dacallback.c \
dacolor.c \
daevent.c \
damain.c \
dapixmap.c \
darect.c \
dashaped.c \
dautil.c
# Include these in a distribution, but don't install
noinst_HEADERS = daargs.h dautil.h
AM_CFLAGS = $(X11_CFLAGS) $(Xext_CFLAGS) $(xpm_CFLAGS)
AM_CPPFLAGS = @X_CFLAGS@ @CPPFLAGS@ @DFLAGS@
LIBLIST = libdockapp.la @XLIBS@
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libdockapp.la: $(libdockapp_la_OBJECTS) $(libdockapp_la_DEPENDENCIES) $(EXTRA_libdockapp_la_DEPENDENCIES)
$(AM_V_CCLD)$(libdockapp_la_LINK) -rpath $(libdir) $(libdockapp_la_OBJECTS) $(libdockapp_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
.c.o:
$(AM_V_CC)$(COMPILE) -c -o $@ $<
.c.obj:
$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
$(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-includeHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am \
install-includeHEADERS install-info install-info-am \
install-libLTLIBRARIES install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
uninstall-libLTLIBRARIES
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

345
libdockapp/src/daargs.c Normal file
View file

@ -0,0 +1,345 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban G. Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: daargs.c,v 1.9 2008/05/01 09:49:06 dalroi Exp $
*/
#include <assert.h>
#include <string.h>
#include "daargs.h"
#include "dautil.h"
#define DEFAULT_OPTION_COUNT 3
extern struct DAContext *_daContext;
/*
* Prototypes
*/
static void _daContextAddDefaultOptions();
static void _daContextAddOptions(DAProgramOption *options, int count);
static void printHelp(char *description);
int contains(char *needle, char *haystack);
int parseOption(DAProgramOption *option, int i, int argc, char** argv);
int readIntOption(int index, char **argv);
/*
* Public functions
*/
void
DAParseArguments(
int argc,
char **argv,
DAProgramOption *options,
int count,
char *programDescription,
char *versionDescription)
{
int i, j, size;
int found = 0;
_daContext = DAContextInit();
_daContext->argc = argc;
_daContext->argv = argv;
_daContext->programName = argv[0];
size = (count + DEFAULT_OPTION_COUNT) * sizeof(DAProgramOption*);
_daContext->options = malloc(size);
memset(_daContext->options, 0, size);
_daContextAddDefaultOptions();
_daContextAddOptions(options, count);
for (i = 1; i < argc; i++) {
char *optStr = argv[i];
/* Handle default options */
if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0)
printHelp(programDescription), exit(0);
if (strcmp(argv[i], "-v") == 0 || strcmp(argv[i], "--version") == 0)
puts(versionDescription), exit(0);
if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--windowed") == 0) {
_daContext->windowed = 1;
continue;
}
found = 0;
/* options with a one-to-one mapping */
for (j = 0; j < count; j++) {
DAProgramOption *option = &options[j];
if ((option->longForm && strcmp(option->longForm, optStr) == 0)
|| (option->shortForm && strcmp(option->shortForm, optStr) == 0)) {
found = 1;
i = parseOption(option, i, argc, argv);
}
}
/* mixed options */
if (!found) {
/* XXX: Parsing all options again... */
for (j = 0; j < count; j++) {
DAProgramOption *option = &options[j];
if (option->shortForm && contains(option->shortForm, optStr)) {
found = 1;
i = parseOption(option, i, argc, argv);
}
}
}
if (!found) {
printf("%s: unrecognized option '%s'\n", argv[0], argv[i]);
printHelp(programDescription), exit(1);
}
}
}
int
contains(char *needle, char *haystack)
{
char c, *pos;
assert(strlen(needle) == 2);
c = needle[1];
pos = strchr(haystack, c);
return (pos != NULL);
}
int
parseOption(DAProgramOption *option, int i, int argc, char** argv)
{
option->used = True;
if (option->type == DONone)
return i;
i++;
if (i >= argc)
printf("%s: missing argument for option '%s'\n",
argv[0],
argv[i-1]),
exit(1);
switch (option->type) {
case DOInteger:
*option->value.integer = readIntOption(i, argv);
break;
case DONatural:
*option->value.integer = readIntOption(i, argv);
if (*option->value.integer < 0)
printf("%s: argument %s must be >= 0\n",
argv[0],
argv[i-1]),
exit(1);
break;
case DOString:
*option->value.string = argv[i];
break;
}
return i;
}
int
readIntOption(int index, char **argv)
{
int integer;
if (sscanf(argv[index], "%i", &integer) != 1)
DAError("error parsing argument for option %s\n", argv[index-1]),
exit(1);
return integer;
}
int
DAGetArgC()
{
return _daContext->argc;
}
char**
DAGetArgV()
{
return _daContext->argv;
}
char*
DAGetProgramName()
{
return _daContext->programName;
}
/*
* Local functions
*/
struct DAContext*
DAContextInit()
{
struct DAContext *context = malloc(sizeof(struct DAContext));
memset(context, 0, sizeof(struct DAContext));
return context;
}
void
DAFreeContext()
{
if (_daContext->optionCount > 0) {
int i;
for (i = 0; i < _daContext->optionCount; i++) {
free(_daContext->options[i]);
}
free(_daContext->options);
}
free(_daContext);
}
static void
_daContextAddOption(DAProgramOption *option)
{
/* If the buffer is full, double its size */
if (sizeof(_daContext->options) == _daContext->optionCount * sizeof(DAProgramOption))
{
DAProgramOption **options;
options = (DAProgramOption**)realloc(
(DAProgramOption**)_daContext->options,
2 * sizeof(_daContext->options));
if (options == NULL)
DAError("Out of memory");
_daContext->options = options;
}
_daContext->options[_daContext->optionCount] = option;
_daContext->optionCount++;
}
static void
_daContextAddOptionData(char *shortForm, char *longForm,
char *description, short type)
{
DAProgramOption *option = malloc(sizeof(DAProgramOption));
option->shortForm = shortForm;
option->longForm = longForm;
option->description = description;
option->type = type;
option->used = False;
option->value.ptr = NULL;
_daContextAddOption(option);
}
static void
_daContextAddDefaultOptions()
{
_daContextAddOptionData("-h", "--help", "show this help text and exit", DONone);
_daContextAddOptionData("-v", "--version", "show program version and exit", DONone);
_daContextAddOptionData("-w", "--windowed", "run the application in windowed mode", DONone);
}
static void
_daContextAddOptions(DAProgramOption *options, int count)
{
int i;
for (i = 0; i < count; i++) {
_daContextAddOptionData(
options[i].shortForm,
options[i].longForm,
options[i].description,
options[i].type);
}
}
static void
printHelp(char *description)
{
int i;
DAProgramOption **options = _daContext->options;
int count = _daContext->optionCount;
printf("Usage: %s [OPTIONS]\n", _daContext->programName);
if (description)
puts(description);
for (i = 0; i < count; i++)
{
char blank[30];
int c;
if (options[i]->shortForm && options[i]->longForm)
c = printf(" %s, %s", options[i]->shortForm, options[i]->longForm);
else if (options[i]->shortForm)
c = printf(" %s", options[i]->shortForm);
else if (options[i]->longForm)
c = printf(" %s", options[i]->longForm);
else
continue;
if (options[i]->type != DONone) {
switch (options[i]->type) {
case DOInteger:
c += printf(" <integer>");
break;
case DOString:
c += printf(" <string>");
break;
case DONatural:
c += printf(" <number>");
break;
}
}
memset(blank, ' ', 30);
if (c > 29)
c = 1;
blank[30-c] = 0;
printf("%s %s\n", blank, options[i]->description);
}
}

48
libdockapp/src/daargs.h Normal file
View file

@ -0,0 +1,48 @@
/*
* Copyright (c) 2005 Alban G. Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: daargs.h,v 1.3 2005/04/17 17:15:33 dalroi Exp $
*/
#include "dockapp.h"
/*
* Context structure to keep track of globals
*/
struct DAContext {
int argc; /* Raw input data */
char **argv;
int windowed;
int width, height;
int timeOut;
DACallbacks callbacks;
char *programName; /* shortcut to argv[0] */
DAProgramOption **options; /* Array of option pointers */
short optionCount;
};
struct DAContext* DAContextInit();
void DAFreeContext();

View file

@ -0,0 +1,58 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: dacallback.c,v 1.4 2005/04/17 11:52:31 dalroi Exp $
*/
#include "dockapp.h"
#include "daargs.h"
extern struct DAContext *_daContext;
void
DASetCallbacks(DACallbacks *callbacks)
{
long mask = 0;
_daContext->callbacks = *callbacks;
if (callbacks->destroy)
mask |= StructureNotifyMask;
if (callbacks->buttonPress)
mask |= ButtonPressMask;
if (callbacks->buttonRelease)
mask |= ButtonReleaseMask;
if (callbacks->motion)
mask |= PointerMotionMask;
if (callbacks->enter)
mask |= EnterWindowMask;
if (callbacks->leave)
mask |= LeaveWindowMask;
XSelectInput(DADisplay, DAWindow, mask);
XFlush(DADisplay);
}
void
DASetTimeout(int milliseconds)
{
_daContext->timeOut = milliseconds;
}

47
libdockapp/src/dacolor.c Normal file
View file

@ -0,0 +1,47 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: dacolor.c,v 1.4 2005/04/20 18:05:04 dalroi Exp $
*/
#include "dockapp.h"
#include "daargs.h"
#include "dautil.h"
extern struct DAContext *_daContext;
unsigned long
DAGetColor(char *colorName)
{
XColor color;
if (!XParseColor(DADisplay,
DefaultColormap(DADisplay, DefaultScreen(DADisplay)),
colorName, &color))
DAError("could not parse color %s", colorName);
if (!XAllocColor(DADisplay, DefaultColormap(DADisplay, DefaultScreen(DADisplay)), &color)) {
DAWarning("could not allocate color %s. Using black instead", colorName);
return BlackPixel(DADisplay, DefaultScreen(DADisplay));
}
return color.pixel;
}

160
libdockapp/src/daevent.c Normal file
View file

@ -0,0 +1,160 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: daevent.c,v 1.8 2005/04/17 17:15:33 dalroi Exp $
*/
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <string.h>
#include "dockapp.h"
#include "daargs.h"
#include "dautil.h"
extern struct DAContext *_daContext;
extern Atom WM_DELETE_WINDOW;
Bool
DAProcessEvent(XEvent *event)
{
if (event->xany.window == DAWindow)
return DAProcessEventForWindow(DAWindow, event);
else if (event->xany.window == DALeader)
/* XXX: Is this superfluous now that DAWindow always references the
* dockapp window?
*/
return DAProcessEventForWindow(DALeader, event);
else
/* XXX: What about handling events for child windows? */
return False;
}
Bool
DAProcessEventForWindow(Window window, XEvent *event)
{
if (event->xany.window != window)
return False;
switch (event->type) {
case ClientMessage:
if (event->xclient.data.l[0] != WM_DELETE_WINDOW) {
break;
}
/* fallthrough */
case DestroyNotify:
if (_daContext->callbacks.destroy)
(*_daContext->callbacks.destroy)();
DAFreeContext();
XCloseDisplay(DADisplay);
#ifdef DEBUG
debug("%s: DestroyNotify\n", _daContext->programName);
#endif
exit(0);
break;
case ButtonPress:
if (_daContext->callbacks.buttonPress)
(*_daContext->callbacks.buttonPress)(event->xbutton.button,
event->xbutton.state,
event->xbutton.x,
event->xbutton.y);
break;
case ButtonRelease:
if (_daContext->callbacks.buttonRelease)
(*_daContext->callbacks.buttonRelease)(event->xbutton.button,
event->xbutton.state,
event->xbutton.x,
event->xbutton.y);
break;
case MotionNotify:
if (_daContext->callbacks.motion)
(*_daContext->callbacks.motion)(event->xmotion.x,
event->xmotion.y);
break;
case EnterNotify:
if (_daContext->callbacks.enter)
(*_daContext->callbacks.enter)();
break;
case LeaveNotify:
if (_daContext->callbacks.leave)
(*_daContext->callbacks.leave)();
break;
default:
return False;
}
return True;
}
void
DAEventLoop(void)
{
DAEventLoopForWindow(DAWindow);
}
void
DAEventLoopForWindow(Window window)
{
XEvent event;
for (;;) {
if (_daContext->timeOut >= 0) {
if (!DANextEventOrTimeout(&event, _daContext->timeOut)) {
if (_daContext->callbacks.timeout)
(*_daContext->callbacks.timeout)();
continue;
}
}
else
XNextEvent(DADisplay, &event);
DAProcessEventForWindow(window, &event);
}
}
Bool
DANextEventOrTimeout(XEvent *event, unsigned long milliseconds)
{
struct timeval timeout;
fd_set rset;
XSync(DADisplay, False);
if (XPending(DADisplay)) {
XNextEvent(DADisplay, event);
return True;
}
timeout.tv_sec = milliseconds / 1000;
timeout.tv_usec = (milliseconds % 1000) * 1000;
FD_ZERO(&rset);
FD_SET(ConnectionNumber(DADisplay), &rset);
if (select(ConnectionNumber(DADisplay)+1, &rset, NULL, NULL, &timeout) > 0) {
XNextEvent(DADisplay, event);
return True;
}
return False;
}

242
libdockapp/src/damain.c Normal file
View file

@ -0,0 +1,242 @@
/*
* Copyright (c) 1999-2003 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: damain.c,v 1.16 2005/04/20 18:05:04 dalroi Exp $
*/
#include "dockapp.h"
#include "daargs.h"
#include "dautil.h"
#define MIN(a, b) (a < b ? a : b)
struct DAContext *_daContext;
DARect DANoRect = {0, 0, 0, 0};
Display *DADisplay = NULL;
Window DALeader = None;
Window DAIcon = None;
Window DAWindow = None;
int DADepth = 0;
Visual *DAVisual = NULL;
unsigned long DAExpectedVersion = 0;
GC DAGC = NULL, DAClearGC = NULL;
DARect DAPreferredIconSizes = {-1, -1, 0, 0};
Atom WM_DELETE_WINDOW;
void
DAOpenDisplay(char *display, int argc, char **argv)
{
/* Open Connection to X Server */
DADisplay = XOpenDisplay(display);
if (!DADisplay) {
printf("%s: could not open display %s!\n", _daContext->programName,
XDisplayName(display));
exit(EXIT_FAILURE);
}
DADepth = DefaultDepth(DADisplay, DefaultScreen(DADisplay));
DAVisual = DefaultVisual(DADisplay, DefaultScreen(DADisplay));
DAGC = DefaultGC(DADisplay, DefaultScreen(DADisplay));
}
void
DAProposeIconSize(unsigned width, unsigned height)
{
XIconSize *iconSizes;
int nrSizes = 0;
_daContext->width = width;
_daContext->height = height;
/* Get the nearest allowed icon size if the WM specifies such */
iconSizes = XAllocIconSize();
if (XGetIconSizes(DADisplay, DefaultRootWindow(DADisplay),
&iconSizes, &nrSizes)) {
int i;
int da = -1;
int min_w = -1, min_h = -1;
int max_w = 0, max_h = 0;
for (i = 0; i < nrSizes; i++) {
int w1, h1, w, h;
if ((max_w < iconSizes[i].max_width) ||
(max_h < iconSizes[i].max_height)) {
max_w = iconSizes[i].max_width;
max_h = iconSizes[i].max_height;
}
if ((min_w > iconSizes[i].min_width) ||
(min_h > iconSizes[i].min_height) ||
(min_w == -1)) {
min_w = iconSizes[i].min_width;
min_h = iconSizes[i].min_height;
}
if ((width > iconSizes[i].max_width) ||
(width < iconSizes[i].min_width) ||
(height > iconSizes[i].max_height) ||
(height < iconSizes[i].min_height))
continue;
w1 = (iconSizes[i].max_width - width ) % iconSizes[i].width_inc;
h1 = (iconSizes[i].max_height - height) % iconSizes[i].height_inc;
w = MIN(w1, iconSizes[i].width_inc - w1);
h = MIN(h1, iconSizes[i].height_inc - h1);
if ((w * h < da) || (da == -1)) {
_daContext->width = width + w;
_daContext->height = height + h;
da = w * h;
}
}
DAPreferredIconSizes.x = min_w;
DAPreferredIconSizes.y = min_h;
DAPreferredIconSizes.width = max_w;
DAPreferredIconSizes.height = max_h;
if (da == -1) { /* requested size is out of bounds */
DAWarning("Requested icon-size (%d x %d) is out of the range "
"allowed by the window manager\n",
_daContext->width, _daContext->height);
}
}
XFree(iconSizes);
}
void
DACreateIcon(char *name, unsigned width, unsigned height, int argc, char **argv)
{
XClassHint *classHint;
XWMHints *wmHints;
XGCValues gcv;
unsigned long valueMask;
char *resourceValue;
_daContext->width = width;
_daContext->height = height;
/* Create Windows */
DALeader = XCreateSimpleWindow(DADisplay, DefaultRootWindow(DADisplay),
0, 0, width, height, 0, 0, 0);
if (! _daContext->windowed) {
DAIcon = XCreateSimpleWindow(DADisplay, DefaultRootWindow(DADisplay),
0, 0, width, height, 0, 0, 0);
DAWindow = DAIcon;
} else {
DAIcon = None;
DAWindow = DALeader;
}
/* Set ClassHint */
if (!(classHint = XAllocClassHint()))
printf("%s: can't allocate memory for class hints!\n",
_daContext->programName), exit(1);
classHint->res_class = RES_CLASSNAME;
classHint->res_name = name;
XSetClassHint(DADisplay, DALeader, classHint);
XFree(classHint);
/* Set WMHints */
if (!(wmHints = XAllocWMHints()))
printf("%s: can't allocate memory for wm hints!\n",
_daContext->programName), exit(1);
wmHints->flags = WindowGroupHint;
wmHints->window_group = DALeader;
if (!_daContext->windowed) {
wmHints->flags |= IconWindowHint|StateHint;
wmHints->icon_window = DAIcon;
wmHints->initial_state = WithdrawnState;
}
XSetWMHints(DADisplay, DALeader, wmHints);
XFree(wmHints);
/* Set WMProtocols */
WM_DELETE_WINDOW = XInternAtom(DADisplay, "WM_DELETE_WINDOW", True);
XSetWMProtocols(DADisplay, DALeader, &WM_DELETE_WINDOW, 1);
/* Set Command to start the app so it can be docked properly */
XSetCommand(DADisplay, DALeader, argv, argc);
gcv.graphics_exposures = False;
valueMask = GCGraphicsExposures;
/* continue setting the foreground GC */
resourceValue = XGetDefault(DADisplay, RES_CLASSNAME, "foreground");
if (resourceValue) {
gcv.foreground = DAGetColor(resourceValue);
valueMask |= GCForeground;
}
XChangeGC(DADisplay, DAGC, valueMask, &gcv);
/* set background GC values before setting value for foreground */
resourceValue = XGetDefault(DADisplay, RES_CLASSNAME, "background");
if (resourceValue) {
gcv.foreground = DAGetColor(resourceValue);
}
DAClearGC = XCreateGC(DADisplay, DAWindow,
GCGraphicsExposures|GCForeground, &gcv);
XFlush(DADisplay);
}
void
DAShow(void)
{
DAShowWindow(DALeader);
}
void
DAShowWindow(Window window)
{
XMapRaised(DADisplay, window);
if ((window == DALeader) && !_daContext->windowed) {
XMapSubwindows(DADisplay, DAIcon);
} else {
XMapSubwindows(DADisplay, window);
}
XFlush(DADisplay);
}
/* Deprecated */
void
DAInitialize(char *display, char *name, unsigned width, unsigned height,
int argc, char **argv)
{
DAOpenDisplay(display, argc, argv);
DACreateIcon(name, width, height, argc, argv);
}

141
libdockapp/src/dapixmap.c Normal file
View file

@ -0,0 +1,141 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: dapixmap.c,v 1.11 2005/04/20 18:14:49 dalroi Exp $
*/
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include <X11/Xatom.h>
#include "dockapp.h"
#include "daargs.h"
extern struct DAContext *_daContext;
/* Local typedef */
typedef enum {
daXpmSourceData,
daXpmSourceFile
} daXpmSource;
/* Function prototype */
Bool _daMakePixmap(daXpmSource source,
char **data, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height);
void
DASetShapeWithOffset(Pixmap shapeMask, int x_ofs, int y_ofs)
{
DASetShapeWithOffsetForWindow(DAWindow, shapeMask, x_ofs, y_ofs);
}
void
DASetShapeWithOffsetForWindow(Window window, Pixmap shapeMask,
int x_ofs, int y_ofs)
{
XShapeCombineMask(DADisplay, window, ShapeBounding, -x_ofs, -y_ofs,
shapeMask, ShapeSet);
XFlush(DADisplay);
}
void
DASetPixmap(Pixmap pixmap)
{
DASetPixmapForWindow(DAWindow, pixmap);
}
void
DASetPixmapForWindow(Window window, Pixmap pixmap)
{
XSetWindowBackgroundPixmap(DADisplay, window, pixmap);
XClearWindow(DADisplay, window);
XFlush(DADisplay);
}
Pixmap
DAMakePixmap(void)
{
return (XCreatePixmap(DADisplay, DAWindow,
_daContext->width, _daContext->height,
DADepth));
}
Pixmap
DAMakeShape(void)
{
return (XCreatePixmap(DADisplay, DAWindow,
_daContext->width, _daContext->height,
1));
}
Bool
DAMakePixmapFromData(char **data, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height)
{
return _daMakePixmap(daXpmSourceData, data,
pixmap, mask,
width, height);
}
Bool
DAMakePixmapFromFile(char *filename, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height)
{
if (access(filename, R_OK) < 0)
return False;
return _daMakePixmap(daXpmSourceFile, (char**)filename,
pixmap, mask,
width, height);
}
Bool
_daMakePixmap(daXpmSource source,
char **data, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height)
{
XpmAttributes xpmAttr;
xpmAttr.valuemask = XpmCloseness;
xpmAttr.closeness = 40000;
if (source == daXpmSourceData
&& (XpmCreatePixmapFromData(
DADisplay, DAWindow, data, pixmap, mask, &xpmAttr) != 0))
return False;
else if (source == daXpmSourceFile
&& (XpmReadFileToPixmap(
DADisplay, DAWindow, (char*)data, pixmap, mask, &xpmAttr) != 0))
return False;
*width = xpmAttr.width;
*height = xpmAttr.height;
return True;
}

53
libdockapp/src/darect.c Normal file
View file

@ -0,0 +1,53 @@
/*
* Copyright (c) 2002-2005 Alban Hertroys
*
* 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
* AUTHOR 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.
* $Id: darect.c,v 1.3 2005/04/17 11:52:32 dalroi Exp $
*/
#include "dockapp.h"
/* TODO: Add a feature to detect the pointer entering/leaving a rectangle */
void
DAProcessActionRects(int x, int y, DAActionRect *actionrects, int count,
void *data)
{
int index = 0;
if (!actionrects)
return;
while ( (index < count) &&
((x < actionrects[index].rect.x) ||
(x > actionrects[index].rect.x + actionrects[index].rect.width) ||
(y < actionrects[index].rect.y) ||
(y > actionrects[index].rect.y + actionrects[index].rect.height)))
index++;
if (index == count)
return;
if (actionrects[index].action)
(*actionrects[index].action)(x - actionrects[index].rect.x,
y - actionrects[index].rect.y,
actionrects[index].rect,
data);
}

197
libdockapp/src/dashaped.c Normal file
View file

@ -0,0 +1,197 @@
/*
* Copyright (c) 2002-2005 Alban G. Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: dashaped.c,v 1.11 2008/05/01 09:49:06 dalroi Exp $
*/
#include <assert.h>
#include <string.h>
#include "dockapp.h"
#include "daargs.h"
/*
* DAShapedPixmap functions
*/
/* Local typedef */
typedef enum {
daShapeSourceData,
daShapeSourceFile
} daShapeSource;
/* local functions */
void setGCs(DAShapedPixmap *dasp);
DAShapedPixmap* _daMakeShapedPixmap(daShapeSource source, char **data);
extern struct DAContext *_daContext;
/* Create a new shaped pixmap with width & height of dockapp window */
DAShapedPixmap*
DAMakeShapedPixmap()
{
DAShapedPixmap *dasp = malloc(sizeof(DAShapedPixmap));
if (dasp == NULL)
return NULL;
memset(dasp, 0, sizeof(DAShapedPixmap));
dasp->pixmap = DAMakePixmap();
dasp->shape = DAMakeShape();
dasp->geometry.width = _daContext->width;
dasp->geometry.height = _daContext->height;
setGCs(dasp);
DASPClear(dasp);
return dasp;
}
/* Create a new shaped pixmap from XPM-data */
DAShapedPixmap*
DAMakeShapedPixmapFromData(char **data)
{
return _daMakeShapedPixmap(daShapeSourceData, data);
}
/* Create a new shaped pixmap from XPM-data */
DAShapedPixmap*
DAMakeShapedPixmapFromFile(char *filename)
{
return _daMakeShapedPixmap(daShapeSourceFile, (char**)filename);
}
/* Free memory reserved for a shaped pixmap */
void
DAFreeShapedPixmap(DAShapedPixmap *dasp)
{
assert(dasp);
XFreePixmap(DADisplay, dasp->pixmap);
XFreePixmap(DADisplay, dasp->shape);
XFreeGC(DADisplay, dasp->shapeGC);
free(dasp);
}
/* Copy shape-mask and pixmap-data from an area in one shaped pixmap
* into another shaped pixmap */
void
DASPCopyArea(DAShapedPixmap *src, DAShapedPixmap *dst, int x1, int y1, int w, int h, int x2, int y2)
{
assert(src != NULL && dst != NULL);
XCopyPlane(DADisplay, src->shape, dst->shape, src->shapeGC, x1, y1, w, h, x2, y2, 1);
XCopyArea(DADisplay, src->pixmap, dst->pixmap, src->drawGC, x1, y1, w, h, x2, y2);
}
/* Clear a shaped pixmap */
void
DASPClear(DAShapedPixmap *dasp)
{
XGCValues gcv;
assert(dasp != NULL);
gcv.foreground = 0;
XChangeGC(DADisplay, dasp->shapeGC, GCForeground, &gcv);
/* Clear pixmaps */
XFillRectangle(DADisplay, dasp->pixmap,
DAClearGC, 0, 0, dasp->geometry.width, dasp->geometry.height);
XFillRectangle(DADisplay, dasp->shape,
dasp->shapeGC, 0, 0, dasp->geometry.width, dasp->geometry.height);
gcv.foreground = 1;
XChangeGC(DADisplay, dasp->shapeGC, GCForeground, &gcv);
}
/* Show the pixmap in the dockapp-window */
void
DASPSetPixmap(DAShapedPixmap *dasp)
{
DASPSetPixmapForWindow(DAWindow, dasp);
}
void
DASPSetPixmapForWindow(Window window, DAShapedPixmap *dasp)
{
assert(dasp != NULL);
DASetShapeForWindow(window, dasp->shape);
DASetPixmapForWindow(window, dasp->pixmap);
}
void
setGCs(DAShapedPixmap *dasp)
{
XGCValues gcv;
dasp->drawGC = DAGC;
dasp->clearGC = DAClearGC;
/* create GC for bit-plane operations in shapes */
gcv.graphics_exposures = False;
gcv.foreground = 1;
gcv.background = 0;
gcv.plane_mask = 1;
dasp->shapeGC = XCreateGC(
DADisplay,
dasp->shape,
GCGraphicsExposures|GCForeground|GCBackground|GCPlaneMask,
&gcv);
}
/* Create a new shaped pixmap using specified method */
DAShapedPixmap*
_daMakeShapedPixmap(daShapeSource source, char **data)
{
Bool success;
DAShapedPixmap *dasp = malloc(sizeof(DAShapedPixmap));
if (dasp == NULL)
return NULL;
memset(dasp, 0, sizeof(DAShapedPixmap));
if (source == daShapeSourceData)
success = DAMakePixmapFromData(data, &dasp->pixmap, &dasp->shape,
&dasp->geometry.width, &dasp->geometry.height);
else
success = DAMakePixmapFromFile((char*)data, &dasp->pixmap, &dasp->shape,
&dasp->geometry.width, &dasp->geometry.height);
if (!success)
return NULL;
setGCs(dasp);
return dasp;
}

210
libdockapp/src/dautil.c Normal file
View file

@ -0,0 +1,210 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban G. Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: dautil.c,v 1.9 2008/05/01 09:49:06 dalroi Exp $
*/
#include <string.h>
#include "daargs.h"
#include "dautil.h"
extern struct DAContext *_daContext;
/*
* Function prototypes
*/
void _message(const char *label, const char *fmt, va_list args);
/*
* Exported functions.
*/
void
DASetExpectedVersion(unsigned long expectedVersion)
{
DAExpectedVersion = expectedVersion;
if (expectedVersion > DA_VERSION)
DAWarning("Version of libdockapp (%u) is older than "
"version expected (%u)",
DA_VERSION,
DAExpectedVersion);
}
Display*
DAGetDisplay(char *d, ...)
{
/* Be backward compatible */
if (DAExpectedVersion < 20030126) {
va_list ap;
int argc;
char **argv;
va_start(ap, d);
argc = va_arg(ap, int);
argv = va_arg(ap, char**);
va_end(ap);
DAOpenDisplay(d, argc, argv);
DAWarning("Expected version of libdockapp is not set.");
DAWarning("Obsolete call to DAGetDisplay().");
return NULL;
}
return DADisplay;
}
void
DASetDisplay(Display *display)
{
DADisplay = display;
}
Window
DAGetWindow(void)
{
return DAWindow;
}
void
DASetWindow(Window window)
{
DAWindow = window;
}
Window
DAGetLeader(void)
{
return DALeader;
}
void
DASetLeader(Window leader)
{
DALeader = leader;
}
Window
DAGetIconWindow(void)
{
return DAIcon;
}
void
DASetIconWindow(Window icon_win)
{
DAIcon = icon_win;
}
int
DAGetDepth(void)
{
return DADepth;
}
void
DASetDepth(int depth)
{
DADepth = depth;
}
Visual*
DAGetVisual(void)
{
return DAVisual;
}
void
DASetVisual(Visual *visual)
{
DAVisual = visual;
}
void
DAWarning(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
_message("Warning", fmt, args);
va_end(args);
}
void
DAError(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
_message("Error", fmt, args);
exit(1);
va_end(args);
}
/*
* Local functions
*/
void
_message(const char *label, const char *fmt, va_list args)
{
char *w_fmt;
if (_daContext->programName != NULL) {
/* put default string in front of message, add newline */
w_fmt = malloc((strlen(_daContext->programName) + strlen(fmt) +13) * sizeof(char));
sprintf(w_fmt, "%s: %s: %s\n", _daContext->programName, label, fmt);
} else {
w_fmt = malloc((strlen(fmt) +1) * sizeof(char));
sprintf(w_fmt, "%s\n", fmt);
}
/* print the message */
vfprintf(stderr, w_fmt, args);
}
void
debug(const char *fmt, ...)
{
#ifdef DEBUG
va_list args;
va_start(args, fmt);
_message("debug", fmt, args);
va_end(args);
#endif
}

25
libdockapp/src/dautil.h Normal file
View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2003-2005 Alban G. Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: dautil.h,v 1.4 2005/04/20 18:05:04 dalroi Exp $
*/
void debug(const char *message, ...);

414
libdockapp/src/dockapp.h Normal file
View file

@ -0,0 +1,414 @@
/*
* Copyright (c) 1999-2005 Alfredo K. Kojima, Alban Hertroys
*
* 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
* AUTHOR 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.
*
* $Id: dockapp.h,v 1.18 2005/07/16 11:49:10 dalroi Exp $
*/
#ifndef _DOCKAPP_H_
#define _DOCKAPP_H_
#define DA_VERSION 20050716
/*
* This is a simple (trivial) library for writing Window Maker dock
* applications, or dockapps (those that only show up in the dock), easily.
*
* It is very limited and can be only used for dockapps that open a single
* appicon for process in only ibe single display, but this seems to be
* enough for most, if not all, dockapps.
*/
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#include <X11/xpm.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
/* class-name for X-resources and Window Maker attributes */
#define RES_CLASSNAME "DockApp"
/* !!! DEPRECATED !!!
* This feature may be removed in the future. Use DAEventCallbacks instead.
*
* the callbacks for events related to the dockapp window your program wants
* to handle
*/
typedef struct {
/* the dockapp window was destroyed */
void (*destroy)(void);
/* button pressed */
void (*buttonPress)(int button, int state, int x, int y);
/* button released */
void (*buttonRelease)(int button, int state, int x, int y);
/* pointer motion */
void (*motion)(int x, int y);
/* pointer entered dockapp window */
void (*enter)(void);
/* pointer left dockapp window */
void (*leave)(void);
/* timer expired */
void (*timeout)(void);
} DACallbacks;
typedef struct {
char *shortForm; /* short form for option, like -w */
char *longForm; /* long form for option, like --withdrawn */
char *description; /* description for the option */
short type; /* type of argument */
Bool used; /* if the argument was passed on the cmd-line */
/* the following are only set if the "used" field is True */
union {
void *ptr; /* a ptr for the value that was passed */
int *integer; /* on the command line */
char **string;
} value;
} DAProgramOption;
typedef XRectangle DARect;
/*
* A callback function for an event on an "action rectangle"
*/
typedef void DARectCallback(int x, int y, DARect rect, void *data);
/*
* The action rectangle structure
*/
typedef struct {
DARect rect;
DARectCallback *action;
} DAActionRect;
/* option argument types */
enum {
DONone, /* simple on/off flag */
DOInteger, /* an integer number */
DOString, /* a string */
DONatural /* positive integer number */
};
/* Shaped pixmaps: Shapes in combination with pixmaps */
typedef struct {
Pixmap pixmap;
Pixmap shape; /* needs a 1-bit plane GC (shapeGC). */
GC drawGC, clearGC, shapeGC;
DARect geometry; /* position and size */
DAActionRect *triggers;
} DAShapedPixmap;
extern Display *DADisplay;
extern Window DAWindow, DALeader, DAIcon; /* see [NOTE] */
extern int DADepth;
extern Visual *DAVisual;
extern GC DAGC, DAClearGC;
extern DARect DANoRect;
extern unsigned long DAExpectedVersion;
/* [NOTE]
* DALeader is the group-leader window, DAIcon is the icon window.
* DAWindow is the one of these two that is visible. Depending on whether the
* dockapp was started normally or windowed, that will be DAIcon and DALeader
* respectively.
* DAIcon is None if the dockapp runs in "windowed mode".
*/
/*
* Set the version of the library that the dockapp expects.
* This is a date in the format 'yyyymmdd'. You can find this date
* in the ChangeLog.
*/
void DASetExpectedVersion(unsigned long expectedVersion);
/*
* DAParseArguments-
* Command line arguments parser. The program is exited if there are
* syntax errors.
*
* -h, --help and --version are automatically handled (causing the program
* to exit)
* -w is handled automatically as well and causes the dockapp to be run
* in windowed mode.
*/
void DAParseArguments(int argc, char **argv, DAProgramOption *options,
int count, char *programDescription, char *versionDescription);
/*
* DAInitialize-
* Initialize the dockapp, open a connection to the X Server,
* create the needed windows and set them up to become an appicon window.
* It will automatically detect if Window Maker is present and use
* an appropriate window form.
*
* You must call this always before calling anything else (except for
* DAParseArguments())
*
* Arguments:
* display - the name of the display to connect to.
* Use "" to use the default value.
* name - the name of your dockapp, used as the instance name
* for the WM_CLASS hint. Like wmyaclock.
* The ClassName is set to "DockApp" on default.
* width, height - the size of the dockapp window. 48x48 is the
* preferred size.
* argc, argc - the program arguments. argv[0] will be used
* as the instance name for the WM_CLASS hint.
*/
void DAInitialize(char *display, char *name, unsigned width, unsigned height,
int argc, char **argv);
void DAOpenDisplay(char *display, int argc, char **argv);
void DACreateIcon(char *name, unsigned width, unsigned height,
int argc, char **argv);
void DAProposeIconSize(unsigned width, unsigned height);
/*
* Wrapper functions for global variables.
*/
/* Get/Set DADisplay value. For use with external code.
* Call with NULL as only argument. Other arguments are for backward compatibility
* only.
* XXX: Argument list is a kludge.
*/
Display* DAGetDisplay(char *d, ...);
void DASetDisplay(Display *display);
/* Get program name (from argv[0]). Returns a reference. */
char* DAGetProgramName();
/* Get/Set DAWindow and DALeader values respectively. For use with external code. */
Window DAGetWindow(void);
void DASetWindow(Window window);
Window DAGetLeader(void);
void DASetLeader(Window leader);
Window DAGetIconWindow(void);
void DASetIconWindow(Window icon_win);
/* Get/Set DADepth; the display depth. For use with external code. */
int DAGetDepth(void);
void DASetDepth(int depth);
/* Get/Set DAVisual; the visual type for the screen. For use with external code. */
Visual* DAGetVisual(void);
void DASetVisual(Visual *visual);
/*
* DASetShapeWithOffset-
* Sets the shape mask of the dockapp to the specified one. This is
* optional. If you pass None as shapeMask, the dockapp will become
* non-shaped.
*
* This is only needed if you want the dockapp to be shaped.
*/
#define DASetShape(shapeMask) \
(DASetShapeWithOffset((shapeMask), 0, 0))
#define DASetShapeForWindow(window, shapeMask) \
(DASetShapeWithOffsetForWindow((window), (shapeMask), 0, 0))
void DASetShapeWithOffset(Pixmap shapeMask, int x_ofs, int y_ofs);
void DASetShapeWithOffsetForWindow(Window window, Pixmap shapeMask,
int x_ofs, int y_ofs);
/*
* DASetPixmap-
* Sets the image pixmap for the dockapp. Once you set the image with it,
* you don't need to handle expose events.
*/
void DASetPixmap(Pixmap pixmap);
void DASetPixmapForWindow(Window window, Pixmap pixmap);
/*
* DAMakePixmap-
* Creates a pixmap suitable for use with DASetPixmap()
*/
Pixmap DAMakePixmap(void);
/*
* DAMakeShape-
* Creates a shape pixmap suitable for use with DASetShape()
*/
Pixmap DAMakeShape(void);
/*
* DAMakePixmapFromData-
* Creates a pixmap and mask from XPM data
* Returns true on success, false on failure.
*/
Bool DAMakePixmapFromData(char **data, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height);
/*
* DAMakePixmapFromFile-
* Creates a pixmap and mask from an XPM file
* Returns true on success, false on failure.
*/
Bool DAMakePixmapFromFile(char *filename, Pixmap *pixmap, Pixmap *mask,
unsigned short *width, unsigned short *height);
/*
* DAMakeShapedPixmap-
* Creates a shaped pixmap with width & height of dockapp window.
*/
DAShapedPixmap* DAMakeShapedPixmap();
/*
* DAMakeShapedPixmapFromData-
* Creates a shaped pixmap from XPM-data.
* Returns shaped pixmap on success, NULL on failure.
*/
DAShapedPixmap* DAMakeShapedPixmapFromData(char **data);
/*
* DAMakeShapedPixmapFromFile-
* Creates a shaped pixmap from an XPM file.
* Returns shaped pixmap on success, NULL on failure.
*/
DAShapedPixmap* DAMakeShapedPixmapFromFile(char *filename);
/*
* DAFreeShapedPixmap-
* Free memory reserved for a ShapedPixmap
*/
void DAFreeShapedPixmap(DAShapedPixmap *dasp);
/*
* DASPCopyArea-
* Copies shape-mask and pixmap-data from an area in one shaped pixmap
* into another shaped pixmap.
*/
void DASPCopyArea(DAShapedPixmap *src, DAShapedPixmap *dst,
int x1, int y1, int w, int h, int x2, int y2);
/*
* DASPClear-
* Clears a shaped pixmaps contents.
*/
void DASPClear(DAShapedPixmap *dasp);
/* DASPShow-
* Displays the pixmap in the dockapp-window.
*/
void DASPSetPixmap(DAShapedPixmap *dasp);
void DASPSetPixmapForWindow(Window window, DAShapedPixmap *dasp);
/*
* DAGetColor-
* Returns an X color index.
*/
unsigned long DAGetColor(char *colorName);
/*
* DAShow-
* Displays the dockapp.
*
* Always call this function or the dockapp won't show up.
*/
void DAShow(void);
/*
* DAShowWindow-
* Display a window. Also displays subwindows if it is the dockapp leader
* window (DALeader).
*/
void DAShowWindow(Window window);
/*
* DASetCallbacks-
* Register a set of callbacks for events like mouse clicks.
*
* Only needed if you want to receive some event.
*/
void DASetCallbacks(DACallbacks *callbacks);
/*
* DASetTimeout-
* Sets a timeout for the DAEventLoop(). The timeout callback
* will be called whenever the app doesn't get any events from the
* X server in the specified time.
*/
void DASetTimeout(int milliseconds);
/*
* DANextEventOrTimeout-
* Waits until a event is received or the timeout limit has
* expired. Returns True if an event was received.
*/
Bool DANextEventOrTimeout(XEvent *event, unsigned long milliseconds);
/*
* DAProcessEvent-
* Processes an event. Returns True if the event was handled and
* False otherwise.
*
* Must be called from your event loop, unless you use DAEventLoop()
*/
Bool DAProcessEvent(XEvent *event);
Bool DAProcessEventForWindow(Window window, XEvent *event);
/*
* DAEventLoop-
* Enters an event loop where events are processed until the dockapp
* is closed. This function never returns.
*/
void DAEventLoop(void);
void DAEventLoopForWindow(Window window);
/*
* DAProcessActionRects-
* Processes the current coordinates with one of the functions in
* the array of action rectangles. Coordinates are converted to relative
* coordinates in one of the rectangles. The last item in the array of
* action rectangles must be NULL.
*/
void DAProcessActionRects(int x, int y, DAActionRect *actionrects,
int count, void *data);
/*
* Error handling functions
*/
/* Print a warning to stderr and continue */
void DAWarning(const char *fmt, ...);
/* Print an error to stderr and exit with 1 */
void DAError(const char *fmt, ...);
#endif