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
*********************************************************/
22
* Implementation specific functionality
25
#ifndef _UNITY_PLATFORM_H_
26
#define _UNITY_PLATFORM_H_
28
#include "unityWindowTracker.h"
32
* This data structure is used when gathering and sending
41
} UnityUpdateThreadData;
50
typedef struct _UnityPlatform UnityPlatform;
53
* Implemented by unityPlatform[Win32|X11|Cocoa (ha!)].c
56
Bool UnityPlatformIsSupported(void);
57
UnityPlatform *UnityPlatformInit(UnityWindowTracker *tracker,
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,
69
Bool UnityPlatformGetNativeWindowPath(UnityPlatform *up,
72
Bool UnityPlatformGetBinaryInfo(UnityPlatform *up,
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,
89
Bool UnityPlatformMoveResizeWindow(UnityPlatform *up,
91
UnityRect *moveResizeRect);
92
void UnityPlatformShowTaskbar(UnityPlatform *up, Bool showTaskbar);
93
Bool UnityPlatformGetIconData(UnityPlatform *up,
95
UnityIconType iconType,
96
UnityIconSize iconSize,
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,
118
void UnityPlatformSetActiveDnDDetWnd(UnityPlatform *up, UnityDnD *detWnd);
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);