summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/common.h1
-rw-r--r--gui/glabel.c17
-rw-r--r--gui/gui.c13
3 files changed, 17 insertions, 14 deletions
diff --git a/gui/common.h b/gui/common.h
index 9239c98..cb86c73 100644
--- a/gui/common.h
+++ b/gui/common.h
@@ -129,7 +129,6 @@ void show_history(struct gui_ctx *ctx, enum selecting sel);
/* gui.c */
void redraw(const struct gui_ctx *ctx);
-void eeschema_coord(const struct gui_ctx *ctx, int x, int y, int *rx, int *ry);
struct gui_sheet *find_corresponding_sheet(struct gui_sheet *pick_from,
struct gui_sheet *ref_in, const struct gui_sheet *ref);
void render_sheet(struct gui_sheet *sheet);
diff --git a/gui/glabel.c b/gui/glabel.c
index d99137b..4dc37d2 100644
--- a/gui/glabel.c
+++ b/gui/glabel.c
@@ -36,6 +36,23 @@ struct glabel_aoi_ctx {
};
+/* ----- Tools ------------------------------------------------------------- */
+
+
+static void eeschema_coord(const struct gui_ctx *ctx,
+ int x, int y, int *rx, int *ry)
+{
+ GtkAllocation alloc;
+
+ gtk_widget_get_allocation(ctx->da, &alloc);
+ *rx = ((x - ctx->x) >> ctx->zoom) + alloc.width / 2;
+ *ry = ((y - ctx->y) >> ctx->zoom) + alloc.height / 2;
+}
+
+
+/* ----- AoIs -------------------------------------------------------------- */
+
+
static void glabel_dest_click(void *user)
{
struct gui_sheet *sheet = user;
diff --git a/gui/gui.c b/gui/gui.c
index 196ebe0..dd35afe 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -196,19 +196,6 @@ void render_delta(struct gui_ctx *ctx)
}
-/* ----- Tools ------------------------------------------------------------- */
-
-
-void eeschema_coord(const struct gui_ctx *ctx, int x, int y, int *rx, int *ry)
-{
- GtkAllocation alloc;
-
- gtk_widget_get_allocation(ctx->da, &alloc);
- *rx = ((x - ctx->x) >> ctx->zoom) + alloc.width / 2;
- *ry = ((y - ctx->y) >> ctx->zoom) + alloc.height / 2;
-}
-
-
/* ----- AoI callbacks ----------------------------------------------------- */