James T. Klik: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1:
Look through the window ... See that background with alpha-blending and my anti-aliased fonts ? See the corner of the screen ? That's Klik's Start Menu! Hmm, no. I have no 'programs' folder, as iI can't load 'programs' for now, but here's a 16-items list of test cases for my WidgetToolKit. Or maybe you prefer a [[What order should I make things in|different style]].
 
== Reaching Klik's level ==
Line 20:
It is time to draw small windows on screen. We had many discussion in the forum about how they can be moved efficiently and so on. Note that you'll '''really''' start to need a way of [[Memory Management|allocating and freeing memory]] at this point, as you do '''not''' want to assume that there's a maximum of N buttons in the system ...
 
# Collect tutorials about GUI programming, including [http://osdever.net/tutorials/GUI_tut.php?the_id=62 GUI Programming] at BonaFide.
# Create a class that will be responsible for receiving event from the system, including the "repaint" event.
# If you want 'windows', let there be a window manager that send them 'repaint' events when needed, handle window displacement and is in charge of "what's behind the window".
# make sure you can add content to your window, and that you don't need to write a specific "repaint" function for each new content. Most WMWMs allow a window to be a container of widgets.
 
== Outrunning James T. Klik ==
 
=== Have programs loaded in memory. ===
And provide a fsfilesystem-approach to access them. It can be very easy if you use GRUB modules to map programs in memory: you just need to create a virtual directory service that will remember at which physical memory address the image of FILE.COM is located and return that address when we do open("file.com").
 
=== Have user-level programs executed when requested. ===
 
The easiest approach is to create a segment for the user's code and one for its data. Then return to the program. You can even not worry about multitasking and decide every kernel operation will occur when an interrupt arise (that's how DOS works), but you will at least have '''1a. implement interrupts support''' and '''1b. implement basic segmentation support'''. If you're fine with asm, load asm programs as a first step.
 
=== Have the kernel access hardware. ===
 
It should at least be able to receive the keyboard data (and translate them ?), setup video display and read mouse events. The most simple GUI at kernel level would be get_video_segment(), set_mouse_buffer(), set_keyb_buffer(). The kernel should know then where it should put data. You can even protect your "start menu" from the user application by excluding the last lines of the display from the "video segment" you return to the application.
 
Required steps are '''2a. video driver''' (get a frame buffer), '''2b. mouse driver''' (have a cursor moving on screen) and '''2c. keyboard reader''' (have keystrokes translated and written to some memory area).
 
=== Build the menu at run time ===
Line 48:
This requires '''3a. Process control''': select which program is currently running and '''3b. Process sleep & wakeup''': let the application decide that it have nothing to do but waiting something to happen and let the kernel return to the application only when something occurred.
 
Note that this will only offer you something like Mac OS 1.0 and that you'll certainly find yourself in troubles as soon as you'll try to add something like modular design, networking or multitasking ...
 
== James' Bookshelf ==
Line 59:
 
== People and OSes related to James T. Klik ==
* [http://messiahandrw.netfast.org MessiahAndrw]
* [[User:Combuster|Combuster]]
* [[User:Novayoshi|NovaYoshi]]
* [[User:catnikita255osdeverr|catnikita255osdeverr]]: "That'sMe me,back butin I2015... don'tNow haveI mouse support yet. UPD: Nowblame workingmyself onfor consolethat OSTBH."
* [http://omarrx024.github.io omarrx024]
* [http://http://www.oby.ro/os/ Bogdan Ontanu, Solar_Os, GUI, Widget toolkit and running loaded PE from disk]
* '' insert your names here ''