BetaArchive Logo
Navigation Home Database Screenshots Gallery Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 30d, 16h, 12m | CPU: 26% | MEM: 5798MB of 8191MB used
{The community for beta collectors}

Forum rules

Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPost subject: OSBA OS Update        Posted: Wed Nov 08, 2006 6:00 am 
Reply with quote

Sat Aug 19, 2006 1:25 am


Over the last few weeks I've been working on oDisplay (OSBA OS' native windowing environment).

To show (off) what oDisplay can already do, here's a sample application that draws the image given as a parameter and displays a "Hello, World!" message:
#include "oDisplay.h"

int main(int *argc,char *argv[])
   unsigned long *image;
   unsigned int width,height;
   odWindow *wnd,*wnd2;

// check that a file was specified
   if ( argc < (int *)2 )
      fatalError(-1,"main","no file specified.");
// initiate oDisplay

// load the specified image
   image = odLoadImage(argv[1],&width,&height);
// if we can't load it, exit with an error message
   if ( ! image )
      fatalError(-1,"main","can't load image.");

// create a window at location 100,100 with the image's width and height,
// set its parent window to the root window, make it shown by default
// (first 1) and managed by default (second 1), and make it without an
// event handler (the NULL)
   wnd = odCreateWindow(100,100,width,height,odGetRootWindow(),1,1,NULL);
// set its transparency to 64 (25%)
// color the root window with a light blue color
// draw the image

// get the text size
   odGetTextSize("Hello, World!","arial",12,&width,&height);
// create the second window
   wnd2 = odCreateWindow(350,500,width+40,height+10,odGetRootWindow(),1,1,NULL);
// color it white
// draw the text on the second window, at location 20,5, using font arial size 12, color black and 0xFF opacity
   odDrawTextToWindow(wnd2,20,5,"Hello, World!","arial",12,0xFF000000);

// wait ten seconds
// destroy both windows
// terminate oDisplay and exit with a success code
   return 0;
this is what this program looks like when run with the Google logo as a parameter:

As you can see, oDisplay already has windowing, text, transparency and image-loading support, and I'm currently working on loadable widget support.

Notice the coding simplicity compared to other low level windowing environments (X11, Win32, ...).

Top  Profile
 PostPost subject:        Posted: Wed Nov 08, 2006 7:11 am 
Reply with quote
User avatar

Tue Aug 22, 2006 3:30 pm


Essex, UK

Favourite OS
wow, cool :D looks great, when it gets good enuf ill start using it :D

The better candies are in the cage

Top  Profile  WWW  ICQ  YIM
 PostPost subject:        Posted: Wed Nov 08, 2006 8:19 am 
Reply with quote
FTP Access

Sun Nov 05, 2006 3:41 am



Favourite OS
Arch Linux
I used OSBA OS in vmware, and it's actually a pretty good OS, I might install it on my spare PC soon when it gets better :D

Top  Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2020


Sitemap | XML | RSS