NetSurf
table.h
Go to the documentation of this file.
1/*
2 * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
3 * Copyright 2005 Richard Wilson <info@tinct.net>
4 *
5 * This file is part of NetSurf, http://www.netsurf-browser.org/
6 *
7 * NetSurf is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2 of the License.
10 *
11 * NetSurf is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20/**
21 * \file
22 * Interface to HTML table processing and layout.
23 */
24
25#ifndef NETSURF_HTML_TABLE_H
26#define NETSURF_HTML_TABLE_H
27
28#include <stdbool.h>
29
30struct box;
31
32
33/**
34 * Determine the column width types for a table.
35 *
36 * \param unit_len_ctx Length conversion context
37 * \param table box of type BOX_TABLE
38 * \return true on success, false on memory exhaustion
39 *
40 * The table->col array is allocated and type and width are filled in for each
41 * column.
42 */
43bool table_calculate_column_types(const css_unit_ctx *unit_len_ctx, struct box *table);
44
45
46/**
47 * Calculate used values of border-{trbl}-{style,color,width} for table cells.
48 *
49 * \param unit_len_ctx Length conversion context
50 * \param cell Table cell to consider
51 *
52 * \post \a cell's border array is populated
53 */
54void table_used_border_for_cell(const css_unit_ctx *unit_len_ctx, struct box *cell);
55
56#endif
Node in box tree.
Definition: box.h:177
bool table_calculate_column_types(const css_unit_ctx *unit_len_ctx, struct box *table)
Determine the column width types for a table.
Definition: table.c:813
void table_used_border_for_cell(const css_unit_ctx *unit_len_ctx, struct box *cell)
Calculate used values of border-{trbl}-{style,color,width} for table cells.
Definition: table.c:988