Woopsi is a Nintendo DS GUI library for rapidly creating user interfaces for homebrew software. Modelled after the AmigaOS windowing system.

Release notes:

The major changes this time around are predominantly improvements to the API and new features for developers (new drawing tools such as filled circles, scrolling panels, and so on). The most obvious changes in the demo are the addition of a simple Pac Man demo (ported from a JavaScript game I wrote a while ago) and bugfixes to the scrolling text gadget (it now clips properly). There’s also a debug console that will pop up when you press one of the d-pad buttons with the Pac Mac demo active.

The most interesting change is the addition of an SDL layer that can substitute for libnds. This means that you can create a new SDL project in your IDE, add the “woopsi” source folder to your project, drop the contents of the “sdl” folder into the “woopsi” folder, and immediately start developing Woopsi-based applications for your native platform with all the debugging features of your IDE. There’s now an XCode 3 project available from the SourceForge site that shows this in action – the standard Woopsi demo compiles and runs in OSX.

The SDL version will only work for applications that confine themselves to the Woopsi API. Any apps that use low-level features, such as the RTC or WiFi hardware, won’t work with the SDL version. For those projects you’ll need to continue developing with the usual libnds (PALib optional), devKitPro and emulator setup (unless you’re cunning and develop your GUI separately from your functionality).

Latest changelog:

– Fixes:
– Windows prevented from being dragged out of top of screen.
– ScreenTitle and WindowBorderTop make a copy of the text passed into them.
– BitmapButton’s drawing routine offsets its blit origin by 1 to account for the gadget’s border width if applicable.
– Replaced most of SuperBitmap’s draw(Rect) routine with a call to GraphicsPort::drawBitmap().
– Increased size of window gadgets in demo skin.
– Updated SuperBitmap to use s16 instead of u16 for co-ordinates.
– Text::wrap() correctly wraps the last line of text.
– Fixed more bugs in TextViewer.
– Removed old Debug methods.
– Fixed clipping in SuperBitmap draw routines.
– Fixed all warnings.
– Fixed GraphicsPort clipping – windows were wrapping around vertically when drawn in screens that were dragged down.
– Fixed bugs in setting gadget attributes from skins.
– Window was handling click() even if a child was clicked.
– SuperBitmap::drawFilledRect() was drawing the top line of the rect over itself.
– Removed all left bitshifts from GraphicsPort::clipFilledRect() and replaced with SCREEN_WIDTH multipliers (aid portability).

– New Features:
– Added SuperBitmap::drawFilledCircle().
– ScreenFlipButton uses GraphicsPort for all of its drawing operations.
– Added woopsiRGB() define as shortcut to RGB with alpha bit set.
– Replaced pixel plotting with DMA_Force() in SuperBitmap::drawHorizLine().
– Added SuperBitmap::clipBitmapCoordinates().
– SuperBitmap draw routines clip to bitmap dimensions.
– Added GraphicsPort::drawFilledCircle().
– Ball in Pong demo is now circular.
– Added PacMan demo.
– MultiLineTextBox outputs using the GraphicsPort.
– MultiLineTextBox automatically chooses smallest number of rows if no value (or 0) is given as the parameter in its constructor.
– MultiLineTextBox trims its text to match the number of rows specified in its constructor.
– Added MultiLineTextBox::setAutomaticDrawing() – if set to “false”, draw() must be called when changes are made to the textbox’s text for them to be shown.
– GraphicsPort has a new drawText() function with a length parameter.
– Added Debug console that automatically creates itself when called for the first time.
– Added Debug::printf().
– Changed skinning structs to be more descriptive.
– Added tiny font to debug console.
– Added ScrollingPanel gadget.
– Added SDL layer.
– Added vertical scrolling to MultiLineTextBox.
– Added macros for using the 2nd DMA channel.
– Added check for DMA active flag in SuperBitmap drawing code.
– Gadget class inherits from EventHandler, so any gadget can be subclassed and made to handle events.
– Screen decoration button gadgets have their parent screen set as their event handler.
– Screen decoration button gadgets raise release events to notify their screens of user input instead of calling functions (subclassing aid).

– Broken:
– Vertical alignment in MultiLineTextBox other than top.

http://www.sourceforge.net/projects/woopsi