1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*- 2 * gtksourcestylescheme.h 3 * 4 * Copyright (C) 2003 - Paolo Maggi <paolo.maggi@polito.it> 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 21 #ifndef __GTK_SOURCE_STYLE_SCHEME_H__ 22 #define __GTK_SOURCE_STYLE_SCHEME_H__ 23 24 #include <gtk/gtk.h> 25 #include <gtksourceview/gtksourcestyle.h> 26 27 G_BEGIN_DECLS 28 29 #define GTK_TYPE_SOURCE_STYLE_SCHEME (gtk_source_style_scheme_get_type ()) 30 #define GTK_SOURCE_STYLE_SCHEME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_STYLE_SCHEME, GtkSourceStyleScheme)) 31 #define GTK_SOURCE_STYLE_SCHEME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOURCE_STYLE_SCHEME, GtkSourceStyleSchemeClass)) 32 #define GTK_IS_SOURCE_STYLE_SCHEME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SOURCE_STYLE_SCHEME)) 33 #define GTK_IS_SOURCE_STYLE_SCHEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOURCE_STYLE_SCHEME)) 34 #define GTK_SOURCE_STYLE_SCHEME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SOURCE_STYLE_SCHEME, GtkSourceStyleSchemeClass)) 35 36 typedef struct _GtkSourceStyleScheme GtkSourceStyleScheme; 37 typedef struct _GtkSourceStyleSchemePrivate GtkSourceStyleSchemePrivate; 38 typedef struct _GtkSourceStyleSchemeClass GtkSourceStyleSchemeClass; 39 40 struct _GtkSourceStyleScheme 41 { 42 GObject base; 43 GtkSourceStyleSchemePrivate *priv; 44 }; 45 46 struct _GtkSourceStyleSchemeClass 47 { 48 GObjectClass base_class; 49 50 /* Padding for future expansion */ 51 void (*_gtk_source_reserved1) (void); 52 void (*_gtk_source_reserved2) (void); 53 }; 54 55 GType gtk_source_style_scheme_get_type (void) G_GNUC_CONST; 56 57 GtkSourceStyleScheme *_gtk_source_style_scheme_new (const gchar *id, 58 const gchar *name); 59 60 const gchar *gtk_source_style_scheme_get_id (GtkSourceStyleScheme *scheme); 61 const gchar *gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme); 62 const gchar *gtk_source_style_scheme_get_description(GtkSourceStyleScheme *scheme); 63 64 G_CONST_RETURN gchar* G_CONST_RETURN * 65 gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme); 66 67 const gchar *gtk_source_style_scheme_get_filename (GtkSourceStyleScheme *scheme); 68 69 GtkSourceStyle *gtk_source_style_scheme_get_style (GtkSourceStyleScheme *scheme, 70 const gchar *style_id); 71 GtkSourceStyleScheme *_gtk_source_style_scheme_new_from_file (const gchar *filename); 72 GtkSourceStyleScheme *_gtk_source_style_scheme_get_default (void); 73 const gchar *_gtk_source_style_scheme_get_parent_id (GtkSourceStyleScheme *scheme); 74 void _gtk_source_style_scheme_set_parent (GtkSourceStyleScheme *scheme, 75 GtkSourceStyleScheme *parent_scheme); 76 77 /* private */ 78 void _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme, 79 GtkWidget *widget); 80 GtkSourceStyle *_gtk_source_style_scheme_get_matching_brackets_style 81 (GtkSourceStyleScheme *scheme); 82 GtkSourceStyle *_gtk_source_style_scheme_get_right_margin_style 83 (GtkSourceStyleScheme *scheme); 84 GtkSourceStyle *_gtk_source_style_scheme_get_draw_spaces_style 85 (GtkSourceStyleScheme *scheme); 86 gboolean _gtk_source_style_scheme_get_current_line_color 87 (GtkSourceStyleScheme *scheme, 88 GdkColor *color); 89 G_END_DECLS 90 91 #endif /* __GTK_SOURCE_STYLE_SCHEME_H__ */ 92