I have a gtkscrolledwindow and there is a gtk image in it. How can i get current showing area in GtkScrolledWindow? For example my image is 1366x768 pix and 300x400 pix part of image is showing in scrolledwindow. I want to get coordinates of showing part like (x,y,width,height) I'm looking here: https://developer.gnome.org/gtkmm/unstable/classGtk_1_1ScrolledWindow.html but can't find any solution. Thanks.
EDIT:The solution from user1146332 Thank you very much. For the python codes:
x = self.scrolledwindow.get_hadjustment() print str(x.get_page_size()) + " width of showing area" y =self.scrolledwindow.get_vadjustment() print str(y.get_page_size()) + " height of showing area" print str(x.get_upper()) + " image width in scrolledwindow" print str(y.get_upper()) + " image height in scrolledwindow" print str(x.get_value()) + " x position" print str(y.get_value()) + " y position"
Note that for adjustments which are used in a GtkScrollbar, the effective range of allowed values goes from adjustment->lower to adjustment->upper - adjustment->page_size.