feat: finish all highlevel function and expose them to cdylib

This commit is contained in:
yyc12345 committed 2026-05-19 10:59:57 +08:00
1 parent 658806e9ff
commit a4d2f7bc26
3 files changed
+201 -16

No files matched your search

+12 -4
View File
@@ -268,12 +268,20 @@ impl Program {
}
impl Program {
pub fn resolve_name(&self) -> Result<String, ProgramError> {
todo!()
pub fn resolve_name(&self) -> Result<Option<String>, ProgramError> {
Ok(self
.name
.as_ref()
.map(|name| name.inner.extract().ok())
.flatten())
}
pub fn resolve_icon(&self) -> Result<concept::IconRc, ProgramError> {
todo!()
pub fn resolve_icon(&self) -> Result<Option<concept::IconRc>, ProgramError> {
Ok(self
.icon
.as_ref()
.map(|icon| icon.inner.extract(concept::IconSizeKind::Small).ok())
.flatten())
}
pub fn exts_len(&self) -> usize {