1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; coding: utf-8 -*-
2  * gtksourcecompletioninfo.h
3  * This file is part of gtksourcecompletion
4  *
5  * Copyright (C) 2007 - 2009 Jesús Barbero Rodríguez <chuchiperriman@gmail.com>
6  * Copyright (C) 2009 - Jesse van den Kieboom <jessevdk@gnome.org>
7  *
8  * gtksourceview is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * gtksourceview is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22 
23 #ifndef __GTK_SOURCE_COMPLETION_INFO_H__
24 #define __GTK_SOURCE_COMPLETION_INFO_H__
25 
26 #include <glib-object.h>
27 #include <gtk/gtk.h>
28 
29 G_BEGIN_DECLS
30 
31 #define GTK_TYPE_SOURCE_COMPLETION_INFO             (gtk_source_completion_info_get_type ())
32 #define GTK_SOURCE_COMPLETION_INFO(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_COMPLETION_INFO, GtkSourceCompletionInfo))
33 #define GTK_SOURCE_COMPLETION_INFO_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOURCE_COMPLETION_INFO, GtkSourceCompletionInfoClass)
34 #define GTK_IS_SOURCE_COMPLETION_INFO(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SOURCE_COMPLETION_INFO))
35 #define GTK_IS_SOURCE_COMPLETION_INFO_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOURCE_COMPLETION_INFO))
36 #define GTK_SOURCE_COMPLETION_INFO_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SOURCE_COMPLETION_INFO, GtkSourceCompletionInfoClass))
37 
38 typedef struct _GtkSourceCompletionInfoPrivate GtkSourceCompletionInfoPrivate;
39 
40 typedef struct _GtkSourceCompletionInfo GtkSourceCompletionInfo;
41 
42 struct _GtkSourceCompletionInfo
43 {
44 	GtkWindow parent;
45 
46 	GtkSourceCompletionInfoPrivate *priv;
47 };
48 
49 typedef struct _GtkSourceCompletionInfoClass GtkSourceCompletionInfoClass;
50 
51 struct _GtkSourceCompletionInfoClass
52 {
53 	GtkWindowClass parent_class;
54 
55 	void	(*before_show)	(GtkSourceCompletionInfo *info);
56 };
57 
58 GType		 gtk_source_completion_info_get_type		(void) G_GNUC_CONST;
59 
60 GtkSourceCompletionInfo *
61 		 gtk_source_completion_info_new			(void);
62 
63 void		 gtk_source_completion_info_move_to_iter	(GtkSourceCompletionInfo *info,
64 								 GtkTextView             *view,
65 								 GtkTextIter             *iter);
66 
67 void		 gtk_source_completion_info_set_sizing		(GtkSourceCompletionInfo *info,
68 								 gint                     width,
69 								 gint                     height,
70 								 gboolean                 shrink_width,
71 								 gboolean                 shrink_height);
72 
73 void		 gtk_source_completion_info_set_widget		(GtkSourceCompletionInfo *info,
74 								 GtkWidget               *widget);
75 
76 GtkWidget	*gtk_source_completion_info_get_widget		(GtkSourceCompletionInfo *info);
77 
78 void		 gtk_source_completion_info_process_resize	(GtkSourceCompletionInfo *info);
79 
80 G_END_DECLS
81 
82 #endif /* __GTK_SOURCE_COMPLETION_INFO_H__ */
83