1
/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
4
* This file is part of The Croco Library
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of version 2.1 of the GNU Lesser General Public
8
* License as published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
* Author: Dodji Seketeli
21
* See the COPYRIGHTS file for copyright information.
27
*This file holds the declaration of the
30
#ifndef __CR_ADD_SEL_H__
31
#define __CR_ADD_SEL_H__
36
#include "cr-attr-sel.h"
37
#include "cr-pseudo.h"
38
#include "cr-additional-sel.h"
45
CLASS_ADD_SELECTOR = 1 ,
46
PSEUDO_CLASS_ADD_SELECTOR = 1 << 1,
47
ID_ADD_SELECTOR = 1 << 3,
48
ATTRIBUTE_ADD_SELECTOR = 1 << 4
51
union CRAdditionalSelectorContent
53
CRString *class_name ;
59
typedef struct _CRAdditionalSel CRAdditionalSel ;
62
*#CRAdditionalSel abstracts
63
*an additionnal selector.
64
*An additional selector is the selector part
65
*that comes after the combination of type selectors.
66
*It can be either "a class selector (the .class part),
67
*a pseudo class selector, an attribute selector
70
struct _CRAdditionalSel
72
enum AddSelectorType type ;
73
union CRAdditionalSelectorContent content ;
75
CRAdditionalSel * next ;
76
CRAdditionalSel * prev ;
77
CRParsingLocation location ;
80
CRAdditionalSel * cr_additional_sel_new (void) ;
82
CRAdditionalSel * cr_additional_sel_new_with_type (enum AddSelectorType a_sel_type) ;
84
CRAdditionalSel * cr_additional_sel_append (CRAdditionalSel *a_this,
85
CRAdditionalSel *a_sel) ;
87
void cr_additional_sel_set_class_name (CRAdditionalSel *a_this,
88
CRString *a_class_name) ;
90
void cr_additional_sel_set_id_name (CRAdditionalSel *a_this,
93
void cr_additional_sel_set_pseudo (CRAdditionalSel *a_this,
96
void cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this,
99
CRAdditionalSel * cr_additional_sel_prepend (CRAdditionalSel *a_this,
100
CRAdditionalSel *a_sel) ;
102
guchar * cr_additional_sel_to_string (CRAdditionalSel *a_this) ;
104
guchar * cr_additional_sel_one_to_string (CRAdditionalSel *a_this) ;
106
void cr_additional_sel_dump (CRAdditionalSel *a_this, FILE *a_fp) ;
108
void cr_additional_sel_destroy (CRAdditionalSel *a_this) ;
112
#endif /*__CR_ADD_SEL_H*/