API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

AEEUID_ASEXTENG_EVENTFILTERSTR

Brew Release
Brew MP 1.0.2
See Also
IASExtension IASExtension_Initialize() IASEngine IASEngine_QueryInterface() IParameters1 IParameters1_SetParam()
Description
This constant identifies the parameter used by an ActionScript extension to specify its event filtering string.
During ActionScript extension creation, IASExtension_Initialize() will be called on the extension and provided an IASEngine object. The extension may attempt to query this object for an IParameters1 object, which may then be used to configure the events routed to the extension by setting the AEEUID_ASExtEng_EventFilterStr parameter. The data provided to this parameter is a char* string, e.g. "0x100,0x200,0x300-0x320", along with the length of the string (not including NULL terminator).
The string consists of any number of comma-delimited hex values representing one or more Brew MP events that the extension is requesting to receive. The values in the string MUST be sorted, lowest values first.
A range of Brew MP events can also be specified by separating two hex values with a '-' character. For example "0x300-0x320" in above example means the extension is requesting all events in the range of 0x300 to 0x320.
The following code snippet illustrates the usage of this parameter:
      static AEEResult MyASE_Initialize(IASExtension *pi, IASEngine *piEngine, 
                                        IASArgs *piArgs, boolean *pbWantEvents)
      {
         MyASE *me = (MyASE*) (void*) pi;
         IParameters1 *piParams = NULL;

         // configure event routing
         if (AEE_SUCCESS == IASEngine_QueryInterface(piEngine, AEEIID_IParameters1, (void**) &piParams)) {

            // tell the engine we are interested in key events only
            const char *pszEventStr = "0x100-0x102";
            (void) IParameters1_SetParam(piParams, AEEUID_ASExtEng_EventFilterStr, pszEventStr, std_strlen(pszEventStr));

            // we must still indicate that we want events, otherwise the event filter is useless
            *pbWantEvents = TRUE;

            IParameters1_Release(piParams);
            piParams = NULL;
         }

         me->piEngine = piEngine;
         IASEngine_AddRef(piEngine);

         return AEE_SUCCESS;
      }
Definition
  •    #define AEEUID_ASExtEng_EventFilterStr   0x0108a6f4