Hi,

I'm trying to create a vapi file for goffice
( http://git.gnome.org/cgit/goffice/ ), followin the tutorial here:

http://live.gnome.org/Vala/Bindings

vala-gen-introspect prints a lot of warnings (see the end of this
email).

I don't see what in the c headers is the reason of the syntax errors
(I've attached two sample header files).

Also, what do mean the unknown symbol warnings ?

One last question: the library has two different namespaces: GO and Gog.
What is the best way to handle this particularity ?

        Thanks,

                Emmanuel.

/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/app/go-doc.h:68: 
syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/app/go-doc.h:69: 
syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/app/go-doc.h:72: 
syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/app/go-doc.h:72: 
syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/gtk/go-gradient-selector.h:29:
 syntax error, unexpected identifier, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-graph.h:67: 
syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-graph.h:68: 
syntax error, unexpected DOUBLE, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-graph.h:68: 
syntax error, unexpected DOUBLE, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-renderer.h:122:
 syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-renderer.h:124:
 syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-renderer.h:143:
 syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-renderer.h:144:
 syntax error, unexpected DOUBLE, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-renderer.h:144:
 syntax error, unexpected DOUBLE, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/gtk/go-marker-selector.h:29:
 syntax error, unexpected identifier, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/gtk/go-pattern-selector.h:29:
 syntax error, unexpected identifier, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/gtk/goffice-gtk.h:114:
 syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/gtk/goffice-gtk.h:115:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:126:
 syntax error, unexpected identifier
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:127:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:128:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:128:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:129:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:129:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:131:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:132:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:132:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:134:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:135:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:136:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:136:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:137:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:138:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:140:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:140:
 syntax error, unexpected CONST, expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:140:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:141:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:141:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:142:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:142:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:143:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:143:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:144:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:144:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:145:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:147:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:151:
 syntax error, unexpected typedef-name, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:152:
 syntax error, unexpected typedef-name, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:153:
 syntax error, unexpected '*', expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:156:
 syntax error, unexpected typedef-name, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:156:
 syntax error, unexpected ')', expecting ',' or ';'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:158:
 syntax error, unexpected CONST, expecting ')' or ','
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:158:
 syntax error, unexpected typedef-name, expecting identifier or '(' or '*'
/home/gnome/stable/INSTALL/include/libgoffice-0.8/goffice/graph/gog-style.h:158:
 syntax error, unexpected ')', expecting ',' or ';'
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: PluginServiceSimple
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GtkMenu
Unknown symbol: GtkHBox
Unknown symbol: GtkHBox
Unknown symbol: GtkAction
Unknown symbol: GtkAction
Unknown symbol: GtkAction
Unknown symbol: GtkAction
Unknown symbol: GOComboBox
Unknown symbol: GtkHBox
Unknown symbol: GObject
Unknown symbol: GtkVBox
Unknown symbol: GtkHBox
Unknown symbol: GtkHBox
Unknown symbol: GtkHBox
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GtkHBox
Unknown symbol: GtkObject
Unknown symbol: GtkLayout
Unknown symbol: GObject
Unknown symbol: GogText
Unknown symbol: GogText
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GtkLayout
Unknown symbol: GtkHBox
Unknown symbol: GtkButton
Unknown symbol: GtkHBox
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GObject
Unknown symbol: GtkDrawingArea
Unknown symbol: GObject

/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * go-doc.h :  A GOffice document
 *
 * Copyright (C) 2004-2006 Jody Goldberg ([email protected])
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
#ifndef GO_DOC_H
#define GO_DOC_H

#include <goffice/goffice.h>
#include <gsf/gsf.h>

G_BEGIN_DECLS

#define GO_TYPE_DOC	    (go_doc_get_type ())
#define GO_DOC(o)	    (G_TYPE_CHECK_INSTANCE_CAST ((o), GO_TYPE_DOC, GODoc))
#define GO_IS_DOC(o)	    (G_TYPE_CHECK_INSTANCE_TYPE ((o), GO_TYPE_DOC))

GType go_doc_get_type (void);

void     go_doc_set_pristine             (GODoc *doc, gboolean pristine);
gboolean go_doc_is_pristine		 (GODoc const *doc);
void	 go_doc_set_dirty		 (GODoc *doc, gboolean is_dirty);
gboolean go_doc_is_dirty		 (GODoc const *doc);

gboolean	 go_doc_set_uri		 (GODoc *doc, char const *uri);
char const	*go_doc_get_uri		 (GODoc const *doc);

GsfDocMetaData	*go_doc_get_meta_data	 (GODoc const *doc);
void		 go_doc_set_meta_data	 (GODoc *doc, GsfDocMetaData *data);
void		 go_doc_update_meta_data (GODoc *doc);

#if 0
GODoc   *go_doc_new_from_input  (GsfInput *input,
				 GODocImporter const *fmt,
				 GOIOContext *context,
				 gchar const *encoding);
GODoc   *go_doc_new_from_uri	(char const *uri,
				 GnmFileOpener const *fmt,
				 GOIOContext *context, 
				 gchar const *encoding);
gboolean go_doc_save		(GODoc *doc, GOIOContext *context);
gboolean go_doc_save_as		(GODoc *doc, GODocExporter *fmt, char const *uri,
				 GOIOContext *cc);
gboolean go_doc_sendto		(GODoc *doc, GOIOContext *cc);
#endif

/* put into GODoc (as properties) */

/* Images related functions */
GOImage		*go_doc_get_image	(GODoc *doc, char const *id);
GOImage		*go_doc_add_image	(GODoc *doc, char const *id, GOImage *image);
GHashTable	*go_doc_get_images	(GODoc *doc);
void		 go_doc_init_write	(GODoc *doc, GsfXMLOut *output);
void		 go_doc_write		(GODoc *doc, GsfXMLOut *output);
void		 go_doc_save_image	(GODoc *doc, char const *id);
void		 go_doc_init_read	(GODoc *doc, GsfInput *input);
void		 go_doc_read		(GODoc *doc, GsfXMLIn *xin, xmlChar const **attrs);
void		 go_doc_end_read	(GODoc *doc);
GOImage		*go_doc_image_fetch 	(GODoc *doc, char const *id);

G_END_DECLS

#endif /* GO_DOC_H */
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * gog-graph.h : 
 *
 * Copyright (C) 2003-2004 Jody Goldberg ([email protected])
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */
#ifndef GOG_GRAPH_H
#define GOG_GRAPH_H

#include <goffice/goffice.h>

#include <gsf/gsf.h>
#include <cairo.h>

G_BEGIN_DECLS

#define GOG_TYPE_GRAPH	(gog_graph_get_type ())
#define GOG_GRAPH(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_GRAPH, GogGraph))
#define GOG_IS_GRAPH(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_GRAPH))

GType gog_graph_get_type (void);

gboolean  gog_graph_validate_chart_layout (GogGraph *graph);
unsigned  gog_graph_num_cols	  (GogGraph const *graph);
unsigned  gog_graph_num_rows	  (GogGraph const *graph);

/* convenience wrappers */
GogGraph *gog_graph_dup	  	  (GogGraph const *graph);
GogTheme *gog_graph_get_theme	  (GogGraph const *graph);
void	  gog_graph_set_theme	  (GogGraph *graph, GogTheme *theme);

/* data management */
GSList   *gog_graph_get_data	  (GogGraph const *graph);

/* internal routines for use by series */
GOData   *gog_graph_ref_data   	  (GogGraph *graph, GOData *dat);
void      gog_graph_unref_data    (GogGraph *graph, GOData *dat);

void	  gog_graph_get_size 	  (GogGraph *graph, double *width, double *height);
void      gog_graph_set_size      (GogGraph *graph, double width, double height);

#define GOG_TYPE_GRAPH_VIEW	(gog_graph_view_get_type ())
#define GOG_GRAPH_VIEW(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_GRAPH_VIEW, GogGraphView))
#define GOG_IS_GRAPH_VIEW(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_GRAPH_VIEW))

GType gog_graph_view_get_type (void);

GogView *gog_graph_view_get_selection 	(GogGraphView *gview);
void 	 gog_graph_view_set_selection   (GogGraphView *gview, GogObject *gobj);


GSList 	 *gog_graph_get_supported_image_formats	(void);
gboolean  gog_graph_export_image 		(GogGraph *graph, GOImageFormat format,
						 GsfOutput *output, double x_dpi, double y_dpi);

#ifdef GOFFICE_WITH_GTK
#include <goffice/gtk/goffice-gtk.h>
void  	 gog_graph_view_handle_event 	(GogGraphView *gview, GdkEvent *event, double x_offset, double y_offset);
#endif

void 	 gog_graph_render_to_cairo 	(GogGraph *graph, cairo_t *cairo, double w, double h);

G_END_DECLS

#endif /* GOG_GRAPH_H */
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to