[ECOS] using the Qt virtual frame buffer (qvfb) from ecos synth. target

Alexander Neundorf neundorf@kde.org
Tue Feb 15 20:38:00 GMT 2005


Hi,

attached are two files which implement a simple interface to the Qt virtual 
frame buffer (qvfb). qvfb is a tool which comes with Qt and which simulates a 
frame buffer display by providing a shared memory segment and displaying its 
contents under X.

Simple example how to use it:

//connect
char *framebuffer=qvfb_connect(0x62062c07);
if (framebuffer==0)
   return;
printf("width: %d height: %d depth: %d\n", 
       qvfb_width(), qvfb_height(), qvfb_depth());

//"draw" something
memset(framebuffer, 0, qvfb_width()*qvfb_height()*qvfb_depth()/8);
//force update
qvfb_update(); 

//quit
qvfb_disconnect();

The qvfb_update() is required to force qvfb to update its display. You can 
either call it manually, or you could install a small thread which does 
nothing but calling qvfb_update() regularly, or if you have drawing functions 
you can call qvfb_update() or qvfb_update_rect() at the end of each drawing 
function.

I'd like to contribute this to ecos, so I'm waiting for comments now :-)
(haven't done CDL yet, will do)

Since it's for the synth. target, is GPL ok or does it have to be GPL
+exception ? I mean, nobody distributes a product running under ecos synth.

Bye
Alex
-- 
Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de
Home: neundorf@kde.org                - http://www.kde.org
      alex@neundorf.net               - http://www.neundorf.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qvfb.c
Type: text/x-csrc
Size: 1627 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20050215/2ad2313c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qvfb.h
Type: text/x-chdr
Size: 1019 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20050215/2ad2313c/attachment-0001.bin>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list