/*******************************************************************************
*                              Openwave Systems.                               *
*                            Device Products Group                             *
*                               Shinjuku, JAPAN                                *
****************************************************************************//**
   @file
   This is the API for the BREW OEM customisation extension.
   Each OEM provides their own versions of these functions to customise aspects
   of the Openwave Mobile Browser V6.  The OEM must not modify this header file,
   but can freely modify the source code to suit their individual customisation
   requirements.

*//*
   REVISION HISTORY:
   Date:       Who:               Email:
      - Details:
--------------------------------------------------------------------------------
   25 Oct 2004 Richard Willis     richard.willis@openwave.com
      - Initial version

*******************************************************************************/
/*******************************************************************************
*                  Copyright (c) Openwave Systems 1995-2004                    *
*                            All rights reserved.                              *
*                                                                              *
*     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF Openwave Systems Inc.     *
*               The copyright notice above does not evidence any               *
*              actual or intended publication of such source code.             *
*******************************************************************************/

#ifndef _OEMOMBV6_H
#define _OEMOMBV6_H


/*==============================================================================

	INCLUDES

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't include if we're only pre-processing to expand the macros
#include "aeedisp.h"
#include "aeeinterface.h"
#endif //ndef PREPROCESSING_ONLY


/*==============================================================================

	DEFINES

==============================================================================*/
/**@ingroup grp_widgets
 This is a mask of all available widgets.  Generally not used by the OEM.
*/
#define miOEMOMBV6_AllWidgetsMask ( \
   keOEMOMBV6_W_Background \
   | keOEMOMBV6_W_Dialog \
   | keOEMOMBV6_W_Hrule \
   | keOEMOMBV6_W_Spin \
   | keOEMOMBV6_W_Popup \
   | keOEMOMBV6_W_Button \
   | keOEMOMBV6_W_Input \
   | keOEMOMBV6_W_ScrollBar \
   | keOEMOMBV6_W_ScrollElevator \
   | keOEMOMBV6_W_ScrollArrows \
   | keOEMOMBV6_W_Overlay \
   | keOEMOMBV6_W_PopupArrow \
   | keOEMOMBV6_W_SpinArrows \
   | keOEMOMBV6_W_Softkeys \
   | keOEMOMBV6_W_InputBack \
   | keOEMOMBV6_W_Menu \
   | keOEMOMBV6_W_MenuBack \
)

/**@ingroup grp_widgets
 This is a mask of all available widget styles.  Generally not used by the OEM.
*/
#define miOEMOMBV6_AllWidgetStylesMask ( \
   keOEMOMBV6_WS_Selected \
   | keOEMOMBV6_WS_Pushed \
   | keOEMOMBV6_WS_Edit \
   | keOEMOMBV6_WS_Disabled \
)


/*==============================================================================

	TYPES

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't define if we're only pre-processing to expand the macros

/**@ingroup grp_image
 This enum describes the image that the browser needs.
 The OEM may ignore any image that they don't wish to customise.  Any image they
 ignore will result in the browser drawing its internal default image.  Refer
 to #teOEMOMBV6_ImageStyle for a list of styles that may be applied to an image.
*/
typedef enum
{
   keOEMOMBV6_I_More,               ///< Indicator stating there's more text to the right.  This text will horizontally scroll when it gets the focus.
   keOEMOMBV6_I_ScrollUp,           ///< An up arrow for scrollbars.
   keOEMOMBV6_I_ScrollDown,         ///< A down arrow for scrollbars.
   keOEMOMBV6_I_RadioOn,            ///< Radio button in a ticked state.
   keOEMOMBV6_I_RadioOff,           ///< Radio button in an unticked state.
   keOEMOMBV6_I_CheckboxOn,         ///< Checkbox in a checked state.
   keOEMOMBV6_I_CheckboxOff,        ///< Checkbox in an unchecked state.
   keOEMOMBV6_I_SpinUp,             ///< Spin control up arrow.
   keOEMOMBV6_I_SpinDown,           ///< Spin control dn arrow
   keOEMOMBV6_I_PopArrow,           ///< Popup control arrow.
   keOEMOMBV6_I_AutofillDownArrow,  ///< Autofill down arrow.
   keOEMOMBV6_I_AutofillUpArrow,    ///< Autofill up arrow.
   keOEMOMBV6_I_BrokenImage,        ///< Broken image indicator.
   keOEMOMBV6_I_FetchImage,         ///< Fetching image indicator.
   keOEMOMBV6_I_BrokenObject,       ///< Broken object indicator.
   keOEMOMBV6_I_FetchObject,        ///< Fetching object indicator.
   keOEMOMBV6_I_Splash,             ///< This is the full screen splash image, provided by Openwave and given to the OEM.  The OEM should always return this image.  The style is always keOEMOMBV6_IS_Plain.  poIsTransparent is ignored.
   keOEMOMBV6_I_ConnectingSplash,   ///< This is a full screen image (or animation) that is drawn after the splash during the first connection attempt.  The style is always keOEMOMBV6_IS_Plain.  poIsTransparent is ignored.
   keOEMOMBV6_I_SoundPlaySplash     ///< This is a full screen image (or animation) that is drawn during interactive sound playback.  The style is always keOEMOMBV6_IS_Plain.  poIsTransparent is ignored.
}teOEMOMBV6_Image;

