SVN revision: 7474
This commit is contained in:
Carsten Haitzler 2003-09-23 07:54:34 +00:00
parent 303222d682
commit cddaadb447
43 changed files with 0 additions and 9299 deletions

View File

@ -1,30 +0,0 @@
ecore-config
*.lo
*.la
.deps
.libs
Makefile
Makefile.in
aclocal.m4
confdefs.h
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
libtool
ltconfig
ltmain.sh
missing
mkinstalldirs
stamp-h
stamp-h.in
*.tar.gz
macros
*~
*.spec
.icons

View File

@ -1,5 +0,0 @@
The Rasterman <raster@rasterman.com>
Tom Gilbert <tom@linuxbrit.co.uk>
Burra <burra@colorado.edu>
Chris Ross <chris@darkrock.co.uk>
Term <term@twistedpath.org>

View File

@ -1,20 +0,0 @@
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
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 of the Software, its documentation and marketing & publicity
materials, and acknowledgment shall be given in the documentation, materials
and software packages that this Software was used.
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 AUTHORS 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.

View File

View File

View File

@ -1,37 +0,0 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = src debian doc
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
config.h.in config.sub configure install-sh \
ltconfig ltmain.sh missing mkinstalldirs \
stamp-h.in
dist-hook:
if test -d data; then \
mkdir $(distdir)/data; \
for file in data/*; do \
if test -f $$file; then \
cp -p $$file $(distdir)/data; \
fi \
done \
fi
bin_SCRIPTS = ecore-config
EXTRA_DIST = README AUTHORS COPYING ecore.m4 ecore.spec ecore.pc
m4datadir = $(datadir)/aclocal
m4data_DATA = ecore.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ecore.pc
docs:
$(MAKE) -C $(top_srcdir)/doc docs
if HAVE_JADE
html-docs:
$(MAKE) -C $(top_srcdir)/doc html-docs
endif

View File

View File

@ -1,26 +0,0 @@
-------------------------------------------------------------------------------
E C O R E - 0 . 0 . 1
-------------------------------------------------------------------------------
Fast:
How ot build and install Ecore from this tarball?
./configure
make
su
<as root do:>
make install
from CVS:
./autogen.sh
make
su
<as root do:>
make install
-------------------------------------------------------------------------------
What is Ecore? It is the core event abstraction layer and X abstraction
layer that makes doing selections, Xdnd, general X stuff, and event loops,
timeouts and idle handlers fast, optimised, and convenient. it's a separate
librayr so anyone can make use of the work put into Ecore to make this job
easy for applications.

View File

@ -1,4 +0,0 @@
#undef PACKAGE_LOCALE_DIR
#undef PACKAGE_DATA_DIR
#undef PACKAGE_SOURCE_DIR
#undef HAVE_RENDER

View File

@ -1,153 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
abort () {
echo "$1 not found or command failed. Aborting!"
exit 1
}
srcdir=`dirname $0`
PKG_NAME="libecore"
DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed to."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
(gettext --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`gettext' installed."
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -name configure.in -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
if grep "sed.*POTFILES" configure.in >/dev/null; then
: do nothing -- we still have an old unmodified configure.in
else
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy || abort "gettextize"
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
fi
if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running gettextize... Ignore non-fatal messages."
echo "no" | gettextize --force --copy || abort "gettextize"
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
echo "Running libtoolize..."
libtoolize --force --copy || abort "libtoolize"
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude || abort "aclocal"
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader || abort "autoheader"
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt || abort "automake"
echo "Running autoconf ..."
autoconf || abort "autoconf"
)
fi
done
#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PKG_NAME || abort "configure"
else
echo Skipping configure process.
fi

View File

@ -1,111 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([configure.in])
AM_INIT_AUTOMAKE(ecore, 0.0.2)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_LIBTOOL
AM_WITH_DMALLOC
dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
fi
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_PATH_XTRA
if test "x$x_includes" = "x"; then
x_includes="/usr/include"
fi
x_cflags="$X_CFLAGS"
x_ldflags="$X_LDFLAGS"
x_libs="$X_LIBS $X_EXTRA_LIBS"
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="$x_libs",
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs",
AC_CHECK_LIB(XextSam, XShmAttach,
x_libs="-lXextSam -lXext $x_libs",
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
$x_libs),
$x_libs)
AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs",
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
$x_libs)
AC_CHECK_LIB(Xrender, XRenderCreatePicture,
[ x_libs=" -lXrender -lXext $x_libs";
AC_DEFINE(HAVE_RENDER)
],
[],
$x_libs)
AC_SUBST(x_cflags)
AC_SUBST(x_includes)
AC_SUBST(x_ldflags)
AC_SUBST(x_libs)
dnl Checking for Perl:
AC_PATH_PROG(PERL,perl,0)
AC_SUBST(PERL)
dnl Look for jade for sgml translations.
AC_ARG_WITH(dbsheets,
[ --with-dbsheets=DIR use DIR to specify your DocBook stylesheets installation path.],
DB_STYLESHEETS="$withval", DB_STYLESHEETS="/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh")
AC_SUBST(DB_STYLESHEETS)
AC_PATH_PROG(JADE, jade)
AM_CONDITIONAL(HAVE_JADE, test "x$JADE" != "x" && test -d "$DB_STYLESHEETS")
AC_CONFIG_FILES([
Makefile
ecore.pc
ecore-config
src/Makefile
debian/Makefile
doc/Makefile
doc/kernel-doc
doc/html-customizations.dsl
])
AC_CONFIG_COMMANDS([default],[[
chmod +x ecore-config
chmod +x doc/kernel-doc
]],[[]])
AC_OUTPUT

View File

@ -1,108 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(ecore, 0.0.2)
AM_CONFIG_HEADER(config.h)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_LIBTOOL
AM_WITH_DMALLOC
dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
fi
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_PATH_XTRA
if test "x$x_includes" = "x"; then
x_includes="/usr/include"
fi
x_cflags="$X_CFLAGS"
x_ldflags="$X_LDFLAGS"
x_libs="$X_LIBS $X_EXTRA_LIBS"
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="$x_libs",
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs",
AC_CHECK_LIB(XextSam, XShmAttach,
x_libs="-lXextSam -lXext $x_libs",
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
$x_libs),
$x_libs)
AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs",
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
$x_libs)
AC_CHECK_LIB(Xrender, XRenderCreatePicture,
[ x_libs=" -lXrender -lXext $x_libs";
AC_DEFINE(HAVE_RENDER)
],
[],
$x_libs)
AC_SUBST(x_cflags)
AC_SUBST(x_includes)
AC_SUBST(x_ldflags)
AC_SUBST(x_libs)
dnl Checking for Perl:
AC_PATH_PROG(PERL,perl,0)
AC_SUBST(PERL)
dnl Look for jade for sgml translations.
AC_ARG_WITH(dbsheets,
[ --with-dbsheets=DIR use DIR to specify your DocBook stylesheets installation path.],
DB_STYLESHEETS="$withval", DB_STYLESHEETS="/usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh")
AC_SUBST(DB_STYLESHEETS)
AC_PATH_PROG(JADE, jade)
AM_CONDITIONAL(HAVE_JADE, test "x$JADE" != "x" && test -d "$DB_STYLESHEETS")
AC_OUTPUT([
Makefile
ecore-config
ecore.pc
src/Makefile
debian/Makefile
doc/Makefile
doc/kernel-doc
doc/html-customizations.dsl
], [
chmod +x ecore-config
chmod +x doc/kernel-doc
]
)

View File

@ -1,2 +0,0 @@
Makefile
Makefile.in

View File

@ -1,7 +0,0 @@
EXTRA_DIST = \
changelog \
control \
copyright \
libecore0.files \
libecore0-dev.files \
rules

View File

@ -1,5 +0,0 @@
ecore (0.0.2-0cvs20030904) unstable; urgency=low
* a CVS release
-- Sytse Wielinga <s.b.wielinga@student.utwente.nl> Thu, 4 Sep 2003 21:35:12 +0200

View File

@ -1,21 +0,0 @@
Source: ecore
Section: libs
Priority: optional
Maintainer: Sytse Wielinga <s.b.wielinga@student.utwente.nl>
Build-Depends: debhelper (>> 3.0.0)
Standards-Version: 3.6.1.0
Package: libecore0
Architecture: any
Section: libs
Depends: ${shlibs:Depends}
Description: libecore0 description
libecore0 extended description
Package: libecore0-dev
Architecture: any
Section: devel
Architecture: any
Depends: libecore0 (= ${Source-Version}), libc6-dev
Description: libecore0 headers, static libraries and documentation
Headers, static libraries and documentation for Imlib2.

View File

@ -1,32 +0,0 @@
This package was debianized by Laurence J. Lane <ljlane@debian.org> on
Sat, 28 Oct 2000 17:56:46 -0400.
The source code is from the e17/libs/ecore module of the enlightenment CVS
tree. For more information, see:
http://www.enlightenment.org/cvs.html
Upstream Author: Carsten Haitzler <raster@rasterman.com>
Copyright:
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
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 of the Software, its documentation and marketing & publicity
materials, and acknowledgment shall be given in the documentation, materials
and software packages that this Software was used.
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 AUTHORS 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.

View File

@ -1,7 +0,0 @@
usr/include/*
usr/lib/lib*.a
usr/lib/lib*.so
usr/lib/pkgconfig/*
usr/lib/*.la
usr/share/aclocal/*
usr/bin/*-config

View File

@ -1 +0,0 @@
usr/lib/lib*.so.*

View File

@ -1,88 +0,0 @@
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
export DH_COMPAT=4
CFLAGS ?= -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
INSTALL=/usr/bin/install -p
CONFIGUREOPTS = --prefix=/usr --enable-ecore-x --enable-ecore-job --enable-ecore-evas --enable-ecore-con --enable-ecore-ipc --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
package=libecore1
configure: configure-stamp
configure-stamp:
dh_testdir
test -x autogen.sh && ./autogen.sh $(CONFIGUREOPTS) || ./configure $(CONFIGUREOPTS)
touch configure-stamp
build: configure build-stamp
build-stamp:
dh_testdir
$(MAKE)
touch build-stamp
clean:
dh_testdir
rm -f build-stamp configure-stamp
-$(MAKE) distclean
-rm -f configure-stamp build-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs AUTHORS README
dh_installchangelogs
dh_movefiles
dh_strip
dh_compress
dh_fixperms
dh_installdeb
dh_makeshlibs
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure

View File

@ -1,41 +0,0 @@
## Process this file with automake to produce Makefile.in
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = \
manual.raw \
kernel-doc.in \
stylesheet.css \
figures/*.gif # Add any images you create here
## Fill in all source files that you documented
## with extractable comments here:
##
SOURCEDOC = $(top_srcdir)/src/Ecore.h
## For details on what can be specified in the
## comments, see the beginning of kernel-doc
## in this directory! -- cK.
SGMLFILE = $(PACKAGE)-manual.sgml
docs: manual.raw $(SOURCEDOC)
./kernel-doc -docbook <manual.raw >$(SGMLFILE)
if HAVE_JADE
FULLNAME = $(PACKAGE)-manual-$(VERSION)
html-docs: docs html-customizations.dsl
$(mkinstalldirs) ./$(FULLNAME)/figures
cd $(FULLNAME) && @JADE@ -t sgml -d ../html-customizations.dsl ../$(SGMLFILE)
- cd figures && cp -f *.gif ../$(FULLNAME)/figures
- cd figures && cp -f *.png ../$(FULLNAME)/figures
- cd figures && cp -f *.jpg ../$(FULLNAME)/figures
cp -f stylesheet.css $(FULLNAME)/stylesheet.css
tar cfvz $(FULLNAME).tar.gz $(FULLNAME)
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1,61 +0,0 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY dbstyle SYSTEM "@DB_STYLESHEETS@/html/docbook.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
;; my own customizations for HTML output:
(define %admon-graphics-path%
;; Path to admonition graphics
"figures/")
(define %admon-graphics%
;; Use graphics in admonitions?
#t)
(define %indent-programlisting-lines%
;; Indent lines in a 'ProgramListing'?
" ")
(define %shade-verbatim%
;; Should verbatim environments be shaded?
#t)
(define ($shade-verbatim-attr$)
;; Attributes used to create a shaded verbatim environment.
(list
(list "BORDER" "0")
(list "BGCOLOR" "#f0f0f0")))
(define %root-filename%
;; Name for the root HTML document
"index")
(define %body-attr%
;; What attributes should be hung off of BODY?
(list
(list "BGCOLOR" "#FFFFFF")
(list "TEXT" "#0000A0")
(list "LINK" "#2020D0")
(list "VLINK" "#000060")
(list "ALINK" "#5050F0")))
(define %css-decoration%
;; Enable CSS decoration of elements
#t)
(define %stylesheet%
;; Name of the stylesheet to use
"stylesheet.css")
(define biblio-number
;; Enumerate bibliography entries
#t)
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="dbstyle">
</style-sheet>

File diff suppressed because it is too large Load Diff

View File

@ -1,283 +0,0 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY efsd "<function>efsd</function>">
]>
<book id="efsd-documentation-howto">
<bookinfo>
<title>Enlightenment Documentation Howto</title>
<authorgroup>
<author>
<firstname>FIRSTNAME</firstname>
<othername>OTHER</othername>
<surname>LASTNAME</surname>
<affiliation>
<address>
<email>EMAIL</email>
</address>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2001</year>
<holder>Christian Kreibich</holder>
</copyright>
<legalnotice>
<para>
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:
</para>
<para>
The above copyright notice and this permission notice shall be included in
all copies of the Software and its documentation and acknowledgment shall be
given in the documentation and software packages that this Software was
used.
</para>
<para>
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 AUTHORS 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.
</para>
</legalnotice>
<releaseinfo>
This is document is nowhere near being finished. Be patient.
</releaseinfo>
</bookinfo>
<toc></toc>
<chapter id="introduction">
<title>Introduction</title>
<para>
This is some sample documentation for you project. You'll need to be
familiar with <ulink url="http://docbook.org">DocBook</ulink>
to make best use of Enlightenment's documentation scheme.
</para>
<para>
See <link linkend="files" endterm="files.title"></link>
for an explanation of the documentation setup in you project.
</para>
<para>
<link linkend="comments" endterm="comments.title"></link> explains
the way you have to structure your comments so that they can be
extracted.
</para>
<para>
<link linkend="samples" endterm="samples.title"></link> contains a few
layout and markup examples to get you up to speed quickly.
</para>
</chapter>
<chapter id="files">
<title id="files.title">Documentation File Structure</title>
<para>
The entire documentation setup lives in the <filename>doc</filename>
directory. The file you need to edit is called <filename>manual.raw</filename>.
When you enter <command>make docs</command> in the toplevel directory,
it gets translated into a standard SGML file using a Perl script.
The script scans the file for any lines starting directly with the
string <command>!I&lt;filename&gt;</command>. Here,
<filename>filename</filename> is the name of a code
file in which you have put extractable comments. The Perl script will
then analyze the file and generate SGML DocBook statements for those
comments right into the output file.
</para>
<para>
The resulting file of that step is called <filename>$PACKAGE-manual-$VERSION.sgml</filename>
where PACKAGE and VERSION are automatically set during the build process.
This sgml file can be postprocessed with any SGML processor to generate
for example HTML, TeX or PDF output.
</para>
<para>
Suppport for HTML generation is included already through the
<command>make html-docs</command> target. In order to be able to use
that, you'll need to have <command>jade</command> installed, and appropriate
DocBook stylesheets. If the <command>configure</command> script doesn't automatically find
you stylesheets (on a Debian system it should), you can specify them when
calling <command>configure</command> or <command>autogen.sh</command> using
the <command>--with-dbsheets=DIR</command> option.
</para>
<para>
If everything worked out fine, you'll get a tarball of the HTML version
of your documentation and the extracted version in the docs directory,
named similarly to the SGML file.
</para>
</chapter>
<chapter id="comments">
<title id="comments.title">Writing Extractable Comments</title>
<para>
I'll simply give an example of a commented function here:
<programlisting>
/**
* efsd_wait_event - blocking wait for next Efsd event.
* @ec: The Efsd connection
* @ev: Pointer to an allocated EfsdEvent.
*
* Blocks until an efsd event arrives, then returns it by filling
* in the @ev structure. Returns -1 when there was an error,
* >= 0 otherwise.
*/
int efsd_wait_event(EfsdConnection *ec, EfsdEvent *ev);
</programlisting>
As you can see, it's not hard -- just use two asterisks
to signal the start of an extractable comment. In the first
line, begin with the function name and a one-liner description.
Then, put each parameter in the following lines. Add an empty
line, and then a more verbose description. That's basically
it, you can also markup items differently as follows:
<itemizedlist mark="opencircle">
<listitem>
<para><command>funcname()</command> for function names</para>
</listitem>
<listitem>
<para><command>$ENVVAR</command> for environment variables</para>
</listitem>
<listitem>
<para><command>&amp;struct_name</command> for structures</para>
</listitem>
<listitem>
<para><command>%CONST</command> for constants/para>
</listitem>
</itemizedlist>
</para>
</chapter>
<chapter id="samples">
<title id="samples.title">DocBook Examples</title>
<section>
<title>Lists</title>
<para>
<itemizedlist mark="opencircle">
<listitem>
<para>This</para>
</listitem>
<listitem>
<para>is</para>
</listitem>
<listitem>
<para>a</para>
</listitem>
<listitem>
<para>list</para>
</listitem>
</itemizedlist>
</para>
</section>
<section>
<title>Code</title>
<para>
<programlisting>
EfsdConnection *ec;
if ( (ec = efsd_open()) == NULL)
{
/* Oops. Couldn't establish connection.
* Is Efsd really running ?
*/
}
/* ... various efsd commands ... */
if (efsd_close(ec) < 0)
{
/* Ouch. Error when closing connection. */
}
</programlisting>
</para>
</section>
<section>
<title>Images</title>
<para>
<mediaobject>
<imageobject>
<imagedata fileref="figures/sampleimage.eps" format="eps">
</imageobject>
<imageobject>
<imagedata fileref="figures/sampleimage.gif" format="gif">
</imageobject>
<textobject>
<phrase>Sample image</phrase>
</textobject>
<caption>
<para>This is how you display images.</para>
</caption>
</mediaobject>
</para>
</section>
<section>
<title>Warnings, Notes</title>
<para>
<note>
<title>This is an example of a note.</title>
<para>
It's really simple to use.
</para>
</note
</para>
<para>
<caution>
<title>This is a warning.</title>
<para>
It's used just like a note.
</para>
</caution>
</para>
</section>
</chapter>
<bibliography>
<biblioentry id="bib-unp">
<bookbiblio>
<author>
<firstname>W. R.</firstname>
<surname>Stevens</surname>
</author>
<title>UNIX Network Programming</title>
<edition>Second Edition</edition>
<volumenum>Volume 1</volumenum>
<publisher>
<publishername>Prentice-Hall</publishername>
</publisher>
<date>1998</date>
</bookbiblio>
</biblioentry>
<biblioentry id="bib-apue">
<bookbiblio>
<author>
<firstname>W. R.</firstname>
<surname>Stevens</surname>
</author>
<title>Advanced Programming in the UNIX Environment</title>
<publisher>
<publishername>Addison-Wesley</publishername>
</publisher>
<date>1992</date>
</bookbiblio>
</biblioentry>
</bibliography>
</book>

