home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / lib / libstyle / cssI.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.4 KB  |  91 lines

  1. /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18. #ifndef __CSS_INTERNAL_H__
  19. #define __CSS_INTERNAL_H__
  20.  
  21. typedef struct css_nodeRecord {
  22.     int node_id;
  23.     char * string;
  24.     struct css_nodeRecord * left;
  25.     struct css_nodeRecord * right;
  26. } css_nodeRecord, *css_node;
  27.  
  28. enum {
  29.   NODE_IMPORT_LIST = 300,
  30.   NODE_IMPORT_STRING,
  31.   NODE_IMPORT_URL,
  32.   NODE_STRING,
  33.   NODE_NUMBER,
  34.   NODE_TERM,
  35.   NODE_EXPR,
  36.   NODE_PRIO,
  37.   NODE_IDENT,
  38.   NODE_EMS,
  39.   NODE_LENGTH,
  40.   NODE_PERCENTAGE,
  41.   NODE_RGB,
  42.   NODE_URL,
  43.   NODE_HEXCOLOR,
  44.   NODE_DECLARATION_PROPERTY_EXPR_PRIO,
  45.   NODE_DECLARATION_PROPERTY_EXPR,
  46.   NODE_ID_SELECTOR,
  47.   NODE_PSEUDO_ELEMENT,
  48.   NODE_CLASS,
  49.   NODE_ACTIVE_PSCLASS,
  50.   NODE_VISITED_PSCLASS,
  51.   NODE_LINK_PSCLASS,
  52.   NODE_SIMPLE_SELECTOR_ID_SELECTOR,
  53.   NODE_SIMPLE_SELECTOR_DOT_AND_CLASS,
  54.   NODE_SIMPLE_SELECTOR_NAME_PSEUDO_CLASS,
  55.   NODE_SIMPLE_SELECTOR_NAME_ONLY,
  56.   NODE_SIMPLE_SELECTOR_NAME_AND_CLASS,
  57.   NODE_SIMPLE_SELECTOR_NAME_CLASS_PSEUDO_CLASS,
  58.   NODE_SIMPLE_SELECTOR_LIST,
  59.   NODE_SELECTOR,
  60.   NODE_SELECTOR_CONTEXTUAL,
  61.   NODE_DECLARATION_LIST,
  62.   NODE_SELECTOR_LIST,
  63.   NODE_PROPERTY,
  64.   NODE_TERM_OP,
  65.   NODE_EXPR_OP,
  66.   NODE_EMPTY_OP,
  67.   NODE_UNARY_OP,
  68.   NODE_RULESET,
  69.   NODE_RULESET_LIST,
  70.   NODE_SIMPLE_SELECTOR_PSEUDO_CLASS,
  71.   NODE_ELEMENT_NAME,
  72.   NODE_WILD,
  73.   NODE_FONTDEF_LIST
  74. };
  75.  
  76. extern css_node css_tree_root;         /* root of parse tree */
  77. #ifdef LEX
  78. extern unsigned char css_text[];
  79. #else 
  80. extern char *css_text;
  81. #endif
  82.  
  83. extern int  css_lex(void);
  84. extern int  css_error(const char * diagnostic);
  85. extern int  css_parse(void);
  86. extern int  css_wrap(void);
  87. extern void  css_GetBuf(char * buf, int * result, int max_to_read);
  88. extern void css_FreeNode(css_node node);
  89.  
  90. #endif
  91.