summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-12-08 12:23:13 +0100
committerGuillaume Seguin <guillaume@segu.in>2007-12-08 12:23:13 +0100
commitcdceb3fcbd4eaece9750e7352d2a280293cece10 (patch)
tree93528fc3933a925ca4f653afc93cb1843ee60536
parent2dbc046935856377966b103beb27c39671701ccf (diff)
downloadgmathlib-cdceb3fcbd4eaece9750e7352d2a280293cece10.tar.gz
gmathlib-cdceb3fcbd4eaece9750e7352d2a280293cece10.tar.bz2
* Move definitions & prototypes to a separate private header
-rw-r--r--gmathview/gmathview.c30
-rw-r--r--gmathview/gmathview_internal.h61
2 files changed, 62 insertions, 29 deletions
diff --git a/gmathview/gmathview.c b/gmathview/gmathview.c
index d4d0a5a..84375cf 100644
--- a/gmathview/gmathview.c
+++ b/gmathview/gmathview.c
@@ -25,40 +25,12 @@
*/
#include <gmathview.h>
+#include "gmathview_internal.h"
#include <gdk/gdkkeysyms.h>
-#define G_MATH_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- G_TYPE_MATH_VIEW, GMathViewPrivate))
-
-struct _GMathViewPrivate
-{
- GMathBoxed *boxed;
- GMathFormula *formula;
- GMathContext *context;
- GMathCairoContext *cairo_context;
-
- GMathBoxed *current_boxed;
- GMathSelectionType selection_type;
-};
-
G_DEFINE_TYPE (GMathView, g_math_view, GTK_TYPE_DRAWING_AREA)
static void
-g_math_view_force_redraw (GMathView *mathview);
-
-static gboolean
-g_math_view_do_expose (GtkWidget *widget, GdkEventExpose *event);
-
-static gboolean
-g_math_view_do_destroy (GtkWidget *widget, GdkEventAny *event);
-
-static gboolean
-g_math_view_on_key_press (GtkWidget *widget, GdkEventKey *event);
-
-static gboolean
-g_math_view_on_button_press (GtkWidget *widget, GdkEventButton *event);
-
-static void
g_math_view_class_init (GMathViewClass *class)
{
GObjectClass *object_class;
diff --git a/gmathview/gmathview_internal.h b/gmathview/gmathview_internal.h
new file mode 100644
index 0000000..0e00243
--- /dev/null
+++ b/gmathview/gmathview_internal.h
@@ -0,0 +1,61 @@
+/*
+ * gMathView, mathematic expressions viewing & editing widget
+ *
+ * # Internal widget header
+ *
+ * Author : Guillaume Seguin
+ * Email : guillaume@segu.in
+ *
+ * Copyright (c) 2007 Guillaume Seguin <guillaume@segu.in>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * 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 Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GMATHVIEW_INTERNAL_H
+#define _GMATHVIEW_INTERNAL_H
+
+#include <gmathview.h>
+
+#define G_MATH_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
+ G_TYPE_MATH_VIEW, GMathViewPrivate))
+
+struct _GMathViewPrivate
+{
+ GMathBoxed *boxed;
+ GMathFormula *formula;
+ GMathContext *context;
+ GMathCairoContext *cairo_context;
+
+ GMathBoxed *current_boxed;
+ GMathSelectionType selection_type;
+};
+
+static void
+g_math_view_force_redraw (GMathView *mathview);
+
+static gboolean
+g_math_view_do_expose (GtkWidget *widget, GdkEventExpose *event);
+
+static gboolean
+g_math_view_do_destroy (GtkWidget *widget, GdkEventAny *event);
+
+static gboolean
+g_math_view_on_key_press (GtkWidget *widget, GdkEventKey *event);
+
+static gboolean
+g_math_view_on_button_press (GtkWidget *widget, GdkEventButton *event);
+
+#endif