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

Developer

resources

Creating a simple Brew MP application

A Brew MP application needs to have the following:

  • A BID file containing a unique ID for the application (the ClassID)
  • A component Information File (CIF), that provides information about the application
  • A BAR file, if the application needs resources such as strings or objects
  • Source code (.c file or files)

The source code for the application needs to provide functions to do the following:

  • Create the applet class

    This function is called when the application is being loaded. It calls AEEApplet_New()to create an instance of the class, and also calls the applet's function that initialized data.

  • Initialize applet data

    This function allocates resources, if needed, and sets initial data values.

  • Handle events

    Brew MP sends events, such as key presses or touch events, to applications. This function handles the events, or passes them to the root container or Window Manger for widget- or window-based applications.

  • Free applet data when the application is closed

    This function frees any allocated resources. Applications should release all memory that was allocated before exiting.

  • Draw to the display

When you create an application using the Brew MP C Application Wizard, the wizard creates these functions for you. You may need to customize them for your application.

This section provides information on application files, the functions the application needs, and also provides example code. The example code is from c_basicapp, which is provided in the Brew MP SDK Sample Code that you can installed from SDK Manager.