/* Copyright(C) 2010- , JIELI TECHNOLOGY, Inc. * All right reserved. */ /* ------------------------------------------------------------------------------------*/ /** * @file ui_button.h * * @brief 杰理UI按钮控件API * * @author * * @version V1.0.0 * * @date 2024-06-13 */ /* ------------------------------------------------------------------------------------*/ #ifndef __UI_BUTTON_WIDGET_H__ #define __UI_BUTTON_WIDGET_H__ #include "jlui/control.h" #include "jlui/ui_core.h" /* ------------------------------------------------------------------------------------*/ /** * @brief 按钮控件句柄结构 */ /* ------------------------------------------------------------------------------------*/ struct button { struct element elm; u8 image_index; // 图片索引 u32 css[2]; // CSS属性指针 const struct ui_button_info *info; const struct element_event_handler *handler; }; // 84byte /* ------------------------------------------------------------------------------------*/ /** * @brief 通过ID获取图片控件句柄 */ /* ------------------------------------------------------------------------------------*/ #define ui_button_for_id(id) \ ui_element_for_id(id, struct button) /* ------------------------------------------------------------------------------------*/ /** * @brief ui_button_enable 按钮控件使能(内部调用) */ /* ------------------------------------------------------------------------------------*/ void ui_button_enable(); #endif