vanilladocs
vanillapunch.com
API / platform/desktop/emojipanel

platform/desktop/emojipanel

운영체제 그림 이모티콘 창. (크롬 편집 칸 문맥 메뉴의 "그림 이모티콘" 이 부르는 ui::ShowEmojiPanel 자리)

  • 맥: [NSApp orderFrontCharacterPalette:nil] (크롬 ui/base/emoji/emoji_panel_helper_mac.mm 과 같다)
  • 윈도우: SendInput 으로 윈도우 키 + '.' 의 누름과 뗌을 보낸다. 윈도우 10 RS4 부터 이모티콘 창이 뜬다. (emoji_panel_helper_win.cc 와 같다)
  • 리눅스: 크롬처럼 없다. (emoji_panel_helper.cc 의 IsEmojiPanelSupported 가 false, 메뉴에도 항목이 없다)

OS emoji panel. (in place of ui::ShowEmojiPanel called by "Emoji" in Chrome's edit field context menu)

  • Mac: [NSApp orderFrontCharacterPalette:nil] (same as Chrome ui/base/emoji/emoji_panel_helper_mac.mm)
  • Windows: sends the press and release of the Windows key + '.' with SendInput. The emoji panel appears from Windows 10 RS4. (same as emoji_panel_helper_win.cc)
  • Linux: none, like Chrome. (IsEmojiPanelSupported in emoji_panel_helper.cc is false, and the menu has no item either)
예제Example이모티콘 창이 있으면 띄우기 (창이 떠서 실행하지 않는다)Show the emoji panel if there is one (not run since a panel opens)
use vanilla::platform::desktop::emojipanel;

if emojipanel::is_emoji_panel_supported() {
	emojipanel::show_emoji_panel();
}

함수Functions

함수functionpub fn is_emoji_panel_supported() -> bool#0.4.0 부터since 0.4.0소스source

이모티콘 창이 있는지. (크롬 IsEmojiPanelSupported, 윈도우는 판을 보지 않고 참으로 둔다)

Whether there is an emoji panel. (Chrome IsEmojiPanelSupported, Windows is left true without checking the version)

반환Returnsbool 맥과 윈도우면 true, 그 밖은 false.true on Mac and Windows, false otherwise.

함수functionpub fn show_emoji_panel()#0.4.0 부터since 0.4.0소스source

이모티콘 창 띄우기. (고른 글자는 IME 처럼 확정 글로 온다)

Shows the emoji panel. (the chosen characters come as committed text, like IME)