1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
4 * Copyright 2003 Ximian, Inc. (www.ximian.com)
5 * Copyright (C) Massimo Cora' 2005 <maxcvs@gmail.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #ifndef __VG_TOOL_VIEW_H__
25 #define __VG_TOOL_VIEW_H__
34 #endif /* __cplusplus */
36 #define VG_TYPE_TOOL_VIEW (vg_tool_view_get_type ())
37 #define VG_TOOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VG_TYPE_TOOL_VIEW, VgToolView))
38 #define VG_TOOL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VG_TYPE_TOOL_VIEW, VgToolViewClass))
39 #define VG_IS_TOOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VG_TYPE_TOOL_VIEW))
40 #define VG_IS_TOOL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VG_TYPE_TOOL_VIEW))
41 #define VG_TOOL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VG_TYPE_TOOL_VIEW, VgToolViewClass))
43 typedef struct _VgToolView VgToolView
;
44 typedef struct _VgToolViewClass VgToolViewClass
;
46 #include "vgactions.h"
49 GtkVBox parent_object
;
51 const char **argv
; /* args of program to debug */
52 const char **srcdir
; /* list src dir to check for src files */
54 GPtrArray
*argv_array
;
55 GPtrArray
*srcdir_array
;
62 struct _VgToolViewClass
{
63 GtkVBoxClass parent_class
;
68 void (* clear
) (VgToolView
*view
); /* clears the display (implies a disconnect if needed) */
69 void (* reset
) (VgToolView
*view
); /* resets the state */
70 void (* connect
) (VgToolView
*view
, int sockfd
); /* connect to valgrind's --logfile-fd */
71 int (* step
) (VgToolView
*view
); /* take 1 parse step over valgrind's output stream */
72 void (* disconnect
) (VgToolView
*view
); /* disconnect from valgrind's --logfile-fd */
74 int (* save_log
) (VgToolView
*view
, gchar
* uri
);
75 int (* load_log
) (VgToolView
*view
, VgActions
*actions
, gchar
* uri
);
77 /* cut/copy/paste methods */
78 void (* cut
) (VgToolView
*view
);
79 void (* copy
) (VgToolView
*view
);
80 void (* paste
) (VgToolView
*view
);
83 void (* show_rules
) (VgToolView
*view
); /* show suppression rules dialog */
87 GType
vg_tool_view_get_type (void);
89 void vg_tool_view_set_argv (VgToolView
*view
, char *arg0
, ...);
90 void vg_tool_view_set_srcdir (VgToolView
*view
, char *srcdir0
, ...);
91 void vg_tool_view_set_symtab (VgToolView
*view
, SymTab
*symtab
);
93 void vg_tool_view_clear (VgToolView
*view
);
94 void vg_tool_view_reset (VgToolView
*view
);
95 void vg_tool_view_connect (VgToolView
*view
, int sockfd
);
96 int vg_tool_view_step (VgToolView
*view
);
97 void vg_tool_view_disconnect (VgToolView
*view
);
99 int vg_tool_view_save_log (VgToolView
*view
, gchar
*uri
);
100 int vg_tool_view_load_log (VgToolView
*view
, VgActions
*actions
, gchar
*uri
);
102 void vg_tool_view_cut (VgToolView
*view
);
103 void vg_tool_view_copy (VgToolView
*view
);
104 void vg_tool_view_paste (VgToolView
*view
);
106 void vg_tool_view_show_rules (VgToolView
*view
);
108 char *vg_tool_view_scan_path (const char *program
);
112 #endif /* __cplusplus */
114 #endif /* __VG_TOOL_VIEW_H__ */