Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

cr-additional-sel.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
00002 
00003 /*
00004  * This file is part of The Croco Library
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00018  * USA
00019  *
00020  * Author: Dodji Seketeli
00021  * See the COPYRIGHTS file for copyright information.
00022  */
00023 
00024 
00025 /**
00026  *@file
00027  *This file holds the declaration of the
00028  *#CRAddSel class. 
00029  */
00030 #ifndef __CR_ADD_SEL_H__
00031 #define __CR_ADD_SEL_H__
00032 
00033 #include <stdio.h>
00034 #include <glib.h>
00035 #include "cr-utils.h"
00036 #include "cr-attr-sel.h"
00037 #include "cr-pseudo.h"
00038 #include "cr-additional-sel.h"
00039 
00040 G_BEGIN_DECLS
00041 
00042 enum AddSelectorType
00043 {
00044         NO_ADD_SELECTOR = 0 ,
00045         CLASS_ADD_SELECTOR = 1 ,
00046         PSEUDO_CLASS_ADD_SELECTOR = 1 << 1,
00047         ID_ADD_SELECTOR = 1 << 3,
00048         ATTRIBUTE_ADD_SELECTOR = 1 << 4
00049 } ;
00050 
00051 union CRAdditionalSelectorContent
00052 {
00053         CRString *class_name ;
00054         CRString *id_name ;
00055         CRPseudo *pseudo ;
00056         CRAttrSel *attr_sel ;
00057 } ;
00058 
00059 typedef struct _CRAdditionalSel CRAdditionalSel ;
00060 
00061 /**
00062  *#CRAdditionalSel abstracts
00063  *an additionnal selector.
00064  *An additional selector is the selector part
00065  *that comes after the combination of type selectors.
00066  *It can be either "a class selector (the .class part),
00067  *a pseudo class selector, an attribute selector 
00068  *or an id selector.
00069  */
00070 struct _CRAdditionalSel
00071 {
00072         enum AddSelectorType type ;
00073         union CRAdditionalSelectorContent content ;
00074 
00075         CRAdditionalSel * next ;
00076         CRAdditionalSel * prev ;
00077         CRParsingLocation location ;
00078 } ;
00079 
00080 CRAdditionalSel * cr_additional_sel_new (void) ;
00081 
00082 CRAdditionalSel * cr_additional_sel_new_with_type  (enum AddSelectorType a_sel_type) ;
00083 
00084 CRAdditionalSel * cr_additional_sel_append (CRAdditionalSel *a_this, 
00085                                             CRAdditionalSel *a_sel) ;
00086 
00087 void cr_additional_sel_set_class_name (CRAdditionalSel *a_this,
00088                                        CRString *a_class_name) ;
00089 
00090 void cr_additional_sel_set_id_name (CRAdditionalSel *a_this,
00091                                     CRString *a_id) ;
00092 
00093 void cr_additional_sel_set_pseudo (CRAdditionalSel *a_this,
00094                                    CRPseudo *a_pseudo) ;
00095 
00096 void cr_additional_sel_set_attr_sel (CRAdditionalSel *a_this,
00097                                      CRAttrSel *a_sel) ;
00098 
00099 CRAdditionalSel * cr_additional_sel_prepend (CRAdditionalSel *a_this, 
00100                                              CRAdditionalSel *a_sel) ;
00101 
00102 guchar * cr_additional_sel_to_string (CRAdditionalSel *a_this) ;
00103 
00104 guchar * cr_additional_sel_one_to_string (CRAdditionalSel *a_this) ;
00105 
00106 void cr_additional_sel_dump (CRAdditionalSel *a_this, FILE *a_fp) ;
00107 
00108 void cr_additional_sel_destroy (CRAdditionalSel *a_this) ;
00109 
00110 G_END_DECLS
00111 
00112 #endif /*__CR_ADD_SEL_H*/

Generated on Fri Oct 29 08:29:11 2004 for Libcroco by  doxygen 1.3.9.1