#include /** * @file * * Super Light compositing window manager for Fool 0S. * Can be run directly on a 32bit or 24bit Framebuffer. * * pid needed to get vmem directory of process for some calls. * only pne window per pid allowed by now. * * Internals: * * framebuffer * backbuffer - same format as framebuffer. * * icons and user-land buffers use ARGB. * bitmaps loaded use ARGB. * * TODO: /dev/mouse * * Threads * ------- * In general it should be accessed only by one gui thread anyway. */ /** * Initialization of our window manager * some obvious params and the address of the framebuffer. */ void compositor_init(uint16_t width, uint16_t height,uint16_t bpp, uint16_t pitch, uint8_t *fb); /** * THE HEAVY WORK * * You can call this any time you want. * It will have no effect unless there * was a call to compositor_wake() before. */ void compositor_paint(); /** * Call this at e.g. at 60HZ. To force a max refresh rate for * compositor_paint(). Additonal calls to compositor_paint() will * be jus skipped. * * This function just sets one variable so it can be caled * from a interrupt handler (e.g. APIC Timer) */ void compositor_wake(); /** * Invalidates an area of the screen. so it will be repainted on the * upcoming frame. can set the address of the user framebuffer * (if changed since last call). */ void compositor_invalidate(uint32_t pid,uint16_t x, uint16_t y, uint16_t w, uint16_t h,uint32_t *fb); /** * Window Create * * flag 1 - no decoration * flag 2 - fixed (can not be moved and always in foreground) */ int compositor_create_window(uint32_t pid,uint16_t x, uint16_t y,uint16_t w,uint16_t h,uint16_t flags); /** * Window Destroy */ void compositor_destroy_window(uint32_t pid); /** * user input mouse */ void compositor_mouse_handle(int16_t x,int16_t y, uint8_t key); /** * user input keyboard */ void compositor_kb_handle(char c);