Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3584 sourcerer 1
/*
2
 * Copyright 2010 Vincent Sanders 
3
 *
4
 * Framebuffer windowing toolkit user widget.
5
 *
6
 * This file is part of NetSurf, http://www.netsurf-browser.org/
7
 *
8
 * NetSurf is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; version 2 of the License.
11
 *
12
 * NetSurf is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see .
19
 */
20
 
21
#include 
22
#include 
23
#include 
24
 
25
#include "desktop/plotters.h"
26
#include "framebuffer/gui.h"
27
#include "framebuffer/fbtk.h"
28
 
29
#include "widget.h"
30
 
31
/* exported function documented in fbtk.h */
32
void *
33
fbtk_get_userpw(fbtk_widget_t *widget)
34
{
35
	if ((widget == NULL) ||
36
	    (widget->type != FB_WIDGET_TYPE_USER))
37
		return NULL;
38
 
39
	return widget->u.user.pw;
40
}
41
 
42
/* exported function documented in fbtk.h */
43
fbtk_widget_t *
44
fbtk_create_user(fbtk_widget_t *parent,
45
		 int x,
46
		 int y,
47
		 int width,
48
		 int height,
49
		 void *pw)
50
{
51
	fbtk_widget_t *neww;
52
 
53
	neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_USER, x, y, width, height);
54
	neww->u.user.pw = pw;
55
	neww->mapped = true;
56
 
57
	return neww;
58
}
59
 
60
/*
61
 * Local Variables:
62
 * c-basic-offset:8
63
 * End:
64
 */