Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

gtk-missing.h

Go to the documentation of this file.
00001 /*
00002  * $Id: gtk-missing.h,v 1.19 2005/12/19 15:31:20 cbiere Exp $
00003  *
00004  * Copyright (c) 2002-2003, Richard Eckart
00005  *
00006  *----------------------------------------------------------------------
00007  * This file is part of gtk-gnutella.
00008  *
00009  *  gtk-gnutella is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  gtk-gnutella is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with gtk-gnutella; if not, write to the Free Software
00021  *  Foundation, Inc.:
00022  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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  * GtkProgressBar
00036  *
00037  * Make Gtk1 and Gtk2 versions useable using the same interface.
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  * GtkSpinButton
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  * GtkCList
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 /* USE_GTK1 */
00063 
00064 /*
00065  * GtkCTree
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 /* USE_GTK1 */
00079                                         
00083 #ifdef USE_GTK1 /* USE_GTK1 */
00084 GtkWidget *gtk_paned_get_child1(GtkPaned *paned);
00085 GtkWidget *gtk_paned_get_child2(GtkPaned *paned);
00086 #endif /* USE_GTK1 */
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  * GtkTreeView
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 /* USE_GTK2 */
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  /* _gtk_gtk_missing_h_ */
00150 
00151 /* vi: set ts=4 sw=4 cindent: */

Generated on Sun Feb 12 10:49:56 2006 for Gtk-Gnutella by doxygen 1.3.6