![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_21.png)
4-2
Pen Input Handling
Programmer’s Manual
Upon release, either by pen-up or drag out of the area into another part of the
touch panel, another soft interrupt is sent to the application to notify the user of the
event. This type of area is designed for buttons and selection icons.
4.1.2
Input Area
Input area is an area where writing or drawing is performed. Once defined, PPSM
will monitor the area with the given pen input characteristics such as sampling
rate, pen echoing and pen position sampling. Pen echoing is programmable.
Three modes of operation are available for this type of area, STROKE,
CONFINED or CONTINUOUS.
4.1.2.1 Stroke Mode
Drawing on STROKE type of input area will produce a list of the x and y
coordinate integers to the application at the end of the drawing input sequence,
usually with a pen-up. This list consists of all points of that single stroke from the
pen-input device. When the pen leaves the active area, or pen-up is detected,
then the stroke data ends.
4.1.2.2 Confined Mode
CONFINED mode is very much like STROKE mode excepts that when the pen
input moves out of the defined active area, the coordinates for those points
outside the region are truncated to the value defined by the boundary of the active
area. This means a stroke will not be broken until pen-up is detected.
4.1.2.3 Continuous Mode
Drawing on CONTINUOUS type of input area will continuously produce individual
x and y coordinates to the application as the pen moves across the pen input
panel. With this type of input, soft interrupt is generated for each individual point.
The last input point will be a set of (-1, -1) for pen-up. Developers using this type
of area must ensure the soft interrupts are acknowledged as their number can be
very significant.
4.2
Creating an Active Area.
STATUS
ActiveAreaEnable
(P _U32 areaId U32 type, U32 mode S16 xSrc
S16 ySrc S16 xDest S16 yDest)
This tool creates a new active area for reading pen input. It returns an identifier of
the new area to the caller. Once created, the new active area identifier will be
returned to the application.
The argument type is used to specify whether an icon area or an input area is
required. Mode specifies the input mode for input area.
Example 4-1 Create an active area
49
U32 nextWinId;/* NextWin’s id */
.
Personal Portable System Manager
Programmer’s Manual
Part II
Writing
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.