g_strdup_to_gtk_text
#define g_strdup_to_gtk_text(str,text) if(str!=NULL){text=g_strdup(str);}else{text=g_strdup("");}
With GTK 1.2 just duplicate string
g_strdup_to_gtk_text
#define g_strdup_to_gtk_text(str,text) if(str!=NULL){text=g_locale_to_utf8(str,-1,NULL,NULL,NULL);}else{text=g_strdup("");}
With GTK 2.0 encode string to UTF-8
g_strlen_gtk_text
#define g_strlen_gtk_text(str) strlen(str)
With GTK 1.2 just duplicate call strlen
g_strlen_gtk_text
#define g_strlen_gtk_text(str) g_utf8_strlen(str,-1)
With GTK 2.0 give the UTF-8 string length
g_strdup_from_gtk_text
#define g_strdup_from_gtk_text(str,text) if(str!=NULL){text=g_strdup(str);}else{text=g_strdup("");}
With GTK 1.2 just duplicate string
g_strdup_from_gtk_text
#define g_strdup_from_gtk_text(str,text) if(str!=NULL){text=g_locale_from_utf8(str,-1,NULL,NULL,NULL);}else{text=g_strdup("");}
With GTK 2.0 decode string from UTF-8
|