NetSurf
Macros | Functions | Variables
wimp.c File Reference

General RISC OS WIMP/OS library functions (implementation). More...

#include <assert.h>
#include <locale.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "oslib/colourtrans.h"
#include "oslib/os.h"
#include "oslib/osfile.h"
#include "oslib/wimp.h"
#include "oslib/wimpextend.h"
#include "oslib/wimpspriteop.h"
#include "utils/log.h"
#include "utils/utf8.h"
#include "riscos/gui.h"
#include "riscos/oslib_pre7.h"
#include "riscos/wimp.h"
#include "riscos/ucstables.h"
Include dependency graph for wimp.c:

Go to the source code of this file.

Macros

#define ro_gui_redraw_icon(w, i)   xwimp_set_icon_state(w, i, 0, 0)
 Redraws an icon. More...
 

Functions

static void ro_gui_wimp_cache_furniture_sizes (wimp_w w)
 Caches window furniture information. More...
 
static size_t ro_gui_strlen (const char *str)
 RO GUI-specific strlen, for control character terminated strings. More...
 
static int ro_gui_strncmp (const char *s1, const char *s2, size_t len)
 RO GUI-specific strncmp, for control character terminated strings. More...
 
int ro_get_hscroll_height (wimp_w w)
 Gets the horizontal scrollbar height. More...
 
int ro_get_vscroll_width (wimp_w w)
 Gets the vertical scrollbar width. More...
 
int ro_get_title_height (wimp_w w)
 Gets the title bar height. More...
 
bool ro_gui_wimp_read_eig_factors (os_mode mode, int *xeig, int *yeig)
 Reads a modes EIG factors. More...
 
void ro_convert_os_units_to_pixels (os_coord *os_units, os_mode mode)
 Converts the supplied os_coord from OS units to pixels. More...
 
void ro_convert_pixels_to_os_units (os_coord *pixels, os_mode mode)
 Converts the supplied os_coord from pixels to OS units. More...
 
void ro_gui_force_redraw_icon (wimp_w w, wimp_i i)
 Forces an icon to be redrawn entirely (ie not just updated). More...
 
const char * ro_gui_get_icon_string (wimp_w w, wimp_i i)
 Read the contents of a text or sprite icon. More...
 
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. More...
 
void ro_gui_set_icon_integer (wimp_w w, wimp_i i, int value)
 Set the contents of an icon to a number. More...
 
void ro_gui_set_icon_decimal (wimp_w w, wimp_i i, int value, int decimal_places)
 Set the contents of an icon to a number. More...
 
int ro_gui_get_icon_decimal (wimp_w w, wimp_i i, int decimal_places)
 Get the contents of an icon as a number. More...
 
void ro_gui_set_icon_selected_state (wimp_w w, wimp_i i, bool state)
 Set the selected state of an icon. More...
 
bool ro_gui_get_icon_selected_state (wimp_w w, wimp_i i)
 Gets the selected state of an icon. More...
 
void ro_gui_set_icon_shaded_state (wimp_w w, wimp_i i, bool state)
 Set the shaded state of an icon. More...
 
bool ro_gui_get_icon_shaded_state (wimp_w w, wimp_i i)
 Gets the shaded state of an icon. More...
 
void ro_gui_set_icon_deleted_state (wimp_w w, wimp_i i, bool state)
 Set the deleted state of an icon. More...
 
bool ro_gui_get_icon_deleted_state (wimp_w w, wimp_i i)
 Gets the deleted state of an icon. More...
 
void ro_gui_set_icon_button_type (wimp_w w, wimp_i i, int type)
 Set the button type of an icon. More...
 
void ro_gui_set_icon_sprite (wimp_w w, wimp_i i, osspriteop_area *area, const char *name)
 Set an icon's sprite. More...
 
void ro_gui_set_window_title (wimp_w w, const char *text)
 Set a window title. More...
 
bool ro_gui_set_caret_first (wimp_w w)
 Places the caret in the first available icon. More...
 
osspriteop_area * ro_gui_load_sprite_file (const char *pathname)
 Load a sprite file into memory. More...
 
bool ro_gui_wimp_sprite_exists (const char *sprite)
 Check if a sprite is present in the Wimp sprite pool. More...
 
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. More...
 
