summaryrefslogtreecommitdiff
path: root/content/handlers/html/table.h
blob: ac4af25adda2097d6e899aa01984205910081829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
 * Copyright 2005 James Bursa <bursa@users.sourceforge.net>
 * Copyright 2005 Richard Wilson <info@tinct.net>
 *
 * This file is part of NetSurf, http://www.netsurf-browser.org/
 *
 * NetSurf is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * NetSurf is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 * \file
 * Interface to HTML table processing and layout.
 */

#ifndef NETSURF_HTML_TABLE_H
#define NETSURF_HTML_TABLE_H

#include <stdbool.h>

struct box;


/**
 * Determine the column width types for a table.
 *
 * \param len_ctx Length conversion context
 * \param table box of type BOX_TABLE
 * \return true on success, false on memory exhaustion
 *
 * The table->col array is allocated and type and width are filled in for each
 * column.
 */
bool table_calculate_column_types(const nscss_len_ctx *len_ctx,	struct box *table);


/**
 * Calculate used values of border-{trbl}-{style,color,width} for table cells.
 *
 * \param len_ctx Length conversion context
 * \param cell Table cell to consider
 *
 * \post \a cell's border array is populated
 */
void table_used_border_for_cell(const nscss_len_ctx *len_ctx, struct box *cell);

#endif