Hi,

Xu, Ming (NIH/NLM/NCBI) [F] schrieb:
> Hello.
> 
> I am using wxWidget (wrapper for gtk2+ ) for drawing a bitmap
> on cgi application, the bitmap is created and drawn on memory 
> buffer by wxMemomryDC and the drawing doesn't need display or input 
> device,  but unfortunately, wxMemomryDC's supper class, wxDC, is 
> tied to display device and I have to call gtk_init (&argc, &argv) 
> for wxWidget to work.
> 
> Since the cgi host does not have X-Win, I will use xvfb for
> gtk_init (&argc, &argv), would you please give me hints/reference
> on how to initializie gtk with xvfb ? or any alternative without using
> xvfb in gtk initialization without display/input device.
> 
Nothing special. You need to set the DISPLAY envvar though. When
lauching the Xvfb you pass the display number, use that for the envvar.
Alternatively you can use the gdk_display_manager to open the display
for gtk. I do this in my unit-tests to run without visible effects [1]

Stefan

[1]:
http://cvs.sourceforge.net/viewcvs.py/buzztard/buzztard/tests/bt-check.c?rev=1.19&view=auto
see 'gtk+ gui tests'


> thanks in advance
> 
> ming
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to