~ubuntu-branches/ubuntu/precise/open-vm-tools/precise

« back to all changes in this revision

Viewing changes to lib/unity/unityPlatform.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*********************************************************
2
 
 * Copyright (C) 2007 VMware, Inc. All rights reserved.
3
 
 *
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.
7
 
 *
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.
12
 
 *
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.
16
 
 *
17
 
 *********************************************************/
18
 
 
19
 
/**
20
 
 * @file unityPlatform.h
21
 
 *
22
 
 * Implementation specific functionality
23
 
 */
24
 
 
25
 
#ifndef _UNITY_PLATFORM_H_
26
 
#define _UNITY_PLATFORM_H_
27
 
 
28
 
#include "unityWindowTracker.h"
29
 
#include "unity.h"
30
 
 
31
 
/**
32
 
 * Container used to store and send Unity updates.
33
 
 */
34
 
 
35
 
typedef struct {
36
 
   DynBuf updates;      ///< See @ref vmtools_unity_uwtGuestRpc.
37
 
   size_t cmdSize;      /**< @brief Size of RpcOut command prefix.
38
 
                             Used as a convenient offset within #updates when
39
 
                             resetting the update buffer. */
40
 
   RpcOut *rpcOut;
41
 
} UnityUpdateChannel;
42
 
 
43
 
typedef struct {
44
 
   int x;
45
 
   int y;
46
 
   int width;
47
 
   int height;
48
 
} UnityRect;
49
 
 
50
 
typedef struct _UnityPlatform UnityPlatform;
51
 
 
52
 
/*
53
 
 * Implemented by unityPlatform[Win32|X11|Cocoa (ha!)].c
54
 
 */
55
 
 
56
 
#ifdef __cplusplus
57
 