View File

@ -1,20 +0,0 @@
body { margin-left:10px;
margin-right:10px;
margin-top:10px;
margin-bottom:10px;
color:#0000a0;
font-size:12pt;
background-image:url(figures/background.gif);
background-repeat:no-repeat;
}
th {
font-size:14pt;
}
td {
font-size:12pt;
}
div.mediaobject { align:center; }
div.caption { align:center; }

View File

@ -1,59 +0,0 @@
#!/bin/sh
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage="\
Usage: ecore-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
;;
--cflags)
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
fi
echo $includes @x_cflags@
;;
--libs)
libdirs=-L@libdir@
echo $libdirs -lecore @x_libs@ -lm
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
exit 0

View File

@ -1,198 +0,0 @@
# Configure paths for Ecore
# Conrad Parker 2001-01-24
# blatantly ripped from gtk.m4, Owen Taylor 97-11-3
dnl AM_PATH_ECORE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for Ecore, and define ECORE_CFLAGS and ECORE_LIBS
dnl
AC_DEFUN(AM_PATH_ECORE,
[dnl
dnl Get the cflags and libraries from the ecore-config script
dnl
AC_ARG_WITH(ecore-prefix,[ --with-ecore-prefix=PFX Prefix where Ecore is installed (optional)],
ecore_config_prefix="$withval", ecore_config_prefix="")
AC_ARG_WITH(ecore-exec-prefix,[ --with-ecore-exec-prefix=PFX Exec prefix where Ecore is installed (optional)],
ecore_config_exec_prefix="$withval", ecore_config_exec_prefix="")
AC_ARG_ENABLE(ecoretest, [ --disable-ecoretest Do not try to compile and run a test Ecore program],
, enable_ecoretest=yes)
if test x$ecore_config_exec_prefix != x ; then
ecore_config_args="$ecore_config_args --exec-prefix=$ecore_config_exec_prefix"
if test x${ECORE_CONFIG+set} != xset ; then
ECORE_CONFIG=$ecore_config_exec_prefix/bin/ecore-config
fi
fi
if test x$ecore_config_prefix != x ; then
ecore_config_args="$ecore_config_args --prefix=$ecore_config_prefix"
if test x${ECORE_CONFIG+set} != xset ; then
ECORE_CONFIG=$ecore_config_prefix/bin/ecore-config
fi
fi
AC_PATH_PROG(ECORE_CONFIG, ecore-config, no)
min_ecore_version=ifelse([$1], ,0.0.0,$1)
AC_MSG_CHECKING(for Ecore - version >= $min_ecore_version)
no_ecore=""
if test "$ECORE_CONFIG" = "no" ; then
no_ecore=yes
else
ECORE_CFLAGS=`$ECORE_CONFIG $ecore_config_args --cflags`
ECORE_LIBS=`$ECORE_CONFIG $ecore_config_args --libs`
ecore_config_major_version=`$ECORE_CONFIG $ecore_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
ecore_config_minor_version=`$ECORE_CONFIG $ecore_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
ecore_config_micro_version=`$ECORE_CONFIG $ecore_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
dnl **********************************************************************
dnl Ecore cannot currently report its own version ; version info is not
dnl given in Ecore.h
dnl Thus, the "enable_ecoretest" stuff is currently disabled, enable once
dnl you can determine the currently installed version by querying Ecore[.h]
dnl
dnl K. 2001-01-24
dnl **********************************************************************
dnl if test "x$enable_ecoretest" = "xyes" ; then
dnl ac_save_CFLAGS="$CFLAGS"
dnl ac_save_LIBS="$LIBS"
dnl CFLAGS="$CFLAGS $ECORE_CFLAGS"
dnl LIBS="$ECORE_LIBS $LIBS"
dnl dnl
dnl dnl Now check if the installed Ecore is sufficiently new. (Also sanity
dnl dnl checks the results of ecore-config to some extent
dnl dnl
dnl rm -f conf.ecoretest
dnl AC_TRY_RUN([
dnl #include <Ecore.h>
dnl #include <stdio.h>
dnl #include <stdlib.h>
dnl
dnl int
dnl main ()
dnl {
dnl int major, minor, micro;
dnl char *tmp_version;
dnl
dnl system ("touch conf.ecoretest");
dnl
dnl /* HP/UX 9 (%@#!) writes to sscanf strings */
dnl tmp_version = g_strdup("$min_ecore_version");
dnl if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
dnl printf("%s, bad version string\n", "$min_ecore_version");
dnl exit(1);
dnl }
dnl
dnl if ((ecore_major_version != $ecore_config_major_version) ||
dnl (ecore_minor_version != $ecore_config_minor_version) ||
dnl (ecore_micro_version != $ecore_config_micro_version))
dnl {
dnl printf("\n*** 'ecore-config --version' returned %d.%d.%d, but Ecore (%d.%d.%d)\n",
dnl $ecore_config_major_version, $ecore_config_minor_version, $ecore_config_micro_version,
dnl ecore_major_version, ecore_minor_version, ecore_micro_version);
dnl printf ("*** was found! If ecore-config was correct, then it is best\n");
dnl printf ("*** to remove the old version of Ecore. You may also be able to fix the error\n");
dnl printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
dnl printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
dnl printf("*** required on your system.\n");
dnl printf("*** If ecore-config was wrong, set the environment variable ECORE_CONFIG\n");
dnl printf("*** to point to the correct copy of ecore-config, and remove the file config.cache\n");
dnl printf("*** before re-running configure\n");
dnl }
dnl #if defined (ECORE_MAJOR_VERSION) && defined (ECORE_MINOR_VERSION) && defined (ECORE_MICRO_VERSION)
dnl else if ((ecore_major_version != ECORE_MAJOR_VERSION) ||
dnl (ecore_minor_version != ECORE_MINOR_VERSION) ||
dnl (ecore_micro_version != ECORE_MICRO_VERSION))
dnl {
dnl printf("*** Ecore header files (version %d.%d.%d) do not match\n",
dnl ECORE_MAJOR_VERSION, ECORE_MINOR_VERSION, ECORE_MICRO_VERSION);
dnl printf("*** library (version %d.%d.%d)\n",
dnl ecore_major_version, ecore_minor_version, ecore_micro_version);
dnl }
dnl #endif /* defined (ECORE_MAJOR_VERSION) ... */
dnl else
dnl {
dnl if ((ecore_major_version > major) ||
dnl ((ecore_major_version == major) && (ecore_minor_version > minor)) ||
dnl ((ecore_major_version == major) && (ecore_minor_version == minor) && (ecore_micro_version >= micro)))
dnl {
dnl return 0;
dnl }
dnl else
dnl {
dnl printf("\n*** An old version of Ecore (%d.%d.%d) was found.\n",
dnl ecore_major_version, ecore_minor_version, ecore_micro_version);
dnl printf("*** You need a version of Ecore newer than %d.%d.%d. The latest version of\n",
dnl major, minor, micro);
dnl printf("*** Ecore is always available from ftp://ftp.enlightenment.org.\n");
dnl printf("***\n");
dnl printf("*** If you have already installed a sufficiently new version, this error\n");
dnl printf("*** probably means that the wrong copy of the ecore-config shell script is\n");
dnl printf("*** being found. The easiest way to fix this is to remove the old version\n");
dnl printf("*** of Ecore, but you can also set the ECORE_CONFIG environment to point to the\n");
dnl printf("*** correct copy of ecore-config. (In this case, you will have to\n");
dnl printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
dnl printf("*** so that the correct libraries are found at run-time))\n");
dnl }
dnl }
dnl return 1;
dnl }
dnl ],, no_ecore=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
dnl CFLAGS="$ac_save_CFLAGS"
dnl LIBS="$ac_save_LIBS"
dnl fi
dnl **********************************************************************
fi
if test "x$no_ecore" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ECORE_CONFIG" = "no" ; then
echo "*** The ecore-config script installed by Ecore could not be found"
echo "*** If Ecore was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ECORE_CONFIG environment variable to the"
echo "*** full path to ecore-config."
else
if test -f conf.ecoretest ; then
:
else
echo "*** Could not run Ecore test program, checking why..."
CFLAGS="$CFLAGS $ECORE_CFLAGS"
LIBS="$LIBS $ECORE_LIBS"
AC_TRY_LINK([
#include <Ecore.h>
#include <stdio.h>
], [ return ((ecore_major_version) || (ecore_minor_version) || (ecore_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ecore or finding the wrong"
echo "*** version of Ecore. If it is not finding Ecore, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
echo "***"
echo "*** If you have a RedHat 5.0 system, you should remove the Ecore package that"
echo "*** came with the system with the command"
echo "***"
echo "*** rpm --erase --nodeps ecore ecore-devel" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Ecore was incorrectly installed"
echo "*** or that you have moved Ecore since it was installed. In the latter case, you"
echo "*** may want to edit the ecore-config script: $ECORE_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
ECORE_CFLAGS=""
ECORE_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ECORE_CFLAGS)
AC_SUBST(ECORE_LIBS)
rm -f conf.ecoretest
])

View File

@ -1,11 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: ecore
Description: Enlightened Core X interface library
Version: @VERSION@
Libs: -L${libdir} -lecore @x_libs@ -lm
Cflags: -I${includedir} -I@x_includes@

View File

@ -1,63 +0,0 @@
# this is NOT relocatable, unless you alter the patch!
%define name ecore
%define ver 0.0.2
%define rel 1
%define prefix /usr
Summary: Enlightened Core X interface library
Name: %{name}
Version: %{ver}
Release: %{rel}
Copyright: BSD
Group: User Interface/X
URL: http://www.enlightenment.org/efm.html
Packager: The Rasterman <raster@rasterman.com> Term <term@twistedpath.org>
Vendor: The Enlightenment Development Team <e-develop@enlightenment.org>
Source: ftp://ftp.enlightenment.org/enlightenment/%{name}-%{ver}.tar.gz
BuildRoot: /var/tmp/%{name}-root
%description
Ecore is brub.
%package devel
Summary: Ecore headers and development libraries.
Group: Development/Libraries
Requires: %{name} = %{ver}
%description devel
Ecore development files
%prep
%setup -q
%build
if [ -e ./configure ]
then
./configure --prefix=%{prefix}
else
./autogen.sh --prefix=%{prefix}
fi
make
%install
make prefix=$RPM_BUILD_ROOT%{prefix} install
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{prefix}/lib/libecore.so.*
%files devel
%defattr(-,root,root)
%{prefix}/lib/libecore.so
%{prefix}/lib/libecore.*a
%{prefix}/include/Ecore.h
%{prefix}/bin/ecore-config

View File

@ -1,29 +0,0 @@
*.lo
*.la
.deps
.libs
Makefile
Makefile.in
aclocal.m4
confdefs.h
config.cache
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
libtool
ltconfig
ltmain.sh
missing
mkinstalldirs
stamp-h
stamp-h.in
*.tar.gz
macros
*~
*.spec
.icons

View File

@ -1,919 +0,0 @@
#ifndef E_CORE_H
#define E_CORE_H 1
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <signal.h>
#define XK_MISCELLANY 1
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
#include <X11/keysymdef.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/shape.h>
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
#define XEV_NONE NoEventMask
#define XEV_KEY KeyPressMask | KeyReleaseMask
#define XEV_BUTTON ButtonPressMask | ButtonReleaseMask
#define XEV_KEY_PRESS KeyPressMask
#define XEV_KEY_RELEASE KeyReleaseMask
#define XEV_BUTTON_PRESS ButtonPressMask
#define XEV_BUTTON_RELEASE ButtonReleaseMask
#define XEV_IN_OUT EnterWindowMask | LeaveWindowMask
#define XEV_MOUSE_MOVE PointerMotionMask | ButtonMotionMask
#define XEV_EXPOSE ExposureMask
#define XEV_VISIBILITY VisibilityChangeMask
#define XEV_CONFIGURE StructureNotifyMask
#define XEV_CHILD_CHANGE SubstructureNotifyMask
#define XEV_CHILD_REDIRECT SubstructureRedirectMask | ResizeRedirectMask
#define XEV_FOCUS FocusChangeMask
#define XEV_PROPERTY PropertyChangeMask
#define XEV_COLORMAP ColormapChangeMask
#define ECORE_ATOM(atom, name) \
if (!atom) (atom) = ecore_atom_get(name);
#define MEMCPY(src, dst, type, num) \
memcpy(dst, src, sizeof(type) * (num))
#define NEW(type, num) \
malloc(sizeof(type) * (num))
#define ZERO(ptr, type, num) \
memset((ptr), 0, sizeof(type) * (num))
#define NEW_PTR(num) \
malloc(sizeof(void *) * (num))
#define FREE(ptr) \
{ \
free(ptr); \
(ptr) = NULL; \
}
#define IF_FREE(ptr) \
{if (ptr) FREE(ptr);}
#define REALLOC(ptr, type, num) \
{ \
if ((ptr) && (num == 0)) {free(ptr); ptr = NULL;} \
else if (ptr) ptr = realloc((ptr), sizeof(type) * (num)); \
else ptr = malloc(sizeof(type) * (num)); \
}
#define REALLOC_PTR(ptr, num) \
{ \
if ((ptr) && (num == 0)) {free(ptr); ptr = NULL;} \
else if (ptr) ptr = realloc(ptr, sizeof(void *) * (num)); \
else ptr = malloc(sizeof(void *) * (num)); \
}
#define START_LIST_DEL(type, base, cmp) \
type *_p, *_pp; _pp = NULL; \
_p = (base); \
while(_p) \
{ \
if (cmp) \
{ \
if (_pp) _pp->next = _p->next; \
else (base) = _p->next;
#define END_LIST_DEL \
return; \
} \
_pp = _p; \
_p = _p->next; \
}
#define DND_TYPE_URI_LIST 0
#define DND_TYPE_PLAIN_TEXT 1
#define DND_TYPE_MOZ_URL 2
#define DND_TYPE_NETSCAPE_URL 3
#ifdef __cplusplus
extern "C"
{
#endif
extern XContext xid_context;
typedef void (*Ecore_Error_Function) (Display * d, XErrorEvent * ev);
typedef struct _ecore_keygrab Ecore_KeyGrab;
typedef enum _ecore_ev_modifiers
{
ECORE_EVENT_KEY_MODIFIER_NONE = 0,
ECORE_EVENT_KEY_MODIFIER_SHIFT = (1 << 0),
ECORE_EVENT_KEY_MODIFIER_CTRL = (1 << 1),
ECORE_EVENT_KEY_MODIFIER_ALT = (1 << 2),
ECORE_EVENT_KEY_MODIFIER_WIN = (1 << 3)
} Ecore_Event_Key_Modifiers;
typedef enum _ecore_event_stack_detail
{
ECORE_EVENT_STACK_ABOVE = Above,
ECORE_EVENT_STACK_BELOW = Below,
ECORE_EVENT_STACK_TOP_IF = TopIf,
ECORE_EVENT_STACK_BOTTOM_IF = BottomIf,
ECORE_EVENT_STACK_OPPOSITE = Opposite
} Ecore_Event_Stack_Detail;
typedef enum _ecore_event_value_mask
{
ECORE_EVENT_VALUE_X = CWX,
ECORE_EVENT_VALUE_Y = CWY,
ECORE_EVENT_VALUE_W = CWWidth,
ECORE_EVENT_VALUE_H = CWHeight,
ECORE_EVENT_VALUE_BORDER = CWBorderWidth,
ECORE_EVENT_VALUE_SIBLING = CWSibling,
ECORE_EVENT_VALUE_STACKING = CWStackMode
} Ecore_Event_Value_Mask;
typedef enum _ecore_event_type
{
ECORE_EVENT_MOUSE_MOVE,
ECORE_EVENT_MOUSE_DOWN,
ECORE_EVENT_MOUSE_UP,
ECORE_EVENT_MOUSE_IN,
ECORE_EVENT_MOUSE_OUT,
ECORE_EVENT_MOUSE_WHEEL,
ECORE_EVENT_KEY_DOWN,
ECORE_EVENT_KEY_UP,
ECORE_EVENT_WINDOW_MAP,
ECORE_EVENT_WINDOW_UNMAP,
ECORE_EVENT_WINDOW_CREATE,
ECORE_EVENT_WINDOW_DESTROY,
ECORE_EVENT_WINDOW_CONFIGURE,
ECORE_EVENT_WINDOW_CONFIGURE_REQUEST,
ECORE_EVENT_WINDOW_MAP_REQUEST,
ECORE_EVENT_WINDOW_PROPERTY,
ECORE_EVENT_WINDOW_CIRCULATE,
ECORE_EVENT_WINDOW_CIRCULATE_REQUEST,
ECORE_EVENT_WINDOW_REPARENT,
ECORE_EVENT_WINDOW_EXPOSE,
ECORE_EVENT_WINDOW_VISIBILITY,
ECORE_EVENT_WINDOW_SHAPE,
ECORE_EVENT_WINDOW_FOCUS_IN,
ECORE_EVENT_WINDOW_FOCUS_OUT,
ECORE_EVENT_MESSAGE,
ECORE_EVENT_WINDOW_DELETE,
ECORE_EVENT_COLORMAP,
ECORE_EVENT_DND_DROP_REQUEST,
ECORE_EVENT_DND_DROP_END,
ECORE_EVENT_DND_DROP_POSITION,
ECORE_EVENT_DND_DROP,
ECORE_EVENT_DND_DROP_STATUS,
ECORE_EVENT_DND_DATA_REQUEST,
ECORE_EVENT_PASTE_REQUEST,
ECORE_EVENT_CLEAR_SELECTION,
ECORE_EVENT_CHILD,
ECORE_EVENT_USER,
ECORE_EVENT_MAX
} Ecore_Event_Type;
typedef struct _ecore_event
{
Ecore_Event_Type type;
char ignore;
void *event;
void (*ev_free) (void *evnt);
struct _ecore_event *next;
} Ecore_Event;
typedef struct _ecore_event_fd_handler
{
int fd;
void (*func) (int fd);
struct _ecore_event_fd_handler *next;
} Ecore_Event_Fd_Handler;
typedef struct _ecore_event_pid_handler
{
pid_t pid;
void (*func) (pid_t pid);
struct _ecore_event_pid_handler *next;
} Ecore_Event_Pid_Handler;
typedef struct _ecore_event_ipc_handler
{
int ipc;
void (*func) (int ipc);
struct _ecore_event_ipc_handler *next;
} Ecore_Event_Ipc_Handler;
typedef struct _ecore_event_timer
{
char *name;
void (*func) (int val, void *data);
int val;
void *data;
double in;
char just_added;
struct _ecore_event_timer *next;
} Ecore_Event_Timer;
typedef struct _ecore_event_key_down
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
char *key;
char *symbol;
char *compose;
Time time;
} Ecore_Event_Key_Down;
typedef struct _ecore_event_key_up
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
char *key;
char *symbol;
char *compose;
Time time;
} Ecore_Event_Key_Up;
typedef struct _ecore_event_mouse_down
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
int button;
int x, y;
int rx, ry;
int double_click, triple_click;
Time time;
} Ecore_Event_Mouse_Down;
typedef struct _ecore_event_mouse_up
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
int button;
int x, y;
int rx, ry;
Time time;
} Ecore_Event_Mouse_Up;
typedef struct _ecore_event_wheel
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
int x, y, z;
int rx, ry;
Time time;
} Ecore_Event_Wheel;
typedef struct _ecore_event_mouse_move
{
Window win, root;
Ecore_Event_Key_Modifiers mods;
int x, y;
int rx, ry;
Time time;
} Ecore_Event_Mouse_Move;
typedef struct _ecore_event_window_enter
{
Window win, root;
int x, y;
int rx, ry;
Ecore_Event_Key_Modifiers mods;
Time time;
} Ecore_Event_Window_Enter;
typedef struct _ecore_event_window_leave
{
Window win, root;
int x, y;
int rx, ry;
Ecore_Event_Key_Modifiers mods;
Time time;
} Ecore_Event_Window_Leave;
typedef struct _ecore_event_window_focus_in
{
Window win, root;
int key_grab;
Time time;
} Ecore_Event_Window_Focus_In;
typedef struct _ecore_event_window_focus_out
{
Window win, root;
int key_grab;
Time time;
} Ecore_Event_Window_Focus_Out;
typedef struct _ecore_event_window_expose
{
Window win, root;
int x, y, w, h;
} Ecore_Event_Window_Expose;
typedef struct _ecore_event_window_visibility
{
Window win, root;
int fully_obscured;
} Ecore_Event_Window_Visibility;
typedef struct _ecore_event_window_create
{
Window win, root;
int override;
} Ecore_Event_Window_Create;
typedef struct _ecore_event_window_destroy
{
Window win, root;
} Ecore_Event_Window_Destroy;
typedef struct _ecore_event_window_map
{
Window win, root;
} Ecore_Event_Window_Map;
typedef struct _ecore_event_window_unmap
{
Window win, root;
} Ecore_Event_Window_Unmap;
typedef struct _ecore_event_window_map_request
{
Window win, root;
} Ecore_Event_Window_Map_Request;
typedef struct _ecore_event_window_reparent
{
Window win, root;
Window parent_from, parent;
} Ecore_Event_Window_Reparent;
typedef struct _ecore_event_window_configure
{
Window win, root;
int x, y, w, h;
int wm_generated;
} Ecore_Event_Window_Configure;
typedef struct _ecore_event_window_configure_request
{
Window win, root;
int x, y, w, h;
int border;
Window stack_win;
Ecore_Event_Stack_Detail detail;
Ecore_Event_Value_Mask mask;
} Ecore_Event_Window_Configure_Request;
typedef struct _ecore_event_window_circulate
{
Window win, root;
int lower;
} Ecore_Event_Window_Circulate;
typedef struct _ecore_event_window_circulate_request
{
Window win, root;
int lower;
} Ecore_Event_Window_Circulate_Request;
typedef struct _ecore_event_window_property
{
Window win, root;
Atom atom;
Time time;
} Ecore_Event_Window_Property;
typedef struct _ecore_event_window_shape
{
Window win, root;
Time time;
} Ecore_Event_Window_Shape;
typedef struct _ecore_event_message
{
Window win;
int format;
Atom atom;
union
{
char b[20];
short s[10];
long l[5];
}
data;
} Ecore_Event_Message;
typedef struct _ecore_event_colormap
{
Window win, root;
Colormap cmap;
int installed;
} Ecore_Event_Colormap;
typedef struct _ecore_event_window_delete
{
Window win, root;
} Ecore_Event_Window_Delete;
typedef struct _ecore_event_paste_request
{
Window win, root, source_win;
char *string;
} Ecore_Event_Paste_Request;
typedef struct _ecore_event_clear_selection
{
Window win, root;
Atom selection;
} Ecore_Event_Clear_Selection;
typedef struct _ecore_event_dnd_drop_request
{
Window win, root, source_win;
int num_files;
char **files;
int copy, link, move;
} Ecore_Event_Dnd_Drop_Request;
typedef struct _ecore_event_dnd_drop_end
{
Window win, root, source_win;
} Ecore_Event_Dnd_Drop_End;
typedef struct _ecore_event_dnd_drop_position
{
Window win, root, source_win;
int x, y;
} Ecore_Event_Dnd_Drop_Position;
typedef struct _ecore_event_dnd_drop
{
Window win, root, source_win;
} Ecore_Event_Dnd_Drop;
typedef struct _ecore_event_dnd_drop_status
{
Window win, root, source_win;
int x, y, w, h;
int copy, link, move, e_private;
int all_position_msgs;
int ok;
} Ecore_Event_Dnd_Drop_Status;
typedef struct _ecore_event_dnd_data_request
{
Window win, root, source_win;
Atom destination_atom;
int plain_text;
int uri_list;
int moz_url;
int netscape_url;
} Ecore_Event_Dnd_Data_Request;
typedef struct _ecore_event_child
{
pid_t pid;
int exit_code;
} Ecore_Event_Child;
typedef struct _ecore_event_user
{
int num;
int hup;
} Ecore_Event_User;
typedef struct _ecore_event_ipc_service
{
int service;
void (*func) (int fd);
struct _ecore_event_ipc_service *next;
} Ecore_Event_Ipc_Service;
typedef struct _ecore_xid
{
Window win;
Window parent;
Window root;
int children_num;
Window *children;
int x, y, w, h;
int mapped;
int mouse_in;
int depth;
int gravity;
int coords_invalid;
int bw;
int (*grab_button_auto_replay) (Ecore_Event_Mouse_Down *ev);
} Ecore_XID;
/* ---------------- API CALLS BELOW --------------------*/
/* ---------------- X WRAPPER CALLS */
int ecore_x_get_fd(void);
void ecore_set_error_handler(Ecore_Error_Function func);
void ecore_reset_error_handler(void);
/**
* ecore_display_init - Establishes a connection to the X server
* @display: The name of the display to connect to
*
* This function creates a connection to the X server. If
* @display is NULL, the name is taken from the $DISPLAY
* environment variable.
*/
int ecore_display_init(char *display);
int ecore_events_pending(void);
void ecore_get_next_event(XEvent * event);
int ecore_event_shape_get_id(void);
void ecore_sync(void);
void ecore_flush(void);
/* ---------------- WINDOW CHILD HANDLING */
void ecore_del_child(Window win, Window child);
void ecore_add_child(Window win, Window child);
void ecore_raise_child(Window win, Window child);
void ecore_lower_child(Window win, Window child);
Ecore_XID *ecore_add_xid(Window win, int x, int y, int w, int h,
int depth, Window parent);
Ecore_XID *ecore_validate_xid(Window win);
void ecore_unvalidate_xid(Window win);
/* ---------------- WINDOWS-RELATED CALLS */
Window ecore_window_new(Window parent, int x, int y, int w,
int h);
Window ecore_window_override_new(Window parent, int x, int y,
int w, int h);
Window ecore_window_input_new(Window parent, int x, int y, int w,
int h);
void ecore_window_set_events_propagate(Window win,
int propagate);
void ecore_window_show(Window win);
void ecore_window_hide(Window win);
void ecore_window_set_background_pixmap(Window win,
Pixmap pmap);
void ecore_window_set_shape_mask(Window win, Pixmap mask);
void ecore_window_add_shape_mask(Window win, Pixmap mask);
void ecore_window_set_shape_window(Window win, Window src,
int x, int y);
void ecore_window_add_shape_window(Window win, Window src,
int x, int y);
void ecore_window_set_shape_rectangle(Window win, int x, int y,
int w, int h);
void ecore_window_add_shape_rectangle(Window win, int x, int y,
int w, int h);
void ecore_window_set_shape_rectangles(Window win,
XRectangle * rect,
int num);
void ecore_window_add_shape_rectangles(Window win,
XRectangle * rect,
int num);
void ecore_window_clip_shape_by_rectangle(Window win, int x,
int y, int w, int h);
XRectangle *ecore_window_get_shape_rectangles(Window win, int *num);
void ecore_window_select_shape_events(Window win);
void ecore_window_unselect_shape_events(Window win);
void ecore_window_clear(Window win);
void ecore_window_clear_area(Window win, int x, int y, int w,
int h);
void ecore_window_set_events(Window win, long mask);
void ecore_window_remove_events(Window win, long mask);
void ecore_window_add_events(Window win, long mask);
void ecore_window_move(Window win, int x, int y);
void ecore_window_resize(Window win, int w, int h);
void ecore_window_move_resize(Window win, int x, int y, int w,
int h);
void ecore_window_destroy(Window win);
void ecore_window_reparent(Window win, Window parent, int x,
int y);
void ecore_window_raise(Window win);
void ecore_window_lower(Window win);
void ecore_window_get_geometry(Window win, int *x, int *y,
int *w, int *h);
int ecore_window_get_depth(Window win);
int ecore_window_exists(Window win);
Window ecore_window_get_parent(Window win);
Window *ecore_window_get_children(Window win, int *num);
int ecore_window_mouse_in(Window win);
void ecore_window_mouse_set_in(Window win, int in);
Window ecore_window_get_root(Window win);
void ecore_window_set_delete_inform(Window win);
void ecore_window_property_set(Window win, Atom type,
Atom format, int size,
void *data, int number);
void *ecore_window_property_get(Window win, Atom type,
Atom format, int *size);
void ecore_window_dnd_advertise(Window win);
void ecore_window_ignore(Window win);
void ecore_window_no_ignore(Window win);
int ecore_window_is_ignored(Window win);
Window ecore_window_get_at_xy(int x, int y);
int ecore_window_dnd_capable(Window win);
void ecore_window_dnd_handle_motion(Window source_win, int x,
int y, int dragging);
void ecore_window_dnd_ok(int ok);
void ecore_window_dnd_finished(void);
void ecore_window_dnd_send_status_ok(Window source_win,
Window win, int x, int y,
int w, int h);
void ecore_window_dnd_send_finished(Window source_win,
Window win);
void ecore_window_set_title(Window win, char *title);
void ecore_window_set_name_class(Window win, char *name,
char *);
void ecore_window_get_name_class(Window win, char **name,
char **name_class);
char *ecore_window_get_machine(Window win);
char *ecore_window_get_command(Window win);
char *ecore_window_get_icon_name(Window win);
void ecore_window_get_hints(Window win, int *accepts_focus,
int *initial_state,
Pixmap * icon_pixmap,
Pixmap * icon_mask,
Window * icon_window,
Window * window_group);
void ecore_window_set_min_size(Window win, int w, int h);
void ecore_window_set_max_size(Window win, int w, int h);
void ecore_window_set_xy_hints(Window win, int x, int y);
void ecore_window_get_frame_size(Window win, int *l, int *r,
int *t, int *b);
int ecore_window_save_under(Window win);
void ecore_window_hint_set_layer(Window win, int layer);
void ecore_window_hint_set_sticky(Window win, int sticky);
void ecore_window_hint_set_borderless(Window win);
int ecore_window_get_gravity(Window win);
void ecore_window_gravity_reset(Window win);
void ecore_window_gravity_set(Window win, int gravity);
void ecore_window_bit_gravity_set(Window win, int gravity);
void ecore_window_get_root_relative_location(Window win,
int *x, int *y);
void ecore_window_send_event_move_resize(Window win, int x,
int y, int w, int h);
void ecore_window_send_client_message(Window win, Atom type,
int format, void *data);
void ecore_window_add_to_save_set(Window win);
void ecore_window_del_from_save_set(Window win);
void ecore_window_kill_client(Window win);
void ecore_window_set_border_width(Window win, int bw);
int ecore_window_get_border_width(Window win);
int ecore_window_get_wm_size_hints(Window win,
XSizeHints * hints,
int *mask);
int ecore_window_is_visible(Window win);
int ecore_window_is_normal(Window win);
/**
* ecore_window_is_manageable - Returns 1 if a window can be managed by the wm.
* @win: the window for which to query.
*
* This function returns 0 if the window is unmapped, should be ignored
* by the window manager or is of the InputOnly class, 1 otherwise.
*/
int ecore_window_is_manageable(Window win);
void ecore_windows_restack(Window * wins, int num);
void ecore_window_stack_above(Window win, Window above);
void ecore_window_stack_below(Window win, Window below);
char *ecore_window_get_title(Window win);
void ecore_window_button_grab_auto_replay_set(Window win,
int (*func) (Ecore_Event_Mouse_Down *ev));
void *ecore_window_button_grab_auto_replay_get(Window win);
Window ecore_window_root(void);
void ecore_window_get_virtual_area(Window win, int *area_x,
int *area_y);
/* ---------------- PIXMAP CALLS */
Pixmap ecore_pixmap_new(Window win, int w, int h, int dep);
void ecore_pixmap_free(Pixmap pmap);
/* ---------------- POINTER CALLS */
void ecore_pointer_xy(Window win, int *x, int *y);
void ecore_pointer_xy_set(int x, int y);
void ecore_pointer_xy_get(int *x, int *y);
void ecore_pointer_warp_by(int dx, int dy);
void ecore_pointer_warp_to(int x, int y);
void ecore_pointer_replay(Time t);
void ecore_pointer_grab(Window win, Time t);
void ecore_pointer_ungrab(Time t);
/* ---------------- KEYBOARD-RELATED CALLS */
KeySym ecore_key_get_keysym_from_keycode(KeyCode keycode);
char *ecore_key_get_string_from_keycode(KeyCode keycode);
char *ecore_key_get_string_from_keysym(KeySym keysym);
void ecore_key_grab(char *key, Ecore_Event_Key_Modifiers mods,
int anymod, int sync);
void ecore_key_ungrab(char *key,
Ecore_Event_Key_Modifiers mods,
int anymod);
KeyCode ecore_key_get_keycode(char *key);
char *ecore_keypress_translate_into_typeable(Ecore_Event_Key_Down * e);
void ecore_event_allow(int mode, Time t);
/* ---------------- LOCKS AND MODIFIER CALLS */
int ecore_lock_mask_scroll_get(void);
int ecore_lock_mask_num_get(void);
int ecore_lock_mask_caps_get(void);
void ecore_lock_scroll_set(int onoff);
int ecore_lock_scroll_get(void);
void ecore_lock_num_set(int onoff);
int ecore_lock_num_get(void);
void ecore_lock_caps_set(int onoff);
int ecore_lock_caps_get(void);
int ecore_mod_mask_shift_get(void);
int ecore_mod_mask_ctrl_get(void);
int ecore_mod_mask_alt_get(void);
int ecore_mod_mask_win_get(void);
void ecore_mod_shift_set(int onoff);
int ecore_mod_shift_get(void);
void ecore_mod_ctrl_set(int onoff);
int ecore_mod_ctrl_get(void);
void ecore_mod_alt_set(int onoff);
int ecore_mod_alt_get(void);
void ecore_mod_win_set(int onoff);
int ecore_mod_win_get(void);
int ecore_lock_mask_get(void);
int ecore_modifier_mask_get(void);
Window ecore_get_key_grab_win(void);
Display *ecore_display_get(void);
void ecore_focus_window_set(Window win);
Window ecore_focus_window_get(void);
void ecore_focus_to_window(Window win);
void ecore_focus_mode_reset(void);
Atom ecore_atom_get(char *name);
/* ---------------- GRABBING/UNGRABBING CALLS */
/**
* ecore_grab - Grabs the X server connection
*
* This function wraps XGrabServer, which prevents all other
* clients from receiving events. Calls are reference-counted.
*/
void ecore_grab(void);
/**
* ecore_ungrab - Ungrabs the X server connection
*
* This function releases the server, provided that ecore_grab()
* has been called the same number of times as ecore_ungrab().
*/
void ecore_ungrab(void);
void ecore_grab_mouse(Window win, int confine, Cursor cursor);
void ecore_ungrab_mouse(void);
Window ecore_grab_window_get(void);
void ecore_button_grab(Window win, int button, int events,
Ecore_Event_Key_Modifiers mod,
int any_mod);
void ecore_button_ungrab(Window win, int button,
Ecore_Event_Key_Modifiers mod,
int any_mod);
void ecore_keyboard_grab(Window win);
void ecore_keyboard_ungrab(void);
Window ecore_keyboard_grab_window_get(void);
/* ----------------- GRAPHICS CONTEXT AND DRAWING CALLS */
GC ecore_gc_new(Drawable d);
void ecore_gc_free(GC gc);
void ecore_gc_set_fg(GC gc, int val);
void ecore_gc_set_include_inferiors(GC gc);
void ecore_fill_rectangle(Drawable d, GC gc, int x, int y,
int w, int h);
void ecore_draw_rectangle(Drawable d, GC gc, int x, int y,
int w, int h);
void ecore_draw_line(Drawable d, GC gc, int x1, int y1, int x2,
int y2);
void ecore_draw_point(Drawable d, GC gc, int x, int y);
void ecore_area_copy(Drawable src, Drawable dest, GC gc,
int sx, int sy, int sw, int sh, int dx,
int dy);
/* ---------------- DRAG AND DROP CALLS */
int ecore_dnd_selection_convert(Window win, Window req,
Atom type);
void *ecore_dnd_selection_get(Window win, Window req, Atom type,
int *size);
void ecore_dnd_set_data(Window win);
void ecore_dnd_set_action(Window win);
void ecore_dnd_send_data(Window win, Window source_win,
void *data, int size, Atom dest_atom,
int type);
void ecore_dnd_set_mode_copy(void);
void ecore_dnd_set_mode_link(void);
void ecore_dnd_set_mode_move(void);
void ecore_dnd_set_mode_ask(void);
void ecore_dnd_own_selection(Window win);
void ecore_dnd_send_drop(Window win, Window source_win);
void ecore_get_virtual_area(int *area_x, int *area_y);
void ecore_clear_target_status(void);
/* ---------------- IPC CALLS */
void ecore_event_ipc_init(char *path);
void ecore_event_ipc_cleanup(void);
void ecore_add_ipc_service(int service, void (*func) (int fd));
void ecore_del_ipc_service(int service);
/* ---------------- SELECTION CALLS */
char *ecore_selection_get_data(Window win, Atom prop);
Window ecore_selection_request(void);
Window ecore_selection_set(char *string);
/* ---------------- CURSOR LOOK CALLS */
void ecore_set_blank_pointer(Window w);
Cursor ecore_cursor_new(Pixmap pmap, Pixmap mask, int x, int y,
int fr, int fg, int fb, int br, int bg,
int bb);
void ecore_cursor_free(Cursor c);
void ecore_cursor_set(Window win, Cursor c);
/* ---------------- EVENT-HANDLING CALLS */
void ecore_add_event(Ecore_Event_Type type, void *event,
void (*ev_free) (void *event));
void ecore_del_event(void *event);
void ecore_del_all_events(void);
Ecore_Event *ecore_get_last_event(void);
void ecore_add_event_fd(int fd, void (*func) (int fd));
void ecore_del_event_fd(int fd);
void ecore_add_event_pid(pid_t pid, void (*func) (pid_t pid));
void ecore_del_event_pid(pid_t pid);
void ecore_add_event_ipc(int ipc, void (*func) (int ipc));
void ecore_del_event_ipc(int ipc);
void ecore_event_loop(void);
void ecore_event_loop_quit(void);
void ecore_add_event_timer(char *name, double in,
void (*func) (int val, void *data),
int val, void *data);
void *ecore_del_event_timer(char *name);
void ecore_event_filter(Ecore_Event * ev);
void ecore_event_filter_events_handle(Ecore_Event * ev);
void ecore_event_filter_idle_handle(void);
/**
* ecore_event_filter_init - Setup event handlers
*
* This function initializes all ECORE_EVENT_MAX
* event handler to be empty.
*/
void ecore_event_filter_init(void);
void ecore_event_filter_handler_add(Ecore_Event_Type type,
void (*func) (Ecore_Event *ev));
void ecore_event_filter_idle_handler_add(void (*func) (void *data), void *data);
/**
* ecore_event_signal_init - Setup for default signal handlers
*
* This function initializes signal handlers for various
* signals via sigaction().
*/
void ecore_event_signal_init(void);
int ecore_event_signal_events_pending(void);
/**
* ecore_event_x_init - Ecore X initialization
*
* This function initializes Ecore's X event handling
* callbacks.
*/
void ecore_event_x_init(void);
/* ---------------- MISCELLANEOUS CALLS */
double ecore_get_time(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -1,19 +0,0 @@
## Process this file with automake to produce Makefile.in
INCLUDES = @x_cflags@
lib_LTLIBRARIES = libecore.la
include_HEADERS = \
Ecore.h
libecore_la_SOURCES = \
e_ev_filter.c \
e_ev_signal.c \
e_ev_x.c \
e_events.c \
e_ipc.c \
e_util.c \
e_x.c
libecore_la_LIBADD = @x_ldflags@ @x_libs@ -lm
libecore_la_LDFLAGS = -version-info 0:2:0

View File

@ -1,132 +0,0 @@
#include "Ecore.h"
typedef struct _ecore_event_handler Ecore_Event_Handler;
typedef struct _ecore_event_idle_handler Ecore_Event_Idle_Handler;
struct _ecore_event_handler
{
void (*func) (Ecore_Event * ev);
Ecore_Event_Handler *next;
};
struct _ecore_event_idle_handler
{
void (*func) (void *data);
void *data;
Ecore_Event_Idle_Handler *next;
};
static Ecore_Event_Handler *handler[ECORE_EVENT_MAX];
static Ecore_Event_Idle_Handler *idle_handlers = NULL;
void
ecore_event_filter(Ecore_Event * ev)
{
Ecore_Event *evp;
int motion_events = 0;
int dnd_pos_events = 0;
int dnd_status_events = 0;
/* count events to only use last events of some types */
for (evp = ev; evp; evp = evp->next)
{
if (evp->type == ECORE_EVENT_MOUSE_MOVE)
motion_events++;
if (evp->type == ECORE_EVENT_DND_DROP_POSITION)
dnd_pos_events++;
if (evp->type == ECORE_EVENT_DND_DROP_STATUS)
dnd_status_events++;
}
for (evp = ev; evp; evp = evp->next)
{
if (evp->type == ECORE_EVENT_MOUSE_MOVE)
{
if (motion_events > 1)
{
evp->ignore = 1;
motion_events--;
}
}
else if (evp->type == ECORE_EVENT_DND_DROP_POSITION)
{
if (dnd_pos_events > 1)
{
evp->ignore = 1;
dnd_pos_events--;
}
}
else if (evp->type == ECORE_EVENT_DND_DROP_STATUS)
{
if (dnd_status_events > 1)
{
evp->ignore = 1;
dnd_status_events--;
}
}
}
}
void
ecore_event_filter_events_handle(Ecore_Event * ev)
{
Ecore_Event *evp;
for (evp = ev; evp; evp = evp->next)
{
Ecore_Event_Handler *h;
if (!evp->ignore)
{
for (h = handler[evp->type]; h; h = h->next)
{
if (h->func)
h->func(evp);
}
}
}
}
void
ecore_event_filter_idle_handle(void)
{
Ecore_Event_Idle_Handler *h;
for (h = idle_handlers; h; h = h->next)
h->func(h->data);
}
extern int __quit_ev_loop;
void
ecore_event_filter_init(void)
{
int i;
__quit_ev_loop = 0;
for (i = 0; i < ECORE_EVENT_MAX; i++)
handler[i] = NULL;
}
void
ecore_event_filter_handler_add(Ecore_Event_Type type,
void (*func) (Ecore_Event * ev))
{
Ecore_Event_Handler *h;
h = NEW(Ecore_Event_Handler, 1);
h->func = func;
h->next = handler[type];
handler[type] = h;
}
void
ecore_event_filter_idle_handler_add(void (*func) (void *data), void *data)
{
Ecore_Event_Idle_Handler *h;
h = NEW(Ecore_Event_Idle_Handler, 1);
h->func = func;
h->data = data;
h->next = idle_handlers;
idle_handlers = h;
}

View File

@ -1,320 +0,0 @@
#include "Ecore.h"
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
static void ecore_event_signal_free(void *event);
static void ecore_event_signal_handle_sigchld(int num);
static void ecore_event_signal_handle_sigusr1(int num);
static void ecore_event_signal_handle_sigusr2(int num);
static void ecore_event_signal_handle_sighup(int num);
static void ecore_event_signal_handle_sigpipe(int num);
static void ecore_event_signal_handle_sigsegv(int num);
static void ecore_event_signal_handle_sigfpe(int num);
static void ecore_event_signal_handle_sigill(int num);
static void ecore_event_signal_handle_sigbus(int num);
#ifdef HAVE_SIGSTKFLT
static void ecore_event_signal_handle_sigstkflt(int num);
#endif
#ifdef HAVE_SIGPWR
static void ecore_event_signal_handle_sigpwr(int num);
#endif
static void ecore_event_signal_handle_sigchld(int num);
static void ecore_event_signal_handle_all(pid_t pid);
static int signal_chld_count = 0;
static int signal_usr1_count = 0;
static int signal_usr2_count = 0;
static int signal_hup_count = 0;
/* freeing stuff */
static void
ecore_event_signal_free(void *event)
{
FREE(event);
}
/* signal handlers we can return from and add to signal recieved counts */
static void
ecore_event_signal_handle_sigchld(int num)
{
signal_chld_count++;
return;
num = 0;
}
static void
ecore_event_signal_handle_sigusr1(int num)
{
signal_usr1_count++;
return;
num = 0;
}
static void
ecore_event_signal_handle_sigusr2(int num)
{
signal_usr2_count++;
return;
num = 0;
}
static void
ecore_event_signal_handle_sighup(int num)
{
signal_hup_count++;
return;
num = 0;
}
/* signals to ignore */
static void
ecore_event_signal_handle_sigpipe(int num)
{
return;
num = 0;
}
/* signal handlers we cant return from - so handle here */
static void
ecore_event_signal_handle_sigsegv(int num)
{
for (;;)
{
fprintf(stderr, "EEEEEEEEK SEGV - waiting 10 seconds\n");
sleep(10);
}
/* EEK - can't return - bad */
abort();
num = 0;
}
static void
ecore_event_signal_handle_sigfpe(int num)
{
/* EEK - can't return - bad */
abort();
num = 0;
}
static void
ecore_event_signal_handle_sigill(int num)
{
/* EEK - can't return - bad */
abort();
num = 0;
}
static void
ecore_event_signal_handle_sigbus(int num)
{
/* EEK - can't return - bad */
abort();
num = 0;
}
#ifdef HAVE_SIGSTKFLT
static void
ecore_event_signal_handle_sigstkflt(int num)
{
/* EEK - can't return - bad */
abort();
return;
num = 0;
}
#endif
static void
ecore_event_signal_handle_sigint(int num)
{
exit(0);
return;
num = 0;
}
static void
ecore_event_signal_handle_sigquit(int num)
{
exit(0);
return;
num = 0;
}
static void
ecore_event_signal_handle_sigabrt(int num)
{
abort();
return;
num = 0;
}
static void
ecore_event_signal_handle_sigalrm(int num)
{
return;
num = 0;
}
static void
ecore_event_signal_handle_sigterm(int num)
{
exit(0);
return;
num = 0;
}
#ifdef HAVE_SIGPWR
static void
ecore_event_signal_handle_sigpwr(int num)
{
exit(0);
return;
num = 0;
}
#endif
static void
ecore_event_signal_handle_all(pid_t pid_pass)
{
int status;
pid_t pid;
if (signal_chld_count > 0)
{
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
{
if (WIFEXITED(status))
{
Ecore_Event_Child *e;
int code;
code = WEXITSTATUS(status);
e = NEW(Ecore_Event_Child, 1);
e->pid = pid;
e->exit_code = code;
ecore_add_event(ECORE_EVENT_CHILD, e, ecore_event_signal_free);
}
}
signal_chld_count = 0;
}
while (signal_usr1_count > 0)
{
Ecore_Event_User *e;
e = NEW(Ecore_Event_User, 1);
e->num = 0;
e->hup = 0;
ecore_add_event(ECORE_EVENT_USER, e, ecore_event_signal_free);
signal_usr1_count--;
}
while (signal_hup_count > 0)
{
Ecore_Event_User *e;
e = NEW(Ecore_Event_User, 1);
e->num = 0;
e->hup = 1;
ecore_add_event(ECORE_EVENT_USER, e, ecore_event_signal_free);
signal_hup_count--;
}
return;
pid_pass = 0;
}
int
ecore_event_signal_events_pending(void)
{
return (signal_chld_count + signal_usr1_count + signal_hup_count);
}
void
ecore_event_signal_init(void)
{
struct sigaction sa;
ecore_add_event_pid(0, ecore_event_signal_handle_all);
sa.sa_handler = ecore_event_signal_handle_sigchld;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGCHLD, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigusr1;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR1, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigusr2;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGUSR2, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sighup;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGHUP, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigpipe;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGPIPE, &sa, (struct sigaction *)0);
/*
sa.sa_handler = ecore_event_signal_handle_sigsegv;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGSEGV, &sa, (struct sigaction *)0);
*/
sa.sa_handler = ecore_event_signal_handle_sigfpe;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGFPE, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigill;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGILL, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigbus;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGBUS, &sa, (struct sigaction *)0);
#ifdef HAVE_SIGSTKFLT
sa.sa_handler = ecore_event_signal_handle_sigstkflt;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGSTKFLT, &sa, (struct sigaction *)0);
#endif
sa.sa_handler = ecore_event_signal_handle_sigint;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigquit;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGQUIT, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigabrt;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGABRT, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigalrm;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGALRM, &sa, (struct sigaction *)0);
sa.sa_handler = ecore_event_signal_handle_sigterm;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGTERM, &sa, (struct sigaction *)0);
#ifdef HAVE_SIGPWR
sa.sa_handler = ecore_event_signal_handle_sigpwr;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGPWR, &sa, (struct sigaction *)0);
#endif
}

File diff suppressed because it is too large Load Diff

View File

@ -1,430 +0,0 @@
#include "Ecore.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* glocal (yes global/local) variabels for events */
Ecore_Event_Fd_Handler *fd_handlers = NULL;
Ecore_Event_Ipc_Handler *ipc_handlers = NULL;
Ecore_Event_Pid_Handler *pid_handlers = NULL;
Ecore_Event_Timer *timers = NULL;
Ecore_Event *events = NULL;
Ecore_Event *last_event = NULL;
int __quit_ev_loop = 0;
/* local functions for event handling */
static void ecore_handle_event_timer(void);
static void ecore_handle_zero_event_timer(void);
/* public functions */
/* add an event to the end of the event queue */
void
ecore_add_event(Ecore_Event_Type type, void *event,
void (*ev_free) (void *event))
{
Ecore_Event *ev;
ev = NEW(Ecore_Event, 1);
ev->type = type;
ev->ignore = 0;
ev->event = event;
ev->next = NULL;
ev->ev_free = ev_free;
if (!events)
events = ev;
else
last_event->next = ev;
last_event = ev;
}
/* delete an event from the event queue */
void
ecore_del_event(void *event)
{
Ecore_Event *ev, *pev;
pev = NULL;
ev = events;
while (ev)
{
if (ev->event == event)
{
if (pev)
pev->next = ev->next;
else
events = ev->next;
if (!ev->next)
last_event = pev;
if ((ev->event) && (ev->ev_free))
(*ev->ev_free) (ev->event);
FREE(ev);
return;
}
pev = ev;
ev = ev->next;
}
}
void
ecore_del_all_events(void)
{
Ecore_Event *ev, *pev;
ev = events;
while (ev)
{
pev = ev;
ev = ev->next;
if ((pev->event) && (pev->ev_free))
pev->ev_free(pev->event);
FREE(pev);
}
events = NULL;
last_event = NULL;
}
Ecore_Event *
ecore_get_last_event(void)
{
return last_event;
}
/* add a callback handler if fd is active for reading */
void
ecore_add_event_fd(int fd, void (*func) (int fd))
{
Ecore_Event_Fd_Handler *fd_h;
/* new handler struct */
fd_h = NEW(Ecore_Event_Fd_Handler, 1);
fd_h->next = fd_handlers;
fd_h->fd = fd;
fd_h->func = func;
fd_handlers = fd_h;
}
/* delete handler for fd */
void
ecore_del_event_fd(int fd)
{
START_LIST_DEL(Ecore_Event_Fd_Handler, fd_handlers, (_p->fd == fd));
FREE(_p);
END_LIST_DEL;
}
void
ecore_add_event_pid(pid_t pid, void (*func) (pid_t pid))
{
Ecore_Event_Pid_Handler *pid_h;
/* delete the old handler */
ecore_del_event_pid(pid);
/* new handler struct */
pid_h = NEW(Ecore_Event_Pid_Handler, 1);
pid_h->next = pid_handlers;
pid_h->pid = pid;
pid_h->func = func;
pid_handlers = pid_h;
}
void
ecore_del_event_pid(pid_t pid)
{
START_LIST_DEL(Ecore_Event_Pid_Handler, pid_handlers, (_p->pid == pid));
FREE(_p);
END_LIST_DEL;
}
void
ecore_add_event_ipc(int ipc, void (*func) (int ipc))
{
Ecore_Event_Ipc_Handler *ipc_h;
/* delete the old handler */
ecore_del_event_ipc(ipc);
/* new handler struct */
ipc_h = NEW(Ecore_Event_Ipc_Handler, 1);
ipc_h->next = ipc_handlers;
ipc_h->ipc = ipc;
ipc_h->func = func;
ipc_handlers = ipc_h;
}
void
ecore_del_event_ipc(int ipc)
{
START_LIST_DEL(Ecore_Event_Ipc_Handler, ipc_handlers, (_p->ipc == ipc));
FREE(_p);
END_LIST_DEL;
}
/* sit in this loop forever and process events */
void
ecore_event_loop(void)
{
int fdcount, fdsize, ipccount, ipcsize;
int timed_out, were_events;
double time1, time2, prev_time = 0.0;
struct timeval tval;
fd_set fdset, ipcset;
Ecore_Event_Fd_Handler *fd_h;
Ecore_Event_Pid_Handler *pid_h;
Ecore_Event_Ipc_Handler *ipc_h;
/* init some of the time variables */
time1 = ecore_get_time();
time2 = time1 - prev_time;
prev_time = time1;
while (__quit_ev_loop == 0)
{
/* state setup */
timed_out = 0;
were_events = 0;
/* setup fd array from list of listening fd's */
fdsize = 0;
FD_ZERO(&fdset);
/* for ever fd handler add the fd to the array and incriment fdsize */
for (fd_h = fd_handlers; fd_h; fd_h = fd_h->next)
{
FD_SET(fd_h->fd, &fdset);
if (fd_h->fd > fdsize)
fdsize = fd_h->fd;
}
fdcount = 1;
ipcsize = 0;
FD_ZERO(&ipcset);
/* for ever fd handler add the fd to the array and incriment fdsize */
for (ipc_h = ipc_handlers; ipc_h; ipc_h = ipc_h->next)
{
FD_SET(ipc_h->ipc, &ipcset);
if (ipc_h->ipc > ipcsize)
ipcsize = ipc_h->ipc;
}
ipccount = 1;
/* if there are timers setup adjust timeout value and select */
if (timers)
{
if (timers->just_added)
{
timers->just_added = 0;
time1 = timers->in;
}
else
{
time1 = timers->in - time2;
if (time1 < 0.0)
time1 = 0.0;
timers->in = time1;
}
tval.tv_sec = (long)time1;
tval.tv_usec = (long)((time1 - ((double)tval.tv_sec)) * 1000000);
if (tval.tv_sec < 0)
tval.tv_sec = 0;
if (tval.tv_usec <= 1000)
tval.tv_usec = 1000;
ecore_handle_zero_event_timer();
if ((!ecore_events_pending()) && (!ecore_event_signal_events_pending()))
fdcount = select(fdsize + 1, &fdset, NULL, NULL, &tval);
}
/* no timers - just sit and block */
else
{
if ((!ecore_events_pending()) && (!ecore_event_signal_events_pending()))
fdcount = select(fdsize + 1, &fdset, NULL, NULL, NULL);
}
for (pid_h = pid_handlers; pid_h; pid_h = pid_h->next)
pid_h->func(pid_h->pid);
/* see if we have any new ipc connections */
tval.tv_sec = 0;
tval.tv_usec = 0;
ipccount += select(ipcsize + 1, &ipcset, NULL, NULL, &tval);
/* return < 0 - error or signal interrupt */
if (fdcount < 0)
{
/* error */
if ((errno == ENOMEM) || (errno == EINVAL) || (errno == EBADF))
{
fprintf(stderr, "Lost connection to X display.\n");
exit(1);
}
}
/* timers are available and its a timeout */
if ((timers) && (fdcount == 0))
{
ecore_handle_event_timer();
timed_out = 1;
}
if (fdcount < 0)
fdcount = 0;
if (ecore_events_pending())
{
fdcount++;
FD_SET(ecore_x_get_fd(), &fdset);
}
/* fd's are active */
if (fdcount > 0)
{
/* for every fd handler - if its fd is set - call the func */
for (fd_h = fd_handlers; fd_h;)
{
Ecore_Event_Fd_Handler *fdh;
fdh = fd_h;
fd_h = fd_h->next;
if (FD_ISSET(fdh->fd, &fdset))
fdh->func(fdh->fd);
}
}
/* ipc clients are active */
if (ipccount > 0)
{
for (ipc_h = ipc_handlers; ipc_h;)
{
Ecore_Event_Ipc_Handler *ipch;
ipch = ipc_h;
ipc_h = ipc_h->next;
if (FD_ISSET(ipch->ipc, &ipcset))
ipch->func(ipch->ipc);
}
}
if (events)
ecore_event_filter(events);
if (events)
{
ecore_event_filter_events_handle(events);
were_events = 1;
}
ecore_del_all_events();
if ((timed_out) || (were_events))
ecore_event_filter_idle_handle();
ecore_flush();
time1 = ecore_get_time();
time2 = time1 - prev_time;
prev_time = time1;
}
__quit_ev_loop = 0;
}
/* set a flag to 0 so that we can quit the event loop and shutdown
* properly */
void
ecore_event_loop_quit(void)
{
__quit_ev_loop = 1;
}
/* add a timeout funcitont o be called in "in" seconds with name name */
void
ecore_add_event_timer(char *name, double in, void (*func) (int val, void *data),
int val, void *data)
{
Ecore_Event_Timer *timer, *ptr, *pptr;
double tally;
if (name)
ecore_del_event_timer(name);
timer = NEW(Ecore_Event_Timer, 1);
timer->next = NULL;
timer->func = func;
timer->data = data;
timer->val = val;
timer->just_added = 1;
timer->in = in;
timer->name = strdup(name);
if (!timers)
timers = timer;
else
{
pptr = NULL;
ptr = timers;
tally = 0.0;
while (ptr)
{
tally += ptr->in;
if (tally > in)
{
tally -= ptr->in;
timer->next = ptr;
if (pptr)
pptr->next = timer;
else
timers = timer;
timer->in -= tally;
if (timer->next)
timer->next->in -= timer->in;
return;
}
pptr = ptr;
ptr = ptr->next;
}
if (pptr)
pptr->next = timer;
else
timers = timer;
timer->in -= tally;
}
}
/* delete a timer timeout entry named "name" */
void *
ecore_del_event_timer(char *name)
{
Ecore_Event_Timer *timer, *ptr, *pptr;
pptr = NULL;
ptr = timers;
while (ptr)
{
timer = ptr;
if (!strcmp(timer->name, name))
{
void *data;
if (pptr)
pptr->next = timer->next;
else
timers = timer->next;
if (timer->next)
timer->next->in += timer->in;
IF_FREE(timer->name);
data = timer->data;
FREE(timer);
return data;
}
pptr = ptr;
ptr = ptr->next;
}
return NULL;
}
/* private functions */
static void
ecore_handle_event_timer(void)
{
Ecore_Event_Timer *timer;
if (!timers)
return;
timer = timers;
timers = timer->next;
(*(timer->func)) (timer->val, timer->data);
IF_FREE(timer->name);
FREE(timer);
}
static void
ecore_handle_zero_event_timer(void)
{
while ((timers) && (timers->in == 0.0))
ecore_handle_event_timer();
}

View File

@ -1,187 +0,0 @@
#include "Ecore.h"
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
void ecore_ipc_init(char *path);
void ecore_ipc_cleanup(void);
static void ecore_ipc_connect_handler(int fd);
static void ecore_ipc_client_handler(int fd);
void ecore_ipc_get_data(int fd, void *buf);
void ecore_ipc_send_data(int fd, void *buf, int size);
void ecore_add_ipc_service(int service, void (*func) (int fd));
void ecore_del_ipc_service(int service);
Ecore_Event_Ipc_Service *ipc_services = NULL;
void
ecore_ev_ipc_init(char *path)
{
int fd, len;
struct sockaddr_un saun;
if (path == NULL)
return;
/* a UNIX domain, stream socket */
if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
{
printf("Cannot create ipc socket... disabling ipc.\n");
return;
}
/* create the address we will be binding to */
saun.sun_family = AF_UNIX;
strcpy(saun.sun_path, path);
/* unlink the address so the bind won't fail */
unlink(path);
len = sizeof(saun.sun_family) + strlen(saun.sun_path);
if (bind(fd, (struct sockaddr *)&saun, len) < 0)
{
printf("Cannot bind ipc socket... disabling ipc.\n");
return;
}
/* listen on the socket */
if (listen(fd, 5) < 0)
{
printf("Cannot listen on ipc socket... disabling ipc.\n");
return;
}
/* add ipc listener */
ecore_add_event_ipc(fd, ecore_ipc_connect_handler);
}
void
ecore_ev_ipc_cleanup(void)
{
Ecore_Event_Ipc_Service *ipc_s;
/* cleanup services list */
for (ipc_s = ipc_services; ipc_s; ipc_s = ipc_s->next)
{
ecore_del_ipc_service(ipc_s->service);
}
}
static void
ecore_ipc_connect_handler(int fd)
{
struct sockaddr_un fsaun;
int fromlen, nfd;
/* accept ipc connection */
fromlen = sizeof(fsaun);
if ((nfd = accept(fd, (struct sockaddr *)&fsaun, &fromlen)) < 0)
{
printf("Cannot accept ipc connection... ignoring connection attempt.\n");
return;
}
/* add ipc client */
ecore_add_event_ipc(nfd, ecore_ipc_client_handler);
}
static void
ecore_ipc_client_handler(int fd)
{
int nread, service;
Ecore_Event_Ipc_Service *ipc_s;
if ((nread = read(fd, &service, sizeof(service))) == 0)
{
close(fd);
ecore_del_event_ipc(fd);
}
else if (nread > 0)
{
/* call the service function */
for (ipc_s = ipc_services; ipc_s; ipc_s = ipc_s->next)
{
if (ipc_s->service == service)
{
ipc_s->func(fd);
break;
}
}
}
else
{
printf("ipc error in read service.\n");
fflush(stdout);
}
}
void
ecore_ipc_get_data(int fd, void *buf)
{
int readn, nread;
/* read number of bytes being sent */
if ((nread = read(fd, &readn, sizeof(readn))) == -1)
{
printf("ipc error in get data.\n");
fflush(stdout);
return;
}
/* get data structure */
if ((nread = read(fd, buf, readn)) == -1)
{
printf("ipc error in get data.\n");
fflush(stdout);
return;
}
}
void
ecore_ipc_send_data(int fd, void *buf, int size)
{
int n;
/* send length of data being sent */
if ((n = write(fd, &size, sizeof(size))) == -1)
{
printf("ipc error in send data length.\n");
fflush(stdout);
return;
}
/* send data */
if ((n = write(fd, buf, size)) == -1)
{
printf("ipc error in send data.\n");
fflush(stdout);
return;
}
}
void
ecore_add_ipc_service(int service, void (*func) (int fd))
{
Ecore_Event_Ipc_Service *ipc_s;
/* delete the old service */
ecore_del_ipc_service(service);
/* new service struct */
ipc_s = NEW(Ecore_Event_Ipc_Service, 1);
ipc_s->next = ipc_services;
ipc_s->service = service;
ipc_s->func = func;
ipc_services = ipc_s;
}
void
ecore_del_ipc_service(int service)
{
START_LIST_DEL(Ecore_Event_Ipc_Service, ipc_services,
(_p->service == service));
FREE(_p);
END_LIST_DEL;
}

View File

@ -1,10 +0,0 @@
#include "Ecore.h"
double
ecore_get_time(void)
{
struct timeval timev;
gettimeofday(&timev, NULL);
return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
}

File diff suppressed because it is too large Load Diff