|
Packit |
aa0600 |
/*
|
|
Packit |
aa0600 |
* This file is part of gspell, a spell-checking library.
|
|
Packit |
aa0600 |
*
|
|
Packit |
aa0600 |
* Copyright 2016 - Sébastien Wilmet <swilmet@gnome.org>
|
|
Packit |
aa0600 |
*
|
|
Packit |
aa0600 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
aa0600 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
aa0600 |
* License as published by the Free Software Foundation; either
|
|
Packit |
aa0600 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
aa0600 |
*
|
|
Packit |
aa0600 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
aa0600 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
aa0600 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
aa0600 |
* Lesser General Public License for more details.
|
|
Packit |
aa0600 |
*
|
|
Packit |
aa0600 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit |
aa0600 |
* along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
aa0600 |
*/
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
#include <gspell/gspell.h>
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gint
|
|
Packit |
aa0600 |
main (gint argc,
|
|
Packit |
aa0600 |
gchar **argv)
|
|
Packit |
aa0600 |
{
|
|
Packit |
aa0600 |
GtkWidget *window;
|
|
Packit |
aa0600 |
GtkWidget *scrolled_window;
|
|
Packit |
aa0600 |
GtkTextView *gtk_view;
|
|
Packit |
aa0600 |
GspellTextView *gspell_view;
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gtk_init (&argc, &argv);
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
Packit |
aa0600 |
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
|
Packit |
aa0600 |
g_signal_connect (window, "destroy", gtk_main_quit, NULL);
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gtk_view = GTK_TEXT_VIEW (gtk_text_view_new ());
|
|
Packit |
aa0600 |
gspell_view = gspell_text_view_get_from_gtk_text_view (gtk_view);
|
|
Packit |
aa0600 |
gspell_text_view_basic_setup (gspell_view);
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
|
Packit |
aa0600 |
g_object_set (scrolled_window,
|
|
Packit |
aa0600 |
"expand", TRUE,
|
|
Packit |
aa0600 |
"margin", 6,
|
|
Packit |
aa0600 |
NULL);
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET (gtk_view));
|
|
Packit |
aa0600 |
gtk_container_add (GTK_CONTAINER (window), scrolled_window);
|
|
Packit |
aa0600 |
gtk_widget_show_all (window);
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gtk_main ();
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
return 0;
|
|
Packit |
aa0600 |
}
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
/* ex:set ts=8 noet: */
|