[dia] Less circular header dependencies in app/ and lib/
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Less circular header dependencies in app/ and lib/
- Date: Wed, 6 Oct 2010 22:00:39 +0000 (UTC)
commit 4d4c862b751f7f9b0e60e7e11d1c1a9eee23f757
Author: Hans Breuer <hans breuer org>
Date: Wed Oct 6 22:47:01 2010 +0200
Less circular header dependencies in app/ and lib/
Moving some stuff around was enough to remove some circles, but not all.
app/diagram.h | 5 +----
app/display.h | 3 +++
app/load_save.c | 1 +
app/pagesetup.c | 1 +
lib/paper.c | 1 +
lib/paper.h | 3 ---
6 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/diagram.h b/app/diagram.h
index c48f7bb..bf2e066 100644
--- a/app/diagram.h
+++ b/app/diagram.h
@@ -18,12 +18,11 @@
#ifndef DIAGRAM_H
#define DIAGRAM_H
-#include <gtk/gtk.h>
+#include <glib.h>
typedef struct _Diagram Diagram;
#include "geometry.h"
-#include "display.h"
#include "diagramdata.h"
#include "undo.h"
#include "menus.h"
@@ -85,8 +84,6 @@ void diagram_destroy(Diagram *dia);
gboolean diagram_is_modified(Diagram *dia);
void diagram_modified(Diagram *dia);
void diagram_set_modified(Diagram *dia, int modified);
-void diagram_add_ddisplay(Diagram *dia, DDisplay *ddisp);
-void diagram_remove_ddisplay(Diagram *dia, DDisplay *ddisp);
void diagram_add_object(Diagram *dia, DiaObject *obj);
void diagram_add_object_list(Diagram *dia, GList *list);
void diagram_selected_break_external(Diagram *dia);
diff --git a/app/display.h b/app/display.h
index 19b38bf..a91088f 100644
--- a/app/display.h
+++ b/app/display.h
@@ -187,4 +187,7 @@ void ddisplay_im_context_preedit_reset(DDisplay *ddisp, Focus *focus);
Focus *ddisplay_active_focus(DDisplay *ddisp);
void ddisplay_set_active_focus(DDisplay *ddisp, Focus *focus);
+void diagram_add_ddisplay(Diagram *dia, DDisplay *ddisp);
+void diagram_remove_ddisplay(Diagram *dia, DDisplay *ddisp);
+
#endif /* DDISPLAY_H */
diff --git a/app/load_save.c b/app/load_save.c
index 17ecaa3..dd52e45 100644
--- a/app/load_save.c
+++ b/app/load_save.c
@@ -54,6 +54,7 @@
#include "diapagelayout.h"
#include "autosave.h"
#include "newgroup.h"
+#include "display.h"
#ifdef G_OS_WIN32
#include <io.h>
diff --git a/app/pagesetup.c b/app/pagesetup.c
index efdfc3f..02f0abb 100644
--- a/app/pagesetup.c
+++ b/app/pagesetup.c
@@ -30,6 +30,7 @@
#include "pagesetup.h"
#include "intl.h"
#include "diapagelayout.h"
+#include "display.h"
typedef struct _PageSetup PageSetup;
struct _PageSetup {
diff --git a/lib/paper.c b/lib/paper.c
index 4d67778..b9ccf0a 100644
--- a/lib/paper.c
+++ b/lib/paper.c
@@ -22,6 +22,7 @@
#include <string.h>
#include "paper.h"
+#include "diagramdata.h" /* for NewDiagramData */
/* Paper definitions stolen from gnome-libs.
* All measurements are in centimetres. */
diff --git a/lib/paper.h b/lib/paper.h
index 0542f91..5c65cf1 100644
--- a/lib/paper.h
+++ b/lib/paper.h
@@ -35,9 +35,6 @@ struct _PaperInfo {
* size is width*scaling, height*scaling */
};
-/* DiagramData uses PaperInfo as a non-pointer, so we need to know the size */
-#include <diagramdata.h>
-
int find_paper(const gchar* name);
int get_default_paper(void);
void get_paper_info(PaperInfo *paper, int i, NewDiagramData *data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]