summaryrefslogtreecommitdiff
path: root/src/select/computed.h
blob: a1e4eed4df64f341c53338d38017c4b1ac183fe7 (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
/*
 * This file is part of LibCSS
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2009 John-Mark Bell <jmb@netsurf-browser.org>
 */

#ifndef css_select_computed_h_
#define css_select_computed_h_

#include <libcss/computed.h>
#include <libcss/hint.h>
#include <libcss/unit.h>

#include "autogenerated_computed.h"

/**
 * Take a new reference to a computed style
 *
 * \param style  The style to take a new reference to.
 * \return The new computed style reference
 */
static inline css_computed_style * css__computed_style_ref(
		css_computed_style *style)
{
	if (style == NULL)
		return NULL;

	style->count++;
	return style;
}

css_error css__computed_style_create(css_computed_style **result);

css_error css__computed_style_initialise(css_computed_style *style,
		struct css_select_handler *handler, void *pw);

css_error css__computed_style_clone(
		const css_computed_style *orig,
		css_computed_style **clone_out);

css_error css__compute_absolute_values(const css_computed_style *parent,
		css_computed_style *style,
		const css_unit_ctx *unit_ctx);

#endif