NetSurf
|
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <swis.h>
#include <oslib/colourtrans.h>
#include <oslib/os.h>
#include <oslib/osspriteop.h>
#include <oslib/wimp.h>
#include <oslib/wimpreadsysinfo.h>
#include "utils/nsoption.h"
#include "utils/log.h"
#include "riscos/buffer.h"
#include "riscos/gui.h"
#include "riscos/tinct.h"
#include "riscos/wimp.h"
#include "riscos/wimputils.h"
Go to the source code of this file.
Macros | |
#define | BUFFER_EXCLUSIVE_USER_REDRAW "Only support pure user redraw (faster)" |
#define | osspriteop_TYPEEXPANSION ((osspriteop_mode_word) 0xFu) |
Absent from OSLib. More... | |
#define | osspriteop_TYPE16BPP4K ((osspriteop_mode_word) 0x10u) |
Functions | |
static void | ro_gui_buffer_free (void) |
Releases any buffer memory depending on cache constraints. More... | |
void | ro_gui_buffer_open (const wimp_draw *redraw) |
Opens a buffer for writing to. More... | |
void | ro_gui_buffer_close (void) |
Closes any open buffer and flushes the contents to screen. More... | |
Variables | |
static osspriteop_area * | buffer = NULL |
The buffer characteristics. More... | |
static char | buffer_name [12] = "scr_buffer" |
static os_box | clipping |
The current clip area. More... | |
static osspriteop_save_area * | save_area |
The current save area. More... | |
static int | context0 |
static int | context1 |
static int | context2 |
static int | context3 |
static os_mode | mode |
The current sprite mode. More... | |
#define BUFFER_EXCLUSIVE_USER_REDRAW "Only support pure user redraw (faster)" |
#define osspriteop_TYPE16BPP4K ((osspriteop_mode_word) 0x10u) |
#define osspriteop_TYPEEXPANSION ((osspriteop_mode_word) 0xFu) |
void ro_gui_buffer_close | ( | void | ) |
Closes any open buffer and flushes the contents to screen.
Definition at line 370 of file buffer.c.
References buffer, clipping, context0, context1, context2, context3, mode, nsoption_int, ro_gui_buffer_free(), ro_plot_origin_x, ro_plot_origin_y, save_area, Tinct_Plot, and tinct_SPRITE_MODE.
Referenced by ro_gui_buffer_open(), ro_gui_cleanup(), and ro_gui_window__redraw_rect().
|
static |
Releases any buffer memory depending on cache constraints.
Definition at line 406 of file buffer.c.
References buffer.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
void ro_gui_buffer_open | ( | const wimp_draw * | redraw | ) |
Opens a buffer for writing to.
The ro_plot_origin_ variables are updated to reflect the new screen origin, so the variables should be set before calling this function, and not changed until after ro_gui_buffer_close() has been called.
redraw | the current WIMP redraw area to buffer |
Definition at line 84 of file buffer.c.
References buffer, buffer_name, clipping, context0, context1, context2, context3, mode, NSLOG, osspriteop_TYPE16BPP4K, osspriteop_TYPEEXPANSION, PTR_OS_VDU_VAR_LIST, ro_convert_os_units_to_pixels(), ro_gui_buffer_close(), ro_gui_buffer_free(), ro_plot_origin_x, ro_plot_origin_y, save_area, tinct_SPRITE_MODE, and type.
Referenced by ro_gui_window__redraw_rect().
|
static |
The buffer characteristics.
Definition at line 55 of file buffer.c.
Referenced by ami_font_scan_load(), ami_gui_map_filename(), ami_key_to_nskey(), ami_menu_arexx_scan(), ami_mime_init(), ASPrintf(), bitmap__format_convert(), bitmap__format_convert_from_pma(), bitmap__format_convert_to_pma(), bitmap_format_convert(), bitmap_test_opaque(), calc_row_pointers(), dirlist_generate_bottom(), dirlist_generate_headings(), dirlist_generate_hide_columns(), dirlist_generate_parent_link(), dirlist_generate_row(), dirlist_generate_title(), dirlist_generate_top(), fetch_file_process_dir(), fetch_file_process_error(), fetch_filetype(), fetch_resource_notfound_handler(), global_history_create_treeview_field_data(), gui_default_get_clipboard(), gui_get_clipboard(), gui_set_clipboard(), hotlist_create_treeview_field_visits_data(), html_drop_file_at_point(), monkey_process_command(), nscolour_get_stylesheet(), NSDownloadWindow::NSDownloadWindow(), nsgtk_builder_add_from_resource(), nsgtk_data_from_resname(), nsvideo_process_data(), OpenOutlineFont(), process_dir_ent(), NSDownloadWindow::Progress(), ro_gui_buffer_close(), ro_gui_buffer_free(), ro_gui_buffer_open(), ro_gui_dialog_open_url_init(), ro_gui_set_icon_decimal(), ro_gui_set_icon_integer(), ro_plot_bitmap(), row_callback(), and theme_install_callback().
|
static |
Definition at line 56 of file buffer.c.
Referenced by ro_gui_buffer_open().
|
static |
The current clip area.
Definition at line 60 of file buffer.c.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
|
static |
Definition at line 65 of file buffer.c.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
|
static |
Definition at line 66 of file buffer.c.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
|
static |
Definition at line 67 of file buffer.c.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
|
static |
Definition at line 68 of file buffer.c.
Referenced by ro_gui_buffer_close(), and ro_gui_buffer_open().
|
static |
The current sprite mode.
Definition at line 72 of file buffer.c.
Referenced by atari_treeview_get_grect(), create_cursor(), parse_font_size(), ro_convert_os_units_to_pixels(), ro_convert_pixels_to_os_units(), ro_gui_buffer_close(), ro_gui_buffer_open(), ro_gui_theme_open(), ro_gui_wimp_get_sprite_dimensions(), ro_gui_wimp_read_eig_factors(), treeview_walk_internal(), and window_place_caret().
|
static |
The current save area.
Definition at line 64 of file buffer.c.
Referenced by riscos_bitmap_convert_8bpp(), riscos_bitmap_render(), ro_gui_buffer_close(), ro_gui_buffer_open(), thumbnail_restore_output(), and thumbnail_switch_output().