UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ui_internal.h File Reference

Internal data use by the UI package. More...

#include "node/ui_node_window.h"
#include "node/ui_node_model.h"
#include "ui_main.h"
#include "ui_actions.h"
#include "ui_behaviour.h"
#include "ui_nodes.h"
#include "ui_sprite.h"
#include "ui_input.h"
#include "ui_expression.h"
#include "ui_data.h"

Go to the source code of this file.

Data Structures

struct  uiGlobal_s
 Global data shared into all UI code. More...
 

Macros

#define UI_MAX_WINDOWS   128
 
#define UI_MAX_COMPONENTS   128
 
#define UI_MAX_WINDOWSTACK   32
 
#define UI_MAX_ACTIONS   2*8192
 
#define UI_MAX_VARIABLESTACK   64
 
#define STRUCT_MEMORY_ALIGN   8
 

Typedefs

typedef struct uiGlobal_s uiGlobal_t
 Global data shared into all UI code. More...
 

Functions

voidUI_AllocHunkMemory (size_t size, int align, bool reset)
 
void UI_FinishInit (void)
 Finish initialization after everything was loaded. More...
 
void UI_FinishWindowsInit (void)
 Finish windows initialization. More...
 

Variables

uiGlobal_t ui_global
 
memPool_tui_sysPool
 
memPool_tui_dynStringPool
 
memPool_tui_dynPool
 

Detailed Description

Internal data use by the UI package.

Note
It should not be include by a file outside the UI package

Definition in file ui_internal.h.

Macro Definition Documentation

#define STRUCT_MEMORY_ALIGN   8

Alignment memory for structures

Todo:
Remove it and use something from compiler

Definition at line 104 of file ui_internal.h.

Referenced by UI_AllocNodeWithoutNew(), UI_InitializeNodeBehaviour(), UI_ParseExcludeRect(), and UI_RegisterNodePropertyPosSize_().

#define UI_MAX_ACTIONS   2*8192

Definition at line 32 of file ui_internal.h.

Referenced by UI_AllocStaticAction().

#define UI_MAX_COMPONENTS   128

Definition at line 30 of file ui_internal.h.

Referenced by UI_InsertComponent().

#define UI_MAX_VARIABLESTACK   64

Definition at line 33 of file ui_internal.h.

Referenced by UI_ExecuteAction().

#define UI_MAX_WINDOWS   128

Definition at line 29 of file ui_internal.h.

Referenced by UI_CreateWindow(), UI_InsertWindow(), and UI_ParseWindow().

#define UI_MAX_WINDOWSTACK   32

Definition at line 31 of file ui_internal.h.

Referenced by UI_PushWindow().

Typedef Documentation

typedef struct uiGlobal_s uiGlobal_t

Global data shared into all UI code.

Function Documentation

void* UI_AllocHunkMemory ( size_t  size,
int  align,
bool  reset 
)

Allocate memory from hunk managed by the UI code This memory is allocated one time, and never released.

Parameters
sizeQuantity of memory expected
alignAlignement of the expected memory
resetIf true initilize the memory with 0
Returns
available memory, else nullptr

Definition at line 126 of file ui_main.cpp.

References uiGlobal_s::adata, uiGlobal_s::adataize, and uiGlobal_s::curadata.

Referenced by UI_AllocNodeWithoutNew(), UI_AllocStaticColor(), UI_AllocStaticFloat(), UI_AllocStaticString(), UI_InitializeNodeBehaviour(), UI_ParseExcludeRect(), and UI_RegisterNodePropertyPosSize_().

void UI_FinishInit ( void  )

Finish initialization after everything was loaded.

Note
private function

Definition at line 268 of file ui_main.cpp.

References UI_FinishWindowsInit().

Referenced by UI_InitStack().

void UI_FinishWindowsInit ( void  )

Finish windows initialization.

Note
private function

Definition at line 665 of file ui_windows.cpp.

References i, uiGlobal_s::numWindows, UI_ExecuteEventActions(), ui_global, WINDOWEXTRADATA, and uiGlobal_s::windows.

Referenced by UI_FinishInit().

Variable Documentation

memPool_t* ui_dynStringPool

Definition at line 40 of file ui_main.cpp.