mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 11:08:34 +08:00
move ui_builder to base
This commit is contained in:
parent
f29501ef27
commit
e803492b41
@ -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);
|
4
src/base/view.c
Normal file → Executable file
4
src/base/view.c
Normal file → Executable file
@ -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;
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
6
src/ui_loader/ui_xml_writer.c
Normal file → Executable file
6
src/ui_loader/ui_xml_writer.c
Normal file → Executable file
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user