bool ro_gui_wimp_get_sprite_dimensions (osspriteop_area *area, char *sprite, int *width, int *height)
 Get the dimensions of a sprite. More...
 
void ro_gui_user_redraw (wimp_draw *redraw, bool user_fill, os_colour user_colour)
 Performs simple user redraw for a window. More...
 
void ro_gui_wimp_update_window_furniture (wimp_w w, wimp_window_flags bic_mask, wimp_window_flags xor_mask)
 Sets whether a piece of window furniture is present for a window. More...
 
bool ro_gui_wimp_check_window_furniture (wimp_w w, wimp_window_flags mask)
 Checks whether a piece of window furniture is present for a window. More...
 
void ro_gui_scroll (wimp_scroll *scroll)
 Generic window scroll event handler. More...
 

Variables

static wimpextend_furniture_sizes furniture_sizes
 
static wimp_w furniture_window = NULL
 

Detailed Description

General RISC OS WIMP/OS library functions (implementation).

Definition in file wimp.c.

Macro Definition Documentation

◆ ro_gui_redraw_icon

#define ro_gui_redraw_icon (   w,
 
)    xwimp_set_icon_state(w, i, 0, 0)

Redraws an icon.

Parameters
wwindow handle
iicon handle

Definition at line 184 of file wimp.c.

Function Documentation

◆ ro_convert_os_units_to_pixels()

void ro_convert_os_units_to_pixels ( os_coord *  os_units,
os_mode  mode 
)

Converts the supplied os_coord from OS units to pixels.

Parameters
os_unitsvalues to convert
modemode to use EIG factors for, or -1 for current

Definition at line 151 of file wimp.c.

References mode, and ro_gui_wimp_read_eig_factors().

Referenced by ro_gui_buffer_open().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_convert_pixels_to_os_units()

void ro_convert_pixels_to_os_units ( os_coord *  pixels,
os_mode  mode 
)

Converts the supplied os_coord from pixels to OS units.

Parameters
pixelsvalues to convert
modemode to use EIG factors for, or -1 for current

Definition at line 167 of file wimp.c.

References mode, and ro_gui_wimp_read_eig_factors().

Referenced by ro_gui_theme_open(), ro_gui_url_bar_icon_resize(), ro_gui_wimp_get_sprite_dimensions(), ro_textarea_set_caret(), and ro_textarea_set_caret_xy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_get_hscroll_height()

int ro_get_hscroll_height ( wimp_w  w)

Gets the horizontal scrollbar height.

Parameters
wthe window to read (or NULL to read a cached value)

Definition at line 58 of file wimp.c.

References furniture_sizes, and ro_gui_wimp_cache_furniture_sizes().

Referenced by gui_window_set_extent(), ro_gui_status_bar_resize(), ro_gui_window_open(), and ro_textarea_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_get_title_height()

int ro_get_title_height ( wimp_w  w)

Gets the title bar height.

Parameters
wthe window to read (or NULL to read a cached value)

Definition at line 82 of file wimp.c.

References furniture_sizes, and ro_gui_wimp_cache_furniture_sizes().

Referenced by gui_window_set_extent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_get_vscroll_width()

int ro_get_vscroll_width ( wimp_w  w)

Gets the vertical scrollbar width.

Parameters
wthe window to read (or NULL to read a cached value)

Definition at line 70 of file wimp.c.

References furniture_sizes, and ro_gui_wimp_cache_furniture_sizes().

Referenced by gui_window_create(), ro_gui_dialog_open_centre_parent(), ro_gui_dialog_open_top(), ro_gui_options_theme_initialise(), ro_gui_url_complete_resize(), ro_gui_window_open(), ro_textarea_reflow(), and ro_textarea_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_force_redraw_icon()

void ro_gui_force_redraw_icon ( wimp_w  w,
wimp_i  i 
)

Forces an icon to be redrawn entirely (ie not just updated).

Parameters
wwindow handle
iicon handle

Definition at line 193 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by ro_gui_download_save(), ro_gui_throbber_animate(), and ro_gui_throbber_stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_get_icon_decimal()

