Skip to main content

build_icon_id

Function build_icon_id 

Source
pub fn build_icon_id(path: &[u16], display_name: &[u16]) -> IconId
Expand description

Build an IconId the same way the legacy extension did.

  • If path is empty (virtual icon), the display name is hex-encoded.
  • Otherwise the part after the desktop prefix is encoded (falling back to the whole path if the prefix cannot be located).

The caller is responsible for supplying the shell display name and the filesystem path (both as UTF-16 code units, without a trailing NUL). The internal com module provides the shell-side helpers that produce them.