Automatically exported from code.google.com/p/clisp-gdi
C Common Lisp Awk Objective-C Diff Perl Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
ChangeLog
Makefile
README
TODO
cs-modprep.patch
document.pl
func.awk
funcs-count.c
funcs-count.h
funcs-msimg.c
funcs-msimg.h
funcs-ok.c
funcs-ok.h
funcs-out.c
funcs-out.h
funcs-prob.c
funcs-prob.h
funcs-rest.c
funcs-rest.h
funcs-rest.sh
funcs.lst
funcs.syms
gdi-doc.lisp
gdi-docs.patch
gdi-preload.lisp
gdi.diff
gdi.lisp
gdi.m
gdi.txt
gdi.xml
gdi32.syms
input.awk
link.sh
local.c
make-rest.sh
missing.h
modernize.pl
msimg32.syms
p1.lisp
p2.lisp
struct1.awk
struct2.awk
struct3.awk
test.tst

README

This module is a interface to gdi, the lowest level
ms windows graphics api. It is a work in progress,
and is copyright Dan Stanger 2002 and Reini Urban 2006-2009.
It is licensed under the LGPL and all rights assigned
to the Free Software Foundation.
There are many places to learn about the gdi.  The wine
web site has some links to web sites about it.

This is the modern version of gdi, i.e. case-sensitive with proper caps.
The repo is at http://code.google.com/p/clisp-gdi/

WARNING: DONT regenerate any code without
thinking very carefully.  All the c files were hand edited,
and you dont want to redo that.
END WARNING

All the C files were hand edited to use with_string_0
instead of TheAsciz.

Todo:

objdump -t /lib/w32api/libgdi32.a |\
  perl -alne 'if (/__imp__/) { $_=$F[@F-1]; s/__imp__//; s/@\d+//; print;}' |\
  sort > gdi32.syms
perl -pe's/\S+\s+(\S+)\(.*/\1/' *.h| sort > funcs.syms
diff -0u gdi32.syms funcs.syms |grep -v @@ > gdi.diff
for f in $(egrep -- "^-[A-Z]" gdi.diff|cut -c2-)
do grep $f /usr/include/w32api/wingdi.h; done

Fix warnings.
Test existing code.
Add more message handling code.
Check the necessity of the process*, output* routines.
Write more examples, and documentation.

To install:
Copy the gdi directory to clisp-x.y/modules/gdi and 
configure with --with-modules=gdi, or
copy gdi under the build dir and add gdi to the MODULES line in build/Makefile
Compile gdi.lisp with:
clisp -q -c gdi.lisp
make the object gdi.o
make
cd ..
echo rm -rf gdi+base;./clisp-link add gdi . gdi+base
cd gdi+base
cp * /usr/local/lib/clisp/base

now clisp should execute with the gdi module, and *features* should
have :GDI in it.

Notes:
Some functions which in c would return a struct return multiple values
if it was more convenient to do so.  For example GetTextExtentPoint32
would return a SIZE, but most of the time, the size will be used
directly.  If this proves not to be the case, change it.

Files:
Makefile
func.awk program to convert output of c preprocesser to clisp module code
funcs-count.c functions <= 5 args
funcs-count.h header file of functions <= 5 args
funcs-ok.c functions that probably translated ok
funcs-ok.h header file of functions that probably translated ok
funcs-out.c functions that return data
funcs-out.h header file of functions that return data
funcs-prob.c functions that have been hand edited
funcs-prob.h header file of functions that will require hand editing
funcs-rest.c functions that have more than 5 parameters, has been hand edited
funcs-rest.c-prev a previous version of the previous file
funcs-rest.h header file of functions that have more than 5 parameters
funcs-rest.sh script to create the funcs-rest.c
gdi-preload.lisp used by module process
gdi.lisp lisp code for module
gdi.m c code that was written by hand
input.awk code to help generate process* routines in local.c
link.sh used by module process
local.c mostly process and output routines.
struct1.awk code to help generate process* routines in local.c
struct2.awk code to help generate lisp structures
struct3.awk code to help generate output* routines in local.c
todo obsolete ??? todo list

Maintainer note:
Dan Stanger stopped writing at this code at end of 2003, and 
Reini Urban took it over 2006.