int ro_gui_get_icon_decimal ( wimp_w  w,
wimp_i  i,
int  decimal_places 
)

Get the contents of an icon as a number.

Parameters
wwindow handle
iicon handle
decimal_placesnumber of places to show.
Returns
value used.

Definition at line 423 of file wimp.c.

References ro_gui_get_icon_string().

Referenced by ro_gui_options_cache_ok(), ro_gui_options_connection_ok(), ro_gui_options_fonts_ok(), ro_gui_options_security_ok(), ro_gui_wimp_event_mouse_click(), and ro_gui_wimp_event_validate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_get_icon_deleted_state()

bool ro_gui_get_icon_deleted_state ( wimp_w  w,
wimp_i  i 
)

Gets the deleted state of an icon.

Parameters
wwindow handle
iicon handle

Definition at line 600 of file wimp.c.

Referenced by ro_gui_set_icon_deleted_state().

Here is the caller graph for this function:

◆ ro_gui_get_icon_selected_state()

bool ro_gui_get_icon_selected_state ( wimp_w  w,
wimp_i  i 
)

Gets the selected state of an icon.

Parameters
wwindow handle
iicon handle

Definition at line 463 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by ro_gui_options_content_ok(), ro_gui_options_home_ok(), ro_gui_options_image_ok(), ro_gui_options_interface_click(), ro_gui_options_interface_ok(), ro_gui_options_security_ok(), ro_gui_options_theme_ok(), ro_gui_options_update_shading(), ro_gui_print_apply(), ro_gui_search_click(), ro_gui_search_keypress(), ro_gui_search_update_flags(), ro_gui_set_icon_selected_state(), and ro_gui_wimp_event_memorise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_get_icon_shaded_state()

bool ro_gui_get_icon_shaded_state ( wimp_w  w,
wimp_i  i 
)

Gets the shaded state of an icon.

Parameters
wwindow handle
iicon handle

Definition at line 535 of file wimp.c.

Referenced by ro_gui_interactive_help_request(), ro_gui_set_icon_shaded_state(), ro_gui_wimp_event_memorise(), and ro_gui_wimp_event_ok_click().

Here is the caller graph for this function:

◆ ro_gui_get_icon_string()

const char * ro_gui_get_icon_string ( wimp_w  w,
wimp_i  i 
)

Read the contents of a text or sprite icon.

Parameters
wwindow handle
iicon handle
Returns
NUL terminated string in icon

If the icon contains direct text then the returned data will be invalidated by the next call to this function. Therefore, all client calls to this function must either copy the string or ensure that this function is not called again until they are finished with the string data returned.

Todo:
this doesn't do local encoding -> UTF-8 to match what is done in ro_gui_set_icon_string.

Definition at line 235 of file wimp.c.

References NSLOG, ro_gui_strlen(), and ro_warn_user().

Referenced by ro_gui_dialog_openurl_apply(), ro_gui_dialog_zoom_apply(), ro_gui_download_click(), ro_gui_download_keypress(), ro_gui_get_icon_decimal(), ro_gui_options_connection_ok(), ro_gui_options_connection_proxy_type(), ro_gui_options_fonts_ok(), ro_gui_options_home_ok(), ro_gui_options_image_read(), ro_gui_options_interface_ok(), ro_gui_options_language_ok(), ro_gui_print_apply(), ro_gui_save_drag_end(), ro_gui_save_ok(), ro_gui_save_start_drag(), ro_gui_search_click(), ro_gui_search_keypress(), ro_gui_search_next(), ro_gui_url_bar_set_url(), ro_gui_wimp_event_memorise(), and ro_gui_wimp_event_prepare_gright_menu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_load_sprite_file()

osspriteop_area * ro_gui_load_sprite_file ( const char *  pathname)

Load a sprite file into memory.

Parameters
pathnamefile to load
Returns
sprite area, or 0 on memory exhaustion or error and error reported

Definition at line 806 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by gui_init(), and ro_gui_options_image_initialise().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_scroll()

void ro_gui_scroll ( wimp_scroll *  scroll)

Generic window scroll event handler.

Parameters
*scrollPointer to Scroll Event block.

Definition at line 1131 of file wimp.c.

References NSLOG.

Referenced by ro_gui_handle_event().

