diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2015-01-25 11:53:49 +0000 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2015-01-31 23:08:17 +0000 |
commit | 404e2753c4f63c5a71b65f5270317f21be77a5fe (patch) | |
tree | bd9468804f84bb49a5150623d176ae9cc1537a14 /tests/testscrolledge.c | |
parent | 48a41b01196febe124eb29c8d8ba8a996935adaa (diff) | |
download | gtk+-404e2753c4f63c5a71b65f5270317f21be77a5fe.tar.gz |
scrolledwindow: add a new edge-reached signal
This will be used to just detect when an edge of the scrollable area is
reached - as opposed to the edge-overshot signal that is emitted when
the user scrolls past the edge.
https://bugzilla.gnome.org/show_bug.cgi?id=742848
Diffstat (limited to 'tests/testscrolledge.c')
-rw-r--r-- | tests/testscrolledge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/testscrolledge.c b/tests/testscrolledge.c index c92402df58..094d3764c6 100644 --- a/tests/testscrolledge.c +++ b/tests/testscrolledge.c @@ -80,6 +80,14 @@ edge_overshot (GtkScrolledWindow *sw, } } +static void +edge_reached (GtkScrolledWindow *sw, + GtkPositionType pos, + GtkListBox *list) +{ + g_print ("Reached the edge at pos %d!\n", pos); +} + int main (int argc, char *argv[]) { @@ -120,6 +128,7 @@ main (int argc, char *argv[]) populate_list (GTK_LIST_BOX (list)); g_signal_connect (sw, "edge-overshot", G_CALLBACK (edge_overshot), list); + g_signal_connect (sw, "edge-reached", G_CALLBACK (edge_reached), list); gtk_widget_show_all (win); |