Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Example
#define BTN_HIDE 0x8000
GFX_GOL_BUTTON *pB;
// pB is created and initialized
// do something here to set state
// Hide the button (remove from screen)
if (GFX_GOL_ObjectStateGet(pB, GFX_GOL_BUTTON_HIDE_STATE))
{
GFX_ColorSet(pB->pGolScheme->CommonBkColor);
GFX_BarDraw(pB->left, pB->top,pB->right,pB->bottom);
}
Parameters
Parameters Description
pObject Pointer to the object.
stateBits Defines which state bits are to be retrieved. Please refer to
specific objects for object state bits definition for details
Function
uint16_t GFX_GOL_ObjectStateGet(
GFX_GOL_OBJ_HEADER *pObject,
uint16_t stateBits);
1.6.2.2.3 GFX_GOL_ObjectStateSet Macro
This function sets the state bits of the given object.
File
gfx_gol.h
Syntax
#define GFX_GOL_ObjectStateSet(pObject, stateBits) \
((((GFX_GOL_OBJ_HEADER*)pObject)->state) |= stateBits)
Returns
GFX_STATUS_SUCCESS - is returned if the set was successful. GFX_STATUS_FAILURE - is returned if the set was not
successful.
Description
This function sets the state bits of the given object. Object must be redrawn to display the changes. It is possible to set
several state bits with this function.
Preconditions
None.
Example
void SetMessage(uint16_t msg, GFX_GOL_BUTTON* pB)
{
switch(msg)
{
case GFX_GOL_BUTTON_ACTION_PRESSED:
// set pressed and redraw
GFX_GOL_ObjectStateSet(pB, BTN_PRESSED|BTN_DRAW);
break;
case GFX_GOL_BUTTON_ACTION_RELEASED:
// reset pressed
GFX_GOL_ObjectStateClear(pB, BTN_PRESSED);
// redraw
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
296
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf