summaryrefslogtreecommitdiff
path: root/framebuffer/fbtk.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-07-26 22:12:55 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-07-26 22:12:55 +0100
commit31def6a33878b1ca8f5340d30708c853cdafefa1 (patch)
treee8ec8b84db672163a1a01ee93937adefe6b1cc57 /framebuffer/fbtk.h
parent989e82544e3a5b2f74216e91d269e3572c8053ce (diff)
downloadnetsurf-31def6a33878b1ca8f5340d30708c853cdafefa1.tar.gz
netsurf-31def6a33878b1ca8f5340d30708c853cdafefa1.tar.bz2
Add rudimentary support for resizing.
- Currently only libnsfb's SDL surface supports resizing. - Flickers like crazy while resizing. Possibly because the SDL surface is not set to use double buffering. - The internal widget library, fbtk, was never intended for this, as such it has no knowledge of how a widget should be positioned with respect to its parent. This means the top level window has to track everything and move them itself.
Diffstat (limited to 'framebuffer/fbtk.h')
-rw-r--r--framebuffer/fbtk.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/framebuffer/fbtk.h b/framebuffer/fbtk.h
index 325db0e9b..aff281439 100644
--- a/framebuffer/fbtk.h
+++ b/framebuffer/fbtk.h
@@ -270,7 +270,7 @@ bool fbtk_get_caret(fbtk_widget_t *widget, int *x, int *y, int *height);
/******************* Widget Manipulation **********************/
-/** Change the widget's position and size.
+/** Change the widget's position and size. (Doesn't redraw)
*
*/
bool fbtk_set_pos_and_size(fbtk_widget_t *widget, int x, int y, int width, int height);
@@ -369,6 +369,27 @@ bool fbtk_set_scroll_parameters(fbtk_widget_t *widget, int min, int max, int thu
bool fbtk_set_scroll_position(fbtk_widget_t *widget, int pos);
+/** Move and/or resize a horizontal scroll widget
+ *
+ * @param vscroll the horizontal scroll widget
+ * @param x new x pos
+ * @param y new y pos
+ * @param width new width
+ * @param height new height
+ */
+void fbtk_reposition_hscroll(fbtk_widget_t *scrollh,
+ int x, int y, int width, int height);
+
+/** Move and/or resize a vertical scroll widget
+ *
+ * @param vscroll the vertical scroll widget
+ * @param x new x pos
+ * @param y new y pos
+ * @param width new width
+ * @param height new height
+ */
+void fbtk_reposition_vscroll(fbtk_widget_t *scrollv,
+ int x, int y, int width, int height);