NetSurf
layout.h
Go to the documentation of this file.
1/*
2 * Copyright 2003 James Bursa <bursa@users.sourceforge.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 * \file
21 * interface to HTML layout.
22 *
23 * The main interface to the layout code is layout_document(), which takes a
24 * normalized box tree and assigns coordinates and dimensions to the boxes, and
25 * also adds boxes to the tree (eg. when formatting lines of text).
26 */
27
28#ifndef NETSURF_HTML_LAYOUT_H
29#define NETSURF_HTML_LAYOUT_H
30
31struct box;
32struct html_content;
33struct gui_layout_table;
34
35/**
36 * Calculate positions of boxes in a document.
37 *
38 * \param content content of type CONTENT_HTML
39 * \param width available width
40 * \param height available height
41 * \return true on success, false on memory exhaustion
42 */
43bool layout_document(struct html_content *content, int width, int height);
44
45#endif
bool layout_document(struct html_content *content, int width, int height)
Calculate positions of boxes in a document.
Definition: layout.c:5396
int width
Definition: gui.c:160
int height
Definition: gui.c:161
Node in box tree.
Definition: box.h:177
Content which corresponds to a single URL.
Data specific to CONTENT_HTML.
Definition: private.h:93