#include <gdk/gdkrgb.h>
#endif
+extern GtkWidget *wxRootWindow;
+
wxBitmap wxImage::ConvertToMonoBitmap( unsigned char red, unsigned char green, unsigned char blue )
{
wxBitmap bitmap;
bitmap.SetHeight( height );
bitmap.SetWidth( width );
- bitmap.SetBitmap( gdk_pixmap_new( (GdkWindow*)&gdk_root_parent, width, height, 1 ) );
+ bitmap.SetBitmap( gdk_pixmap_new( wxRootWindow->window, width, height, 1 ) );
bitmap.SetDepth( 1 );
mask_image = gdk_image_new_bitmap( gdk_visual_get_system(), mask_data, width, height );
wxMask *mask = new wxMask();
- mask->m_bitmap = gdk_pixmap_new( (GdkWindow*)&gdk_root_parent, width, height, 1 );
+ mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, width, height, 1 );
bitmap.SetMask( mask );
}
bitmap.SetHeight( height );
bitmap.SetWidth( width );
- bitmap.SetPixmap( gdk_pixmap_new( (GdkWindow*)&gdk_root_parent, width, height, -1 ) );
+ bitmap.SetPixmap( gdk_pixmap_new( wxRootWindow->window, width, height, -1 ) );
// Retrieve depth
mask_image = gdk_image_new_bitmap( gdk_visual_get_system(), mask_data, width, height );
wxMask *mask = new wxMask();
- mask->m_bitmap = gdk_pixmap_new( (GdkWindow*)&gdk_root_parent, width, height, 1 );
+ mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, width, height, 1 );
bitmap.SetMask( mask );
}
{
GdkVisual *visual = gdk_window_get_visual( bitmap.GetPixmap() );
- if (visual == NULL) visual = gdk_window_get_visual( (GdkWindow*) &gdk_root_parent );
+ if (visual == NULL) visual = gdk_window_get_visual( wxRootWindow->window );
bpp = visual->depth;
if (bpp == 16) bpp = visual->red_prec + visual->green_prec + visual->blue_prec;
red_shift_right = visual->red_shift;