2019-04-01 20:44:11 +01:00
|
|
|
#ifndef VIDEO_LAYOUT_SCOPE_H
|
|
|
|
#define VIDEO_LAYOUT_SCOPE_H
|
2019-05-13 01:57:26 +02:00
|
|
|
|
2019-04-01 20:44:11 +01:00
|
|
|
#include "view.h"
|
|
|
|
#include "element.h"
|
|
|
|
|
|
|
|
#define SCOPE_BUFFER_SIZE 256
|
|
|
|
|
|
|
|
typedef struct param param_t;
|
|
|
|
|
|
|
|
typedef struct scope
|
|
|
|
{
|
|
|
|
int level;
|
|
|
|
|
|
|
|
param_t *param;
|
|
|
|
|
|
|
|
element_t *elements;
|
|
|
|
int elements_count;
|
|
|
|
|
|
|
|
view_t *groups;
|
|
|
|
int groups_count;
|
|
|
|
|
|
|
|
char eval[SCOPE_BUFFER_SIZE];
|
2019-10-14 00:31:44 +02:00
|
|
|
} scope_t;
|
2019-04-01 20:44:11 +01:00
|
|
|
|
|
|
|
void scope_init (scope_t *scope);
|
|
|
|
void scope_deinit (scope_t *scope);
|
|
|
|
void scope_push (scope_t *scope);
|
|
|
|
void scope_pop (scope_t *scope);
|
|
|
|
void scope_repeat (scope_t *scope);
|
|
|
|
|
|
|
|
void scope_param (scope_t *scope, const char *name, const char *value);
|
|
|
|
void scope_generator (scope_t *scope, const char *name, const char *start, const char *increment, const char *lshift, const char *rshift);
|
|
|
|
const char *scope_eval (scope_t *scope, const char *src);
|
|
|
|
|
|
|
|
element_t *scope_add_element (scope_t *scope);
|
|
|
|
element_t *scope_find_element (scope_t *scope, const char *name);
|
|
|
|
|
|
|
|
view_t *scope_add_group (scope_t *scope);
|
|
|
|
view_t *scope_find_group (scope_t *scope, const char *name);
|
|
|
|
|
|
|
|
#endif
|