#include "wx/fontutil.h"
#include "wx/gtk/win_gtk.h"
+#include "wx/gtk/private.h"
#include "wx/math.h" // for floating-point functions
for (int i = 0; i < wxGCPoolSize; i++)
{
if (wxGCPool[i].m_gc)
- gdk_gc_unref( wxGCPool[i].m_gc );
+ g_object_unref (G_OBJECT (wxGCPool[i].m_gc));
}
free(wxGCPool);
gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
gdk_gc_set_stipple( gc, mask );
gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, ww, hh );
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
}
if (is_mono)
gdk_draw_drawable( m_window, m_textGC, bitmap2, 0, 0, xx, yy, -1, -1 );
g_object_unref (G_OBJECT (bitmap2));
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
}
else
{
gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
gdk_gc_set_stipple( gc, mask );
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)
gdk_draw_drawable( m_window, m_textGC, bitmap, xsrc, ysrc, cx, cy, cw, ch );
g_object_unref (G_OBJECT (bitmap));
- gdk_gc_unref( gc );
+ g_object_unref (G_OBJECT (gc));
}
else
{
bool underlined = m_font.Ok() && m_font.GetUnderlined();
-#if wxUSE_UNICODE
- const wxCharBuffer data = wxConvUTF8.cWC2MB( text );
-#else
- const wxWCharBuffer wdata = wxConvLocal.cMB2WC( text );
- if ( !wdata )
+ const wxCharBuffer data = wxGTK_CONV( text );
+ if ( !data )
return;
- const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata );
-#endif
- size_t datalen = strlen((const char*)data);
- pango_layout_set_text( m_layout, (const char*) data, datalen);
+ const size_t datalen = strlen(data);
+ pango_layout_set_text( m_layout, data, datalen);
if (underlined)
{
pango_layout_set_font_description( m_layout, theFont->GetNativeFontInfo()->description );
// Set layout's text
-#if wxUSE_UNICODE
- const wxCharBuffer data = wxConvUTF8.cWC2MB( string );
- const char *dataUTF8 = (const char *)data;
-#else
- const wxWCharBuffer wdata = wxConvLocal.cMB2WC( string );
- if ( !wdata )
- return;
-
- const wxCharBuffer data = wxConvUTF8.cWC2MB( wdata );
- const char *dataUTF8 = (const char *)data;
-#endif
-
+ const wxCharBuffer dataUTF8 = wxGTK_CONV(string);
if ( !dataUTF8 )
{
// hardly ideal, but what else can we do if conversion failed?