1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*- 2 * gtksourcecompletionproviderwords.h 3 * This file is part of GtkSourceView 4 * 5 * Copyright (C) 2009 - Jesse van den Kieboom 6 * 7 * gtksourceview is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * gtksourceview is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 22 #ifndef GTK_SOURCE_COMPLETION_WORDS_H 23 #define GTK_SOURCE_COMPLETION_WORDS_H 24 25 #if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION) 26 # if defined (__GNUC__) 27 # warning "Only <gtksourceview/gtksource.h> can be included directly." 28 # elif defined (G_OS_WIN32) 29 # pragma message("Only <gtksourceview/gtksource.h> can be included directly.") 30 # endif 31 #endif 32 33 #include <gtksourceview/gtksourcecompletionprovider.h> 34 #include <gtk/gtk.h> 35 36 G_BEGIN_DECLS 37 38 #define GTK_SOURCE_TYPE_COMPLETION_WORDS (gtk_source_completion_words_get_type ()) 39 #define GTK_SOURCE_COMPLETION_WORDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_SOURCE_TYPE_COMPLETION_WORDS, GtkSourceCompletionWords)) 40 #define GTK_SOURCE_COMPLETION_WORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_SOURCE_TYPE_COMPLETION_WORDS, GtkSourceCompletionWordsClass)) 41 #define GTK_SOURCE_IS_COMPLETION_WORDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_SOURCE_TYPE_COMPLETION_WORDS)) 42 #define GTK_SOURCE_IS_COMPLETION_WORDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_SOURCE_TYPE_COMPLETION_WORDS)) 43 #define GTK_SOURCE_COMPLETION_WORDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_SOURCE_TYPE_COMPLETION_WORDS, GtkSourceCompletionWordsClass)) 44 45 typedef struct _GtkSourceCompletionWords GtkSourceCompletionWords; 46 typedef struct _GtkSourceCompletionWordsClass GtkSourceCompletionWordsClass; 47 typedef struct _GtkSourceCompletionWordsPrivate GtkSourceCompletionWordsPrivate; 48 49 struct _GtkSourceCompletionWords { 50 GObject parent; 51 52 GtkSourceCompletionWordsPrivate *priv; 53 }; 54 55 struct _GtkSourceCompletionWordsClass { 56 GObjectClass parent_class; 57 }; 58 59 GTK_SOURCE_AVAILABLE_IN_ALL 60 GType gtk_source_completion_words_get_type (void) G_GNUC_CONST; 61 62 GTK_SOURCE_AVAILABLE_IN_ALL 63 GtkSourceCompletionWords * 64 gtk_source_completion_words_new (const gchar *name, 65 GdkPixbuf *icon); 66 67 GTK_SOURCE_AVAILABLE_IN_ALL 68 void gtk_source_completion_words_register (GtkSourceCompletionWords *words, 69 GtkTextBuffer *buffer); 70 71 GTK_SOURCE_AVAILABLE_IN_ALL 72 void gtk_source_completion_words_unregister (GtkSourceCompletionWords *words, 73 GtkTextBuffer *buffer); 74 75 G_END_DECLS 76 77 #endif /* GTK_SOURCE_COMPLETION_WORDS_H */ 78