|
Libcroco
|
#include <stdio.h>#include <glib.h>#include "cr-utils.h"#include "cr-attr-sel.h"#include "cr-pseudo.h"#include "cr-additional-sel.h"Go to the source code of this file.
Data Structures | |
| union | CRAdditionalSelectorContent |
| struct | _CRAdditionalSel |
Typedefs | |
| typedef struct _CRAdditionalSel | CRAdditionalSel |
Enumerations | |
| enum | AddSelectorType { NO_ADD_SELECTOR = 0, CLASS_ADD_SELECTOR = 1, PSEUDO_CLASS_ADD_SELECTOR = 1 << 1, ID_ADD_SELECTOR = 1 << 3, ATTRIBUTE_ADD_SELECTOR = 1 << 4 } |
Functions | |
| CRAdditionalSel * | cr_additional_sel_new (void) |
| CRAdditionalSel: | |
| CRAdditionalSel * | cr_additional_sel_new_with_type (enum AddSelectorType a_sel_type) |
| cr_additional_sel_new_with_type: : the type of the newly built instance of CRAdditionalSel. | |
| CRAdditionalSel * | cr_additional_sel_append (CRAdditionalSel *a_this, CRAdditionalSel *a_sel) |
| cr_additional_sel_append: : the "this pointer" of the current instance of CRAdditionalSel . | |
| void | cr_additional_sel_set_class_name (CRAdditionalSel *a_this, CRString *a_class_name) |
| cr_additional_sel_set_class_name: : the "this pointer" of the current instance of CRAdditionalSel . | |
| void | cr_additional_sel_set_id_name (CRAdditionalSel *a_this, CRString *a_id) |
| cr_additional_sel_set_id_name: : the "this pointer" of the current instance of CRAdditionalSel . | |
| void | cr_additional_sel_set_pseudo (CRAdditionalSel *a_this, CRPseudo *a_pseudo) |
| cr_additional_sel_set_pseudo: : the "this pointer" of the current instance of CRAdditionalSel . | |
| void | cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this, CRAttrSel *a_sel) |
| cr_additional_sel_set_attr_sel: : the "this pointer" of the current instance of CRAdditionalSel . | |
| CRAdditionalSel * | cr_additional_sel_prepend (CRAdditionalSel *a_this, CRAdditionalSel *a_sel) |
| cr_additional_sel_prepend: : the "this pointer" of the current instance of CRAdditionalSel . | |
| guchar * | cr_additional_sel_to_string (CRAdditionalSel const *a_this) |
| guchar * | cr_additional_sel_one_to_string (CRAdditionalSel const *a_this) |
| void | cr_additional_sel_dump (CRAdditionalSel const *a_this, FILE *a_fp) |
| cr_additional_sel_dump: : the "this pointer" of the current instance of CRAdditionalSel. | |
| void | cr_additional_sel_destroy (CRAdditionalSel *a_this) |
| cr_additional_sel_destroy: : the "this pointer" of the current instance of CRAdditionalSel . | |
| typedef struct _CRAdditionalSel CRAdditionalSel |
Definition at line 54 of file cr-additional-sel.h.
| enum AddSelectorType |
| NO_ADD_SELECTOR | |
| CLASS_ADD_SELECTOR | |
| PSEUDO_CLASS_ADD_SELECTOR | |
| ID_ADD_SELECTOR | |
| ATTRIBUTE_ADD_SELECTOR |
Definition at line 37 of file cr-additional-sel.h.
| CRAdditionalSel* cr_additional_sel_append | ( | CRAdditionalSel * | a_this, |
| CRAdditionalSel * | a_sel | ||
| ) |
cr_additional_sel_append: : the "this pointer" of the current instance of CRAdditionalSel .
: the new instance to #CRAdditional to append.
Appends a new instance of #CRAdditional to the current list of #CRAdditional.
Returns the new list of CRAdditionalSel or NULL if an error arises.
Definition at line 182 of file cr-additional-sel.c.
References _CRAdditionalSel::next, and _CRAdditionalSel::prev.
| void cr_additional_sel_destroy | ( | CRAdditionalSel * | a_this | ) |
cr_additional_sel_destroy: : the "this pointer" of the current instance of CRAdditionalSel .
Destroys an instance of #CRAdditional.
Definition at line 466 of file cr-additional-sel.c.
References CRAdditionalSelectorContent::attr_sel, ATTRIBUTE_ADD_SELECTOR, CLASS_ADD_SELECTOR, CRAdditionalSelectorContent::class_name, _CRAdditionalSel::content, cr_additional_sel_destroy(), cr_attr_sel_destroy(), cr_pseudo_destroy(), cr_string_destroy(), ID_ADD_SELECTOR, CRAdditionalSelectorContent::id_name, _CRAdditionalSel::next, CRAdditionalSelectorContent::pseudo, PSEUDO_CLASS_ADD_SELECTOR, and _CRAdditionalSel::type.
Referenced by cr_additional_sel_destroy(), and cr_simple_sel_destroy().
| void cr_additional_sel_dump | ( | CRAdditionalSel const * | a_this, |
| FILE * | a_fp | ||
| ) |
cr_additional_sel_dump: : the "this pointer" of the current instance of CRAdditionalSel.
: the destination file.
Dumps the current instance of CRAdditionalSel to a file
Definition at line 442 of file cr-additional-sel.c.
References cr_additional_sel_to_string().
| CRAdditionalSel* cr_additional_sel_new | ( | void | ) |
CRAdditionalSel:
CRAdditionalSel abstracts an additionnal selector. An additional selector is the selector part that comes after the combination of type selectors. It can be either "a class selector (the .class part), a pseudo class selector, an attribute selector or an id selector. cr_additional_sel_new:
Default constructor of CRAdditionalSel. Returns the newly build instance of CRAdditionalSel.
Definition at line 46 of file cr-additional-sel.c.
References cr_utils_trace_debug.
Referenced by cr_additional_sel_new_with_type().
| CRAdditionalSel* cr_additional_sel_new_with_type | ( | enum AddSelectorType | a_sel_type | ) |
cr_additional_sel_new_with_type: : the type of the newly built instance of CRAdditionalSel.
Constructor of CRAdditionalSel. Returns the newly built instance of CRAdditionalSel.
Definition at line 71 of file cr-additional-sel.c.
References cr_additional_sel_new(), and _CRAdditionalSel::type.
| guchar* cr_additional_sel_one_to_string | ( | CRAdditionalSel const * | a_this | ) |
Definition at line 335 of file cr-additional-sel.c.
References CRAdditionalSelectorContent::attr_sel, ATTRIBUTE_ADD_SELECTOR, CLASS_ADD_SELECTOR, CRAdditionalSelectorContent::class_name, _CRAdditionalSel::content, cr_attr_sel_to_string(), cr_pseudo_to_string(), ID_ADD_SELECTOR, CRAdditionalSelectorContent::id_name, CRAdditionalSelectorContent::pseudo, PSEUDO_CLASS_ADD_SELECTOR, and _CRAdditionalSel::type.
| CRAdditionalSel* cr_additional_sel_prepend | ( | CRAdditionalSel * | a_this, |
| CRAdditionalSel * | a_sel | ||
| ) |
cr_additional_sel_prepend: : the "this pointer" of the current instance of CRAdditionalSel .
: the new instance to #CRAdditional to preappend.
Preppends a new instance of #CRAdditional to the current list of #CRAdditional.
Returns the new list of CRAdditionalSel or NULL if an error arises.
Definition at line 218 of file cr-additional-sel.c.
References _CRAdditionalSel::next, and _CRAdditionalSel::prev.
| void cr_additional_sel_set_attr_sel | ( | CRAdditionalSel * | a_this, |
| CRAttrSel * | a_sel | ||
| ) |
cr_additional_sel_set_attr_sel: : the "this pointer" of the current instance of CRAdditionalSel .
: the new instance of CRAttrSel to set.
Sets a new instance of CRAttrSel to a ATTRIBUTE additional selector.
Definition at line 159 of file cr-additional-sel.c.
References CRAdditionalSelectorContent::attr_sel, ATTRIBUTE_ADD_SELECTOR, _CRAdditionalSel::content, cr_attr_sel_destroy(), and _CRAdditionalSel::type.
| void cr_additional_sel_set_class_name | ( | CRAdditionalSel * | a_this, |
| CRString * | a_class_name | ||
| ) |
cr_additional_sel_set_class_name: : the "this pointer" of the current instance of CRAdditionalSel .
: the new class name to set.
Sets a new class name to a CLASS additional selector.
Definition at line 94 of file cr-additional-sel.c.
References CLASS_ADD_SELECTOR, CRAdditionalSelectorContent::class_name, _CRAdditionalSel::content, cr_string_destroy(), and _CRAdditionalSel::type.
| void cr_additional_sel_set_id_name | ( | CRAdditionalSel * | a_this, |
| CRString * | a_id | ||
| ) |
cr_additional_sel_set_id_name: : the "this pointer" of the current instance of CRAdditionalSel .
: the new id to set.
Sets a new id name to an ID additional selector.
Definition at line 116 of file cr-additional-sel.c.
References _CRAdditionalSel::content, cr_string_destroy(), ID_ADD_SELECTOR, CRAdditionalSelectorContent::id_name, and _CRAdditionalSel::type.
| void cr_additional_sel_set_pseudo | ( | CRAdditionalSel * | a_this, |
| CRPseudo * | a_pseudo | ||
| ) |
cr_additional_sel_set_pseudo: : the "this pointer" of the current instance of CRAdditionalSel .
: the new pseudo to set.
Sets a new pseudo to a PSEUDO additional selector.
Definition at line 137 of file cr-additional-sel.c.
References _CRAdditionalSel::content, cr_pseudo_destroy(), CRAdditionalSelectorContent::pseudo, PSEUDO_CLASS_ADD_SELECTOR, and _CRAdditionalSel::type.
| guchar* cr_additional_sel_to_string | ( | CRAdditionalSel const * | a_this | ) |
Definition at line 233 of file cr-additional-sel.c.
References CRAdditionalSelectorContent::attr_sel, ATTRIBUTE_ADD_SELECTOR, CLASS_ADD_SELECTOR, CRAdditionalSelectorContent::class_name, _CRAdditionalSel::content, cr_attr_sel_to_string(), cr_pseudo_to_string(), ID_ADD_SELECTOR, CRAdditionalSelectorContent::id_name, _CRAdditionalSel::next, CRAdditionalSelectorContent::pseudo, PSEUDO_CLASS_ADD_SELECTOR, and _CRAdditionalSel::type.
Referenced by cr_additional_sel_dump(), cr_simple_sel_one_to_string(), and cr_simple_sel_to_string().
1.7.6.1