~n-muench/open-vm-tools/devel

« back to all changes in this revision

Viewing changes to lib/include/unity.h

  • Committer: Nate Muench
  • Date: 2011-05-05 00:27:16 UTC
  • Revision ID: nowiwilldestroyabydos@gmail.com-20110505002716-f87n4uvh2hg3crrk
Merge with Natty, Enable shared folders

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
 
 * unity.h --
21
 
 *
22
 
 *    Commands for unity window manager intergration.
23
 
 */
24
 
 
25
 
#ifndef _UNITY_H_
26
 
#define _UNITY_H_
27
 
 
28
 
#include <string.h>
29
 
#include "dndGuest.h"
30
 
#include "dbllnklst.h"
31
 
#include "guestApp.h"
32
 
#include "dynbuf.h"
33
 
#include "str.h"
34
 
#include "rpcin.h"
35
 
#ifdef _WIN32
36
 
#include "unityCommon.h"
37
 
#endif
38
 
/*
39
 
 * In Unity mode, all our DnD detection windows will be ignored and not displayed
40
 
 * on host desktop. Right now we have 4 DnD detection window. 2 for DnD version 2
41
 
 * or older, 2 for DnD version 3 or newer.
42
 
 */
43
 
enum{
44
 
   UNITY_BLOCKED_WND_DND_FULL_DET_V2  = 0,
45
 
   UNITY_BLOCKED_WND_DND_DET_V2       = 1,
46
 
   UNITY_BLOCKED_WND_DND_FULL_DET_V3  = 2,
47
 
   UNITY_BLOCKED_WND_DND_DET_V3       = 3,
48
 
   UNITY_BLOCKED_WND_MAX              = 4,
49
 
};
50
 
 
51
 
/*
52
 
 * Maximum number of virtual desktops supported.
53
 
 */
54
 
 
55
 
#define MAX_VIRT_DESK 64
56
 
 
57
 
/*
58
 
 * Represents a virtual desktop coordinates in the virtual desktop grid.
59
 
 * The grid might look like {1,1} {1,2} {2,1} {2,2} or {1,1} {1,2} {1,2} etc.
60
 
 */
61
 
 
62
 
typedef struct UnityVirtualDesktop {
63
 
   int32 x;
64
 
   int32 y;
65
 
} UnityVirtualDesktop;
66
 
 
67
 
typedef struct UnityPoint {
68
 
   int32 x;
69
 
   int32 y;
70
 
} UnityPoint;
71
 
 
72
 
/*
73
 
 * Represents a virtual desktop configuration.
74
 
 */
75
 
 
76
 
typedef struct UnityVirtualDesktopArray {
77
 
   size_t desktopCount;                              // number of desktops in the grid
78
 
   UnityVirtualDesktop desktops[MAX_VIRT_DESK];      // array of desktops
79
 
} UnityVirtualDesktopArray;
80
 
 
81
 
/* Forward reference. */
82
 
typedef struct DesktopSwitchCallbackManager DesktopSwitchCallbackManager;
83
 
 
84
 
#ifdef __cplusplus
85
 
extern "C" {
86
 
#endif // __cplusplus
87
 
 
88
 
void Unity_Init(GuestApp_Dict *conf,
89
 
                int *blockedWnd,
90
 
                DesktopSwitchCallbackManager *desktopSwitchCallbackMgr);
91
 
void Unity_InitBackdoor(struct RpcIn *rpcIn);
92
 
Bool Unity_IsActive(void);
93
 
Bool Unity_IsSupported(void);
94
 
void Unity_SetActiveDnDDetWnd(UnityDnD *state);
95
 
void Unity_Exit(void);
96
 
void Unity_Cleanup(void);
97
 
void Unity_RegisterCaps(void);
98
 
void Unity_UnregisterCaps(void);
99
 
void Unity_UnityToLocalPoint(UnityPoint *localPt, UnityPoint *unityPt);
100
 
void Unity_LocalToUnityPoint(UnityPoint *unityPt, UnityPoint *localPt);
101
 
#ifdef _WIN32
102
 
HWND Unity_GetHwndFromUnityId(UnityWindowId id);
103
 
#endif
104
 
 
105
 
#ifdef __cplusplus
106
 
};
107
 
#endif // __cplusplus
108
 
 
109
 
#endif