diff --git a/src/ui_loader/ui_builder.c b/src/base/ui_builder.c similarity index 98% rename from src/ui_loader/ui_builder.c rename to src/base/ui_builder.c index 8aaf353c8..f0f6da1a6 100644 --- a/src/ui_loader/ui_builder.c +++ b/src/base/ui_builder.c @@ -19,7 +19,7 @@ * */ -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" ret_t ui_builder_on_widget_start(ui_builder_t* b, const widget_desc_t* desc) { return_value_if_fail(b != NULL && b->on_widget_start != NULL && desc != NULL, RET_BAD_PARAMS); diff --git a/src/ui_loader/ui_builder.h b/src/base/ui_builder.h similarity index 100% rename from src/ui_loader/ui_builder.h rename to src/base/ui_builder.h diff --git a/src/base/view.c b/src/base/view.c old mode 100644 new mode 100755 index 67a37545a..214544eeb --- a/src/base/view.c +++ b/src/base/view.c @@ -1,4 +1,4 @@ -/** +/** * File: view.h * Author: AWTK Develop Team * Brief: view @@ -23,7 +23,7 @@ #include "base/view.h" static const widget_vtable_t s_view_vtable = { - .size = sizeof(view_t), .type_name = WIDGET_TYPE_VIEW, .properties = view_create}; + .size = sizeof(view_t), .type_name = WIDGET_TYPE_VIEW, .create = view_create}; widget_t* view_create(widget_t* parent, xy_t x, xy_t y, wh_t w, wh_t h) { widget_t* widget = NULL; diff --git a/src/ui_loader/ui_binary_writer.c b/src/ui_loader/ui_binary_writer.c index 5c96c8e92..a06d1bce2 100644 --- a/src/ui_loader/ui_binary_writer.c +++ b/src/ui_loader/ui_binary_writer.c @@ -23,7 +23,7 @@ #include "base/enums.h" #include "base/utf8.h" #include "base/value.h" -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" #include "ui_loader/ui_loader_default.h" #include "ui_loader/ui_binary_writer.h" diff --git a/src/ui_loader/ui_binary_writer.h b/src/ui_loader/ui_binary_writer.h index 7703f2859..34fa2eb52 100644 --- a/src/ui_loader/ui_binary_writer.h +++ b/src/ui_loader/ui_binary_writer.h @@ -23,7 +23,7 @@ #define TK_UI_BINARY_WRITER_H #include "base/buffer.h" -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" BEGIN_C_DECLS diff --git a/src/ui_loader/ui_builder_default.h b/src/ui_loader/ui_builder_default.h index aca3725c3..1719f4d02 100755 --- a/src/ui_loader/ui_builder_default.h +++ b/src/ui_loader/ui_builder_default.h @@ -22,7 +22,7 @@ #ifndef TK_UI_BUILDER_DEFAULT_H #define TK_UI_BUILDER_DEFAULT_H -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" BEGIN_C_DECLS diff --git a/src/ui_loader/ui_loader.h b/src/ui_loader/ui_loader.h index 0e3f017a5..976ee3811 100644 --- a/src/ui_loader/ui_loader.h +++ b/src/ui_loader/ui_loader.h @@ -22,7 +22,7 @@ #ifndef TK_UI_LOADER_H #define TK_UI_LOADER_H -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" BEGIN_C_DECLS diff --git a/src/ui_loader/ui_xml_writer.c b/src/ui_loader/ui_xml_writer.c old mode 100644 new mode 100755 index b2b380e12..666bff150 --- a/src/ui_loader/ui_xml_writer.c +++ b/src/ui_loader/ui_xml_writer.c @@ -1,4 +1,4 @@ -/** +/** * File: ui_xml_writer.c * Author: AWTK Develop Team * Brief: ui_builder write widget info into buffer. @@ -20,7 +20,7 @@ */ #include "base/utils.h" -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" #include "ui_loader/ui_xml_writer.h" static ret_t str_write_n_char(str_t* str, char c, uint32_t nr) { @@ -137,7 +137,7 @@ static ret_t ui_xml_writer_on_widget_start(ui_builder_t* b, const widget_desc_t* return_value_if_fail(str_append(str, "<") == RET_OK, RET_OOM); return_value_if_fail(str_append(str, tag) == RET_OK, RET_OOM); - return ui_xml_writer_write_widget_layout(str, &(desc->layout)); + return ui_xml_writer_write_widget_layout(str, (widget_layout_t*)&(desc->layout)); } static ret_t ui_xml_writer_on_widget_prop(ui_builder_t* b, const char* name, const char* value) { diff --git a/src/ui_loader/ui_xml_writer.h b/src/ui_loader/ui_xml_writer.h index db122d921..594b39c5c 100644 --- a/src/ui_loader/ui_xml_writer.h +++ b/src/ui_loader/ui_xml_writer.h @@ -23,7 +23,7 @@ #define TK_UI_XML_WRITER_H #include "base/str.h" -#include "ui_loader/ui_builder.h" +#include "base/ui_builder.h" BEGIN_C_DECLS