/**@ingroup grp_image
 These are the styles that may be applied to an #teOEMOMBV6_Image.
 The OEM should alter the appearance of the image to suit the style.
*/
typedef enum
{
   keOEMOMBV6_IS_Plain           = 0x00000000, ///< No special style applied.
   keOEMOMBV6_IS_Link            = 0x00000004, ///< The image is also a link.  This style is only applicable to #keOEMOMBV6_I_BrokenImage, #keOEMOMBV6_I_FetchImage, #keOEMOMBV6_I_BrokenObject and #keOEMOMBV6_I_FetchObject.
   keOEMOMBV6_IS_Selected        = 0x00000008, ///< The image has focus.  For example, may use reverse video.
   keOEMOMBV6_IS_Pushed          = 0x00000200, ///< The image should be represented in a pushed state.
   keOEMOMBV6_IS_Disabled        = 0x00100000, ///< The image should be drawn in a disabled state.  The user will not be able to select this item (ie, a radio button or checkbox).  For example @<input type="checkbox" name="box01" disabled@>.
   keOEMOMBV6_IS_SelectedPushed  = keOEMOMBV6_IS_Selected | keOEMOMBV6_IS_Pushed ///< The image has the focus and should be represented in a pushed state.
}teOEMOMBV6_ImageStyle;

/**@ingroup grp_image
 The format of the image being returned by the OEM to the browser.
 This enumeration is returned to the caller to describe the format of the image
 that is being returned by the OEM's customisation. For example, see
 OEMOMBV6_kpvGetImage().
*/
typedef enum
{
	keOEMOMBV6_IF_UPCBMP,///< Openwave colour @ref UPCBMP native format.  This is provided only for backward compatability with legacy code that exists on the target.  @ref keOEMOMBV6_IF_IBitmap is the preferred format.
	keOEMOMBV6_IF_IBitmap, ///< BREW @b IBitmap format.  This is the format used by BREW internally, and should be the fastest on to draw with.  Does not support animations.  It is described in the BREW SDK documents.
	keOEMOMBV6_IF_IImage ///< BREW @b IImage format.  This format supports PNG, BMP, JPEG and BCI (Brew Compressed Image) and can animate any of these formats.  A handset may also support additional formats.  This is the format that is returned when calling @b ISHELL_LoadImage.  It is described in the BREW SDK documents.
}teOEMOMBV6_ImageFormat;

