removed the obsolete Lib_GetKeyState function
[neuro.git] / src / video / video.h
blob1dc232ab61f07431adbd43cbee7d6b161b3a4b44
1 /* video.h
2 * the main local module header
3 */
5 #ifndef __VIDEO_H
6 #define __VIDEO_H
8 #include <graphics.h>
9 #include <ebuf.h>
11 #define debug_instruction_buffer 0
12 #define debug_clean_instruction_buffer 0
13 #define verbose_missing_output 0
14 #define dynamic_debug 0
15 #define check_integrity_on_draw 0
17 #define debug_track_fonts 0
18 #define debug_track_special_font 1 /* child of the above, won't work if the above is 0 */
19 #define debug_track_special_font_x 6 /* ditto */
20 #define debug_track_special_font_y 6 /* above above ditto */
22 #define screen_buffer 1
23 #define second_screen_buffer 0
24 #define retain_image_inipos 0
26 #define use_memory_pool 0
29 enum drawings_type
31 TDRAW_BEGIN,
33 TDRAW_STATIC,
34 TDRAW_DYNAMIC,
35 TDRAW_DYNAMIC_CLEAN,
36 TDRAW_SDRAWN, /* static but already drawn */
37 TDRAW_SREDRAW, /* flag to make a static element redrawn */
38 TDRAW_VOLATILE, /* a draw that gets deleted after being drawn (override replacement) */
39 TDRAW_SDESTROY, /* the flag to destroy a static element */
41 TDRAW_END
44 typedef struct RAW_ENGINE RAW_ENGINE;
46 struct RAW_ENGINE
48 u32 layer; /* the drawing level that the surface is drawn */
49 u8 type; /* see the drawings_type enumeration */
50 Rectan src; /* size of the image */
51 u16 dx, dy; /* destination coordinates */
53 void *surface_ptr; /* points to the image held by the external application */
56 /* typedef struct INSTRUCTION_ENGINE INSTRUCTION_ENGINE; */
58 /*
59 * this structure is the core of the linked list
60 * drawing priority algorithm. The layer for each
61 * added entries is the only dependency to change
62 * the drawing position of an entry.
64 struct INSTRUCTION_ENGINE
66 RAW_ENGINE *current;
67 INSTRUCTION_ENGINE *next;
70 typedef struct DRAWING_ELEMENTS
72 void (*callback)(void);
73 }DRAWING_ELEMENTS;
75 typedef struct debug_status
77 u32 missing;
78 u32 duplicates;
79 }debug_status;
81 /* inside graphics.c */
82 extern u8 Graphics_DrawIsPresent(v_elem *elem);
84 extern u8 Graphics_GetSafeDrawOp();
86 extern void Graphics_SetSafeDrawOp(u8 safe);
88 extern void Graphics_ResetScreenDraw();
90 extern void Graphics_SetDrawnLastCycle();
93 /* inside painter.c */
94 extern int Graphics_PainterInit();
95 extern int Graphics_PainterReset();
96 extern void Graphics_PainterClean();
98 extern EBUF *Graphics_GetRawBuffer();
99 extern EBUF *Graphics_GetQueueBuffer();
101 extern void Graphics_CoreDrawAll();
102 extern void graphics_CoreCleanAll();
104 extern INSTRUCTION_ENGINE *Graphics_GetFirstElem();
105 extern void Graphics_SetFirstElem(INSTRUCTION_ENGINE *elem);
107 extern INSTRUCTION_ENGINE *Graphics_GetLastElem();
108 extern void Graphics_SetLastElem(INSTRUCTION_ENGINE *elem);
110 extern INSTRUCTION_ENGINE *Graphics_AddDrawingInstruction(u32 layer, u8 type, Rectan *isrc, Rectan *idst, void *isurface);
112 extern INSTRUCTION_ENGINE *Graphics_PushRaw(RAW_ENGINE *raw);
115 /* inside coredraw.c */
116 extern int Graphics_RedrawSection(INSTRUCTION_ENGINE *indep);
118 extern void Graphics_CoreDrawAll(); /* new for draw_objects */
120 extern int Graphics_RedrawSection(); /* new for redraw_erased_for_object */
122 extern void Graphics_CoreCleanAll();
124 extern void Graphics_CoreCleanDoneDynamics(); /* new for clean_drawn_objects */
126 extern void Graphics_SetAllToRedraw();
128 extern void Graphics_DestroyElement(INSTRUCTION_ENGINE *elem);
130 extern void Graphics_FreeVObject(v_object *source);
133 /* inside debug.c */
134 extern void Graphics_DebugPrintQueue(); /* new for print_queue */
136 extern void Graphics_DebugBufferQueue(EBUF *src); /* new for buffer_queue */
138 extern void Graphics_DebugPrintMissing(EBUF *src); /* new for print_missing */
140 extern void Graphics_DebugQueueIntegrityCheck(); /* new for Queue_Integrity_Check */
145 #include "spool.h"
146 #include "pixels.h"
149 #endif /* NOT __VIDEO_H */