[dia] [headers] reduce inclusion of lib headers in app headers
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [headers] reduce inclusion of lib headers in app headers
- Date: Sat, 18 Sep 2010 15:42:18 +0000 (UTC)
commit b7f36e2411154b8651293f1c2e9ac4d552171943
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 12 21:19:25 2010 +0200
[headers] reduce inclusion of lib headers in app headers
THere is some interface change upcoming and it will be
much easier with less leaked object information.
app/commands.c | 1 +
app/connectionpoint_ops.c | 2 ++
app/connectionpoint_ops.h | 2 +-
app/create_object.c | 1 +
app/create_object.h | 1 -
app/defaults.h | 3 +--
app/diagram.h | 5 -----
app/disp_callbacks.c | 1 +
app/handle_ops.c | 1 +
app/handle_ops.h | 2 +-
app/interface.c | 1 +
app/interface.h | 2 --
app/menus.c | 1 +
app/modify_tool.c | 4 +++-
app/modify_tool.h | 1 -
app/object_ops.c | 1 +
app/object_ops.h | 2 +-
app/preferences.c | 1 +
app/preferences.h | 1 +
app/properties-dialog.c | 1 +
app/properties-dialog.h | 2 +-
app/select.c | 1 +
app/tool.c | 1 +
app/undo.h | 1 -
lib/diatypes.h | 3 +++
lib/object.h | 3 ---
lib/parent.h | 1 +
27 files changed, 26 insertions(+), 20 deletions(-)
---
diff --git a/app/commands.c b/app/commands.c
index 9de950f..fdcb10e 100644
--- a/app/commands.c
+++ b/app/commands.c
@@ -82,6 +82,7 @@ ShellExecuteA (long hwnd,
#include "lib/parent.h"
#include "dia-props.h"
#include "authors.h" /* master contributors data */
+#include "object.h"
void
file_quit_callback (GtkAction *action)
diff --git a/app/connectionpoint_ops.c b/app/connectionpoint_ops.c
index a329bc0..9700ab9 100644
--- a/app/connectionpoint_ops.c
+++ b/app/connectionpoint_ops.c
@@ -22,6 +22,8 @@
#include "connectionpoint_ops.h"
#include "object_ops.h"
#include "color.h"
+#include "object.h"
+#include "connectionpoint.h"
static Color connectionpoint_color = { 0.4, 0.4, 1.0 };
diff --git a/app/connectionpoint_ops.h b/app/connectionpoint_ops.h
index 1dfce3b..2d4d131 100644
--- a/app/connectionpoint_ops.h
+++ b/app/connectionpoint_ops.h
@@ -18,7 +18,7 @@
#ifndef CONNECTIONPOINT_OPS_H
#define CONNECTIONPOINT_OPS_H
-#include "connectionpoint.h"
+#include "diatypes.h"
#include "diagram.h"
#include "display.h"
diff --git a/app/create_object.c b/app/create_object.c
index 9b80829..9bcf2b8 100644
--- a/app/create_object.c
+++ b/app/create_object.c
@@ -28,6 +28,7 @@
#include "textedit.h"
#include "parent.h"
#include "message.h"
+#include "object.h"
static void create_object_button_press(CreateObjectTool *tool, GdkEventButton *event,
DDisplay *ddisp);
diff --git a/app/create_object.h b/app/create_object.h
index f2ca4c9..9e3500f 100644
--- a/app/create_object.h
+++ b/app/create_object.h
@@ -19,7 +19,6 @@
#define CREATE_OBJECT_H
#include "geometry.h"
-#include "object.h"
#include "tool.h"
typedef struct _CreateObjectTool CreateObjectTool;
diff --git a/app/defaults.h b/app/defaults.h
index 4a87909..18cbf9d 100644
--- a/app/defaults.h
+++ b/app/defaults.h
@@ -18,8 +18,7 @@
#ifndef DEFAULTS_H
#define DEFAULTS_H
-#include "object.h"
-#include "diagram.h"
+#include "diatypes.h"
void defaults_show(DiaObjectType *obj, gpointer user_data);
diff --git a/app/diagram.h b/app/diagram.h
index 021adee..c48f7bb 100644
--- a/app/diagram.h
+++ b/app/diagram.h
@@ -23,12 +23,9 @@
typedef struct _Diagram Diagram;
#include "geometry.h"
-#include "handle.h"
-#include "connectionpoint.h"
#include "display.h"
#include "diagramdata.h"
#include "undo.h"
-#include "filter.h"
#include "menus.h"
#include "diagrid.h"
@@ -148,5 +145,3 @@ void diagram_redraw_all(void);
void diagram_object_modified(Diagram *dia, DiaObject *object);
#endif /* DIAGRAM_H */
-
-
diff --git a/app/disp_callbacks.c b/app/disp_callbacks.c
index 52f3d2e..e1b3e47 100644
--- a/app/disp_callbacks.c
+++ b/app/disp_callbacks.c
@@ -45,6 +45,7 @@
#include "textedit.h"
#include "lib/parent.h"
#include "dia_dirs.h"
+#include "object.h"
/* This contains the point that was clicked to get this menu */
static Point object_menu_clicked_point;
diff --git a/app/handle_ops.c b/app/handle_ops.c
index ce9aa56..439105f 100644
--- a/app/handle_ops.c
+++ b/app/handle_ops.c
@@ -18,6 +18,7 @@
#include <config.h>
#include "handle_ops.h"
+#include "handle.h"
#include "color.h"
/* This value is best left odd so that the handles are centered. */
diff --git a/app/handle_ops.h b/app/handle_ops.h
index b3a754f..54ffcf0 100644
--- a/app/handle_ops.h
+++ b/app/handle_ops.h
@@ -18,7 +18,7 @@
#ifndef HANDLE_OPS_H
#define HANDLE_OPS_H
-#include "handle.h"
+#include "diatypes.h"
#include "display.h"
void handle_draw(Handle *handle, DDisplay *ddisp);
diff --git a/app/interface.c b/app/interface.c
index dc51862..dd9cb0c 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -46,6 +46,7 @@
#include "dialinechooser.h"
#include "widgets.h"
#include "message.h"
+#include "attributes.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "dia-app-icons.h"
diff --git a/app/interface.h b/app/interface.h
index 5822d82..2017e5b 100644
--- a/app/interface.h
+++ b/app/interface.h
@@ -25,10 +25,8 @@
#include "tool.h"
#include "sheet.h"
#include "app_procs.h"
-#include "arrows.h"
#include "color_area.h"
#include "linewidth_area.h"
-#include "attributes.h"
/* Integrated UI Constants */
#define DIA_MAIN_WINDOW "dia-main-window"
diff --git a/app/menus.c b/app/menus.c
index c8be04e..ad3233c 100644
--- a/app/menus.c
+++ b/app/menus.c
@@ -41,6 +41,7 @@
#include "dia-app-icons.h"
#include "widgets.h"
#include "preferences.h"
+#include "filter.h"
#define DIA_STOCK_GROUP "dia-stock-group"
#define DIA_STOCK_UNGROUP "dia-stock-ungroup"
diff --git a/app/modify_tool.c b/app/modify_tool.c
index ed26224..ecc037b 100644
--- a/app/modify_tool.c
+++ b/app/modify_tool.c
@@ -20,6 +20,8 @@
#include <stdio.h>
#include <math.h>
+#include <gtk/gtk.h>
+
#include "modify_tool.h"
#include "handle_ops.h"
#include "object_ops.h"
@@ -36,7 +38,7 @@
#include "parent.h"
#include "diacanvas.h"
#include "prop_text.h"
-#include "gtk/gtk.h"
+#include "object.h"
static DiaObject *click_select_object(DDisplay *ddisp, Point *clickedpoint,
diff --git a/app/modify_tool.h b/app/modify_tool.h
index 1398414..6d333f5 100644
--- a/app/modify_tool.h
+++ b/app/modify_tool.h
@@ -20,7 +20,6 @@
#include "geometry.h"
#include "tool.h"
-#include "time.h"
typedef struct _ModifyTool ModifyTool;
diff --git a/app/object_ops.c b/app/object_ops.c
index 670fecd..906b82b 100644
--- a/app/object_ops.c
+++ b/app/object_ops.c
@@ -26,6 +26,7 @@
#include "connectionpoint_ops.h"
#include "handle_ops.h"
#include "message.h"
+#include "object.h"
#define OBJECT_CONNECT_DISTANCE 4.5
diff --git a/app/object_ops.h b/app/object_ops.h
index 93c7d6b..82a3cc7 100644
--- a/app/object_ops.h
+++ b/app/object_ops.h
@@ -18,7 +18,7 @@
#ifndef OBJECT_OPS_H
#define OBJECT_OPS_H
-#include "object.h"
+#include "diatypes.h"
#include "display.h"
#include "diagram.h"
diff --git a/app/preferences.c b/app/preferences.c
index c0bd73f..a56d6b5 100644
--- a/app/preferences.c
+++ b/app/preferences.c
@@ -41,6 +41,7 @@
#include "interface.h"
#include "lib/prefs.h"
#include "persistence.h"
+#include "filter.h"
#ifdef G_OS_WIN32
#include <io.h> /* open, close */
diff --git a/app/preferences.h b/app/preferences.h
index 82d6e60..e2ef6d3 100644
--- a/app/preferences.h
+++ b/app/preferences.h
@@ -18,6 +18,7 @@
#ifndef PREFERENCES_H
#define PREFERENCES_H
+#include "diatypes.h"
#include "diagramdata.h"
#define DEFAULT_GRID_COLOR { 0.85, .90, .90 }
diff --git a/app/properties-dialog.c b/app/properties-dialog.c
index 0a7dca3..bd2c8c4 100644
--- a/app/properties-dialog.c
+++ b/app/properties-dialog.c
@@ -26,6 +26,7 @@
#include "intl.h"
#include "properties-dialog.h"
#include "object_ops.h"
+#include "object.h"
#include "connectionpoint_ops.h"
#include "undo.h"
#include "message.h"
diff --git a/app/properties-dialog.h b/app/properties-dialog.h
index 13bd7ed..7246b41 100644
--- a/app/properties-dialog.h
+++ b/app/properties-dialog.h
@@ -18,7 +18,7 @@
#ifndef PROPERTIES_H
#define PROPERTIES_H
-#include "object.h"
+#include "diatypes.h"
#include "diagram.h"
void object_properties_show(Diagram *dia, DiaObject *obj);
diff --git a/app/select.c b/app/select.c
index fcff206..cdba9d4 100644
--- a/app/select.c
+++ b/app/select.c
@@ -26,6 +26,7 @@
#include "intl.h"
#include "object_ops.h"
#include "textedit.h"
+#include "object.h"
SelectionStyle selection_style = SELECT_REPLACE;
diff --git a/app/tool.c b/app/tool.c
index 13ac524..632bc1c 100644
--- a/app/tool.c
+++ b/app/tool.c
@@ -25,6 +25,7 @@
#include "textedit_tool.h"
#include "interface.h"
#include "defaults.h"
+#include "object.h"
Tool *active_tool = NULL;
Tool *transient_tool = NULL;
diff --git a/app/undo.h b/app/undo.h
index 4bb5d12..267dd36 100644
--- a/app/undo.h
+++ b/app/undo.h
@@ -23,7 +23,6 @@ typedef struct _UndoStack UndoStack;
typedef struct _Change Change;
#include "diagram.h"
-#include "objchange.h"
typedef void (*UndoApplyFunc)(Change *change, Diagram *dia);
typedef void (*UndoRevertFunc)(Change *change, Diagram *dia);
diff --git a/lib/diatypes.h b/lib/diatypes.h
index 93c16e8..24f1f78 100644
--- a/lib/diatypes.h
+++ b/lib/diatypes.h
@@ -194,4 +194,7 @@ typedef struct _DiaArrowSelectorClass DiaArrowSelectorClass;
typedef struct _DiaFileSelector DiaFileSelector;
typedef struct _DiaFileSelectorClass DiaFileSelectorClass;
+/** A standard definition of a function that takes a DiaObject */
+typedef void (*DiaObjectFunc) (const DiaObject *obj);
+
#endif
diff --git a/lib/object.h b/lib/object.h
index d2d5797..b23e40b 100644
--- a/lib/object.h
+++ b/lib/object.h
@@ -565,9 +565,6 @@ gboolean dia_object_is_selectable(DiaObject *obj);
/* The below are for debugging purposes only. */
gboolean dia_object_sanity_check(const DiaObject *obj, const gchar *msg);
-/** A standard definition of a function that takes a DiaObject */
-typedef void (*DiaObjectFunc) (const DiaObject *obj);
-
/** convenience functions for meta info */
void dia_object_set_meta (DiaObject *obj, const gchar *key, const gchar *value);
gchar *dia_object_get_meta (DiaObject *obj, const gchar *key);
diff --git a/lib/parent.h b/lib/parent.h
index f502b43..eebe749 100644
--- a/lib/parent.h
+++ b/lib/parent.h
@@ -20,6 +20,7 @@
#define PARENT_H
#include <glib.h>
+#include "diatypes.h"
#include "geometry.h"
GList *parent_list_affected(GList *obj_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]