Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Notifier

This Notifier primitive is used to declare a notifier, which allows the applet to register for notifications via EVT_NOTIFY.

Prototype

Notifier { 
  clstype = AEECLSID_Shell, 
  clsnotify = AEECLSID_MyApplet,
  mask = NMASK_SHELL_INIT, 
}
  • clstype: Which notifier ClassID will deliver the notification.
  • clsnotify: The ClassID of the applet to be notified.
  • mask: For each type of notifier, a mask determines the type of events for which an applet is notified. See the class documentation for the mask. Multiple masks can be OR'd in Lua using the following syntax: bit.bor(NMASK_X, NMASK_Y). Or, define multiple Notifier primitives to specify multiple masks.

Example:

For the applet to register for notifications:

Where there is a file named myApp.bid that contains the following definition of a friendly ClassID:

#define AEECLSID_myApp 0x6F3B438B

The CIF file that contains the Notifier primitive can include AEECLSID_myApp.bid, which provides a definition of the friendly ClassID. You can use either friendly ClassIDs or raw ClassIDs.

include "myApp.bid"  -- Need to include to use AEECLSID_myApp
include "AEEClassIDs.h" -- Need to include for clstype (i.e. the notifier's ClassIDs)
include "AEEShell.h"    -- Need to include to use NMASK_SHELL_XXX for masks; 
                        -- Other NMASK_XXX could require other headers

Notifier {
   clstype =AEECLSID_SHELL,       -- the ClassID of the notifier
   clsnotify = AEECLSID_myApp,    -- ClassID of the applet to receive the notification
   mask =bit.bor(NMASK_SHELL_INIT, NMASK_SHELL_KEY), -- the NMASK that indicates the 
                                                     -- type of event(s) for which 
                                                     -- the applet is notified.
}

Refer to the AEECLSID topic in the C/C++ API Reference for more information about available ClassID types and their applicable masks.

For more information about events, including the AEE Shell Event EVT_NOTIFY, refer to the AEEEvent topic in the C API Reference, available within the Brew MP SDK installation in the Documents folder, and on the Brew MP website.