Texas Instruments TI-89 Developer's Manual page 101

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Chapter 7: Flash Application Layout
case CM_UNPACK:
/* Pass the event on to the Target app before applying
AppProcessEvent(super, e);
localize(self, XR_stringPtr(XR_NativeLanguage));
break;
case CM_UNINSTALL:
case CM_PACK:
/* Unhook the localizer before passing the event on to the
unlocalize(self);
default:
/* Forward all events to their rightful owner */
AppProcessEvent(super, e);
}
}
/**********************************************************************
If requested language matches the language we know, hook over
Target app.
**********************************************************************/
BOOL localize(pFrame self, char *requestedLang)
{
if (hook == 0 && strcmp(requestedLang, MyLang) == 0)
return OO_InstallAppHookByName(TargetApp, (pFrame)&TargetStrings, &hook);
return FALSE;
}
/**********************************************************************
Unhook from Target app if we have anything to unhook.
**********************************************************************/
void unlocalize(pFrame self)
{
if (hook)
{
OO_UninstallAppHookByName(TargetApp, hook);
hook = 0;
}
}
/**********************************************************************
We have just been notified that a new app was installed. Is it our
Target application? If so, apply our localization to it.
**********************************************************************/
void noticeInstall(pFrame self, ACB const *pacb)
{
if (strcmp((char *)pacb->appHeader->name, (char *)TargetApp) == 0)
localize(self, XR_stringPtr(XR_NativeLanguage));
}
TI-89 / TI-92 Plus Developer Guide
the localizer hook. */
Target app */
Not for Distribution
59
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents