本文整理汇总了C++中GUI_LOCK函数的典型用法代码示例。如果您正苦于以下问题:C++ GUI_LOCK函数的具体用法?C++ GUI_LOCK怎么用?C++ GUI_LOCK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUI_LOCK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GUI_SelectLayer
/*********************************************************************
*
* GUI_SelectLayer
*/
unsigned int GUI_SelectLayer(unsigned int Index) {
unsigned int OldIndex;
GUI_LOCK();
OldIndex = GUI_Context.SelLayer;
if (Index < GUI_NUM_LAYERS) {
GUI_Context.SelLayer = Index;
GUI_SelectLCD();
}
GUI_UNLOCK();
return OldIndex;
}
示例2: CHECKBOX_SetImage
/*********************************************************************
*
* Exported code
*
**********************************************************************
*/
void CHECKBOX_SetImage(CHECKBOX_Handle hObj, const GUI_BITMAP * pBitmap, unsigned int Index) {
if (hObj) {
CHECKBOX_Obj * pObj;
GUI_LOCK();
pObj = CHECKBOX_H2P(hObj);
if (Index <= GUI_COUNTOF(pObj->Props.apBm)) {
pObj->Props.apBm[Index] = pBitmap;
}
GUI_UNLOCK();
}
}
示例3: GUI_ALLOC_AllocZero
/*********************************************************************
*
* GUI_ALLOC_AllocZero
*/
GUI_HMEM GUI_ALLOC_AllocZero(GUI_ALLOC_DATATYPE Size) {
GUI_HMEM hMem;
GUI_LOCK();
GUI_DEBUG_LOG2("\nGUI_ALLOC_Alloc... requesting %d, %d avail", Size, GUI_ALLOC_GetMaxSize());
hMem = GUI_ALLOC_AllocNoInit(Size);
if (hMem) {
GUI_MEMSET((U8*)GUI_ALLOC_h2p(hMem), 0, Size); /* Zeroinit ! */
}
GUI_UNLOCK();
return hMem;
}
示例4: GUI_DispCharAt
void GUI_DispCharAt(U16 c, I16P x, I16P y) {
GUI_LOCK();
GUI_Context.DispPosX =x;
GUI_Context.DispPosY =y;
#if (GUI_WINSUPPORT)
CL_DispChar(c);
#else
GL_DispChar(c);
#endif
GUI_UNLOCK();
}
示例5: GUI_GetUsedMem
int GUI_GetUsedMem(void) {
int NumUsedBytes=0;
int i;
GUI_LOCK();
CheckInit();
for (i=1; i; i = aBlock[i].Next) {
NumUsedBytes += aBlock[i].Size;
}
GUI_UNLOCK();
return NumUsedBytes;
}
示例6: GUI_DrawPie
/*********************************************************************
*
* GUI_DrawPie
*/
void GUI_DrawPie(int x0, int y0, int r, int a0, int a1, int Type) {
GUI_LOCK();
#if GUI_WINSUPPORT
WM_ADDORG(x0,y0);
WM_ITERATE_START(NULL) {
#endif
_DrawPie( x0, y0, r, a0, a1, Type);
#if GUI_WINSUPPORT
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}
示例7: GUI_DrawPoint
/*********************************************************************
*
* GUI_DrawPoint
*/
void GUI_DrawPoint(int x, int y) {
GUI_LOCK();
#if (GUI_WINSUPPORT)
WM_ADDORG(x, y);
WM_ITERATE_START(NULL); {
#endif
GL_DrawPoint(x, y);
#if (GUI_WINSUPPORT)
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}
示例8: GUI_ALLOC_AllocNoInit
/*********************************************************************
*
* GUI_ALLOC_AllocNoInit
*/
GUI_HMEM GUI_ALLOC_AllocNoInit(GUI_ALLOC_DATATYPE Size) {
GUI_HMEM hMem;
if (Size == 0) {
return (GUI_HMEM)0;
}
GUI_LOCK();
GUI_DEBUG_LOG2("\nGUI_ALLOC_AllocNoInit... requesting %d, %d avail", Size, GUI_ALLOC.NumFreeBytes);
hMem = _Alloc(Size);
GUI_DEBUG_LOG1("\nGUI_ALLOC_AllocNoInit : Handle", hMem);
GUI_UNLOCK();
return hMem;
}
示例9: GUI_DispStringLen
/*********************************************************************
*
* GUI_DispStringLen
*/
void GUI_DispStringLen(const char GUI_UNI_PTR *s, int MaxNumChars) {
U16 Char;
GUI_LOCK();
while (MaxNumChars && ((Char = GUI_UC__GetCharCodeInc(&s)) != 0)) {
GUI_DispChar(Char);
MaxNumChars--;
}
while (MaxNumChars--) {
GUI_DispChar(' ');
}
GUI_UNLOCK();
}
示例10: GUI_LOCK
void GUI_DrawPolyLine (const GUI_POINT* pPoints, int NumPoints, int x0, int y0) {
GUI_LOCK();
#if (GUI_WINSUPPORT)
WM_ADDORG(x0,y0);
WM_ITERATE_START(NULL); {
#endif
_DrawPolyLine (pPoints, NumPoints, x0, y0);
#if (GUI_WINSUPPORT)
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}
示例11: GUI_DispStringInRectMax
void GUI_DispStringInRectMax(const char GUI_UNI_PTR *s, GUI_RECT* pRect, int TextAlign, int MaxLen) {
GUI_RECT Rect_Old, r;
if (s && pRect) {
GUI_LOCK();
Rect_Old = GUI_Context.ClipRect[GUI_Context.SelLayer];
GUI__IntersectRects(&r, pRect, &Rect_Old);
LCD_SetClipRectEx(&r);
GUI__DispStringInRect(s, pRect, TextAlign, MaxLen);
LCD_SetClipRectEx(&Rect_Old);
GUI_UNLOCK();
}
}
示例12: GUI_DrawGraph
/*********************************************************************
*
* GUI_DrawGraph
*/
void GUI_DrawGraph(I16 *pay, int NumPoints, int x0, int y0) {
GUI_LOCK();
#if (GUI_WINSUPPORT)
WM_ADDORG(x0,y0);
WM_ITERATE_START(NULL); {
#endif
_DrawGraph(pay, NumPoints, x0, y0);
#if (GUI_WINSUPPORT)
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}
示例13: FRAMEWIN_SetFont
/*********************************************************************
*
* FRAMEWIN_SetFont
*/
void FRAMEWIN_SetFont(FRAMEWIN_Handle hObj, const GUI_FONT GUI_UNI_PTR * pFont) {
GUI_LOCK();
if (hObj) {
FRAMEWIN_Obj* pObj = FRAMEWIN_H2P(hObj);
int OldHeight = FRAMEWIN__CalcTitleHeight(pObj);
pObj->Props.pFont = pFont;
FRAMEWIN__UpdatePositions(pObj);
FRAMEWIN__UpdateButtons(pObj, OldHeight);
FRAMEWIN_Invalidate(hObj);
}
GUI_UNLOCK();
}
示例14: GUI_SelLCD
unsigned int GUI_SelLCD(unsigned int Index) {
unsigned int OldIndex = 0;
if (Index < LCD_NUM_DISPLAYS) {
GUI_LOCK();
GUI_SetDefault();
OldIndex = (GUI_Context.pDeviceAPI == aAPI[0]) ? 0 : 1;
GUI_Context.pDeviceAPI = aAPI[Index];
LCD_SetClipRectMax();
}
GUI_UNLOCK();
return OldIndex;
}
示例15: GUI_DrawArc
void GUI_DrawArc (int x0, int y0, int rx, int ry, int a0, int a1) {
GUI_LOCK();
#if (GUI_WINSUPPORT)
WM_ADDORG(x0,y0);
WM_ITERATE_START(NULL) {
#endif
GL_DrawArc( x0, y0, rx, ry, a0, a1);
#if (GUI_WINSUPPORT)
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}