www.riscos.com Technical Support: |
|
WimpLib provides a set of C veneers onto the Wimp (or Window Manager) SWI interface. For a description of the exact effect of a particular call, you should see the chapter The Window Manager at the start of Volume 3 of the RISC OS 3 Programmer's Reference Manual.
The section below lists in alphabetical order the functions provided by WimpLib. The functions' names are derived directly from the SWIs' names: for example, the veneer to call Wimp_CreateWindow is wimp_create_window. Each function has page references to the RISC OS 3 Programmer's Reference Manual - including ones, where relevant, to Volume 5 (the Supplement for version 3.5).
WimpLib does not provide access to every Wimp SWI: for example, the Filter related SWIs and Wimp_SetWatchDogState are omitted. Such SWIs still have an entry below under their expected function name, just so you can rapidly determine they are not supported. Although functions are provided for adding and removing Wimp messages, you must not use these in Toolbox applications.
Note that when a value is returned as a parameter (e.g. an integer value is returned by function (int input, int *output)), the pointer to the return value may be set to zero rather than provide a dummy variable.
_kernel_oserror *wimp_add_messages(int *list /* R0 in */);
This calls the SWI Wimp_AddMessages. You must not use this call in Toolbox applications.
_kernel_oserror *wimp_base_of_sprites(void **rom, /* R0 out */ void **ram /* R1 out */);
This calls the SWI Wimp_BaseOfSprites.
_kernel_oserror *wimp_block_copy (int handle, /* R0 in */ int sxmin, /* R1 in */ int symin, /* R2 in */ int sxmax, /* R3 in */ int symax, /* R4 in */ int dxmin, /* R5 in */ int dymin /* R6 in */);
This calls the SWI Wimp_BlockCopy.
You might expect a function of this name to be provided to call Wimp_ClaimFreeMemory. However, such a function is not implemented by WimpLib.
_kernel_oserror *wimp_close_down (int th /* R0 in */);
This sets up R1 to be &4B534154 ('TASK'), and then calls the SWI Wimp_CloseDown.
_kernel_oserror *wimp_close_template (void);
This calls the SWI Wimp_CloseTemplate.
_kernel_oserror *wimp_close_window (int window_handle /* R1 in */);
This calls the SWI Wimp_CloseWindow.
_kernel_oserror *wimp_command_window (int type /* R0 in */);
This calls the SWI Wimp_CommandWindow.
_kernel_oserror *wimp_create_icon (int priority, /* R0 in */ WimpCreateIconBlock *defn, /* R1 in */ int *handle /* R0 out */);
This calls the SWI Wimp_CreateIcon.
#define CloseMenu ((void *) -1) _kernel_oserror *wimp_create_menu (void *handle, /* R1 in */ int x, /* R2 in */ int y /* R3 in */);
This calls the SWI Wimp_CreateMenu.
_kernel_oserror *wimp_create_submenu (void *handle, /* R1 in */ int x, /* R2 in */ int y /* R3 in */);
This calls the SWI Wimp_CreateSubmenu.
_kernel_oserror *wimp_create_window (WimpWindow *defn, /* R1 in */ int *handle /* R0 out */);
This calls the SWI Wimp_CreateWindow.
_kernel_oserror *wimp_decode_menu (void *data, /* R1 in */ int *selections, /* R2 in */ char *buffer /* R3 in */);
This calls the SWI Wimp_DecodeMenu.
_kernel_oserror *wimp_delete_icon (WimpDeleteIconBlock *block /* R1 in */);
This calls the SWI Wimp_DeleteIcon.
_kernel_oserror *wimp_delete_window (WimpDeleteWindowBlock *block /* R1 in */);
This calls the SWI Wimp_DeleteWindow.
#define CancelDrag 0
_kernel_oserror *wimp_drag_box (WimpDragBox *block /* R1 in */);
This calls the SWI Wimp_DragBox.
You might expect a function of this name to be provided to call Wimp_Extend. However, such a function is not implemented by WimpLib.
_kernel_oserror *wimp_force_redraw (int window_handle, /* R0 in */ int xmin, /* R1 in */ int ymin, /* R2 in */ int xmax, /* R3 in */ int ymax /* R4 in */);
This calls the SWI Wimp_ForceRedraw.
_kernel_oserror *wimp_get_caret_position (WimpGetCaretPositionBlock *block /* R1 in */);
This calls the SWI Wimp_GetCaretPosition.
_kernel_oserror *wimp_get_icon_state (WimpGetIconStateBlock *block /* R1 in */);
This calls the SWI Wimp_GetIconState.
_kernel_oserror *wimp_get_menu_state (int report, /* R0 in */ int *state, /* R1 in */ int window, /* R2 in */ int icon /* R3 in */);
This calls the SWI Wimp_GetMenuState.
_kernel_oserror *wimp_get_pointer_info (WimpGetPointerInfoBlock *block /* R1 in */);
This calls the SWI Wimp_GetPointerInfo.
_kernel_oserror *wimp_get_rectangle (WimpRedrawWindowBlock *block, /* R1 in */ int *more /* R0 out */);
This calls the SWI Wimp_GetRectangle.
_kernel_oserror *wimp_get_window_info (WimpGetWindowInfoBlock *block /* R1 in */);
This calls the SWI Wimp_GetWindowInfo.
_kernel_oserror *wimp_get_window_outline (WimpGetWindowOutlineBlock *block /* R1 in */);
This calls the SWI Wimp_GetWindowOutline.
_kernel_oserror *wimp_get_window_state (WimpGetWindowStateBlock *state /* R1 in */);
This calls the SWI Wimp_GetWindowState.
_kernel_oserror *wimp_initialise (int version, /* R0 in */ char *name, /* R2 in */ int *messages, /* R3 in */ int *cversion, /* R0 out */ int *task /* R1 out */);
This sets up R1 to be &4B534154 ('TASK'), and then calls the SWI Wimp_Initialise.
_kernel_oserror *wimp_load_template (_kernel_swi_regs *regs /*R1-6 in*/);
This calls the SWI Wimp_LoadTemplate.
_kernel_oserror *wimp_open_template (char *name /* R1 in */);
This calls the SWI Wimp_OpenTemplate.
_kernel_oserror *wimp_open_window (WimpOpenWindowBlock *show /* R1 in */);
This calls the SWI Wimp_OpenWindow.
_kernel_oserror *wimp_plot_icon (WimpPlotIconBlock *block /* R1 in */);
This calls the SWI Wimp_PlotIcon.
_kernel_oserror *wimp_poll (int mask, /* R0 in */ WimpPollBlock *block, /* R1 in */ int *pollword, /* R2 in */ int *event_code /* R0 out */);
This calls the SWI Wimp_Poll.
_kernel_oserror *wimp_pollidle (int mask, /* R0 in */ WimpPollBlock *block, /* R1 in */ int time, /* R2 in */ int *pollword, /* R3 in */ int *event_code /* R0 out */);
This calls the SWI Wimp_PollIdle.
_kernel_oserror *wimp_process_key (int keycode /* R0 in */);
This calls the SWI Wimp_ProcessKey.
_kernel_oserror *wimp_read_palette (Palette *palette /* R1 in */);
This calls the SWI Wimp_ReadPalette.
You might expect a function of this name to be provided to call Wimp_ReadPixTrans. However, such a function is not implemented by WimpLib.
typedef struct { int r0; int r1; } WimpSysInfo;
_kernel_oserror *wimp_read_sys_info (int reason, /* R0 in */ WimpSysInfo *results /* R0 out */);
This calls the SWI Wimp_ReadSysInfo.
_kernel_oserror *wimp_redraw_window (WimpRedrawWindowBlock *block, /* R1 in */ int *more /* R0 out */);
This calls the SWI Wimp_RedrawWindow.
You might expect a function of this name to be provided to call Wimp_RegisterFilter. However, such a function is not implemented by WimpLib.
_kernel_oserror *wimp_remove_messages (int *list /* R0 in */);
This calls the SWI Wimp_RemoveMessages. You must not use this call in Toolbox applications.
int wimp_report_error (_kernel_oserror *er, /* R0 in */ int flags, /* R1 in */ char *name, /* R2 in */ char *sprite, /* R3 in */ void *area, /* R4 in */ char *buttons /* R5 in */);
This calls the SWI Wimp_ReportError.
_kernel_oserror *wimp_resize_icon (int window, /* R0 in */ int icon, /* R1 in */ int xmin, /* R2 in */ int ymin, /* R3 in */ int xmax, /* R4 in */ int ymax /* R5 in */);
This calls the SWI Wimp_ResizeIcon.
_kernel_oserror *wimp_send_message (int code, /* R0 in */ void *block, /* R1 in */ int handle, /* R2 in */ int icon, /* R3 in */ int *th /* R2 out */);
This calls the SWI Wimp_SendMessage.
_kernel_oserror *wimp_set_caret_position (int window_handle, /* R0 in */ int icon_handle, /* R1 in */ int xoffset, /* R2 in */ int yoffset, /* R3 in */ int height, /* R4 in */ int index /* R5 in */);
This calls the SWI Wimp_SetCaretPosition.
#define Wimp_BackgroundColour (128)
_kernel_oserror *wimp_set_colour (int colour /* R0 in */);
This calls the SWI Wimp_SetColour.
_kernel_oserror *wimp_set_colour_mapping (int which_palette, /* R1 in */ int *bpp1, /* R2 in */ int *bpp2, /* R3 in */ int *bpp4 /* R4 in */);
This calls sets R5, R6 and R7 to zero and then calls the SWI Wimp_SetColourMapping.
_kernel_oserror *wimp_set_extent (int window_handle, /* R0 in */ BBox *area /* R1 in */);
This calls the SWI Wimp_SetExtent.
_kernel_oserror *wimp_set_font_colours (int fore /* R1 in */ int back /* R2 in */);
This calls the SWI Wimp_SetFontColours.
_kernel_oserror *wimp_set_icon_state (WimpSetIconStateBlock *block) /* R1 in */;
This calls the SWI Wimp_SetIconState.
_kernel_oserror *wimp_set_mode (int mode /* R0 in */);
This calls the SWI Wimp_SetMode.
typedef struct { unsigned int colours[16]; unsigned int border; unsigned int pointer1; unsigned int pointer2; unsigned int pointer3; } Palette;
_kernel_oserror *wimp_set_palette (Palette *palette /* R1 in */);
This calls the SWI Wimp_SetPalette.
_kernel_oserror *wimp_set_pointer_shape (int shape, /* R0 in */ void *data, /* R1 in */ int width, /* R2 in */ int height, /* R3 in */ int activex, /* R4 in */ int activey /* R5 in */);
This calls the SWI Wimp_SetPointerShape.
You might expect a function of this name to be provided to call Wimp_SetWatchdogState. However, such a function is not implemented by WimpLib.
_kernel_oserror *wimp_slot_size (int current, /* R0 in */ int next, /* R1 in */ int *current, /* R0 out */ int *next, /* R1 out */ int *free /* R2 out */);
This calls the SWI Wimp_SlotSize.
typedef struct { int r3; int r4; int r5; int r6; int r7; } SpriteParams;
_kernel_oserror *wimp_sprite_op (int code, /* R0 in */ char *name, /* R2 in */ SpriteParams *p /* R3... in */);
This calls the SWI Wimp_SpriteOp.
_kernel_oserror *wimp_start_task (char *cl, /* R0 in */ int *handle /* R0 out */);
This calls the SWI Wimp_StartTask.
_kernel_oserror *wimp_text_colour (int colour /* R0 in */);
This calls the SWI Wimp_TextColour.
_kernel_oserror *wimp_text_op (_kernel_swi_regs *regs /* R0... in */);
This calls the SWI Wimp_TextOp.
_kernel_oserror *wimp_transfer_block (int sh, /* R0 in */ void *sbuf, /* R1 in */ int dh, /* R2 in */ void *dbuf, /* R3 in */ int size /* R4 in */);
This calls the SWI Wimp_TransferBlock.
_kernel_oserror *wimp_update_window (WimpRedrawWindowBlock *block, /* R1 in */ int *more /* R0 out */);
This calls the SWI Wimp_UpdateWindow.