Here is the caller graph for this function:

◆ ro_gui_set_caret_first()

bool ro_gui_set_caret_first ( wimp_w  w)

Places the caret in the first available icon.

Parameters
wthe window to place the caret in
Returns
true if the caret was placed, false otherwise

Definition at line 731 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by print_update_sheets_shaded_state(), ro_gui_dialog_open(), ro_gui_dialog_open_persistent(), ro_gui_set_icon_deleted_state(), and ro_gui_set_icon_shaded_state().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_button_type()

void ro_gui_set_icon_button_type ( wimp_w  w,
wimp_i  i,
int  type 
)

Set the button type of an icon.

Parameters
wwindow handle
iicon handle
typebutton type

Definition at line 617 of file wimp.c.

References NSLOG, ro_warn_user(), and type.

Here is the call graph for this function:

◆ ro_gui_set_icon_decimal()

void ro_gui_set_icon_decimal ( wimp_w  w,
wimp_i  i,
int  value,
int  decimal_places 
)

Set the contents of an icon to a number.

Parameters
wwindow handle
iicon handle
valuevalue to use in icon.
decimal_placesThe number of decimal places to use.

Definition at line 392 of file wimp.c.

References buffer, and ro_gui_set_icon_string().

Referenced by ro_gui_options_cache_click(), ro_gui_options_cache_initialise(), ro_gui_options_fonts_default(), ro_gui_options_fonts_initialise(), ro_gui_options_fonts_ok(), ro_gui_wimp_event_mouse_click(), and ro_gui_wimp_event_validate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_deleted_state()

void ro_gui_set_icon_deleted_state ( wimp_w  w,
wimp_i  i,
bool  state 
)

Set the deleted state of an icon.

Parameters
wwindow handle
iicon handle
stateshaded state

Definition at line 552 of file wimp.c.

References NSLOG, ro_gui_get_icon_deleted_state(), ro_gui_set_caret_first(), and ro_warn_user().

Here is the call graph for this function:

◆ ro_gui_set_icon_integer()

void ro_gui_set_icon_integer ( wimp_w  w,
wimp_i  i,
int  value 
)

Set the contents of an icon to a number.

Parameters
wwindow handle
iicon handle
valuevalue

Definition at line 374 of file wimp.c.

References buffer, and ro_gui_set_icon_string().

Referenced by ro_gui_options_connection_default(), ro_gui_options_connection_initialise(), ro_gui_options_security_default(), ro_gui_options_security_initialise(), and ro_gui_print_prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_selected_state()

void ro_gui_set_icon_selected_state ( wimp_w  w,
wimp_i  i,
bool  state 
)

Set the selected state of an icon.

Parameters
wwindow handle
iicon handle
stateselected state

Definition at line 444 of file wimp.c.

References NSLOG, ro_gui_get_icon_selected_state(), and ro_warn_user().

Referenced by ro_gui_dialog_prepare_zoom(), ro_gui_options_content_default(), ro_gui_options_content_initialise(), ro_gui_options_home_default(), ro_gui_options_home_initialise(), ro_gui_options_image_click(), ro_gui_options_image_initialise(), ro_gui_options_interface_default(), ro_gui_options_interface_initialise(), ro_gui_options_security_default(), ro_gui_options_security_initialise(), ro_gui_options_theme_click(), ro_gui_options_theme_initialise(), ro_gui_print_prepare(), ro_gui_search_keypress(), ro_gui_search_prepare(), ro_gui_wimp_event_mouse_click(), and ro_gui_wimp_event_restore().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_shaded_state()

void ro_gui_set_icon_shaded_state ( wimp_w  w,
wimp_i  i,
bool  state 
)

Set the shaded state of an icon.

Parameters
wwindow handle
iicon handle
stateshaded state

Definition at line 487 of file wimp.c.

References NSLOG, ro_gui_get_icon_shaded_state(), ro_gui_set_caret_first(), and ro_warn_user().

