NetSurf
redrawslots.h
Go to the documentation of this file.
1/*
2 * Copyright 2012 Ole Loots <ole@monochrom.net>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19
20#ifndef ATARI_REDRAW_SLOTS_H
21#define ATARI_REDRAW_SLOTS_H
22
23#include <mt_gem.h>
24
25#include "netsurf/types.h"
26
27/**
28 * This is the number of redraw requests that the slotlist can store.
29 * If a redraw is scheduled and all slots are used, the rectangle will
30 * be merged to one of the existing slots.
31 */
32#define MAX_REDRW_SLOTS 32
33
34/**
35 * This struct holds scheduled redraw requests.
36 */
38{
40 short size;
41 short volatile areas_used;
42};
43
44void redraw_slots_init(struct s_redrw_slots * slots, short size);
45void redraw_slot_schedule(struct s_redrw_slots * slots, short x0, short y0,
46 short x1, short y1, bool force);
47void redraw_slot_schedule_grect(struct s_redrw_slots * slots, GRECT *area,
48 bool force);
49void redraw_slots_remove_area(struct s_redrw_slots * slots, int i);
50void redraw_slots_free(struct s_redrw_slots * slots);
51
52#endif
void redraw_slots_init(struct s_redrw_slots *slots, short size)
Definition: redrawslots.c:26
#define MAX_REDRW_SLOTS
This is the number of redraw requests that the slotlist can store.
Definition: redrawslots.h:32
void redraw_slots_remove_area(struct s_redrw_slots *slots, int i)
Definition: redrawslots.c:118
void redraw_slots_free(struct s_redrw_slots *slots)
Definition: redrawslots.c:33
void redraw_slot_schedule_grect(struct s_redrw_slots *slots, GRECT *area, bool force)
Definition: redrawslots.c:57
void redraw_slot_schedule(struct s_redrw_slots *slots, short x0, short y0, short x1, short y1, bool force)
Definition: redrawslots.c:67
Rectangle coordinates.
Definition: types.h:40
int x0
Definition: types.h:41
int y0
Top left.
Definition: types.h:41
int x1
Definition: types.h:42
int y1
Bottom right.
Definition: types.h:42
This struct holds scheduled redraw requests.
Definition: redrawslots.h:38
struct rect areas[MAX_REDRW_SLOTS]
Definition: redrawslots.h:39
short volatile areas_used
Definition: redrawslots.h:41
NetSurf types.