/**@ingroup grp_widgets
 This identifies the widget that is either going to be drawn,
 OEMOMBV6_oDrawWidget(), or the widget whose colour is required,
 OEMOMBV6_lwGetWidgetColour().  Widgets may have styles applied
 as listed in #teOEMOMBV6_WidgetStyle.\n\n
 Note that #keOEMOMBV6_W_Background is zero and always occurs alone, so it must
 be tested for equality, eg:
   - @code if( eWidget == keOEMOMBV6_W_Background ) @endcode\n
 Other widgets may be detected in any way, but are typically done with a binary
 "&" test, eg:
   - @code if( eWidget & keOEMOMBV6_W_Button ) @endcode
*/
typedef enum
{
   keOEMOMBV6_W_Background      = 0x00,     ///< Clears the given area to the background.
   keOEMOMBV6_W_Dialog          = 0x04,     ///< Creates a dialog box with outline and shadow.
   keOEMOMBV6_W_Hrule           = 0x08,     ///< Clears the given area as a horizontal rule.
   keOEMOMBV6_W_Spin            = 0x10,     ///< Creates a spin control.
   keOEMOMBV6_W_Popup           = 0x20,     ///< Creates a popup control.
   keOEMOMBV6_W_Button          = 0x40,     ///< Creates a push button control.
   keOEMOMBV6_W_Input           = 0x80,     ///< Creates a text input control.  Unlike #keOEMOMBV6_W_InputBack, this enum signals the @b whole input field is being drawn, so the OEM may draw a border around it if desired.
   keOEMOMBV6_W_ScrollBar       = 0x100,    ///< Background of a scrollbar.
   keOEMOMBV6_W_ScrollElevator  = 0x200,    ///< Scroll "elevator" or "thumb".
   keOEMOMBV6_W_ScrollArrows    = 0x400,    ///< Area drawn dehind scroll arrows.
   keOEMOMBV6_W_Overlay         = 0x800,    ///< Like kClearBackground but for dialogs.
   keOEMOMBV6_W_PopupArrow      = 0x2000,   ///< Background behind arrow in popup control.
   keOEMOMBV6_W_SpinArrows      = 0x4000,   ///< Background behind arrow in spin control.
   keOEMOMBV6_W_Softkeys        = 0x8000,   ///< Background for the softkey area.
   keOEMOMBV6_W_InputBack       = 0x20000,  ///< Background of an input box.  For colour, This must return the same colour as #keOEMOMBV6_W_Input.  This style signals that only a small part of the input box is being drawn for speed optimization.
   keOEMOMBV6_W_Menu            = 0x40000,  ///< The menu box (used for brow menu and softkeys).
   keOEMOMBV6_W_MenuBack        = 0x80000,  ///< Background for a menu (to clear individual lines).
}teOEMOMBV6_Widget;

/**@ingroup grp_widgets
 This identifies the style that may be applied to a widget.  Not all widgets
 have styles applied.  Note these elements are bitmapped, so if the widget style
 is actually keOEMOMBV6_WS_SelectedPushed, then saying
 @code
 eStyle = keOEMOMBV6_WS_SelectedPushed;
 
 if( eStyle & keOEMOMBV6_WS_Pushed ) @endcode will return TRUE.
*/
typedef enum
{
   keOEMOMBV6_WS_Plain     = 0x00,     ///< Indicates there is no style.  This is not bitmapped, it must be tested for equality, eg eStyle == keOEMOMBV6_WS_Plain.
   keOEMOMBV6_WS_Selected  = 0x01,     ///< Indicates the area should show focus.  Could typically be done with inverse video or highlight.
   keOEMOMBV6_WS_Pushed    = 0x02,     ///< The area should be drawn in a pushed state, showing user feedback for controls.
   keOEMOMBV6_WS_Edit      = 0x1000,   ///< This signals the user is editing in this control.
   keOEMOMBV6_WS_Disabled  = 0x100000, ///< To draw disabled widgets.

   keOEMOMBV6_WS_SelectedPushed = keOEMOMBV6_WS_Selected | keOEMOMBV6_WS_Pushed, ///< The widget has the focus and should be drawn in a pushed state.
   keOEMOMBV6_WS_SelectedEdit = keOEMOMBV6_WS_Selected | keOEMOMBV6_WS_Edit, ///< The widget has the focus and is being editted.
   keOEMOMBV6_WS_PushedEdit = keOEMOMBV6_WS_Pushed | keOEMOMBV6_WS_Edit, ///< The widget is being editted and should be shown in a pushed state.
   keOEMOMBV6_WS_SelectedPushedEdit = keOEMOMBV6_WS_Selected | keOEMOMBV6_WS_Pushed | keOEMOMBV6_WS_Edit, ///< The widget has the focus, should be drawn in a pushed state and is being editted by the user.
}teOEMOMBV6_WidgetStyle;

