~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to lib/unity/unityPlatform.h

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2008-08-15 21:21:40 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080815212140-05fhxj8wroosysmj
Tags: 2008.08.08-109361-1ubuntu1
* Merge from Debian unstable (LP: #258393), remaining Ubuntu change:
  - add ubuntu_toolchain_FTBFS.dpatch patch, fix FTBFS
* Update ubuntu_toolchain_FTBFS.dpatch patch for the new version.

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
 * 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
 * This data structure is used when gathering and sending
 
33
 * unity updates.
 
34
 */
 
35
 
 
36
typedef struct {
 
37
   DynBuf updates;
 
38
   size_t cmdSize;
 
39
   RpcOut *rpcOut;
 
40
   uint32 flags;
 
41
} UnityUpdateThreadData;
 
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
Bool UnityPlatformIsSupported(void);
 
57
UnityPlatform *UnityPlatformInit(UnityWindowTracker *tracker,
 
58
                                 int* blockedWnd);
 
59
void UnityPlatformCleanup(UnityPlatform *up);
 
60
void UnityPlatformRegisterCaps(UnityPlatform *up);
 
61
void UnityPlatformUnregisterCaps(UnityPlatform *up);
 
62
Bool UnityPlatformUpdateWindowState(UnityPlatform *up,
 
63
                                    UnityWindowTracker *tracker);
 
64
void UnityPlatformSaveSystemSettings(UnityPlatform *up);
 
65
void UnityPlatformRestoreSystemSettings(UnityPlatform *up);
 
66
Bool UnityPlatformGetWindowPath(UnityPlatform *up,
 
67
                                UnityWindowId window,
 
68
                                DynBuf *buf);
 
69
Bool UnityPlatformGetNativeWindowPath(UnityPlatform *up,
 
70
                                      UnityWindowId window,
 
71
                                      DynBuf *buf);
 
72
Bool UnityPlatformGetBinaryInfo(UnityPlatform *up,
 
73
                                const char *pathUtf8,
 
74
                                DynBuf *buf);
 
75
Bool UnityPlatformRestoreWindow(UnityPlatform *up,
 
76
                                UnityWindowId window);
 
77
Bool UnityPlatformSetTopWindowGroup(UnityPlatform *up,
 
78
                                    UnityWindowId *windows,
 
79
                                    unsigned int windowCount);
 
80
Bool UnityPlatformCloseWindow(UnityPlatform *up, UnityWindowId window);
 
81
Bool UnityPlatformShowWindow(UnityPlatform *up, UnityWindowId window);
 
82
Bool UnityPlatformHideWindow(UnityPlatform *up, UnityWindowId window);
 
83
Bool UnityPlatformMinimizeWindow(UnityPlatform *up, UnityWindowId window);
 
84
Bool UnityPlatformMaximizeWindow(UnityPlatform *up, UnityWindowId window);
 
85
Bool UnityPlatformUnmaximizeWindow(UnityPlatform *up, UnityWindowId window);
 
86
Bool UnityPlatformGetWindowContents(UnityPlatform *up,
 
87
                                    UnityWindowId window,
 
88
                                    DynBuf *imageData);
 
89
Bool UnityPlatformMoveResizeWindow(UnityPlatform *up,
 
90
                                   UnityWindowId window,
 
91
                                   UnityRect *moveResizeRect);
 
92
void UnityPlatformShowTaskbar(UnityPlatform *up, Bool showTaskbar);
 
93
Bool UnityPlatformGetIconData(UnityPlatform *up,
 
94
                              UnityWindowId window,
 
95
                              UnityIconType iconType,
 
96
                              UnityIconSize iconSize,
 
97
                              uint32 dataOffset,
 
98
                              uint32 dataLength,
 
99
                              DynBuf *imageData,
 
100
                              uint32 *fullLength);
 
101
Bool UnityPlatformSetDesktopWorkAreas(UnityPlatform *up,
 
102
                                      UnityRect workAreas[],
 
103
                                      uint32 numWorkAreas);
 
104
Bool UnityPlatformSetDesktopConfig(UnityPlatform *up,
 
105
                                   const UnityVirtualDesktopArray *desktops);
 
106
Bool UnityPlatformSetDesktopActive(UnityPlatform *up,
 
107
                                   UnityDesktopId desktopId);
 
108
Bool UnityPlatformSetWindowDesktop(UnityPlatform *up,
 
109
                                   UnityWindowId windowId,
 
110
                                   UnityDesktopId desktopId);
 
111
Bool UnityPlatformIsUnityRunning(UnityPlatform *up);
 
112
Bool UnityPlatformStartHelperThreads(UnityPlatform *up);
 
113
void UnityPlatformKillHelperThreads(UnityPlatform *up);
 
114
void UnityPlatformUnlock(UnityPlatform *up);
 
115
void UnityPlatformLock(UnityPlatform *up);
 
116
void UnityPlatformUpdateDnDDetWnd(UnityPlatform *up,
 
117
                                  Bool show);
 
118
void UnityPlatformSetActiveDnDDetWnd(UnityPlatform *up, UnityDnD *detWnd);
 
119
 
 
120
/* Functions implemented in unity.c for use by the platform-specific code. */
 
121
void UnityGetUpdateCommon(int flags, DynBuf *buf);
 
122
Bool UnityUpdateThreadInit(UnityUpdateThreadData *updateData);
 
123
void UnityUpdateThreadCleanup(UnityUpdateThreadData *updateData);
 
124
Bool UnitySendUpdates(UnityUpdateThreadData *updateData);
 
125
 
 
126
#endif