HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / ui / ui_util.h
blob3fcc2ff33b9643c656f9b471cdf50417eba8cf79
1 /* ui_util.h
2 * Declarations of UI utility routines; these routines have GUI-independent
3 * APIs, but GUI-dependent implementations, so that they can be called by
4 * GUI-independent code to affect the GUI.
6 * $Id$
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifndef __UI_UTIL_H__
28 #define __UI_UTIL_H__
30 #include "epan/packet_info.h"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
36 /** geometry values for use in window_get_geometry() and window_set_geometry() */
37 typedef struct window_geometry_s {
38 gchar *key; /**< current key in hashtable (internally used only) */
39 gboolean set_pos; /**< set the x and y position values */
40 gint x; /**< the windows x position */
41 gint y; /**< the windows y position */
42 gboolean set_size; /**< set the width and height values */
43 gint width; /**< the windows width */
44 gint height; /**< the windows height */
46 gboolean set_maximized; /**< set the maximized state (GTK2 only) */
47 gboolean maximized; /**< the windows maximized state (GTK2 only) */
48 } window_geometry_t;
50 /* update the main window */
51 extern void main_window_update(void);
52 /* quit a nested main window */
53 extern void main_window_nested_quit(void);
54 /* quit the main window */
55 extern void main_window_quit(void);
57 /* read from a pipe (callback) */
58 typedef gboolean (*pipe_input_cb_t) (gint source, gpointer user_data);
59 /* install callback function, called if pipe input is available */
60 extern void pipe_input_set_handler(gint source, gpointer user_data, int *child_process, pipe_input_cb_t input_cb);
62 /* packet_list.c */
64 void packet_list_clear(void);
65 void packet_list_freeze(void);
66 void packet_list_recreate_visible_rows(void);
67 void packet_list_thaw(void);
68 void packet_list_next(void);
69 void packet_list_prev(void);
70 guint packet_list_append(column_info *cinfo, frame_data *fdata, packet_info *pinfo);
71 frame_data * packet_list_get_row_data(gint row);
72 void packet_list_set_selected_row(gint row);
73 void packet_list_enable_color(gboolean enable);
74 void packet_list_queue_draw(void);
75 void packet_list_select_first_row(void);
76 void packet_list_select_last_row(void);
77 void packet_list_moveto_end(void);
78 gboolean packet_list_check_end(void);
79 gboolean packet_list_select_row_from_data(frame_data *fdata_needle);
80 void packet_list_resize_column(gint col);
82 #ifdef __cplusplus
84 #endif /* __cplusplus */
86 #endif /* __UI_UTIL_H__ */
89 * Editor modelines
91 * Local Variables:
92 * c-basic-offset: 4
93 * tab-width: 8
94 * indent-tabs-mode: nil
95 * End:
97 * ex: set shiftwidth=4 tabstop=8 expandtab:
98 * :indentSize=4:tabSize=8:noTabs=true: