00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _gtk_gtk_missing_h_
00027 #define _gtk_gtk_missing_h_
00028
00029 #include "gui.h"
00030 #include <gtk/gtk.h>
00031
00032 #include "lib/prop.h"
00033
00034
00035
00036
00037
00038
00039 #ifndef USE_GTK2
00040 #define gtk_progress_bar_set_fraction(pb, val) \
00041 gtk_progress_set_percentage(GTK_PROGRESS(pb), val)
00042 void gtk_progress_bar_set_text(GtkProgressBar *pb, const gchar *text);
00043 gint gtk_paned_get_position(GtkPaned *paned);
00044 #endif
00045
00046
00047
00048
00049 #ifndef USE_GTK2
00050 #define gtk_spin_button_get_value(w) \
00051 _gtk_spin_button_get_value(w)
00052 #endif
00053 gdouble _gtk_spin_button_get_value(GtkSpinButton *);
00054
00055
00056
00057
00058 #ifdef USE_GTK1
00059 void gtk_clist_set_column_name(GtkCList * clist, gint col, gchar * t);
00060 GSList *clist_collect_data(GtkCList *clist, gboolean allow_null,
00061 GCompareFunc cfn);
00062 #endif
00063
00064
00065
00066
00067 #ifdef USE_GTK1
00068 void gtk_ctree_fast_move (GtkCTree *ctree, GtkCTreeNode *node,
00069 GtkCTreeNode *new_sibling);
00070 gint gtk_ctree_count_node_children(GtkCTree *ctree, GtkCTreeNode *parent);
00071
00072 #define GTK_CTREE_NODE_HAS_CHILDREN(n) \
00073 ((n) ? (GTK_CTREE_ROW(n)->children) != NULL : FALSE)
00074 #define GTK_CTREE_NODE_SIBLING(n) \
00075 ((n) ? (GTK_CTREE_ROW(n)->sibling) : NULL)
00076 #define GTK_CTREE_NODE_PARENT(n) \
00077 ((n) ? (GTK_CTREE_ROW(n)->parent) : NULL)
00078 #endif
00079
00083 #ifdef USE_GTK1
00084 GtkWidget *gtk_paned_get_child1(GtkPaned *paned);
00085 GtkWidget *gtk_paned_get_child2(GtkPaned *paned);
00086 #endif
00087
00091 void gtk_label_printf(GtkLabel *, const gchar *fmt, ...) G_GNUC_PRINTF(2, 3);
00092
00096 void gtk_entry_printf(GtkEntry *, const gchar *fmt, ...) G_GNUC_PRINTF(2, 3);
00097
00101 guint32 gtk_editable_get_value_as_uint(GtkEditable *editable);
00102
00106 void widget_init_choices(GtkWidget * widget, GtkSignalFunc func,
00107 prop_def_t *def, gpointer user_data);
00108
00112 void option_menu_select_item_by_data(GtkOptionMenu *option_menu,
00113 gconstpointer data);
00114 gpointer option_menu_get_selected_data(GtkOptionMenu *option_menu);
00115 GtkWidget *menu_new_item_with_data(GtkMenu *menu, const gchar *label_text,
00116 gpointer data);
00117
00121 void gtk_mass_widget_set_sensitive(GtkWidget *tl,
00122 const gchar * const list[], guint n, gboolean b);
00123
00124
00125
00126
00127 #ifdef USE_GTK2
00128 typedef void (*tree_view_motion_callback)(GtkTreeView *, GtkTreePath *);
00129 typedef struct tree_view_motion tree_view_motion_t;
00130
00131 typedef gpointer (*tree_selection_get_data_func)(GtkTreeModel *model, GtkTreeIter *iter);
00132
00133 GtkTreeIter *w_tree_iter_new(void);
00134 GtkTreeIter *w_tree_iter_copy(GtkTreeIter *iter);
00135 void w_tree_iter_free(GtkTreeIter *iter);
00136 void ht_w_tree_iter_free(gpointer);
00137 GSList *tree_selection_collect_data(GtkTreeSelection *tsel,
00138 tree_selection_get_data_func gdf, GCompareFunc cfn);
00139 tree_view_motion_t *tree_view_motion_set_callback(GtkTreeView *tv,
00140 tree_view_motion_callback cb, guint interval);
00141 void tree_view_motion_clear_callback(GtkTreeView *tv, tree_view_motion_t *tm);
00142 #endif
00143
00144 gint gtk_main_flush(void);
00145 GtkWidget *radiobutton_get_active_in_group(GtkRadioButton *rb);
00146
00147 void gtk_widget_fix_width(GtkWidget *w, GtkWidget *l, guint chars, guint extra);
00148
00149 #endif
00150
00151