Libcroco
|
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 #ifndef __CR_PARSING_LOCATION_H__ 00025 #define __CR_PARSING_LOCATION_H__ 00026 00027 #include "cr-utils.h" 00028 00029 G_BEGIN_DECLS 00030 00031 /** 00032 *@file 00033 *The declaration of the CRParsingLocation 00034 *object. This object keeps track of line/column/byte offset/ 00035 *at which the parsing of a given CSS construction appears. 00036 */ 00037 00038 typedef struct _CRParsingLocation CRParsingLocation; 00039 struct _CRParsingLocation { 00040 guint line ; 00041 guint column ; 00042 guint byte_offset ; 00043 } ; 00044 00045 00046 enum CRParsingLocationSerialisationMask { 00047 DUMP_LINE = 1, 00048 DUMP_COLUMN = 1 << 1, 00049 DUMP_BYTE_OFFSET = 1 << 2 00050 } ; 00051 00052 CRParsingLocation * cr_parsing_location_new (void) ; 00053 00054 enum CRStatus cr_parsing_location_init (CRParsingLocation *a_this) ; 00055 00056 enum CRStatus cr_parsing_location_copy (CRParsingLocation *a_to, 00057 CRParsingLocation const *a_from) ; 00058 00059 gchar * cr_parsing_location_to_string (CRParsingLocation const *a_this, 00060 enum CRParsingLocationSerialisationMask a_mask) ; 00061 void cr_parsing_location_dump (CRParsingLocation const *a_this, 00062 enum CRParsingLocationSerialisationMask a_mask, 00063 FILE *a_fp) ; 00064 00065 void cr_parsing_location_destroy (CRParsingLocation *a_this) ; 00066 00067 00068 00069 G_END_DECLS 00070 #endif