Logo Search packages:      
Sourcecode: inkscape version File versions

enum CRStatus cr_sel_eng_matches_node ( CRSelEng *  a_this,
CRSimpleSel a_sel,
CRXMLNodePtr  a_node,
gboolean *  a_result 
)

Evaluates a chained list of simple selectors (known as a css2 selector). Says wheter if this selector matches the xml node given in parameter or not.

Parameters:
a_this the selection engine.
a_sel the simple selector against which the xml node is going to be matched.
a_node the node against which the selector is going to be matched.
a_result out parameter. The result of the match. Is set to TRUE if the selector matches the node, FALSE otherwise. This value is considered if and only if this functions returns CR_OK.
Returns:
the CR_OK if the selection ran correctly, an error code otherwise.

Definition at line 1278 of file cr-sel-eng.c.

References sel_matches_node_real().

Referenced by cr_sel_eng_get_matched_rulesets_real().

{
        g_return_val_if_fail (a_this && PRIVATE (a_this)
                              && a_this && a_node
                              && a_result, CR_BAD_PARAM_ERROR);

        if (!PRIVATE(a_this)->node_iface->isElementNode (a_node)) {
                *a_result = FALSE;
                return CR_OK;
        }

        return sel_matches_node_real (a_this, a_sel, 
                                      a_node, a_result, 
                                      TRUE, TRUE);
}


Generated by  Doxygen 1.6.0   Back to index