⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jpgwidget.h

📁 基于TI公司Cortex-M3的uart超级通信开发
💻 H
📖 第 1 页 / 共 3 页
字号:
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function enables background color fill for JPEG widget.  The display
//! is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetFillOn(pWidget)            \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            pW->ulStyle |= JW_STYLE_FILL;    \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Sets the font for a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//! \param pFnt is a pointer to the font to use to draw text on the push
//! button.
//!
//! This function changes the font used to draw text on the JPEG widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetFontSet(pWidget, pFnt)     \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            const tFont *pF = pFnt;          \
            pW->pFont = pF;                  \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Disables the image on a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function disables the drawing of an image on a JPEG widget.
//! The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetImageOff(pWidget)          \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            pW->ulStyle &= ~(JW_STYLE_IMG);  \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Sets the outline color of a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to outline the widget.
//!
//! This function changes the color used to outline the JPEG widget on the
//! display.  The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetOutlineColorSet(pWidget, ulColor) \
        do                                          \
        {                                           \
            tJPEGWidget *pW = pWidget;              \
            pW->ulOutlineColor = ulColor;           \
        }                                           \
        while(0)


//*****************************************************************************
//
//! Sets the outline width of a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to be modified.
//! \param ucWidth
//!
//! This function changes the width of the border around the JPEG widget.
//! The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetOutlineWidthSet(pWidget, ucWidth) \
        do                                          \
        {                                           \
            tJPEGWidget *pW = pWidget;              \
            pW->ucBorderWidth = ucWidth;            \
        }                                           \
        while(0)

//*****************************************************************************
//
//! Disables outlining of a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function disables the outlining of a JPEG widget.  The display
//! is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetOutlineOff(pWidget)           \
        do                                      \
        {                                       \
            tJPEGWidget *pW = pWidget;          \
            pW->ulStyle &= ~(JW_STYLE_OUTLINE); \
        }                                       \
        while(0)

//*****************************************************************************
//
//! Enables outlining of a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function enables the outlining of a JPEG widget.  The display
//! is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetOutlineOn(pWidget)         \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            pW->ulStyle |= JW_STYLE_OUTLINE; \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Sets the text color of a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to be modified.
//! \param ulColor is the 24-bit RGB color to use to draw text on the push
//! button.
//!
//! This function changes the color used to draw text on the JPEG widget on the
//! display.  The display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetTextColorSet(pWidget, ulColor) \
        do                                       \
        {                                        \
            tJPEGWidget *pW = pWidget;           \
            pW->ulTextColor = ulColor;           \
        }                                        \
        while(0)

//*****************************************************************************
//
//! Disables the text on a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function disables the drawing of text on a JPEG widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetTextOff(pWidget)           \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            pW->ulStyle &= ~(JW_STYLE_TEXT); \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Enables the text on a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to modify.
//!
//! This function enables the drawing of text on a JPEG widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetTextOn(pWidget)            \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            pW->ulStyle |= JW_STYLE_TEXT;    \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Changes the text drawn on a JPEG widget.
//!
//! \param pWidget is a pointer to the JPEG widget to be modified.
//! \param pcTxt is a pointer to the text to draw onto the JPEG widget.
//!
//! This function changes the text that is drawn onto the JPEG widget.  The
//! display is not updated until the next paint request.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetTextSet(pWidget, pcTxt)    \
        do                                   \
        {                                    \
            tJPEGWidget *pW = pWidget;       \
            const char *pcT = pcTxt;         \
            pW->pcText = pcT;                \
        }                                    \
        while(0)

//*****************************************************************************
//
//! Locks a JPEG widget making it ignore pointer input.
//!
//! \param pWidget is a pointer to the widget to modify.
//!
//! This function locks a JPEG widget and makes it ignore all pointer input.
//! When locked, a widget acts as a passive canvas.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetLock(pWidget)                 \
        do                                      \
        {                                       \
            tJPEGWidget *pW = (pWidget);        \
            pW->ulStyle |= JW_STYLE_LOCKED;     \
        }                                       \
        while(0)

//*****************************************************************************
//
//! Unlocks a JPEG widget making it pay attention to pointer input.
//!
//! \param pWidget is a pointer to the widget to modify.
//!
//! This function unlocks a JPEG widget.  When unlocked, a JPEG widget will
//! respond to pointer input by scrolling or making press callbacks depending
//! upon the style flags and the image it is currently displaying.
//!
//! \return None.
//
//*****************************************************************************
#define JPEGWidgetUnlock(pWidget)               \
        do                                      \
        {                                       \
            tJPEGWidget *pW = (pWidget);        \
            pW->ulStyle &= ~(JW_STYLE_LOCKED);  \
        }                                       \
        while(0)

//*****************************************************************************
//
// Prototypes for the JPEG widget APIs.
//
//*****************************************************************************
extern long JPEGWidgetMsgProc(tWidget *pWidget, unsigned long ulMsg,
                              unsigned long ulParam1, unsigned long ulParam2);
extern void JPEGWidgetInit(tJPEGWidget *pWidget,
                           const tDisplay *pDisplay, long lX, long lY,
                           long lWidth, long lHeight);
extern long JPEGWidgetImageSet(tWidget *pWidget, const unsigned char *pImg,
                               unsigned long ulImgLen);
extern long JPEGWidgetImageDecompress(tWidget *pWidget);
extern void JPEGWidgetImageDiscard(tWidget *pWidget);

//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
#endif // __JPGWIDGET_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -