merge new RTGUI in to trunk

The full log is at https://github.com/RTGUI/RTGUI/commits/merge_1 and it's difficult to merge the new tree commit by commit. I also converted all the file into unix eol so there are many fake diff. Big changes are noted in rtgui/doc/road_map.txt and rtgui/doc/attention.txt. Keep an eye on them if you want to migrate your old code.

Note that the work is still in progress and the bsp is not prepared in trunk so far.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2092 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
chaos.proton@gmail.com
2012-04-18 15:06:12 +00:00
parent 06d45f0c42
commit db06460208
140 changed files with 17246 additions and 17942 deletions
+11 -8
View File
@@ -14,13 +14,13 @@
#include <rtgui/dc.h>
#include <rtgui/rtgui_theme.h>
#include <rtgui/widgets/button.h>
#include <rtgui/widgets/toplevel.h>
#include <rtgui/widgets/window.h>
static void _rtgui_button_constructor(rtgui_button_t *button)
{
/* init widget and set event handler */
RTGUI_WIDGET(button)->flag |= RTGUI_WIDGET_FLAG_FOCUSABLE;
rtgui_widget_set_event_handler(RTGUI_WIDGET(button), rtgui_button_event_handler);
rtgui_object_set_event_handler(RTGUI_OBJECT(button), rtgui_button_event_handler);
/* un-press button */
button->flag = 0;
@@ -57,13 +57,16 @@ DEFINE_CLASS_TYPE(button, "button",
_rtgui_button_destructor,
sizeof(struct rtgui_button));
rt_bool_t rtgui_button_event_handler(struct rtgui_widget* widget, struct rtgui_event* event)
rt_bool_t rtgui_button_event_handler(struct rtgui_object* object, struct rtgui_event* event)
{
struct rtgui_button* btn;
struct rtgui_widget *widget;
struct rtgui_button *btn;
RT_ASSERT(widget != RT_NULL);
RT_ASSERT(event != RT_NULL);
btn = (struct rtgui_button*) widget;
widget = RTGUI_WIDGET(object);
btn = RTGUI_BUTTON(widget);
switch (event->type)
{
case RTGUI_EVENT_PAINT:
@@ -150,10 +153,10 @@ rt_bool_t rtgui_button_event_handler(struct rtgui_widget* widget, struct rtgui_e
if (emouse->button & RTGUI_MOUSE_BUTTON_LEFT)
{
/* set the last mouse event handled widget */
rtgui_toplevel_t* toplevel;
struct rtgui_win* win;
toplevel = RTGUI_TOPLEVEL(RTGUI_WIDGET(btn)->toplevel);
toplevel->last_mevent_widget = RTGUI_WIDGET(btn);
win = RTGUI_WIN(RTGUI_WIDGET(btn)->toplevel);
win->last_mevent_widget = RTGUI_WIDGET(btn);
/* it's a normal button */
if (emouse->button & RTGUI_MOUSE_BUTTON_DOWN)