/**@ingroup grp_colour
 The style of the text.  This parameter may be used to alter the appearence of
 text.  Note these style flags are binary or'd together when passed
 in to the function.  For example:
   -  @code keOEMOMBV6_Style_Spin | keOEMOMBV6_Style_MenuText | keOEMOMBV6_Style_Option | keOEMOMBV6_Style_Edit @endcode\n
 Thus you may perform a binary test to see which ones are set, eg:
   - @code
   if( eStyle & keOEMOMBV6_Style_Selected )
      <IT'S GOT THE FOCUS>
   @endcode
*/
typedef enum
{
   keOEMOMBV6_TS_Plain           = 0x00,     ///< Default text style, typically ignored.
   keOEMOMBV6_TS_Bold            = 0x01,     ///< Bold text.
   keOEMOMBV6_TS_Italic          = 0x02,     ///< Italic text.
   keOEMOMBV6_TS_Link            = 0x04,     ///< The text drawn is a link.
   keOEMOMBV6_TS_Selected        = 0x08,     ///< The text drawn has focus.  For example, may use reverse video.
   keOEMOMBV6_TS_Spin            = 0x10,     ///< Text drawn inside spin control.
   keOEMOMBV6_TS_Popup           = 0x20,     ///< Text drawn inside popup control.
   keOEMOMBV6_TS_Button          = 0x40,     ///< Text drawn on a button.
   keOEMOMBV6_TS_Input           = 0x80,     ///< Text drawn inside a text input.\n

   keOEMOMBV6_TS_WordTextCursor  = 0x100,    ///< Style used for SPECIAL word cursor.
   keOEMOMBV6_TS_Pushed          = 0x200,    ///< Text style of a control that is pushed.
   keOEMOMBV6_TS_Pre             = 0x400,    ///< Text inside \<pre\> tag.
   keOEMOMBV6_TS_Underline       = 0x800,    ///< Underlined text.
   keOEMOMBV6_TS_Edit            = 0x1000,   ///< Text for a control in edit mode.
   keOEMOMBV6_TS_Strikeout       = 0x2000,   ///< Strikeout text.
   keOEMOMBV6_TS_Overline        = 0x4000,   ///< Overline text.\n

   keOEMOMBV6_TS_DialogText      = 0x10000,  ///< Text in dialogs like 404 error.
   keOEMOMBV6_TS_MenuText        = 0x20000,  ///< Text in menus like browser menu.\n

   keOEMOMBV6_TS_Oblique         = 0x40000,  ///< CSS oblique property.
   keOEMOMBV6_TS_Clipboard       = 0x80000,  ///< Text drawn when the clipboard is active.
   keOEMOMBV6_TS_Disabled        = 0x100000, ///< Whether the text is in disabled mode.\n

   keOEMOMBV6_TS_Option          = 0x400000  ///< Style of text written in an \<option\>, alt text for an image and menu option.
}teOEMOMBV6_TextStyle;

/**@ingroup grp_fonts
 This is the list of 4 font styles that are available in the BREW environment.  
 Note that in BREW, you need a unique font class that will render in the desired style. 
*/
typedef enum
{
   keOEMOMBV6_FS_Normal = 0,     ///< Normal.
   keOEMOMBV6_FS_Bold = 1,       ///< @b Bold.
   keOEMOMBV6_FS_Italic = 2,     ///< @a Italic.
   keOEMOMBV6_FS_BoldItalic = 3, ///< <b><i>Bold Italic</i></b>.
   keOEMOMBV6_FS_END             ///< @b Placeholder @b Only.  Do not use this value.
}teOEMOMBV6_FontStyle;

/**@ingroup grp_fonts
 This structure provides the mapping between the font class ID and the font 
 style. A class ID of 0 means there is no special font for this style.
*/
typedef struct
{
   AEECLSID             lwClsID; ///< This is the class ID used to create an instance of the font.  Set to zero if no unique font is required.
   teOEMOMBV6_FontStyle eFontStyle; ///< This is the font style to use.
} tsOEMOMBV6_FontMap;

