#ifndef __MISC_GTK_H__ #define __MISC_GTK_H__ void widget_log(GtkWidget *w); void widget_unlog(GtkWidget *w); GtkWidget *get_widget_by_widget_name(const char *widget_name); #define gtk_widget_ref(w) {widget_log(w);gtk_widget_ref(w);} #define gtk_widget_unref(w) {widget_unlog(w);gtk_widget_unref(w);} /***************************************************************************/ /* take the string contained in the gtk_entry having the name "entry_name" */ /* and compare it to array. */ /***************************************************************************/ /* output: index of the entry_name content string into array */ /* on error or when the string is not found, 0 is returned */ /*******************************************************************/ int gtk_entry_to_number(char *entry_name, const char *array[]); /***************************************************************************/ /* take the string contained in the gtk_entry having the name "entry_name" */ /* and compare it to array. */ /***************************************************************************/ /* output: index of the entry_name content string into array */ /* on error or when the string is not found, -1 is returned */ /********************************************************************/ int gtk_entry_to_number_wo_default(char *entry_name, const char *array[]); #endif