![](http://datasheet.mmic.net.cn/260000/PPSMMANUAL_datasheet_15946768/PPSMMANUAL_23.png)
4-6
Pen InpuPen Input Handling
Programmer’s Manual
114 if ( CtrlIconEnable(&abortRcv, BUTTON_X+20, BUTTON_Y+30, PPSM_ICON_16_DONE)
115 != PPSM_OK )
116 return (PPSM_ERROR);
4.10
Removing a Control Active Area
STATUS
CtrlIconDisable
(U32 iconId)
Remove the control icon from PPSM. This will remove the icon and the icon will
no longer generate icon interrupt to the application.
4.11
Push Active Area List into Background
STATUS
ActiveListPush
(void)
PPSM maintains a stack for storing active area lists. When this tool is called, ActiveAreaEnable tool. This shall be called within the task that creates the active
the active areas that have been created so far will be pushed into background,
and a new list begins. A new list has no element by default. Subsequent active
area created will belong to the new active list.
This tool allow applications to create a temporary active area list, and return to the
original active areas when the temporary list is no longer required.
Example 4-7 Push active area list into background
/* Push all existing active areas to background */
If (rv = ActiveListPush())
{
/* error */
return (rv);
}
/* create new set of active areas */
GenerateNew();
/* Call subroutine */
ScratchPad();
/* restore original active areas */
if (rv = ActiveListPop())
{
/* error */
return (rv);
}
4.12
Pop Active Area List to Foreground
STATUS
ActiveListPop
(void)
PPSM maintains a stack for storing active area lists. When this tool is called, the
least recently pushed in active area list becomes the current active area list. This
tool must be called after an ActiveListPush() call has been made previously.
Otherwise, an error will be returned.
Personal Portable System Manager
Programmer’s Manual
4-3
.
.
104 /* Create an active area for the NextWin icon with the coordinates
105 * as specified below.
106 */
107
108 if (ActiveAreaEnable(&nextWinId, ICON_AREA, 0, NEXT_WIN_XSRC,
109
NEXT_WIN_YSRC, NEXT_WIN_XDEST, NEXT_WIN_YDEST)
110 != PPSM_OK)
111 return PPSM_ERROR;
112
4.3
Removing an Active Area
STATUS
ActiveAreaDisable
)
Removes a valid active area from the application. The argument supplied into this
tool must be a valid active area identifier that was generated by the
area.
Once removed, the region of touch panel that was previously defined by the
identifier will no longer respond to pen input.
Example 4-2 Remove an active area
74
U32 backId;
.
.
.
262
263
if ( ActiveAreaDisable(backId) != PPSM_OK )
return (PPSM_ERROR);
4.4
Suspending an Active Area
STATUS
ActiveAreaSuspend
Activate or deactivate a valid active area. Once an active area has been created,
it can be suspended from pen input response at anytime.
To suspend, call this tool with the AREA_SUSPEND flag. Once suspended, the
active area no longer sends out interrupt messages to the application when
writing in the region.
To re-enable the active area, simply call this tool with the AREA_REENABLE flag.
Example 4-3 Suspend an active area
if ((rv = ActiveAreaSuspend( iconId, AREA_SUSPEND))
{
/* error */
return (rv);
}
Example 4-4 Re-enable an active area
if ((rv = ActiveAreaSuspend( iconId, AREA_REENABLE))
{
/* error */
return (rv);
}
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.