summaryrefslogtreecommitdiff
path: root/src/select/hash.h
blob: 59c8b76e3f06cc6450e516fd4943dc7068a2a6fb (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
/*
 * 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_hash_h_
#define css_select_hash_h_

#include <libwapcaplet/libwapcaplet.h>

#include <libcss/errors.h>
#include <libcss/functypes.h>

/* Ugh. We need this to avoid circular includes. Happy! */
struct css_selector;

typedef struct css_selector_hash css_selector_hash;

css_error css_selector_hash_create(lwc_context *dict,
		css_allocator_fn alloc, void *pw, 
		css_selector_hash **hash);
css_error css_selector_hash_destroy(css_selector_hash *hash);

css_error css_selector_hash_insert(css_selector_hash *hash,
		const struct css_selector *selector);
css_error css_selector_hash_remove(css_selector_hash *hash,
		const struct css_selector *selector);

css_error css_selector_hash_find(css_selector_hash *hash,
		lwc_string *name,
		const struct css_selector ***matched);
css_error css_selector_hash_iterate(css_selector_hash *hash,
		const struct css_selector **current, 
		const struct css_selector ***next);

#endif