Re: gdk/gtk drawing?
- From: Owen Taylor <otaylor redhat com>
- To: "Stefan Andersen" <zingo zingo org>
- Cc: <gtk-devel-list gnome org>, <spamfilter zingo org>
- Subject: Re: gdk/gtk drawing?
- Date: Mon, 29 Apr 2002 23:32:41 -0400 (EDT)
"Stefan Andersen" <zingo zingo org> writes:
> Hello
> Im trying to port Gnome2 to a new platform and have some problem
> I have manage to compiler everything and link it, replacing gdk with a lot
> of stubs and printf's. My problem right now is that I cant make the darn
> thing draw anything usefull, or call a function were I have to add some code.
>
> My startup pice of code is the gtk arrow example, I have manage to open
> window and some subwindows but no drawing in them, My question is were is
> the drawing rutines called from. Is it some sort of event? (I have not
> ported any event handeling?)
The handling of expose events is pretty much essential to get
any drawing going; when a window is newly mapped, no drawing
will be done until an expose event is received. In some other
situations, GDK may generate expose events itself without
intervention from the backend, so I'd expect some stuff to draw
even without backend event handling. But it's not going to
work very well.
Once you add expose events, if it still isn't drawing anything,
the next thing you'd probably want to look at is the double
buffering code ... if your "draw_drawable" function isn't
working or pixmaps aren't working, nothing is going to get
to the screen. (There is a #define in gdkwindow.c that
turning on may get GDK to partially limp along without
double buffering.)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]