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


API Reference


The display of the mobile device, including the way in which text and graphics are displayed, the Window Manager, and widgets that control functionality.


The widget controller handles user interaction, such as key events. The controller is used to interpret certain events passed to widgets. It updates the widget's view and model based on these events. The controller interface provides an object reference counting mechanisms that allow objects to manage their own memory instances. In addition, the interface provides APIs for registering a handler with a controller.


IDisplay is still the interface of choice for basic display functionality in Brew MP, although IDisplay-based services should not be used in windowed applications. To convert a legacy IDisplay-based application to a windowed application, developers should use the DisplayWidget to wrap the IDisplay in a window-friendly widget. For bitmaps, in addition to standard support for blitting, scaling, rotation and flip, Brew MP exposes the image processing library for hue, intensity, saturation and effects such as sepia, filter and fog.


Graphics support includes 2D drawing primitives and sprites, as well as support for industry standard OpenGL ES 1.1 hardware accelerated 3D graphics on supported hardware platforms. The SDK includes libraries that implement OpenGL ES APIs to be linked with 3D applications and take advantage of graphics capabilities on the chipset.


UI Widgets provide a framework for developers quickly to build a highly customized UI. The framework comprises pre-packaged basic UI components that represent the fundamental parts of a UI, such as support for radio buttons, soft keys, text entry, lists and scrollbars. The Transition Manager is infrastructure to coordinate transitions between widgets. It synchronizes screen updates during multiple concurrent animations, transitions, and other multi-frame UI sequences. The platform provides several (Fader, Mover, Scroller, Scaler, Resizer) and OEMs can develop their own effects to use within the Transition Manager. Widgets also support touch screen-based user interfaces with built-in functionality. OEMs have developed touch screen UIs with Widgets, so the platform is expanding to keep pace. Controller is useful for selecting from lists; Observer allows apps to query on path-based touch gestures (angle, speed); Localization delivers the touch events to the proper Widget on the screen. OEMs can extend Widgets by adding custom controllers to existing Widgets or by developing new Widgets on their own.

Window Manager

The Brew MP Window Manager allows applications to create multiple windows of varying types, and enables multiple applications to share the device's display at the same time. Its built-in functions go beyond the basic requirements for window management on a Brew MP device. For example, if you have a legacy, non-windowed app on the screen, and windowed app tries to create a pop-up notification on top of that, only one or the other can be visible on the screen. But Window Manager takes a screenshot of the legacy app and displays the pop-up notification over it, as if it were a windowed app. Apps have full control over their window to specify size, position and type (full screen, popup, softkey, annunciator, and icon). Window Manager has priority-based stacking and suppression of popup windows, and manages z-order stacking of windows, including "window families." Each window is a Widget supporting the IWidget interface, and the SDK includes reference widgets for Trig, Flash, BUIW, and Display-based applications. Developers can wrap custom framework or environment applications with a widget which handles application- and window- related events. Regarding look and feel, OEMs are free to customize the Window Manager application provided with the platform, even relaxing Window Manager and allowing each app to handle its own window visual designs. The home screen is a special case because it is the idle screen on the phone, so Brew MP supports a pluggable "home screen" window that is not subject to "minimize/close all windows" commands from applications. The home screen can host task tray and active app icons as in the desktop environment.