1/*
2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Library General Public
4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Library General Public License for more details.
11 *
12 * You should have received a copy of the GNU Library General Public
13 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
14 */
15
16#include "config.h"
17
18#include <gtk/gtk.h>
19
20static void
21set_border_window_size (GtkTextView *text_view,
22 GtkTextWindowType win,
23 int size)
24{
25 GtkWidget *label;
26
27 label = gtk_label_new (NULL);
28 gtk_widget_set_size_request (widget: label, width: size, height: size);
29 gtk_text_view_set_gutter (text_view, win, widget: label);
30}
31
32G_MODULE_EXPORT void
33add_border_windows (GtkTextView *text_view)
34{
35 set_border_window_size (text_view, win: GTK_TEXT_WINDOW_LEFT, size: 30);
36 set_border_window_size (text_view, win: GTK_TEXT_WINDOW_RIGHT, size: 30);
37 set_border_window_size (text_view, win: GTK_TEXT_WINDOW_TOP, size: 30);
38 set_border_window_size (text_view, win: GTK_TEXT_WINDOW_BOTTOM, size: 30);
39}
40

source code of gtk/testsuite/reftests/textview-border-windows.c