Preview on SGI O2
- From: abaldoni CsR UniBo IT (Alessandro Baldoni mat.1010)
- To: gtk-list redhat com
- Subject: Preview on SGI O2
- Date: Wed, 15 Oct 1997 09:04:46 +0000 (GMT)
Dear friends,
I'm currently trying to port my GIMP extension (HaruspeX) on a SGI O2
workstation, but I'm having a lot of troubles with the previews.
I tried to set_xshm, push_colormap effortlessy.
If I get my previews working, my pixmaps crash. (I have to mix preview with pixmaps).
If my pixmaps work, my previews crash.
I receive a lot of
BadMatch
and
BadColor
Here are a few lines from my app:
gtk_init (&argc, &argv);
gtk_rc_parse (gimp_gtkrc ());
gdk_set_use_xshm (gimp_use_xshm ());
gtk_widget_push_visual (gtk_preview_get_visual ());
gtk_widget_push_colormap (gtk_preview_get_cmap ());
The code for creating my pixmaps is:
GtkWidget *frame;
GtkStyle *style;
GtkWidget *pixmap;
GdkPixmap *pix;
GdkBitmap *mask;
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_border_width (GTK_CONTAINER (frame), 0);
style = gtk_widget_get_style (frame);
pix = gdk_pixmap_create_from_xpm_d (frame->window, &mask,
&style->bg[GTK_STATE_NORMAL],
data);
pixmap = gtk_pixmap_new (pix, mask);
gtk_widget_show (pixmap);
gdk_pixmap_destroy (pix);
gtk_container_add (GTK_CONTAINER (frame), pixmap);
where data is gchar **data (XPM format)
Hope somebody will be able to help me.
Alessandro
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]