通知模型补全(agent-107: SDK icon+update_progress / IPC urgency+MSG_NOTIFY_PROGRESS / 存储 urgency+icon回退+progress / CSV加3列) + 全屏收合视觉+滑条(agent-108)
This commit is contained in:
1 parent
b3e57d4b55
commit
e8fa373a2f
18 files changed
+410
-56
No files matched your search
@@ -297,12 +297,13 @@ typedef enum {
|
||||
} meow_notify_urgency;
|
||||
|
||||
/* 发送负载(对齐 freedesktop Notify() 字段;SDK 内部复制副本,不持 app 外部指针,
|
||||
* app 只需保证 title/body/target_activity 指针在调用返回前有效)。 */
|
||||
* app 只需保证 icon/title/body/target_activity 指针在调用返回前有效)。 */
|
||||
typedef struct meow_notify {
|
||||
meow_notify_category cat; /* 类型(未声明则按 4 种上限自动注册) */
|
||||
meow_notify_urgency urgency; /* 紧急度 */
|
||||
meow_notify_urgency urgency; /* 紧急度(缺省 MEOW_NOTIFY_URG_NORMAL;越界钳位) */
|
||||
const char *title; /* summary:标题,单行(必填,NULL 则发送失败) */
|
||||
const char *body; /* body:正文,可多行(可 NULL) */
|
||||
const char *icon; /* app_icon:图标 icon name 或 path;NULL/空 = 用该 app 默认图标(launcher 按 app_id 回退) */
|
||||
int timeout_ms; /* 见上超时语义;推荐 MEOW_NOTIFY_TIMEOUT_* */
|
||||
const char *target_activity; /* 通知中心点击跳转的 Activity 名(可 NULL;M3 导航预留) */
|
||||
int progress; /* 进度 0-100;-1=不显示进度条(缺省 -1) */
|
||||
@@ -318,6 +319,11 @@ uint32_t meow_notify_send(const meow_notify *n);
|
||||
/* 取消一条通知。1=成功;0=未找到(id 无效/已过期/已取消)。 */
|
||||
int meow_notify_cancel(uint32_t id);
|
||||
|
||||
/* 实时更新一条活动通知的进度(0-100,-1=清除进度条)。local_id=meow_notify_send 的返回值。
|
||||
* 语义(用户定案):仅改 SDK 内部活动槽 + 经 IPC 通知 launcher 改**内存活跃槽**;不落盘——
|
||||
* TF 快照只在「创建时 / 结束(100% 或 dismiss)」触发。返回 1=找到并更新;0=未找到/非法。 */
|
||||
int meow_notify_update_progress(uint32_t local_id, int progress);
|
||||
|
||||
/* 查询当前活动(未过期、未取消)通知数/是否还有。 */
|
||||
int meow_notify_active_count(void);
|
||||
int meow_notify_count_in_type(meow_notify_category cat);
|
||||
|
||||
Reference in new issue
Block a user