1
/*********************************************************
2
* Copyright (C) 2009 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
22
* Definition of the data structures used in the GuestRpc commands to
23
* provide access to the guest tray icons to the host.
27
* Using the opaque type causes rpcgen to emit code that calls the htonl and
28
* ntohl functions. On Windows, these functions are defined in winsock2.h, so
29
* we need to #include that header in the generated code.
32
%#include "winsock2.h"
35
enum GHITrayIconVersion {
39
/* These are the values used in the op member below. */
41
GHI_TRAY_ICON_OP_ADD = 1,
42
GHI_TRAY_ICON_OP_MODIFY,
43
GHI_TRAY_ICON_OP_DELETE
46
/* These are the flag values used in the flags bitmask below. */
47
enum GHITrayIconFlags {
48
GHI_TRAY_ICON_FLAG_PNGDATA = 1, /* The pngData is valid. */
49
GHI_TRAY_ICON_FLAG_TOOLTIP = 2, /* The tooltip is valid. */
50
GHI_TRAY_ICON_FLAG_BLACKLISTKEY = 4 /* The blacklistKey is valid. */
54
* These structures are sent from the guest to the host whenver a new tray
55
* icon is added, or an existing tray icon is modified. When an icon is
56
* modified, the flags member of this structure is used as a bitmask to
57
* indicate the changed values.
59
* Note that the identifier string assigned to the icon should be treated as
60
* an opaque value. The contents of this string may change without notice in
61
* new versions of the guest tools. This identifier is not persistent.
63
* The blacklist key is used by the host to blacklist tray icons. We can't use
64
* iconID for this purpose because iconID must be unique, and the blacklist
65
* key is not always unique (see bug 461750).
67
struct GHITrayIconV1 {
68
string iconID<>; /* opaque identifier for the icon */
69
GHITrayIconOp op; /* action to perform */
70
uint32 flags; /* bitmask of valid items */
71
uint32 width; /* PNG image width */
72
uint32 height; /* PNG image height */
73
opaque pngData<>; /* PNG image data for the icon */
74
string tooltip<>; /* tooltip string for the icon, UTF8 encoded */
75
string blacklistKey<>; /* key used for icon blacklisting */
78
union GHITrayIcon switch (GHITrayIconVersion ver) {
79
case GHI_TRAY_ICON_V1:
80
struct GHITrayIconV1 *trayIconV1;
83
enum GHITrayIconEventVersion {
84
GHI_TRAY_ICON_EVENT_V1 = 1
88
* Event messages are sent from the host to the guest when the user interacts
89
* with the host representation of the tray icon (e.g. right-clicks on it).
91
* XXX The (x, y) co-ordinates in this structure must be relative to the guest
94
struct GHITrayIconEventV1 {
95
string iconID<>; /* identifier of the icon */
96
uint32 event; /* event identifier, see unityCommon.h */
97
uint32 x; /* guest x co-ordinate of the event */
98
uint32 y; /* guest y co-ordinate of the event */
101
union GHITrayIconEvent switch (GHITrayIconEventVersion ver) {
102
case GHI_TRAY_ICON_EVENT_V1:
103
struct GHITrayIconEventV1 *trayIconEventV1;