Referenced by print_update_sheets_shaded_state(), ro_gui_button_bar_shade_button(), ro_gui_button_bar_sync_editors(), ro_gui_dialog_prepare_open_url(), ro_gui_dialog_prepare_zoom(), ro_gui_options_connection_update(), ro_gui_options_home_initialise(), ro_gui_options_interface_click(), ro_gui_options_interface_initialise(), ro_gui_print_prepare(), ro_gui_search_add_recent(), ro_gui_search_set_back_state(), ro_gui_search_set_forward_state(), ro_gui_throbber_icon_update(), ro_gui_url_bar_icon_update(), ro_gui_url_bar_update_urlsuggest(), ro_gui_wimp_event_restore(), theme_install_callback(), and theme_install_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_sprite()

void ro_gui_set_icon_sprite ( wimp_w  w,
wimp_i  i,
osspriteop_area *  area,
const char *  name 
)

Set an icon's sprite.

Parameters
wwindow handle
iicon handle
areasprite area containing sprite
namename of sprite in area (in local encoding)

Definition at line 638 of file wimp.c.

References NSLOG, ro_gui_redraw_icon, and ro_warn_user().

Referenced by ro_gui_save_prepare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_icon_string()

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.

Parameters
wwindow handle
iicon handle
textNUL terminated string (copied)
is_utf8When true, the given string is UTF-8 encoded and will be converted to local encoding currently used by the Wimp. When false, the given string is assumed to be in local encoding in use by the Wimp.

Definition at line 269 of file wimp.c.

References NSERROR_BAD_ENCODING, NSERROR_OK, NSLOG, ro_gui_redraw_icon, ro_gui_strlen(), ro_gui_strncmp(), ro_warn_user(), text(), and utf8_to_local_encoding().

Referenced by query_user_xy(), ro_gui_configure_register(), ro_gui_configure_translate(), ro_gui_dialog_init(), ro_gui_dialog_prepare_open_url(), ro_gui_dialog_prepare_zoom(), ro_gui_options_connection_default(), ro_gui_options_connection_initialise(), ro_gui_options_fonts_default(), ro_gui_options_fonts_initialise(), ro_gui_options_home_default(), ro_gui_options_home_initialise(), ro_gui_options_image_click(), ro_gui_options_image_initialise(), ro_gui_options_interface_default(), ro_gui_options_interface_initialise(), ro_gui_options_language_default(), ro_gui_options_language_initialise(), ro_gui_save_datasave_ack(), ro_gui_save_prepare(), ro_gui_search_prepare(), ro_gui_search_set_status(), ro_gui_set_icon_decimal(), ro_gui_set_icon_integer(), ro_gui_throbber_animate(), ro_gui_throbber_stop(), ro_gui_wimp_event_menu_selection(), ro_gui_wimp_event_restore(), ro_gui_window_prepare_objectinfo(), ro_gui_window_prepare_pageinfo(), ro_local_history_tooltip(), ro_warn_user(), theme_install_callback(), and theme_install_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_set_window_title()

void ro_gui_set_window_title ( wimp_w  w,
const char *  text 
)

Set a window title.

Parameters
wwindow handle
textnew title (copied)

Definition at line 675 of file wimp.c.

References NSERROR_BAD_ENCODING, NSERROR_OK, NSLOG, ro_warn_user(), text(), and utf8_to_local_encoding().

Referenced by gui_window_set_title(), ro_cookie_init(), ro_global_history_init(), ro_gui_print_prepare(), and ro_hotlist_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_strlen()

size_t ro_gui_strlen ( const char *  str)
static

RO GUI-specific strlen, for control character terminated strings.

Parameters
strThe string to measure the length of
Returns
The length of the string

Definition at line 1088 of file wimp.c.

Referenced by ro_gui_get_icon_string(), and ro_gui_set_icon_string().

Here is the caller graph for this function:

◆ ro_gui_strncmp()

int ro_gui_strncmp ( const char *  s1,
const char *  s2,
size_t  len 
)
static

RO GUI-specific strncmp, for control character terminated strings.

Parameters
s1The first string for comparison
s2The second string for comparison
lenMaximum number of bytes to be checked
Returns
0 for equal strings up to len bytes; pos for s1 being bigger than s2; neg for s1 being smaller than s2.

Definition at line 1110 of file wimp.c.

Referenced by ro_gui_set_icon_string().

Here is the caller graph for this function:

◆ ro_gui_user_redraw()

