1 namespace gui::drivers;
3 #ifdef BUILDING_ECERE_COM
8 public import static "ecere"
14 /*#if !defined(ENABLE_PEPPER_DRIVER)
15 #define NO_PEPPER_DRIVER
18 #if (defined(__nacl__) || defined(__pnacl__)) // && !defined(NO_PEPPER_DRIVER)
22 //#include "ppapi_simple/ps_main.h"
24 #include "ppapi/c/pp_instance.h"
25 #include "ppapi/c/pp_module.h"
26 #include "ppapi/c/pp_var.h"
29 // source file line number printf (sflnprintf)
30 #define sflnprintf(format,...) printf("%s:% 5d: " format, __FILE__, __LINE__, ##__VA_ARGS__)
34 #include "ppapi/c/pp_errors.h"
35 #include "ppapi/c/pp_module.h"
36 #include "ppapi/c/ppb.h"
37 #include "ppapi/c/ppp.h"
39 class PepperInterface : Interface
41 class_property(name) = "Pepper";
44 // --- User Interface System ---
48 sflnprintf("class(PepperInterface) ::Initialize [STUB!]\n");
54 sflnprintf("class(PepperInterface) ::Terminate [STUB!]\n");
57 bool ::ProcessInput(bool processAll)
59 sflnprintf("class(PepperInterface) ::ProcessInput [STUB!]\n");
65 sflnprintf("class(PepperInterface) ::Wait [STUB!]\n");
68 void ::Lock(Window window)
70 sflnprintf("class(PepperInterface) ::Lock [STUB!]\n");
73 void ::Unlock(Window window)
75 sflnprintf("class(PepperInterface) ::Unlock [STUB!]\n");
78 void ::SetTimerResolution(uint hertz)
80 sflnprintf("class(PepperInterface) ::SetTimerResolution [STUB!] Implement high resolution timer here\n");
83 const char ** ::GraphicsDrivers(int * numDrivers)
85 sflnprintf("class(PepperInterface) ::GraphicsDrivers [STUB!]\n");
89 void ::EnsureFullScreen(bool * fullScreen)
91 sflnprintf("class(PepperInterface) ::EnsureFullScreen [STUB!]\n");
94 void ::GetCurrentMode(bool * fullScreen, Resolution * resolution, PixelFormat * colorDepth, int * refreshRate)
96 sflnprintf("class(PepperInterface) ::GetCurrentMode [STUB!]\n");
99 bool ::ScreenMode(bool fullScreen, Resolution resolution, PixelFormat colorDepth, int refreshRate, bool * textMode)
101 sflnprintf("class(PepperInterface) ::ScreenMode [STUB!]\n");
106 // --- Window Creation ---
108 void * ::CreateRootWindow(Window window)
110 sflnprintf("class(PepperInterface) ::CreateRootWindow [STUB!]\n");
114 void ::DestroyRootWindow(Window window)
116 sflnprintf("class(PepperInterface) ::DestroyRootWindow [STUB!]\n");
120 // --- Window manipulation ---
122 void ::SetRootWindowCaption(Window window, const char * name)
124 sflnprintf("class(PepperInterface) ::SetRootWindowCaption [STUB!]\n");
127 void ::PositionRootWindow(Window window, int x, int y, int w, int h, bool move, bool resize)
129 sflnprintf("class(PepperInterface) ::PositionRootWindow [STUB!]\n");
132 void ::OffsetWindow(Window window, int * x, int * y)
134 sflnprintf("class(PepperInterface) ::OffsetWindow [STUB!]\n");
137 void ::UpdateRootWindow(Window window)
139 sflnprintf("class(PepperInterface) ::UpdateRootWindow [STUB!]\n");
142 void ::SetRootWindowState(Window window, WindowState state, bool visible)
144 sflnprintf("class(PepperInterface) ::SetRootWindowState [STUB!]\n");
147 void ::ActivateRootWindow(Window window)
149 sflnprintf("class(PepperInterface) ::ActivateRootWindow [STUB!]\n");
152 void ::OrderRootWindow(Window window, bool topMost)
154 sflnprintf("class(PepperInterface) ::OrderRootWindow [STUB!]\n");
157 void ::SetRootWindowColor(Window window)
159 sflnprintf("class(PepperInterface) ::SetRootWindowColor [STUB!]\n");
162 void ::FlashRootWindow(Window window)
164 sflnprintf("class(PepperInterface) ::FlashRootWindow [STUB!]\n");
168 // --- Mouse-based window movement ---
170 void ::StartMoving(Window window, int x, int y, bool fromKeyBoard)
172 sflnprintf("class(PepperInterface) ::StartMoving [STUB!]\n");
175 void ::StopMoving(Window window)
177 sflnprintf("class(PepperInterface) ::StopMoving [STUB!]\n");
181 // --- Mouse manipulation ---
183 void ::GetMousePosition(int *x, int *y)
185 sflnprintf("class(PepperInterface) ::GetMousePosition [STUB!]\n");
188 void ::SetMousePosition(int x, int y)
190 sflnprintf("class(PepperInterface) ::SetMousePosition [STUB!]\n");
193 void ::SetMouseRange(Window window, Box box)
195 sflnprintf("class(PepperInterface) ::SetMouseRange [STUB!]\n");
198 void ::SetMouseCapture(Window window)
200 sflnprintf("class(PepperInterface) ::SetMouseCapture [STUB!]\n");
204 // --- Mouse cursor ---
206 void ::SetMouseCursor(Window window, SystemCursor cursor)
208 sflnprintf("class(PepperInterface) ::SetMouseCursor [STUB!]\n");
212 // --- Caret manipulation ---
214 void ::SetCaret(int caretX, int caretY, int size)
216 sflnprintf("class(PepperInterface) ::SetCaret [STUB!]\n");
220 // --- Clipboard manipulation ---
222 void ::ClearClipboard()
224 sflnprintf("class(PepperInterface) ::ClearClipboard [STUB!]\n");
227 bool ::AllocateClipboard(ClipBoard clipBoard, uint size)
229 sflnprintf("class(PepperInterface) ::AllocateClipboard [STUB!]\n");
233 bool ::SaveClipboard(ClipBoard clipBoard)
235 sflnprintf("class(PepperInterface) ::SaveClipboard [STUB!]\n");
239 bool ::LoadClipboard(ClipBoard clipBoard)
241 sflnprintf("class(PepperInterface) ::LoadClipboard [STUB!]\n");
245 void ::UnloadClipboard(ClipBoard clipBoard)
247 sflnprintf("class(PepperInterface) ::UnloadClipboard [STUB!]\n");
251 // --- State based input ---
253 bool ::AcquireInput(Window window, bool state)
255 sflnprintf("class(PepperInterface) ::AcquireInput [STUB!]\n");
259 bool ::GetMouseState(MouseButtons * buttons, int * x, int * y)
261 sflnprintf("class(PepperInterface) ::GetMouseState [STUB!]\n");
265 bool ::GetJoystickState(int device, Joystick joystick)
267 sflnprintf("class(PepperInterface) ::GetJoystickState [STUB!]\n");
271 bool ::GetKeyState(Key key)
273 sflnprintf("class(PepperInterface) ::GetKeyState [STUB!]\n");
277 bool ::SetIcon(Window window, BitmapResource icon)
279 sflnprintf("class(PepperInterface) ::SetIcon [STUB!]\n");
283 void ::GetScreenArea(Window window, Box box)
285 sflnprintf("class(PepperInterface) ::GetScreenArea [STUB!]\n");
289 #endif // !defined(NO_PEPPER_DRIVER)