feat: finish lowlevel application key decl
This commit is contained in:
@@ -282,18 +282,10 @@ impl Program {
|
|||||||
// region: Program Internals
|
// region: Program Internals
|
||||||
|
|
||||||
/// Internal used enum presenting a Program string resource.
|
/// Internal used enum presenting a Program string resource.
|
||||||
#[derive(Debug)]
|
type ProgramStr = lowlevel::LosseStrRefStr;
|
||||||
enum ProgramStr {
|
|
||||||
Plain(String),
|
|
||||||
RefStr(win32::concept::StrRefStr)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Internal used enum presenting a Program icon resource.
|
/// Internal used enum presenting a Program icon resource.
|
||||||
#[derive(Debug)]
|
type ProgramIcon = lowlevel::LosseIconRefStr;
|
||||||
enum ProgramIcon {
|
|
||||||
Plain(String),
|
|
||||||
RefStr(win32::concept::IconRefStr)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Internal used enum presenting a Program behavior (command line setups).
|
/// Internal used enum presenting a Program behavior (command line setups).
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|||||||
@@ -561,18 +561,18 @@ impl ApplicationsKey {
|
|||||||
.ok_or(Error::InexistantKey)
|
.ok_or(Error::InexistantKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
const NAMEOF_DEFAULT_BEHAVIOR_PART1: &str = "shell";
|
const NAMEOF_SHELL_VERB_PART1: &str = "shell";
|
||||||
const NAMEOF_DEFAULT_BEHAVIOR_PART3: &str = "command";
|
const NAMEOF_SHELL_VERB_PART3: &str = "command";
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// We temporarily use String and &str as the command line argument parameter.
|
// We temporarily use String and &str as the command line argument parameter.
|
||||||
// We may introduce a new complete Rust struct for replacing this arbitrary string.
|
// We may introduce a new complete Rust struct for replacing this arbitrary string.
|
||||||
|
|
||||||
pub fn get_default_behavior(&self, view: View) -> Result<(concept::Verb, String), Error> {
|
pub fn get_shell_verb(&self, view: View) -> Result<(concept::Verb, String), Error> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_default_behavior(
|
pub fn set_shell_verb(
|
||||||
&mut self,
|
&mut self,
|
||||||
scope: Scope,
|
scope: Scope,
|
||||||
beh: (concept::Verb, &str),
|
beh: (concept::Verb, &str),
|
||||||
@@ -582,11 +582,41 @@ impl ApplicationsKey {
|
|||||||
|
|
||||||
const NAMEOF_DEFAULT_ICON: &str = "DefaultIcon";
|
const NAMEOF_DEFAULT_ICON: &str = "DefaultIcon";
|
||||||
|
|
||||||
pub fn get_default_icon(&self, view: View) -> Result<(), Error> {
|
pub fn get_default_icon(&self, view: View) -> Result<Option<LosseIconRefStr>, Error> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_default_icon(&self, scope: Scope, icon: ()) -> Result<(), Error> {
|
pub fn set_default_icon(&self, scope: Scope, icon: Option<&LosseIconRefStr>) -> Result<(), Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
const NAMEOF_FRIENDLY_APP_NAME: &str = "FriendlyAppName";
|
||||||
|
|
||||||
|
pub fn get_friendly_app_name(&self, view: View) -> Result<Option<LosseStrRefStr>, Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_friendly_app_name(&self, scope: Scope, name: Option<&LosseStrRefStr>) -> Result<(), Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
const NAMEOF_SUPPORTED_TYPES: &str = "SupportedTypes";
|
||||||
|
|
||||||
|
pub fn get_supported_types(&self, view: View) -> Result<Option<Vec<concept::Ext>>, Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_supported_types(&self, scope: Scope, tys: Option<&[concept::Ext]>) -> Result<(), Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
const NAMEOF_NO_OPEN_WITH: &str = "NoOpenWith";
|
||||||
|
|
||||||
|
pub fn get_no_open_with(&self, view: View) -> Result<bool, Error> {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_no_open_with(&self, scope: Scope, flag: bool) -> Result<(), Error> {
|
||||||
todo!()
|
todo!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user