1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 Copyright (C) 2004 Sebastien 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 __ANJUTA_AUTOGEN_H__
22 #define __ANJUTA_AUTOGEN_H__
29 * A GObject wrapper for running GNU autogen.
32 typedef struct _AnjutaAutogen AnjutaAutogen
;
33 typedef struct _AnjutaAutogenClass AnjutaAutogenClass
;
35 #define ANJUTA_TYPE_AUTOGEN (anjuta_autogen_get_type ())
36 #define ANJUTA_AUTOGEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_AUTOGEN, AnjutaAutogen))
37 #define ANJUTA_AUTOGEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_AUTOGEN, AnjutaAutogenClass))
38 #define ANJUTA_IS_AUTOGEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_AUTOGEN))
39 #define ANJUTA_IS_AUTOGEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_AUTOGEN))
40 #define ANJUTA_AUTOGEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_AUTOGEN, AnjutaAutogenClass))
42 GType
anjuta_autogen_get_type (void) G_GNUC_CONST
;
46 * @autogen: #AnjutaAutogen object.
47 * @data: user data passed to the callback.
49 * This function is called when the autogen process is completed.
51 typedef void (*AnjutaAutogenFunc
) (AnjutaAutogen
* autogen
, gpointer data
);
54 * AnjutaAutogenOutputFunc:
55 * @output: data generated by autogen.
56 * @data: user data passed to the callback.
58 * This function is called each time there is new data from autogen.
60 typedef void (*AnjutaAutogenOutputFunc
) (const gchar
* output
, gpointer data
);
63 AnjutaAutogen
* anjuta_autogen_new (void);
65 gboolean
anjuta_autogen_write_definition_file (AnjutaAutogen
* this, GHashTable
* values
, GError
**error
);
67 void anjuta_autogen_set_library_path (AnjutaAutogen
* this, const gchar
*directory
);
68 void anjuta_autogen_clear_library_path (AnjutaAutogen
* this);
69 GList
*anjuta_autogen_get_library_paths (AnjutaAutogen
* this);
70 gboolean
anjuta_autogen_set_input_file (AnjutaAutogen
* this, const gchar
* filename
, const gchar
* start_marker
, const gchar
* end_marker
);
71 gboolean
anjuta_autogen_set_output_file (AnjutaAutogen
* this, const gchar
* filename
);
72 gboolean
anjuta_autogen_set_output_callback (AnjutaAutogen
* this, AnjutaAutogenOutputFunc func
, gpointer user_data
, GDestroyNotify destroy
);
74 gboolean
anjuta_autogen_execute (AnjutaAutogen
* this, AnjutaAutogenFunc func
, gpointer data
, GError
** error
);
76 gboolean
anjuta_check_autogen(void);