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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
Copyright (C) 2000 CodeFactory AB
Copyright (C) 2000 Jonas Borgstrm <jonas@codefactory.se>
Copyright (C) 2000 Anders Carlsson <andersca@codefactory.se>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef __HTMLLINEBOX_H__
#define __HTMLLINEBOX_H__
#include <glib.h>
typedef struct _HtmlLineBox HtmlLineBox;
typedef enum {
HTML_INLINE_LINE_BOX_TYPE,
HTML_BLOCK_LINE_BOX_TYPE
} HtmlLineBoxType;
typedef enum {
HTML_LINE_BOX_FULL = 0,
HTML_LINE_BOX_NOT_FULL,
HTML_LINE_BOX_DOES_NOT_FIT
} HtmlLineBoxState;
struct _HtmlLineBox {
HtmlLineBoxType type; /* What type of line is it? */
gint width, height;
GSList *item_list; /* A list of the boxes on this line */
HtmlLineBox *next; /* A pointer to the next line */
gint full_width;
};
void html_line_box_destroy (HtmlLineBox *line);
HtmlLineBox *html_line_box_new (HtmlLineBoxType type);
void html_line_box_init (HtmlLineBox *line);
void html_line_box_close (HtmlLineBox *line, HtmlBox *parent, gint left_margin, gint max_width, gint boxwidth);
HtmlLineBoxState html_line_box_add_inlines (HtmlLineBox *line, HtmlRelayout *relayout, HtmlBox *box, HtmlBox **next_box, HtmlBox *parent, GSList **iterator,
gint y, gint left_margin, gint max_width, GSList **float_list, gint boxwidth);
void html_line_box_add_block (HtmlLineBox *line, HtmlRelayout *relayout, HtmlBox *box, gint y, gboolean force_relayout, gint *old_margin, gint boxwidth);
#endif /* __HTMLLINEBOX_H__ */
|