1
/*********************************************************
2
* Copyright (C) 2007 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
*********************************************************/
20
* @file unityPlatform.h
22
* Implementation specific functionality
25
#ifndef _UNITY_PLATFORM_H_
26
#define _UNITY_PLATFORM_H_
32
#include "unityWindowTracker.h"
39
typedef struct _UnityPlatform UnityPlatform;
42
* Implemented by unityPlatform[Win32|X11|Cocoa (ha!)].c
49
Bool UnityPlatformIsSupported(void);
50
UnityPlatform *UnityPlatformInit(UnityWindowTracker *tracker,
51
UnityHostCallbacks hostCallbacks);
52
void UnityPlatformCleanup(UnityPlatform *up);
53
Bool UnityPlatformEnterUnity(UnityPlatform *up);
54
void UnityPlatformExitUnity(UnityPlatform *up);
55
Bool UnityPlatformUpdateWindowState(UnityPlatform *up,
56
UnityWindowTracker *tracker);
57
void UnityPlatformSaveSystemSettings(UnityPlatform *up);
58
void UnityPlatformRestoreSystemSettings(UnityPlatform *up);
59
Bool UnityPlatformGetWindowPath(UnityPlatform *up,
61
DynBuf *windowPathUtf8,
62
DynBuf *execPathUtf8);
63
Bool UnityPlatformGetNativeWindowPath(UnityPlatform *up,
66
Bool UnityPlatformGetBinaryInfo(UnityPlatform *up,
69
Bool UnityPlatformSetTopWindowGroup(UnityPlatform *up,
70
UnityWindowId *windows,
71
unsigned int windowCount);
72
Bool UnityPlatformCloseWindow(UnityPlatform *up, UnityWindowId window);
73
Bool UnityPlatformShowWindow(UnityPlatform *up, UnityWindowId window);
74
Bool UnityPlatformHideWindow(UnityPlatform *up, UnityWindowId window);
75
Bool UnityPlatformMinimizeWindow(UnityPlatform *up, UnityWindowId window);
76
Bool UnityPlatformUnminimizeWindow(UnityPlatform *up, UnityWindowId window);
77
Bool UnityPlatformMaximizeWindow(UnityPlatform *up, UnityWindowId window);
78
Bool UnityPlatformUnmaximizeWindow(UnityPlatform *up, UnityWindowId window);
79
Bool UnityPlatformGetWindowContents(UnityPlatform *up,
84
Bool UnityPlatformMoveResizeWindow(UnityPlatform *up,
86
UnityRect *moveResizeRect);
87
void UnityPlatformShowTaskbar(UnityPlatform *up, Bool showTaskbar);
88
void UnityPlatformShowDesktop(UnityPlatform *up, Bool showDesktop);
89
Bool UnityPlatformGetIconData(UnityPlatform *up,
91
UnityIconType iconType,
92
UnityIconSize iconSize,
97
Bool UnityPlatformSetDesktopWorkAreas(UnityPlatform *up,
98
UnityRect workAreas[],
100
Bool UnityPlatformSetDesktopConfig(UnityPlatform *up,
101
const UnityVirtualDesktopArray *desktops);
102
Bool UnityPlatformSetInitialDesktop(UnityPlatform *up,
103
UnityDesktopId desktopId);
104
Bool UnityPlatformSetDesktopActive(UnityPlatform *up,
105
UnityDesktopId desktopId);
106
Bool UnityPlatformSetWindowDesktop(UnityPlatform *up,
107
UnityWindowId windowId,
108
UnityDesktopId desktopId);
109
Bool UnityPlatformStickWindow(UnityPlatform *up,
110
UnityWindowId windowId);
111
Bool UnityPlatformUnstickWindow(UnityPlatform *up,
112
UnityWindowId windowId);
113
void UnityPlatformSetInterlockMinimizeOperation(UnityPlatform *up,Bool enabled);
114
Bool UnityPlatformConfirmMinimizeOperation(UnityPlatform *up,
115
UnityWindowId windowId,
118
Bool UnityPlatformIsUnityRunning(UnityPlatform *up);
119
void UnityPlatformUnlock(UnityPlatform *up);
120
void UnityPlatformLock(UnityPlatform *up);
121
void UnityPlatformUpdateDnDDetWnd(UnityPlatform *up,
123
void UnityPlatformSetActiveDnDDetWnd(UnityPlatform *up, UnityDnD *detWnd);
125
void UnityPlatformDoUpdate(UnityPlatform *up, Bool incremental);
127
void UnityPlatformSetConfigDesktopColor(UnityPlatform *up, int desktopColor);
129
Bool UnityPlatformRequestWindowContents(UnityPlatform *up,
130
UnityWindowId windowIds[],
131
uint32 numWindowIds);
133
Bool UnityPlatformSendMouseWheel(UnityPlatform *up,
137
uint32 modifierFlags);
138
void UnityPlatformSetDisableCompositing(UnityPlatform *up, Bool disabled);
142
#endif // __cplusplus