Painter and How AGG Works

This article is intended to give an overview of the Anti-Grain Geometry 2D engine by Maxim Shemanarev. This C++ graphics engine is currently the back-end of the Haiku Painter class used by the app_server as its implementation of BView style drawing. By introducing some of the concepts of AGG and how they are used within Painter, I'm hoping to make it easier for others to join the development of Painter and finding ways of improving its efficiency, adding features and/or finding means of adding hardware acceleration.

RepliShow: A Replicable Image Viewer

Body

The original version of RepliShow was written by Seth Flaxman, and has been modified by Dr. Hartmut Reh. The source discussed in this article can be found here.

Today we'll be constructing a rather primitive application that displays images and is replicable. It will demonstrate two things: BeOS replicant technology and the Translation Kit.

Replicant technology is a standard part of BeOS, although it has not been widely used by many applications. You can see replicants in place in NetPositive and the Clock application that both ship with BeOS. You can tell something is replicable when it has a little dragger somewhere in its view, as shown below.

Replicants - More application than an application

Yep. I remember when Be first announced Replicants. They were going to be the next ActiveX. I wonder what ever happened to them.

The sad truth is that absolutely nothing happened to Replicants. Almost no one ever used them. No great mountains of applications ever came out for them. I was chatting with some people the other day on IRC and we wondered about this. Needing to write an article and not sure what to write, that commiseration came back to mind.

Against Directories

Body: 

Let me start out by saying that I am not "against" directories. It is more like "rethinking" directories. We have been talking on the Glass Elevator list about queries and how to make them more useful for some time now. There is a pretty broad consensus that we should try to bring more use of queries into R2 and beyond, that we should help the end user to use them far more than R5 does. While not a "killer app", queries can be, at the very least, an "attacker app": one of those little features that you really miss when you move to other operating systems. As a result of some serious consideration of what I know about how people use computers, it seems to me that, in many ways, directories may not make sense anymore. Beginning users struggle with them. Many people just don't use them--they fill their desktop with all of their files, or deposit everything into a large, flat "My Documents" folder. Advanced users become frustrated with them because they are forced into only one organizational method. They can't easily search for files except along the lines that they first organized their files.

How to Write a Printer Driver

Body

A printer driver in BeOS R5 is an add-on that exports a specific C interface. This add-on is used by the print_server to add a new printer, configure a page, configure the print job, and print the print job on the printer. This article describes how the print_server interfaces with the printer driver.

The print_server is responsible for maintaining common settings. BMessage objects are used to pass settings from the print_server to a printer driver and vice versa. If the printer driver has to return a BMessage object and wants to show the successful completion of an operation, it has to set the field what to the value 'okok'. To indicate an error, the preferred method is to return NULL. In some cases the print_server interprets a value in what other than 'okok' as the failure of an operation. A printer driver should not rely on this; instead, it should return NULL.

What are You Looking At?

Body

[Obnoxious, snotty narrator begins]

"....When last we left our heroes at Munstris Diveloperz Inc., they were left wondering how applications can be made truly simple. Some software just worked well and other software just seemed bad, but they couldn't figure out why. It seemed like finding a good software tool was no simpler a task than navigating a vast digital jungle with little more than a pocket knife while wishing for a razor-sharp machete. As digital carpenters, the development team needed a good whack with a Clue-By-Four™ or face being left pretty much to the same shoddy equipment as everyone else. The management just needed a good whack."

Node Monitoring

This document describes the feature of the BeOS kernel to monitor nodes. First, there is an explanation of what kind of functionality we have to reproduce (along with the higher level API), then we will present the implementation in Haiku.

Requirements - Exported Functionality in BeOS

From user-level, BeOS exports the following API as found in the storage/NodeMonitor.h header file:

	status_t watch_node(const node_ref *node, 
uint32 flags,
BMessenger target);

status_t watch_node(const node_ref *node,
uint32 flags,
const BHandler *handler,
const BLooper *looper = NULL);

status_t stop_watching(BMessenger target);

status_t stop_watching(const BHandler *handler,
const BLooper *looper = NULL);

The kernel also exports two other functions to be used from file system add-ons that causes the kernel to send out notification messages:

The Art of Locking

Body

I'm sorry, this is not about how to lock Haiku developers into basements to ensure they are most productive--it is a well known fact that this is BGA's speciality, anyway ;-) --no, I want to talk a bit about multiple threads and how to prevent them from mangling shared resources due to uncontrolled access.

Before you skip to the next article expecting to be bored to death by repetition of well-stressed basics, give me a chance to explain: Instead of wading through the fundamentals on BLocker or semaphores, I want to discuss a specific locking problem, for which I recently found, as I feel, quite an elegant solution.

template < madness > : Unit Test Policy

Body

Almost all of my recent coding efforts have gone into work on BMessage. Early on, I decided that wanted to try a more "modern" back-end to BMessage, something that would leverage the power of the STL. The end result is out there enough that I'm not sure I want to use it. At any rate, I'm not going to talk about that right now; maybe in another article, if you're all good. ;)

The Art of Jamming - All Parts

Body

Part 1

Before the musicians in the audience get too excited, I'm not going to talk about getting together with buddies to crank out some tunes. Nor will the cooks in the audience find instructions on making the perfect fruit preserves. No, when I say Jamming, I refer to the act of using the Jam build tool.

In this first part of my series on the Jam build tool, I'm going to provide a high level overview as well as show the product of some of my recent labors with Jam: the Jamfile-engine. For those who have developed on BeOS for a decent amount of time, this may sound familiar. It should, because I have essentially taken the functionality of the Be makefile-engine and "ported" it to Jam.