/**@ingroup grp_fonts
 This stucture defines one complete font set.  A font set comprises of an
 @ref pg_html_size followed by the list of 4 font maps, #tsOEMOMBV6_FontMap,
 one for each BREW style.
*/
typedef struct
{
   uint32                     lwNearestHTMLSize; ///< Refer @ref pg_html_size.  Use this font when the HTML pixel size equals this value.  For example, the actual font may only be 12pixels high, but if this is set to 30, then a web page that wants a 30pixel (or near enough) font would use this one.  If this is 0, the actual font size will be used.
   const tsOEMOMBV6_FontMap   kasMap[keOEMOMBV6_FS_END]; ///< Map of Logical font to Class ID.  Used for the 4 different font styles.
}tsOEMOMBV6_FontSet;

/**@ingroup grp_fonts
 This defines one font family.  The browser will try to match the family name 
 with that required by the web page.  Each font family may have one or more 
 different sizes of font.  Within each size, there can be 4 styles.
*/
typedef struct
{
   const char  * const        kpczName;      ///< Family name, eg Helvetica
   uint32                     lwNofFonts;    ///< Number of different sized fonts in this family.
   const tsOEMOMBV6_FontSet   *kasFontSet;   ///< The list of different font sizes.
}tsOEMOMBV6_FamilyFonts;

/**@ingroup grp_animation
 This enum describes the reason for the delay.  The OEM should typically use
 this reason to display a different animation as a way of informing the user
 of the progress of their request.
*/
typedef enum
{
   keOEMOMBV6_WR_Sending      = 0, ///< Sending data to the network.
   keOEMOMBV6_WR_Receiving    = 1, ///< Receiving data from the network.
   keOEMOMBV6_WR_Waiting      = 2, ///< Waiting for a response from the network.
   keOEMOMBV6_WR_Working      = 3, ///< Performing internal work.
   keOEMOMBV6_WR_PrevPage     = 4, ///< Loading the previous page from the internal cache.
   keOEMOMBV6_WR_Layout       = 5, ///< Laying out and rendering the page.
   keOEMOMBV6_WR_END               ///< Signals there is no wait reason and any animation being displayed should be stopped.
}teOEMOMV6_WaitReason;

/**@ingroup grp_busy
 This is a list of the busy reasons.
 A busy period is always starts when keIOMBV6_BR_Starting is issued and ends 
 when keIOMBV6_BR_Ended is issued. The reason for the busy period will be sent 
 following keIOMBV6_BR_Starting.
*/
typedef enum
{
   keOEMOMBV6_BR_Starting     = 0, ///< Signals the start of a busy period. Notification only, can't be aborted.
   keOEMOMBV6_BR_KeyGen       = 1, ///< The browser is generating a key. This can be aborted.
   keOEMOMBV6_BR_UI           = 2, ///< The browser is busy laying out or rendering the user interface. Notification only, can't be aborted.
   keOEMOMBV6_BR_Compiling    = 3, ///< The browser is busy with a compiling operation. This can be aborted.
   keOEMOMBV6_BR_Yield        = 5, ///< The browser is decoding an image and the internal \b "busy.yield.interval" line count has been reached. Notification only, can't be aborted.
   keOEMOMBV6_BR_ImageDecode  = 6, ///< The browser is decoding an image and the internal \b "busy.yield.interval" line count has been reached. This can be aborted.
   keOEMOMBV6_BR_FastTimer    = 127, ///< The BREW device layer has run a series of fast timers and lower priority tasks may not have been able to run. Notification only, can't be aborted and is not sent within #keOEMOMBV6_BR_Starting & #keOEMOMBV6_BR_Ended reasons. The OEM should kick the watchdog to ensure periods of high browser activity (like fast moving marquee) don't cause a reset.
   keOEMOMBV6_BR_Ended        = 128 ///< Signals the end of a busy period.
}teOEMOMBV6_BusyReason;

#endif //ndef PREPROCESSING_ONLY


///@ingroup grp_lifecycle
///These Function ID's are not really relevant to the OEM.  They are used by the
///Openwave browser to determine which functions have been implemented by the
///OEM.
typedef enum
{
   #ifndef DOXYGEN_SHOULD_SKIP_THIS //make doxygen ignore this block of code
   #define FUNCTION( RETURNS, NAME, VERSION_NUM )   keOEMOMBV6_FID_##NAME,
   #define NO_FUNCTION( RETURNS, NAME, VERSION_NUM )   keOEMOMBV6_FID_##NAME,
   #include "oemombv6.m"
   keOEMOMBV6_FID_END
   #endif //DOXYGEN_SHOULD_SKIP_THIS
}teOEMOMBV6_FuncID;


