2024-05-16 04:27:07 +03:00
|
|
|
interface homepage {
|
2024-11-22 01:20:05 +03:00
|
|
|
enum capability {
|
|
|
|
remove-other,
|
|
|
|
set-stylesheet,
|
|
|
|
}
|
|
|
|
|
2024-05-06 21:12:08 +03:00
|
|
|
/// The request format to add or remove an app from the homepage. You must have messaging
|
|
|
|
/// access to `homepage:homepage:sys` in order to perform this. Serialize using serde_json.
|
2024-05-16 04:27:07 +03:00
|
|
|
variant request {
|
2024-05-06 21:12:08 +03:00
|
|
|
/// the package and process name will come from request source.
|
|
|
|
/// the path will automatically have the process_id prepended.
|
|
|
|
/// the icon is a base64 encoded image.
|
|
|
|
add(add-request),
|
2024-11-22 01:20:05 +03:00
|
|
|
/// remove ourself from homepage (message source will be item removed)
|
2024-05-06 21:12:08 +03:00
|
|
|
remove,
|
2024-11-22 01:20:05 +03:00
|
|
|
/// remove another app from homepage
|
|
|
|
/// using this requires RemoveOther capability
|
|
|
|
/// app store uses this to remove apps on uninstall
|
|
|
|
remove-other(string),
|
|
|
|
/// set the stylesheet for the homepage
|
|
|
|
/// using this requires SetStylesheet capability
|
|
|
|
/// settings:settings:sys uses this to set the stylesheet
|
2024-08-01 16:07:57 +03:00
|
|
|
set-stylesheet(string),
|
2024-05-06 21:12:08 +03:00
|
|
|
}
|
|
|
|
|
2024-05-07 02:48:23 +03:00
|
|
|
record add-request {
|
2024-05-06 21:12:08 +03:00
|
|
|
label: string,
|
2024-05-14 02:32:39 +03:00
|
|
|
icon: option<string>,
|
|
|
|
path: option<string>,
|
|
|
|
widget: option<string>,
|
2024-05-06 21:12:08 +03:00
|
|
|
}
|
|
|
|
}
|
2024-05-16 04:27:07 +03:00
|
|
|
|
2024-11-22 01:20:05 +03:00
|
|
|
world homepage-sys-v1 {
|
2024-05-16 04:27:07 +03:00
|
|
|
import homepage;
|
2024-05-18 09:59:40 +03:00
|
|
|
include process-v0;
|
2024-05-16 04:27:07 +03:00
|
|
|
}
|