#include <string.h>
#include <glib.h>
#include "cr-simple-sel.h"
Go to the source code of this file.
Functions | |
CRSimpleSel * | cr_simple_sel_new (void) |
cr_simple_sel_new: | |
CRSimpleSel * | cr_simple_sel_append_simple_sel (CRSimpleSel *a_this, CRSimpleSel *a_sel) |
cr_simple_sel_append_simple_sel: | |
CRSimpleSel * | cr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this, CRSimpleSel *a_sel) |
cr_simple_sel_prepend_simple_sel: | |
guchar * | cr_simple_sel_to_string (CRSimpleSel const *a_this) |
guchar * | cr_simple_sel_one_to_string (CRSimpleSel const *a_this) |
enum CRStatus | cr_simple_sel_dump (CRSimpleSel const *a_this, FILE *a_fp) |
cr_simple_sel_dump: : the current instance of CRSimpleSel. | |
enum CRStatus | cr_simple_sel_compute_specificity (CRSimpleSel *a_this) |
cr_simple_sel_compute_specificity: | |
void | cr_simple_sel_destroy (CRSimpleSel *a_this) |
cr_simple_sel_destroy: |
CRSimpleSel* cr_simple_sel_append_simple_sel | ( | CRSimpleSel * | a_this, | |
CRSimpleSel * | a_sel | |||
) |
cr_simple_sel_append_simple_sel:
Appends a simpe selector to the current list of simple selector.
: the this pointer of the current instance of CRSimpleSel. : the simple selector to append.
Returns: the new list upon successfull completion, an error code otherwise.
Definition at line 61 of file cr-simple-sel.c.
References _CRSimpleSel::next, and _CRSimpleSel::prev.
enum CRStatus cr_simple_sel_compute_specificity | ( | CRSimpleSel * | a_this | ) |
cr_simple_sel_compute_specificity:
: the current instance of CRSimpleSel
Computes the selector (combinator separated list of simple selectors) as defined in the css2 spec in chapter 6.4.3
Returns CR_OK upon successfull completion, an error code otherwise.
Definition at line 246 of file cr-simple-sel.c.
References _CRSimpleSel::add_sel, CR_BAD_PARAM_ERROR, CR_OK, ID_ADD_SELECTOR, _CRSimpleSel::name, _CRAdditionalSel::next, _CRSimpleSel::next, NO_ADD_SELECTOR, PSEUDO_CLASS_ADD_SELECTOR, _CRSimpleSel::specificity, _CRAdditionalSel::type, _CRSimpleSel::type_mask, and TYPE_SELECTOR.
void cr_simple_sel_destroy | ( | CRSimpleSel * | a_this | ) |
cr_simple_sel_destroy:
: the this pointer of the current instance of CRSimpleSel.
The destructor of the current instance of CRSimpleSel.
Definition at line 304 of file cr-simple-sel.c.
References _CRSimpleSel::add_sel, cr_additional_sel_destroy(), cr_simple_sel_destroy(), cr_string_destroy(), _CRSimpleSel::name, and _CRSimpleSel::next.
Referenced by cr_parser_parse_ruleset(), cr_selector_destroy(), and cr_simple_sel_destroy().
enum CRStatus cr_simple_sel_dump | ( | CRSimpleSel const * | a_this, | |
FILE * | a_fp | |||
) |
cr_simple_sel_dump: : the current instance of CRSimpleSel.
: the destination file pointer.
Dumps the selector to a file. TODO: add the support of unicode in the dump.
Returns CR_OK upon successfull completion, an error code otherwise.
Definition at line 217 of file cr-simple-sel.c.
References CR_BAD_PARAM_ERROR, CR_OK, and cr_simple_sel_to_string().
CRSimpleSel* cr_simple_sel_new | ( | void | ) |
cr_simple_sel_new:
The constructor of CRSimpleSel.
Returns the new instance of CRSimpleSel.
Definition at line 36 of file cr-simple-sel.c.
References cr_utils_trace_info.
guchar* cr_simple_sel_one_to_string | ( | CRSimpleSel const * | a_this | ) |
Definition at line 165 of file cr-simple-sel.c.
References _CRSimpleSel::add_sel, cr_additional_sel_to_string(), and _CRSimpleSel::name.
CRSimpleSel* cr_simple_sel_prepend_simple_sel | ( | CRSimpleSel * | a_this, | |
CRSimpleSel * | a_sel | |||
) |
cr_simple_sel_prepend_simple_sel:
: the this pointer of the current instance of CRSimpleSel. : the simple selector to prepend.
Prepends a simple selector to the current list of simple selectors.
Returns the new list upon successfull completion, an error code otherwise.
Definition at line 89 of file cr-simple-sel.c.
References _CRSimpleSel::next, and _CRSimpleSel::prev.
guchar* cr_simple_sel_to_string | ( | CRSimpleSel const * | a_this | ) |
Definition at line 103 of file cr-simple-sel.c.
References _CRSimpleSel::add_sel, COMB_GT, COMB_PLUS, COMB_WS, _CRSimpleSel::combinator, cr_additional_sel_to_string(), _CRSimpleSel::name, and _CRSimpleSel::next.
Referenced by cr_selector_to_string(), and cr_simple_sel_dump().