gdk_gc_unref -> g_object_unref

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2006-04-04 14:26:57 +00:00
parent 5c763f5a23
commit 5e4bf05abd
4 changed files with 17 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ bool wxMask::Create( const wxBitmap& bitmap,
gdk_draw_line( m_bitmap, gc, start_x, j, i, j ); gdk_draw_line( m_bitmap, gc, start_x, j, i, j );
} }
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
return true; return true;
} }
@@ -212,7 +212,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() ); 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; return true;
} }
@@ -485,7 +485,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
} }
gdk_image_destroy( img ); gdk_image_destroy( img );
if (gc) gdk_gc_unref( gc ); if (gc) g_object_unref (G_OBJECT (gc));
if ( dst ) if ( dst )
{ {
@@ -661,7 +661,7 @@ bool wxBitmap::CreateFromImageAsBitmap(const wxImage& img)
gdk_draw_image( GetBitmap(), data_gc, data_image, 0, 0, 0, 0, width, height ); gdk_draw_image( GetBitmap(), data_gc, data_image, 0, 0, 0, 0, width, height );
gdk_image_destroy( data_image ); gdk_image_destroy( data_image );
gdk_gc_unref( data_gc ); g_object_unref (G_OBJECT (data_gc));
// Blit mask // Blit mask
@@ -672,7 +672,7 @@ bool wxBitmap::CreateFromImageAsBitmap(const wxImage& img)
gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height ); gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height );
gdk_image_destroy( mask_image ); gdk_image_destroy( mask_image );
gdk_gc_unref( mask_gc ); g_object_unref (G_OBJECT (mask_gc));
} }
return true; return true;
@@ -731,7 +731,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img)
image.GetData(), image.GetData(),
width*3 ); width*3 );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
return true; return true;
} }
@@ -901,7 +901,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img)
gdk_draw_image( GetPixmap(), data_gc, data_image, 0, 0, 0, 0, width, height ); gdk_draw_image( GetPixmap(), data_gc, data_image, 0, 0, 0, 0, width, height );
gdk_image_destroy( data_image ); gdk_image_destroy( data_image );
gdk_gc_unref( data_gc ); g_object_unref (G_OBJECT (data_gc));
// Blit mask // Blit mask
@@ -912,7 +912,7 @@ bool wxBitmap::CreateFromImageAsPixmap(const wxImage& img)
gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height ); gdk_draw_image( GetMask()->GetBitmap(), mask_gc, mask_image, 0, 0, 0, 0, width, height );
gdk_image_destroy( mask_image ); gdk_image_destroy( mask_image );
gdk_gc_unref( mask_gc ); g_object_unref (G_OBJECT (mask_gc));
} }
return true; return true;

View File

@@ -171,7 +171,7 @@ static void wxCleanUpGCPool()
for (int i = 0; i < wxGCPoolSize; i++) for (int i = 0; i < wxGCPoolSize; i++)
{ {
if (wxGCPool[i].m_gc) if (wxGCPool[i].m_gc)
gdk_gc_unref( wxGCPool[i].m_gc ); g_object_unref (G_OBJECT (wxGCPool[i].m_gc));
} }
free(wxGCPool); free(wxGCPool);
@@ -1125,7 +1125,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED ); gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
gdk_gc_set_stipple( gc, mask ); gdk_gc_set_stipple( gc, mask );
gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, ww, hh ); gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, ww, hh );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
} }
if (is_mono) if (is_mono)
@@ -1159,7 +1159,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 ); gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
g_object_unref (G_OBJECT (bitmap2)); g_object_unref (G_OBJECT (bitmap2));
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
} }
else else
{ {
@@ -1368,7 +1368,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED ); gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
gdk_gc_set_stipple( gc, mask ); gdk_gc_set_stipple( gc, mask );
gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, bm_ww, bm_hh ); gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, bm_ww, bm_hh );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
} }
if (is_mono) if (is_mono)
@@ -1413,7 +1413,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
gdk_draw_drawable( m_window, m_textGC, bitmap, xsrc, ysrc, cx, cy, cw, ch ); gdk_draw_drawable( m_window, m_textGC, bitmap, xsrc, ysrc, cx, cy, cw, ch );
g_object_unref (G_OBJECT (bitmap)); g_object_unref (G_OBJECT (bitmap));
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
} }
else else
{ {

View File

@@ -51,7 +51,7 @@ static void DrawFrame( GtkWidget *widget, int x, int y, int w, int h )
gdk_gc_set_function( gc, GDK_INVERT ); gdk_gc_set_function( gc, GDK_INVERT );
gdk_draw_rectangle( GDK_ROOT_PARENT(), gc, FALSE, x, y, w, h ); gdk_draw_rectangle( GDK_ROOT_PARENT(), gc, FALSE, x, y, w, h );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -92,7 +92,7 @@ static void gtk_window_own_expose_callback( GtkWidget *widget, GdkEventExpose *g
3, 3,
win->m_width - 7, win->m_width - 7,
height+1 ); height+1 );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc));
// Hack alert // Hack alert
dc.m_window = pizza->bin_window; dc.m_window = pizza->bin_window;

View File

@@ -390,7 +390,7 @@ static void draw_frame( GtkWidget *widget, wxWindowGTK *win )
gdk_draw_rectangle( widget->window, gc, FALSE, gdk_draw_rectangle( widget->window, gc, FALSE,
dx, dy, dx, dy,
widget->allocation.width-dw-1, widget->allocation.height-dh-1 ); widget->allocation.width-dw-1, widget->allocation.height-dh-1 );
gdk_gc_unref( gc ); g_object_unref (G_OBJECT (gc);
return; return;
} }
#endif // __WXUNIVERSAL__ #endif // __WXUNIVERSAL__
@@ -4427,5 +4427,5 @@ bool wxWinModule::OnInit()
void wxWinModule::OnExit() void wxWinModule::OnExit()
{ {
if (g_eraseGC) if (g_eraseGC)
gdk_gc_unref( g_eraseGC ); g_object_unref (G_OBJECT (g_eraseGC));
} }