1 /***************************************************************************
4 * Mi Mär 29 23:23:09 2006
5 * Copyright 2006 Johannes Schmid
7 ***************************************************************************/
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Library General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 #ifndef ASSIST_WINDOW_H
26 #define ASSIST_WINDOW_H
29 #include <glib-object.h>
30 #include <gtk/gtkwindow.h>
31 #include <gtk/gtkentrycompletion.h>
32 #include <gtk/gtktextview.h>
36 #define ASSIST_TYPE_WINDOW (assist_window_get_type ())
37 #define ASSIST_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ASSIST_TYPE_WINDOW, AssistWindow))
38 #define ASSIST_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ASSIST_TYPE_WINDOW, AssistWindowClass))
39 #define ASSIST_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ASSIST_TYPE_WINDOW))
40 #define ASSIST_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ASSIST_TYPE_WINDOW))
41 #define ASSIST_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ASSIST_TYPE_WINDOW, AssistWindowClass))
43 typedef struct _AssistWindow AssistWindow
;
44 typedef struct _AssistWindowPrivate AssistWindowPrivate
;
45 typedef struct _AssistWindowClass AssistWindowClass
;
47 struct _AssistWindow
{
49 AssistWindowPrivate
*priv
;
52 struct _AssistWindowClass
{
53 GtkWindowClass parent_class
;
54 /* Add Signal Functions Here */
55 void (*chosen
)(gint selection
);
59 GType
assist_window_get_type(void);
61 void assist_window_update(AssistWindow
* assistwin
, GList
* suggestions
);
62 gboolean
assist_window_filter_keypress(AssistWindow
* assistwin
, guint keyval
);
63 void assist_window_move(AssistWindow
* assist_win
, gint offset
);
64 const gchar
* assist_window_get_trigger(AssistWindow
* assist_win
);
65 gint
assist_window_get_position(AssistWindow
* assist_win
);
66 gboolean
assist_window_is_active(AssistWindow
* assist_win
);
68 AssistWindow
* assist_window_new(GtkTextView
* view
, gchar
* trigger
, gint position
);
73 #endif /* ASSIST_WINDOW_H */