Apple Newton Utilities Guide de l'utilisateur Page 623

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 622
CHAPTER 17
Additional System Services
Using Additional System Services 17-7
Power Registry 17
The Power Registry implements a cooperative model for powering the Newton on
and off. When power is turned on or off, this service
noties registered applications of the impending change in power status
allows applications to temporarily halt the shutdown process
executes registered callback functions
The Power Registry model is based on the registration of callback functions to
execute when the Newton is powered on or off. You can use the
RegPowerOn
function to register a callback function for execution when the Newton is powered
on. The
UnRegPowerOn function reverses the action of the RegPowerOn
function; that is, it removes the specied function from the registry of functions
called when the Newton is powered on.
Power-on functions can also be tied to the login screen. The login screen appears
when the user powers on a Newton device. Password-protected Newton devices
display the login screen until the password is correctly entered. If your power-on
function has a visible component, you should tie this function into the login screen,
instead of as a regular power-on function. The
RegLogin and UnRegLogin
methods are used to register and unregister login functions respectively.
You can use the
RegPowerOff function to register a callback function for
execution when the Newton is powered off. The
UnRegPowerOff function
removes the specied function from the registry of functions called when the
Newton is powered off.
Note that “power-off” callback functions can delay an impending shutdown when
necessary. For example, your callback function might delay an impending power-
off operation until it can successfully tear down a communications endpoint.
Power Compatibility Information 17
Applications can now register callback functions to execute when the Newton
powers on or off. All of the functions that provide this service are new.
The
BatteryLevel function is obsolete. It has been replaced by the
BatteryStatus function.
Using Additional System Services 17
This section discusses how to use the undo, idler objects, alerts and alarms, change
notication, progress reporting, and power registry services.
Vue de la page 622
1 2 ... 618 619 620 621 622 623 624 625 626 627 628 ... 941 942

Commentaires sur ces manuels

Pas de commentaire