diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-04-30 23:10:48 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-04-30 23:10:48 (GMT) |
commit | bec7fe8b2840838fe3a2620b8af29264d8b54e60 (patch) | |
tree | 321bc2e24a42b43a95f62d89a12f8192bce487c5 /src/gtkext/gtkviewpanel.c | |
parent | 55dbd294b0d740648bb1b63e6159e3aa9361a2e1 (diff) |
Fixed implicit declarations of functions causing crashes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@523 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/gtkviewpanel.c')
-rw-r--r-- | src/gtkext/gtkviewpanel.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/gtkext/gtkviewpanel.c b/src/gtkext/gtkviewpanel.c index 574bf22..03f6daa 100644 --- a/src/gtkext/gtkviewpanel.c +++ b/src/gtkext/gtkviewpanel.c @@ -961,3 +961,82 @@ void gtk_view_panel_cache_glance(GtkViewPanel *panel, cairo_t *cairo, const GtkA GTK_VIEW_PANEL_GET_CLASS(panel)->cache_glance(panel, cairo, area, scale); } + + + +/* ---------------------------------------------------------------------------------- */ +/* CONVERSIONS DE COORDONNEES */ +/* ---------------------------------------------------------------------------------- */ + + +/****************************************************************************** +* * +* Paramètres : panel = composant GTK à consulter. * +* event = informations liées à l'événement. * +* * +* Description : Transcrit les coordonnées à l'écran en coordonnées absolues. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_view_panel_compute_fake_coord(GtkViewPanel *panel, gint *x, gint *y) +{ + if (panel->hadjustment != NULL) + *x -= gtk_adjustment_get_value(panel->hadjustment); + + if (panel->vadjustment != NULL) + *y += gtk_adjustment_get_value(panel->vadjustment); + +} + + +/****************************************************************************** +* * +* Paramètres : panel = composant GTK à consulter. * +* event = informations liées à l'événement. * +* * +* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_view_panel_compute_real_coord(GtkViewPanel *panel, gint *x, gint *y) +{ + if (x != NULL && panel->hadjustment != NULL) + *x += gtk_adjustment_get_value(panel->hadjustment); + + if (y != NULL && panel->vadjustment != NULL) + *y += gtk_adjustment_get_value(panel->vadjustment); + +} + + +/****************************************************************************** +* * +* Paramètres : panel = composant GTK à consulter. * +* x = abscisse à ajuster. [OUT] * +* x = ordonnée à ajuster. [OUT] * +* * +* Description : Transcrit les coordonnées absolues en coordonnées à l'écran. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_view_panel_compute_relative_coords(GtkViewPanel *panel, gint *x, gint *y) +{ + if (x != NULL && panel->hadjustment != NULL) + *x -= gtk_adjustment_get_value(panel->hadjustment); + + if (y != NULL && panel->vadjustment != NULL) + *y -= gtk_adjustment_get_value(panel->vadjustment); + +} |