Quetions about Writing GUI(Buttons, TextBoxes...)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
flash
Member
Member
Posts: 29
Joined: Sun Feb 04, 2007 6:33 am

Quetions about Writing GUI(Buttons, TextBoxes...)

Post by flash »

I'm writing the GUI these days, but I still have a big program!!

I don't know whether I should put it in Kernel or not. My first idea is put it in User mode, when I click the mouse on a button, the kernel receive the mouse message, and calculate out the window from the mouse position, and send the message to a process, which is the owner of the window. Then, the process receive the message in MessageProcedure(), and it will call DefaultMessageProcedure(), DefaultMessageProcedure is a function in user.dll that the program loaded it. In this function, it will do sth like Blit or Pixel(in gdi.dll) . You see, the attribute data and the bitmap data are all in User Space.

But there are many programs in my idea. I cannot share the bitmap data. They are in user space, kernel can only access them when the process is running.

If I write GUI in OS kernel, then I don't know where I can alloc the memory, in user space, or kernel space, or share space????
User avatar
Cheery
Member
Member
Posts: 52
Joined: Wed Oct 18, 2006 4:39 am

Re: Quetions about Writing GUI(Buttons, TextBoxes...)

Post by Cheery »

Ugh. You seem really confused. I propose you make an API for the graphics and input hardware. This would be the API every program requires, then you'd simply make your GUI multiplex the same API to programs running on that GUI.

This way, you can probably make the whole thing to user-space.
Windows Vista rapes you, cuts you and pisses inside. Thought these are just nifty side-effects.
Post Reply