/*==============================================================================

	INTERFACE

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't define if we're only pre-processing to expand the macros

/**@struct stIOEMOMBv6
   @ingroup grp_lifecycle
   This is the interface to the OEM Openwave Mobile Browser V6 customisation
   extension.  It is returned when the extension is created with a call to
   ISHELL_CreateInstance with a class ID of @ref AEECLSID_OEMOMBV6.*/
typedef struct stIOEMOMBv6 IOEMOMBv6; ///<  This is the #stIOEMOMBv6 structure
/** @example ishell_create_example.c
   For example, this is how ISHELL_CreateInstance may be called.  This is
   normally only done by the browser, but the OEM could also use thier custom
   version of this extension for other applications.*/


#ifndef DOXYGEN_SHOULD_SKIP_THIS //make doxygen ignore this block of code
//This is the definition of the virtual function structure
AEEINTERFACE( OEMOMBV6 )
{
   //declare our virtual functions using macro expansion
   #define FUNCTION( RETURNS, NAME, VERSION_NUM )   RETURNS (*NAME)(
   #define NO_FUNCTION( RETURNS, NAME, VERSION_NUM )   RETURNS (*NAME)(
   #define NO_PARAM                    void
   #define FIRST_PARAM( TYPE, NAME )   TYPE NAME
   #define NEXT_PARAM( TYPE, NAME )    , TYPE NAME
   #define END_FUNCTION                );
   #include "oemombv6.m"
};
#endif //DOXYGEN_SHOULD_SKIP_THIS

#endif //ndef PREPROCESSING_ONLY


/*==============================================================================

	VIRTUAL FUNCTION ACCESSORS

==============================================================================*/
#ifndef PREPROCESSING_ONLY //don't define if we're only pre-processing to expand the macros

///@ingroup grp_lifecycle
///Wrapper for the lwOEMOMBV6_AddRef() function.  This macro provides a convienient method
///for an application to call this function.
#define OEMOMBV6_lwAddRef( psIOEMOMBV6 ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->lwOEMOMBV6_AddRef( psIOEMOMBV6 )

///@ingroup grp_lifecycle
///Wrapper for the lwOEMOMBV6_Release() function.  This macro provides a convienient method
///for an application to call this function.
#define OEMOMBV6_lwRelease( psIOEMOMBV6 ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->lwOEMOMBV6_Release( psIOEMOMBV6 )

///@ingroup grp_lifecycle
///Wrapper for the oOEMOMBV6_FunctionExists() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oFunctionExists( psIOEMOMBV6, eFuncID, kpczFuncName, wVersion ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_FunctionExists( psIOEMOMBV6, eFuncID, kpczFuncName, wVersion )

///@ingroup grp_busy
///Wrapper for the oOEMOMBV6_BrowserBusy() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oBrowserBusy( psIOEMOMBV6, eBusyReason ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_BrowserBusy( psIOEMOMBV6, eBusyReason )

///@ingroup grp_image
///Wrapper for the oOEMOMBV6_GetImageDimensions() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oGetImageDimensions( psIOEMOMBV6, eImage, eStyle, pwWidth, pwHeight ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_GetImageDimensions( psIOEMOMBV6, eImage, eStyle, pwWidth, pwHeight )

///@ingroup grp_image
///Wrapper for the kpvOEMOMBV6_GetImage() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_kpvGetImage( psIOEMOMBV6, eImage, eStyle, peFormat, poIsTransparent, poFreeMemory ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->kpvOEMOMBV6_GetImage( psIOEMOMBV6, eImage, eStyle, peFormat, poIsTransparent, poFreeMemory )

///@ingroup grp_image
///Wrapper for the kpvOEMOMBV6_GetPictogram() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_kpvGetPictogram( psIOEMOMBV6, iPictogramNum, piPictogramLength ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->kpvOEMOMBV6_GetPictogram( psIOEMOMBV6, iPictogramNum, piPictogramLength )

