Re: [gtk] GTK on memory framebuffer?



On Fri, 28 Sep 2001, Cam Mayor wrote:

> Now the question:
> 
> Can gtk act on a pure bitmap/framebuffer image (defined only as a data 
> structure), or does it need to act on the actual devices of display?   If it 
> can operate on a raw image, we can easily do some blitting back and forth 
> between two bitmaps kept in memory; the one not being displayed is the one 
> modified, until it gets swapped with the currently displayed bitmap.  Is this 
> possible with Gtk?  This would allow us to use Gtk for our development for 
> the demo, and allow us to keep the overall architecture for the post-demo 
> development.

This would need a small amount of localized changes in GtkFB. Should be 
really easy.

Just use the shadow buffer mode of GtkFB and make the shadow buffer 
updates update to your framebuffer by changeing the shadow_copy_rect 
function pointers in gtk+/gdk/linux-fb/gdkrender-fb.c:gdk_shadow_fb_init() 
to your own. 

You'd have to remove some stuff from the initialization code too. The 
parts that opens the framebuffer device and sets up resolutions etc. And 
you need to hardcode your framebuffer layout data (size, depth etc).
 
> While i'm at it, has anybody else compiled Gtk for the ARM architecture?

I don't think so. Gtk+ 2 at least.

/ Alex







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]