Commit 6acc58d0 authored by Morten Welinder's avatar Morten Welinder

Compilation: move all type forwards into one file.

parent ba4d1fa1
2013-03-26 Morten Welinder <terra@gnome.org>
* src/gnumeric-fwd.h: Merge most of gnumeric.h and gui-gnumeric.h
into here.
src/gui-gnumeric.h: Remove.
* src/pattern.c (gnumeric_background_set): Insist that ctxt is
non-NULL if there is a selection.
(gnumeric_background_set_gtk): Delete. Make callers use
......
......@@ -5,7 +5,7 @@
#include <glib.h>
#include <goffice/goffice.h>
#include "gnm-py-interpreter.h"
#include <gui-gnumeric.h>
#include <gnumeric-fwd.h>
void py_initgnumeric (GnmPyInterpreter *interpreter);
......
......@@ -240,6 +240,7 @@ libspreadsheet_include_HEADERS = \
gnm-sheet-slicer.h \
gnm-style-impl.h \
gnumeric.h \
gnumeric-fwd.h \
gnumeric-simple-canvas.h \
go-data-cache-source.h \
go-data-cache.h \
......@@ -252,7 +253,6 @@ libspreadsheet_include_HEADERS = \
gui-clipboard.h \
gui-file.h \
gui-util.h \
gui-gnumeric.h \
hlink.h \
hlink-impl.h \
history.h \
......
......@@ -26,7 +26,6 @@
#include "gnumeric.h"
#include "dialogs.h"
#include "gui-gnumeric.h"
#include "gui-util.h"
#include "dialogs/help.h"
#include "wbc-gtk.h"
......
......@@ -16,8 +16,7 @@
#ifndef GNUMERIC_DIALOG_STF_EXPORT_H
#define GNUMERIC_DIALOG_STF_EXPORT_H
#include "stf-export.h"
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
gboolean stf_export_dialog (WBCGtk *wbcg, GnmStfExport *stfe, Workbook *wb);
......
......@@ -16,7 +16,7 @@
#ifndef GNUMERIC_DIALOG_STF_PREVIEW_H
#define GNUMERIC_DIALOG_STF_PREVIEW_H
#include <gui-gnumeric.h>
#include <gnumeric-fwd.h>
#include <stf.h>
#include <gtk/gtk.h>
......
#ifndef GNUMERIC_DIALOGS_H
#define GNUMERIC_DIALOGS_H
#include "gui-gnumeric.h"
#include "gnumeric.h"
#include "consolidate.h"
#include <goffice/goffice.h>
......
......@@ -2,7 +2,7 @@
#ifndef _GNM_PANE_H_
# define _GNM_PANE_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <goffice/goffice.h>
G_BEGIN_DECLS
......
#ifndef _GNM_GNUMERIC_FWD_H_
#define _GNM_GNUMERIC_FWD_H_
#include <glib.h>
G_BEGIN_DECLS
typedef struct GnmScenario_ GnmScenario;
typedef struct GnmSolverConstraint_ GnmSolverConstraint;
typedef struct GnmSolverFactory_ GnmSolverFactory;
typedef struct GnmSolverParameters_ GnmSolverParameters;
typedef struct _ColRowCollection ColRowCollection;
typedef struct _ColRowIndexSet ColRowIndexSet;
typedef struct _ColRowInfo ColRowInfo;
typedef struct _ColRowSegment ColRowSegment;
typedef struct _GnmAction GnmAction;
typedef struct _GnmApp GnmApp;
typedef struct _GnmBorder GnmBorder;
typedef struct _GnmCell GnmCell;
typedef struct _GnmCellRef GnmCellRef; /* abs/rel point with sheet */
typedef struct _GnmCellRegion GnmCellRegion;
typedef struct _GnmColor GnmColor;
typedef struct _GnmComment GnmComment;
typedef struct _GnmConsolidate GnmConsolidate;
typedef struct _GnmConventions GnmConventions;
typedef struct _GnmConventionsOut GnmConventionsOut;
typedef struct _GnmDepContainer GnmDepContainer;
typedef struct _GnmDependent GnmDependent;
typedef struct _GnmEvalPos GnmEvalPos;
typedef struct _GnmExprArrayCorner GnmExprArrayCorner;
typedef struct _GnmExprArrayElem GnmExprArrayElem;
typedef struct _GnmExprBinary GnmExprBinary;
typedef struct _GnmExprCellRef GnmExprCellRef;
typedef struct _GnmExprConstant GnmExprConstant;
typedef struct _GnmExprFunction GnmExprFunction;
typedef struct _GnmExprName GnmExprName;
typedef struct _GnmExprRelocateInfo GnmExprRelocateInfo;
typedef struct _GnmExprSet GnmExprSet;
typedef struct _GnmExprSharer GnmExprSharer;
typedef struct _GnmExprTop GnmExprTop;
typedef struct _GnmExprUnary GnmExprUnary;
typedef struct _GnmFilter GnmFilter;
typedef struct _GnmFilterCondition GnmFilterCondition;
typedef struct _GnmFont GnmFont;
typedef struct _GnmFontMetrics GnmFontMetrics;
typedef struct _GnmFormatTemplate GnmFormatTemplate; /* does not really belong here */
typedef struct _GnmFunc GnmFunc;
typedef struct _GnmFuncDescriptor GnmFuncDescriptor;
typedef struct _GnmFuncEvalInfo GnmFuncEvalInfo;
typedef struct _GnmFuncGroup GnmFuncGroup;
typedef struct _GnmHLink GnmHLink;
typedef struct _GnmInputMsg GnmInputMsg;
typedef struct _GnmItemBar GnmItemBar;
typedef struct _GnmItemCursor GnmItemCursor;
typedef struct _GnmItemEdit GnmItemEdit;
typedef struct _GnmItemGrid GnmItemGrid;
typedef struct _GnmNamedExpr GnmNamedExpr;
typedef struct _GnmNamedExprCollection GnmNamedExprCollection;
typedef struct _GnmPane GnmPane;
typedef struct _GnmParseError GnmParseError;
typedef struct _GnmParsePos GnmParsePos;
typedef struct _GnmPasteTarget GnmPasteTarget;
typedef struct _GnmRangeRef GnmRangeRef; /* abs/rel range with sheet */
typedef struct _GnmRenderedRotatedValue GnmRenderedRotatedValue;
typedef struct _GnmRenderedValue GnmRenderedValue;
typedef struct _GnmRenderedValueCollection GnmRenderedValueCollection;
typedef struct _GnmSearchReplace GnmSearchReplace;
typedef struct _GnmSheetSize GnmSheetSize;
typedef struct _GnmSheetSlicer GnmSheetSlicer;
typedef struct _GnmSheetStyleData GnmSheetStyleData;
typedef struct _GnmSortData GnmSortData;
typedef struct _GnmStfExport GnmStfExport;
typedef struct _GnmStyle GnmStyle;
typedef struct _GnmStyleConditions GnmStyleConditions;
typedef struct _GnmStyleRegion GnmStyleRegion;
typedef struct _GnmStyleRow GnmStyleRow;
typedef struct _GnmValidation GnmValidation;
typedef struct _GnmValueArray GnmValueArray;
typedef struct _GnmValueBool GnmValueBool;
typedef struct _GnmValueErr GnmValueErr;
typedef struct _GnmValueFloat GnmValueFloat;
typedef struct _GnmValueRange GnmValueRange;
typedef struct _GnmValueStr GnmValueStr;
typedef struct _PrintInformation PrintInformation;
typedef struct _Sheet Sheet;
typedef struct _SheetControl SheetControl;
typedef struct _SheetControlGUI SheetControlGUI;
typedef struct _SheetObject SheetObject;
typedef struct _SheetObjectAnchor SheetObjectAnchor;
typedef struct _SheetObjectExportable SheetObjectExportable;
typedef struct _SheetObjectImageable SheetObjectImageable;
typedef struct _SheetObjectView SheetObjectView;
typedef struct _SheetObjectViewContainer SheetObjectViewContainer;
typedef struct _SheetView SheetView;
typedef struct _WBCGtk WBCGtk;
typedef struct _Workbook Workbook;
typedef struct _WorkbookControl WorkbookControl;
typedef struct _WorkbookControlComponent WorkbookControlComponent;
typedef struct _WorkbookSheetState WorkbookSheetState;
typedef struct _WorkbookView WorkbookView;
typedef union _GnmExpr GnmExpr;
typedef union _GnmValue GnmValue;
typedef GList ColRowIndexList;
typedef GSList ColRowStateGroup;
typedef GSList ColRowStateList;
typedef GSList ColRowVisList;
typedef GSList GnmExprList;
typedef GSList GnmStyleList;
typedef GnmExpr const * GnmExprConstPtr;
G_END_DECLS
#endif
......@@ -2,7 +2,7 @@
#ifndef _GNM_SIMPLE_CANVAS_H_
# define _GNM_SIMPLE_CANVAS_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <goffice/goffice.h>
G_BEGIN_DECLS
......
......@@ -4,6 +4,7 @@
#include <glib.h>
#include <goffice/goffice.h>
#include <gnumeric-fwd.h>
G_BEGIN_DECLS
......@@ -23,12 +24,6 @@ G_BEGIN_DECLS
* Note: more than 364238 columns will introduce a column named TRUE.
*/
typedef struct _GnmApp GnmApp;
typedef struct _Workbook Workbook;
typedef struct _WorkbookView WorkbookView;
typedef struct _WorkbookControl WorkbookControl;
typedef struct _WorkbookSheetState WorkbookSheetState;
typedef enum {
GNM_SHEET_VISIBILITY_VISIBLE,
GNM_SHEET_VISIBILITY_HIDDEN,
......@@ -40,30 +35,6 @@ typedef enum {
GNM_SHEET_XLM
} GnmSheetType;
typedef struct _Sheet Sheet;
typedef struct _SheetView SheetView;
typedef struct _SheetControl SheetControl;
typedef struct _SheetObject SheetObject;
typedef struct _SheetObjectAnchor SheetObjectAnchor;
typedef struct _SheetObjectView SheetObjectView;
typedef struct _SheetObjectViewContainer SheetObjectViewContainer;
typedef struct _SheetObjectImageable SheetObjectImageable;
typedef struct _SheetObjectExportable SheetObjectExportable;
typedef struct _GnmDepContainer GnmDepContainer;
typedef struct _GnmDependent GnmDependent;
typedef struct _GnmCell GnmCell;
typedef struct _GnmComment GnmComment;
typedef union _GnmValue GnmValue;
typedef struct _GnmValueBool GnmValueBool;
typedef struct _GnmValueFloat GnmValueFloat;
typedef struct _GnmValueErr GnmValueErr;
typedef struct _GnmValueStr GnmValueStr;
typedef struct _GnmValueRange GnmValueRange;
typedef struct _GnmValueArray GnmValueArray;
typedef enum {
GNM_ERROR_NULL,
GNM_ERROR_DIV0,
......@@ -75,55 +46,6 @@ typedef enum {
GNM_ERROR_UNKNOWN
} GnmStdError;
typedef struct _GnmRenderedValue GnmRenderedValue;
typedef struct _GnmRenderedRotatedValue GnmRenderedRotatedValue;
typedef struct _GnmRenderedValueCollection GnmRenderedValueCollection;
typedef GSList GnmExprList;
typedef union _GnmExpr GnmExpr;
typedef struct _GnmExprConstant GnmExprConstant;
typedef struct _GnmExprFunction GnmExprFunction;
typedef struct _GnmExprUnary GnmExprUnary;
typedef struct _GnmExprBinary GnmExprBinary;
typedef struct _GnmExprName GnmExprName;
typedef struct _GnmExprCellRef GnmExprCellRef;
typedef struct _GnmExprArrayCorner GnmExprArrayCorner;
typedef struct _GnmExprArrayElem GnmExprArrayElem;
typedef struct _GnmExprSet GnmExprSet;
typedef GnmExpr const * GnmExprConstPtr;
typedef struct _GnmExprTop GnmExprTop;
typedef struct _GnmExprSharer GnmExprSharer;
typedef struct _GnmExprRelocateInfo GnmExprRelocateInfo;
typedef struct _GnmNamedExpr GnmNamedExpr;
typedef struct _GnmNamedExprCollection GnmNamedExprCollection;
typedef struct _GnmPasteTarget GnmPasteTarget;
typedef struct _GnmCellRegion GnmCellRegion;
typedef struct _ColRowInfo ColRowInfo;
typedef struct _ColRowCollection ColRowCollection;
typedef struct _ColRowSegment ColRowSegment;
typedef GSList ColRowVisList;
typedef GSList ColRowStateGroup;
typedef GSList ColRowStateList;
typedef GList ColRowIndexList;
typedef struct _ColRowIndexSet ColRowIndexSet;
typedef struct _GnmFont GnmFont;
typedef struct _GnmFontMetrics GnmFontMetrics;
typedef struct _GnmColor GnmColor;
typedef struct _GnmBorder GnmBorder;
typedef struct _GnmStyle GnmStyle;
typedef struct _GnmStyleRow GnmStyleRow;
typedef GSList GnmStyleList;
typedef struct _GnmStyleRegion GnmStyleRegion;
typedef struct _GnmStyleConditions GnmStyleConditions;
typedef struct _GnmSheetStyleData GnmSheetStyleData;
typedef struct _GnmFormatTemplate GnmFormatTemplate; /* does not really belong here */
typedef struct {
int col, row; /* these must be int not unsigned in some places (eg SUMIF ) */
} GnmCellPos;
......@@ -134,19 +56,6 @@ typedef struct {
Sheet *sheet;
GnmRange range;
} GnmSheetRange;
typedef struct _GnmCellRef GnmCellRef; /* abs/rel point with sheet */
typedef struct _GnmRangeRef GnmRangeRef; /* abs/rel range with sheet */
typedef struct _GnmEvalPos GnmEvalPos;
typedef struct _GnmParsePos GnmParsePos;
typedef struct _GnmSheetSize GnmSheetSize;
typedef struct _GnmParseError GnmParseError;
typedef struct _GnmConventions GnmConventions;
typedef struct _GnmConventionsOut GnmConventionsOut;
typedef struct _GnmFuncEvalInfo GnmFuncEvalInfo;
typedef struct _GnmFunc GnmFunc;
typedef struct _GnmFuncGroup GnmFuncGroup;
typedef struct _GnmFuncDescriptor GnmFuncDescriptor;
typedef struct _GnmAction GnmAction;
typedef enum {
CELL_ITER_ALL = 0,
......@@ -179,26 +88,6 @@ typedef enum {
GNM_EXPR_EVAL_ARRAY_CONTEXT = 0x8
} GnmExprEvalFlags;
typedef struct _XmlParseContext XmlParseContext;
typedef struct _GnmSortData GnmSortData;
typedef struct _GnmSearchReplace GnmSearchReplace;
typedef struct _GnmConsolidate GnmConsolidate;
typedef struct _GnmValidation GnmValidation;
typedef struct _GnmFilter GnmFilter;
typedef struct _GnmFilterCondition GnmFilterCondition;
typedef struct _GnmHLink GnmHLink;
typedef struct _GnmInputMsg GnmInputMsg;
typedef struct _GnmSheetSlicer GnmSheetSlicer;
typedef struct _PrintInformation PrintInformation;
typedef struct GnmSolverParameters_ GnmSolverParameters;
typedef struct GnmSolverConstraint_ GnmSolverConstraint;
typedef struct GnmSolverFactory_ GnmSolverFactory;
typedef struct GnmScenario_ GnmScenario;
G_END_DECLS
#endif /* _GNM_GNUMERIC_H_ */
......@@ -2,7 +2,7 @@
#ifndef _GNM_GUI_CLIPBOARD_H_
# define _GNM_GUI_CLIPBOARD_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
G_BEGIN_DECLS
......
......@@ -2,7 +2,7 @@
#ifndef _GNM_GUI_FILE_H_
# define _GNM_GUI_FILE_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
G_BEGIN_DECLS
......
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _GNM_GUI_GNUMERIC_H_
# define _GNM_GUI_GNUMERIC_H_
#include "gnumeric.h"
G_BEGIN_DECLS
typedef struct _GnmItemCursor GnmItemCursor;
typedef struct _GnmItemGrid GnmItemGrid;
typedef struct _GnmItemBar GnmItemBar;
typedef struct _GnmItemEdit GnmItemEdit;
typedef struct _GnmPane GnmPane;
typedef struct _SheetControlGUI SheetControlGUI;
typedef struct _WBCGtk WBCGtk;
typedef struct _WorkbookControlComponent WorkbookControlComponent;
G_END_DECLS
#endif /* _GNM_GUI_GNUMERIC_H_ */
......@@ -2,7 +2,7 @@
#ifndef _GNM_GUI_UTIL_H_
# define _GNM_GUI_UTIL_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <goffice/goffice.h>
#include "numbers.h"
#include <gtk/gtk.h>
......
......@@ -2,7 +2,7 @@
# define _GNM_IO_CONTEXT_GTK_H_
#include <stdarg.h>
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <gtk/gtk.h>
#include <goffice/goffice.h>
......
#ifndef _GNM_ITEM_BAR_H_
#define _GNM_ITEM_BAR_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <glib-object.h>
#include <pango/pango-font.h>
......
#ifndef _GNM_ITEM_CURSOR_H_
#define _GNM_ITEM_CURSOR_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <glib-object.h>
G_BEGIN_DECLS
......
#ifndef _GNM_ITEM_EDIT_H_
#define _GNM_ITEM_EDIT_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <glib-object.h>
G_BEGIN_DECLS
......
......@@ -2,7 +2,7 @@
#ifndef _GNM_ITEM_GRID_H_
#define _GNM_ITEM_GRID_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <glib-object.h>
G_BEGIN_DECLS
......
......@@ -174,8 +174,7 @@ static void
preview_grid_draw_background (cairo_t *cr, GnmPreviewGrid const *pg, GnmStyle const *mstyle,
int col, int row, int x, int y, int w, int h)
{
GtkStyleContext *context = goc_item_get_style_context (GOC_ITEM (pg));
if (gnumeric_background_set (mstyle, cr, FALSE, context)) {
if (gnumeric_background_set (mstyle, cr, FALSE, NULL)) {
cairo_rectangle (cr, x, y, w+1, h+1);
cairo_fill (cr);
}
......@@ -359,10 +358,7 @@ preview_grid_dispose (GObject *obj)
value_release (pg->defaults.value);
pg->defaults.value = NULL;
if (pg->sheet) {
g_object_unref (pg->sheet);
pg->sheet = NULL;
}
g_clear_object (&pg->sheet);
G_OBJECT_CLASS (parent_klass)->dispose (obj);
}
......
......@@ -248,7 +248,7 @@ print_merged_range_gtk (cairo_t *context,
style = g_ptr_array_index (style->cond_styles, res);
}
if (gnumeric_background_set_gtk (style, context, FALSE, NULL))
if (gnumeric_background_set (style, context, FALSE, NULL))
print_rectangle_gtk (context, l, t, r-l+0.2, b-t+0.2);
if (range->start.col < view->start.col)
......
......@@ -2,7 +2,7 @@
#ifndef _GNM_SHEET_CONTROL_GUI_H_
# define _GNM_SHEET_CONTROL_GUI_H_
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include "sheet-control.h"
#include <gtk/gtk.h>
......
......@@ -24,7 +24,7 @@
#define _GNM_SHEET_OBJECT_COMPONENT_H_
#include "sheet-object.h"
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <goffice/component/go-component.h>
G_BEGIN_DECLS
......
......@@ -3,7 +3,7 @@
# define _GNM_SHEET_OBJECT_GRAPH_H_
#include "sheet-object.h"
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <goffice/goffice.h>
G_BEGIN_DECLS
......
......@@ -27,7 +27,6 @@ typedef enum {
GType gnm_stf_format_mode_get_type (void);
#define GNM_STF_FORMAT_MODE_TYPE (gnm_stf_format_mode_get_type ())
typedef struct _GnmStfExport GnmStfExport;
GType gnm_stf_export_get_type (void);
void gnm_stf_export_options_sheet_list_clear (GnmStfExport *stfe);
......
......@@ -25,6 +25,7 @@
#include <glib/gi18n-lib.h>
#include "gnumeric.h"
#include "stf.h"
#include "stf-export.h"
#include <goffice/goffice.h>
#include "cell.h"
......
......@@ -3,7 +3,7 @@
# define _GNM_WBC_GTK_H_
#include "gnumeric.h"
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include "workbook-control.h"
#include "widgets/gnumeric-expr-entry.h"
......
#ifndef GNM_CELL_COMBO_VIEW_IMPL_H
#define GNM_CELL_COMBO_VIEW_IMPL_H
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include "sheet-object-impl.h"
#include <gtk/gtk.h>
......
......@@ -21,7 +21,7 @@
#ifndef __GNM_DAO_H__
#define __GNM_DAO_H__
#include <gui-gnumeric.h>
#include <gnumeric-fwd.h>
#include <gui-util.h>
#include <tools/dao.h>
......
......@@ -25,7 +25,7 @@
#include "gnm-filter-combo-view.h"
#include "gnm-cell-combo-view-impl.h"
#include "gui-gnumeric.h"
#include "gnumeric.h"
#include "sheet-filter.h"
#include "sheet-filter-combo.h"
#include "gnm-format.h"
......
......@@ -31,7 +31,7 @@
#include "sheet-view.h"
#include "value.h"
#include "gui-gnumeric.h"
#include "gnumeric.h"
#include "go-data-slicer-field.h"
#include "go-data-cache-field.h"
#include <goffice/goffice.h>
......
......@@ -39,7 +39,7 @@
#include "expr.h"
#include "value.h"
#include "gui-gnumeric.h"
#include "gnumeric.h"
#include <goffice/goffice.h>
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtk.h>
......
......@@ -21,7 +21,7 @@
#include "gnumeric-cell-renderer-text.h"
#include "gnumeric-expr-entry.h"
#include <gui-gnumeric.h>
#include <gnumeric-fwd.h>
G_BEGIN_DECLS
......
#ifndef GNUMERIC_EXPR_ENTRY_H
#define GNUMERIC_EXPR_ENTRY_H
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include "parse-util.h"
#include <gtk/gtk.h>
......
......@@ -22,7 +22,7 @@
#ifndef GNUMERIC_TEXT_VIEW_H
#define GNUMERIC_TEXT_VIEW_H
#include "gui-gnumeric.h"
#include "gnumeric-fwd.h"
#include <gtk/gtk.h>
#define GNM_TEXT_VIEW_TYPE (gnm_text_view_get_type ())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment