Libcroco Reference Manual | ||||
---|---|---|---|---|
Top | Description |
struct CRSimpleSel; CRSimpleSel * cr_simple_sel_append_simple_sel (CRSimpleSel *a_this
,CRSimpleSel *a_sel
); enum CRStatus cr_simple_sel_compute_specificity (CRSimpleSel *a_this
); void cr_simple_sel_destroy (CRSimpleSel *a_this
); enum CRStatus cr_simple_sel_dump (CRSimpleSel const *a_this
,FILE *a_fp
); enum CRStatus cr_simple_sel_dump_attr_sel_list (CRSimpleSel const *a_this
); CRSimpleSel * cr_simple_sel_new (void
); guchar * cr_simple_sel_one_to_string (CRSimpleSel const *a_this
); CRSimpleSel * cr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this
,CRSimpleSel *a_sel
); guchar * cr_simple_sel_to_string (CRSimpleSel const *a_this
);
struct CRSimpleSel { enum SimpleSelectorType type_mask ; gboolean is_case_sentive ; CRString * name ; /** *The combinator that separates *this simple selector from the previous *one. */ enum Combinator combinator ; /** *The additional selector list of the *current simple selector. *An additional selector may *be a class selector, an id selector, *or an attribute selector. *Note that this field is a linked list. */ CRAdditionalSel *add_sel ; /* *the specificity as specified by *chapter 6.4.3 of the spec. */ gulong specificity ; CRSimpleSel *next ; CRSimpleSel *prev ; CRParsingLocation location ; };
CRSimpleSel * cr_simple_sel_append_simple_sel (CRSimpleSel *a_this
,CRSimpleSel *a_sel
);
Appends a simpe selector to the current list of simple selector.
a_this
: the this pointer of the current instance of CRSimpleSel.
a_sel
: the simple selector to append.
Returns : |
the new list upon successfull completion, an error code otherwise. |
enum CRStatus cr_simple_sel_compute_specificity (CRSimpleSel *a_this
);
a_this
: 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. |
void cr_simple_sel_destroy (CRSimpleSel *a_this
);
a_this
: the this pointer of the current instance of CRSimpleSel.
The destructor of the current instance of CRSimpleSel.
enum CRStatus cr_simple_sel_dump (CRSimpleSel const *a_this
,FILE *a_fp
);
Dumps the selector to a file. TODO: add the support of unicode in the dump.
|
the current instance of CRSimpleSel. |
|
the destination file pointer. |
Returns : |
CR_OK upon successfull completion, an error code otherwise. |
enum CRStatus cr_simple_sel_dump_attr_sel_list (CRSimpleSel const *a_this
);
CRSimpleSel * cr_simple_sel_new (void
);
The constructor of CRSimpleSel.
Returns : |
the new instance of CRSimpleSel. |
CRSimpleSel * cr_simple_sel_prepend_simple_sel (CRSimpleSel *a_this
,CRSimpleSel *a_sel
);
a_this
: the this pointer of the current instance of CRSimpleSel.
a_sel
: 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. |