///@ingroup grp_image
///Wrapper for the iOEMOMBV6_GetPictogramNumber() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_iGetPictogramNumber( psIOEMOMBV6, kpczName ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->iOEMOMBV6_GetPictogramNumber( psIOEMOMBV6, kpczName )

///@ingroup grp_widgets
///Wrapper for the oOEMOMBV6_DrawWidget() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oDrawWidget( psIOEMOMBV6, psIDisplay, eWidget, eStyle, psRect, lwColour ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_DrawWidget( psIOEMOMBV6, psIDisplay, eWidget, eStyle, psRect, lwColour )

///@ingroup grp_colour
///Wrapper for the lwOEMOMBV6_GetWidgetColour() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_lwGetWidgetColour( psIOEMOMBV6, eWidget, eStyle ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->lwOEMOMBV6_GetWidgetColour( psIOEMOMBV6, eWidget, eStyle )

///@ingroup grp_colour
///Wrapper for the vOEMOMBV6_GetTextColourStyle() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_vGetTextColourStyle( psIOEMOMBV6, eStyle, plwFlags, plwTextForeColour, plwTextBackColour ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->vOEMOMBV6_GetTextColourStyle( psIOEMOMBV6, eStyle, plwFlags, plwTextForeColour, plwTextBackColour )

///@ingroup grp_widgets
///Wrapper for the oOEMOMBV6_DrawProgressBar() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oDrawProgressBar( psIOEMOMBV6, psIDisplay, psRect, lwCurrentNofBytes, lwTotalNofBytes ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_DrawProgressBar( psIOEMOMBV6, psIDisplay, psRect, lwCurrentNofBytes, lwTotalNofBytes )

///@ingroup grp_widgets
///Wrapper for the iOEMOMBV6_MeasureProgressBar() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_iMeasureProgressBar( psIOEMOMBV6, piMaxWidth ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->iOEMOMBV6_MeasureProgressBar( psIOEMOMBV6, piMaxWidth )

///@ingroup grp_fonts
///Wrapper for the kpsOEMOMBV6_GetFontFamilies() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_kpsGetFontFamilies( psIOEMOMBV6, pbNofFamilies ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->kpsOEMOMBV6_GetFontFamilies( psIOEMOMBV6, pbNofFamilies )

///@ingroup grp_animation
///Wrapper for the oOEMOMBV6_DrawWaitingAnimation() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_oDrawWaitingAnimation( psIOEMOMBV6, psIDisplay, psSKeyArea, eReason, poBrowserCanUpdate ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->oOEMOMBV6_DrawWaitingAnimation( psIOEMOMBV6, psIDisplay, psSKeyArea, eReason, poBrowserCanUpdate )

///@ingroup grp_softkey
///Wrapper for the vOEMOMBV6_GetMenuSoftkeyLabel() function.  This macro provides a
///convienient method for an application to call this function.
#define OEMOMBV6_vGetMenuSoftkeyLabel( psIOEMOMBV6, lwLanguage, kpaczLabel ) \
   AEEGETPVTBL( (psIOEMOMBV6), OEMOMBV6 )->vOEMOMBV6_GetMenuSoftkeyLabel( psIOEMOMBV6, lwLanguage, kpaczLabel )


/*==============================================================================

	FUNCTION DECLARATIONS

==============================================================================*/
/**@ingroup grp_lifecycle
@DESCRIPTION
 This function is used by the BREW core to load an instance of the class.  It
 is never called directly by an application.  Instead, it is called by BREW when
 an application requests an instance of this class via ISHELL_CreateInstance().\n\n
 The OEM should add this function to the BREW class table to allow
 ISHELL_CreateInstance() to create an instance of this extension.
@PARAMETERS
 @param[in] psIShell Contains pointer to the IShell interface. 
 @param[in] lwClassID Specifies the ClassID of the applet which is being loaded
 @param[in] ppsMe On return, points to a valid instance of the class provided
   this function returns SUCCESS.  If an error occurs, this will return NULL.
@RETURNS
 SUCCESS if the extension initialised ok, otherwise an error explaining the
 reason for the initialisation failure.
*/
int IOEMOMBV6_New( IShell *psIShell, AEECLSID lwClassID, void **ppsMe );

#endif //ndef PREPROCESSING_ONLY

#endif /* _OEMOMBV6_H */



