• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gnulib-local/lib/libcroco/
1/* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
2
3/*
4 * This file is part of The Croco Library
5 *
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.
9 *
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.
14 *
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
18 * USA
19 *
20 * Author: Dodji Seketeli
21 * See the COPYRIGHTS file for copyright information.
22 */
23
24
25#ifndef __CR_ADD_SEL_H__
26#define __CR_ADD_SEL_H__
27
28#include <stdio.h>
29#include <glib.h>
30#include "cr-utils.h"
31#include "cr-attr-sel.h"
32#include "cr-pseudo.h"
33#include "cr-additional-sel.h"
34
35G_BEGIN_DECLS
36
37enum AddSelectorType
38{
39        NO_ADD_SELECTOR = 0 ,
40        CLASS_ADD_SELECTOR = 1 ,
41        PSEUDO_CLASS_ADD_SELECTOR = 1 << 1,
42        ID_ADD_SELECTOR = 1 << 3,
43        ATTRIBUTE_ADD_SELECTOR = 1 << 4
44} ;
45
46union CRAdditionalSelectorContent
47{
48        CRString *class_name ;
49        CRString *id_name ;
50        CRPseudo *pseudo ;
51        CRAttrSel *attr_sel ;
52} ;
53
54typedef struct _CRAdditionalSel CRAdditionalSel ;
55
56struct _CRAdditionalSel
57{
58        enum AddSelectorType type ;
59        union CRAdditionalSelectorContent content ;
60
61        CRAdditionalSel * next ;
62        CRAdditionalSel * prev ;
63        CRParsingLocation location ;
64} ;
65
66CRAdditionalSel * cr_additional_sel_new (void) ;
67
68CRAdditionalSel * cr_additional_sel_new_with_type  (enum AddSelectorType a_sel_type) ;
69
70CRAdditionalSel * cr_additional_sel_append (CRAdditionalSel *a_this,
71                                            CRAdditionalSel *a_sel) ;
72
73void cr_additional_sel_set_class_name (CRAdditionalSel *a_this,
74                                       CRString *a_class_name) ;
75
76void cr_additional_sel_set_id_name (CRAdditionalSel *a_this,
77                                    CRString *a_id) ;
78
79void cr_additional_sel_set_pseudo (CRAdditionalSel *a_this,
80                                   CRPseudo *a_pseudo) ;
81
82void cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this,
83                                     CRAttrSel *a_sel) ;
84
85CRAdditionalSel * cr_additional_sel_prepend (CRAdditionalSel *a_this,
86                                             CRAdditionalSel *a_sel) ;
87
88guchar * cr_additional_sel_to_string (CRAdditionalSel *a_this) ;
89
90guchar * cr_additional_sel_one_to_string (CRAdditionalSel *a_this) ;
91
92void cr_additional_sel_dump (CRAdditionalSel *a_this, FILE *a_fp) ;
93
94void cr_additional_sel_destroy (CRAdditionalSel *a_this) ;
95
96G_END_DECLS
97
98#endif /*__CR_ADD_SEL_H*/
99