| 1 |
|
|---|
| 2 | /*
|
|---|
| 3 | *@@sourcefile xsystray_api.h:
|
|---|
| 4 | * Extended system tray widget for XCenter/eCenter.
|
|---|
| 5 | *
|
|---|
| 6 | * Public API.
|
|---|
| 7 | *
|
|---|
| 8 | * This file contains the public API to the Extended system tray widget.
|
|---|
| 9 | * This API is used by applications to add and remove icons from the
|
|---|
| 10 | * special notification area on the desktop provided by the Extended
|
|---|
| 11 | * system tray widget.
|
|---|
| 12 | *
|
|---|
| 13 | * Refer to the "API" file for more details about the public API.
|
|---|
| 14 | *
|
|---|
| 15 | * Copyright (C) 2009 Dmitry A. Kuminov
|
|---|
| 16 | *
|
|---|
| 17 | * This file is part of the Extended system tray widget source package.
|
|---|
| 18 | * Extended system tray widget is free software; you can redistribute it
|
|---|
| 19 | * and/or modify it under the terms of the GNU General Public License as
|
|---|
| 20 | * published by the Free Software Foundation, in version 2 as it comes in
|
|---|
| 21 | * the "COPYING" file of the Extended system tray widget distribution. This
|
|---|
| 22 | * program is distributed in the hope that it will be useful, but WITHOUT
|
|---|
| 23 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|---|
| 24 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|---|
| 25 | * more details.
|
|---|
| 26 | */
|
|---|
| 27 |
|
|---|
| 28 | #ifndef XSYSTRAY_API_HEADER_INCLUDED
|
|---|
| 29 | #define XSYSTRAY_API_HEADER_INCLUDED
|
|---|
| 30 |
|
|---|
| 31 | #if __cplusplus
|
|---|
| 32 | extern "C" {
|
|---|
| 33 | #endif
|
|---|
| 34 |
|
|---|
| 35 | // notification code constants for the notification messages sent by the system
|
|---|
| 36 | // tray (refer to xstAddSysTrayIcon() for details)
|
|---|
| 37 | #define XST_IN_MOUSE 0x0001
|
|---|
| 38 | #define XST_IN_CONTEXT 0x0002
|
|---|
| 39 | #define XST_IN_WHEEL 0x0003
|
|---|
| 40 |
|
|---|
| 41 | // structure for XST_IN_MOUSE
|
|---|
| 42 | typedef struct
|
|---|
| 43 | {
|
|---|
| 44 | ULONG ulMouseMsg;
|
|---|
| 45 | // mouse message (one of WM_BUTTONxyyy)
|
|---|
| 46 | POINTS ptsPointerPos;
|
|---|
| 47 | // global pointer position at the time of the mouse event
|
|---|
| 48 | USHORT fsHitTestRes;
|
|---|
| 49 | // hit-test result (see WM_BUTTONxyyy description in PM)
|
|---|
| 50 | USHORT fsFlags;
|
|---|
| 51 | // keyboard control codes (see WM_BUTTONxyyy description in PM)
|
|---|
| 52 |
|
|---|
| 53 | } XSTMOUSEMSG, *PXSTMOUSEMSG;
|
|---|
| 54 |
|
|---|
| 55 | // structure for XST_IN_CONTEXT
|
|---|
| 56 | typedef struct
|
|---|
| 57 | {
|
|---|
| 58 | POINTS ptsPointerPos;
|
|---|
| 59 | // global pointer position at the time of the mouse event
|
|---|
| 60 | USHORT fPointer;
|
|---|
| 61 | // input device flag (see WM_CONTEXTMENU description in PM)
|
|---|
| 62 |
|
|---|
| 63 | } XSTCONTEXTMSG, *PXSTCONTEXTMSG;
|
|---|
| 64 |
|
|---|
| 65 | // structure for XST_IN_WHEEL
|
|---|
| 66 | typedef struct
|
|---|
| 67 | {
|
|---|
| 68 | ULONG ulWheelMsg;
|
|---|
| 69 | // mouse message (one of WM_HSCROLL or WM_VSCROLL)
|
|---|
| 70 | POINTS ptsPointerPos;
|
|---|
| 71 | // global pointer position at the time of the mouse event
|
|---|
| 72 | USHORT usCmd;
|
|---|
| 73 | // command (see WM_HSCROLL/WM_VSCROLL description in PM)
|
|---|
| 74 |
|
|---|
| 75 | } XSTWHEELMSG, *PXSTWHEELMSG;
|
|---|
| 76 |
|
|---|
| 77 | BOOL xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor, PULONG pulRevision);
|
|---|
| 78 | BOOL xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon, PCSZ pcszToolTip,
|
|---|
| 79 | ULONG ulMsgId, ULONG ulFlags);
|
|---|
| 80 | BOOL xstReplaceSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon);
|
|---|
| 81 | BOOL xstRemoveSysTrayIcon(HWND hwnd, USHORT usId);
|
|---|
| 82 | BOOL xstSetSysTrayIconToolTip(HWND hwnd, USHORT usId, PCSZ pcszToolTip);
|
|---|
| 83 | BOOL xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PCSZ pcszTitle,
|
|---|
| 84 | PCSZ pcszText, ULONG ulFlags, ULONG ulTimeout);
|
|---|
| 85 | BOOL xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);
|
|---|
| 86 |
|
|---|
| 87 | BOOL xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);
|
|---|
| 88 |
|
|---|
| 89 | ULONG xstGetSysTrayCreatedMsgId();
|
|---|
| 90 |
|
|---|
| 91 | ULONG xstGetSysTrayMaxTextLen();
|
|---|
| 92 |
|
|---|
| 93 | #if __cplusplus
|
|---|
| 94 | }
|
|---|
| 95 | #endif
|
|---|
| 96 |
|
|---|
| 97 | #endif // XSYSTRAY_API_HEADER_INCLUDED
|
|---|
| 98 |
|
|---|