(Trivial) Fix spellling in a comment.
[metze/wireshark/wip.git] / epan / column.h
1 /* column.h
2  * Definitions for column handling routines
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24
25 #ifndef __COLUMN_H__
26 #define __COLUMN_H__
27
28 #include "ws_symbol_export.h"
29 #include <epan/column-info.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 typedef struct _fmt_data {
36   gchar *title;            /* title of the column */
37   int fmt;                 /* format of column */
38   gchar *custom_field;     /* field name for COL_CUSTOM */
39   gint custom_occurrence;  /* optional ordinal of occurrence of that field */
40   gboolean visible;        /* if FALSE, hide this column */
41   gboolean resolved;       /* if TRUE, show a more human-readable name */
42 } fmt_data;
43
44 WS_DLL_PUBLIC
45 const gchar         *col_format_to_string(const gint);
46 WS_DLL_PUBLIC
47 const gchar         *col_format_desc(const gint);
48 WS_DLL_PUBLIC
49 gint                 get_column_format(const gint);
50 WS_DLL_PUBLIC
51 void                 set_column_format(const gint, const gint);
52 WS_DLL_PUBLIC
53 void                 get_column_format_matches(gboolean *, const gint);
54 WS_DLL_PUBLIC
55 gint                 get_column_format_from_str(const gchar *);
56 WS_DLL_PUBLIC
57 gchar               *get_column_title(const gint);
58 WS_DLL_PUBLIC
59 void                 set_column_title(const gint, const gchar *);
60 WS_DLL_PUBLIC
61 gboolean             get_column_visible(const gint);
62 WS_DLL_PUBLIC
63 void                 set_column_visible(const gint, gboolean);
64 WS_DLL_PUBLIC
65 gboolean             get_column_resolved(const gint);
66 WS_DLL_PUBLIC
67 void                 set_column_resolved(const gint, gboolean);
68 WS_DLL_PUBLIC
69 const gchar         *get_column_custom_field(const gint);
70 WS_DLL_PUBLIC
71 void                 set_column_custom_field(const gint, const char *);
72 WS_DLL_PUBLIC
73 gint                 get_column_custom_occurrence(const gint);
74 WS_DLL_PUBLIC
75 void                 set_column_custom_occurrence(const gint, const gint);
76 WS_DLL_PUBLIC
77 const gchar         *get_column_width_string(const gint, const gint);
78 WS_DLL_PUBLIC
79 const char          *get_column_longest_string(const gint);
80 WS_DLL_PUBLIC
81 gint                 get_column_char_width(const gint format);
82
83 WS_DLL_PUBLIC
84 void
85 build_column_format_array(column_info *cinfo, const gint num_cols, const gboolean reset_fences);
86
87 WS_DLL_PUBLIC
88 void                 column_dump_column_formats(void);
89
90 #ifdef __cplusplus
91 }
92 #endif /* __cplusplus */
93
94 #endif /* column.h */