32#include "oslib/dragasprite.h"
33#include "oslib/osbyte.h"
34#include "oslib/osfile.h"
35#include "oslib/osmodule.h"
36#include "oslib/osspriteop.h"
37#include "oslib/wimp.h"
38#include "oslib/wimpspriteop.h"
105#define LEAFNAME_MAX 200
127 { 0xaff,
"SaveDraw" },
128 { 0xadf,
"SavePDF" },
129 { 0xfff,
"SaveText" },
130 { 0xfaf,
"SaveComplete" },
133 { 0xf91,
"SaveLink" },
134 { 0xb28,
"SaveLink" },
135 { 0xfff,
"SaveLink" },
136 { 0xfaf,
"Hotlist" },
137 { 0xfaf,
"History" },
138 { 0xfff,
"SaveSelection" },
154 const int sprite_size = (68 * 68 * 4) + ((68 * 68) / 8);
155 int area_size =
sizeof(osspriteop_area) +
sizeof(osspriteop_header) +
156 256 * 8 + sprite_size;
166 icons = window->icons;
168 error = xosmodule_alloc(area_size, (
void **) &area);
170 NSLOG(netsurf, INFO,
"xosmodule_alloc: 0x%x: %s",
171 error->errnum, error->errmess);
172 xwimp_close_template();
179 error = xosspriteop_clear_sprites(osspriteop_USER_AREA,
saveas_area);
182 "xosspriteop_clear_sprites: 0x%x: %s",
193 (wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_INDIRECTED)) ==
194 (wimp_ICON_SPRITE | wimp_ICON_INDIRECTED));
198 error = xwimp_create_window(window, &w);
200 NSLOG(netsurf, INFO,
"xwimp_create_window: 0x%x: %s",
201 error->errnum, error->errmess);
202 xwimp_close_template();
221 NSLOG(netsurf, INFO,
"xosmodule_free: 0x%x: %s",
222 error->errnum, error->errmess);
243 osspriteop_header *sprite_header;
245 osspriteop_area *area;
249 NSLOG(netsurf, INFO,
"Thumbnail initialisation failed.");
256 NSLOG(netsurf, INFO,
"Thumbnail conversion failed.");
260 sprite_header = (osspriteop_header *)(area + 1);
261 memset(sprite_header->name, 0, 12);
262 memcpy(sprite_header->name, name,
min(strlen(name), 12));
272 sprite_header, sprite_header->size);
296 const nsurl *
url,
char *leaf_buf,
size_t leaf_len,
297 char *icon_buf,
size_t icon_len)
306 assert(icon_len >= 13);
317 case osfile_TYPE_SPRITE:
320 case osfile_TYPE_DRAW:
336 for (i = 0; nice[i]; i++) {
339 else if (nice[i] <=
' ' ||
340 strchr(
":*#$&@^%\\", nice[i]))
354 strncpy(leaf_buf, name, leaf_len);
355 leaf_buf[leaf_len - 1] = 0;
364 if (local_name != NULL)
374 for (index = 0; index < 11 && name[index]; ) {
375 char ch = name[index];
377 icon_buf[++index] = 0xa0;
379 icon_buf[++index] = tolower(ch);
381 memset(&icon_buf[index + 1], 0, 11 - index);
389 osspriteop_header *sprite;
395 if (error && error->errnum == error_SPRITE_OP_DOESNT_EXIST) {
397 memcpy(icon_buf,
"file_xxx", 9);
403 "ro_gui_wimp_get_sprite: 0x%x: %s",
440 char name_buf[FILENAME_MAX];
441 size_t leaf_offset = 0;
464 memcpy(name_buf,
save_dir, leaf_offset);
465 name_buf[leaf_offset++] =
'.';
473 name_buf + leaf_offset, FILENAME_MAX - leaf_offset,
474 icon_buf,
sizeof(icon_buf));
504 wimp_pointer pointer;
505 wimp_message message;
508 char *local_name = NULL;
513 error = xwimp_get_pointer_info(&pointer);
515 NSLOG(netsurf, INFO,
"xwimp_get_pointer_info: 0x%x: %s",
516 error->errnum, error->errmess);
527 int dx = (drag->final.x1 + drag->final.x0)/2;
528 int dy = (drag->final.y1 + drag->final.y0)/2;
530 bool dest_ok =
false;
560 dot = strrchr(name,
'.');
565 dp = message.data.data_xfer.file_name;
566 ep = dp +
sizeof message.data.data_xfer.file_name;
569 message.data.data_xfer.file_type = 0x2000;
570 if (*name !=
'!') *dp++ =
'!';
577 message.your_ref = 0;
579 message.action = message_DATA_SAVE;
580 message.data.data_xfer.w = pointer.w;
581 message.data.data_xfer.i = pointer.i;
582 message.data.data_xfer.pos.x = pointer.pos.x;
583 message.data.data_xfer.pos.y = pointer.pos.y;
584 message.data.data_xfer.est_size = 1000;
585 message.size = 44 + ((strlen(message.data.data_xfer.file_name) + 4) &
604 if (pointer->buttons & (wimp_DRAG_SELECT | wimp_DRAG_ADJUST)) {
606 int x = pointer->pos.x, y = pointer->pos.y;
607 wimp_window_state wstate;
608 wimp_icon_state istate;
610 istate.w = wstate.w = pointer->w;
611 istate.i = pointer->i;
612 if (!xwimp_get_window_state(&wstate) && !xwimp_get_icon_state(&istate)) {
613 x = (istate.icon.extent.x1 + istate.icon.extent.x0)/2 +
614 wstate.visible.x0 - wstate.xscroll;
615 y = (istate.icon.extent.y1 + istate.icon.extent.y0)/2 +
616 wstate.visible.y1 - wstate.yscroll;
637 message->action = message_DATA_LOAD;
638 message->your_ref = message->my_ref;
639 error = xwimp_send_message(wimp_USER_MESSAGE, message,
642 NSLOG(netsurf, INFO,
"xwimp_send_message: 0x%x: %s",
643 error->errnum, error->errmess);
654 char *lastdot = NULL;
657 while (p < ep && *p >= 0x20) {
660 if (!lastdot && p == sp + 12 &&
661 !memcmp(sp,
"<Wimp$Scrap>", 12))
break;
668 char *new_dir = realloc(
save_dir, (lastdot+1)-sp);
681 error = xwimp_create_menu(wimp_CLOSE_MENU, 0, 0);
684 "xwimp_create_menu: 0x%x: %s",
735 FILE *fp = fopen(
path,
"w");
744 fprintf(fp,
"%s\t%s\n",
"URI",
"100");
746 fprintf(fp,
"\t%s\n",
url);
748 fprintf(fp,
"\t%s\n",
title);
750 fprintf(fp,
"\t*\n");
754 fprintf(fp,
"%s\n",
url);
762 xosfile_set_type(
path, 0xf91);
765 xosfile_set_type(
path, 0xb28);
768 xosfile_set_type(
path, 0xfff);
787 error = xosfile_set_type(
path, rotype);
789 NSLOG(netsurf, INFO,
"xosfile_set_type: 0x%x: %s",
790 error->errnum, error->errmess);
805 osspriteop_header *sprite = (osspriteop_header *) spr;
815 error = xosfile_create_dir(
path, 0);
817 NSLOG(netsurf, INFO,
"xosfile_create_dir: 0x%x: %s",
818 error->errnum, error->errmess);
824 snprintf(buf,
sizeof buf,
"%s.!Run",
path);
825 fp = fopen(buf,
"w");
827 NSLOG(netsurf, INFO,
"fopen(): errno = %i", errno);
831 fprintf(fp,
"IconSprites <Obey$Dir>.!Sprites\n");
832 fprintf(fp,
"Filer_Run <Obey$Dir>.index\n");
834 error = xosfile_set_type(buf, 0xfeb);
836 NSLOG(netsurf, INFO,
"xosfile_set_type: 0x%x: %s",
837 error->errnum, error->errmess);
843 snprintf(buf,
sizeof buf,
"%s.!RunImage",
path);
844 fp = fopen(buf,
"w");
846 NSLOG(netsurf, INFO,
"Creating !RunImage failed: errno = %i",
856 dot = strrchr(
path,
'.');
857 if (dot) dot++;
else dot =
path;
859 if (len >= 12) len = 12;
861 memcpy(name, sprite->name, 12);
862 memcpy(sprite->name, dot, len);
863 memset(sprite->name + len, 0, 12 - len);
864 for (i = 0; i < 12; i++)
865 if (sprite->name[i] !=
'\0')
866 sprite->name[i] = tolower(sprite->name[i]);
869 snprintf(buf,
sizeof buf,
"%s.!Sprites",
path);
871 error = xosspriteop_save_sprite_file(osspriteop_NAME,
saveas_area, buf);
874 "xosspriteop_save_sprite_file: 0x%x: %s",
882 memcpy(sprite->name, name, 12);
885 snprintf(buf,
sizeof buf,
"%s.URL",
path);
911 if (file_type == osfile_TYPE_SPRITE || file_type == osfile_TYPE_DRAW) {
913 const uint8_t *source_data;
918 error = xosfile_save_stamped(
path, file_type,
919 (
byte *) source_data,
920 (
byte *) source_data + source_size);
923 "xosfile_save_stamped: 0x%x: %s",
932 case osfile_TYPE_SPRITE:
939 case osfile_TYPE_DRAW:
941 return save_as_draw(h,
path);
965 const uint8_t *source_data;
969 if (!force_overwrite) {
970 fileswitch_object_type obj_type;
972 error = xosfile_read_stamped(
path, &obj_type,
973 NULL, NULL, NULL, NULL, NULL);
975 NSLOG(netsurf, INFO,
"xosfile_read_stamped: 0x%x:%s",
976 error->errnum, error->errmess);
982 case osfile_NOT_FOUND:
991 error = xosfile_make_error(
path, obj_type);
999#ifdef WITH_DRAW_EXPORT
1001 return save_as_draw(h,
path);
1003#ifdef WITH_PDF_EXPORT
1005 return save_as_pdf(h,
path);
1009 xosfile_set_type(
path, 0xfff);
1014 if (strcmp(
path,
"<Wimp$Scrap>"))
1027 error = xosfile_save_stamped(
path,
1029 (
byte *) source_data,
1030 (
byte *) source_data + source_size);
1032 NSLOG(netsurf, INFO,
1033 "xosfile_save_stamped: 0x%x: %s",
1059 error = xosfile_set_type(
path, 0xfaf);
1061 NSLOG(netsurf, INFO,
1062 "xosfile_set_type: 0x%x: %s",
1069 error = xosfile_set_type(
path, 0xfaf);
1071 NSLOG(netsurf, INFO,
1072 "xosfile_set_type: 0x%x: %s",
1087 xosfile_set_type(
path, 0xfff);
1094 NSLOG(netsurf, INFO,
1095 "Unexpected content type: %d, path %s",
1113 wimp_pointer pointer;
1116 if (!strrchr(name,
'.')) {
1126 || !(pointer.buttons & wimp_CLICK_ADJUST);
1148 wimp_pointer pointer;
1154 xwimp_create_menu(wimp_CLOSE_MENU, 0, 0);
1160 error = xwimp_get_pointer_info(&pointer);
1162 NSLOG(netsurf, INFO,
"xwimp_get_pointer_info: 0x%x: %s",
1163 error->errnum, error->errmess);
1170 icon_buf,
sizeof(icon_buf));
1186 wimp_pointer pointer;
1192 xwimp_create_menu(wimp_CLOSE_MENU, 0, 0);
1198 error = xwimp_get_pointer_info(&pointer);
1200 NSLOG(netsurf, INFO,
"xwimp_get_pointer_info: 0x%x: %s",
1201 error->errnum, error->errmess);
1217 icon_buf,
sizeof(icon_buf));
1237 wimp_pointer pointer;
1243 xwimp_create_menu(wimp_CLOSE_MENU, 0, 0);
1251 error = xwimp_get_pointer_info(&pointer);
1253 NSLOG(netsurf, INFO,
"xwimp_get_pointer_info: 0x%x: %s",
1254 error->errnum, error->errmess);
1281 drag.initial.x0 = x - 34;
1282 drag.initial.y0 = y - 34;
1283 drag.initial.x1 = x + 34;
1284 drag.initial.y1 = y + 34;
1286 if (sprite && (xosbyte2(osbyte_READ_CMOS, 28, 0, &r2) || (r2 & 2))) {
1287 osspriteop_area *area = (osspriteop_area*)1;
1291 error = xosspriteop_select_sprite(osspriteop_USER_AREA,
1294 if (error->errnum != error_SPRITE_OP_DOESNT_EXIST) {
1295 NSLOG(netsurf, INFO,
1296 "xosspriteop_select_sprite: 0x%x: %s",
1306 error = xdragasprite_start(dragasprite_HPOS_CENTRE |
1307 dragasprite_VPOS_CENTRE |
1308 dragasprite_BOUND_POINTER |
1309 dragasprite_DROP_SHADOW,
1310 area, sprite, &drag.initial, 0);
1318 NSLOG(netsurf, INFO,
"xdragasprite_start: 0x%x: %s",
1319 error->errnum, error->errmess);
1322 drag.type = wimp_DRAG_USER_FIXED;
1323 drag.bbox.x0 = -0x8000;
1324 drag.bbox.y0 = -0x8000;
1325 drag.bbox.x1 = 0x7fff;
1326 drag.bbox.y1 = 0x7fff;
1329 error = xwimp_drag_box(&drag);
1332 NSLOG(netsurf, INFO,
"xwimp_drag_box: 0x%x: %s",
1333 error->errnum, error->errmess);
1351 char *ep = dp + len - 1;
1353 assert(p <= dp || p > ep);
1355 while (dp < ep && *p >=
' ')
1357 *dp++ = (*p ==
' ') ? 160 : *p;
1369 error = xdragasprite_stop();
1371 NSLOG(netsurf, INFO,
1372 "xdragasprite_stop: 0x%x: %s",
1379 error = xwimp_drag_box(NULL);
1381 NSLOG(netsurf, INFO,
1382 "xwimp_drag_box: 0x%x: %s",
1398 wimp_full_message_data_xfer *message, wimp_t
to)
1422 char *
path = message->data.data_xfer.file_name;
1424 bool force_overwrite;
1438 NSLOG(netsurf, INFO,
1439 "unexpected DataSaveAck: gui_save_content not set");
1454 if (message->data.data_xfer.est_size == -1)
1455 force_overwrite =
true;
void die(const char *error)
Cause an abnormal program termination.
Browser window creation and manipulation interface.
bool browser_window_drop_file_at_point(struct browser_window *bw, int x, int y, char *file)
Drop a file onto a browser window at a particular point, or determine if a file may be dropped onto t...
@ CONTENT_HTML
content is HTML
nserror global_history_export(const char *path, const char *title)
Save global history to file (html)
nserror hotlist_export(const char *path, const char *title)
Save hotlist to file.
wimp_window * ro_gui_dialog_load_template(const char *template_name)
Load a template without creating a window.
void ro_gui_dialog_close(wimp_w close)
Close a dialog box.
nserror
Enumeration of error codes.
@ NSERROR_BAD_ENCODING
The character set is unknown.
nserror utf8_to_local_encoding(const char *string, size_t len, char **result)
osspriteop_area * riscos_bitmap_convert_8bpp(struct bitmap *bitmap)
Convert a bitmap to 8bpp.
void riscos_bitmap_destroy(void *vbitmap)
Free a bitmap.
bool riscos_bitmap_save(void *vbitmap, const char *path, unsigned flags)
Save a bitmap in the platform's native format.
void * riscos_bitmap_create(int width, int height, enum gui_bitmap_flags flags)
Create a bitmap.
nserror riscos_bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content)
Render content into bitmap.
#define BITMAP_SAVE_FULL_ALPHA
save with full alpha channel (if not opaque)
void ro_mouse_drag_start(void(*drag_end)(wimp_dragged *dragged, void *data), void(*drag_track)(wimp_pointer *pointer, void *data), void(*drag_cancel)(void *data), void *data)
Start a drag, providing a function to be called when the Wimp_DragEnd event is received and optionall...
Mouse dragging and tracking support interface for RISC OS.
bool ro_gui_save_clipboard(const char *path)
Save the clipboard contents to a file.
Text selection import/export (interface).
Browser window handling (interface).
Generic bitmap handling interface.
@ BITMAP_CLEAR
memory should be wiped to 0
@ BITMAP_OPAQUE
image is opaque
Public content interface.
struct nsurl * hlcache_handle_get_url(const struct hlcache_handle *handle)
Retrieve the URL associated with a high level cache handle.
const char * content_get_title(struct hlcache_handle *h)
Retrieve title associated with content.
struct bitmap * content_get_bitmap(struct hlcache_handle *h)
Retrieve the bitmap contained in an image content.
const uint8_t * content_get_source_data(struct hlcache_handle *h, size_t *size)
Retrieve source of content.
content_type content_get_type(struct hlcache_handle *h)
Retrieve computed type of content.
Interface to platform-specific graphical user interface window operations.
@ GUI_SAVE_HISTORY_EXPORT_HTML
@ GUI_SAVE_CLIPBOARD_CONTENTS
@ GUI_SAVE_HOTLIST_EXPORT_HTML
@ GUI_SAVE_TEXT_SELECTION
#define NSLOG(catname, level, logmsg, args...)
bool ro_message_send_message(wimp_event_no event, wimp_message *message, wimp_t task, void(*callback)(wimp_message *message))
Sends a message and registers a return route for a bounce.
bool ro_message_send_message_to_window(wimp_event_no event, wimp_message *message, wimp_w to_w, wimp_i to_i, void(*callback)(wimp_message *message), wimp_t *to_t)
Sends a message and registers a return route for a bounce.
Automated RISC OS message routing (interface).
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
NetSurf URL handling (interface).
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
nserror nsurl_nice(const nsurl *url, char **result, bool remove_extensions)
Attempt to find a nice filename for a URL.
struct nsurl nsurl
NetSurf URL object.
query_id query_user(const char *query, const char *detail, const query_callback *cb, void *pw, const char *yes, const char *no)
Display a query to the user, requesting a response, near the current pointer position to keep the req...
int ro_content_filetype_from_mime_type(lwc_string *mime_type)
Determine the RISC OS filetype for a MIME type.
int ro_content_filetype(struct hlcache_handle *c)
Determine the RISC OS filetype for a content.
int ro_content_native_type(struct hlcache_handle *c)
Determine the native RISC OS filetype to export a content as.
RISC OS filetpe interface.
ro_gui_drag_type gui_current_drag_type
nserror ro_warn_user(const char *warning, const char *detail)
Display a warning for a serious problem (eg memory exhaustion).
File/object/selection saving (Interface).
bool ro_gui_window_to_window_pos(struct gui_window *g, int x, int y, os_coord *pos)
Convert x,y screen co-ordinates into window co-ordinates.
struct gui_window * ro_gui_window_lookup(wimp_w window)
Convert a RISC OS window handle to a gui_window.
static void ro_gui_save_drag_end(wimp_dragged *drag, void *data)
Handle User_Drag_Box event for a drag from the save dialog or browser window.
void gui_drag_save_selection(struct gui_window *g, const char *selection)
Initiates drag saving of a selection from a browser window.
static const struct gui_save_table_entry gui_save_table[]
Table of filetypes and default filenames.
static void ro_gui_save_set_state(struct hlcache_handle *h, gui_save_type save_type, const nsurl *url, char *leaf_buf, size_t leaf_len, char *icon_buf, size_t icon_len)
Suggest a leafname and sprite name for the given content.
static char * gui_save_selection
static bool saving_from_dialog
static bool dragbox_active
void ro_gui_send_datasave(gui_save_type save_type, wimp_full_message_data_xfer *message, wimp_t to)
Send DataSave message on behalf of clipboard code and remember that it's the clipboard contents we're...
void ro_gui_drag_icon(int x, int y, const char *sprite)
Start drag of icon under the pointer.
static bool ro_gui_save_link(const char *url, const char *title, link_format format, char *path)
Save a link file.
static void ro_gui_save_done(void)
Save completed, inform recipient and close our 'save as' dialog.
void ro_gui_drag_save_link(gui_save_type save_type, const nsurl *url, const char *title, struct gui_window *g)
Initiates drag saving of a link/URL file.
static bool ro_gui_save_complete(struct hlcache_handle *h, char *path)
Prepare an application directory and save_complete() to it.
static osspriteop_area * saveas_area
void gui_drag_save_object(struct gui_window *g, struct hlcache_handle *c, gui_save_type save_type)
Initiates drag saving of an object directly from a browser window.
static wimp_w gui_save_sourcew
static const char * gui_save_url
static char save_leafname[LEAFNAME_MAX]
static const query_callback overwrite_funcs
Overwrite confirmation callbacks.
static size_t save_dir_len
static bool ro_gui_save_object_native(struct hlcache_handle *h, char *path)
Save object in native type.
static query_id gui_save_query
static bool using_dragasprite
in-progress Wimp_DragBox/DragASprite op
void ro_gui_drag_box_cancel(void)
void ro_gui_convert_save_path(char *dp, size_t len, const char *p)
Convert a ctrl-char terminated pathname possibly containing spaces to a NUL-terminated one containing...
void ro_gui_saveas_quit(void)
Clean-up function that releases our sprite area and memory.
bool ro_gui_save_ok(wimp_w w)
Handle OK click/keypress in the save dialog.
static wimp_message gui_save_message
void ro_gui_save_datasave_ack(wimp_message *message)
Handle Message_DataSaveAck for a drag from the save dialog or browser window, or Clipboard protocol.
static void ro_gui_save_overwrite_confirmed(query_id id, enum query_response res, void *p)
Overwrite of existing file confirmed, proceed with the save.
void ro_gui_save_prepare(gui_save_type save_type, struct hlcache_handle *h, char *s, const nsurl *url, const char *title)
Prepares the save box to reflect gui_save_type and a content, and opens it.
static int gui_save_filetype
static gui_save_type gui_save_current_type
static void ro_gui_save_bounced(wimp_message *message)
Handle lack of Message_DataSaveAck for drags, saveas dialogs and clipboard code.
static bool ro_gui_save_content(struct hlcache_handle *h, char *path, bool force_overwrite)
Does the actual saving.
wimp_w ro_gui_saveas_create(const char *template_name)
Create the saveas dialogue from the given template, and the sprite area necessary for our thumbnail (...
static bool ro_gui_save_create_thumbnail(struct hlcache_handle *h, const char *name)
Create a thumbnail sprite for the page being saved.
static bool gui_save_send_dataload
static void ro_gui_save_set_file_type(const char *path, lwc_string *mime_type)
set RISC OS filetype of file from mimetype
static bool gui_save_close_after
static const char * gui_save_title
static char * save_dir
Current save directory (updated by and used for dialog-based saving)
static struct hlcache_handle * gui_save_content
static void ro_gui_save_overwrite_cancelled(query_id id, enum query_response res, void *p)
User has opted not to overwrite the existing file.
void ro_gui_save_start_drag(wimp_pointer *pointer)
Starts a drag for the save dialog.
nserror save_complete(hlcache_handle *c, const char *path, save_complete_set_type_cb set_type)
Save an HTML page with all dependencies.
Save HTML document with dependencies (interface).
void save_as_text(struct hlcache_handle *c, char *path)
Extract the text from an HTML content and save it as a text file.
Text export of HTML (interface).
Interface to utility string handling.
RISC OS wimp toolkit bitmap.
An entry in gui_save_table.
first entry in window list
struct fbtk_widget_s * window
struct browser_window * bw
The 'content' window that is rendered in the gui_window.
UCS conversion tables (interface) This is only used if nothing claims Service_International,...
Option reading and saving interface.
#define nsoption_bool(OPTION)
Get the value of a boolean option.
bool utf8_save_text(const char *utf8_text, const char *path)
Save the given utf8 text to a file, converting to local encoding.
char to[32]
Encoding name to convert to.
UTF-8 manipulation functions (interface).
Interface to a number of general purpose functionality.
#define fallthrough
switch fall through
Version information interface.
os_error * ro_gui_wimp_get_sprite(const char *name, osspriteop_header **sprite)
Locate a sprite in the Wimp sprite pool, returning a pointer to it.
void ro_gui_set_icon_string(wimp_w w, wimp_i i, const char *text, bool is_utf8)
Set the contents of a text or sprite icon to a string.
const char * ro_gui_get_icon_string(wimp_w w, wimp_i i)
Read the contents of a text or sprite icon.
void ro_gui_set_icon_sprite(wimp_w w, wimp_i i, osspriteop_area *area, const char *name)
Set an icon's sprite.
General RISC OS WIMP/OS library functions (interface).
bool ro_gui_wimp_event_memorise(wimp_w w)
Memorises the current state of any registered components in a window.
Automated RISC OS WIMP event handling (interface).
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.
static nserror bitmap(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
Plot a bitmap.