Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

gtksourcetag.h

00001 /*  gtksourcetag
00002 *  Copyright (C) 2001
00003 * Mikael Hermansson<mikeh@bahnhof.se>
00004 *
00005 *  This program is free software; you can redistribute it and/or modify
00006 *  it under the terms of the GNU Library General Public License as published by
00007 *  the Free Software Foundation; either version 2 of the License, or
00008 *  (at your option) any later version.
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 Library General Public License for more details.
00014 *
00015 *  You should have received a copy of the GNU Library General Public License*  along with this program; if not, write to the Free Software
00016 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017 */
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif /* __cplusplus */
00022 
00023 #include <vdk/regex.h>
00024 
00025 
00026 #define GTK_TYPE_SYNTAX_TAG            (gtk_syntax_tag_get_type ())
00027 #define GTK_SYNTAX_TAG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SYNTAX_TAG, GtkSyntaxTag))
00028 #define GTK_SYNTAX_TAG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SYNTAX_TAG, GtkSyntaxTagClass))
00029 #define GTK_IS_SYNTAX_TAG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SYNTAX_TAG))
00030 #define GTK_IS_SYNTAX_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SYNTAX_TAG))
00031 #define GTK_SYNTAX_TAG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SYNTAX_TAG, GtkSyntaxTagClass))
00032 
00033 #define GTK_TYPE_PATTERN_TAG            (gtk_pattern_tag_get_type ())
00034 #define GTK_PATTERN_TAG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PATTERN_TAG, GtkPatternTag))
00035 #define GTK_PATTERN_TAG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PATTERN_TAG, GtkPatternTagClass))
00036 #define GTK_IS_PATTERN_TAG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PATTERN_TAG))
00037 #define GTK_IS_PATTERN_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PATTERN_TAG))
00038 #define GTK_PATTERN_TAG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PATTERN_TAG, GtkPatternTagClass))
00039 
00040 typedef struct _GtkSourceBufferMatch {
00041   gint startpos;
00042   gint endpos;
00043 }GtkSourceBufferMatch;
00044 
00045 /* FIXME: regex routines is NOT UTF8 compat... */
00046 
00047 typedef struct _Regex
00048 {
00049   struct re_pattern_buffer buf;
00050   struct re_registers reg;
00051   gint len; 
00052 }Regex;
00053 
00054 typedef struct _GtkSyntaxTag GtkSyntaxTag;
00055 typedef struct _GtkSyntaxTagClass GtkSyntaxTagClass;
00056 typedef struct _GtkPatternTag GtkPatternTag;
00057 typedef struct _GtkSyntaxTagClass GtkPatternTagClass;
00058 
00059 struct _GtkSyntaxTag
00060 {
00061   GtkTextTag parent_instance;
00062 
00063   gchar *start;  
00064   Regex reg_start;
00065   Regex reg_end;
00066 };
00067 
00068 struct _GtkSyntaxTagClass
00069 {
00070   GtkTextTagClass parent_class; 
00071 };
00072 
00073 struct _GtkPatternTag
00074 {
00075   GtkTextTag parent_instance;
00076 
00077   Regex reg_pattern;
00078 };
00079 
00080 struct _GtkPatternTagClass
00081 {
00082   GtkTextTagClass parent_class; 
00083 };
00084 
00085 
00086 GType      gtk_syntax_tag_get_type     (void) G_GNUC_CONST;
00087 GtkTextTag* gtk_syntax_tag_new(const gchar *name, const gchar *patternstart, const gchar *patternend);
00088 
00089 GType      gtk_pattern_tag_get_type     (void) G_GNUC_CONST;
00090 GtkTextTag* gtk_pattern_tag_new(const gchar *name, const gchar *pattern);
00091 
00092 gboolean gtk_source_compile_regex (const gchar *pattern, Regex *regex);
00093 
00094 #ifdef __cplusplus
00095 };
00096 #endif

Generated on Sat May 4 23:45:39 2002 for vdk 2.0.1 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002