1 namespace gfx::drivers;
3 #ifdef BUILDING_ECERE_COM
8 public import static "ecere"
14 import "PepperInterface"
16 #if !defined(ENABLE_PEPPER_DRIVER)
17 #define NO_PEPPER_DRIVER
20 #if (defined(__nacl__) || defined(__pnacl__)) // && !defined(NO_PEPPER_DRIVER)
24 // source file line number printf (sflnprintf)
25 #define sflnprintf(format,...) printf("%s:% 5d: " format, __FILE__, __LINE__, ##__VA_ARGS__)
27 class PepperDisplayDriver : DisplayDriver
29 class_property(name) = "Pepper";
32 // Constructor / Destructor
34 bool ::CreateDisplaySystem(DisplaySystem displaySystem)
36 sflnprintf("class(PepperDisplayDriver) ::CreateDisplaySystem [STUB!]\n");
40 void ::DestroyDisplaySystem(DisplaySystem displaySystem)
42 sflnprintf("class(PepperDisplayDriver) ::DestroyDisplaySystem [STUB!]\n");
45 bool ::CreateDisplay(Display display)
47 sflnprintf("class(PepperDisplayDriver) ::CreateDisplay [STUB!]\n");
51 void ::DestroyDisplay(Display display)
53 sflnprintf("class(PepperDisplayDriver) ::DestroyDisplay [STUB!]\n");
57 // Display Position and Size
59 bool ::DisplaySize(Display display, int width, int height)
61 sflnprintf("class(PepperDisplayDriver) ::DisplaySize [STUB!]\n");
65 void ::DisplayPosition(Display display, int x, int y)
67 sflnprintf("class(PepperDisplayDriver) ::DisplayPosition [STUB!]\n");
73 void ::SetPalette(Display display, ColorAlpha * palette, bool colorMatch)
75 sflnprintf("class(PepperDisplayDriver) ::SetPalette [STUB!]\n");
78 void ::RestorePalette(Display display)
80 sflnprintf("class(PepperDisplayDriver) ::RestorePalette [STUB!]\n");
84 // Display the back buffer content
86 void ::StartUpdate(Display display)
88 sflnprintf("class(PepperDisplayDriver) ::StartUpdate [STUB!]\n");
91 void ::EndUpdate(Display display)
93 sflnprintf("class(PepperDisplayDriver) ::EndUpdate [STUB!]\n");
96 void ::Scroll(Display display, Box scroll, int x, int y, Extent dirty)
98 sflnprintf("class(PepperDisplayDriver) ::Scroll [STUB!]\n");
101 void ::Update(Display display, Box updateBox)
103 sflnprintf("class(PepperDisplayDriver) ::Update [STUB!]\n");
107 // Allocate/free a bitmap
109 bool ::AllocateBitmap(DisplaySystem displaySystem, Bitmap bitmap, int width, int height, int stride, PixelFormat format, bool allocatePalette)
111 sflnprintf("class(PepperDisplayDriver) ::AllocateBitmap [STUB!]\n");
115 void ::FreeBitmap(DisplaySystem displaySystem, Bitmap bitmap)
117 sflnprintf("class(PepperDisplayDriver) ::FreeBitmap [STUB!]\n");
123 bool ::LockSystem(DisplaySystem displaySystem)
125 sflnprintf("class(PepperDisplayDriver) ::LockSystem [STUB!]\n");
129 void ::UnlockSystem(DisplaySystem displaySystem)
131 sflnprintf("class(PepperDisplayDriver) ::UnlockSystem [STUB!]\n");
134 bool ::Lock(Display display)
136 sflnprintf("class(PepperDisplayDriver) ::Lock [STUB!]\n");
140 void ::Unlock(Display display)
142 sflnprintf("class(PepperDisplayDriver) ::Unlock [STUB!]\n");
146 // Get/release a surface
148 bool ::GetSurface(Display display, Surface surface, int x, int y, Box clip)
150 sflnprintf("class(PepperDisplayDriver) ::GetSurface [STUB!]\n");
154 bool ::GetBitmapSurface(DisplaySystem displaySystem, Surface surface, Bitmap bitmap, int x, int y, Box clip)
156 sflnprintf("class(PepperDisplayDriver) ::GetBitmapSurface [STUB!]\n");
160 void ::ReleaseSurface(Display display, Surface surface)
162 sflnprintf("class(PepperDisplayDriver) ::ReleaseSurface [STUB!]\n");
168 void ::Clip(Display display, Surface surface, Box clip)
170 sflnprintf("class(PepperDisplayDriver) ::Clip [STUB!]\n");
174 // Grab from the screen
176 bool ::GrabScreen(Display display, Bitmap bitmap, int x, int y, unsigned int w, unsigned int h)
178 sflnprintf("class(PepperDisplayDriver) ::GrabScreen [STUB!]\n");
183 // Converts a bitmap format
185 bool ::ConvertBitmap(DisplaySystem displaySystem, Bitmap src, PixelFormat format, ColorAlpha * palette)
187 sflnprintf("class(PepperDisplayDriver) ::ConvertBitmap [STUB!]\n");
192 // Converts an LFB bitmap into an offscreen bitmap for this device
194 bool ::MakeDDBitmap(DisplaySystem displaySystem, Bitmap bitmap, bool mipMaps)
196 sflnprintf("class(PepperDisplayDriver) ::MakeDDBitmap [STUB!]\n");
203 Font ::LoadFont(DisplaySystem displaySystem, const char * faceName, float size, FontFlags flags)
205 sflnprintf("class(PepperDisplayDriver) ::LoadFont [STUB!]\n");
209 void ::UnloadFont(DisplaySystem displaySystem, Font font)
211 sflnprintf("class(PepperDisplayDriver) ::UnloadFont [STUB!]\n");
217 void ::SetForeground(Display display, Surface surface, ColorAlpha color)
219 sflnprintf("class(PepperDisplayDriver) ::SetForeground [STUB!]\n");
222 void ::SetBackground(Display display, Surface surface, ColorAlpha color)
224 sflnprintf("class(PepperDisplayDriver) ::SetBackground [STUB!]\n");
227 void ::LineStipple(Display display, Surface surface, uint stipple)
229 sflnprintf("class(PepperDisplayDriver) ::LineStipple [STUB!]\n");
232 ColorAlpha ::GetPixel(Display display, Surface surface, int x, int y)
234 sflnprintf("class(PepperDisplayDriver) ::GetPixel [STUB!]\n");
238 void ::PutPixel(Display display, Surface surface, int x, int y)
240 sflnprintf("class(PepperDisplayDriver) ::PutPixel [STUB!]\n");
243 void ::DrawLine(Display display, Surface surface, int x1, int y1, int x2, int y2)
245 sflnprintf("class(PepperDisplayDriver) ::DrawLine [STUB!]\n");
248 void ::Rectangle(Display display, Surface surface, int x1, int y1, int x2, int y2)
250 sflnprintf("class(PepperDisplayDriver) ::Rectangle [STUB!]\n");
253 void ::Area(Display display, Surface surface, int x1, int y1, int x2, int y2)
255 sflnprintf("class(PepperDisplayDriver) ::Area [STUB!]\n");
258 void ::Clear(Display display, Surface surface, ClearType type)
260 sflnprintf("class(PepperDisplayDriver) ::Clear [STUB!]\n");
263 void ::Blit(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h)
265 sflnprintf("class(PepperDisplayDriver) ::Blit [STUB!]\n");
268 void ::SetBlitTint(Display display, Surface surface, ColorAlpha tint)
270 sflnprintf("class(PepperDisplayDriver) ::SetBlitTint [STUB!]\n");
273 void ::Stretch(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
275 sflnprintf("class(PepperDisplayDriver) ::Stretch [STUB!]\n");
278 void ::Filter(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
280 sflnprintf("class(PepperDisplayDriver) ::Filter [STUB!]\n");
283 void ::BlitDI(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h)
285 sflnprintf("class(PepperDisplayDriver) ::BlitDI [STUB!]\n");
288 void ::StretchDI(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
290 sflnprintf("class(PepperDisplayDriver) ::StretchDI [STUB!]\n");
293 void ::FilterDI(Display display, Surface surface, Bitmap src, int dx, int dy, int sx, int sy, int w, int h, int sw, int sh)
295 sflnprintf("class(PepperDisplayDriver) ::FilterDI [STUB!]\n");
298 void ::TextFont(Display display, Surface surface, Font font)
300 sflnprintf("class(PepperDisplayDriver) ::TextFont [STUB!]\n");
303 void ::TextOpacity(Display display, Surface surface, bool opaque)
305 sflnprintf("class(PepperDisplayDriver) ::TextOpacity [STUB!]\n");
308 void ::WriteText(Display display, Surface surface, int x, int y, const char * text, int len)
310 sflnprintf("class(PepperDisplayDriver) ::WriteText [STUB!]\n");
313 void ::TextExtent(Display display, Surface surface, const char * text, int len, int * width, int * height)
315 sflnprintf("class(PepperDisplayDriver) ::TextExtent [STUB!]\n");
318 void ::FontExtent(DisplaySystem displaySystem, Font font, const char * text, int len, int * width, int * height)
320 sflnprintf("class(PepperDisplayDriver) ::FontExtent [STUB!]\n");
323 void ::DrawingChar(Display display, Surface surface, char character)
325 sflnprintf("class(PepperDisplayDriver) ::DrawingChar [STUB!]\n");
328 void ::NextPage(Display display)
330 sflnprintf("class(PepperDisplayDriver) ::NextPage [STUB!]\n");
335 #if !defined(ECERE_VANILLA) && !defined(ECERE_NO3D)
336 void ::SetRenderState(Display display, RenderState state, uint value)
338 sflnprintf("class(PepperDisplayDriver) ::SetRenderState [STUB!]\n");
341 void ::SetLight(Display display, int id, Light light)
343 sflnprintf("class(PepperDisplayDriver) ::SetLight [STUB!]\n");
346 void ::SetCamera(Display display, Surface surface, Camera camera)
348 sflnprintf("class(PepperDisplayDriver) ::SetCamera [STUB!]\n");
351 bool ::AllocateMesh(DisplaySystem displaySystem, Mesh mesh, MeshFeatures flags, int nVertices)
353 sflnprintf("class(PepperDisplayDriver) ::AllocateMesh [STUB!]\n");
357 void ::FreeMesh(DisplaySystem displaySystem, Mesh mesh)
359 sflnprintf("class(PepperDisplayDriver) ::FreeMesh [STUB!]\n");
362 bool ::LockMesh(DisplaySystem displaySystem, Mesh mesh, MeshFeatures flags)
364 sflnprintf("class(PepperDisplayDriver) ::LockMesh [STUB!]\n");
368 void ::UnlockMesh(DisplaySystem displaySystem, Mesh mesh, MeshFeatures flags)
370 sflnprintf("class(PepperDisplayDriver) ::UnlockMesh [STUB!]\n");
373 void * ::AllocateIndices(DisplaySystem displaySystem, int nIndices, bool indices32bit)
375 sflnprintf("class(PepperDisplayDriver) ::AllocateIndices [STUB!]\n");
379 void ::FreeIndices(DisplaySystem displaySystem, void * indices)
381 sflnprintf("class(PepperDisplayDriver) ::FreeIndices [STUB!]\n");
384 uint16 * ::LockIndices(DisplaySystem displaySystem, void * indices)
386 sflnprintf("class(PepperDisplayDriver) ::LockIndices [STUB!]\n");
390 void ::UnlockIndices(DisplaySystem displaySystem, void * indices, bool indices32bit, int nIndices)
392 sflnprintf("class(PepperDisplayDriver) ::UnlockIndices [STUB!]\n");
395 void ::SelectMesh(Display display, Mesh mesh)
397 sflnprintf("class(PepperDisplayDriver) ::SelectMesh [STUB!]\n");
400 void ::ApplyMaterial(Display display, Material material, Mesh mesh)
402 sflnprintf("class(PepperDisplayDriver) ::ApplyMaterial [STUB!]\n");
405 void ::DrawPrimitives(Display display, PrimitiveSingle * primitive, Mesh mesh)
407 sflnprintf("class(PepperDisplayDriver) ::DrawPrimitives [STUB!]\n");
410 void ::PushMatrix(Display display)
412 sflnprintf("class(PepperDisplayDriver) ::PushMatrix [STUB!]\n");
415 void ::PopMatrix(Display display, bool setMatrix)
417 sflnprintf("class(PepperDisplayDriver) ::PopMatrix [STUB!]\n");
420 void ::SetTransform(Display display, Matrix transMatrix, bool viewSpace, bool useCamera)
422 sflnprintf("class(PepperDisplayDriver) ::SetTransform [STUB!]\n");
428 #endif // !defined(NO_PEPPER_DRIVER)