Assembled 2
A column based text editor
Loading...
Searching...
No Matches
global.h
Go to the documentation of this file.
1
32#ifndef AS_GLOBAL_H
33#define AS_GLOBAL_H
34
35#define AS_VERSION_MAJ 2
36#define AS_VERSION_MIN 0
37
40
41#include <interface/interface.h>
42
43#include <includes.h>
44
46#define TARGET_FPS (double)(1.0/60.0)
47
49#define max(a, b) \
50 ({ __typeof__ (a) _a = (a); \
51 __typeof__ (b) _b = (b); \
52 _a > _b ? _a : _b; })
53
55#define min(a, b) \
56 ({ __typeof__ (a) _a = (a); \
57 __typeof__ (b) _b = (b); \
58 _a < _b ? _a : _b; })
59
67 // Editor Screen
70
71 // Interface
78
79 // Editor
84
85 // Columns
90
91 // Syntax
94};
95
99extern struct AS_GlobalCtx as_ctx;
100
101#endif
#define AS_MAX_COLUMNS
Maximum number of column descriptors in as_ctx.col_descs.
Definition editor.h:35
struct AS_GlobalCtx as_ctx
Definition main.c:66
#define AS_MAX_SCREEN_COUNT
Maximum number of screens.
Definition interface.h:35
Definition editor.h:73
Definition global.h:66
struct AS_TextFile * text_file
The current text file.
Definition global.h:83
struct AS_Screen * screen
A pointer to the currently active screen.
Definition global.h:77
struct AS_ColDesc col_descs[AS_MAX_COLUMNS]
An array of all available column descriptors / layouts.
Definition global.h:87
struct AS_SyntaxBackendMeta syn_backends[AS_MAX_BACKENDS]
All registered syntax backends.
Definition global.h:93
struct AS_TextFile * text_file_head
The start of the linked list containing all text files.
Definition global.h:81
int col_desc_i
The index of the currently selected column descriptor.
Definition global.h:89
char editor_scr_message[1024]
Current message to be displated at the bottom of the editor screen.
Definition global.h:69
struct AS_RenderCtx render_ctx
The current render context.
Definition global.h:73
struct AS_Screen screens[AS_MAX_SCREEN_COUNT]
A list of all registered screens.
Definition global.h:75
Definition interface.h:105
Definition interface.h:117
Definition syntax.h:60
Definition editor.h:45
#define AS_MAX_BACKENDS
Maximum number of syntax backends.
Definition syntax.h:36