Posted to tcl by emiliano at Fri Mar 04 12:11:59 GMT 2022view raw

  1. /* https://core.tcl-lang.org/tk/file?ci=tip&name=unix/tkUnixSysNotify.c&ln=135-143 */
  2. enc = Tcl_GetEncoding(NULL, "utf-8");
  3. /*
  4. Tcl_ExternalToUtfDString(enc, title, -1, &dst);
  5. Tcl_ExternalToUtfDString(enc, message, -1, &dsm);
  6. */
  7. Tcl_UtfToExternalDString(enc, title, -1, &dst);
  8. Tcl_UtfToExternalDString(enc, message, -1, &dsm);
  9. notify_init("Wish");
  10. /*
  11. notif = notify_notification_new(title, message, icon, NULL);
  12. */
  13. notif = notify_notification_new(Tcl_DStringValue(&dst), Tcl_DStringValue(&dsm), icon, NULL);
  14. notify_notification_show(notif, NULL);
  15. Tcl_DStringFree(&dsm);
  16. Tcl_DStringFree(&dst);
  17. Tcl_FreeEncoding(enc);

AltStyle によって変換されたページ (->オリジナル) /