[dia] [restructuring] more local type declaration
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [restructuring] more local type declaration
- Date: Sun, 2 Sep 2012 18:08:32 +0000 (UTC)
commit 555653cbbe12b4f6ec226ade18e69af825831821
Author: Hans Breuer <hans breuer org>
Date: Sun Aug 19 20:14:14 2012 +0200
[restructuring] more local type declaration
move _MagnifyTool and _ModifyTool from header to .c file.
The structs internals were not used anywhere outside of
the implementation files and have to change for gtk-3-0.
app/magnify.c | 11 +++++++++++
app/magnify.h | 13 -------------
app/modify_tool.c | 22 ++++++++++++++++++++++
app/modify_tool.h | 24 ------------------------
4 files changed, 33 insertions(+), 37 deletions(-)
---
diff --git a/app/magnify.c b/app/magnify.c
index 38bd6bb..c47affb 100644
--- a/app/magnify.c
+++ b/app/magnify.c
@@ -22,6 +22,17 @@
#include "magnify.h"
#include "cursor.h"
+struct _MagnifyTool {
+ Tool tool;
+ GdkGC *gc;
+ int box_active;
+ int moved;
+ int x, y;
+ int oldx, oldy;
+
+ gboolean zoom_out;
+};
+
static void
magnify_button_press(MagnifyTool *tool, GdkEventButton *event,
DDisplay *ddisp)
diff --git a/app/magnify.h b/app/magnify.h
index b6fabda..6e218a0 100644
--- a/app/magnify.h
+++ b/app/magnify.h
@@ -22,19 +22,6 @@
typedef struct _MagnifyTool MagnifyTool;
-struct _MagnifyTool {
- Tool tool;
-
- GdkGC *gc;
-
- int box_active;
- int moved;
- int x, y;
- int oldx, oldy;
-
- gboolean zoom_out;
-};
-
Tool *create_magnify_tool(void);
void free_magnify_tool(Tool *tool);
void set_zoom_out(Tool *tool);
diff --git a/app/modify_tool.c b/app/modify_tool.c
index e3f170b..9b7643d 100644
--- a/app/modify_tool.c
+++ b/app/modify_tool.c
@@ -61,6 +61,28 @@ static void modify_make_text_edit(DDisplay *ddisp, DiaObject *obj,
static void modify_start_text_edit(DDisplay *ddisp, Text *text, DiaObject *obj,
Point *clickedpoint);
+struct _ModifyTool {
+ Tool tool;
+
+ enum ModifyToolState state;
+ int break_connections;
+ Point move_compensate;
+ DiaObject *object;
+ Handle *handle;
+ Point last_to;
+ Point start_at;
+ time_t start_time;
+ GdkGC *gc;
+ int x1, y1, x2, y2;
+ Point start_box;
+ Point end_box;
+
+ gboolean auto_scrolled; /* TRUE if the diagram auto scrolled last time
+ modify_motion was called */
+ /* Undo info: */
+ Point *orig_pos;
+};
+
Tool *
create_modify_tool(void)
diff --git a/app/modify_tool.h b/app/modify_tool.h
index 6d333f5..7b85442 100644
--- a/app/modify_tool.h
+++ b/app/modify_tool.h
@@ -30,30 +30,6 @@ enum ModifyToolState {
STATE_BOX_SELECT
};
-struct _ModifyTool {
- Tool tool;
-
- enum ModifyToolState state;
- int break_connections;
- Point move_compensate;
- DiaObject *object;
- Handle *handle;
- Point last_to;
- Point start_at;
- time_t start_time;
-
- GdkGC *gc;
-
- int x1, y1, x2, y2;
- Point start_box;
- Point end_box;
-
- gboolean auto_scrolled; /* TRUE if the diagram auto scrolled last time
- modify_motion was called */
- /* Undo info: */
- Point *orig_pos;
-};
-
Tool *create_modify_tool(void);
void free_modify_tool(Tool *tool);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]