Redraw 2.97 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* Copyright 1997 Acorn Computers Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/***************************************************/
/* File   : Redraw.h                               */
17 18 19
/*                                                 */
/* Purpose: Redraw functions for the browser.      */
/*                                                 */
20
/* Author : A.D.Hodgkinson                         */
21 22
/*                                                 */
/* History: 29-Nov-96: Created.                    */
23 24 25 26 27 28 29 30 31 32
/***************************************************/

/* Definitions */

#define Redraw_Colour_White       0xffffff00
#define Redraw_Colour_AlmostWhite 0xeeeeee00
#define Redraw_Colour_BackGrey    0xdddddd00
#define Redraw_Colour_WNGrey      0xbbbbbb00
#define Redraw_Colour_MidGrey     0x99999900
#define Redraw_Colour_PlinthGrey  0x77777700
33
#define Redraw_Colour_Black       0x00000000
34 35 36 37 38 39 40 41 42 43 44

/* Function prototypes */

int               redraw_header            (unsigned int flags);

int               redraw_backcol           (browser_data *b);
void              redraw_set_colour        (int colour);
int               redraw_background_colour (browser_data * b,int foregroundcolour);
int               redraw_token_colour      (browser_data * b, HStream * t);

int               redraw_display_width     (browser_data * b, reformat_cell * d);
45
int               redraw_display_height    (browser_data * b, reformat_cell * d);
46 47
int               redraw_left_margin       (browser_data * b, reformat_cell * d);
int               redraw_right_margin      (browser_data * b, reformat_cell * d);
48 49
int               redraw_left_gap          (browser_data * b, reformat_cell * d, HStream * t);
int               redraw_right_gap         (browser_data * b, reformat_cell * d, HStream * t);
50 51 52 53 54 55

int               redraw_start_x           (browser_data * b, reformat_cell * d, HStream * t, int line);
int               redraw_token_x           (browser_data * b, reformat_cell * d, HStream * t, int line);
int               redraw_chunk_x           (browser_data * b, reformat_cell * d, int chunk, int line);

int               redraw_selected          (browser_data * b, HStream * token);
56
void              redraw_border_around_box (BBox * rbox, int colour);
57

58
void              redraw_draw_placeholder  (browser_data * b, WimpRedrawWindowBlock * r, BBox * holder, HStream * token, const char * text);
59
_kernel_oserror * redraw_draw              (browser_data * b, WimpRedrawWindowBlock * r, int noback, HStream * nocontent);