📄 jdd_mmiapi.h.svn-base
字号:
* @param[in] bRedraw Specifies whether the display needs to be redrawn.
*/
void jdd_MMIEndDisplay (JC_UINT32 uiWindowID, JC_BOOLEAN bRedraw) ;
/*** End of Window ***/
/**
* @brief This function should return the color palette for the given RGB combination which is very close to the given environment.
* @param[in] ucRedColor Specifies the red color
* @param[in] ucGreenColor Specifies the green color
* @param[in] ucBlueColor Specifies the blue color
*/
JC_UINT32 jdd_MMIGetRGBPalette (JC_UINT8 ucRedColor, JC_UINT8 ucGreenColor,
JC_UINT8 ucBlueColor) ;
/**
* @brief This function shoudl return the foreground color that can be visible
* with the background color passed
* @param[in] uiBackgroundColor Specifies the background color
* @param[in] uiForegroundColor Specifies the foreground color
*/
JC_UINT32 jdd_MMIGetForegroundColor (JC_UINT32 uiBackgroundColor,
JC_UINT32 uiForegroundColor) ;
/**
* @brief This function draws the rectangle on the specified window.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] pstRect Specifies the rectangle position for the rectangle
* @param[in] pstBorderProps Specifies the Border Properties for the rectangle.
* If the border property is NULL, then there is no need to create the rectangle with border.
* @param[in] iBackgroundColor Specifies the background color for the rectangle.
* If the background color is less than zero the rectangle need to be created with the default background color.
* @param[out] puiRectID Specifies the rectangle identifier for the given rectangle area.
* If the environment does not support the rectangle has control this value need to be assigned to zero.
* Some environment allows the rectangle to be created as a control. In othercase, this function shall draw the rectangle to the specified region without creating any control information.
* The control identified need to be assigned to zero.
* @see jdd_MMIClearRect
*/
JC_RETCODE jdd_MMIDrawRect (JC_UINT32 uiWindowID, JC_RECT *pstRect,
JC_BORDER_PROPS *pstBorderProps, JC_INT32 iBackgroundColor,
JC_UINT32 *puiRectID) ;
/**
* @brief This function clears the particular rectangle area.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] pstRect Specifies the rectangle position for the rectangle to be cleared
* This function shall be used only if the environment does not support the rectangle has a control. It needs to clear the particular area.
* @see jdd_MMIDrawRect
*/
JC_RETCODE jdd_MMIClearRect (JC_UINT32 uiWindowID, JC_RECT *pstRect) ;
/**
* @brief This function provides the text metrics for the given text for the specified style and width.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] pstStyle Specifies the style attribute which needs to be applied for the text
* @param[in] pmTextValue Specifies the text string
* @param[in] uiWidth Specifies the width in device units
* @param[out] pstTextMetrics Provides the text metrics for the given style, text and width.
*
* This function should provide the number of characters that can be rendered for the given width and
* also provides the width that is required to render the specified number of characters.
* It also provides the height that is required to render the text. Depending on the text metrics that
* has been provided by this function the text control shall be created and positioned using the #jdd_MMICreateControl function.
* In order to have the zero-pixel accuracy in rendering this function should provide the exact number of characters and width
* that is required.
*
* When uiWidth is zero, this function returns the width and height of the full string passed
* along with the total number of character.
*
* When uiWidth > zero, this function returns number of character that can be displayed
* within the specified uiWidth, and exact width and height for those number of characters.
*/
JC_RETCODE jdd_MMIGetTextMetrics (JC_UINT32 uiWindowID, const JC_STYLE *pstStyle,
const JC_CHAR *pmTextValue, JC_UINT32 uiWidth,
JC_TEXTMETRICS *pstTextMetrics) ;
/**
* @brief This function gets the maximum text control width
* @param[in] uiWindowID Specifies the window identifier
* @retval max width of the text control. zero for as per page instruction
*
* This function should return the maximum width of a text control that can be
* created. This value is used while creating the text control. This width is
* mapped against the jdd_MMIGetTextMetrics width
*/
JC_UINT32 jdd_MMIGetMaxTextWidth (JC_UINT32 uiWindowID) ;
/**
* @brief This function checks whether the specified font or font-family available.
* @param[in] uiWindowID Specifies the window identifier
* @param[in] pcFontName Specifies the font name.
* @param[in] pcLang Specifies the language attribute, this is an optional parameter.
* @param[out] piFontID Returns the font identifier for the specified font and this will be
* refered in the #JC_STYLE.
*
* This shall be used by the application to choose the appropriate font. If the language
* attribute is specified this function should check whether the specific font's has the
* required font to render the language specific character.
*/
JC_RETCODE jdd_MMIIsFontAvailable (JC_UINT32 uiWindowID, JC_INT8 *pcFontName,
JC_INT8 *pcLang, JC_INT32 *piFontID) ;
/** Control **/
/**
* @brief This function creates the different control depending on the type of control.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] eControlType Specifies the control type which need to be created
* @param[in] pstControlProperty Specifies the attribute value for this control
* @param[in, out] pstRect Specifies the initial horizontal and vertical positions to render the text on the specified window.
* The actual width and height that has been required for rendering the text
* @param[out] puiControlID Provides the identifier for the created control
* The control shall be positioned on the specified location on the given window.
* If the width and height is specified (that is greater than zero) then the control needs to be created
* for the specific width and height. If the width and height of the control is zero then depending
* on the control style and device characteristics, the control needs to be created with
* the default width and height. The position of the control (left and top) shall be changed
* later by the application if required.
*/
JC_RETCODE jdd_MMICreateControl (JC_UINT32 uiWindowID, EControlType eControlType,
JC_CONTROL_PROPERTIES *pstControlProperty,
JC_RECT *pstRect, JC_UINT32 *puiControlID) ;
/**
* @brief This function sets the specified control's show state.
* @param[in] uiWindowID Specifies the identifier for the parent of the label window
* @param[in] uiControlID Specifies the control identifie
* @param[in] bIsVisible Specifies the state of the control visibility state. If it is JC_TRUE the control state shall be set to visible otherwise it shall be set to invisible.
*/
JC_RETCODE jdd_MMIShowControl (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_BOOLEAN bIsVisible) ;
/**
* @brief This function sets the control's enable state.
* @param[in] uiWindowID Specifies the identifier for the parent of the label window
* @param[in] uiControlID Specifies the control identifier
* @param[in] bIsEnable Specifies the state of the control enable state. If it is JC_TRUE the enable state shall be set to enabled, where user can make action, otherwise it shall be set to disabled.
*/
JC_RETCODE jdd_MMIEnableControl (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_BOOLEAN bIsEnable) ;
/**
* @brief This function changes the position of the specified control.
* @param[in] uiWindowID Specifies the identifier for the parent of the label window
* @param[in] uiControlID Specifies the control identifier
* @param[in] pstRect Specifies the new co-ordinates of the control on the specified window
*/
JC_RETCODE jdd_MMIMoveControl (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
const JC_RECT *pstRect) ;
/**
* @brief This function gets the control identifier that has the focus on the specified window.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[out] puiControlID Returns the control identifier, which is of currently focused.
*/
JC_RETCODE jdd_MMIGetFocusedControl (JC_UINT32 uiWindowID, JC_UINT32 *puiControlID) ;
/**
* @brief This function sets the focus to the specified control identifier on the specified window.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] uiControlID Specifies the control identifier, if the value is zero then the current focused control needs to be unfocused.
* @param[in] bIsFocus Specifies whether focus should be set or not for the control specified using the other two parameters.
*/
JC_RETCODE jdd_MMISetFocusedControl (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_BOOLEAN bIsFocus) ;
/**
* @brief This function gets the background and foreground color for the control.
* @param[in] uiWindowID Specifies the window ID.
* @param[in] uiControlID Specifies the control ID.
* @param[out] piBackgroundColor Returns the background color that is set to the specific window.
* @param[out] piForegroundColor Returns the foreground color that is set to the specific window.
*/
JC_RETCODE jdd_MMIGetControlColor (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_INT32 *piBackgroundColor, JC_INT32 *piForegroundColor) ;
/**
* @brief This function sets the background and foreground color for the control.
* @param[in] uiWindowID Specifies the window ID
* @param[in] uiControlID Specifies the control ID
* @param[in] iBackgroundColor Specifies the background color
* @param[in] iForegroundColor Specifies the foreground color
*/
JC_RETCODE jdd_MMISetControlColor (JC_UINT32 uiWindowID,
JC_UINT32 uiControlID,
JC_INT32 iBackgroundColor,
JC_INT32 iForegroundColor) ;
/**
* @brief This function sets the default color for background and foreground for the control depending on the bIsBackgroundColor and bIsForegroundColor parameters.
* @param[in] uiWindowID Specifies the window ID
* @param[in] uiControlID ] Specifies the control ID
* @param[in] bIsBackgroundColor Specifies the whether the default background color need to be set.
* @param[in] bIsForegroundColor Specifies the whether the default foreground color need to be set.
*/
JC_RETCODE jdd_MMISetDefaultControlColor (JC_UINT32 uiWindowID,
JC_UINT32 uiControlID,
JC_BOOLEAN bIsBackgroundColor,
JC_BOOLEAN bIsForegroundColor) ;
/**
* @brief This function destroys the specified control and frees any memory the control is occupied.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] uiControlID Specifies the control identifier
*/
JC_RETCODE jdd_MMIDeleteControl (JC_UINT32 uiWindowID, JC_UINT32 uiControlID) ;
/**
* @brief This function gets the current position, width and height of the specified control.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] uiControlID Specifies the control identifier
* @param[out] pstRect Provides the current horizontal position, vertical position, width and height of the control
*/
JC_RETCODE jdd_MMIGetControlRect (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_RECT *pstRect) ;
/**
* @brief This function sets the new position, width and height for the specified control.
* @param[in] uiWindowID Specifies the identifier for the window
* @param[in] uiControlID Specifies the control identifier
* @param[in] pstRect Specifies the new horizontal position, vertical position, width and height of the control
*/
JC_RETCODE jdd_MMISetControlRect (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
const JC_RECT *pstRect) ;
/** End of Control **/
/** Text Box **/
/**
* @brief This function sets the label value to the text box control.
* @param[in] uiWindowID Specifies the identifier for the window.
* @param[in] uiControlID Specifies the Text Box identifier
* @param[in] pmTextValue Specifies the text value that needs to be set to the Text box.
*/
JC_RETCODE jdd_MMISetTextValue (JC_UINT32 uiWindowID, JC_UINT32 uiControlID,
JC_CHAR *pmTextValue) ;
/**
* @brief This function select or deselect the specific region in the specified control.
* @param[in] uiWindowID Specifies the Window identifier
* @param[in] uiControlID Specifies the control identifier
* @param[in] uiStrLen Specifies the length of the string that needs to be highlighted
* @param[in] uiOffset Specifies the offset from the which the string needs to start highlighting.
* @param[in] bIsHighlight Specifies whether this function is called for select or deselect.
* @param[out] puiID Returns the unique identifier for selection.
*/
void jdd_MMIHighlightText (JC_UINT32 uiWindowID,
JC_UINT32 uiControlID,
JC_UINT32 uiStrLen,
JC_UINT32 uiOffset,
JC_BOOLEAN bIsHighlight,
JC_UINT32 *puiID) ;
/** End of Text Box **/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -