build-basic-autotools: bgo #727637 - Autotools plugin should be able to find the...
[anjuta.git] / plugins / run-program / plugin.h
blobe4ab82a5574e40a5e8d9c49f64296ae121623c89
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 plugin.h
4 Copyright (C) 2008 Sébastien Granjoux
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef _PLUGIN_H_
22 #define _PLUGIN_H_
24 #include <libanjuta/anjuta-plugin.h>
25 #include <libanjuta/interfaces/ianjuta-terminal.h>
27 /* Anjuta Shell value set by this plugin */
29 #define RUN_PROGRAM_URI "run_program_uri"
30 #define RUN_PROGRAM_ARGS "run_program_args"
31 #define RUN_PROGRAM_DIR "run_program_directory"
32 #define RUN_PROGRAM_ENV "run_program_environment"
33 #define RUN_PROGRAM_NEED_TERM "run_program_need_terminal"
35 extern GType run_plugin_get_type (GTypeModule *module);
36 #define ANJUTA_TYPE_PLUGIN_RUN_PROGRAM (run_plugin_get_type (NULL))
37 #define ANJUTA_PLUGIN_RUN_PROGRAM(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PLUGIN_RUN_PROGRAM, RunProgramPlugin))
38 #define ANJUTA_PLUGIN_RUN_PROGRAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), ANJUTA_TYPE_PLUGIN_RUN_PROGRAM, RunProgramPluginClass))
39 #define ANJUTA_IS_PLUGIN_RUN_PROGRAM(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PLUGIN_RUN_PROGRAM))
40 #define ANJUTA_IS_PLUGIN_RUN_PROGRAM_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PLUGIN_RUN_PROGRAM))
41 #define ANJUTA_PLUGIN_RUN_PROGRAM_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_PLUGIN_RUN_PROGRAM, RunProgramPluginClass))
43 typedef struct _RunProgramPlugin RunProgramPlugin;
44 typedef struct _RunProgramPluginClass RunProgramPluginClass;
45 typedef struct _RunProgramChild RunProgramChild;
47 struct _RunProgramPlugin
49 AnjutaPlugin parent;
51 /* Menu item */
52 gint uiid;
53 GtkActionGroup *action_group;
55 /* Save data */
56 gboolean run_in_terminal;
57 gchar **environment_vars;
58 GList *recent_target;
59 GList *recent_dirs;
60 GList *recent_args;
62 /* Child watches */
63 GList *child;
64 guint child_exited_connection;
66 /* Build data */
67 gchar *build_uri;
68 gpointer build_handle;
70 /* IAnjutaTerminal object */
71 IAnjutaTerminal *terminal;
73 /* Watch */
74 gint program_watch;
77 void run_plugin_update_shell_value (RunProgramPlugin *plugin);
78 void run_plugin_update_menu_sensitivity (RunProgramPlugin *plugin);
80 #endif