Windowing Systems by Example: 4 - Get Clippy

So where are we at, now? We have a desktop object that holds window objects and a drawing context object with which it can draw those window objects. We've strapped the mouse into the desktop object in such a way that we can display a simplistic mouse cursor and raise and move the simple rectangular representations of our windows. Where do we go from here? Well, not redrawing the entire goddamn screen and every single bit of every single window -- occluded by other windows or not -- is the direction I've chosen. We certainly could've just dived directly into »


Windowing Systems by Example: 3 - I Like to Move It

Hello, and welcome back to WSBE, if you've been following along for the last couple of articles! If you're just joining us, this is a series of articles in which we're exploring the design and implementation of a simple windowing system step-by-step in C (for use, ex: in a hobby OS[1]). Thus far, we've begun by creating a minimal window class along with a drawing abstraction class with which those windows could display themselves. Then, last week, we focused on structure a bit and implemented a 'desktop' class to do the job of organizing all of our child windows »


Windowing Systems by Example: 2 - Rectangle HQ

Last time, we decided to get started by implementing a basic Window class using our flavor of object-oriented C, in the process also creating a Context class to wrap our framebuffer details and abstract drawing[1] to our simple video device which we then used to draw some 'window' rectangles to our screen. When we were done, I touched on some obvious ways in which what we wrote fails entirely at being a window manager. Today, we're going to start tackling one of those failures, namely the fact that our 'window manager' doesn't... you know. Manage windows. Kind of an »


Windowing Systems by Example: 1 - Complicated Rectangles

[Note For Returning Readers: After a bit of feedback, I decided to drop the JavaScript from this post to focus completely on the C implementation. I was worried that that would alienate people who want to play with the code without having to write a whole OS around it, so I've also updated the repo for this project using Emscripten so that you can run a simple build script and have the example code running on a canvas in the web browser of your choice right away. We now return you to your regularly scheduled updated article]   Okay, we’ »


Windowing Systems by Example: Introduction

So, I’ll say this upfront and before I get into anything else: I am not a great programmer. Okay, so yes. I’ve been doing it, like I assume the majority of you have, since I was a little kid[1]. But I’ve always been a bit lazy about things and have never had a great drive for making sure I’m using really great design patterns all the time. I assume a good chunk of you can identify with my tendency to tell myself I’ll clean up and refactor once everything’s working with my fingers »