MacOSX USB tablet support

John M McIntosh johnmci at smalltalkconsulting.com
Sat Feb 7 03:57:09 UTC 2004


Have you considered using another event type in the array?

typedef struct sqKeyboardEvent {
	int type; /* EventTypeKeyboard */
	unsigned int timeStamp; /* time stamp */
	int charCode; /* character code in Mac Roman encoding */
	int pressCode; /* press code; any of EventKeyXXX */
	int modifiers; /* combination of xxxKeyBit */
	int reserved1; /* reserved for future use */
	int reserved2; /* reserved for future use */
	int reserved3; /* reserved for future use */
} sqKeyboardEvent;

You could have another EventType  (EventTypeTable) then use the other  
24 bytes for something else?
Pass up both the normal mouse event, then the extra data?

Also another consideration is just to do a plugin. I think you setup a  
plugin procedure to get called by asking the main event loop
to give you the events, then stuff on a queue



On Feb 6, 2004, at 11:49 AM, Javier Diaz-Reinoso wrote:

> A few months ago I reported that USB tablets are not working in  
> Squeak, the reply by John M. McIntosh was that the current support are  
> only for the (old) serial tablets.
>
> I got the sources of the VM and then I search for documents about the  
> USB tablets in wacom.com, for MacOSX there are the file  
> EN0056-NxtGenImpGuideX.pdf wich contains a lot of information for  
> implementing the support.
>
> The principal point is: OSX add to the (carbon) mouse events extra  
> information when the source is a tablet, such as pressure, tilt,  
> etc..., I think the class Sensor implement this in squeak, but at the  
> moment call a (extra) primitive, need to be modified to receive that  
> extra information in the default mouse event.
>
> A secondary point is implementing proximity events: MouseEntered and  
> MouseExited, this are used to determine: "if the tip or erasure end of  
> a pen is in use", I don't think this is implemented in squeak/morphic.
>
> For the VM the principal changes needed are using ReceiveNextEvent  
> instead of WaitNextEvent (there are an example in the PDF), and put  
> the extra data in the squeak mouse event.
>
> Javier Diaz-Reinoso
> Web: http://homepage.mac.com/javier_diaz_r/
>
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list