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

cr-sel-eng.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  * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020  * USA
00021  */
00022 
00023 #ifndef __CR_SEL_ENG_H__
00024 #define __CR_SEL_ENG_H__
00025 
00026 #include "cr-utils.h"
00027 #include "cr-stylesheet.h"
00028 #include "cr-cascade.h"
00029 #include "cr-style.h"
00030 
00031 #ifdef CROCO_HAVE_LIBXML2
00032  #include <libxml/tree.h>
00033 #endif
00034 
00035 #ifdef CROCO_SELENG_ENABLED
00036 
00037 
00038 /**
00039  *@file:
00040  *The declaration of the  #CRSelEng class.
00041  *The #CRSelEng is actually the "Selection Engine"
00042  *class.
00043  */
00044 
00045 G_BEGIN_DECLS
00046 
00047 typedef struct _CRSelEng CRSelEng ;
00048 typedef struct _CRSelEngPriv CRSelEngPriv ;
00049 
00050 /**
00051  *The Selection engine class.
00052  *The main service provided by this class, is
00053  *the ability to interpret a libcroco implementation
00054  *of css2 selectors, and given an xml node, say if
00055  *the selector matches the node or not.
00056  */
00057 struct _CRSelEng
00058 {
00059         CRSelEngPriv *priv ;
00060 } ;
00061 
00062 CRSelEng *
00063 cr_sel_eng_new (void) ;
00064 
00065 enum CRStatus
00066 cr_sel_eng_matches_node (CRSelEng *a_this, CRSimpleSel *a_sel,
00067                          xmlNode *a_node, gboolean *a_result) ;
00068 
00069 enum CRStatus
00070 cr_sel_eng_get_matched_rulesets (CRSelEng *a_this,
00071                                  CRStyleSheet *a_sheet,
00072                                  xmlNode *a_node,
00073                                  CRStatement ***a_rulesets,
00074                                  gulong *a_len) ;
00075 
00076 enum CRStatus
00077 cr_sel_eng_get_matched_properties_from_cascade  (CRSelEng *a_this,
00078                                                  CRCascade *a_cascade,
00079                                                  xmlNode *a_node,
00080                                                  GHashTable **props_decls_dict) ;
00081 
00082 enum CRStatus
00083 cr_sel_eng_get_matched_style (CRSelEng *a_this,
00084                               CRCascade *a_cascade,
00085                               xmlNode *a_node,
00086                               CRStyle *a_parent_style,
00087                               CRStyle **a_style) ;
00088 
00089 void
00090 cr_sel_eng_destroy (CRSelEng *a_this) ;
00091 
00092 G_END_DECLS
00093 
00094 #endif /*CROCO_SELENG_ENABLED*/
00095 
00096 #endif/*__CR_SEL_ENG_H__*/

Generated on Wed Oct 1 01:36:47 2003 for Libcroco by doxygen 1.3.3