00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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
00063
00064
00065
00066
00067
00068
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