# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 289
- 290
- 291
- 292
- 293
…
- 373
- 374

1.6.2.1.14.5 GFX_GOL_WindowCreate Function
This function creates a GFX_GOL_WINDOW object with the parameters given. It automatically attaches the new object into
a global linked list of objects and returns the address of the object.
File
gfx_gol_window.h
Syntax
GFX_GOL_WINDOW * GFX_GOL_WindowCreate(uint16_t ID, uint16_t left, uint16_t top, uint16_t
right, uint16_t bottom, uint16_t state, GFX_RESOURCE_HDR * pImage, GFX_XCHAR * pText,
GFX_ALIGNMENT alignment, GFX_GOL_OBJ_SCHEME * pScheme);
Returns
Pointer to the newly created object.
Description
This function creates a GFX_GOL_WINDOW object with the parameters given. It automatically attaches the new object into
a global linked list of objects and returns the address of the object.
This function returns the pointer to the newly created object. If the object is not successfully created, it returns NULL.
Preconditions
None.
Example
GFX_GOL_OBJ_SCHEME *pScheme;
GFX_GOL_WINDOW *pWindow;
GFX_GOL_WINDOW_STATE state;
// assume pScheme is initialized to a scheme in memory.
state = GFX_GOL_WINDOW_DRAW_STATE;
pWindow = GFX_GOL_WindowCreate(1, // ID
0,0,GFX_Primitive_MaxXGet(),GFX_Primitive_MaxYGet(), // whole screen dimension
state, // set state to draw all
(char*)myIcon, // icon
"Place Title Here.", // text
NULL); // use default GOL scheme
if (pWindow == NULL)
return 0;
return 1;
Parameters
Parameters Description
ID Unique user defined ID for the object instance.
left Left most position of the object.
top Top most position of the object.
right Right most position of the object.
bottom Bottom most position of the object.
state Sets the initial state of the object.
pImage Pointer to the image used on the face of the object.
pText Pointer to the text of the object.
alignment text alignment of the text used in the object.
pScheme Pointer to the style scheme used.
Function
GFX_GOL_WINDOW *GFX_GOL_WindowCreate(
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
291

- 1
- 2
…
- 289
- 290
- 291
- 292
- 293
…
- 373
- 374