CARPLAY版本整理
This commit is contained in:
110
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/XM_event.h
Normal file
110
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/XM_event.h
Normal file
@ -0,0 +1,110 @@
|
||||
#ifndef XM_EVENT_H
|
||||
#define XM_EVENT_H
|
||||
|
||||
#ifdef NINE
|
||||
#include ".\nine\nine_event.h"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
XM_EVENT_FIRST = 0,
|
||||
XM_EVENT_KEYDOWN = 0,
|
||||
XM_EVENT_KEYUP,
|
||||
XM_EVENT_TOUCHDOWN,
|
||||
XM_EVENT_TOUCHUP,
|
||||
XM_EVENT_TOUCHMOVE,
|
||||
XM_EVENT_TEXTINPUT,
|
||||
|
||||
#ifdef NINE
|
||||
XM_EVENT_NINE,
|
||||
#endif
|
||||
|
||||
XM_EVENT_TIMER,
|
||||
XM_EVENT_LAST
|
||||
};
|
||||
|
||||
typedef struct XM_KeyboardEvent
|
||||
{
|
||||
unsigned int type; // KEYDOWN or KEYUP
|
||||
unsigned int timestamp; // In milliseconds
|
||||
unsigned int scancode;
|
||||
unsigned char press; // PRESSED or RELEASED
|
||||
unsigned char repeat; // Non-zero if this is a key repeat
|
||||
} XM_KeyboardEvent;
|
||||
|
||||
|
||||
typedef struct XM_TouchEvent
|
||||
{
|
||||
unsigned int type; // MOUSEMOTION
|
||||
unsigned int timestamp; // In milliseconds
|
||||
//unsigned int press; // PRESSED
|
||||
int x; /**< X coordinate, relative to window */
|
||||
int y; /**< Y coordinate, relative to window */
|
||||
int xrel; /**< The relative motion in the X direction */
|
||||
int yrel; /**< The relative motion in the Y direction */
|
||||
} XM_TouchEvent;
|
||||
|
||||
#define XM_TEXTINPUTEVENT_TEXT_SIZE (32)
|
||||
/**
|
||||
* \brief Keyboard text input event structure (event.text.*)
|
||||
*/
|
||||
typedef struct XM_TextInputEvent
|
||||
{
|
||||
unsigned int type; /**< ::SDL_TEXTINPUT */
|
||||
unsigned int timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
char text[XM_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
|
||||
} XM_TextInputEvent;
|
||||
|
||||
#ifdef NINE
|
||||
typedef struct XM_NineEvent
|
||||
{
|
||||
unsigned int type; /**< ::NINE */
|
||||
unsigned int timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
nine_event_t event;
|
||||
} XM_NineEvent;
|
||||
#endif
|
||||
|
||||
typedef struct _XM_EVENT {
|
||||
unsigned int type;
|
||||
union {
|
||||
XM_KeyboardEvent key;
|
||||
XM_TouchEvent tp;
|
||||
XM_TextInputEvent text;
|
||||
#ifdef NINE
|
||||
XM_NineEvent nine;
|
||||
#endif
|
||||
};
|
||||
} XM_EVENT;
|
||||
|
||||
// 投递触摸事件到事件消息队列
|
||||
// 返回值定义
|
||||
// 1 事件投递到事件缓冲队列成功
|
||||
// 0 事件投递到事件缓冲队列失败
|
||||
int XM_TpEventProc (unsigned int tp_event, unsigned int xPos, unsigned int yPos, unsigned int ticket);
|
||||
|
||||
// 投递按键事件到事件消息队列
|
||||
// scancode 扫描码
|
||||
// press 按键是否按下 1 按下 0 释放
|
||||
// repeat 是否重复键
|
||||
// 返回值定义
|
||||
// 1 事件投递到事件缓冲队列成功
|
||||
// 0 事件投递到事件缓冲队列失败
|
||||
int XM_KeyEventProc(unsigned int key_event, unsigned int scancode, unsigned char press, unsigned char repeat, unsigned int ticket);
|
||||
|
||||
// 投递UTF8字符串事件到事件消息队列
|
||||
// text UTF8编码的字符串, 以'\0'结束
|
||||
int XM_TextInputEventProc(const char *text, unsigned int ticket);
|
||||
|
||||
#ifdef NINE
|
||||
// 投递NINE事件到事件消息队列
|
||||
// nine_event nine事件
|
||||
// ticket 事件时间戳
|
||||
// 返回值定义
|
||||
// 1 事件投递到事件缓冲队列成功
|
||||
// 0 事件投递到事件缓冲队列失败
|
||||
int XM_NineEventProc(nine_event_t *nine_event, unsigned int ticket);
|
||||
#endif
|
||||
|
||||
// 等待外部事件
|
||||
int XM_WaitEvent (XM_EVENT *event, unsigned int timeout);
|
||||
|
||||
#endif
|
19
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/canvasvg.h
Normal file
19
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/canvasvg.h
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
#ifndef _CANVASVG_H
|
||||
#define _CANVASVG_H
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int CanvasvgInit (void);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _CANVASVG_H */
|
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* File: main_loop_xm.h
|
||||
* Author: ZhuoYongHong
|
||||
* Brief: XM implemented main_loop interface
|
||||
*
|
||||
* Copyright (c) 2021 - 2025 ShenZhen ExceedSpace Electronics Co.,Ltd.
|
||||
*
|
||||
* this program is distributed in the hope that it will be useful,
|
||||
* but without any warranty; without even the implied warranty of
|
||||
* merchantability or fitness for a particular purpose. see the
|
||||
* license file for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* history:
|
||||
* ================================================================
|
||||
* 2021-04-17 ZhuoYongHong created
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TK_MAIN_LOOP_XM_H
|
||||
#define TK_MAIN_LOOP_XM_H
|
||||
|
||||
#include "base/main_loop.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
main_loop_t* main_loop_init(int w, int h);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /*TK_MAIN_LOOP_XM_H*/
|
@ -0,0 +1,27 @@
|
||||
#ifndef NANOVG_OPENVG_H
|
||||
#define NANOVG_OPENVG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
// Create flags
|
||||
|
||||
enum NVGcreateFlags {
|
||||
// Flag indicating if geometry based anti-aliasing is used (may not be needed when using MSAA).
|
||||
NVG_ANTIALIAS = 1<<0,
|
||||
// Flag indicating if strokes should be drawn using stencil buffer. The rendering will be a little
|
||||
// slower, but path overlaps (i.e. self-intersecting or sharp turns) will be drawn just once.
|
||||
NVG_STENCIL_STROKES = 1<<1,
|
||||
// Flag indicating that additional debug checks are done.
|
||||
NVG_DEBUG = 1<<2,
|
||||
};
|
||||
|
||||
NVGcontext* nvgCreateOpenVG(int flags, unsigned int w, unsigned int h);
|
||||
void nvgDeleteOpenVG(NVGcontext* ctx);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* NANOVG_OPENVG_H */
|
@ -0,0 +1,689 @@
|
||||
#ifndef NINE_EVENT_H
|
||||
#define NINE_EVENT_H
|
||||
#include "base/events.h"
|
||||
|
||||
#define EVT_NINE_EVT (EVT_USER_START + 1)
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
typedef enum _nine_event_type_t {
|
||||
NINE_EVENT_NONE = 0,
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_IDLE
|
||||
* 待机(无参数)。
|
||||
*/
|
||||
NINE_EVENT_VCU_IDLE,
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_PHONE_CONNECTED
|
||||
* 手机已连接(无参数)。
|
||||
*/
|
||||
NINE_EVENT_VCU_PHONE_CONNECTED,
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_NOT_READY
|
||||
* 未激活。(int32_t state)
|
||||
*/
|
||||
NINE_EVENT_VCU_NOT_READY,
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_READY
|
||||
* 激活。(无参数)
|
||||
*/
|
||||
NINE_EVENT_VCU_READY,
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_CYCLING_MODE
|
||||
* 骑行模式 (int32_t mode)。
|
||||
*/
|
||||
NINE_EVENT_VCU_CYCLING_MODE,
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_UNLOCK_MODE
|
||||
* 解除。(无参数)
|
||||
*/
|
||||
NINE_EVENT_VCU_UNLOCK_MODE,
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_RUNNING_STATUS
|
||||
* 运行中状态 (输出功率、速度、转向角)
|
||||
*/
|
||||
NINE_EVENT_VCU_RUNNING_STATUS,
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_VCU_GEAR
|
||||
* 档位 (正整数)
|
||||
*/
|
||||
NINE_EVENT_VCU_GEAR,
|
||||
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_BLE_UPDATE_SYSTEM
|
||||
* 蓝牙升级事件(无参数)
|
||||
*/
|
||||
NINE_EVENT_VCU_BLE_UPDATE_SYSTEM,
|
||||
/**
|
||||
* @const NINE_EVENT_WIFI_CONNECT,
|
||||
* WIFI连接事件(int32_t,由WiFi驱动层给出)
|
||||
*/
|
||||
NINE_EVENT_WIFI_CONNECT,
|
||||
/**
|
||||
* @const NINE_EVENT_UPDATE_PROCESS,
|
||||
* 升级进度指示 (float_t step)
|
||||
*/
|
||||
NINE_EVENT_UPDATE_PROCESS,
|
||||
/**
|
||||
* @const NINE_EVENT_UPDATE_FINISH,
|
||||
* 升级完成 (0 失败, 1成功)
|
||||
*/
|
||||
NINE_EVENT_UPDATE_FINISH,
|
||||
|
||||
|
||||
/**
|
||||
* @const NINE_EVENT_BASIC_ERROR_DETAILS
|
||||
* 基本错误详情信息 (int32_t code)
|
||||
*/
|
||||
NINE_EVENT_BASIC_ERROR_DETAILS,
|
||||
/**
|
||||
* @const NINE_EVENT_BASIC_ERROR_CLOSE
|
||||
* 基本错误详情收起 (无参数)
|
||||
*/
|
||||
NINE_EVENT_BASIC_ERROR_CLOSE,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_WEATHER_DETAILS,
|
||||
* 天气预警详情信息
|
||||
*/
|
||||
NINE_EVENT_WEATHER_DETAILS,
|
||||
/**
|
||||
* @brief NINE_EVENT_WEATHER_CLOSE,
|
||||
* 天气预警详情收起(无参数)
|
||||
*/
|
||||
NINE_EVENT_WEATHER_CLOSE,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_LOW_BATTERY,
|
||||
* 低电量报警 (int32_t votage[3])
|
||||
*/
|
||||
NINE_EVENT_LOW_BATTERY,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_LONG_AUTO,
|
||||
* 长按AUTO键 (int32_t locked_time, 剩余密码解锁锁定时间)
|
||||
*/
|
||||
NINE_EVENT_KEY_LONG_AUTO,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_AUTO,
|
||||
* AUTO键
|
||||
*/
|
||||
NINE_EVENT_KEY_AUTO,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_TRIGGER,
|
||||
* 扳机键
|
||||
*/
|
||||
NINE_EVENT_KEY_TRIGGER,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_WHEEL,
|
||||
* 滚轮键
|
||||
*/
|
||||
NINE_EVENT_KEY_WHEEL,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_BRAKE,
|
||||
* 刹车键
|
||||
*/
|
||||
NINE_EVENT_KEY_BREAK,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_ADD,
|
||||
* 加法键
|
||||
*/
|
||||
NINE_EVENT_KEY_ADD,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_SUB,
|
||||
* 减法键
|
||||
*/
|
||||
NINE_EVENT_KEY_SUB,
|
||||
/**
|
||||
* @brief NINE_EVENT_KEY_USER,
|
||||
* 自定义键
|
||||
*/
|
||||
NINE_EVENT_KEY_USER,
|
||||
/**
|
||||
* @brief NINE_EVENT_POWER_DISSIPATION,
|
||||
* 功耗数据事件
|
||||
*/
|
||||
NINE_EVENT_POWER_DISSIPATION,
|
||||
/**
|
||||
* @brief NINE_EVENT_POWER_DISSIPATION_REALTIME,
|
||||
* 功率曲线的实时功耗
|
||||
*/
|
||||
NINE_EVENT_POWER_DISSIPATION_REALTIME,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_TRAFFIC_DATA,
|
||||
* 行驶数据
|
||||
*/
|
||||
NINE_EVENT_TRAFFIC_DATA,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_NAVIGATION,
|
||||
* 导航事件
|
||||
*/
|
||||
NINE_EVENT_NAVIGATION,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_HIGH_BEAM,
|
||||
* 远光灯
|
||||
*/
|
||||
NINE_EVENT_HIGH_BEAM,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_LOW_BEAM,
|
||||
* 近光灯
|
||||
*/
|
||||
NINE_EVENT_LOW_BEAM,
|
||||
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_LEFT_TURN,
|
||||
* 左转向灯
|
||||
*/
|
||||
NINE_EVENT_LEFT_TURN,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_RIGHT_TURN,
|
||||
* 右转向灯
|
||||
*/
|
||||
NINE_EVENT_RIGHT_TURN,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_ABS,
|
||||
* ABS
|
||||
*/
|
||||
NINE_EVENT_ABS,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_CRUISE_CONTROL,
|
||||
* 定速巡航
|
||||
*/
|
||||
NINE_EVENT_CRUISE_CONTROL,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_READY,
|
||||
* READY提示
|
||||
*/
|
||||
NINE_EVENT_READY_HINT,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_GSM,
|
||||
* GSM连接强度 4种
|
||||
*/
|
||||
NINE_EVENT_GSM,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_GPS,
|
||||
* GPS强度 3种
|
||||
*/
|
||||
NINE_EVENT_GPS,
|
||||
/**
|
||||
* @brief NINE_EVENT_BLE1,
|
||||
* BLE1 接近解锁蓝牙
|
||||
*/
|
||||
NINE_EVENT_BLE1,
|
||||
/**
|
||||
* @brief NINE_EVENT_BLE2,
|
||||
* BLE2
|
||||
*/
|
||||
NINE_EVENT_BLE2,
|
||||
/**
|
||||
* @brief NINE_EVENT_DATETIME,
|
||||
* 系统时间
|
||||
*/
|
||||
NINE_EVENT_DATETIME,
|
||||
|
||||
NINE_EVENT_ODO,
|
||||
|
||||
NINE_EVENT_TRIP,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_LIGHT_SWITCH,
|
||||
* 光敏日夜切换
|
||||
*/
|
||||
NINE_EVENT_LIGHT_SWITCH,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_THEME_SWITCH,
|
||||
* 主题切换
|
||||
*/
|
||||
NINE_EVENT_THEME_SWITCH,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_PASSWORD,
|
||||
* 密码校验结果 (int32_t)
|
||||
*/
|
||||
NINE_EVENT_PASSWORD,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_PAGE_SWITCH,
|
||||
* 页面切换 (int32_t)
|
||||
*/
|
||||
NINE_EVENT_PAGE_SWITCH,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_REMAINING_MILEAGE,
|
||||
* 电池剩余里程 (int32_t)
|
||||
*/
|
||||
NINE_EVENT_REMAINING_MILEAGE,
|
||||
|
||||
/**
|
||||
* @brief NINE_EVENT_CHARGE_TIME,
|
||||
* 充电剩余时间 (int32_t)
|
||||
*/
|
||||
NINE_EVENT_CHARGE_TIME,
|
||||
|
||||
|
||||
} nine_event_type_t;
|
||||
|
||||
#define NINE_VCU_NOT_READY_STATE_PACK_UP_TEMPLE 1 // 收起边撑后骑行
|
||||
#define NINE_VCU_NOT_READY_STATE_SIT_SIT_BARRELS 2 // 坐上坐桶后骑行
|
||||
#define NINE_VCU_NOT_READY_STATE_PACK_UP_TEMPLE_AND_SIT_SIT_BARRELS 3 // 收起边撑并坐上坐桶后骑行
|
||||
/**
|
||||
* @class nine_vcu_not_ready_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* VCU未激活事件
|
||||
*/
|
||||
typedef struct _nine_vcu_not_ready_event_t {
|
||||
/**
|
||||
* @property {int32_t} mode
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* VCU未激活事件。
|
||||
*/
|
||||
int32_t state;
|
||||
} nine_vcu_not_ready_event_t;
|
||||
|
||||
// 骑行模式
|
||||
#define NINE_VCU_CYCLING_MODE_NONE 0 // 非骑行模式
|
||||
#define NINE_VCU_CYCLING_MODE_HELP_MOVE 1 // 助力推行
|
||||
#define NINE_VCU_CYCLING_MODE_BACK_CAR 2 // 倒车中
|
||||
/**
|
||||
* @class nine_vcu_cycling_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 骑行模式
|
||||
*/
|
||||
typedef struct _nine_vcu_cycling_event_t {
|
||||
/**
|
||||
* @property {int32_t} mode
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 骑行模式。
|
||||
*/
|
||||
int32_t mode;
|
||||
} nine_vcu_cycling_event_t;
|
||||
|
||||
// 运行状态事件(输出功率,速度,转向角)
|
||||
/**
|
||||
* @class nine_vcu_running_status_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 运行状态事件
|
||||
*/
|
||||
typedef struct _nine_vcu_running_status_event_t {
|
||||
/**
|
||||
* @property {float_t} power_output
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 功率输出值。
|
||||
*/
|
||||
float_t power_output;
|
||||
/**
|
||||
* @property {float_t} speed
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 速度。
|
||||
*/
|
||||
float_t speed;
|
||||
/**
|
||||
* @property {float_t} steering_angle
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 转向角
|
||||
*/
|
||||
float_t steering_angle;
|
||||
} nine_vcu_running_status_event_t;
|
||||
|
||||
#define NINE_VCU_GEAR_ASSIT 0
|
||||
#define NINE_VCU_GEAR_ECO 1
|
||||
#define NINE_VCU_GEAR_COAST 2
|
||||
#define NINE_VCU_GEAR_FURIOUS 3
|
||||
// 档位事件
|
||||
/**
|
||||
* @class nine_vcu_gear_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 档位
|
||||
*/
|
||||
typedef struct _nine_vcu_gear_event_t {
|
||||
/**
|
||||
* @property {int32_t} gear
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 档位。
|
||||
*/
|
||||
float_t gear;
|
||||
} nine_vcu_gear_event_t;
|
||||
|
||||
#define NINE_WIFI_STATE_DISCONNECT 0
|
||||
#define NINE_WIFI_STATE_CONNECTING 1
|
||||
#define NINE_WIFI_STATE_CONNECTED 2
|
||||
// WiFi连接事件
|
||||
/**
|
||||
* @class nine_wifi_connect_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* WiFi事件
|
||||
*/
|
||||
typedef struct _nine_wifi_connect_event_t {
|
||||
/**
|
||||
* @property {int32_t} state
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 连接状态。
|
||||
*/
|
||||
int32_t state;
|
||||
} nine_wifi_connect_event_t;
|
||||
|
||||
// 系统升级进度事件
|
||||
/**
|
||||
* @class nine_update_progress_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 升级进度事件
|
||||
*/
|
||||
typedef struct _nine_update_progress_event_t {
|
||||
/**
|
||||
* @property {float_t} step
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 升级进度, 0.0f ~ 1.0f
|
||||
*/
|
||||
float_t step;
|
||||
} nine_update_progress_event_t;
|
||||
|
||||
// 系统升级完成事件
|
||||
/**
|
||||
* @class nine_update_finish_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 升级完成事件
|
||||
*/
|
||||
typedef struct _nine_update_finish_event_t {
|
||||
/**
|
||||
* @property {float_t} result
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 升级完成结果, 0 失败 1 成功
|
||||
*/
|
||||
int32_t result;
|
||||
} nine_update_finish_event_t;
|
||||
|
||||
#define NINE_MAX_BASIC_ERROR_DATA_SIZE 256
|
||||
typedef struct _nine_basic_error_event_t {
|
||||
int32_t code;
|
||||
char text[NINE_MAX_BASIC_ERROR_DATA_SIZE]; // 故障提示的信息正文
|
||||
} nine_basic_error_event_t;
|
||||
|
||||
#define NINE_MAX_WEATHER_TITLE_SIZE 256
|
||||
#define NINE_MAX_WEATHER_DATA_SIZE 256
|
||||
// 天气预警详情信息事件
|
||||
/**
|
||||
* @class nine_weather_details_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 天气预警详情信息事件
|
||||
*/
|
||||
typedef struct _nine_weather_details_event_t {
|
||||
int32_t INTERVAL; // 请求间隔 // 10 60 10 min
|
||||
int32_t SIGN; // 天气预报标识
|
||||
int32_t TEMP; // 天气预报温度 // 50 -50 100
|
||||
int32_t SCALE; // 天气预报风力等级 // 0 0 0x0c
|
||||
int32_t ALERT; // 天气预报是否预警 0x01是 0x02否
|
||||
int8_t TYPE[8]; // 天气预警类型, 允许多条预警A|B|C, 最多8条, 0xff表示无
|
||||
int32_t TIME; // 天气预警时间(uint32_t 时间戳)
|
||||
char title[NINE_MAX_WEATHER_TITLE_SIZE]; // 天气预警标题(多条标题A|B|C会合并为一条title(使用换行符隔离)
|
||||
char text[NINE_MAX_WEATHER_DATA_SIZE]; // 天气预警正文
|
||||
} nine_weather_details_event_t;
|
||||
|
||||
// 低电量报警事件
|
||||
/**
|
||||
* @class nine_low_battery_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 低电量报警事件
|
||||
*/
|
||||
typedef struct _nine_low_battery_event_t {
|
||||
/**
|
||||
* @property {int32_t} votage
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 3块电池的电压值(毫伏单位)
|
||||
*/
|
||||
int32_t votage[3];
|
||||
} nine_low_battery_event_t;
|
||||
|
||||
#define NINE_MAX_POWER_DISSIPATION_DATA_SIZE 1024
|
||||
// 功耗数据事件
|
||||
/**
|
||||
* @class nine_power_dissipation_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 功耗数据事件
|
||||
*/
|
||||
typedef struct _nine_power_dissipation_event_t {
|
||||
/**
|
||||
* @property {char} data
|
||||
* @annotation ["readable", "scriptable"]
|
||||
* 包数据
|
||||
*/
|
||||
short int data[NINE_MAX_POWER_DISSIPATION_DATA_SIZE];
|
||||
int count; // 有效数据格式
|
||||
int index; // 取值索引,即是从该位置开始往后取30个点
|
||||
|
||||
} nine_power_dissipation_event_t;
|
||||
|
||||
// 功耗曲线实时功耗事件
|
||||
/**
|
||||
* @class nine_power_dissipation_realtime_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 功耗曲线实时功耗事件
|
||||
*/
|
||||
typedef struct _nine_power_dissipation_realtime_event_t {
|
||||
int32_t value; // 功率曲线的实时功耗
|
||||
} nine_power_dissipation_realtime_event_t;
|
||||
|
||||
// 功率曲线的行驶数据(时间,里程以及平均速度)
|
||||
/**
|
||||
* @class nine_traffic_data_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 功率曲线的行驶数据
|
||||
*/
|
||||
typedef struct _nine_traffic_data_event_t {
|
||||
int32_t time; // 行驶时间
|
||||
int32_t distance; // 行驶里程
|
||||
int32_t speed; // 行驶s速度
|
||||
} nine_traffic_data_event_t;
|
||||
|
||||
// 导航事件
|
||||
/**
|
||||
* @class nine_navigation_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* @parent event_t
|
||||
* 导航事件
|
||||
*/
|
||||
typedef struct _nine_navigation_event_t {
|
||||
int32_t totalDistance; // 本次导航总距离,单位m
|
||||
int32_t retainDistance; // 剩余总距离,单位m
|
||||
int32_t retainTime; // 剩余总时间, 单位s
|
||||
int iconType; // 下一个导航动作
|
||||
int curStepRetainDis; // 距下一导航动作距离, 单位m
|
||||
int trafficLightNum; // 当前剩余红绿灯个数
|
||||
int gpsStrength; // 当前GPS信号强度
|
||||
char currentRoadName[64]; // 当前路名
|
||||
char nextRoadName[64]; // 下一路名
|
||||
char NavigationText[256]; // 语音播报内容
|
||||
} nine_navigation_event_t;
|
||||
|
||||
typedef struct _nine_high_beam_event_t {
|
||||
int32_t on;
|
||||
} nine_high_beam_event_t;
|
||||
|
||||
typedef struct _nine_low_beam_event_t {
|
||||
int32_t on;
|
||||
} nine_low_beam_event_t;
|
||||
|
||||
typedef struct _nine_cruise_control_event_t {
|
||||
int32_t on;
|
||||
} nine_cruise_control_event_t;
|
||||
|
||||
typedef struct _nine_left_turn_event_t {
|
||||
int32_t on;
|
||||
} nine_left_turn_event_t;
|
||||
|
||||
typedef struct _nine_right_turn_event_t {
|
||||
int32_t on;
|
||||
} nine_right_turn_event_t;
|
||||
|
||||
typedef struct _nine_abs_event_t {
|
||||
int32_t on;
|
||||
} nine_abs_event_t;
|
||||
|
||||
#define NINE_GSM_STATE_NO_SIGNAL 0 // 无信号
|
||||
#define NINE_GSM_STATE_ONE 1 // 1格
|
||||
#define NINE_GSM_STATE_TWO 2 // 2格
|
||||
#define NINE_GSM_STATE_FULL 3 // 满格
|
||||
/**
|
||||
* @class nine_gsm_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* GSM信号强度
|
||||
*/
|
||||
typedef struct _nine_gsm_event_t {
|
||||
int32_t state;
|
||||
} nine_gsm_event_t;
|
||||
|
||||
typedef struct _nine_ready_hint_t {
|
||||
char hint[8];
|
||||
} nine_ready_hint_t;
|
||||
|
||||
#define NINE_GPS_STATE_NO_SIGNAL 0 // 无信号
|
||||
#define NINE_GPS_STATE_STRONG 1 // 强
|
||||
#define NINE_GPS_STATE_WEAK 2 // 弱
|
||||
/**
|
||||
* @class nine_gps_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* GPS信号强度
|
||||
*/
|
||||
typedef struct _nine_gps_event_t {
|
||||
int32_t state;
|
||||
} nine_gps_event_t;
|
||||
|
||||
typedef struct _nine_date_time_event_t {
|
||||
int32_t msec; // 毫秒 (0 ~ 999)
|
||||
int32_t second; // 秒 (0 ~ 59)
|
||||
int32_t minute; // 分 (0 ~ 59)
|
||||
int32_t hour; // 时 (0 ~ 23)
|
||||
int32_t day; // 天 (1 ~ 31)
|
||||
int32_t wday; // 星期 (1 ~ 7)
|
||||
int32_t month; // 月 (1 ~ 12)
|
||||
int32_t year; // 年 (2021 ~ 2049)
|
||||
} nine_date_time_event_t;
|
||||
|
||||
typedef struct _nine_odo_event_t {
|
||||
int32_t odo;
|
||||
} nine_odo_event_t;
|
||||
|
||||
typedef struct _nine_trip_event_t {
|
||||
int32_t trip;
|
||||
} nine_trip_event_t;
|
||||
|
||||
#define NINE_LIGHT_MODE_DAY 0 // 白天模式
|
||||
#define NINE_LIGHT_MODE_NIGHT 1 // 黑夜模式
|
||||
/**
|
||||
* @class nine_light_switch_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* 光敏黑白切换
|
||||
*/
|
||||
typedef struct _nine_light_switch_event_t {
|
||||
int32_t mode; // 白天/黑夜模式
|
||||
} nine_light_switch_event_t;
|
||||
|
||||
|
||||
#define NINE_THEME_1 1 // 主题1
|
||||
#define NINE_THEME_2 2 // 主题2
|
||||
#define NINE_THEME_3 3 // 主题3
|
||||
/**
|
||||
* @class nine_theme_switch_event_t
|
||||
* @annotation ["scriptable"]
|
||||
* 主题切换
|
||||
*/
|
||||
typedef struct _nine_theme_switch_event_t {
|
||||
int32_t theme; // 主题
|
||||
} nine_theme_switch_event_t;
|
||||
|
||||
typedef struct _nine_key_long_auto_event_t {
|
||||
int32_t locked_time; // 使用密码解锁的剩余锁定时间
|
||||
} nine_key_long_auto_event_t;
|
||||
|
||||
typedef struct _nine_password_event_t {
|
||||
int32_t result; // 0 密码校验失败 1 密码校验成功
|
||||
} nine_password_event_t;
|
||||
|
||||
typedef struct _nine_page_switch_event_t {
|
||||
int32_t page; // 页标识id
|
||||
} nine_page_switch_event_t;
|
||||
|
||||
// 电池剩余里程事件定义
|
||||
typedef struct _nine_remaining_mileage_event_t {
|
||||
int32_t remaining_mileage; // 电池剩余里程
|
||||
} nine_remaining_mileage_event_t;
|
||||
|
||||
// 充电剩余时间事件定义
|
||||
typedef struct _nine_charge_time_event_t {
|
||||
int32_t remaining_time; // 充电剩余时间(分钟)
|
||||
int32_t percent; // 百分比
|
||||
} nine_charge_time_event_t;
|
||||
|
||||
typedef struct _nine_event_t {
|
||||
event_t e;
|
||||
nine_event_type_t type;
|
||||
union {
|
||||
nine_vcu_not_ready_event_t not_ready_event;
|
||||
nine_vcu_cycling_event_t cycling_event;
|
||||
nine_vcu_running_status_event_t running_status_event;
|
||||
nine_vcu_gear_event_t gear_event;
|
||||
nine_wifi_connect_event_t wifi_event;
|
||||
nine_update_progress_event_t update_progress_event;
|
||||
nine_update_finish_event_t update_finish_event;
|
||||
nine_basic_error_event_t basic_error_event;
|
||||
nine_weather_details_event_t weather_details_event;
|
||||
nine_low_battery_event_t low_battery_event;
|
||||
nine_power_dissipation_event_t power_dissipation_event;
|
||||
nine_power_dissipation_realtime_event_t power_dissipation_realtime_event;
|
||||
nine_traffic_data_event_t traffic_data_event;
|
||||
nine_navigation_event_t navigation_event;
|
||||
nine_high_beam_event_t high_beam_event;
|
||||
nine_low_beam_event_t low_beam_event;
|
||||
nine_left_turn_event_t left_turn_event;
|
||||
nine_right_turn_event_t right_turn_event;
|
||||
nine_cruise_control_event_t cruise_control_event;
|
||||
nine_abs_event_t abs_event;
|
||||
nine_gsm_event_t gsm_event;
|
||||
nine_gps_event_t gps_event;
|
||||
nine_date_time_event_t date_time_event;
|
||||
nine_odo_event_t odo_event;
|
||||
nine_trip_event_t trip_event;
|
||||
nine_light_switch_event_t light_switch_event;
|
||||
nine_theme_switch_event_t theme_switch_event;
|
||||
nine_key_long_auto_event_t key_long_auto_event;
|
||||
nine_password_event_t password_event;
|
||||
nine_page_switch_event_t page_switch_event;
|
||||
nine_remaining_mileage_event_t remaining_mileage_event;
|
||||
nine_charge_time_event_t charge_time_event;
|
||||
};
|
||||
} nine_event_t;
|
||||
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
758
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/openvg.h
Normal file
758
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/openvg.h
Normal file
@ -0,0 +1,758 @@
|
||||
/* $Revision: 6838 $ on $Date:: 2008-11-04 12:46:08 +0100 #$ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* OpenVG 1.1 Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief OpenVG 1.1 API.
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _OPENVG_H
|
||||
#define _OPENVG_H
|
||||
|
||||
#include <VG/vgplatform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OPENVG_VERSION_1_0 1
|
||||
#define OPENVG_VERSION_1_0_1 1
|
||||
#define OPENVG_VERSION_1_1 2
|
||||
|
||||
#ifndef VG_MAXSHORT
|
||||
#define VG_MAXSHORT 0x7FFF
|
||||
#endif
|
||||
|
||||
#ifndef VG_MAXINT
|
||||
#define VG_MAXINT 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef VG_MAX_ENUM
|
||||
#define VG_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
typedef VGuint VGHandle;
|
||||
|
||||
typedef VGHandle VGPath;
|
||||
typedef VGHandle VGImage;
|
||||
typedef VGHandle VGMaskLayer;
|
||||
typedef VGHandle VGFont;
|
||||
typedef VGHandle VGPaint;
|
||||
|
||||
#define VG_INVALID_HANDLE ((VGHandle)0)
|
||||
|
||||
typedef enum {
|
||||
VG_FALSE = 0,
|
||||
VG_TRUE = 1,
|
||||
|
||||
VG_BOOLEAN_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGboolean;
|
||||
|
||||
typedef enum {
|
||||
VG_NO_ERROR = 0,
|
||||
VG_BAD_HANDLE_ERROR = 0x1000,
|
||||
VG_ILLEGAL_ARGUMENT_ERROR = 0x1001,
|
||||
VG_OUT_OF_MEMORY_ERROR = 0x1002,
|
||||
VG_PATH_CAPABILITY_ERROR = 0x1003,
|
||||
VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004,
|
||||
VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005,
|
||||
VG_IMAGE_IN_USE_ERROR = 0x1006,
|
||||
VG_NO_CONTEXT_ERROR = 0x1007,
|
||||
|
||||
VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGErrorCode;
|
||||
|
||||
typedef enum {
|
||||
/* Mode settings */
|
||||
VG_MATRIX_MODE = 0x1100,
|
||||
VG_FILL_RULE = 0x1101,
|
||||
VG_IMAGE_QUALITY = 0x1102,
|
||||
VG_RENDERING_QUALITY = 0x1103,
|
||||
VG_BLEND_MODE = 0x1104,
|
||||
VG_IMAGE_MODE = 0x1105,
|
||||
|
||||
/* Scissoring rectangles */
|
||||
VG_SCISSOR_RECTS = 0x1106,
|
||||
|
||||
/* Color Transformation */
|
||||
VG_COLOR_TRANSFORM = 0x1170,
|
||||
VG_COLOR_TRANSFORM_VALUES = 0x1171,
|
||||
|
||||
/* Stroke parameters */
|
||||
VG_STROKE_LINE_WIDTH = 0x1110,
|
||||
VG_STROKE_CAP_STYLE = 0x1111,
|
||||
VG_STROKE_JOIN_STYLE = 0x1112,
|
||||
VG_STROKE_MITER_LIMIT = 0x1113,
|
||||
VG_STROKE_DASH_PATTERN = 0x1114,
|
||||
VG_STROKE_DASH_PHASE = 0x1115,
|
||||
VG_STROKE_DASH_PHASE_RESET = 0x1116,
|
||||
|
||||
/* Edge fill color for VG_TILE_FILL tiling mode */
|
||||
VG_TILE_FILL_COLOR = 0x1120,
|
||||
|
||||
/* Color for vgClear */
|
||||
VG_CLEAR_COLOR = 0x1121,
|
||||
|
||||
/* Glyph origin */
|
||||
VG_GLYPH_ORIGIN = 0x1122,
|
||||
|
||||
/* Enable/disable alpha masking and scissoring */
|
||||
VG_MASKING = 0x1130,
|
||||
VG_SCISSORING = 0x1131,
|
||||
|
||||
/* Pixel layout information */
|
||||
VG_PIXEL_LAYOUT = 0x1140,
|
||||
VG_SCREEN_LAYOUT = 0x1141,
|
||||
|
||||
/* Source format selection for image filters */
|
||||
VG_FILTER_FORMAT_LINEAR = 0x1150,
|
||||
VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151,
|
||||
|
||||
/* Destination write enable mask for image filters */
|
||||
VG_FILTER_CHANNEL_MASK = 0x1152,
|
||||
|
||||
/* Implementation limits (read-only) */
|
||||
VG_MAX_SCISSOR_RECTS = 0x1160,
|
||||
VG_MAX_DASH_COUNT = 0x1161,
|
||||
VG_MAX_KERNEL_SIZE = 0x1162,
|
||||
VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163,
|
||||
VG_MAX_COLOR_RAMP_STOPS = 0x1164,
|
||||
VG_MAX_IMAGE_WIDTH = 0x1165,
|
||||
VG_MAX_IMAGE_HEIGHT = 0x1166,
|
||||
VG_MAX_IMAGE_PIXELS = 0x1167,
|
||||
VG_MAX_IMAGE_BYTES = 0x1168,
|
||||
VG_MAX_FLOAT = 0x1169,
|
||||
VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A,
|
||||
|
||||
VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200,
|
||||
VG_RENDERING_QUALITY_FASTER = 0x1201,
|
||||
VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */
|
||||
|
||||
VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGRenderingQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_PIXEL_LAYOUT_UNKNOWN = 0x1300,
|
||||
VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301,
|
||||
VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302,
|
||||
VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303,
|
||||
VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304,
|
||||
|
||||
VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPixelLayout;
|
||||
|
||||
typedef enum {
|
||||
VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400,
|
||||
VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401,
|
||||
VG_MATRIX_FILL_PAINT_TO_USER = 0x1402,
|
||||
VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403,
|
||||
VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404,
|
||||
|
||||
VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGMatrixMode;
|
||||
|
||||
typedef enum {
|
||||
VG_CLEAR_MASK = 0x1500,
|
||||
VG_FILL_MASK = 0x1501,
|
||||
VG_SET_MASK = 0x1502,
|
||||
VG_UNION_MASK = 0x1503,
|
||||
VG_INTERSECT_MASK = 0x1504,
|
||||
VG_SUBTRACT_MASK = 0x1505,
|
||||
|
||||
VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGMaskOperation;
|
||||
|
||||
#define VG_PATH_FORMAT_STANDARD 0
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_DATATYPE_S_8 = 0,
|
||||
VG_PATH_DATATYPE_S_16 = 1,
|
||||
VG_PATH_DATATYPE_S_32 = 2,
|
||||
VG_PATH_DATATYPE_F = 3,
|
||||
|
||||
VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathDatatype;
|
||||
|
||||
typedef enum {
|
||||
VG_ABSOLUTE = 0,
|
||||
VG_RELATIVE = 1,
|
||||
|
||||
VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathAbsRel;
|
||||
|
||||
typedef enum {
|
||||
VG_CLOSE_PATH = ( 0 << 1),
|
||||
VG_MOVE_TO = ( 1 << 1),
|
||||
VG_LINE_TO = ( 2 << 1),
|
||||
VG_HLINE_TO = ( 3 << 1),
|
||||
VG_VLINE_TO = ( 4 << 1),
|
||||
VG_QUAD_TO = ( 5 << 1),
|
||||
VG_CUBIC_TO = ( 6 << 1),
|
||||
VG_SQUAD_TO = ( 7 << 1),
|
||||
VG_SCUBIC_TO = ( 8 << 1),
|
||||
VG_SCCWARC_TO = ( 9 << 1),
|
||||
VG_SCWARC_TO = (10 << 1),
|
||||
VG_LCCWARC_TO = (11 << 1),
|
||||
VG_LCWARC_TO = (12 << 1),
|
||||
|
||||
VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathSegment;
|
||||
|
||||
typedef enum {
|
||||
VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE,
|
||||
VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE,
|
||||
VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE,
|
||||
VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE,
|
||||
VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE,
|
||||
VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE,
|
||||
VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE,
|
||||
VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE,
|
||||
VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE,
|
||||
VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE,
|
||||
VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE,
|
||||
VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE,
|
||||
VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE,
|
||||
VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE,
|
||||
VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE,
|
||||
VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE,
|
||||
VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE,
|
||||
VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE,
|
||||
VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE,
|
||||
VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE,
|
||||
VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE,
|
||||
VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE,
|
||||
|
||||
VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCommand;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0),
|
||||
VG_PATH_CAPABILITY_APPEND_TO = (1 << 1),
|
||||
VG_PATH_CAPABILITY_MODIFY = (1 << 2),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3),
|
||||
VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5),
|
||||
VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6),
|
||||
VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7),
|
||||
VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8),
|
||||
VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9),
|
||||
VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10),
|
||||
VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11),
|
||||
VG_PATH_CAPABILITY_ALL = ((1 << 12) - 1),
|
||||
|
||||
VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCapabilities;
|
||||
|
||||
typedef enum {
|
||||
VG_PATH_FORMAT = 0x1600,
|
||||
VG_PATH_DATATYPE = 0x1601,
|
||||
VG_PATH_SCALE = 0x1602,
|
||||
VG_PATH_BIAS = 0x1603,
|
||||
VG_PATH_NUM_SEGMENTS = 0x1604,
|
||||
VG_PATH_NUM_COORDS = 0x1605,
|
||||
|
||||
VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_CAP_BUTT = 0x1700,
|
||||
VG_CAP_ROUND = 0x1701,
|
||||
VG_CAP_SQUARE = 0x1702,
|
||||
|
||||
VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGCapStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_JOIN_MITER = 0x1800,
|
||||
VG_JOIN_ROUND = 0x1801,
|
||||
VG_JOIN_BEVEL = 0x1802,
|
||||
|
||||
VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGJoinStyle;
|
||||
|
||||
typedef enum {
|
||||
VG_EVEN_ODD = 0x1900,
|
||||
VG_NON_ZERO = 0x1901,
|
||||
|
||||
VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGFillRule;
|
||||
|
||||
typedef enum {
|
||||
VG_STROKE_PATH = (1 << 0),
|
||||
VG_FILL_PATH = (1 << 1),
|
||||
|
||||
VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintMode;
|
||||
|
||||
typedef enum {
|
||||
/* Color paint parameters */
|
||||
VG_PAINT_TYPE = 0x1A00,
|
||||
VG_PAINT_COLOR = 0x1A01,
|
||||
VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02,
|
||||
VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07,
|
||||
VG_PAINT_COLOR_RAMP_STOPS = 0x1A03,
|
||||
|
||||
/* Linear gradient paint parameters */
|
||||
VG_PAINT_LINEAR_GRADIENT = 0x1A04,
|
||||
|
||||
/* Radial gradient paint parameters */
|
||||
VG_PAINT_RADIAL_GRADIENT = 0x1A05,
|
||||
|
||||
/* Pattern paint parameters */
|
||||
VG_PAINT_PATTERN_TILING_MODE = 0x1A06,
|
||||
|
||||
VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_PAINT_TYPE_COLOR = 0x1B00,
|
||||
VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01,
|
||||
VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02,
|
||||
VG_PAINT_TYPE_PATTERN = 0x1B03,
|
||||
|
||||
VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintType;
|
||||
|
||||
typedef enum {
|
||||
VG_COLOR_RAMP_SPREAD_PAD = 0x1C00,
|
||||
VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01,
|
||||
VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02,
|
||||
|
||||
VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGColorRampSpreadMode;
|
||||
|
||||
typedef enum {
|
||||
VG_TILE_FILL = 0x1D00,
|
||||
VG_TILE_PAD = 0x1D01,
|
||||
VG_TILE_REPEAT = 0x1D02,
|
||||
VG_TILE_REFLECT = 0x1D03,
|
||||
|
||||
VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGTilingMode;
|
||||
|
||||
typedef enum {
|
||||
/* RGB{A,X} channel ordering */
|
||||
VG_sRGBX_8888 = 0,
|
||||
VG_sRGBA_8888 = 1,
|
||||
VG_sRGBA_8888_PRE = 2,
|
||||
VG_sRGB_565 = 3,
|
||||
VG_sRGBA_5551 = 4,
|
||||
VG_sRGBA_4444 = 5,
|
||||
VG_sL_8 = 6,
|
||||
VG_lRGBX_8888 = 7,
|
||||
VG_lRGBA_8888 = 8,
|
||||
VG_lRGBA_8888_PRE = 9,
|
||||
VG_lL_8 = 10,
|
||||
VG_A_8 = 11,
|
||||
VG_BW_1 = 12,
|
||||
VG_A_1 = 13,
|
||||
VG_A_4 = 14,
|
||||
|
||||
/* {A,X}RGB channel ordering */
|
||||
VG_sXRGB_8888 = 0 | (1 << 6),
|
||||
VG_sARGB_8888 = 1 | (1 << 6),
|
||||
VG_sARGB_8888_PRE = 2 | (1 << 6),
|
||||
VG_sARGB_1555 = 4 | (1 << 6),
|
||||
VG_sARGB_4444 = 5 | (1 << 6),
|
||||
VG_lXRGB_8888 = 7 | (1 << 6),
|
||||
VG_lARGB_8888 = 8 | (1 << 6),
|
||||
VG_lARGB_8888_PRE = 9 | (1 << 6),
|
||||
|
||||
/* BGR{A,X} channel ordering */
|
||||
VG_sBGRX_8888 = 0 | (1 << 7),
|
||||
VG_sBGRA_8888 = 1 | (1 << 7),
|
||||
VG_sBGRA_8888_PRE = 2 | (1 << 7),
|
||||
VG_sBGR_565 = 3 | (1 << 7),
|
||||
VG_sBGRA_5551 = 4 | (1 << 7),
|
||||
VG_sBGRA_4444 = 5 | (1 << 7),
|
||||
VG_lBGRX_8888 = 7 | (1 << 7),
|
||||
VG_lBGRA_8888 = 8 | (1 << 7),
|
||||
VG_lBGRA_8888_PRE = 9 | (1 << 7),
|
||||
|
||||
/* {A,X}BGR channel ordering */
|
||||
VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7),
|
||||
VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7),
|
||||
VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7),
|
||||
VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7),
|
||||
|
||||
VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageFormat;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0),
|
||||
VG_IMAGE_QUALITY_FASTER = (1 << 1),
|
||||
VG_IMAGE_QUALITY_BETTER = (1 << 2),
|
||||
|
||||
VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageQuality;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT = 0x1E00,
|
||||
VG_IMAGE_WIDTH = 0x1E01,
|
||||
VG_IMAGE_HEIGHT = 0x1E02,
|
||||
|
||||
VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_DRAW_IMAGE_NORMAL = 0x1F00,
|
||||
VG_DRAW_IMAGE_MULTIPLY = 0x1F01,
|
||||
VG_DRAW_IMAGE_STENCIL = 0x1F02,
|
||||
|
||||
VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageMode;
|
||||
|
||||
typedef enum {
|
||||
VG_RED = (1 << 3),
|
||||
VG_GREEN = (1 << 2),
|
||||
VG_BLUE = (1 << 1),
|
||||
VG_ALPHA = (1 << 0),
|
||||
|
||||
VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageChannel;
|
||||
|
||||
typedef enum {
|
||||
VG_BLEND_SRC = 0x2000,
|
||||
VG_BLEND_SRC_OVER = 0x2001,
|
||||
VG_BLEND_DST_OVER = 0x2002,
|
||||
VG_BLEND_SRC_IN = 0x2003,
|
||||
VG_BLEND_DST_IN = 0x2004,
|
||||
VG_BLEND_MULTIPLY = 0x2005,
|
||||
VG_BLEND_SCREEN = 0x2006,
|
||||
VG_BLEND_DARKEN = 0x2007,
|
||||
VG_BLEND_LIGHTEN = 0x2008,
|
||||
VG_BLEND_ADDITIVE = 0x2009,
|
||||
|
||||
VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGBlendMode;
|
||||
|
||||
typedef enum {
|
||||
VG_FONT_NUM_GLYPHS = 0x2F00,
|
||||
|
||||
VG_FONT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGFontParamType;
|
||||
|
||||
typedef enum {
|
||||
VG_IMAGE_FORMAT_QUERY = 0x2100,
|
||||
VG_PATH_DATATYPE_QUERY = 0x2101,
|
||||
|
||||
VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGHardwareQueryType;
|
||||
|
||||
typedef enum {
|
||||
VG_HARDWARE_ACCELERATED = 0x2200,
|
||||
VG_HARDWARE_UNACCELERATED = 0x2201,
|
||||
|
||||
VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGHardwareQueryResult;
|
||||
|
||||
typedef enum {
|
||||
VG_VENDOR = 0x2300,
|
||||
VG_RENDERER = 0x2301,
|
||||
VG_VERSION = 0x2302,
|
||||
VG_EXTENSIONS = 0x2303,
|
||||
|
||||
VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGStringID;
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
#ifndef VG_API_CALL
|
||||
# error VG_API_CALL must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_ENTRY
|
||||
# error VG_API_ENTRY must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_EXIT
|
||||
# error VG_API_EXIT must be defined
|
||||
#endif
|
||||
|
||||
VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT;
|
||||
|
||||
/* Getters and Setters */
|
||||
VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count,
|
||||
const VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count,
|
||||
const VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object,
|
||||
VGint paramType,
|
||||
VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, const VGint * values) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object,
|
||||
VGint paramType) VG_API_EXIT;
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object,
|
||||
VGint paramType);
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object,
|
||||
VGint paramType) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGfloat * values) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object,
|
||||
VGint paramType,
|
||||
VGint count, VGint * values) VG_API_EXIT;
|
||||
|
||||
/* Matrix Manipulation */
|
||||
VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT;
|
||||
|
||||
/* Masking and Clearing */
|
||||
VG_API_CALL void VG_API_ENTRY vgMask(VGHandle mask, VGMaskOperation operation,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRenderToMask(VGPath path,
|
||||
VGbitfield paintModes,
|
||||
VGMaskOperation operation) VG_API_EXIT;
|
||||
VG_API_CALL VGMaskLayer VG_API_ENTRY vgCreateMaskLayer(VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgFillMaskLayer(VGMaskLayer maskLayer,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height,
|
||||
VGfloat value) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyMask(VGMaskLayer maskLayer,
|
||||
VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
|
||||
/* Paths */
|
||||
VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat,
|
||||
VGPathDatatype datatype,
|
||||
VGfloat scale, VGfloat bias,
|
||||
VGint segmentCapacityHint,
|
||||
VGint coordCapacityHint,
|
||||
VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path,
|
||||
VGbitfield capabilities) VG_API_EXIT;
|
||||
VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath,
|
||||
VGint numSegments,
|
||||
const VGubyte * pathSegments,
|
||||
const void * pathData) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex,
|
||||
VGint numSegments,
|
||||
const void * pathData) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT;
|
||||
VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath,
|
||||
VGPath startPath,
|
||||
VGPath endPath,
|
||||
VGfloat amount) VG_API_EXIT;
|
||||
VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path,
|
||||
VGint startSegment, VGint numSegments) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path,
|
||||
VGint startSegment, VGint numSegments,
|
||||
VGfloat distance,
|
||||
VGfloat * x, VGfloat * y,
|
||||
VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path,
|
||||
VGfloat * minX, VGfloat * minY,
|
||||
VGfloat * width, VGfloat * height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT;
|
||||
|
||||
/* Paint */
|
||||
VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT;
|
||||
VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT;
|
||||
VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT;
|
||||
|
||||
/* Images */
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format,
|
||||
VGint width, VGint height,
|
||||
VGbitfield allowedQuality) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image,
|
||||
const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image,
|
||||
void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint x, VGint y,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent,
|
||||
VGint x, VGint y, VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height,
|
||||
VGboolean dither) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy,
|
||||
VGImage src, VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint dx, VGint dy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride,
|
||||
VGImageFormat dataFormat,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy,
|
||||
VGint sx, VGint sy,
|
||||
VGint width, VGint height) VG_API_EXIT;
|
||||
|
||||
/* Text */
|
||||
VG_API_CALL VGFont VG_API_ENTRY vgCreateFont(VGint glyphCapacityHint) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDestroyFont(VGFont font) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetGlyphToPath(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGPath path,
|
||||
VGboolean isHinted,
|
||||
VGfloat glyphOrigin [2],
|
||||
VGfloat escapement[2]) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGImage image,
|
||||
VGfloat glyphOrigin [2],
|
||||
VGfloat escapement[2]) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font,
|
||||
VGuint glyphIndex,
|
||||
VGbitfield paintModes,
|
||||
VGboolean allowAutoHinting) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawGlyphs(VGFont font,
|
||||
VGint glyphCount,
|
||||
VGuint *glyphIndices,
|
||||
VGfloat *adjustments_x,
|
||||
VGfloat *adjustments_y,
|
||||
VGbitfield paintModes,
|
||||
VGboolean allowAutoHinting) VG_API_EXIT;
|
||||
|
||||
/* Image Filters */
|
||||
VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src,
|
||||
const VGfloat * matrix) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth, VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernel,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src,
|
||||
VGint kernelWidth,
|
||||
VGint kernelHeight,
|
||||
VGint shiftX, VGint shiftY,
|
||||
const VGshort * kernelX,
|
||||
const VGshort * kernelY,
|
||||
VGfloat scale,
|
||||
VGfloat bias,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src,
|
||||
VGfloat stdDeviationX,
|
||||
VGfloat stdDeviationY,
|
||||
VGTilingMode tilingMode) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src,
|
||||
const VGubyte * redLUT,
|
||||
const VGubyte * greenLUT,
|
||||
const VGubyte * blueLUT,
|
||||
const VGubyte * alphaLUT,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied) VG_API_EXIT;
|
||||
VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src,
|
||||
const VGuint * lookupTable,
|
||||
VGImageChannel sourceChannel,
|
||||
VGboolean outputLinear,
|
||||
VGboolean outputPremultiplied) VG_API_EXIT;
|
||||
|
||||
/* Hardware Queries */
|
||||
VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key,
|
||||
VGint setting) VG_API_EXIT;
|
||||
|
||||
/* Renderer and Extension Information */
|
||||
VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT;
|
||||
|
||||
VG_API_CALL void VG_API_ENTRY vgDrawImageDirect(
|
||||
char *ImageData,
|
||||
VGint ImageWidth,
|
||||
VGint ImageHeight,
|
||||
VGint ImageStride,
|
||||
VGint x,
|
||||
VGint y,
|
||||
VGint w,
|
||||
VGint h,
|
||||
VGbitfield AllowedQuality,
|
||||
VGImageFormat Format) VG_API_EXIT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _OPENVG_H */
|
378
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgext.h
Normal file
378
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgext.h
Normal file
@ -0,0 +1,378 @@
|
||||
/* $Revision: 6810 $ on $Date:: 2008-10-29 15:31:37 +0100 #$ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VG extensions Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VG extensions
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
#ifndef _VGEXT_H
|
||||
#define _VGEXT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <VG/openvg.h>
|
||||
#include <VG/vgu.h>
|
||||
|
||||
#ifndef VG_API_ENTRYP
|
||||
# define VG_API_ENTRYP VG_API_ENTRY*
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRYP
|
||||
# define VGU_API_ENTRYP VGU_API_ENTRY*
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------------
|
||||
* KHR extensions
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
typedef enum {
|
||||
|
||||
#ifndef VG_KHR_iterative_average_blur
|
||||
VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B,
|
||||
VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C,
|
||||
VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D,
|
||||
#endif
|
||||
|
||||
VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamTypeKHR;
|
||||
|
||||
#ifndef VG_KHR_EGL_image
|
||||
#define VG_KHR_EGL_image 1
|
||||
/* VGEGLImageKHR is an opaque handle to an EGLImage */
|
||||
typedef void* VGeglImageKHR;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image);
|
||||
#endif
|
||||
typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_KHR_iterative_average_blur
|
||||
#define VG_KHR_iterative_average_blur 1
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_KHR_advanced_blending
|
||||
#define VG_KHR_advanced_blending 1
|
||||
|
||||
typedef enum {
|
||||
VG_BLEND_OVERLAY_KHR = 0x2010,
|
||||
VG_BLEND_HARDLIGHT_KHR = 0x2011,
|
||||
VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012,
|
||||
VG_BLEND_SOFTLIGHT_KHR = 0x2013,
|
||||
VG_BLEND_COLORDODGE_KHR = 0x2014,
|
||||
VG_BLEND_COLORBURN_KHR = 0x2015,
|
||||
VG_BLEND_DIFFERENCE_KHR = 0x2016,
|
||||
VG_BLEND_SUBTRACT_KHR = 0x2017,
|
||||
VG_BLEND_INVERT_KHR = 0x2018,
|
||||
VG_BLEND_EXCLUSION_KHR = 0x2019,
|
||||
VG_BLEND_LINEARDODGE_KHR = 0x201a,
|
||||
VG_BLEND_LINEARBURN_KHR = 0x201b,
|
||||
VG_BLEND_VIVIDLIGHT_KHR = 0x201c,
|
||||
VG_BLEND_LINEARLIGHT_KHR = 0x201d,
|
||||
VG_BLEND_PINLIGHT_KHR = 0x201e,
|
||||
VG_BLEND_HARDMIX_KHR = 0x201f,
|
||||
VG_BLEND_CLEAR_KHR = 0x2020,
|
||||
VG_BLEND_DST_KHR = 0x2021,
|
||||
VG_BLEND_SRC_OUT_KHR = 0x2022,
|
||||
VG_BLEND_DST_OUT_KHR = 0x2023,
|
||||
VG_BLEND_SRC_ATOP_KHR = 0x2024,
|
||||
VG_BLEND_DST_ATOP_KHR = 0x2025,
|
||||
VG_BLEND_XOR_KHR = 0x2026,
|
||||
|
||||
VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM
|
||||
} VGBlendModeKHR;
|
||||
#endif
|
||||
|
||||
#ifndef VG_KHR_parametric_filter
|
||||
#define VG_KHR_parametric_filter 1
|
||||
|
||||
typedef enum {
|
||||
VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0),
|
||||
VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1),
|
||||
VG_PF_OUTER_FLAG_KHR = (1 << 2),
|
||||
VG_PF_INNER_FLAG_KHR = (1 << 3),
|
||||
|
||||
VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPfTypeKHR;
|
||||
|
||||
typedef enum {
|
||||
VGU_IMAGE_IN_USE_ERROR = 0xF010,
|
||||
|
||||
VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUErrorCodeKHR;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ;
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops);
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------------
|
||||
* NDS extensions
|
||||
*------------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef VG_NDS_paint_generation
|
||||
#define VG_NDS_paint_generation 1
|
||||
|
||||
typedef enum {
|
||||
VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10,
|
||||
VG_COLOR_MATRIX_NDS = 0x1A11,
|
||||
VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12,
|
||||
|
||||
VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPaintParamTypeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10,
|
||||
|
||||
VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGImageModeNds;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VG_NDS_projective_geometry
|
||||
#define VG_NDS_projective_geometry 1
|
||||
|
||||
typedef enum {
|
||||
VG_CLIP_MODE_NDS = 0x1180,
|
||||
VG_CLIP_LINES_NDS = 0x1181,
|
||||
VG_MAX_CLIP_LINES_NDS = 0x1182,
|
||||
|
||||
VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGParamTypeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_CLIPMODE_NONE_NDS = 0x3000,
|
||||
VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001,
|
||||
VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002,
|
||||
VG_CLIPMODE_CULL_NDS = 0x3003,
|
||||
|
||||
VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGClipModeNds;
|
||||
|
||||
typedef enum {
|
||||
VG_RQUAD_TO_NDS = ( 13 << 1 ),
|
||||
VG_RCUBIC_TO_NDS = ( 14 << 1 ),
|
||||
|
||||
VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathSegmentNds;
|
||||
|
||||
typedef enum {
|
||||
VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE),
|
||||
VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE),
|
||||
VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE),
|
||||
VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE),
|
||||
|
||||
VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGPathCommandNds;
|
||||
|
||||
#ifdef VG_VGEXT_PROTOTYPES
|
||||
VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ;
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
|
||||
#endif
|
||||
typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ;
|
||||
typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
Description
|
||||
Create and initialize an OpenVG context.
|
||||
|
||||
Return
|
||||
NULL if a memory allocation error occurred.
|
||||
A valid pointer to the newly created context, if the operation is successful.
|
||||
*/
|
||||
VG_API_CALL void* VG_API_ENTRY vgContextCreate(void) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Destroy a OpenVG context.
|
||||
|
||||
Parameters
|
||||
context: pointer to a (valid) previously created context.
|
||||
*/
|
||||
VG_API_CALL void VG_API_ENTRY vgContextDestroy(void *context) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Create and initialize a drawing surface.
|
||||
|
||||
Parameters
|
||||
width: desired width, in pixels.
|
||||
height: desired height, in pixels.
|
||||
linearColorSpace: VG_TRUE for linear color space, VG_FALSE for sRGB color space. This parameter is ignored in AmanithVG SRE Lite, since it always uses non-linear color space.
|
||||
alphaPremultiplied VG_TRUE for premultiplied alpha format, VG_FALSE for unpremultiplied alpha format.
|
||||
alphaMask: VG_TRUE if the drawing surface must support/contain OpenVG alpha mask, else VG_FALSE.
|
||||
|
||||
Return
|
||||
NULL if a memory allocation error occurred.
|
||||
A valid pointer to the newly created surface, if the operation is successful.
|
||||
|
||||
*/
|
||||
VG_API_CALL void* VG_API_ENTRY vgSurfaceCreate (VGint width,
|
||||
VGint height,
|
||||
VGboolean linearColorSpace,
|
||||
VGboolean alphaPremultiplied,
|
||||
VGboolean alphaMask) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Create a drawing surface bound to the given VGImage.
|
||||
|
||||
Parameters
|
||||
image: a VGImage handle.
|
||||
alphaMask: VG_TRUE if the drawing surface must support/contain OpenVG alpha mask, else VG_FALSE.
|
||||
|
||||
Return
|
||||
NULL if a memory allocation error occurred.
|
||||
NULL if the image is not valid for any already created context.
|
||||
NULL if the image is used by OpenVG (e.g. is used as a paint pattern or is used as a font glyph).
|
||||
A valid pointer to the newly created surface, if the operation is successful.
|
||||
*/
|
||||
VG_API_CALL void* VG_API_ENTRY vgSurfaceCreateFromImage (VGImage image,
|
||||
VGboolean alphaMask) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Resize the dimensions of the specified drawing surface. This function:
|
||||
- reallocates the drawing surface pixels buffer, according to new specified dimensions (AmanithVG SRE / SRE Lite).
|
||||
- if the surface contains the alpha mask buffer, it reallocates that 8bit buffer according to new specified dimensions (AmanithVG SRE / SRE Lite / GLE / GLS).
|
||||
|
||||
Parameters
|
||||
surface: pointer to a (valid) previously created drawing surface.
|
||||
width: the new desired width, in pixels.
|
||||
height: the new desired width, in pixels.
|
||||
|
||||
Return
|
||||
VG_FALSE if a memory allocation error occurred.
|
||||
VG_FALSE if width or height are less than or equal zero.
|
||||
VG_FALSE if the specified surface is bound to an OpenVG image.
|
||||
VG_TRUE if the operation is successful.
|
||||
|
||||
*/
|
||||
VG_API_CALL VGboolean VG_API_ENTRY vgSurfaceResize(void *surface,
|
||||
VGint width,
|
||||
VGint height) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Destroy a drawing surface.
|
||||
|
||||
Parameters
|
||||
surface: pointer to a (valid) previously created drawing surface.
|
||||
*/
|
||||
VG_API_CALL void VG_API_ENTRY vgSurfaceDestroy(void *surface) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Get the width (in pixels) of the given drawing surface.
|
||||
|
||||
Parameters
|
||||
surface: a valid (i.e. still referenced) drawing surface. NULL means current surface.
|
||||
|
||||
Return
|
||||
0 if the surface is not referenced, else the surface width.
|
||||
*/
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetSurfaceWidth(const void *surface) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Get the height (in pixels) of the given drawing surface.
|
||||
|
||||
Parameters
|
||||
surface: a valid (i.e. still referenced) drawing surface. NULL means current surface.
|
||||
|
||||
Return
|
||||
0 if the surface is not referenced, else the surface height.
|
||||
*/
|
||||
VG_API_CALL VGint VG_API_ENTRY vgGetSurfaceHeight(const void *surface) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Get the direct access to the pixels of the given drawing surface.
|
||||
It should be used only to blit the surface on the screen, according to the platform graphic subsystem.
|
||||
Parameters
|
||||
surface: a valid (i.e. still referenced) drawing surface. NULL means current surface.
|
||||
|
||||
Return
|
||||
NULL, if the surface is bound to an OpenVG image.
|
||||
A valid pointer in all other cases.
|
||||
*/
|
||||
VG_API_CALL const VGubyte* VG_API_ENTRY vgGetSurfacePixels(const void *surface) VG_API_EXIT;
|
||||
/*
|
||||
Description
|
||||
Bind the specified context to the given drawing surface.
|
||||
|
||||
Parameters
|
||||
_context: NULL or a pointer to a (valid) previously created OpenVG context.
|
||||
_surface: NULL or a pointer to a (valid) previously created drawing surface.
|
||||
|
||||
Return
|
||||
VG_FALSE if one parameter (context or surface) is NULL and the other is not NULL.
|
||||
VG_FALSE if the surface is bound to an OpenVG image and such image is used by OpenVG (e.g. is used as a paint pattern or is used as a font glyph).
|
||||
VG_TRUE if the operation is successful.
|
||||
|
||||
*/
|
||||
VG_API_CALL VGboolean VG_API_ENTRY vgMakeCurrent(void *context,
|
||||
void *surface) VG_API_EXIT;
|
||||
|
||||
|
||||
/*
|
||||
Description
|
||||
Get the format of the drawing surface made current.
|
||||
If no surface has been made current, VG_IMAGE_FORMAT_FORCE_SIZE is returned.
|
||||
Parameters
|
||||
surface: a valid (i.e. still referenced) drawing surface. NULL means current surface.
|
||||
*/
|
||||
VG_API_CALL VGImageFormat VG_API_ENTRY vgGetSurfaceFormat(void *surface) VG_API_EXIT;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _VGEXT_H */
|
112
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgplatform.h
Normal file
112
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgplatform.h
Normal file
@ -0,0 +1,112 @@
|
||||
/* $Revision: 6810 $ on $Date:: 2008-10-29 15:31:37 +0100 #$ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VG platform specific header Reference Implementation
|
||||
* ----------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VG platform specific header
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _VGPLATFORM_H
|
||||
#define _VGPLATFORM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if 0
|
||||
#ifndef VG_API_CALL
|
||||
#if defined(OPENVG_STATIC_LIBRARY)
|
||||
# define VG_API_CALL
|
||||
#else
|
||||
# if defined(_WIN32) || defined(__VC32__) /* Win32 */
|
||||
# if defined (OPENVG_DLL_EXPORTS)
|
||||
# define VG_API_CALL __declspec(dllexport)
|
||||
# else
|
||||
# define VG_API_CALL __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define VG_API_CALL extern
|
||||
# endif /* defined(_WIN32) ||... */
|
||||
#endif /* defined OPENVG_STATIC_LIBRARY */
|
||||
#endif /* ifndef VG_API_CALL */
|
||||
|
||||
#ifndef VGU_API_CALL
|
||||
#if defined(OPENVG_STATIC_LIBRARY)
|
||||
# define VGU_API_CALL
|
||||
#else
|
||||
# if defined(_WIN32) || defined(__VC32__) /* Win32 */
|
||||
# if defined (OPENVG_DLL_EXPORTS)
|
||||
# define VGU_API_CALL __declspec(dllexport)
|
||||
# else
|
||||
# define VGU_API_CALL __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define VGU_API_CALL extern
|
||||
# endif /* defined(_WIN32) ||... */
|
||||
#endif /* defined OPENVG_STATIC_LIBRARY */
|
||||
#endif /* ifndef VGU_API_CALL */
|
||||
|
||||
#endif
|
||||
|
||||
#define VG_API_CALL extern
|
||||
|
||||
|
||||
#ifndef VG_API_ENTRY
|
||||
#define VG_API_ENTRY
|
||||
#endif
|
||||
|
||||
#ifndef VG_API_EXIT
|
||||
#define VG_API_EXIT
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRY
|
||||
#define VGU_API_ENTRY
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_EXIT
|
||||
#define VGU_API_EXIT
|
||||
#endif
|
||||
|
||||
typedef float VGfloat;
|
||||
typedef signed char VGbyte;
|
||||
typedef unsigned char VGubyte;
|
||||
typedef signed short VGshort;
|
||||
typedef signed int VGint;
|
||||
typedef unsigned int VGuint;
|
||||
typedef unsigned int VGbitfield;
|
||||
|
||||
#ifndef VG_VGEXT_PROTOTYPES
|
||||
#define VG_VGEXT_PROTOTYPES
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _VGPLATFORM_H */
|
135
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgu.h
Normal file
135
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/vg/vgu.h
Normal file
@ -0,0 +1,135 @@
|
||||
/* $Revision: 6810 $ on $Date:: 2008-10-29 15:31:37 +0100 #$ */
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
*
|
||||
* VGU 1.1 Reference Implementation
|
||||
* -------------------------------------
|
||||
*
|
||||
* Copyright (c) 2008 The Khronos Group Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and /or associated documentation files
|
||||
* (the "Materials "), to deal in the Materials without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge,
|
||||
* publish, distribute, sublicense, and/or sell copies of the Materials,
|
||||
* and to permit persons to whom the Materials are furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR
|
||||
* THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
*//**
|
||||
* \file
|
||||
* \brief VGU 1.1 API.
|
||||
*//*-------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _VGU_H
|
||||
#define _VGU_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <VG/openvg.h>
|
||||
|
||||
#define VGU_VERSION_1_0 1
|
||||
#define VGU_VERSION_1_1 2
|
||||
|
||||
#define VG_API_CALL extern
|
||||
# define VGU_API_CALL
|
||||
|
||||
|
||||
#ifndef VGU_API_CALL
|
||||
# error VGU_API_CALL must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_ENTRY
|
||||
# error VGU_API_ENTRY must be defined
|
||||
#endif
|
||||
|
||||
#ifndef VGU_API_EXIT
|
||||
# error VGU_API_EXIT must be defined
|
||||
#endif
|
||||
|
||||
|
||||
typedef enum {
|
||||
VGU_NO_ERROR = 0,
|
||||
VGU_BAD_HANDLE_ERROR = 0xF000,
|
||||
VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001,
|
||||
VGU_OUT_OF_MEMORY_ERROR = 0xF002,
|
||||
VGU_PATH_CAPABILITY_ERROR = 0xF003,
|
||||
VGU_BAD_WARP_ERROR = 0xF004,
|
||||
|
||||
VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUErrorCode;
|
||||
|
||||
typedef enum {
|
||||
VGU_ARC_OPEN = 0xF100,
|
||||
VGU_ARC_CHORD = 0xF101,
|
||||
VGU_ARC_PIE = 0xF102,
|
||||
|
||||
VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM
|
||||
} VGUArcType;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path,
|
||||
VGfloat x0, VGfloat y0,
|
||||
VGfloat x1, VGfloat y1) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path,
|
||||
const VGfloat * points, VGint count,
|
||||
VGboolean closed) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path,
|
||||
VGfloat cx, VGfloat cy,
|
||||
VGfloat width, VGfloat height) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path,
|
||||
VGfloat x, VGfloat y,
|
||||
VGfloat width, VGfloat height,
|
||||
VGfloat startAngle, VGfloat angleExtent,
|
||||
VGUArcType arcType) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0,
|
||||
VGfloat dx1, VGfloat dy1,
|
||||
VGfloat dx2, VGfloat dy2,
|
||||
VGfloat dx3, VGfloat dy3,
|
||||
VGfloat sx0, VGfloat sy0,
|
||||
VGfloat sx1, VGfloat sy1,
|
||||
VGfloat sx2, VGfloat sy2,
|
||||
VGfloat sx3, VGfloat sy3,
|
||||
VGfloat * matrix) VGU_API_EXIT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* #ifndef _VGU_H */
|
26
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm.h
Normal file
26
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm.h
Normal file
@ -0,0 +1,26 @@
|
||||
//****************************************************************************
|
||||
//
|
||||
// Copyright (C) 2012 ZhuoYongHong
|
||||
//
|
||||
// Author ZhuoYongHong
|
||||
//
|
||||
// File name: xm.h
|
||||
//
|
||||
// Revision history
|
||||
//
|
||||
// 2010.08.31 ZhuoYongHong Initial version
|
||||
//
|
||||
//****************************************************************************
|
||||
#ifndef _XM_H_
|
||||
#define _XM_H_
|
||||
|
||||
#include "xm_key.h"
|
||||
//#include "xm_dev.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif // _XM_
|
90
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_dev.h
Normal file
90
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_dev.h
Normal file
@ -0,0 +1,90 @@
|
||||
//****************************************************************************
|
||||
//
|
||||
// Copyright (C) 2011 ZhuoYongHong
|
||||
//
|
||||
// Author ZhuoYongHong
|
||||
//
|
||||
// File name: xm_dev.h
|
||||
// constant<6E><74>macro & basic typedef definition of X-Mini System
|
||||
//
|
||||
// Revision history
|
||||
//
|
||||
// 2011.05.31 ZhuoYongHong Initial version
|
||||
//
|
||||
//****************************************************************************
|
||||
#ifndef _XM_DEV_H_
|
||||
#define _XM_DEV_H_
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
|
||||
// Modifier<65><72><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD>
|
||||
#define XM_KEY_PRESSED 0x10 /* key pressed */
|
||||
#define XM_KEY_REPEAT 0x20 /* Key Repeat Status */
|
||||
#define XM_KEY_STROKE 0x40 /* indicate hardware stroke */
|
||||
#define XM_KEY_LONGTIME 0x80 /* long time pressed */
|
||||
|
||||
#define XM_TP_TYPE_DOWN 1 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define XM_TP_TYPE_UP 2 // <20><><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define XM_TP_TYPE_MOVE 3 // <20><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
// XM<58>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD>
|
||||
#define XM_EVENT_TYPE_KEY 1
|
||||
#define XM_EVENT_TYPE_TP 2
|
||||
|
||||
// XM<58><4D><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef struct {
|
||||
unsigned short key;
|
||||
unsigned short mod;
|
||||
} XM_KEY_EVENT;
|
||||
|
||||
// XM<58><4D><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
typedef struct {
|
||||
unsigned short x;
|
||||
unsigned short y;
|
||||
unsigned int type;
|
||||
} XM_TP_EVENT;
|
||||
|
||||
typedef struct tag_XM_EVENT {
|
||||
unsigned int event_type;
|
||||
union {
|
||||
XM_KEY_EVENT key_event;
|
||||
XM_TP_EVENT tp_event;
|
||||
};
|
||||
} XM_EVENT;
|
||||
|
||||
// Ͷ<>ݰ<EFBFBD><DDB0><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
||||
// 1 <09>¼<EFBFBD>Ͷ<EFBFBD>ݵ<EFBFBD><DDB5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɹ<D0B3>
|
||||
// 0 <09>¼<EFBFBD>Ͷ<EFBFBD>ݵ<EFBFBD><DDB5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
int XM_KeyEventProc (unsigned short key, unsigned short mod);
|
||||
|
||||
|
||||
|
||||
// Ͷ<>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
||||
// point <09><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
||||
// type <09><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>
|
||||
// 1 <09>¼<EFBFBD>Ͷ<EFBFBD>ݵ<EFBFBD><DDB5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>гɹ<D0B3>
|
||||
// 0 <09>¼<EFBFBD>Ͷ<EFBFBD>ݵ<EFBFBD><DDB5>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
int XM_TpEventProc (unsigned short x, unsigned short y, unsigned int type);
|
||||
|
||||
// <20><>ȡһ<C8A1><D2BB><EFBFBD>¼<EFBFBD>
|
||||
// delay_ms <20><>ʱʱ<CAB1>䣬<EFBFBD><E4A3AC><EFBFBD>롣
|
||||
// 0<><30>ʾ<EFBFBD><CABE><EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD>0xffffffff<66><66>ʾ<EFBFBD><CABE><EFBFBD>õȴ<C3B5>
|
||||
// <20><><EFBFBD><EFBFBD>ֵ
|
||||
// 1 <20><>ʾ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>ȡһ<C8A1><D2BB><EFBFBD>¼<EFBFBD>
|
||||
// 0 <20><>ʾ<EFBFBD><CABE>ȡ<EFBFBD>¼<EFBFBD>ʧ<EFBFBD><CAA7>
|
||||
int XM_GetEvent (XM_EVENT *xm_event, unsigned int delay_ms);
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif /* end of __cplusplus */
|
||||
|
||||
#endif // _XM_DEV_H_
|
@ -0,0 +1,43 @@
|
||||
//****************************************************************************
|
||||
//
|
||||
// Copyright (C) 2021 ShenZhen ExceedSpace
|
||||
//
|
||||
// Author ZhuoYongHong
|
||||
//
|
||||
// File name: xm_hmi_host.h
|
||||
// constant<6E><74>macro & basic typedef definition of X-Mini System
|
||||
//
|
||||
// Revision history
|
||||
//
|
||||
// 2021.04.11 ZhuoYongHong Initial version
|
||||
//
|
||||
//****************************************************************************
|
||||
|
||||
#ifndef XM_HMI_HOST_H
|
||||
#define XM_HMI_HOST_H
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
extern void * XM_HmiHost_WindowCreate(const char* title,
|
||||
const unsigned int width,
|
||||
const unsigned int height);
|
||||
|
||||
extern void XM_HmiHost_WindowDestroy(void);
|
||||
|
||||
|
||||
extern void XM_HmiHost_WindowBuffersSwap(char *surface_pixels, unsigned int width, unsigned int height, unsigned int bpp );
|
||||
|
||||
extern void XM_GetWidowSize(int *w, int *h);
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif /* end of __cplusplus */
|
||||
|
||||
|
||||
#endif /* xm_hmi_host_h */
|
||||
|
||||
|
149
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_key.h
Normal file
149
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_key.h
Normal file
@ -0,0 +1,149 @@
|
||||
//****************************************************************************
|
||||
//
|
||||
// Copyright (C) 2012 ZhuoYongHong
|
||||
//
|
||||
// Author ZhuoYongHong
|
||||
//
|
||||
// File name: xm_key.h
|
||||
// constant definition of key
|
||||
//
|
||||
// Revision history
|
||||
//
|
||||
// 2010.08.31 ZhuoYongHong Initial version
|
||||
//
|
||||
//****************************************************************************
|
||||
#ifndef _XM_KEY_H_
|
||||
#define _XM_KEY_H_
|
||||
|
||||
|
||||
/* virtual key codes*/
|
||||
#define VK_POWER 0x01 // POWER
|
||||
|
||||
#define VK_BACK 0x08 /* backspace*/
|
||||
#define VK_TAB 0x09
|
||||
#define VK_RETURN 0x0D
|
||||
#define VK_SHIFT 0x10
|
||||
#define VK_CONTROL 0x11
|
||||
#define VK_MENU 0x12
|
||||
#define VK_CAPITAL 0x14
|
||||
#define VK_ESCAPE 0x1B /* esc*/
|
||||
#define VK_SPACE 0x20 /* spacebar*/
|
||||
#define VK_PRIOR 0x21 /* page up*/
|
||||
#define VK_NEXT 0x22 /* page dn*/
|
||||
#define VK_END 0x23
|
||||
#define VK_HOME 0x24
|
||||
#define VK_LEFT 0x25
|
||||
#define VK_UP 0x26
|
||||
#define VK_RIGHT 0x27
|
||||
#define VK_DOWN 0x28
|
||||
#define VK_INSERT 0x2D
|
||||
#define VK_DELETE 0x2E
|
||||
#define VK_HELP 0x2F // help key
|
||||
|
||||
/* 0x30 - 0x39 ASCII 0 - 9*/
|
||||
#define VK_0 0x30 // 0 key
|
||||
#define VK_1 0x31 // 1 key
|
||||
#define VK_2 0x32 // 2 key
|
||||
#define VK_3 0x33 // 3 key
|
||||
#define VK_4 0x34 // 4 key
|
||||
#define VK_5 0x35 // 5 key
|
||||
#define VK_6 0x36 // 6 key
|
||||
#define VK_7 0x37 // 7 key
|
||||
#define VK_8 0x38 // 8 key
|
||||
#define VK_9 0x39 // 9 key
|
||||
/* 0x41 - 0x5a ASCII A - Z*/
|
||||
#define VK_A 0x41 // a key
|
||||
#define VK_B 0x42 // b key
|
||||
#define VK_C 0x43 // c key
|
||||
#define VK_D 0x44 // d key
|
||||
#define VK_E 0x45 // e key
|
||||
#define VK_F 0x46 // f key
|
||||
#define VK_G 0x47 // g key
|
||||
#define VK_H 0x48 // h key
|
||||
#define VK_I 0x49 // i key
|
||||
#define VK_J 0x4A // j key
|
||||
#define VK_K 0x4B // k key
|
||||
#define VK_L 0x4C // l key
|
||||
#define VK_M 0x4D // m key
|
||||
#define VK_N 0x4E // n key
|
||||
#define VK_O 0x4F // o key
|
||||
#define VK_P 0x50 // p key
|
||||
#define VK_Q 0x51 // q key
|
||||
#define VK_R 0x52 // r key
|
||||
#define VK_S 0x53 // s key
|
||||
#define VK_T 0x54 // t key
|
||||
#define VK_U 0x55 // u key
|
||||
#define VK_V 0x56 // v key
|
||||
#define VK_W 0x57 // w key
|
||||
#define VK_X 0x58 // x key
|
||||
#define VK_Y 0x59 // y key
|
||||
#define VK_Z 0x5A // z key
|
||||
|
||||
/* numeric keypad keys*/
|
||||
#define VK_NUMPAD0 0x60
|
||||
#define VK_NUMPAD1 0x61
|
||||
#define VK_NUMPAD2 0x62
|
||||
#define VK_NUMPAD3 0x63
|
||||
#define VK_NUMPAD4 0x64
|
||||
#define VK_NUMPAD5 0x65
|
||||
#define VK_NUMPAD6 0x66
|
||||
#define VK_NUMPAD7 0x67
|
||||
#define VK_NUMPAD8 0x68
|
||||
#define VK_NUMPAD9 0x69
|
||||
#define VK_MULTIPLY 0x6A /* kp * */
|
||||
#define VK_ADD 0x6B /* kp + */
|
||||
#define VK_SEPARATOR 0x6C
|
||||
#define VK_SUBTRACT 0x6D /* kp - */
|
||||
#define VK_DECIMAL 0x6E /* kp . */
|
||||
#define VK_DIVIDE 0x6F /* kp / */
|
||||
|
||||
#define VK_F1 0x70
|
||||
#define VK_F2 0x71
|
||||
#define VK_F3 0x72
|
||||
#define VK_F4 0x73
|
||||
#define VK_F5 0x74
|
||||
#define VK_F6 0x75
|
||||
#define VK_F7 0x76
|
||||
#define VK_F8 0x77
|
||||
#define VK_F9 0x78
|
||||
#define VK_F10 0x79
|
||||
#define VK_F11 0x7A
|
||||
#define VK_F12 0x7B
|
||||
|
||||
#define VK_VIRGULE 0xBF
|
||||
|
||||
|
||||
|
||||
|
||||
#define VK_AP_SYSTEM_EVENT 0xF0 // ϵͳ<CFB5>¼<EFBFBD>(ģ<>ⰴ<EFBFBD><E2B0B4><EFBFBD><EFBFBD>Ϣ)
|
||||
// <20><><EFBFBD>γ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(д<><D0B4><EFBFBD><EFBFBD>)/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>дģʽ)
|
||||
// lp = 0 <09><><EFBFBD>γ<EFBFBD>
|
||||
// lp = 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(д<><D0B4><EFBFBD><EFBFBD>)
|
||||
// lp = 2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>дģʽ)
|
||||
// lp<6C><70><EFBFBD><EFBFBD> <20>ο<EFBFBD> XM_SYSTEMEVENT <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#define VK_AP_VIDEOSTOP 0xF1 // <20><>Ƶ<EFBFBD><C6B5><EFBFBD>Ž<EFBFBD><C5BD><EFBFBD><EFBFBD>¼<EFBFBD>
|
||||
// lp = 0 <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// lp = 1 <09><>ѹ<EFBFBD>쳣<EFBFBD><ECB3A3><EFBFBD><EFBFBD>
|
||||
// lp = 2 <09><><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
||||
// lp = 3 <09><><EFBFBD><EFBFBD><EFBFBD>쳣 (<28><>SD<53><44><EFBFBD>쳣<EFBFBD><ECB3A3><EFBFBD>ļ<EFBFBD>ϵͳ<CFB5>쳣<EFBFBD><ECB3A3>)
|
||||
|
||||
#define VK_AP_VIDEOITEMERR 0xF2 // <20><>Ƶ<EFBFBD><C6B5><EFBFBD>쳣<EFBFBD>¼<EFBFBD>(<28><><EFBFBD>¸<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>߸<EFBFBD><DFB8><EFBFBD>SD<53><44>)
|
||||
|
||||
|
||||
// TACHOGRAPH <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define VK_AP_UP 0x26 // UP <20><><EFBFBD>ϼ<EFBFBD>
|
||||
#define VK_AP_DOWN 0x28 // DOWN <09><><EFBFBD>¼<EFBFBD>
|
||||
#define VK_AP_MENU VK_F1 // VK_F1 <20>˵<EFBFBD><CBB5><EFBFBD>(<28><><EFBFBD><EFBFBD>/<2F><>ͣ)
|
||||
#define VK_AP_SWITCH VK_F2 // VK_F2 OK
|
||||
#define VK_AP_MODE VK_F3 // VK_F3 ģʽ<C4A3>л<EFBFBD><D0BB><EFBFBD>
|
||||
#define VK_AP_POWER VK_F4 // POWER <20><>Դ<EFBFBD><D4B4>(¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
|
||||
#define VK_AP_VOLINC VK_F5 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
|
||||
#define VK_AP_VOLDEC VK_F6
|
||||
#define VK_AP_MICINC VK_F7 // ¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
|
||||
#define VK_AP_MICDEC VK_F8
|
||||
|
||||
#define VK_AP_URGENT VK_F9 // <20><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>
|
||||
|
||||
#endif // _XM_KEY_
|
412
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_scancode.h
Normal file
412
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/include/xm_scancode.h
Normal file
@ -0,0 +1,412 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file XM_scancode.h
|
||||
*
|
||||
* Defines keyboard scancodes.
|
||||
*/
|
||||
|
||||
#ifndef XM_scancode_h_
|
||||
#define XM_scancode_h_
|
||||
|
||||
|
||||
/**
|
||||
* \brief The XM keyboard scancode representation.
|
||||
*
|
||||
* Values of this type are used to represent keyboard keys, among other places
|
||||
* in the \link XM_Keysym::scancode key.keysym.scancode \endlink field of the
|
||||
* XM_Event structure.
|
||||
*
|
||||
* The values in this enumeration are based on the USB usage page standard:
|
||||
* http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
XM_SCANCODE_UNKNOWN = 0,
|
||||
|
||||
/**
|
||||
* \name Usage page 0x07
|
||||
*
|
||||
* These values are from usage page 0x07 (USB keyboard page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
XM_SCANCODE_A = 4,
|
||||
XM_SCANCODE_B = 5,
|
||||
XM_SCANCODE_C = 6,
|
||||
XM_SCANCODE_D = 7,
|
||||
XM_SCANCODE_E = 8,
|
||||
XM_SCANCODE_F = 9,
|
||||
XM_SCANCODE_G = 10,
|
||||
XM_SCANCODE_H = 11,
|
||||
XM_SCANCODE_I = 12,
|
||||
XM_SCANCODE_J = 13,
|
||||
XM_SCANCODE_K = 14,
|
||||
XM_SCANCODE_L = 15,
|
||||
XM_SCANCODE_M = 16,
|
||||
XM_SCANCODE_N = 17,
|
||||
XM_SCANCODE_O = 18,
|
||||
XM_SCANCODE_P = 19,
|
||||
XM_SCANCODE_Q = 20,
|
||||
XM_SCANCODE_R = 21,
|
||||
XM_SCANCODE_S = 22,
|
||||
XM_SCANCODE_T = 23,
|
||||
XM_SCANCODE_U = 24,
|
||||
XM_SCANCODE_V = 25,
|
||||
XM_SCANCODE_W = 26,
|
||||
XM_SCANCODE_X = 27,
|
||||
XM_SCANCODE_Y = 28,
|
||||
XM_SCANCODE_Z = 29,
|
||||
|
||||
XM_SCANCODE_1 = 30,
|
||||
XM_SCANCODE_2 = 31,
|
||||
XM_SCANCODE_3 = 32,
|
||||
XM_SCANCODE_4 = 33,
|
||||
XM_SCANCODE_5 = 34,
|
||||
XM_SCANCODE_6 = 35,
|
||||
XM_SCANCODE_7 = 36,
|
||||
XM_SCANCODE_8 = 37,
|
||||
XM_SCANCODE_9 = 38,
|
||||
XM_SCANCODE_0 = 39,
|
||||
|
||||
XM_SCANCODE_RETURN = 40,
|
||||
XM_SCANCODE_ESCAPE = 41,
|
||||
XM_SCANCODE_BACKSPACE = 42,
|
||||
XM_SCANCODE_TAB = 43,
|
||||
XM_SCANCODE_SPACE = 44,
|
||||
|
||||
XM_SCANCODE_MINUS = 45,
|
||||
XM_SCANCODE_EQUALS = 46,
|
||||
XM_SCANCODE_LEFTBRACKET = 47,
|
||||
XM_SCANCODE_RIGHTBRACKET = 48,
|
||||
XM_SCANCODE_BACKSLASH = 49, /**< Located at the lower left of the return
|
||||
* key on ISO keyboards and at the right end
|
||||
* of the QWERTY row on ANSI keyboards.
|
||||
* Produces REVERSE SOLIDUS (backslash) and
|
||||
* VERTICAL LINE in a US layout, REVERSE
|
||||
* SOLIDUS and VERTICAL LINE in a UK Mac
|
||||
* layout, NUMBER SIGN and TILDE in a UK
|
||||
* Windows layout, DOLLAR SIGN and POUND SIGN
|
||||
* in a Swiss German layout, NUMBER SIGN and
|
||||
* APOSTROPHE in a German layout, GRAVE
|
||||
* ACCENT and POUND SIGN in a French Mac
|
||||
* layout, and ASTERISK and MICRO SIGN in a
|
||||
* French Windows layout.
|
||||
*/
|
||||
XM_SCANCODE_NONUSHASH = 50, /**< ISO USB keyboards actually use this code
|
||||
* instead of 49 for the same key, but all
|
||||
* OSes I've seen treat the two codes
|
||||
* identically. So, as an implementor, unless
|
||||
* your keyboard generates both of those
|
||||
* codes and your OS treats them differently,
|
||||
* you should generate XM_SCANCODE_BACKSLASH
|
||||
* instead of this code. As a user, you
|
||||
* should not rely on this code because XM
|
||||
* will never generate it with most (all?)
|
||||
* keyboards.
|
||||
*/
|
||||
XM_SCANCODE_SEMICOLON = 51,
|
||||
XM_SCANCODE_APOSTROPHE = 52,
|
||||
XM_SCANCODE_GRAVE = 53, /**< Located in the top left corner (on both ANSI
|
||||
* and ISO keyboards). Produces GRAVE ACCENT and
|
||||
* TILDE in a US Windows layout and in US and UK
|
||||
* Mac layouts on ANSI keyboards, GRAVE ACCENT
|
||||
* and NOT SIGN in a UK Windows layout, SECTION
|
||||
* SIGN and PLUS-MINUS SIGN in US and UK Mac
|
||||
* layouts on ISO keyboards, SECTION SIGN and
|
||||
* DEGREE SIGN in a Swiss German layout (Mac:
|
||||
* only on ISO keyboards), CIRCUMFLEX ACCENT and
|
||||
* DEGREE SIGN in a German layout (Mac: only on
|
||||
* ISO keyboards), SUPERSCRIPT TWO and TILDE in a
|
||||
* French Windows layout, COMMERCIAL AT and
|
||||
* NUMBER SIGN in a French Mac layout on ISO
|
||||
* keyboards, and LESS-THAN SIGN and GREATER-THAN
|
||||
* SIGN in a Swiss German, German, or French Mac
|
||||
* layout on ANSI keyboards.
|
||||
*/
|
||||
XM_SCANCODE_COMMA = 54,
|
||||
XM_SCANCODE_PERIOD = 55,
|
||||
XM_SCANCODE_SLASH = 56,
|
||||
|
||||
XM_SCANCODE_CAPSLOCK = 57,
|
||||
|
||||
XM_SCANCODE_F1 = 58,
|
||||
XM_SCANCODE_F2 = 59,
|
||||
XM_SCANCODE_F3 = 60,
|
||||
XM_SCANCODE_F4 = 61,
|
||||
XM_SCANCODE_F5 = 62,
|
||||
XM_SCANCODE_F6 = 63,
|
||||
XM_SCANCODE_F7 = 64,
|
||||
XM_SCANCODE_F8 = 65,
|
||||
XM_SCANCODE_F9 = 66,
|
||||
XM_SCANCODE_F10 = 67,
|
||||
XM_SCANCODE_F11 = 68,
|
||||
XM_SCANCODE_F12 = 69,
|
||||
|
||||
XM_SCANCODE_PRINTSCREEN = 70,
|
||||
XM_SCANCODE_SCROLLLOCK = 71,
|
||||
XM_SCANCODE_PAUSE = 72,
|
||||
XM_SCANCODE_INSERT = 73, /**< insert on PC, help on some Mac keyboards (but
|
||||
does send code 73, not 117) */
|
||||
XM_SCANCODE_HOME = 74,
|
||||
XM_SCANCODE_PAGEUP = 75,
|
||||
XM_SCANCODE_DELETE = 76,
|
||||
XM_SCANCODE_END = 77,
|
||||
XM_SCANCODE_PAGEDOWN = 78,
|
||||
XM_SCANCODE_RIGHT = 79,
|
||||
XM_SCANCODE_LEFT = 80,
|
||||
XM_SCANCODE_DOWN = 81,
|
||||
XM_SCANCODE_UP = 82,
|
||||
|
||||
XM_SCANCODE_NUMLOCKCLEAR = 83, /**< num lock on PC, clear on Mac keyboards
|
||||
*/
|
||||
XM_SCANCODE_KP_DIVIDE = 84,
|
||||
XM_SCANCODE_KP_MULTIPLY = 85,
|
||||
XM_SCANCODE_KP_MINUS = 86,
|
||||
XM_SCANCODE_KP_PLUS = 87,
|
||||
XM_SCANCODE_KP_ENTER = 88,
|
||||
XM_SCANCODE_KP_1 = 89,
|
||||
XM_SCANCODE_KP_2 = 90,
|
||||
XM_SCANCODE_KP_3 = 91,
|
||||
XM_SCANCODE_KP_4 = 92,
|
||||
XM_SCANCODE_KP_5 = 93,
|
||||
XM_SCANCODE_KP_6 = 94,
|
||||
XM_SCANCODE_KP_7 = 95,
|
||||
XM_SCANCODE_KP_8 = 96,
|
||||
XM_SCANCODE_KP_9 = 97,
|
||||
XM_SCANCODE_KP_0 = 98,
|
||||
XM_SCANCODE_KP_PERIOD = 99,
|
||||
|
||||
XM_SCANCODE_NONUSBACKSLASH = 100, /**< This is the additional key that ISO
|
||||
* keyboards have over ANSI ones,
|
||||
* located between left shift and Y.
|
||||
* Produces GRAVE ACCENT and TILDE in a
|
||||
* US or UK Mac layout, REVERSE SOLIDUS
|
||||
* (backslash) and VERTICAL LINE in a
|
||||
* US or UK Windows layout, and
|
||||
* LESS-THAN SIGN and GREATER-THAN SIGN
|
||||
* in a Swiss German, German, or French
|
||||
* layout. */
|
||||
XM_SCANCODE_APPLICATION = 101, /**< windows contextual menu, compose */
|
||||
XM_SCANCODE_POWER = 102, /**< The USB document says this is a status flag,
|
||||
* not a physical key - but some Mac keyboards
|
||||
* do have a power key. */
|
||||
XM_SCANCODE_KP_EQUALS = 103,
|
||||
XM_SCANCODE_F13 = 104,
|
||||
XM_SCANCODE_F14 = 105,
|
||||
XM_SCANCODE_F15 = 106,
|
||||
XM_SCANCODE_F16 = 107,
|
||||
XM_SCANCODE_F17 = 108,
|
||||
XM_SCANCODE_F18 = 109,
|
||||
XM_SCANCODE_F19 = 110,
|
||||
XM_SCANCODE_F20 = 111,
|
||||
XM_SCANCODE_F21 = 112,
|
||||
XM_SCANCODE_F22 = 113,
|
||||
XM_SCANCODE_F23 = 114,
|
||||
XM_SCANCODE_F24 = 115,
|
||||
XM_SCANCODE_EXECUTE = 116,
|
||||
XM_SCANCODE_HELP = 117,
|
||||
XM_SCANCODE_MENU = 118,
|
||||
XM_SCANCODE_SELECT = 119,
|
||||
XM_SCANCODE_STOP = 120,
|
||||
XM_SCANCODE_AGAIN = 121, /**< redo */
|
||||
XM_SCANCODE_UNDO = 122,
|
||||
XM_SCANCODE_CUT = 123,
|
||||
XM_SCANCODE_COPY = 124,
|
||||
XM_SCANCODE_PASTE = 125,
|
||||
XM_SCANCODE_FIND = 126,
|
||||
XM_SCANCODE_MUTE = 127,
|
||||
XM_SCANCODE_VOLUMEUP = 128,
|
||||
XM_SCANCODE_VOLUMEDOWN = 129,
|
||||
/* not sure whether there's a reason to enable these */
|
||||
/* XM_SCANCODE_LOCKINGCAPSLOCK = 130, */
|
||||
/* XM_SCANCODE_LOCKINGNUMLOCK = 131, */
|
||||
/* XM_SCANCODE_LOCKINGSCROLLLOCK = 132, */
|
||||
XM_SCANCODE_KP_COMMA = 133,
|
||||
XM_SCANCODE_KP_EQUALSAS400 = 134,
|
||||
|
||||
XM_SCANCODE_INTERNATIONAL1 = 135, /**< used on Asian keyboards, see
|
||||
footnotes in USB doc */
|
||||
XM_SCANCODE_INTERNATIONAL2 = 136,
|
||||
XM_SCANCODE_INTERNATIONAL3 = 137, /**< Yen */
|
||||
XM_SCANCODE_INTERNATIONAL4 = 138,
|
||||
XM_SCANCODE_INTERNATIONAL5 = 139,
|
||||
XM_SCANCODE_INTERNATIONAL6 = 140,
|
||||
XM_SCANCODE_INTERNATIONAL7 = 141,
|
||||
XM_SCANCODE_INTERNATIONAL8 = 142,
|
||||
XM_SCANCODE_INTERNATIONAL9 = 143,
|
||||
XM_SCANCODE_LANG1 = 144, /**< Hangul/English toggle */
|
||||
XM_SCANCODE_LANG2 = 145, /**< Hanja conversion */
|
||||
XM_SCANCODE_LANG3 = 146, /**< Katakana */
|
||||
XM_SCANCODE_LANG4 = 147, /**< Hiragana */
|
||||
XM_SCANCODE_LANG5 = 148, /**< Zenkaku/Hankaku */
|
||||
XM_SCANCODE_LANG6 = 149, /**< reserved */
|
||||
XM_SCANCODE_LANG7 = 150, /**< reserved */
|
||||
XM_SCANCODE_LANG8 = 151, /**< reserved */
|
||||
XM_SCANCODE_LANG9 = 152, /**< reserved */
|
||||
|
||||
XM_SCANCODE_ALTERASE = 153, /**< Erase-Eaze */
|
||||
XM_SCANCODE_SYSREQ = 154,
|
||||
XM_SCANCODE_CANCEL = 155,
|
||||
XM_SCANCODE_CLEAR = 156,
|
||||
XM_SCANCODE_PRIOR = 157,
|
||||
XM_SCANCODE_RETURN2 = 158,
|
||||
XM_SCANCODE_SEPARATOR = 159,
|
||||
XM_SCANCODE_OUT = 160,
|
||||
XM_SCANCODE_OPER = 161,
|
||||
XM_SCANCODE_CLEARAGAIN = 162,
|
||||
XM_SCANCODE_CRSEL = 163,
|
||||
XM_SCANCODE_EXSEL = 164,
|
||||
|
||||
XM_SCANCODE_KP_00 = 176,
|
||||
XM_SCANCODE_KP_000 = 177,
|
||||
XM_SCANCODE_THOUSANDSSEPARATOR = 178,
|
||||
XM_SCANCODE_DECIMALSEPARATOR = 179,
|
||||
XM_SCANCODE_CURRENCYUNIT = 180,
|
||||
XM_SCANCODE_CURRENCYSUBUNIT = 181,
|
||||
XM_SCANCODE_KP_LEFTPAREN = 182,
|
||||
XM_SCANCODE_KP_RIGHTPAREN = 183,
|
||||
XM_SCANCODE_KP_LEFTBRACE = 184,
|
||||
XM_SCANCODE_KP_RIGHTBRACE = 185,
|
||||
XM_SCANCODE_KP_TAB = 186,
|
||||
XM_SCANCODE_KP_BACKSPACE = 187,
|
||||
XM_SCANCODE_KP_A = 188,
|
||||
XM_SCANCODE_KP_B = 189,
|
||||
XM_SCANCODE_KP_C = 190,
|
||||
XM_SCANCODE_KP_D = 191,
|
||||
XM_SCANCODE_KP_E = 192,
|
||||
XM_SCANCODE_KP_F = 193,
|
||||
XM_SCANCODE_KP_XOR = 194,
|
||||
XM_SCANCODE_KP_POWER = 195,
|
||||
XM_SCANCODE_KP_PERCENT = 196,
|
||||
XM_SCANCODE_KP_LESS = 197,
|
||||
XM_SCANCODE_KP_GREATER = 198,
|
||||
XM_SCANCODE_KP_AMPERSAND = 199,
|
||||
XM_SCANCODE_KP_DBLAMPERSAND = 200,
|
||||
XM_SCANCODE_KP_VERTICALBAR = 201,
|
||||
XM_SCANCODE_KP_DBLVERTICALBAR = 202,
|
||||
XM_SCANCODE_KP_COLON = 203,
|
||||
XM_SCANCODE_KP_HASH = 204,
|
||||
XM_SCANCODE_KP_SPACE = 205,
|
||||
XM_SCANCODE_KP_AT = 206,
|
||||
XM_SCANCODE_KP_EXCLAM = 207,
|
||||
XM_SCANCODE_KP_MEMSTORE = 208,
|
||||
XM_SCANCODE_KP_MEMRECALL = 209,
|
||||
XM_SCANCODE_KP_MEMCLEAR = 210,
|
||||
XM_SCANCODE_KP_MEMADD = 211,
|
||||
XM_SCANCODE_KP_MEMSUBTRACT = 212,
|
||||
XM_SCANCODE_KP_MEMMULTIPLY = 213,
|
||||
XM_SCANCODE_KP_MEMDIVIDE = 214,
|
||||
XM_SCANCODE_KP_PLUSMINUS = 215,
|
||||
XM_SCANCODE_KP_CLEAR = 216,
|
||||
XM_SCANCODE_KP_CLEARENTRY = 217,
|
||||
XM_SCANCODE_KP_BINARY = 218,
|
||||
XM_SCANCODE_KP_OCTAL = 219,
|
||||
XM_SCANCODE_KP_DECIMAL = 220,
|
||||
XM_SCANCODE_KP_HEXADECIMAL = 221,
|
||||
|
||||
XM_SCANCODE_LCTRL = 224,
|
||||
XM_SCANCODE_LSHIFT = 225,
|
||||
XM_SCANCODE_LALT = 226, /**< alt, option */
|
||||
XM_SCANCODE_LGUI = 227, /**< windows, command (apple), meta */
|
||||
XM_SCANCODE_RCTRL = 228,
|
||||
XM_SCANCODE_RSHIFT = 229,
|
||||
XM_SCANCODE_RALT = 230, /**< alt gr, option */
|
||||
XM_SCANCODE_RGUI = 231, /**< windows, command (apple), meta */
|
||||
|
||||
XM_SCANCODE_MODE = 257, /**< I'm not sure if this is really not covered
|
||||
* by any of the above, but since there's a
|
||||
* special KMOD_MODE for it I'm adding it here
|
||||
*/
|
||||
|
||||
/* @} *//* Usage page 0x07 */
|
||||
|
||||
/**
|
||||
* \name Usage page 0x0C
|
||||
*
|
||||
* These values are mapped from usage page 0x0C (USB consumer page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
XM_SCANCODE_AUDIONEXT = 258,
|
||||
XM_SCANCODE_AUDIOPREV = 259,
|
||||
XM_SCANCODE_AUDIOSTOP = 260,
|
||||
XM_SCANCODE_AUDIOPLAY = 261,
|
||||
XM_SCANCODE_AUDIOMUTE = 262,
|
||||
XM_SCANCODE_MEDIASELECT = 263,
|
||||
XM_SCANCODE_WWW = 264,
|
||||
XM_SCANCODE_MAIL = 265,
|
||||
XM_SCANCODE_CALCULATOR = 266,
|
||||
XM_SCANCODE_COMPUTER = 267,
|
||||
XM_SCANCODE_AC_SEARCH = 268,
|
||||
XM_SCANCODE_AC_HOME = 269,
|
||||
XM_SCANCODE_AC_BACK = 270,
|
||||
XM_SCANCODE_AC_FORWARD = 271,
|
||||
XM_SCANCODE_AC_STOP = 272,
|
||||
XM_SCANCODE_AC_REFRESH = 273,
|
||||
XM_SCANCODE_AC_BOOKMARKS = 274,
|
||||
|
||||
/* @} *//* Usage page 0x0C */
|
||||
|
||||
/**
|
||||
* \name Walther keys
|
||||
*
|
||||
* These are values that Christian Walther added (for mac keyboard?).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
XM_SCANCODE_BRIGHTNESSDOWN = 275,
|
||||
XM_SCANCODE_BRIGHTNESSUP = 276,
|
||||
XM_SCANCODE_DISPLAYSWITCH = 277, /**< display mirroring/dual display
|
||||
switch, video mode switch */
|
||||
XM_SCANCODE_KBDILLUMTOGGLE = 278,
|
||||
XM_SCANCODE_KBDILLUMDOWN = 279,
|
||||
XM_SCANCODE_KBDILLUMUP = 280,
|
||||
XM_SCANCODE_EJECT = 281,
|
||||
XM_SCANCODE_SLEEP = 282,
|
||||
|
||||
XM_SCANCODE_APP1 = 283,
|
||||
XM_SCANCODE_APP2 = 284,
|
||||
|
||||
/* @} *//* Walther keys */
|
||||
|
||||
/**
|
||||
* \name Usage page 0x0C (additional media keys)
|
||||
*
|
||||
* These values are mapped from usage page 0x0C (USB consumer page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
XM_SCANCODE_AUDIOREWIND = 285,
|
||||
XM_SCANCODE_AUDIOFASTFORWARD = 286,
|
||||
|
||||
/* @} *//* Usage page 0x0C (additional media keys) */
|
||||
|
||||
/* Add any other keys here. */
|
||||
|
||||
XM_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
|
||||
for array bounds */
|
||||
} XM_Scancode;
|
||||
|
||||
#endif /* XM_scancode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -0,0 +1,44 @@
|
||||
//****************************************************************************
|
||||
//
|
||||
// Copyright (C) 2021 ShenZhen ExceedSpace
|
||||
//
|
||||
// Author ZhuoYongHong
|
||||
//
|
||||
// File name: xm_windows_host.h
|
||||
// constant<6E><74>macro & basic typedef definition of X-Mini System
|
||||
//
|
||||
// Revision history
|
||||
//
|
||||
// 2021.04.11 ZhuoYongHong Initial version
|
||||
//
|
||||
//****************************************************************************
|
||||
|
||||
#ifndef XM_WINDOWS_HOST_H
|
||||
#define XM_WINDOWS_HOST_H
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
extern void * XM_WinHost_WindowCreate(const char* title,
|
||||
const unsigned int width,
|
||||
const unsigned int height);
|
||||
|
||||
extern void XM_WinHost_WindowDestroy(void);
|
||||
|
||||
//extern void XM_WinHost_WindowBuffersSwap(native_window_xm_t *native_window);
|
||||
|
||||
extern void XM_WinHost_WindowBuffersSwap(char *surface_pixels, unsigned int width, unsigned int height, unsigned int bpp );
|
||||
|
||||
extern void XM_GetWidowSize(int *w, int *h);
|
||||
|
||||
|
||||
#if defined (__cplusplus)
|
||||
}
|
||||
#endif /* end of __cplusplus */
|
||||
|
||||
|
||||
#endif /* xm_windows_host_h */
|
||||
|
||||
|
234
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/main_loop_xm.c
Normal file
234
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/main_loop_xm.c
Normal file
@ -0,0 +1,234 @@
|
||||
/**
|
||||
* File: main_loop_xm.c
|
||||
* Author: ZhuoYongHong
|
||||
* Brief: XM implemented main_loop interface
|
||||
*
|
||||
* Copyright (c) 2021 - 2025 ShenZhen ExceedSpace Electronics Co.,Ltd.
|
||||
*
|
||||
* this program is distributed in the hope that it will be useful,
|
||||
* but without any warranty; without even the implied warranty of
|
||||
* merchantability or fitness for a particular purpose. see the
|
||||
* license file for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* history:
|
||||
* ================================================================
|
||||
* 2021-04-17 ZhuoYongHong created
|
||||
*
|
||||
*/
|
||||
|
||||
#include "native_window_xm.h"
|
||||
#include "main_loop/main_loop_simple.h"
|
||||
#include "main_loop_xm.h"
|
||||
#include "base/window_manager.h"
|
||||
#include "base/font_manager.h"
|
||||
//#include "lcd/lcd_xm.h"
|
||||
#include "base/idle.h"
|
||||
#include "base/events.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/system_info.h"
|
||||
|
||||
#include <xm.h>
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include "awtk_global.h"
|
||||
#include "tkc/time_now.h"
|
||||
#include "base/input_method.h"
|
||||
#include <XM_event.h>
|
||||
|
||||
|
||||
|
||||
static ret_t main_loop_xm_dispatch_tp_event(main_loop_simple_t* loop, XM_EVENT* xm_event) {
|
||||
pointer_event_t event;
|
||||
int type = xm_event->type;
|
||||
widget_t* widget = loop->base.wm;
|
||||
|
||||
memset(&event, 0x00, sizeof(event));
|
||||
switch (type) {
|
||||
case XM_EVENT_TOUCHDOWN: {
|
||||
{
|
||||
loop->pressed = 1;
|
||||
pointer_event_init(&event, EVT_POINTER_DOWN, widget, xm_event->tp.x,
|
||||
xm_event->tp.y);
|
||||
event.button = 0;
|
||||
event.pressed = loop->pressed;
|
||||
event.e.native_window_handle = 0;//SDL_GetWindowFromID(xm_event->button.windowID);
|
||||
if (xm_event->tp.timestamp)
|
||||
event.e.time = xm_event->tp.timestamp;
|
||||
|
||||
//SDL_CaptureMouse(TRUE);
|
||||
window_manager_dispatch_input_event(widget, (event_t*)&event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XM_EVENT_TOUCHUP: {
|
||||
{
|
||||
//SDL_CaptureMouse(FALSE);
|
||||
pointer_event_init(&event, EVT_POINTER_UP, widget, xm_event->tp.x,
|
||||
xm_event->tp.y);
|
||||
event.button = 0;
|
||||
event.pressed = loop->pressed;
|
||||
event.e.native_window_handle = 0;//SDL_GetWindowFromID(xm_event->button.windowID);
|
||||
if (xm_event->tp.timestamp)
|
||||
event.e.time = xm_event->tp.timestamp;
|
||||
|
||||
#ifdef ENABLE_TOUCH_UP_LONG_PERIOD_RESPONSE
|
||||
// 当快速触摸时,因为按下/释放的间隔时间过短, 按下的效果无法在LCD显示出来.
|
||||
// 使能ENABLE_TOUCH_UP_LONG_PERIOD_RESPONSE可以显示明显的Touch Down按下响应
|
||||
sleep_ms(30);
|
||||
#endif
|
||||
window_manager_dispatch_input_event(widget, (event_t*)&event);
|
||||
loop->pressed = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XM_EVENT_TOUCHMOVE: {
|
||||
pointer_event_init(&event, EVT_POINTER_MOVE, widget, xm_event->tp.x,
|
||||
xm_event->tp.y);
|
||||
event.button = 0;
|
||||
event.pressed = loop->pressed;
|
||||
event.e.native_window_handle = 0;//SDL_GetWindowFromID(xm_event->button.windowID);
|
||||
if (xm_event->tp.timestamp)
|
||||
event.e.time = xm_event->tp.timestamp;
|
||||
|
||||
window_manager_dispatch_input_event(widget, (event_t*)&event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t main_loop_xm_dispatch_key_event(main_loop_simple_t* loop, XM_EVENT* xm_event) {
|
||||
key_event_t event;
|
||||
int type = xm_event->type;
|
||||
widget_t* widget = loop->base.wm;
|
||||
|
||||
memset(&event, 0x00, sizeof(event));
|
||||
switch (type) {
|
||||
case XM_EVENT_KEYDOWN: {
|
||||
{
|
||||
//if(xm_event->key.repeat)
|
||||
// key_event_init(&event, EVT_KEY_REPEAT, widget, xm_event->key.scancode);
|
||||
//else
|
||||
key_event_init(&event, EVT_KEY_DOWN, widget, xm_event->key.scancode);
|
||||
event.e.native_window_handle = 0;
|
||||
if (xm_event->tp.timestamp)
|
||||
event.e.time = xm_event->tp.timestamp;
|
||||
|
||||
window_manager_dispatch_input_event(widget, (event_t*)&event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case XM_EVENT_KEYUP: {
|
||||
{
|
||||
key_event_init(&event, EVT_KEY_UP, widget, xm_event->key.scancode);
|
||||
event.e.native_window_handle = 0;
|
||||
if (xm_event->tp.timestamp)
|
||||
event.e.time = xm_event->tp.timestamp;
|
||||
|
||||
window_manager_dispatch_input_event(widget, (event_t*)&event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t main_loop_xm_dispatch_text_input(main_loop_simple_t* loop, XM_EVENT* xm_event) {
|
||||
im_commit_event_t event;
|
||||
XM_TextInputEvent* text_input_event = (XM_TextInputEvent*)&xm_event->text;
|
||||
|
||||
memset(&event, 0x00, sizeof(event));
|
||||
event.e = event_init(EVT_IM_COMMIT, NULL);
|
||||
event.text = text_input_event->text;
|
||||
|
||||
return input_method_dispatch_to_widget(input_method(), &(event.e));
|
||||
}
|
||||
|
||||
#ifdef NINE
|
||||
#include <nine\nine_event.h>
|
||||
static ret_t main_loop_xm_dispatch_nine_event(main_loop_simple_t* loop, XM_EVENT* xm_event) {
|
||||
event_t nine_event;
|
||||
widget_t* widget = loop->base.wm;
|
||||
nine_event = event_init(EVT_NINE_EVT, NULL);
|
||||
memcpy(&xm_event->nine.event.e, &nine_event, sizeof(event_t));
|
||||
return widget_dispatch_recursive(window_manager(), &xm_event->nine.event.e);
|
||||
//return widget_dispatch(window_manager(), &nine_event);
|
||||
//window_manager_dispatch_input_event(widget, (event_t*)&xm_event->nine.event.e);
|
||||
}
|
||||
#endif
|
||||
|
||||
static ret_t main_loop_xm_dispatch(main_loop_simple_t* loop) {
|
||||
XM_EVENT event;
|
||||
ret_t ret = RET_OK;
|
||||
|
||||
while(XM_WaitEvent(&event, 1) && loop->base.running) {
|
||||
switch (event.type)
|
||||
{
|
||||
case XM_EVENT_TOUCHDOWN:
|
||||
case XM_EVENT_TOUCHUP:
|
||||
case XM_EVENT_TOUCHMOVE:
|
||||
ret = main_loop_xm_dispatch_tp_event(loop, &event);
|
||||
// 改善触摸事件的响应速度
|
||||
if (ret == RET_OK)
|
||||
return ret;
|
||||
break;
|
||||
case XM_EVENT_KEYDOWN:
|
||||
case XM_EVENT_KEYUP:
|
||||
ret = main_loop_xm_dispatch_key_event(loop, &event);
|
||||
break;
|
||||
case XM_EVENT_TEXTINPUT:
|
||||
ret = main_loop_xm_dispatch_text_input(loop, &event);
|
||||
break;
|
||||
#ifdef NINE
|
||||
case XM_EVENT_NINE:
|
||||
ret = main_loop_xm_dispatch_nine_event(loop, &event);
|
||||
if (ret == RET_OK)
|
||||
return ret;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ret_t main_loop_xm_destroy(main_loop_t* l) {
|
||||
main_loop_simple_t* loop = (main_loop_simple_t*)l;
|
||||
main_loop_simple_reset(loop);
|
||||
native_window_xm_deinit();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t main_loop_xm_init_canvas(uint32_t w, uint32_t h) {
|
||||
//lcd_t* lcd = platform_create_lcd(w, h);
|
||||
|
||||
// return_value_if_fail(lcd != NULL, RET_OOM);
|
||||
native_window_xm_init(TRUE, w, h);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
main_loop_t* main_loop_init(int w, int h) {
|
||||
main_loop_simple_t* loop = NULL;
|
||||
return_value_if_fail(main_loop_xm_init_canvas(w, h) == RET_OK, NULL);
|
||||
|
||||
loop = main_loop_simple_init(w, h, NULL, NULL);
|
||||
return_value_if_fail(loop != NULL, NULL);
|
||||
|
||||
loop->base.destroy = main_loop_xm_destroy;
|
||||
loop->dispatch_input = main_loop_xm_dispatch;
|
||||
|
||||
return (main_loop_t*)loop;
|
||||
}
|
318
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/native_window_xm.c
Normal file
318
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/native_window_xm.c
Normal file
@ -0,0 +1,318 @@
|
||||
/**
|
||||
* File: native_window_xm.c
|
||||
* Author: zhuoyonghong
|
||||
* Brief: native window xm
|
||||
*
|
||||
* Copyright (c) 2019 - 2021 zhuoyonghong
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* License file for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* History:
|
||||
* ================================================================
|
||||
* 2021-04-10 zhuoyonghong created
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef XM_WINDOWS_HOST
|
||||
#include "xm_windows_host.h"
|
||||
#elif defined(XM_HMI_HOST)
|
||||
#include "xm_hmi_host.h"
|
||||
#endif
|
||||
|
||||
#include "base/system_info.h"
|
||||
#include "base/window_manager.h"
|
||||
|
||||
#include "lcd/lcd_nanovg.h"
|
||||
#include "base/native_window.h"
|
||||
#include "openvg.h"
|
||||
#include "vgext.h"
|
||||
|
||||
typedef struct _native_window_xm_t {
|
||||
native_window_t native_window;
|
||||
void *vg_context;
|
||||
void *vg_surface;
|
||||
//void *handle;
|
||||
|
||||
void *window; // win32<33><32><EFBFBD>ھ<EFBFBD><DABE><EFBFBD>
|
||||
|
||||
void *lcd;
|
||||
|
||||
canvas_t canvas;
|
||||
} native_window_xm_t;
|
||||
|
||||
static native_window_t* s_shared_win = NULL;
|
||||
|
||||
#define NATIVE_WINDOW_XM(win) ((native_window_xm_t*)(win))
|
||||
|
||||
static ret_t native_window_xm_move(native_window_t* win, xy_t x, xy_t y) {
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t native_window_xm_resize(native_window_t* win, wh_t w, wh_t h) {
|
||||
win->rect.w = w;
|
||||
win->rect.h = h;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
static canvas_t* native_window_xm_get_canvas(native_window_t* win) {
|
||||
native_window_xm_t* xm = NATIVE_WINDOW_XM(win);
|
||||
|
||||
return &(xm->canvas);
|
||||
}
|
||||
|
||||
#ifdef WITH_VGCANVAS
|
||||
void *vgcanvas_get_current_surface(void);
|
||||
|
||||
static ret_t native_window_xm_swap_buffer(native_window_t* win)
|
||||
{
|
||||
native_window_xm_t* xm = NATIVE_WINDOW_XM(win);
|
||||
//lcd_vgcanvas_t* lcd = (lcd_vgcanvas_t*)xm->lcd;
|
||||
(void)(xm);
|
||||
void *surface = vgcanvas_get_current_surface();
|
||||
void* surfacePixels = (void*)vgGetSurfacePixels(surface);
|
||||
#ifdef XM_WINDOWS_HOST
|
||||
XM_WinHost_WindowBuffersSwap(surfacePixels, win->rect.w, win->rect.h, 32);
|
||||
#elif defined(XM_HMI_HOST)
|
||||
//vgFinish();
|
||||
XM_HmiHost_WindowBuffersSwap(surfacePixels, win->rect.w, win->rect.h, 32);
|
||||
#endif
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
#else
|
||||
#include "board.h"
|
||||
#include "pxp.h"
|
||||
#include "lcd.h"
|
||||
#include "cp15/cp15.h"
|
||||
#include "lcd/lcd_mem_bgr565.h"
|
||||
#include "lcd/lcd_mem_bgra8888.h"
|
||||
|
||||
static ret_t lcd_mem_swap(lcd_t* lcd)
|
||||
{
|
||||
lcd_mem_t* mem = (lcd_mem_t*)lcd;
|
||||
uint8_t* offline_fb = mem->offline_fb;
|
||||
uint32_t cur_addr;
|
||||
CP15_clean_dcache_for_dma((uint32_t)offline_fb, (uint32_t)offline_fb + FB_SIZE);
|
||||
if (ark_lcd_get_fb_addr(2) != NULL) {
|
||||
LcdOsdInfo info = {0};
|
||||
uint32_t width, height;
|
||||
ark_lcs_get_osd_area(&width,&height);
|
||||
ark_lcd_get_osd_yaddr(LCD_UI_LAYER, &cur_addr);
|
||||
if (!ark_lcd_get_osd_info_atomic_isactive(LCD_UI_LAYER) && cur_addr == (uint32_t)mem->next_fb)
|
||||
ark_lcd_wait_for_vsync();
|
||||
|
||||
info.width = width;
|
||||
info.height = height;
|
||||
#if LCD_ROTATE_ANGLE != LCD_ROTATE_ANGLE_0
|
||||
int ret;
|
||||
uint32_t src_format,dst_format;
|
||||
#if LCD_BPP == 16
|
||||
src_format = PXP_SRC_FMT_RGB565;
|
||||
dst_format = PXP_OUT_FMT_RGB565;
|
||||
#else
|
||||
src_format = PXP_SRC_FMT_RGB888;
|
||||
dst_format = PXP_OUT_FMT_ARGB8888;
|
||||
#endif
|
||||
|
||||
#if LCD_ROTATE_ANGLE != LCD_ROTATE_ANGLE_180
|
||||
info.width = height;
|
||||
info.height = width;
|
||||
#endif
|
||||
ret = pxp_scaler_rotate((uint32_t)offline_fb, 0, 0, src_format, width, height,
|
||||
(uint32_t)mem->next_fb, 0, dst_format, info.width, info.height, LCD_ROTATE_ANGLE);
|
||||
if(ret < 0){
|
||||
printf("%s pxp_scaler_rotate failed\n", __func__);
|
||||
//...
|
||||
}
|
||||
#else
|
||||
mem->next_fb = (uint8_t*)offline_fb;
|
||||
#endif
|
||||
info.yaddr = (uint32_t)mem->next_fb;
|
||||
#if LCD_BPP == 16
|
||||
info.format = LCD_OSD_FORAMT_RGB565;
|
||||
#else
|
||||
info.format = LCD_OSD_FORAMT_ARGB888;
|
||||
#endif
|
||||
ark_lcd_set_osd_info_atomic(LCD_UI_LAYER,&info);
|
||||
lcd_mem_set_offline_fb(mem, mem->online_fb);
|
||||
lcd_mem_set_online_fb(mem, offline_fb);
|
||||
} else {
|
||||
ark_lcd_set_osd_yaddr(LCD_UI_LAYER, (unsigned int)offline_fb);
|
||||
ark_lcd_set_osd_sync(LCD_UI_LAYER);
|
||||
/* wait vsync */
|
||||
ark_lcd_wait_for_vsync();
|
||||
lcd_mem_set_offline_fb(mem, mem->online_fb);
|
||||
lcd_mem_set_online_fb(mem, offline_fb);
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
lcd_t* platform_create_lcd(wh_t w, wh_t h) {
|
||||
lcd_t* lcd = NULL;
|
||||
|
||||
#if LCD_BPP == 16
|
||||
if (ark_lcd_get_fb_addr(2) != NULL) {
|
||||
lcd = lcd_mem_bgr565_create_three_fb(w, h, ark_lcd_get_fb_addr(0),
|
||||
ark_lcd_get_fb_addr(1), ark_lcd_get_fb_addr(2));
|
||||
}
|
||||
else
|
||||
lcd = lcd_mem_bgr565_create_double_fb(w, h, ark_lcd_get_fb_addr(0),
|
||||
ark_lcd_get_fb_addr(1));
|
||||
#elif LCD_BPP == 32
|
||||
if (ark_lcd_get_fb_addr(2) != NULL) {
|
||||
lcd = lcd_mem_bgra8888_create_three_fb(w, h, ark_lcd_get_fb_addr(0),
|
||||
ark_lcd_get_fb_addr(1), ark_lcd_get_fb_addr(2));
|
||||
}
|
||||
else
|
||||
lcd = lcd_mem_bgra8888_create_double_fb(w, h, ark_lcd_get_fb_addr(0),
|
||||
ark_lcd_get_fb_addr(1));
|
||||
#endif
|
||||
|
||||
lcd->swap = lcd_mem_swap;
|
||||
lcd->support_dirty_rect = 0;
|
||||
|
||||
return lcd;
|
||||
}
|
||||
#endif
|
||||
|
||||
extern ret_t tk_quit();
|
||||
|
||||
|
||||
|
||||
static ret_t native_window_xm_get_info(native_window_t* win, native_window_info_t* info) {
|
||||
|
||||
native_window_xm_t* xm = NATIVE_WINDOW_XM(win);
|
||||
int w, h;
|
||||
(void)(xm);
|
||||
|
||||
info->x = 0;
|
||||
info->y = 0;
|
||||
info->ratio = 1;
|
||||
//info->ratio = xm->canvas.lcd->ratio;
|
||||
XM_GetWidowSize(&w, &h);
|
||||
info->w = w;
|
||||
info->h = h;
|
||||
|
||||
win->rect.x = 0;
|
||||
win->rect.y = 0;
|
||||
win->rect.w = w;
|
||||
win->rect.h = h;
|
||||
win->ratio = info->ratio;
|
||||
|
||||
log_debug("ratio=%f %d %d\n", info->ratio, info->w, info->h);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static const native_window_vtable_t s_native_window_vtable = {
|
||||
.type = "native_window_xm",
|
||||
.resize = native_window_xm_resize,
|
||||
.get_info = native_window_xm_get_info,
|
||||
#ifdef WITH_VGCANVAS
|
||||
.swap_buffer = native_window_xm_swap_buffer,
|
||||
#endif
|
||||
.get_canvas = native_window_xm_get_canvas,
|
||||
};
|
||||
|
||||
static ret_t native_window_xm_on_destroy(object_t* obj) {
|
||||
log_debug("Close native window.\n");
|
||||
//native_window_sdl_close(NATIVE_WINDOW(obj));
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
static ret_t native_window_xm_exec(object_t* obj, const char* cmd, const char* args) {
|
||||
|
||||
return RET_NOT_FOUND;
|
||||
}
|
||||
|
||||
static const object_vtable_t s_native_window_xm_vtable = {
|
||||
.type = "native_window_xm",
|
||||
.desc = "native_window_xm",
|
||||
.size = sizeof(native_window_xm_t),
|
||||
.exec = native_window_xm_exec,
|
||||
.on_destroy = native_window_xm_on_destroy};
|
||||
|
||||
static native_window_t* native_window_create_internal(uint32_t w, uint32_t h) {
|
||||
lcd_t* lcd = NULL;
|
||||
object_t* obj = object_create(&s_native_window_xm_vtable);
|
||||
native_window_t* win = NATIVE_WINDOW(obj);
|
||||
native_window_xm_t* xm = NATIVE_WINDOW_XM(win);
|
||||
return_value_if_fail(xm != NULL, NULL);
|
||||
|
||||
#ifdef XM_WINDOWS_HOST
|
||||
xm->window = XM_WinHost_WindowCreate("XM", w, h);
|
||||
#elif defined(XM_HMI_HOST)
|
||||
xm->window = XM_HmiHost_WindowCreate("XM", w, h);
|
||||
#endif
|
||||
|
||||
canvas_t* c = &(xm->canvas);
|
||||
|
||||
win->shared = TRUE;
|
||||
win->handle = xm->window;
|
||||
win->vt = &s_native_window_vtable;
|
||||
win->rect = rect_init(0, 0, w, h);
|
||||
|
||||
#ifdef WITH_VGCANVAS
|
||||
lcd = lcd_nanovg_init(win);
|
||||
#else
|
||||
lcd = platform_create_lcd(w, h);
|
||||
#endif
|
||||
xm->lcd = lcd;
|
||||
|
||||
canvas_init(c, lcd, font_manager());
|
||||
|
||||
|
||||
return win;
|
||||
}
|
||||
|
||||
native_window_t* native_window_create(widget_t* widget) {
|
||||
native_window_t* nw = s_shared_win;
|
||||
return_value_if_fail(nw != NULL, NULL);
|
||||
|
||||
widget_set_prop_pointer(widget, WIDGET_PROP_NATIVE_WINDOW, nw);
|
||||
|
||||
return nw;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ret_t native_window_xm_init(bool_t shared, uint32_t w, uint32_t h) {
|
||||
|
||||
(void)(shared);
|
||||
|
||||
#ifdef XM_WINDOWS_HOST
|
||||
//if(!XM_WinHost_WindowCreate ("VG", w, h))
|
||||
// return RET_FAIL;
|
||||
#endif
|
||||
|
||||
|
||||
s_shared_win = native_window_create_internal(w, h);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ret_t native_window_xm_deinit(void) {
|
||||
if (s_shared_win != NULL) {
|
||||
object_unref(OBJECT(s_shared_win));
|
||||
s_shared_win = NULL;
|
||||
}
|
||||
|
||||
#ifdef XM_WINDOWS_HOST
|
||||
XM_WinHost_WindowDestroy();
|
||||
#elif defined(XM_HMI_HOST)
|
||||
XM_HmiHost_WindowDestroy();
|
||||
#endif
|
||||
|
||||
return RET_OK;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* File: native_window_xm.h
|
||||
* Author: ShenZhen ExceedSpace
|
||||
* Brief: native window xm
|
||||
*
|
||||
* Copyright (c) 2019 - 2021 ShenZhen ExceedSpace Co.,Ltd.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* License file for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* History:
|
||||
* ================================================================
|
||||
* 2021-07-01 ZhuoYongHong created
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef TK_NATIVE_WINDOW_XM_H
|
||||
#define TK_NATIVE_WINDOW_XM_H
|
||||
|
||||
#include "base/native_window.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
ret_t native_window_xm_deinit(void);
|
||||
ret_t native_window_xm_init(bool_t shared, uint32_t w, uint32_t h);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif /*TK_NATIVE_WINDOW_XM_H*/
|
@ -0,0 +1,174 @@
|
||||
#ifndef _AT_AUTOTEST_TAG_H_
|
||||
#define _AT_AUTOTEST_TAG_H_
|
||||
|
||||
#define MAX_TAG_NAME 48
|
||||
|
||||
typedef struct _AT_TAG {
|
||||
char tag_name[MAX_TAG_NAME]; // tag name
|
||||
int tag_id; // tag identifier
|
||||
// char xml_name[MAX_TAG_NAME]; // XML Tag Name
|
||||
} AT_TAG, *PAT_TAG;
|
||||
|
||||
#define AT_UNDEF_TAG 0 // 未定义TAG
|
||||
#define AT_POINTER 1
|
||||
#define AT_UTF8_STRING 2
|
||||
#define AT_INT_CONST 3
|
||||
#define AT_FLOAT_CONST 4
|
||||
#define AT_DELAY 5 // 延时
|
||||
#define AT_IntervalTime 6 // 定义每条指令之间的间隙
|
||||
#define AT_loop 7
|
||||
#define AT_endloop 8
|
||||
#define AT_include 9
|
||||
#define AT_randi 10
|
||||
#define AT_randf 11
|
||||
|
||||
|
||||
enum {
|
||||
AT_NINE_EVENT_VCU_IDLE = 201,
|
||||
AT_NINE_EVENT_VCU_PHONE_CONNECTED,
|
||||
AT_NINE_EVENT_VCU_NOT_READY,
|
||||
|
||||
AT_NINE_EVENT_VCU_READY,
|
||||
AT_PACK_UP_TEMPLE,
|
||||
AT_SIT_SIT_BARRELS,
|
||||
AT_PACK_UP_TEMPLE_AND_SIT_SIT_BARRELS,
|
||||
AT_NINE_EVENT_VCU_CYCLING_MODE,
|
||||
AT_NONE,
|
||||
AT_HELP_MOVE,
|
||||
AT_BACK_CAR,
|
||||
AT_NINE_EVENT_VCU_UNLOCK_MODE,
|
||||
AT_NINE_EVENT_VCU_RUNNING_STATUS,
|
||||
AT_POWER_OUTPUT,
|
||||
AT_SPEED,
|
||||
AT_STEERING_ANGLE,
|
||||
AT_NINE_EVENT_VCU_GEAR,
|
||||
AT_GEAR_ASSIT,
|
||||
AT_GEAR_ECO,
|
||||
AT_GEAR_COAST,
|
||||
AT_GEAR_FURIOUS,
|
||||
AT_NINE_EVENT_VCU_BLE_UPDATE_SYSTEM,
|
||||
AT_NINE_EVENT_WIFI_CONNECT,
|
||||
AT_STATE_DISCONNECT,
|
||||
AT_STATE_CONNECTING,
|
||||
AT_STATE_CONNECTED,
|
||||
AT_NINE_EVENT_UPDATE_PROCESS,
|
||||
AT_NINE_EVENT_UPDATE_FINISH,
|
||||
AT_NINE_EVENT_BASIC_ERROR_DETAILS,
|
||||
AT_code,
|
||||
AT_NINE_EVENT_BASIC_ERROR_CLOSE,
|
||||
AT_NINE_EVENT_WEATHER_DETAILS,
|
||||
AT_INTERVAL,
|
||||
AT_SIGN,
|
||||
AT_TEMP,
|
||||
AT_SCALE,
|
||||
AT_ALERT,
|
||||
AT_TYPE,
|
||||
AT_TIME,
|
||||
AT_TITLE, // 标题, 允许多条
|
||||
AT_text,
|
||||
AT_NINE_EVENT_WEATHER_CLOSE,
|
||||
AT_NINE_EVENT_LOW_BATTERY,
|
||||
AT_NINE_EVENT_KEY_AUTO, // auto键
|
||||
AT_NINE_EVENT_KEY_LONG_AUTO, // 长按auto键, 读取剩余锁定时间
|
||||
AT_NINE_EVENT_KEY_TRIGGER,
|
||||
AT_NINE_EVENT_KEY_WHEEL,
|
||||
AT_NINE_EVENT_KEY_BREAK, // 刹车键
|
||||
AT_NINE_EVENT_KEY_ADD, // +键
|
||||
AT_NINE_EVENT_KEY_SUB, // -键
|
||||
AT_NINE_EVENT_KEY_USER, // 自定义键
|
||||
AT_NINE_EVENT_POWER_DISSIPATION,
|
||||
AT_data,
|
||||
AT_index,
|
||||
AT_NINE_EVENT_POWER_DISSIPATION_REALTIME,
|
||||
AT_value,
|
||||
AT_NINE_EVENT_TRAFFIC_DATA,
|
||||
AT_distance,
|
||||
AT_NINE_EVENT_NAVIGATION,
|
||||
AT_totalDistance,
|
||||
AT_retainDistance,
|
||||
AT_retainTime,
|
||||
AT_iconType,
|
||||
AT_curStepRetainDis,
|
||||
AT_trafficLightNum,
|
||||
AT_gpsStrength,
|
||||
AT_currentRoadName,
|
||||
AT_nextRoadName,
|
||||
AT_NavigationText,
|
||||
AT_NINE_EVENT_HIGH_BEAM,
|
||||
AT_on,
|
||||
AT_off,
|
||||
AT_NINE_EVENT_LOW_BEAM,
|
||||
AT_NINE_EVENT_LEFT_TURN,
|
||||
AT_NINE_EVENT_RIGHT_TURN,
|
||||
AT_NINE_EVENT_ABS,
|
||||
AT_NINE_EVENT_CRUISE_CONTROL,
|
||||
AT_NINE_EVENT_READY_HINT,
|
||||
AT_NINE_EVENT_GSM,
|
||||
AT_no_signal,
|
||||
AT_one,
|
||||
AT_two,
|
||||
AT_full,
|
||||
AT_NINE_EVENT_GPS,
|
||||
AT_strong,
|
||||
AT_weak,
|
||||
AT_NINE_EVENT_BLE1,
|
||||
AT_NINE_EVENT_BLE2,
|
||||
AT_NINE_EVENT_DATETIME,
|
||||
AT_msec,
|
||||
AT_second,
|
||||
AT_minute,
|
||||
AT_hour,
|
||||
AT_day,
|
||||
AT_wday,
|
||||
AT_month,
|
||||
AT_year,
|
||||
AT_NINE_EVENT_ODO,
|
||||
AT_NINE_EVENT_TRIP,
|
||||
AT_NINE_EVENT_LIGHT_SWITCH, // 光敏日夜切换
|
||||
AT_night,
|
||||
AT_NINE_EVENT_THEME_SWITCH, // 主题切换
|
||||
AT_NINE_EVENT_PASSWORD, // 密码校验
|
||||
AT_NINE_EVENT_PAGE_SWITCH,
|
||||
AT_NINE_EVENT_REMAINING_MILEAGE, // 电池剩余里程
|
||||
AT_NINE_EVENT_CHARGE_TIME, // 剩余充电事件及百分比
|
||||
AT_remaining_time,
|
||||
AT_percent,
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef struct _TOKEN {
|
||||
char *string; // string offset
|
||||
int count; // string count
|
||||
int id; // token id
|
||||
int value; // 数字的值
|
||||
float f_value; // 浮点值
|
||||
} TOKEN, *PTOKEN ;
|
||||
|
||||
typedef struct _AT_TAG_STRUCT *PAT_TAG_STRUCT;
|
||||
/* tag's structure */
|
||||
typedef struct _AT_TAG_STRUCT {
|
||||
int id;
|
||||
char *string; // string offset
|
||||
int count; // string count
|
||||
|
||||
PAT_TAG_STRUCT tag_parent; // pointer to parent
|
||||
PAT_TAG_STRUCT tag_child; // pointer to first child
|
||||
PAT_TAG_STRUCT tag_sibling; // pointer to next sibling
|
||||
} AT_TAG_STRUCT;
|
||||
|
||||
void at_init_parser (unsigned char *data_to_parser);
|
||||
|
||||
TOKEN* AT_NextToken(void);
|
||||
AT_TAG_STRUCT* AddChild (AT_TAG_STRUCT *parent, AT_TAG_STRUCT *child);
|
||||
AT_TAG_STRUCT *AT_NewTag (TOKEN *token);
|
||||
int nine_AT_Define(void);
|
||||
char *GetIspTagName (int tag_id);
|
||||
|
||||
extern TOKEN *curr_token;
|
||||
|
||||
#define CurrToken(token) \
|
||||
curr_token = token;
|
||||
|
||||
|
||||
#endif
|
@ -0,0 +1,524 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "nine_autotest_id.h"
|
||||
|
||||
enum CHAR_CLASSES { F_END, OTHER, SPACE, DIGIT, LETTER, ENTER};
|
||||
|
||||
static const unsigned char charclass[] = {
|
||||
F_END, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, // .......
|
||||
OTHER, SPACE, ENTER, OTHER, OTHER, SPACE, OTHER, OTHER, // . _
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, // ........
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, // .. .....
|
||||
SPACE, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, // !"#$%&'
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, // ()*+,-./
|
||||
DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, // 01234567
|
||||
DIGIT, DIGIT, OTHER, SPACE, OTHER, OTHER, OTHER, LETTER, // 89:;<=>?
|
||||
OTHER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // @ABCDEFG
|
||||
LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // HIJKLMNO
|
||||
LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // PQRSTUVW
|
||||
LETTER, LETTER, LETTER, OTHER, OTHER, OTHER, OTHER, LETTER, // XYZ[\]^_
|
||||
OTHER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // `abcdefg
|
||||
LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // hijklmno
|
||||
LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, LETTER, // pqrstuvw
|
||||
LETTER, LETTER, LETTER, OTHER, OTHER, OTHER, OTHER, OTHER, // xyz{|}~
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,
|
||||
};
|
||||
|
||||
|
||||
static AT_TAG at_tag[] = {
|
||||
|
||||
"loop", AT_loop,
|
||||
"endloop", AT_endloop,
|
||||
"include", AT_include,
|
||||
"randi", AT_randi,
|
||||
"randf", AT_randf,
|
||||
|
||||
|
||||
"VCU_IDLE", AT_NINE_EVENT_VCU_IDLE,
|
||||
"VCU_PHONE_CONNECTED", AT_NINE_EVENT_VCU_PHONE_CONNECTED,
|
||||
"VCU_NOT_READY", AT_NINE_EVENT_VCU_NOT_READY,
|
||||
"VCU_READY", AT_NINE_EVENT_VCU_READY,
|
||||
"PACK_UP_TEMPLE", AT_PACK_UP_TEMPLE,
|
||||
"SIT_SIT_BARRELS", AT_SIT_SIT_BARRELS,
|
||||
"PACK_UP_TEMPLE_AND_SIT_SIT_BARRELS", AT_PACK_UP_TEMPLE_AND_SIT_SIT_BARRELS,
|
||||
"VCU_CYCLING_MODE", AT_NINE_EVENT_VCU_CYCLING_MODE,
|
||||
"NONE", AT_NONE,
|
||||
"HELP_MOVE", AT_HELP_MOVE,
|
||||
"BACK_CAR", AT_BACK_CAR,
|
||||
"VCU_UNLOCK_MODE", AT_NINE_EVENT_VCU_UNLOCK_MODE,
|
||||
"VCU_RUNNING_STATUS", AT_NINE_EVENT_VCU_RUNNING_STATUS,
|
||||
"POWER_OUTPUT", AT_POWER_OUTPUT,
|
||||
"SPEED", AT_SPEED,
|
||||
"STEERING_ANGLE", AT_STEERING_ANGLE,
|
||||
"VCU_GEAR", AT_NINE_EVENT_VCU_GEAR,
|
||||
"ASSIT", AT_GEAR_ASSIT,
|
||||
"ECO", AT_GEAR_ECO,
|
||||
"COAST", AT_GEAR_COAST,
|
||||
"FURIOUS", AT_GEAR_FURIOUS,
|
||||
"VCU_BLE_UPDATE_SYSTEM", AT_NINE_EVENT_VCU_BLE_UPDATE_SYSTEM,
|
||||
"WIFI_CONNECT", AT_NINE_EVENT_WIFI_CONNECT,
|
||||
"DISCONNECT", AT_STATE_DISCONNECT,
|
||||
"CONNECTING", AT_STATE_CONNECTING,
|
||||
"CONNECTED", AT_STATE_CONNECTED,
|
||||
"UPDATE_PROCESS", AT_NINE_EVENT_UPDATE_PROCESS,
|
||||
"UPDATE_FINISH", AT_NINE_EVENT_UPDATE_FINISH,
|
||||
"BASIC_ERROR_DETAILS", AT_NINE_EVENT_BASIC_ERROR_DETAILS,
|
||||
"code", AT_code,
|
||||
"BASIC_ERROR_CLOSE", AT_NINE_EVENT_BASIC_ERROR_CLOSE,
|
||||
"WEATHER_DETAILS", AT_NINE_EVENT_WEATHER_DETAILS,
|
||||
"INTERVAL", AT_INTERVAL,
|
||||
"SIGN", AT_SIGN,
|
||||
"TEMP", AT_TEMP,
|
||||
"SCALE", AT_SCALE,
|
||||
"ALERT", AT_ALERT,
|
||||
"TYPE", AT_TYPE,
|
||||
"TIME", AT_TIME,
|
||||
"text", AT_text,
|
||||
"WEATHER_CLOSE", AT_NINE_EVENT_WEATHER_CLOSE,
|
||||
"LOW_BATTERY", AT_NINE_EVENT_LOW_BATTERY,
|
||||
"KEY_AUTO", AT_NINE_EVENT_KEY_AUTO,
|
||||
"KEY_LONG_AUTO", AT_NINE_EVENT_KEY_LONG_AUTO,
|
||||
"KEY_TRIGGER", AT_NINE_EVENT_KEY_TRIGGER,
|
||||
"KEY_WHEEL", AT_NINE_EVENT_KEY_WHEEL,
|
||||
"KEY_BREAK", AT_NINE_EVENT_KEY_BREAK,
|
||||
"KEY_ADD", AT_NINE_EVENT_KEY_ADD,
|
||||
"KEY_SUB", AT_NINE_EVENT_KEY_SUB,
|
||||
"KEY_USER", AT_NINE_EVENT_KEY_USER,
|
||||
"POWER_DISSIPATION", AT_NINE_EVENT_POWER_DISSIPATION,
|
||||
"data", AT_data,
|
||||
"POWER_DISSIPATION_REALTIME", AT_NINE_EVENT_POWER_DISSIPATION_REALTIME,
|
||||
"value", AT_value,
|
||||
"NAVIGATION", AT_NINE_EVENT_NAVIGATION,
|
||||
"totalDistance", AT_totalDistance,
|
||||
"retainDistance", AT_retainDistance,
|
||||
"retainTime", AT_retainTime,
|
||||
"iconType", AT_iconType,
|
||||
"curStepRetainDis", AT_curStepRetainDis,
|
||||
"trafficLightNum", AT_trafficLightNum,
|
||||
"gpsStrength", AT_gpsStrength,
|
||||
"currentRoadName", AT_currentRoadName,
|
||||
"nextRoadName", AT_nextRoadName,
|
||||
"NavigationText", AT_NavigationText,
|
||||
"HIGH_BEAM", AT_NINE_EVENT_HIGH_BEAM,
|
||||
"on", AT_on,
|
||||
"off", AT_off,
|
||||
"LOW_BEAM", AT_NINE_EVENT_LOW_BEAM,
|
||||
"LEFT_TURN", AT_NINE_EVENT_LEFT_TURN,
|
||||
"RIGHT_TURN", AT_NINE_EVENT_RIGHT_TURN,
|
||||
"ABS", AT_NINE_EVENT_ABS,
|
||||
"CRUISE_CONTROL", AT_NINE_EVENT_CRUISE_CONTROL,
|
||||
"READY_HINT", AT_NINE_EVENT_READY_HINT,
|
||||
"GSM", AT_NINE_EVENT_GSM,
|
||||
"no_signal", AT_no_signal,
|
||||
"one", AT_one,
|
||||
"two", AT_two,
|
||||
"full", AT_full,
|
||||
"GPS", AT_NINE_EVENT_GPS,
|
||||
"strong", AT_strong,
|
||||
"weak", AT_weak,
|
||||
"BLE1", AT_NINE_EVENT_BLE1,
|
||||
"BLE2", AT_NINE_EVENT_BLE2,
|
||||
"Delay", AT_DELAY,
|
||||
"IntervalTime", AT_IntervalTime,
|
||||
"DATETIME", AT_NINE_EVENT_DATETIME,
|
||||
"msec", AT_msec,
|
||||
"second", AT_second,
|
||||
"minute", AT_minute,
|
||||
"hour", AT_hour,
|
||||
"day", AT_day,
|
||||
"wday", AT_wday,
|
||||
"month", AT_month,
|
||||
"year", AT_year,
|
||||
"ODO", AT_NINE_EVENT_ODO,
|
||||
"TRIP", AT_NINE_EVENT_TRIP,
|
||||
"LIGHT_SWITCH", AT_NINE_EVENT_LIGHT_SWITCH,
|
||||
"night", AT_night,
|
||||
"THEME_SWITCH", AT_NINE_EVENT_THEME_SWITCH,
|
||||
"TRAFFIC_DATA", AT_NINE_EVENT_TRAFFIC_DATA,
|
||||
"distance", AT_distance,
|
||||
"PASSWORD", AT_NINE_EVENT_PASSWORD,
|
||||
"PAGE_SWITCH", AT_NINE_EVENT_PAGE_SWITCH,
|
||||
"TITLE", AT_TITLE,
|
||||
"index", AT_index,
|
||||
"REMAINING_MILEAGE", AT_NINE_EVENT_REMAINING_MILEAGE,
|
||||
"CHARGE_TIME", AT_NINE_EVENT_CHARGE_TIME,
|
||||
"remaining_time", AT_remaining_time,
|
||||
"percent", AT_percent,
|
||||
"", 0,
|
||||
};
|
||||
|
||||
static TOKEN token;
|
||||
TOKEN *curr_token;
|
||||
static unsigned char *NextChar;
|
||||
|
||||
|
||||
//#define stricmp strcasecmp
|
||||
static int AtTagComp (const void* a, const void* b)
|
||||
{
|
||||
return stricmp (((AT_TAG *) a)->tag_name, ((AT_TAG *) b)->tag_name);
|
||||
}
|
||||
|
||||
void AT_SortKeyword(void)
|
||||
{
|
||||
qsort (at_tag, sizeof(at_tag)/sizeof(at_tag[0]), sizeof (at_tag[0]), AtTagComp);
|
||||
}
|
||||
|
||||
void at_init_parser (unsigned char *data_to_parser)
|
||||
{
|
||||
curr_token = NULL;
|
||||
NextChar = data_to_parser;
|
||||
|
||||
AT_SortKeyword();
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int GetAtTagID (char *name, int len)
|
||||
{
|
||||
int cc, lo, mid, hi;
|
||||
AT_TAG *Ip;
|
||||
char str[MAX_TAG_NAME+1];
|
||||
int size;
|
||||
|
||||
size = len;
|
||||
if(size > MAX_TAG_NAME)
|
||||
size = MAX_TAG_NAME;
|
||||
|
||||
strncpy (str, name, size);
|
||||
str[size] = 0;
|
||||
|
||||
|
||||
// Binary search.
|
||||
lo = 0;
|
||||
hi = sizeof(at_tag)/sizeof(at_tag[0]) - 1;
|
||||
|
||||
while (lo <= hi)
|
||||
{
|
||||
mid = (lo + hi) / 2;
|
||||
Ip = &at_tag[mid];
|
||||
cc = stricmp (str, Ip->tag_name);
|
||||
|
||||
if (!cc)
|
||||
return Ip->tag_id;
|
||||
else if (cc < 0)
|
||||
hi = mid - 1;
|
||||
else
|
||||
lo = mid + 1;
|
||||
}
|
||||
|
||||
printf ("GetAtTagID %s\n", str);
|
||||
//assert (0);
|
||||
return AT_UNDEF_TAG; // Not found.
|
||||
}
|
||||
|
||||
|
||||
// 获取下一个语法基本单元TOKEN
|
||||
TOKEN* AT_NextToken(void)
|
||||
{
|
||||
int sign = 1; // 符号位 +1, -1
|
||||
|
||||
if(curr_token)
|
||||
{
|
||||
TOKEN *temp = curr_token;
|
||||
curr_token = NULL;
|
||||
return temp;
|
||||
}
|
||||
//curr_token = NULL;
|
||||
while ( 1 )
|
||||
{
|
||||
// 过滤连续的空格字符
|
||||
while(charclass[*NextChar] == SPACE)
|
||||
{
|
||||
NextChar ++;
|
||||
}
|
||||
|
||||
/* end of file */
|
||||
if (*NextChar == 0)
|
||||
{
|
||||
return (0);
|
||||
} /* end if (c==EOF) */
|
||||
|
||||
if(*NextChar == '\n')
|
||||
{
|
||||
token.id = '\n';
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
|
||||
// 处理注释
|
||||
if (*NextChar == '/' && *(NextChar+1) == '/')
|
||||
{
|
||||
// 注释行直到行尾
|
||||
NextChar += 2;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (*NextChar == '/' && *(NextChar+1) == ' ')
|
||||
{
|
||||
NextChar += 2;
|
||||
}
|
||||
|
||||
if (*NextChar == '=' && *(NextChar+1) == '=' && *(NextChar+2) == '=')
|
||||
{
|
||||
// 注释行直到行尾
|
||||
NextChar += 3;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
if (*NextChar == '(')
|
||||
{
|
||||
NextChar += 1;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
if (*NextChar == ';')
|
||||
{
|
||||
NextChar += 1;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
if(*NextChar == '=' && *(NextChar+1) == '>')
|
||||
{
|
||||
NextChar += 2;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// 处理操作符
|
||||
if(*NextChar == ':')
|
||||
{
|
||||
token.id = ':';
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
else if(*NextChar == '=')
|
||||
{
|
||||
token.id = '=';
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
else if(*NextChar == '.')
|
||||
{
|
||||
token.id = '.';
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
else if(*NextChar == ',')
|
||||
{
|
||||
token.id = ',';
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
else if(*NextChar == '[' || *NextChar == ']')
|
||||
{
|
||||
token.id = *NextChar;
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar ++;
|
||||
return &token;
|
||||
}
|
||||
else if(*NextChar == '-')
|
||||
{
|
||||
if( *(NextChar+1) == '>')
|
||||
{
|
||||
token.id = AT_POINTER;
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 2;
|
||||
NextChar += 2;
|
||||
return &token;
|
||||
}
|
||||
else
|
||||
{
|
||||
token.id = '-'; // 负数
|
||||
token.string = (char *)NextChar;
|
||||
token.count = 1;
|
||||
NextChar += 1;
|
||||
|
||||
// 过滤连续的空格字符
|
||||
while(charclass[*NextChar] == SPACE)
|
||||
{
|
||||
NextChar ++;
|
||||
}
|
||||
|
||||
if(charclass[*NextChar] == DIGIT)
|
||||
{
|
||||
sign = -1;
|
||||
goto negative_number_process;
|
||||
}
|
||||
|
||||
return &token;
|
||||
}
|
||||
}
|
||||
else if(*NextChar == '\\')
|
||||
{
|
||||
NextChar += 1;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
if(*NextChar == '\r')
|
||||
NextChar ++;
|
||||
continue;
|
||||
}
|
||||
else if(*NextChar == '@')
|
||||
{
|
||||
// UTF8 字符串
|
||||
NextChar += 1;
|
||||
char *str = (char *)NextChar;
|
||||
while( *NextChar && *NextChar != '\r' && *NextChar != '\n' )
|
||||
NextChar ++;
|
||||
token.id = AT_UTF8_STRING;
|
||||
token.string = str;
|
||||
token.count = (char *)NextChar - str;
|
||||
return &token;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(*NextChar == '0' && (*(NextChar+1) == 'x' || *(NextChar+1) == 'X') )
|
||||
{
|
||||
// 0x816c68a0
|
||||
unsigned int value = 0;
|
||||
char *str = (char *)NextChar;
|
||||
NextChar += 2;
|
||||
while(*NextChar && ( (*NextChar >= '0' && *NextChar <= '9') || (*NextChar >= 'a' && *NextChar <= 'f') || (*NextChar >= 'A' && *NextChar <= 'F')) )
|
||||
{
|
||||
value = value * 16 + ((*NextChar <= '9') ? (*NextChar - '0') : (toupper(*NextChar) - 'A' + 10));
|
||||
NextChar ++;
|
||||
}
|
||||
|
||||
token.id = AT_INT_CONST;
|
||||
token.value = value;
|
||||
token.string = str;
|
||||
token.count = (char *)NextChar - str;
|
||||
return &token;
|
||||
}
|
||||
|
||||
if(charclass[*NextChar] == DIGIT)
|
||||
{
|
||||
// 正整数
|
||||
unsigned int value;
|
||||
char *str;
|
||||
|
||||
sign = 1;
|
||||
|
||||
negative_number_process:
|
||||
|
||||
value = 0;
|
||||
str = (char *)NextChar;
|
||||
while(*NextChar && (*NextChar >= '0' && *NextChar <= '9'))
|
||||
{
|
||||
value = value * 10 + *NextChar - '0';
|
||||
NextChar ++;
|
||||
}
|
||||
|
||||
if(*NextChar == '.') // 小数点
|
||||
{
|
||||
// 浮点数
|
||||
float f_value = (float)value;
|
||||
float f_base = 0.1f;
|
||||
NextChar ++;
|
||||
while(*NextChar && (*NextChar >= '0' && *NextChar <= '9'))
|
||||
{
|
||||
f_value = f_value + (*NextChar - '0') * f_base;
|
||||
NextChar ++;
|
||||
f_base = (float)(f_base / 10.0);
|
||||
}
|
||||
token.id = AT_FLOAT_CONST;
|
||||
token.f_value = sign * f_value;
|
||||
token.string = str;
|
||||
token.count = (char *)NextChar - str;
|
||||
return &token;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// 正整数
|
||||
token.id = AT_INT_CONST;
|
||||
token.value = sign * value;
|
||||
token.string = str;
|
||||
token.count = (char *)NextChar - str;
|
||||
return &token;
|
||||
}
|
||||
}
|
||||
|
||||
if(charclass[*NextChar] == LETTER)
|
||||
{
|
||||
// 关键字
|
||||
char key[128];
|
||||
int len = 0;
|
||||
key[len ++] = *NextChar;
|
||||
NextChar ++;
|
||||
while( *NextChar && (charclass[*NextChar] == LETTER || charclass[*NextChar] == DIGIT || *NextChar == '_') )
|
||||
{
|
||||
key[len ++] = *NextChar;
|
||||
NextChar ++;
|
||||
}
|
||||
key[len] = 0;
|
||||
token.id = GetAtTagID (key, len);
|
||||
token.string = (char *)NextChar - len;
|
||||
token.count = len;
|
||||
return &token;
|
||||
}
|
||||
|
||||
// 非法字符
|
||||
NextChar++;
|
||||
|
||||
}
|
||||
//return 0;
|
||||
}
|
||||
|
||||
char *AT_GetAtTagName (int tag_id)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sizeof(at_tag)/sizeof(at_tag[0]); i++)
|
||||
if(at_tag[i].tag_id == tag_id)
|
||||
return at_tag[i].tag_name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
#include "../include/XM_scancode.h"
|
||||
|
||||
/* Windows scancode to XM scancode mapping table */
|
||||
/* derived from Microsoft scan code document, http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc */
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
static const XM_Scancode windows_scancode_table[] =
|
||||
{
|
||||
/* 0 1 2 3 4 5 6 7 */
|
||||
/* 8 9 A B C D E F */
|
||||
XM_SCANCODE_UNKNOWN, XM_SCANCODE_ESCAPE, XM_SCANCODE_1, XM_SCANCODE_2, XM_SCANCODE_3, XM_SCANCODE_4, XM_SCANCODE_5, XM_SCANCODE_6, /* 0 */
|
||||
XM_SCANCODE_7, XM_SCANCODE_8, XM_SCANCODE_9, XM_SCANCODE_0, XM_SCANCODE_MINUS, XM_SCANCODE_EQUALS, XM_SCANCODE_BACKSPACE, XM_SCANCODE_TAB, /* 0 */
|
||||
|
||||
XM_SCANCODE_Q, XM_SCANCODE_W, XM_SCANCODE_E, XM_SCANCODE_R, XM_SCANCODE_T, XM_SCANCODE_Y, XM_SCANCODE_U, XM_SCANCODE_I, /* 1 */
|
||||
XM_SCANCODE_O, XM_SCANCODE_P, XM_SCANCODE_LEFTBRACKET, XM_SCANCODE_RIGHTBRACKET, XM_SCANCODE_RETURN, XM_SCANCODE_LCTRL, XM_SCANCODE_A, XM_SCANCODE_S, /* 1 */
|
||||
|
||||
XM_SCANCODE_D, XM_SCANCODE_F, XM_SCANCODE_G, XM_SCANCODE_H, XM_SCANCODE_J, XM_SCANCODE_K, XM_SCANCODE_L, XM_SCANCODE_SEMICOLON, /* 2 */
|
||||
XM_SCANCODE_APOSTROPHE, XM_SCANCODE_GRAVE, XM_SCANCODE_LSHIFT, XM_SCANCODE_BACKSLASH, XM_SCANCODE_Z, XM_SCANCODE_X, XM_SCANCODE_C, XM_SCANCODE_V, /* 2 */
|
||||
|
||||
XM_SCANCODE_B, XM_SCANCODE_N, XM_SCANCODE_M, XM_SCANCODE_COMMA, XM_SCANCODE_PERIOD, XM_SCANCODE_SLASH, XM_SCANCODE_RSHIFT, XM_SCANCODE_PRINTSCREEN,/* 3 */
|
||||
XM_SCANCODE_LALT, XM_SCANCODE_SPACE, XM_SCANCODE_CAPSLOCK, XM_SCANCODE_F1, XM_SCANCODE_F2, XM_SCANCODE_F3, XM_SCANCODE_F4, XM_SCANCODE_F5, /* 3 */
|
||||
|
||||
XM_SCANCODE_F6, XM_SCANCODE_F7, XM_SCANCODE_F8, XM_SCANCODE_F9, XM_SCANCODE_F10, XM_SCANCODE_NUMLOCKCLEAR, XM_SCANCODE_SCROLLLOCK, XM_SCANCODE_HOME, /* 4 */
|
||||
XM_SCANCODE_UP, XM_SCANCODE_PAGEUP, XM_SCANCODE_KP_MINUS, XM_SCANCODE_LEFT, XM_SCANCODE_KP_5, XM_SCANCODE_RIGHT, XM_SCANCODE_KP_PLUS, XM_SCANCODE_END, /* 4 */
|
||||
|
||||
XM_SCANCODE_DOWN, XM_SCANCODE_PAGEDOWN, XM_SCANCODE_INSERT, XM_SCANCODE_DELETE, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_NONUSBACKSLASH,XM_SCANCODE_F11, /* 5 */
|
||||
XM_SCANCODE_F12, XM_SCANCODE_PAUSE, XM_SCANCODE_UNKNOWN, XM_SCANCODE_LGUI, XM_SCANCODE_RGUI, XM_SCANCODE_APPLICATION, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, /* 5 */
|
||||
|
||||
XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_F13, XM_SCANCODE_F14, XM_SCANCODE_F15, XM_SCANCODE_F16, /* 6 */
|
||||
XM_SCANCODE_F17, XM_SCANCODE_F18, XM_SCANCODE_F19, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, /* 6 */
|
||||
|
||||
XM_SCANCODE_INTERNATIONAL2, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_INTERNATIONAL1, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN, /* 7 */
|
||||
XM_SCANCODE_UNKNOWN, XM_SCANCODE_INTERNATIONAL4, XM_SCANCODE_UNKNOWN, XM_SCANCODE_INTERNATIONAL5, XM_SCANCODE_UNKNOWN, XM_SCANCODE_INTERNATIONAL3, XM_SCANCODE_UNKNOWN, XM_SCANCODE_UNKNOWN /* 7 */
|
||||
};
|
||||
/* *INDENT-ON* */
|
1229
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/vgcanvas_nanovg_vg.c
Normal file
1229
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/vgcanvas_nanovg_vg.c
Normal file
File diff suppressed because it is too large
Load Diff
376
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/xm_hmi_host.c
Normal file
376
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/xm_hmi_host.c
Normal file
@ -0,0 +1,376 @@
|
||||
|
||||
// ??Hmi??
|
||||
#if XM_HMI_HOST
|
||||
|
||||
#include "xm_hmi_host.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <VG/openvg.h>
|
||||
#include <VG/vgu.h>
|
||||
#include <VG/vgext.h>
|
||||
#include "rtos.h"
|
||||
#include "xm_event.h"
|
||||
#include "xm_user.h"
|
||||
#include "vg_lcdc.h"
|
||||
#include <tkc/fs.h>
|
||||
#include <tkc/platform.h>
|
||||
#include "tkc/mem.h"
|
||||
#include "board.h"
|
||||
#include "pxp.h"
|
||||
#include "lcd.h"
|
||||
|
||||
|
||||
|
||||
#define CLASS_NAME "XM_VG"
|
||||
#define WINDOW_TITLE "XM_VG"
|
||||
|
||||
#define EnterCriticalSection OS_Use
|
||||
#define LeaveCriticalSection OS_Unuse
|
||||
#define DeleteCriticalSection OS_DeleteRSema
|
||||
#define InitializeCriticalSection OS_CREATERSEMA
|
||||
#define CRITICAL_SECTION OS_RSEMA
|
||||
|
||||
extern int OS_WaitCSemaTimed (OS_CSEMA* pCSema, int TimeOut);
|
||||
extern unsigned long XM_GetTickCount (void);
|
||||
extern void vgScanVideoMemoryUsage (
|
||||
VGuint* TotalFreeBytes, /* VideoMemory????????? */
|
||||
VGuint* MaximumAllocateBytes /* VideoMemory??????????? */
|
||||
);
|
||||
|
||||
static void init_pc_autotest(void); // ?????????????
|
||||
|
||||
static CRITICAL_SECTION event_critical_section;
|
||||
static OS_CSEMA event_csema;
|
||||
|
||||
#define MAX_BUFFER_SIZE 0x3F
|
||||
|
||||
static XM_EVENT eventBuffer[MAX_BUFFER_SIZE+1]; // ????
|
||||
static volatile int eventBPos; // ??????
|
||||
static volatile int eventEPos; // ??????
|
||||
|
||||
// ????
|
||||
static unsigned int win_width;
|
||||
static unsigned int win_height;
|
||||
|
||||
static int tp_clicked = 0;
|
||||
|
||||
|
||||
static float dpi_ratio = 1.0;
|
||||
|
||||
// ?????????????
|
||||
// ?????
|
||||
// 1 ?????????????
|
||||
// 0 ?????????????
|
||||
int XM_TpEventProc (unsigned int tp_event, unsigned int xPos, unsigned int yPos, unsigned int ticket)
|
||||
{
|
||||
int ret;
|
||||
if(win_width == 0 || win_height == 0)
|
||||
return 0;
|
||||
|
||||
EnterCriticalSection (&event_critical_section);
|
||||
if(ticket == 0)
|
||||
ticket = XM_GetTickCount();
|
||||
do {
|
||||
// ??????????
|
||||
if( ((eventEPos + 1) & MAX_BUFFER_SIZE) == (eventBPos & MAX_BUFFER_SIZE) )
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
XM_EVENT *event;
|
||||
if (tp_event == XM_EVENT_TOUCHDOWN)
|
||||
{
|
||||
if (tp_clicked)
|
||||
{
|
||||
// TOUCHUP????, ?????
|
||||
break;
|
||||
}
|
||||
tp_clicked = 1;
|
||||
}
|
||||
else if(tp_event == XM_EVENT_TOUCHUP)
|
||||
{
|
||||
// ?????TOUCHUP
|
||||
if(tp_clicked == 0)
|
||||
break;
|
||||
tp_clicked = 0;
|
||||
}
|
||||
// ??????????????
|
||||
event = eventBuffer + (eventEPos & MAX_BUFFER_SIZE);
|
||||
memset (event, 0, sizeof(XM_TouchEvent));
|
||||
event->type = tp_event;
|
||||
event->tp.timestamp = ticket;
|
||||
event->tp.type = tp_event;
|
||||
event->tp.x = xPos;
|
||||
event->tp.y = yPos;
|
||||
|
||||
eventEPos ++;
|
||||
|
||||
// ?????
|
||||
OS_SignalCSema (&event_csema);
|
||||
|
||||
ret = 1;
|
||||
}
|
||||
} while (0);
|
||||
|
||||
LeaveCriticalSection (&event_critical_section);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef NINE
|
||||
// ??NINE?????????
|
||||
// nine_event nine??
|
||||
// ticket ?????
|
||||
// ?????
|
||||
// 1 ?????????????
|
||||
// 0 ?????????????
|
||||
int XM_NineEventProc(nine_event_t *nine_event, unsigned int ticket)
|
||||
{
|
||||
int ret;
|
||||
EnterCriticalSection(&event_critical_section);
|
||||
// ??????????
|
||||
if (((eventEPos + 1) & MAX_BUFFER_SIZE) == (eventBPos & MAX_BUFFER_SIZE))
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
XM_EVENT *event;
|
||||
// ??????????????
|
||||
event = eventBuffer + (eventEPos & MAX_BUFFER_SIZE);
|
||||
memset(event, 0, sizeof(XM_NineEvent));
|
||||
event->type = XM_EVENT_NINE;
|
||||
event->nine.type = XM_EVENT_NINE;
|
||||
event->nine.timestamp = ticket;
|
||||
memcpy(&event->nine.event, nine_event, sizeof(nine_event_t));
|
||||
|
||||
eventEPos++;
|
||||
|
||||
// ?????
|
||||
OS_SignalCSema (&event_csema);
|
||||
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
LeaveCriticalSection(&event_critical_section);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ??????
|
||||
int XM_WaitEvent (XM_EVENT *event, unsigned int timeout)
|
||||
{
|
||||
int ret = 0;
|
||||
if(OS_WaitCSemaTimed (&event_csema, timeout) == 0)
|
||||
{
|
||||
EnterCriticalSection (&event_critical_section);
|
||||
if( eventBPos != eventEPos )
|
||||
{
|
||||
memcpy (event, eventBuffer + (eventBPos & MAX_BUFFER_SIZE), sizeof(XM_EVENT));
|
||||
eventBPos ++;
|
||||
ret = 1;
|
||||
}
|
||||
LeaveCriticalSection (&event_critical_section);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float XM_GetWindowDpiRatio(void)
|
||||
{
|
||||
dpi_ratio = 1.0f;
|
||||
return dpi_ratio;
|
||||
}
|
||||
|
||||
|
||||
static void windowDestroy(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void XM_HmiHost_WindowDestroy(void)
|
||||
{
|
||||
DeleteCriticalSection (&event_critical_section);
|
||||
OS_DeleteCSema (&event_csema);
|
||||
windowDestroy ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void * XM_HmiHost_WindowCreate(const char* title,
|
||||
const unsigned int width,
|
||||
const unsigned int height)
|
||||
{
|
||||
OS_CreateCSema (&event_csema, 0);
|
||||
InitializeCriticalSection (&event_critical_section);
|
||||
eventBPos = eventEPos = 0;
|
||||
win_width = width;
|
||||
win_height = height;
|
||||
tp_clicked = 0;
|
||||
|
||||
init_pc_autotest ();
|
||||
return (void *)1;
|
||||
}
|
||||
|
||||
//extern uint64_t get_time_ms64(void);
|
||||
|
||||
void XM_HmiHost_WindowBuffersSwap(char *surface_pixels, unsigned int width, unsigned int height, unsigned int bpp)
|
||||
{
|
||||
void xm_vg_release_gpu_fb (void);
|
||||
//unsigned int t1 = (unsigned int) get_time_ms64();
|
||||
unsigned int lcd_buffer = (unsigned int)xm_vg_require_gpu_fb();
|
||||
|
||||
//lcd_buffer += xm_vg_get_osd_stride() * (xm_vg_get_height() - 1);
|
||||
bpp = xm_vg_get_bpp ();
|
||||
// 630H ???ARGB8888?RGB565??
|
||||
#ifdef ENABLE_FB_DIRTY_RECTS_COPY
|
||||
extern int vg_surface_sync(unsigned int lcd_buffer, unsigned int width, unsigned int height);
|
||||
// ??????????????LCD??FB
|
||||
if (vg_surface_sync(lcd_buffer, width, height))
|
||||
{
|
||||
// ????
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if LCD_ROTATE_ANGLE != LCD_ROTATE_ANGLE_0
|
||||
unsigned int lcd_tmp_buf = ark_lcd_get_virt_addr();
|
||||
int src_width = xm_vg_get_width();
|
||||
int src_height = xm_vg_get_height();
|
||||
int dst_width = src_width;
|
||||
int dst_height = src_height;
|
||||
int src_format, dst_format, lcd_format;
|
||||
static int lcd_first_show = 0;
|
||||
int ret;
|
||||
|
||||
#if ((LCD_ROTATE_ANGLE == LCD_ROTATE_ANGLE_90) || (LCD_ROTATE_ANGLE == LCD_ROTATE_ANGLE_270))
|
||||
dst_width = src_height;
|
||||
dst_height = src_width;
|
||||
#endif
|
||||
if (bpp == 32)
|
||||
{
|
||||
src_format = PXP_SRC_FMT_RGB888;
|
||||
dst_format = PXP_OUT_FMT_ARGB8888;
|
||||
lcd_format = LCD_OSD_FORAMT_ARGB888;
|
||||
vgReadPixels((void *)lcd_tmp_buf, xm_vg_get_osd_stride(), VG_sARGB_8888, 0, 0, src_width, src_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
src_format = PXP_SRC_FMT_RGB565;
|
||||
dst_format = PXP_OUT_FMT_RGB565;
|
||||
lcd_format = LCD_OSD_FORAMT_RGB565;
|
||||
vgReadPixels((void *)lcd_tmp_buf, xm_vg_get_osd_stride(), VG_sRGB_565, 0, 0, src_width, src_height);
|
||||
}
|
||||
ret = pxp_scaler_rotate(lcd_tmp_buf, 0, 0, src_format, src_width, src_height,
|
||||
(uint32_t)lcd_buffer, 0, dst_format, dst_width, dst_height, LCD_ROTATE_ANGLE);
|
||||
if(ret < 0)
|
||||
{
|
||||
printf("%s pxp_scaler_rotate failed\n", __func__);
|
||||
//...
|
||||
}
|
||||
if(!lcd_first_show)
|
||||
{
|
||||
ark_lcd_set_osd_size(LCD_UI_LAYER, dst_width, dst_height);
|
||||
ark_lcd_set_osd_format(LCD_UI_LAYER, lcd_format);
|
||||
lcd_first_show = 1;
|
||||
}
|
||||
#else
|
||||
if (bpp == 32)
|
||||
{
|
||||
vgReadPixels((void *)lcd_buffer, xm_vg_get_osd_stride(), VG_sARGB_8888, 0, 0, xm_vg_get_width(), xm_vg_get_height());
|
||||
}
|
||||
else
|
||||
{
|
||||
vgReadPixels((void *)lcd_buffer, xm_vg_get_osd_stride(), VG_sRGB_565, 0, 0, xm_vg_get_width(), xm_vg_get_height());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//unsigned int t2 = (unsigned int) get_time_ms64();
|
||||
//unsigned int t3 = (unsigned int)get_time_ms64();
|
||||
//printf("ReadPixel = %d, rel = %d ms\r\n", t2 - t1, t3 - t2);
|
||||
xm_vg_release_gpu_fb ();
|
||||
|
||||
//VGuint TotalFreeBytes, MaximumAllocateBytes;
|
||||
//vgScanVideoMemoryUsage (&TotalFreeBytes, &MaximumAllocateBytes);
|
||||
//printf ("TotalFreeBytes=%d, MaximumAllocateBytes=%d\n",TotalFreeBytes, MaximumAllocateBytes);
|
||||
}
|
||||
|
||||
void XM_GetWidowSize(int *w, int *h)
|
||||
{
|
||||
*w = win_width;
|
||||
*h = win_height;
|
||||
}
|
||||
|
||||
void XM_GetDrawableSize(int *w, int *h)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
extern int nine_at_define(unsigned char *script_data);
|
||||
|
||||
#define AT_FILE_NAME "./autotest.at"
|
||||
static int run_at_script(void)
|
||||
{
|
||||
int32_t file_size;
|
||||
unsigned char *script = NULL;
|
||||
do {
|
||||
file_size = file_get_size (AT_FILE_NAME);
|
||||
if(file_size < 0)
|
||||
return -1;
|
||||
|
||||
script = (unsigned char *)TKMEM_ZALLOCN(unsigned char, file_size + 1);
|
||||
if (script) {
|
||||
file_read_part (AT_FILE_NAME, script, file_size, 0);
|
||||
printf("run AT script file(%s) ...\n", AT_FILE_NAME);
|
||||
nine_at_define((unsigned char *)script);
|
||||
printf("run AT script file(%s) finish\n", AT_FILE_NAME);
|
||||
TKMEM_FREE(script);
|
||||
}
|
||||
|
||||
} while (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pc_autotest_task(void)
|
||||
{
|
||||
int fs_size = -1;
|
||||
while(1)
|
||||
{
|
||||
// ??SD????????
|
||||
int32_t size = file_get_size (AT_FILE_NAME);
|
||||
if(fs_size != size && size > 0)
|
||||
{
|
||||
fs_size = size;
|
||||
run_at_script ();
|
||||
}
|
||||
else
|
||||
{
|
||||
fs_size = -1;
|
||||
}
|
||||
sleep_ms (1000);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static OS_TASK pc_autotest_os_task;
|
||||
static unsigned int pc_autotest_stack[0x4000 / 4];
|
||||
static void init_pc_autotest(void)
|
||||
{
|
||||
#ifdef NINE
|
||||
OS_CREATETASK(
|
||||
&pc_autotest_os_task,
|
||||
"pc_autotest",
|
||||
pc_autotest_task,
|
||||
200,
|
||||
pc_autotest_stack
|
||||
);
|
||||
//hAutotestThread = CreateThread(NULL, 0x10000, pc_autotest_task, NULL, 0, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* XM_HMI_HOST */
|
||||
|
||||
|
1053
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/xm_windows_host.c
Normal file
1053
MXC_A27-PCB4.5-270T/lib/awtk/awtk/3rd/xm/src/xm_windows_host.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user