Commit c95e038e authored by Morten Welinder's avatar Morten Welinder

Introspection fixes.

Don't define class as typedefs of their parent class.  While that works,
it makes introspection (and gcc for that matter) see them as identical.
parent bc61e8b9
......@@ -10,7 +10,10 @@ typedef struct {
SheetView *sv;
} GnmCellCombo;
typedef SheetObjectClass GnmCellComboClass;
typedef struct {
SheetObjectClass parent_class;
} GnmCellComboClass;
#define GNM_CELL_COMBO_TYPE (gnm_cell_combo_get_type ())
#define GNM_CELL_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNM_CELL_COMBO_TYPE, GnmCellCombo))
......
......@@ -67,7 +67,10 @@ struct _SheetControlGUI {
SCGUIMoveFunc handler;
} delayedMovement;
};
typedef SheetControlClass SheetControlGUIClass;
typedef struct {
SheetControlClass parent_class;
} SheetControlGUIClass;
/* SCG virtual methods called directly from the GUI layer*/
void scg_adjust_preferences (SheetControlGUI *scg);
......
......@@ -6,8 +6,13 @@
G_BEGIN_DECLS
typedef SheetObjectView SOWidgetView;
typedef SheetObjectViewClass SOWidgetViewClass;
typedef struct {
SheetObjectView parent;
} SOWidgetView;
typedef struct {
SheetObjectViewClass parent_class;
} SOWidgetViewClass;
G_END_DECLS
......
......@@ -63,7 +63,9 @@ struct _SheetView {
guint auto_expr_timer;
};
typedef GObjectClass SheetViewClass;
typedef struct {
GObjectClass parent_class;
} SheetViewClass;
#define GNM_SHEET_VIEW_TYPE (gnm_sheet_view_get_type ())
#define GNM_SHEET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_SHEET_VIEW_TYPE, SheetView))
......
......@@ -18,7 +18,7 @@ static GocItemClass *parent_class;
static void gnumeric_dashed_canvas_line_draw (GocItem const *item,
cairo_t *cr);
static GnumericDashedCanvasLineClass *gnumeric_dashed_canvas_line_class;
static GnmDashedCanvasLineClass *gnumeric_dashed_canvas_line_class;
static inline double
hypothenuse (double xlength, double ylength)
......@@ -142,7 +142,7 @@ double_line_draw (GocItem const *item, GnmStyleBorderType const i, cairo_t *cr)
static void
gnumeric_dashed_canvas_line_draw (GocItem const *item, cairo_t *cr)
{
GnumericDashedCanvasLine *line = GNM_DASHED_CANVAS_LINE (item);
GnmDashedCanvasLine *line = GNM_DASHED_CANVAS_LINE (item);
if (line->dash_style_index == GNM_STYLE_BORDER_DOUBLE)
double_line_draw (item, line->dash_style_index, cr);
......@@ -162,7 +162,7 @@ gnumeric_dashed_canvas_line_update_bounds (GocItem *item)
}
static void
gnumeric_dashed_canvas_line_class_init (GnumericDashedCanvasLineClass *klass)
gnumeric_dashed_canvas_line_class_init (GnmDashedCanvasLineClass *klass)
{
GocItemClass *item_class;
......@@ -176,17 +176,17 @@ gnumeric_dashed_canvas_line_class_init (GnumericDashedCanvasLineClass *klass)
}
static void
gnumeric_dashed_canvas_line_init (GnumericDashedCanvasLine *line)
gnumeric_dashed_canvas_line_init (GnmDashedCanvasLine *line)
{
line->dash_style_index = GNM_STYLE_BORDER_THIN;
}
GSF_CLASS (GnumericDashedCanvasLine, gnumeric_dashed_canvas_line,
GSF_CLASS (GnmDashedCanvasLine, gnumeric_dashed_canvas_line,
gnumeric_dashed_canvas_line_class_init,
gnumeric_dashed_canvas_line_init, GOC_TYPE_LINE)
void
gnumeric_dashed_canvas_line_set_dash_index (GnumericDashedCanvasLine *line,
gnumeric_dashed_canvas_line_set_dash_index (GnmDashedCanvasLine *line,
GnmStyleBorderType const indx)
{
gint const width = gnm_style_border_get_width (indx);
......
......@@ -8,22 +8,25 @@
#define GNM_DASHED_CANVAS_LINE_TYPE\
(gnumeric_dashed_canvas_line_get_type ())
#define GNM_DASHED_CANVAS_LINE(obj)\
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_DASHED_CANVAS_LINE_TYPE, GnumericDashedCanvasLine))
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GNM_DASHED_CANVAS_LINE_TYPE, GnmDashedCanvasLine))
#define GNM_IS_DASHED_CANVAS_LINE(obj)\
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNM_DASHED_CANVAS_LINE_TYPE))
typedef struct _GnumericDashedCanvasLine GnumericDashedCanvasLine;
typedef GocLineClass GnumericDashedCanvasLineClass;
typedef struct GnmDashedCanvasLine_ GnmDashedCanvasLine;
struct _GnumericDashedCanvasLine {
typedef struct {
GocLineClass parent_class;
} GnmDashedCanvasLineClass;
struct GnmDashedCanvasLine_ {
GocLine line;
/* Public : */
GnmStyleBorderType dash_style_index;
};
void gnumeric_dashed_canvas_line_set_dash_index (GnumericDashedCanvasLine *line,
void gnumeric_dashed_canvas_line_set_dash_index (GnmDashedCanvasLine *line,
GnmStyleBorderType const indx);
/* Standard Gtk function */
......
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