SDL Visual Test

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SDL_visualtest_action_configparser.h
Go to the documentation of this file.
1 /* See COPYING.txt for the full license governing this code. */
8 #ifndef _SDL_visualtest_action_configparser_h
9 #define _SDL_visualtest_action_configparser_h
10
12 #define MAX_ACTION_LINE_LENGTH 300
13
14 /* Set up for C function definitions, even when using C++ */
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
22 typedef enum
23 {
25 SDL_ACTION_LAUNCH = 0,
27 SDL_ACTION_KILL,
29 SDL_ACTION_QUIT,
31 SDL_ACTION_SCREENSHOT,
33 SDL_ACTION_VERIFY
34 } SDLVisualTest_ActionType;
35
40 typedef struct SDLVisualTest_Action
41 {
43 SDLVisualTest_ActionType type;
46 int time;
48 union
49 {
51 struct
52 {
53 char* path;
54 char* args;
55 } process;
56 } extra;
57 } SDLVisualTest_Action;
58
62 typedef struct SDLVisualTest_ActionNode
63 {
65 SDLVisualTest_Action action;
67 struct SDLVisualTest_ActionNode* next;
68 } SDLVisualTest_ActionNode;
69
73 typedef struct SDLVisualTest_ActionQueue
74 {
76 SDLVisualTest_ActionNode* front;
78 SDLVisualTest_ActionNode* rear;
80 int size;
81 } SDLVisualTest_ActionQueue;
82
89 int SDLVisualTest_EnqueueAction(SDLVisualTest_ActionQueue* queue,
90 SDLVisualTest_Action action);
91
97 int SDLVisualTest_DequeueAction(SDLVisualTest_ActionQueue* queue);
98
102 void SDLVisualTest_InitActionQueue(SDLVisualTest_ActionQueue* queue);
103
110 SDLVisualTest_Action* SDLVisualTest_GetQueueFront(SDLVisualTest_ActionQueue* queue);
111
117 int SDLVisualTest_IsActionQueueEmpty(SDLVisualTest_ActionQueue* queue);
118
122 void SDLVisualTest_EmptyActionQueue(SDLVisualTest_ActionQueue* queue);
123
131 int SDLVisualTest_InsertIntoActionQueue(SDLVisualTest_ActionQueue* queue,
132 SDLVisualTest_Action action);
133
140 int SDLVisualTest_ParseActionConfig(char* file, SDLVisualTest_ActionQueue* queue);
141
142 /* Ends C function definitions when using C++ */
143 #ifdef __cplusplus
144 }
145 #endif
146
147 #endif /* _SDL_visualtest_action_configparser_h */