aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/separator.c
blob: 02c75da536be99006869f1d68d2d26551d855f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// 11 june 2015
#include "uipriv_unix.h"

struct uiSeparator {
	uiUnixControl c;
	GtkWidget *widget;
	GtkSeparator *separator;
};

uiUnixControlAllDefaults(uiSeparator)

uiSeparator *uiNewHorizontalSeparator(void)
{
	uiSeparator *s;

	uiUnixNewControl(uiSeparator, s);

	s->widget = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
	s->separator = GTK_SEPARATOR(s->widget);

	return s;
}

uiSeparator *uiNewVerticalSeparator(void)
{
	uiSeparator *s;

	uiUnixNewControl(uiSeparator, s);

	s->widget = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
	s->separator = GTK_SEPARATOR(s->widget);

	return s;
}