Merged revisions 10677-11457 via svnmerge from
[wvapps.git] / zen / src / make.h
blob8a55f89d70a203ef71e70904e01b224e7c7585cb
1 /*
2 * Authors : Peter Zion <pzion@nit.ca>
4 * Copyright 2004, Net Integration Technologies, Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU General Public
8 * License as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 * USA
21 #ifndef MAKE_H
22 #define MAKE_H
23 #include <glib.h>
24 G_BEGIN_DECLS
26 #include "buffer.h"
28 #define TYPE_MAKE (make_get_type())
29 #define MAKE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), TYPE_MAKE, Make))
30 #define MAKE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST((class), TYPE_MAKE, MakeClass))
31 #define IS_MAKE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), TYPE_MAKE))
32 #define IS_MAKE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE((class), TYPE_MAKE))
33 #define MAKE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), TYPE_MAKE, MakeClass))
35 typedef struct _Make Make;
36 typedef struct _MakeClass MakeClass;
38 struct _MakeClass
40 BufferClass parent_class;
42 void (*can_browse_errors_changed)(Make *make);
45 struct _Make
47 Buffer parent;
49 int pipe[2];
51 gchar *command;
52 gchar *dir;
54 guint timeout_id;
56 gboolean can_browse_errors;
57 gboolean search_for_directory;
59 gchar *start_msg;
60 gchar *end_msg;
62 gboolean started_browsing;
63 const gchar *browse_start_msg;
64 const gchar *browse_end_msg;
67 Make *make_new(const gchar *argv[], const gchar *dir, const gchar *title,
68 gchar *start_msg, gchar *end_msg);
70 void make_set_can_browse_errors(Make *make, gboolean can_browse_errors,
71 gboolean search_for_directory);
72 gboolean make_can_browse_errors(Make *make);
74 void make_next_error_cmd(Make *make);
75 void make_previous_error_cmd(Make *make);
77 void make_set_browse_errors(Make *make,
78 const gchar *start_msg, const gchar *end_msg);
80 extern Make *make;
82 G_END_DECLS
83 #endif