extern "C" {
58
 
#endif // __cplusplus
59
 
Bool UnityPlatformIsSupported(void);
60
 
UnityPlatform *UnityPlatformInit(UnityWindowTracker *tracker,
61
 
                                 UnityUpdateChannel *updateChannel,
62
 
                                 int *blockedWnd,
63
 
                                 DesktopSwitchCallbackManager *desktopSwitchCallbackMgr);
64
 
void UnityPlatformCleanup(UnityPlatform *up);
65
 
void UnityPlatformRegisterCaps(UnityPlatform *up);
66
 
void UnityPlatformUnregisterCaps(UnityPlatform *up);
67
 
Bool UnityPlatformUpdateWindowState(UnityPlatform *up,
68
 
                                    UnityWindowTracker *tracker);
69
 
void UnityPlatformSaveSystemSettings(UnityPlatform *up);
70
 
void UnityPlatformRestoreSystemSettings(UnityPlatform *up);
71
 
Bool UnityPlatformGetWindowPath(UnityPlatform *up,
72
 
                                UnityWindowId window,
73
 
                                DynBuf *windowPathUtf8,
74
 
                                DynBuf *execPathUtf8);
75
 
Bool UnityPlatformGetNativeWindowPath(UnityPlatform *up,
76
 
                                      UnityWindowId window,
77
 
                                      DynBuf *buf);
78
 
Bool UnityPlatformGetBinaryInfo(UnityPlatform *up,
79
 
                                const char *pathUtf8,
80
 
                                DynBuf *buf);
81
 
Bool UnityPlatformSetTopWindowGroup(UnityPlatform *up,
82
 
                                    UnityWindowId *windows,
83
 
                                    unsigned int windowCount);
84
 
Bool UnityPlatformCloseWindow(UnityPlatform *up, UnityWindowId window);
85
 
Bool UnityPlatformShowWindow(UnityPlatform *up, UnityWindowId window);
86
 
Bool UnityPlatformHideWindow(UnityPlatform *up, UnityWindowId window);
87
 
Bool UnityPlatformMinimizeWindow(UnityPlatform *up, UnityWindowId window);
88
 
Bool UnityPlatformUnminimizeWindow(UnityPlatform *up, UnityWindowId window);
89
 
Bool UnityPlatformMaximizeWindow(UnityPlatform *up, UnityWindowId window);
90
 
Bool UnityPlatformUnmaximizeWindow(UnityPlatform *up, UnityWindowId window);
91
 
Bool UnityPlatformGetWindowContents(UnityPlatform *up,
92
 
                                    UnityWindowId window,
93
 
                                    DynBuf *imageData,
94
 
                                    uint32 *width,
95
 
                                    uint32 *height);
96
 
Bool UnityPlatformMoveResizeWindow(UnityPlatform *up,
97
 
                                   UnityWindowId window,
98
 
                                   UnityRect *moveResizeRect);
99
 
void UnityPlatformShowTaskbar(UnityPlatform *up, Bool showTaskbar);
100
 
Bool UnityPlatformGetIconData(UnityPlatform *up,
101
 
                              UnityWindowId window,
102
 
                              UnityIconType iconType,
103
 
                              UnityIconSize iconSize,
104
 
                              uint32 dataOffset,
105
 
                              uint32 dataLength,
106
 
                              DynBuf *imageData,
107
 
                              uint32 *fullLength);
108
 
Bool UnityPlatformSetDesktopWorkAreas(UnityPlatform *up,
109
 
                                      UnityRect workAreas[],
110
 
                                      uint32 numWorkAreas);
111
 
Bool UnityPlatformSetDesktopConfig(UnityPlatform *up,
112
 
                                   const UnityVirtualDesktopArray *desktops);
113
 
Bool UnityPlatformSetInitialDesktop(UnityPlatform *up,
114
 
                                    UnityDesktopId desktopId);
115
 
Bool UnityPlatformSetDesktopActive(UnityPlatform *up,
116
 
                                   UnityDesktopId desktopId);
117
 
Bool UnityPlatformSetWindowDesktop(UnityPlatform *up,
118
 
                                   UnityWindowId windowId,
119
 
                                   UnityDesktopId desktopId);
120
 
Bool UnityPlatformStickWindow(UnityPlatform *up,
121
 
                              UnityWindowId windowId);
122
 
Bool UnityPlatformUnstickWindow(UnityPlatform *up,
123
 
                                UnityWindowId windowId);
124
 
void UnityPlatformSetInterlockMinimizeOperation(UnityPlatform *up,Bool enabled);
125
 
Bool UnityPlatformConfirmMinimizeOperation(UnityPlatform *up,
126
 
                                           UnityWindowId windowId,
127
 
                                           uint32 sequence,
128
 
                                           Bool allow);
129
 
Bool UnityPlatformIsUnityRunning(UnityPlatform *up);
130
 
Bool UnityPlatformStartHelperThreads(UnityPlatform *up);
131
 
void UnityPlatformKillHelperThreads(UnityPlatform *up);
132
 
void UnityPlatformUnlock(UnityPlatform *up);
133
 
void UnityPlatformLock(UnityPlatform *up);
134
 
void UnityPlatformUpdateDnDDetWnd(UnityPlatform *up,
135
 
                                  Bool show);
136
 
void UnityPlatformSetActiveDnDDetWnd(UnityPlatform *up, UnityDnD *detWnd);
137
 
 
138
 
void UnityPlatformDoUpdate(UnityPlatform *up, Bool incremental);
139
 
 
140
 
void UnityPlatformSetConfigDesktopColor(UnityPlatform *up, int desktopColor);
141
 
 
142
 
Bool UnityPlatformRequestWindowContents(UnityPlatform *up,
143
 
                                        UnityWindowId windowIds[],
144
 
                                        uint32 numWindowIds);
145
 
 
146
 
/*
147
 
 * Function called by UnityUpdateCallbackFn whenever a window is removed from
148
 
 * the tracker.
149
 
 *
150
 
 * NOTE: This function is called with the platform lock held.
151
 
 */
152
 
void UnityPlatformWillRemoveWindow(UnityPlatform *up, UnityWindowId windowId);
153
 
 
154
 
/* Functions implemented in unity.c for use by the platform-specific code. */
155
 
void UnityGetUpdateCommon(int flags, DynBuf *buf);
156
 
Bool UnityUpdateChannelInit(UnityUpdateChannel *updateChannel);
157
 
void UnityUpdateChannelCleanup(UnityUpdateChannel *updateChannel);
158
 
Bool UnitySendUpdates(UnityUpdateChannel *updateChannel);
159
 
Bool UnitySendRequestMinimizeOperation(UnityWindowId windowId, uint32 sequence);
160
 
 
161
 
/* Sends the provided window contents to the host. */
162
 
Bool UnitySendWindowContents(UnityWindowId windowID,
163
 
                             uint32 imageWidth,
164
 
                             uint32 imageHeight,
165
 
                             const char *imageData,
166
 
                             uint32 imageLength);
167
 
 
168
 
#ifdef __cplusplus
169
 
};
170
 
#endif // __cplusplus
171
 
 
172
 
#endif