mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-22 20:53:44 +02:00
eeshow/gui/gui.c (eeschema_coord): only used in glabel.c, move there
This commit is contained in:
parent
23fed29423
commit
9792a22799
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 ----------------------------------------------------- */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user