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

cr-om-parser.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 
00018  * GNU Lesser General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00021  * USA
00022  */
00023 
00024 /*
00025  *$Id: cr-om-parser.h,v 1.2 2003/06/08 11:47:06 dodji Exp $
00026  */
00027 
00028 #ifndef __CR_OM_PARSER_H__
00029 #define __CR_OM_PARSER_H__
00030 
00031 #include "cr-parser.h"
00032 #include "cr-stylesheet.h"
00033 
00034 /**
00035  *@file
00036  *The definition of the CSS Object Model Parser.
00037  *This parser uses (and sits) the SAC api of libcroco defined
00038  *in cr-parser.h and cr-doc-handler.h
00039  */
00040 
00041 G_BEGIN_DECLS
00042 
00043 typedef struct _CROMParser CROMParser ;
00044 typedef struct _CROMParserPriv CROMParserPriv ;
00045 
00046 /**
00047  *The Object model parser.
00048  *Can parse a css file and build a css object model.
00049  *This parser uses an instance of #CRParser and defines
00050  *a set of SAC callbacks to build the Object Model.
00051  */
00052 struct _CROMParser
00053 {
00054         CROMParserPriv *priv ;
00055 } ;
00056 
00057 CROMParser *
00058 cr_om_parser_new (CRInput *a_input) ;
00059 
00060 enum CRStatus
00061 cr_om_parser_parse_file (CROMParser *a_this,
00062                          const guchar *a_file_uri,
00063                          enum CREncoding a_enc,
00064                          CRStyleSheet **a_result) ;
00065 
00066 enum CRStatus
00067 cr_om_parser_simply_parse_file (const guchar *a_file_path,
00068                                 enum CREncoding a_enc,
00069                                 CRStyleSheet **a_result) ;
00070 
00071 enum CRStatus
00072 cr_om_parser_simply_parse_buf (const guchar *a_buf,
00073                                gulong a_len,
00074                                enum CREncoding a_enc,
00075                                CRStyleSheet **a_result) ;
00076 
00077 enum CRStatus
00078 cr_om_parser_parse_buf (CROMParser *a_this,
00079                         const guchar *a_buf,
00080                         gulong a_len,
00081                         enum CREncoding a_enc,
00082                         CRStyleSheet **a_result) ;
00083 
00084 void
00085 cr_om_parser_destroy (CROMParser *a_this) ;
00086 
00087 G_END_DECLS
00088 
00089 #endif /*__CR_OM_PARSER_H__*/

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