1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// 浜嬩欢 Cookie锛坄AdviseEvents` 杩斿洖鍊硷級銆?
pub type EventCookie = i32;
/// Rust 渚у缓璁殑浜嬩欢鍥炶皟 trait锛堢敤鎴峰疄鐜帮紝SDK 璐熻矗妗ユ帴鍒?COM锛?
///
/// 瀵瑰簲 `IVGApplicationEvents` 閲岀殑鏂规硶锛?
/// ```text
/// DocumentOpen(Doc, FileName)
/// DocumentNew(Doc, FromTemplate, Template, IncludeGraphics)
/// DocumentClose(Doc)
/// DocumentBeforeSave(Doc, SaveAs, FileName)
/// DocumentAfterSave(Doc, SaveAs, FileName)
/// DocumentBeforePrint(Doc)
/// DocumentAfterPrint(Doc)
/// DocumentBeforeExport(Doc, FileName, Filter, SaveBitmap)
/// DocumentAfterExport(Doc, FileName, Filter, SaveBitmap)
/// WindowActivate(Doc, Window)
/// WindowDeactivate(Doc, Window)
/// SelectionChange()
/// Start()
/// Quit()
/// OnPluginCommand(CommandID)
/// OnUpdatePluginCommand(CommandID, Enabled, Checked)
/// OnApplicationEvent(EventName, Parameters)
/// ```
// TODO: 鐢?`windows::Win32::System::Com` 瀹炵幇 `IDispatch`锛?
// 鍦?`Invoke` 閲屾牴鎹?`disp_id` 鍒嗗彂鍒?`ApplicationEvents` 鐨勬柟娉曘€?
// 鐒跺悗鍦?`IvgApplication` 涓婂姞锛?
// pub fn advise_events(&self, sink: &impl ApplicationEvents) -> Option<EventCookie>
// pub fn unadvise_events(&self, cookie: EventCookie) -> bool