
4-4
Pen InpuPen Input Handling
Programmer’s Manual
4.5
Active Area Enquiry
STATUS
ActiveAreaRead
(U32 areaId, P_S16 xSrc P_S16 ySrc P_S16
xDest P_S16 yDest)
Given a valid active area identifier, this tool will return to the caller the coordinates
of the active area.
Example 4-5 Enquire coordinates of the active area
85
86
87
U32 id, size;
P_U16 inData;
S16 xSrc, ySrc, xDest, yDest;
.
.
.
ActiveAreaRead(id, &xSrc, &ySrc, &xDest, &yDest);
180
4.6
Put Active Area to Front of List
STATUS
ActiveAreaToFront
(U32 areaId)
Given the active area identifier, this tool will extract the element from the active
area linked list and insert the element at the front of the list.
Once the element is at the front of the list, it will be the active area to receive pen
input if there are other active areas that overlaps the same physical area.
4.7
Pen Echoing
STATUS
AreaEchoEnable
(U32 areaId)
STATUS
AreaEchoDisable
(U32 areaId)
For input active areas, echoing can be disabled. By default, ink echoing is
enabled when input active areas are created. The argument to both tools must be
valid active area identifier generated from ActvieAreaEnable tool.
4.8
Pen Color and Pen Size
STATUS
PenEchoParam
(U16 echoCol, U16 echoWidth)
PPSM allows the application developer to set the echoing pen width and echo pen
color. This tool only sets the echoing property of the calling task, and will not affect
other applications within the system.
4.9
Creating a Control Active Area
STATUS
CtrlIconEnable
(P_U32 iconId S16 xSrc, S16 ySrc, U16 iconType)
A pre-defined group of direction control icons are available in PPSM for the
Personal Portable System Manager
Programmer’s Manual
4-5
purpose of scrolling. They are basically icon areas with specific bitmaps mapped
to the icon area. Two sets of icons are defined; 8x8 icons and 16x16 icons.
An identifier is returned to the caller for the new control icon.
Example 4-6 Create a control active area
80
U32
.
.
.
sendButton, rcvButton, abortSend, abortRcv;
103 if ( CtrlIconEnable(&sendButton, BUTTON_X, BUTTON_Y, PPSM_ICON_16_UP)
104 != PPSM_OK )
105 return (PPSM_ERROR);
106
107 if ( CtrlIconEnable(&abortSend, BUTTON_X+20, BUTTON_Y, PPSM_ICON_16_DONE)
108 != PPSM_OK )
109 return (PPSM_ERROR);
110
111 if ( CtrlIconEnable(&rcvButton, BUTTON_X, BUTTON_Y+30, PPSM_ICON_16_DOWN)
112 != PPSM_OK )
113 return (PPSM_ERROR);
Icon Type
Description
8 x 8 icon with up arrow bitmap
PPSM_ICON_8_DOWN
8 x 8 icon with down arrow bitmap
PPSM_ICON_8_LEFT
8 x 8 icon with left arrow bitmap
PPSM_ICON_8_RIGHT
8 x 8 icon with right arrow bitmap
PPSM_ICON_8_DONE
8 x 16 icon with rectangle bitmap
PPSM_ICON_16_UP
16 x 16 icon with up arrow bitmap
PPSM_ICON_16_DOWN
16 x 16 icon with down arrow bitmap
PPSM_ICON_16_LEFT
16 x 16 icon with left arrow bitmap
PPSM_ICON_16_RIGHT
16 x 16 icon with right arrow bitmap
PPSM_ICON_16_DONE
16 x 32 icon with rectangle bitmap
Figure 4-1 Control Icon bitmaps
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.