|
libcss
|
#include <stdio.h>#include <string.h>#include <libcss/hint.h>#include "stylesheet.h"#include "select/hash.h"#include "select/mq.h"#include "utils/utils.h"Classes | |
| struct | hash_entry |
| struct | hash_t |
| struct | css_selector_hash |
Macros | |
| #define | DEFAULT_SLOTS (1<<6) |
| #define | _hash_name(name) lwc_string_hash_value(name->insensitive) |
| #define | RULE_HAS_BYTECODE(r) (((css_rule_selector *)(r->sel->rule))->style != NULL) |
Typedefs | |
| typedef struct hash_entry | hash_entry |
| typedef struct hash_t | hash_t |
| #define _hash_name | ( | name | ) | lwc_string_hash_value(name->insensitive) |
| #define DEFAULT_SLOTS (1<<6) |
| #define RULE_HAS_BYTECODE | ( | r | ) | (((css_rule_selector *)(r->sel->rule))->style != NULL) |
| typedef struct hash_entry hash_entry |
| css_error css__selector_hash_create | ( | css_selector_hash ** | hash | ) |
Create a hash
| hash | Pointer to location to receive result |
| css_error css__selector_hash_destroy | ( | css_selector_hash * | hash | ) |
Destroy a hash
| hash | The hash to destroy |
| css_error css__selector_hash_find | ( | css_selector_hash * | hash, |
| const struct css_hash_selection_requirments * | req, | ||
| css_selector_hash_iterator * | iterator, | ||
| const css_selector *** | matched | ||
| ) |
Find the first selector that matches name
| hash | Hash to search |
| qname | Qualified name to match |
| iterator | Pointer to location to receive iterator function |
| matched | Pointer to location to receive selector |
If nothing matches, CSS_OK will be returned and **matched == NULL
| css_error css__selector_hash_find_by_class | ( | css_selector_hash * | hash, |
| const struct css_hash_selection_requirments * | req, | ||
| css_selector_hash_iterator * | iterator, | ||
| const css_selector *** | matched | ||
| ) |
Find the first selector that has a class that matches name
| hash | Hash to search |
| name | Name to match |
| iterator | Pointer to location to receive iterator function |
| matched | Pointer to location to receive selector |
If nothing matches, CSS_OK will be returned and **matched == NULL
| css_error css__selector_hash_find_by_id | ( | css_selector_hash * | hash, |
| const struct css_hash_selection_requirments * | req, | ||
| css_selector_hash_iterator * | iterator, | ||
| const css_selector *** | matched | ||
| ) |
Find the first selector that has an ID that matches name
| hash | Hash to search |
| name | Name to match |
| iterator | Pointer to location to receive iterator function |
| matched | Pointer to location to receive selector |
If nothing matches, CSS_OK will be returned and **matched == NULL
| css_error css__selector_hash_find_universal | ( | css_selector_hash * | hash, |
| const struct css_hash_selection_requirments * | req, | ||
| css_selector_hash_iterator * | iterator, | ||
| const css_selector *** | matched | ||
| ) |
Find the first universal selector
| hash | Hash to search |
| iterator | Pointer to location to receive iterator function |
| matched | Pointer to location to receive selector |
If nothing matches, CSS_OK will be returned and **matched == NULL
| css_error css__selector_hash_insert | ( | css_selector_hash * | hash, |
| const css_selector * | selector | ||
| ) |
Insert an item into a hash
| hash | The hash to insert into |
| selector | Pointer to selector |
| css_error css__selector_hash_remove | ( | css_selector_hash * | hash, |
| const css_selector * | selector | ||
| ) |
Remove an item from a hash
| hash | The hash to remove from |
| selector | Pointer to selector |
| css_error css__selector_hash_size | ( | css_selector_hash * | hash, |
| size_t * | size | ||
| ) |
Determine the memory-resident size of a hash
| hash | Hash to consider |
| size | Pointer to location to receive byte count |