// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/defs.h"
+#ifndef WX_PRECOMP
+ #include "wx/app.h"
+ #include "wx/dcmemory.h"
+#endif
#include "wx/bitmap.h"
#include "wx/palette.h"
#include "wx/icon.h"
#include "wx/filefn.h"
#include "wx/image.h"
-#include "wx/dcmemory.h"
-#include "wx/app.h"
#include "wx/rawbmp.h"
// need this to get gdk_image_new_bitmap()
gdk_draw_line( m_bitmap, gc, start_x, j, i, j );
}
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
return true;
}
gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() );
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
return true;
}
if (m_bitmap)
g_object_unref (G_OBJECT (m_bitmap));
if (m_pixbuf)
- gdk_pixbuf_unref( m_pixbuf );
+ g_object_unref (G_OBJECT (m_pixbuf));
delete m_mask;
#if wxUSE_PALETTE
delete m_palette;
M_BMPDATA->m_mask->m_bitmap = mask;
}
- gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+ gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
M_BMPDATA->m_bpp = visual->depth; // Can we get a different depth from create_from_xpm_d() ?
dst[h*dstbyteperline+width/8] = outbyte;
}
- gdk_image_destroy( img );
- if (gc) gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (img));
+ if (gc) g_object_unref (G_OBJECT (gc));
if ( dst )
{
bmp.SetMask(mask);
free( dst );
- gdk_image_destroy( img );
+ g_object_unref (G_OBJECT (img));
}
free( tablex );
gdk_draw_image( GetBitmap(), data_gc, data_image, 0, 0, 0, 0, width, height );
- gdk_image_destroy( data_image );
- gdk_gc_unref( data_gc );
+ g_object_unref (G_OBJECT (data_image));
+ g_object_unref (G_OBJECT (data_gc));
// Blit mask
gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height );
- gdk_image_destroy( mask_image );
- gdk_gc_unref( mask_gc );
+ g_object_unref (G_OBJECT (mask_image));
+ g_object_unref (G_OBJECT (mask_gc));
}
return true;
image.GetData(),
width*3 );
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
return true;
}
gdk_draw_image( GetPixmap(), data_gc, data_image, 0, 0, 0, 0, width, height );
- gdk_image_destroy( data_image );
- gdk_gc_unref( data_gc );
+ g_object_unref (G_OBJECT (data_image));
+ g_object_unref (G_OBJECT (data_gc));
// Blit mask
gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height );
- gdk_image_destroy( mask_image );
- gdk_gc_unref( mask_gc );
+ g_object_unref (G_OBJECT (mask_image));
+ g_object_unref (G_OBJECT (mask_gc));
}
return true;
}
}
- gdk_image_destroy( gdk_image );
- if (gdk_image_mask) gdk_image_destroy( gdk_image_mask );
+ g_object_unref (G_OBJECT (gdk_image));
+ if (gdk_image_mask) g_object_unref (G_OBJECT (gdk_image_mask));
}
return image;
{
GdkGC *gc = gdk_gc_new( ret.GetPixmap() );
gdk_draw_drawable( ret.GetPixmap(), gc, GetPixmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
- gdk_gc_destroy( gc );
+ g_object_unref (G_OBJECT (gc));
}
else
{
col.pixel = 0;
gdk_gc_set_background( gc, &col );
gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
- gdk_gc_destroy( gc );
+ g_object_unref (G_OBJECT (gc));
}
}
col.pixel = 0;
gdk_gc_set_background( gc, &col );
gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, rect.x, rect.y, 0, 0, rect.width, rect.height );
- gdk_gc_destroy( gc );
+ g_object_unref (G_OBJECT (gc));
ret.SetMask( mask );
}
M_BMPDATA->m_mask->m_bitmap = mask;
}
- gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+ gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
M_BMPDATA->m_bpp = visual->depth;
}
}
}
- gdk_pixbuf_unref(pmask);
+ g_object_unref (G_OBJECT (pmask));
}
}
}
{
if (keep == Pixmap && HasPixbuf())
{
- gdk_pixbuf_unref( M_BMPDATA->m_pixbuf );
+ g_object_unref (G_OBJECT (M_BMPDATA->m_pixbuf));
M_BMPDATA->m_pixbuf = NULL;
}
if (keep == Pixbuf && HasPixmap())