libs/neuronet: Implemented the new function NNet_GetMaster.
[neuro.git] / src / video / video.h
blob174d7858c57588a8bdc2696fe05d2525978fec33
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();
92 extern void Graphics_RedrawScreen();
94 /* inside painter.c */
95 extern int Graphics_PainterInit();
96 extern int Graphics_PainterReset();
97 extern void Graphics_PainterClean();
99 extern EBUF *Graphics_GetRawBuffer();
100 extern EBUF *Graphics_GetQueueBuffer();
102 extern void Graphics_CoreDrawAll();
103 extern void graphics_CoreCleanAll();
105 extern INSTRUCTION_ENGINE *Graphics_GetFirstElem();
106 extern void Graphics_SetFirstElem(INSTRUCTION_ENGINE *elem);
108 extern INSTRUCTION_ENGINE *Graphics_GetLastElem();
109 extern void Graphics_SetLastElem(INSTRUCTION_ENGINE *elem);
111 extern INSTRUCTION_ENGINE *Graphics_AddDrawingInstruction(u32 layer, u8 type, Rectan *isrc, Rectan *idst, void *isurface);
113 extern INSTRUCTION_ENGINE *Graphics_PushRaw(RAW_ENGINE *raw);
116 /* inside coredraw.c */
117 extern int Graphics_RedrawSection(INSTRUCTION_ENGINE *indep);
119 extern void Graphics_CoreDrawAll(); /* new for draw_objects */
121 extern void Graphics_CoreCleanAll();
123 extern void Graphics_CoreCleanDoneDynamics(); /* new for clean_drawn_objects */
125 extern void Graphics_SetAllToRedraw();
127 extern void Graphics_DestroyElement(INSTRUCTION_ENGINE *elem);
129 extern void Graphics_FreeVObject(v_object *source);
132 /* inside debug.c */
133 extern void Graphics_DebugPrintQueue(); /* new for print_queue */
135 extern void Graphics_DebugBufferQueue(EBUF *src); /* new for buffer_queue */
137 extern void Graphics_DebugPrintMissing(EBUF *src); /* new for print_missing */
139 extern void Graphics_DebugQueueIntegrityCheck(); /* new for Queue_Integrity_Check */
142 /* inside pixels.c *obsolete* don't use just yet */
143 extern void Graphics_PutPixel(v_object *vobj, u32 x, u32 y, u32 pixel);
145 extern u32 Graphics_GetPixel(v_object *vobj, u32 x, u32 y);
147 extern void Graphics_CleanPixels();
149 extern int Pixels_Init();
151 extern void Pixels_Clean();
153 extern void Pixels_Poll();
157 #include "spool.h"
158 #include "pixels.h"
161 #endif /* NOT __VIDEO_H */