X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1a3a1b2df2dbf163fee78cdd779fbf17ecc25dc8..402dfce7b324c977a5b396b07cd36835d5514e52:/src/gtk/bitmap.cpp diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 07d4a143aa..cb569d3647 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -346,7 +346,7 @@ bool wxBitmap::CreateFromXpm( const char **bits ) 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() ? @@ -484,7 +484,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, dst[h*dstbyteperline+width/8] = outbyte; } - gdk_image_destroy( img ); + g_object_unref (G_OBJECT (img)); if (gc) g_object_unref (G_OBJECT (gc)); if ( dst ) @@ -543,7 +543,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight, bmp.SetMask(mask); free( dst ); - gdk_image_destroy( img ); + g_object_unref (G_OBJECT (img)); } free( tablex ); @@ -660,7 +660,7 @@ bool wxBitmap::CreateFromImageAsBitmap(const wxImage& img) gdk_draw_image( GetBitmap(), data_gc, data_image, 0, 0, 0, 0, width, height ); - gdk_image_destroy( data_image ); + g_object_unref (G_OBJECT (data_image)); g_object_unref (G_OBJECT (data_gc)); // Blit mask @@ -671,7 +671,7 @@ bool wxBitmap::CreateFromImageAsBitmap(const wxImage& img) gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height ); - gdk_image_destroy( mask_image ); + g_object_unref (G_OBJECT (mask_image)); g_object_unref (G_OBJECT (mask_gc)); } @@ -900,7 +900,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img) gdk_draw_image( GetPixmap(), data_gc, data_image, 0, 0, 0, 0, width, height ); - gdk_image_destroy( data_image ); + g_object_unref (G_OBJECT (data_image)); g_object_unref (G_OBJECT (data_gc)); // Blit mask @@ -911,7 +911,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img) gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height ); - gdk_image_destroy( mask_image ); + g_object_unref (G_OBJECT (mask_image)); g_object_unref (G_OBJECT (mask_gc)); } @@ -1136,8 +1136,8 @@ wxImage wxBitmap::ConvertToImage() const } } - 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; @@ -1262,7 +1262,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const { 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 { @@ -1273,7 +1273,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const 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)); } } @@ -1289,7 +1289,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const 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 ); } @@ -1339,7 +1339,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type ) 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; }