I tried using the screenInfo everytime the x,y position is scaled and
returned, but that does not seem to help. I do not know how to support
screen resolition changes. If anybody has an idea, let me know.
The driver is basically a slightly massaged dmc driver, there is probably
still some stuff to clean. Here it is as a shell archive (don't know it
the maillist rejects attachments...)
bruno
On Tue, 24 May 2005, David Dawes wrote:
On Tue, May 24, 2005 at 08:05:43AM -0700, bruno schwander wrote:
I have my driver for the serial MagicTouch touchscreen working. There is
just one thing that I am not sure of: if the resolution is changed
dynamically (by some program running fullscreen for example), the scaling
is off. How do I find if the resolution has changed ? Right now, I check
the screen size when the device inits, and store that away. Should I
instead use the actual screen size everytime through screenInfo ? Is that
safe ? Also, how can I twiddle the DTR, RTS lines, I do not find some
abstraction for that...
Maybe xf86SetSerialModemState() will let you twiddle the DTR, RTS lines.
I haven't looked at that stuff in a while. Perhaps someone else can give
you some answers to your other questions.
then, how do I submit the driver ? send it to this list ?
You can either send it here, or submit it at bugs.xfree86.org.
David
___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering sh file. Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# magictouch
# magictouch/Imakefile
# magictouch/xf86MagicTouch.c
# magictouch/magictouch.man
# magictouch/xf86MagicTouch.h
#
echo c - magictouch
mkdir -p magictouch /dev/null 21
echo x - magictouch/Imakefile
sed 's/^X//' magictouch/Imakefile 'END-of-magictouch/Imakefile'
X#define IHaveModules
X#include Server.tmpl
X
XSRCS = xf86MagicTouch.c
XOBJS = xf86MagicTouch.o
X
XDRIVER = magictouch
X
XINCLUDES = -I. -I$(XF86COMSRC) -I$(XF86SRC)/loader -I$(XF86OSSRC) \
X -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC)
X
X#if MakeHasPosixVariableSubstitutions
XSubdirLibraryRule($(OBJS))
X#endif
X
XModuleObjectRule()
X
XObjectModuleTarget($(DRIVER),$(OBJS))
X
XInstallObjectModule($(DRIVER),$(MODULEDIR),input)
X
X#if !defined(XF86DriverSDK)
XInstallModuleManPage($(DRIVER))
X#endif
X
XDependTarget()
X
XInstallDriverSDKObjectModule($(DRIVER),$(DRIVERSDKMODULEDIR),input)
END-of-magictouch/Imakefile
echo x - magictouch/xf86MagicTouch.c
sed 's/^X//' magictouch/xf86MagicTouch.c
'END-of-magictouch/xf86MagicTouch.c'
X/*
X * Copyright (c) 2005 Bruno Schwander
X * Author: Bruno Schwander [EMAIL PROTECTED]
X * Template driver used: dmc:
X *
X * Copyright (c) 1999 Machine Vision Holdings Incorporated
X * Author: Mayk Langer [EMAIL PROTECTED]
X *
X * Template driver used: Copyright (c) 1998 Metro Link Incorporated
X *
X * Permission is hereby granted, free of charge, to any person obtaining a
X * copy of this software and associated documentation files (the Software),
X * to deal in the Software without restriction, including without limitation
X * the rights to use, copy, modify, merge, publish, distribute, sublicense,
X * and/or sell copies of the Software, and to permit persons to whom the
X * Software is furnished to do so, subject to the following conditions:
X *
X * The above copyright notice and this permission notice shall be included in
X * all copies or substantial portions of the Software.
X *
X * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
X * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
X * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
X * THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
X * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
X * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
X * SOFTWARE.
X *
X */
X
X#define _MGT_C_
X
X#include misc.h
X#include xf86.h
X#define NEED_XF86_TYPES
X#include xf86_ansic.h
X#include xf86_OSproc.h
X#include xf86Xinput.h
X#include xisb.h
X#include exevents.h
X
X#include xf86MagicTouch.h
X
XInputDriverRec MGT = {
X1,
Xmagictouch,
XNULL,
XMGTPreInit,
X/*MGTUnInit*/NULL,
XNULL,
X0
X};
X
X
X
X#ifdef XFree86LOADER
X
Xstatic XF86ModuleVersionInfo VersionRec =
X{
X magictouch,
X MODULEVENDORSTRING,
X MODINFOSTRING1,
X MODINFOSTRING2,
X XF86_VERSION_CURRENT,
X 1, 0, 0,
X ABI_CLASS_XINPUT,
X ABI_XINPUT_VERSION,
X MOD_CLASS_XINPUT,
X {0, 0, 0, 0}/* signature, to be patched
into the file by
X