summaryrefslogtreecommitdiff
path: root/riscos/window.c
diff options
context:
space:
mode:
authorAdrian Lees <adrian@aemulor.com>2005-07-20 23:27:28 +0000
committerAdrian Lees <adrian@aemulor.com>2005-07-20 23:27:28 +0000
commit1a1901d19b07ea265840962877b34b1205f6b092 (patch)
treef839d3b9687660d1b26556ba1944496aff10d8f5 /riscos/window.c
parent5e148741154019d69338c0f8781ed8a084cdd53d (diff)
downloadnetsurf-1a1901d19b07ea265840962877b34b1205f6b092.tar.gz
netsurf-1a1901d19b07ea265840962877b34b1205f6b092.tar.bz2
[project @ 2005-07-20 23:27:27 by adrianl]
2D scrolling of text areas/frames; First cut at selection in textareas; Further text editing actions (Word left/right; Page up/down; Cut block; Delete line start/end) svn path=/import/netsurf/; revision=1812
Diffstat (limited to 'riscos/window.c')
-rw-r--r--riscos/window.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/riscos/window.c b/riscos/window.c
index 867382565..74033a740 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -2439,6 +2439,23 @@ void gui_window_set_pointer(gui_pointer_shape shape)
/**
+ * Remove the mouse pointer from the screen
+ */
+
+void gui_window_hide_pointer(void)
+{
+ os_error *error;
+
+ error = xwimpspriteop_set_pointer_shape(NULL, 0x30, 0, 0, 0, 0);
+ if (error) {
+ LOG(("xwimpspriteop_set_pointer_shape: 0x%x: %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ }
+}
+
+
+/**
* Called when the gui_window has new content.
*
* \param g the gui_window that has new content
@@ -2533,6 +2550,50 @@ bool ro_gui_ctrl_pressed(void)
/**
+ * Platform-dependent part of starting a box scrolling operation,
+ * for frames and textareas.
+ *
+ * \param x0 minimum x ordinate of box relative to mouse pointer
+ * \param y0 minimum y ordinate
+ * \param x1 maximum x ordinate
+ * \param y1 maximum y ordinate
+ * \return true iff succesful
+ */
+
+bool gui_window_box_scroll_start(struct gui_window *g, int x0, int y0, int x1, int y1)
+{
+ wimp_pointer pointer;
+ os_error *error;
+ wimp_drag drag;
+
+ error = xwimp_get_pointer_info(&pointer);
+ if (error) {
+ LOG(("xwimp_get_pointer_info 0x%x : %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return false;
+ }
+
+ drag.type = wimp_DRAG_USER_POINT;
+ drag.bbox.x0 = pointer.pos.x + (int)(x0 * 2 * g->option.scale);
+ drag.bbox.y0 = pointer.pos.y + (int)(y0 * 2 * g->option.scale);
+ drag.bbox.x1 = pointer.pos.x + (int)(x1 * 2 * g->option.scale);
+ drag.bbox.y1 = pointer.pos.y + (int)(y1 * 2 * g->option.scale);
+
+ error = xwimp_drag_box(&drag);
+ if (error) {
+ LOG(("xwimp_drag_box: 0x%x : %s",
+ error->errnum, error->errmess));
+ warn_user("WimpError", error->errmess);
+ return false;
+ }
+
+ gui_current_drag_type = GUI_DRAG_SCROLL;
+ return true;
+}
+
+
+/**
* Starts drag scrolling of a browser window
*
* \param gw gui window