[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

cl-gtk2 lots I don't understand

Jim Newton

7/23/2015 1:20:00 PM

Does someone have a clue how to do this? Or perhaps someone has some example code?
Has anyone used either the lisp library or gtk in some other language to understand the programming model?

I'm trying to extend a program which is written using several libraries including cl-gtk2.
But I don't yet understand the GTK model, and I've never used the GTK api in any other language.

What I'd like to do is open a new window and paint an image into it pixel by pixel.

I have a function which will draw an image (pixel by pixel) into an object of class GDK:GDK-IMAGE, given an object of class GDK:GRAPHICS-CONTEXT. A GDK:GRAPHICS-CONTEXT object can be created/extracted from a "drawable" window.

But somehow these objects need to be associated with windows. And I'm not sure whether the graphics-context needs to be created once and reused, or needs to be recreated for each window?

There seem to be two lisp package of functions/classes/etc GTK and GDK. They are related in some way which I don't yet understand.

Does someone have a clue how to do this? Or perhaps someone has some example code?

I've looked at the cl-gtk2 documentation which is pretty simple and does not seem to cover what I'm looking for. It looks like cl-gtk2 is only usable to someone who already understands gtk.

A little bit depressing is when I look in the GTK documentation it says don't use the function which the cl-gtk2 bindings provide :-(