void ro_gui_user_redraw ( wimp_draw *  redraw,
bool  user_fill,
os_colour  user_colour 
)

Performs simple user redraw for a window.

Parameters
redrawwimp draw
user_fillwhether to fill the redraw area
user_colourthe colour to use when filling

Definition at line 971 of file wimp.c.

References colourtrans_SET_BG_GCOL, NSLOG, and ro_warn_user().

Referenced by ro_gui_url_complete_redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_cache_furniture_sizes()

void ro_gui_wimp_cache_furniture_sizes ( wimp_w  w)
static

Caches window furniture information.

Parameters
wthe window to cache information from
Returns
true on success, false on error (default values cached)

Definition at line 94 of file wimp.c.

References furniture_sizes, furniture_window, NSLOG, and ro_warn_user().

Referenced by ro_get_hscroll_height(), ro_get_title_height(), and ro_get_vscroll_width().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_check_window_furniture()

bool ro_gui_wimp_check_window_furniture ( wimp_w  w,
wimp_window_flags  mask 
)

Checks whether a piece of window furniture is present for a window.

Parameters
wthe window to modify
maskthe furniture flags to check

Definition at line 1066 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by ro_gui_wimp_event_keypress(), and ro_textarea_reflow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_get_sprite()

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.

Parameters
namesprite name
spritereceives pointer to sprite if found
Returns
error ptr iff not found

Definition at line 896 of file wimp.c.

Referenced by ro_gui_save_set_state(), and ro_gui_window_iconise().

Here is the caller graph for this function:

◆ ro_gui_wimp_get_sprite_dimensions()

bool ro_gui_wimp_get_sprite_dimensions ( osspriteop_area *  area,
char *  sprite,
int *  width,
int *  height 
)

Get the dimensions of a sprite.

Parameters
*areaThe sprite area to use.
*spritePointer to the sprite name.
*widthReturn the sprite width.
*heightReturn the sprite height.
Returns
true if successful; else false.

Definition at line 925 of file wimp.c.

References height, mode, NSLOG, ro_convert_pixels_to_os_units(), ro_warn_user(), and width.

Referenced by ro_gui_button_bar_rebuild(), and ro_gui_url_bar_rebuild().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_read_eig_factors()

bool ro_gui_wimp_read_eig_factors ( os_mode  mode,
int *  xeig,
int *  yeig 
)

Reads a modes EIG factors.

Parameters
[in]modemode to read EIG factors for, or -1 for current
[out]xeigThe x eig value
[out]yeigThe y eig value
Returns
true on success else false.

Definition at line 123 of file wimp.c.

References mode, NSLOG, and ro_warn_user().

Referenced by image_redraw(), ro_convert_os_units_to_pixels(), and ro_convert_pixels_to_os_units().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_sprite_exists()

bool ro_gui_wimp_sprite_exists ( const char *  sprite)

Check if a sprite is present in the Wimp sprite pool.

Parameters
spritename of sprite
Returns
true if the sprite is present

Definition at line 862 of file wimp.c.

References NSLOG, and ro_warn_user().

Referenced by gui_download_window_create(), ro_gui_url_bar_set_content_favicon(), ro_gui_url_complete_redraw(), ro_gui_window_prepare_objectinfo(), and ro_gui_window_prepare_pageinfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ro_gui_wimp_update_window_furniture()

void ro_gui_wimp_update_window_furniture ( wimp_w  w,
wimp_window_flags  bic_mask,
wimp_window_flags  xor_mask 
)

Sets whether a piece of window furniture is present for a window.

Parameters
wthe window to modify
bic_maskthe furniture flags to clear
xor_maskthe furniture flags to toggle

Definition at line 1016 of file wimp.c.

References NSLOG, parent, and ro_warn_user().

Referenced by ro_gui_dialog_add_persistent(), ro_gui_dialog_open_persistent(), ro_gui_menu_warning(), and ro_textarea_reflow().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ furniture_sizes

wimpextend_furniture_sizes furniture_sizes
static

◆ furniture_window

wimp_w furniture_window = NULL
static

Definition at line 51 of file wimp.c.

Referenced by ro_gui_wimp_cache_furniture_sizes().