Subversion Repositories Kolibri OS

Rev

Rev 4364 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4364 Rev 5043
Line 33... Line 33...
33
#include "utils/log.h"
33
#include "utils/log.h"
34
#include 
34
#include 
Line 35... Line 35...
35
 
35
 
Line -... Line 36...
-
 
36
#include "widget.h"
-
 
37
 
-
 
38
#ifdef DBG
-
 
39
#undef DBG
-
 
40
#endif
-
 
41
//#define DBG(s) __menuet__debug_out(s) /* For the debug messages in BOARD */
-
 
42
#define DBG(s) LOG((s))            /* So that we see debug in Netsurf's LOG files */
36
#include "widget.h"
43
 
37
 
44
 
38
static int
45
static int
39
fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
46
fb_redraw_bitmap(fbtk_widget_t *widget, fbtk_callback_info *cbi)
40
{
47
{
41
	LOG(("REDRAW BITMAP"));
48
	/* LOG(("REDRAW BITMAP")); */
42
	//__menuet__debug_out("REDRAW BITMAP");
49
	//DBG("REDRAW BITMAP");
43
	nsfb_bbox_t bbox;
50
	nsfb_bbox_t bbox;
Line 44... Line 51...
44
	nsfb_bbox_t rect;
51
	nsfb_bbox_t rect;
45
	nsfb_t *nsfb;
52
	nsfb_t *nsfb;
Line 46... Line 53...
46
 
53
 
Line 47... Line 54...
47
	LOG(("REDRAW BITMAP 1 "));
54
	/* LOG(("REDRAW BITMAP 1 ")); */
48
	//__menuet__debug_out("REDRAW BITMAP 1");
55
	//DBG("REDRAW BITMAP 1");
Line 49... Line 56...
49
 
56
 
Line 50... Line 57...
50
 
57
 
Line 51... Line 58...
51
	nsfb = fbtk_get_nsfb(widget);
58
	nsfb = fbtk_get_nsfb(widget);
52
 
59
 
Line 53... Line 60...
53
	LOG(("REDRAW BITMAP 2"));
60
	/* LOG(("REDRAW BITMAP 2")); */
Line 54... Line 61...
54
	//__menuet__debug_out("REDRAW BITMAP 2");
61
	//DBG("REDRAW BITMAP 2");
55
 
62
 
Line 56... Line 63...
56
 
63
 
57
	fbtk_get_bbox(widget, &bbox);
64
	fbtk_get_bbox(widget, &bbox);
58
 
65
 
Line 59... Line 66...
59
	rect = bbox;
66
	rect = bbox;
60
 
67
 
Line 61... Line 68...
61
	LOG(("REDRAW BITMAP 3 "));
68
	/* LOG(("REDRAW BITMAP 3 ")); */
62
	//__menuet__debug_out("REDRAW BITMAP 3");
69
	//DBG("REDRAW BITMAP 3");
Line 63... Line 70...
63
 
70
 
64
 
71
 
Line 65... Line 72...
65
	nsfb_claim(nsfb, &bbox);
72
	nsfb_claim(nsfb, &bbox);
Line 66... Line 73...
66
 
73
 
67
	LOG(("REDRAW BITMAP 4"));
74
	/* LOG(("REDRAW BITMAP 4")); */
Line 68... Line 75...
68
	//__menuet__debug_out("REDRAW BITMAP 4");
75
	//DBG("REDRAW BITMAP 4");
69
 
76
 
70
	/* clear background */
77
	/* clear background */
Line 71... Line 78...
71
	if ((widget->bg & 0xFF000000) != 0) {
78
	if ((widget->bg & 0xFF000000) != 0) {
Line 72... Line 79...
72
		/* transparent polygon filling isnt working so fake it */
79
		/* transparent polygon filling isnt working so fake it */
73
		
80
		
Line 110... Line 117...
110
	
117
	
111
	
118
	
Line 112... Line 119...
112
		
119
		
Line 113... Line 120...
113
	
120
	
114
	
121
	
Line 115... Line 122...
115
	LOG(("REDRAW BITMAP 7"));
122
	/* LOG(("REDRAW BITMAP 7")); */
116
	//__menuet__debug_out("REDRAW BITMAP 7\n");
123
	//DBG("REDRAW BITMAP 7\n");
Line 117... Line 124...
117
 
124
 
118
	nsfb_update(nsfb, &bbox);
125
	nsfb_update(nsfb, &bbox);
119
 
126
 
120
	LOG(("REDRAW BITMAP OK\n"));
127
	/* LOG(("REDRAW BITMAP OK\n")); */
121
	//__menuet__debug_out("REDRAW BITMAP OK\n");
128
	//DBG("REDRAW BITMAP OK\n");
122
 
129
 
123
	return 0;
130
	return 0;
124
}
131
}
Line 125... Line 132...
125
 
132
 
Line 145... Line 152...
145
		   int width,
152
		   int width,
146
		   int height,
153
		   int height,
147
		   colour c,
154
		   colour c,
148
		   struct fbtk_bitmap *image)
155
		   struct fbtk_bitmap *image)
149
{
156
{
150
	LOG(("CREATE BITMAP"));
157
	/* LOG(("CREATE BITMAP")); */
151
	//__menuet__debug_out("cr BITMAP");
158
	//DBG("cr BITMAP");
152
	fbtk_widget_t *neww;
159
	fbtk_widget_t *neww;
Line 153... Line 160...
153
 
160
 
Line 154... Line 161...
154
	neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
161
	neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
Line 174... Line 181...
174
		   fbtk_callback click,
181
		   fbtk_callback click,
175
		   void *pw)
182
		   void *pw)
176
{
183
{
177
	fbtk_widget_t *neww;
184
	fbtk_widget_t *neww;
Line 178... Line 185...
178
 
185
 
179
	LOG(("CREATE BUTTON BITMAP"));
186
	/* LOG(("CREATE BUTTON BITMAP")); */
180
	//__menuet__debug_out("cr bb BITMAP");
187
	//DBG("cr bb BITMAP");
Line 181... Line 188...
181
	neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
188
	neww = fbtk_widget_new(parent, FB_WIDGET_TYPE_BITMAP, x, y, width, height);
182
 
189
 
183
	neww->bg = c;
190
	neww->bg = c;