|
XenevaOS
|
#include <stdint.h>#include <_xeneva.h>#include <string.h>#include <stdlib.h>#include <sys/_keproc.h>#include <sys/_kefile.h>#include <chitralekha.h>#include <sys/_keipcpostbox.h>#include <sys/mman.h>#include <font.h>#include <sys/iocodes.h>#include <draw.h>#include "surface.h"#include "deodxr.h"#include "dirty.h"#include "cursor.h"#include "backdirty.h"#include "window.h"#include "clip.h"#include "_fastcpy.h"#include "animation.h"#include "alpha.h"#include "nanojpg.h"#include <arm_neon.h>#include "compose.h"
Functions | |
| uint32_t | DeodhaiAllocateNewHandle () |
| DeodhaiAllocateNewHandle – get a new window handle. | |
| void | DeodhaiInitialiseData () |
| DeodhaiInitialiseData – initialise all data. | |
| void | DeodhaiAddWindow (Window *win) |
| DeodhaiAddWindow – add a window to window list. | |
| void | DeodhaiRemoveWindow (Window *win) |
| void | DeodhaiAddWindowAlwaysOnTop (Window *win) |
| DeodhaiAddWindow – add a window to window list. | |
| void | DeodhaiRemoveWindowAlwaysOnTop (Window *win) |
| Window * | DeodhaiCreateWindow (int x, int y, int w, int h, uint16_t flags, uint16_t ownerId, char *title) |
| DeodhaiCreateWindow – create a new deodhai window. | |
| void | CursorStoreBack (ChCanvas *canv, Cursor *cur, unsigned x, unsigned y) |
| void | CursorDrawBack (ChCanvas *canv, Cursor *cur, unsigned x, unsigned y) |
| void | DrawWallpaper (ChCanvas *canv, char *filename) |
| DrawWallpaper for getting jpeg image as wallpaper fully jpeg encoder is needed, i use synfig studio for jpeg encoder. | |
| void | XRComposeFrame (ChCanvas *canvas) |
| void | DeodhaiWindowMakeTop (Window *win) |
| DeodhaiWindowMakeTop – brings a window to front. | |
| void | DeodhaiWindowSetFocused (Window *win, bool notify) |
| DeodhaiWindowSetFocused – cast focus to a new window. | |
| void | DeodhaiWindowMove (Window *win, int x, int y) |
| DeodhaiWindowMove – move an window to a new location. | |
| bool | DeodhaiCheckWindowPointOcclusion (Window *win, int x, int y) |
| DeodhaiCheckWindowPointOcclusion – checks if given x and y of point of a window is occluded by another window , from given window to front window of the list. | |
| void | DeodhaiWindowCheckDraggable (int x, int y, int button) |
| DeodhaiWindowCheckDraggable – check for draggable windows. | |
| void | DeodhaiSendMouseEvent (int handle, int ownerId, uint8_t handleType, uint8_t eventType, int x, int y, int button) |
| DeodhaiSendMouseEvent – send mouse event to desired window. | |
| void | DeodhaiBroadcastMouse (int mouse_x, int mouse_y, int button) |
| void | DeodhaiWindowHide (Window *win) |
| DeodhaiWindowHide – hides a window. | |
| void | DeodhaiBroadcastKey (int code) |
| void | DeodhaiBroadcastMessage (PostEvent *e, Window *skippablewin) |
| DeodhaiBrodcastMessage – broadcast a message to every window. | |
| int | main (int argc, char *argv[]) |
| main – main entry | |
| void | DeodhaiUpdateBits (bool window_update, bool skip_disable) |
| int | _get_gpu_display_id () |
| bool | _is_gpu_enabled () |
| int | _get_gpu_fd () |
| Window * | _get_always_on_top () |
Variables | |
| ChFont * | f2 |
| DeodhaiXR – The Graphics compositing pipeline Supports three types of input – (1) Mouse (2) Keyboard (3) Special XR input two types of rendering : 2D Compositing for non-xr system(GPU/Software), 3D compositing for XR system (GPU) | |
| ChRect | rectb |
| int | x_ |
| int | y_ |
| Window * _get_always_on_top | ( | ) |
| int _get_gpu_display_id | ( | ) |
| int _get_gpu_fd | ( | ) |
| bool _is_gpu_enabled | ( | ) |
| void DeodhaiAddWindow | ( | Window * | win | ) |
DeodhaiAddWindow – add a window to window list.
| win | – Pointer to window |
| void DeodhaiAddWindowAlwaysOnTop | ( | Window * | win | ) |
DeodhaiAddWindow – add a window to window list.
| win | – Pointer to window |
| uint32_t DeodhaiAllocateNewHandle | ( | ) |
DeodhaiAllocateNewHandle – get a new window handle.
| void DeodhaiBroadcastKey | ( | int | code | ) |
DeodhaiBrodcastMessage – broadcast a message to every window.
| e | – PostEvent to broadcast |
| void DeodhaiBroadcastMouse | ( | int | mouse_x, |
| int | mouse_y, | ||
| int | button | ||
| ) |
DeodhaiCheckWindowPointOcclusion – checks if given x and y of point of a window is occluded by another window , from given window to front window of the list.
| win | – Pointer to window to use for point check |
| x | – x coord of the point |
| y | – y coord of the point |
| Window * DeodhaiCreateWindow | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h, | ||
| uint16_t | flags, | ||
| uint16_t | ownerId, | ||
| char * | title | ||
| ) |
DeodhaiCreateWindow – create a new deodhai window.
| void DeodhaiInitialiseData | ( | ) |
DeodhaiInitialiseData – initialise all data.
| void DeodhaiRemoveWindow | ( | Window * | win | ) |
| void DeodhaiRemoveWindowAlwaysOnTop | ( | Window * | win | ) |
| void DeodhaiSendMouseEvent | ( | int | handle, |
| int | ownerId, | ||
| uint8_t | handleType, | ||
| uint8_t | eventType, | ||
| int | x, | ||
| int | y, | ||
| int | button | ||
| ) |
DeodhaiSendMouseEvent – send mouse event to desired window.
| win | – Pointer to window |
| eventType | – either MOUSE_EVENT or MOUSE_LEAVE |
| x | – Mouse x location |
| y | – Mouse y location |
| button | – Mouse button state |
| void DeodhaiWindowCheckDraggable | ( | int | x, |
| int | y, | ||
| int | button | ||
| ) |
DeodhaiWindowCheckDraggable – check for draggable windows.
| x | – mouse x pos |
| y | – mouse y pos |
| button | – mouse button state |
| void DeodhaiWindowHide | ( | Window * | win | ) |
DeodhaiWindowHide – hides a window.
| win | – Pointer to window to hide |
| void DeodhaiWindowMakeTop | ( | Window * | win | ) |
DeodhaiWindowMakeTop – brings a window to front.
| win | – window to brin front |
| void DeodhaiWindowMove | ( | Window * | win, |
| int | x, | ||
| int | y | ||
| ) |
DeodhaiWindowMove – move an window to a new location.
| win | – Pointer to window |
| x | – new x position |
| y | – new y position |
DeodhaiWindowSetFocused – cast focus to a new window.
| void DrawWallpaper | ( | ChCanvas * | canv, |
| char * | filename | ||
| ) |
DrawWallpaper for getting jpeg image as wallpaper fully jpeg encoder is needed, i use synfig studio for jpeg encoder.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
main – main entry
| void XRComposeFrame | ( | ChCanvas * | canvas | ) |
Normal application windows
do either one – dirty area tracking or else update all
Always on Top window , stacking order
| ChFont* f2 |
DeodhaiXR – The Graphics compositing pipeline Supports three types of input – (1) Mouse (2) Keyboard (3) Special XR input two types of rendering : 2D Compositing for non-xr system(GPU/Software), 3D compositing for XR system (GPU)
| ChRect rectb |
| int x_ |
| int y_ |