I'm thinking about redesigning the GUI service - uiLib combo in my OS.
Currently it works as follows:
Application tells service: I want a window, I want a button, I want a menue. It knows nothing about drawing and sorta. It just tells the gui service what to do.
The windows are buffered inside gui service. This wastes quite some amount of memory - I am thinking about enhancing drawing to 16, 24 and 32 bit modes soon, so all the window buffering is kinda waste of memory. A first step would be to get rid of all the buffering of windows. Just draw them to the off screen buffer and blit that to screen.
An enhancement of this scheme of things would be to give tha application the possibility just to say: I want a window and I want to receive primitive events (mouse down xy, mouse up xy key down key up draw clip - to kick on the client side drawing for a given area of the window)
It is the clipping which makes me think alot: shall the gui service communicate a list of clips to the application or shall it simply send a series of events: rect1-draw rect2-draw rect-3 draw - so that only the affected and visible areas are redrawn.
Further, what about exposing some offscreen/screen buffer directly to the application in case it is performing some animations where high speed frame throu'put is asked for?
Thanks in advance for Input. it will be, as always, appreciated.
.: this thread is monitored by James T. Klik :.