1 | /*
|
---|
2 | * Extended system tray widget for XCenter/eCenter
|
---|
3 | *
|
---|
4 | * Public API
|
---|
5 | *
|
---|
6 | * Made by netlabs.org
|
---|
7 | *
|
---|
8 | * Author: Dmitry A. Kuminov
|
---|
9 | *
|
---|
10 | * This software is public domain.
|
---|
11 | *
|
---|
12 | * WITHOUT ANY WARRANTY..., AT YOUR OWN RISC... ETC.
|
---|
13 | *
|
---|
14 | */
|
---|
15 |
|
---|
16 | #ifndef XSYSTRAY_API_HEADER_INCLUDED
|
---|
17 | #define XSYSTRAY_API_HEADER_INCLUDED
|
---|
18 |
|
---|
19 | #if __cplusplus
|
---|
20 | extern "C" {
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | // notification code constants for the notification messages sent by the system
|
---|
24 | // tray (refer to xstAddSysTrayIcon() for details)
|
---|
25 | #define XST_IN_MOUSE 0x0001
|
---|
26 | #define XST_IN_CONTEXT 0x0002
|
---|
27 | #define XST_IN_WHEEL 0x0003
|
---|
28 |
|
---|
29 | // structure for XST_IN_MOUSE
|
---|
30 | typedef struct
|
---|
31 | {
|
---|
32 | ULONG ulMouseMsg;
|
---|
33 | // mouse message (one of WM_BUTTONxyyy)
|
---|
34 | POINTS ptsPointerPos;
|
---|
35 | // global pointer position at the time of the mouse event
|
---|
36 | USHORT fsHitTestRes;
|
---|
37 | // hit-test result (see WM_BUTTONxyyy description in PM)
|
---|
38 | USHORT fsFlags;
|
---|
39 | // keyboard control codes (see WM_BUTTONxyyy description in PM)
|
---|
40 |
|
---|
41 | } XSTMOUSEMSG, *PXSTMOUSEMSG;
|
---|
42 |
|
---|
43 | // structure for XST_IN_CONTEXT
|
---|
44 | typedef struct
|
---|
45 | {
|
---|
46 | POINTS ptsPointerPos;
|
---|
47 | // global pointer position at the time of the mouse event
|
---|
48 | USHORT fPointer;
|
---|
49 | // input device flag (see WM_CONTEXTMENU description in PM)
|
---|
50 |
|
---|
51 | } XSTCONTEXTMSG, *PXSTCONTEXTMSG;
|
---|
52 |
|
---|
53 | // structure for XST_IN_WHEEL
|
---|
54 | typedef struct
|
---|
55 | {
|
---|
56 | ULONG ulWheelMsg;
|
---|
57 | // mouse message (one of WM_HSCROLL or WM_VSCROLL)
|
---|
58 | POINTS ptsPointerPos;
|
---|
59 | // global pointer position at the time of the mouse event
|
---|
60 | USHORT usCmd;
|
---|
61 | // command (see WM_HSCROLL/WM_VSCROLL description in PM)
|
---|
62 |
|
---|
63 | } XSTWHEELMSG, *PXSTWHEELMSG;
|
---|
64 |
|
---|
65 | BOOL xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor, PULONG pulRevision);
|
---|
66 | BOOL xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon, ULONG ulMsgId,
|
---|
67 | ULONG ulFlags);
|
---|
68 | BOOL xstRemoveSysTrayIcon(HWND hwnd, USHORT usId);
|
---|
69 | BOOL xstSetSysTrayIconToolTip(HWND hwnd, USHORT usId, PSZ pszText);
|
---|
70 | BOOL xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PSZ pszTitle, PSZ pszText,
|
---|
71 | ULONG ulFlags, ULONG ulTimeout);
|
---|
72 | BOOL xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);
|
---|
73 |
|
---|
74 | BOOL xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);
|
---|
75 |
|
---|
76 | ULONG xstGetSysTrayCreatedMsgId();
|
---|
77 |
|
---|
78 | ULONG xstGetSysTrayMaxTextLen();
|
---|
79 |
|
---|
80 | #if __cplusplus
|
---|
81 | }
|
---|
82 | #endif
|
---|
83 |
|
---|
84 | #endif // XSYSTRAY_API_HEADER_INCLUDED
|
---|
85 |
|
---|