#ifndef _UNITY_COMMON_H_
#define _UNITY_COMMON_H_
-#define UNITY_MAX_SETTOP_WINDOW_COUNT 100
+#include "vmware.h"
+#define UNITY_MAX_SETTOP_WINDOW_COUNT 100
/*
* Unity, GHI GuestRPC interface.
libunity_la_SOURCES += ghIntegration/pseudoAppMgr.cc
libunity_la_SOURCES += unitylib/unity.c
+libunity_la_SOURCES += unitylib/unityInt.h
libunity_la_SOURCES += unitylib/unityPlatform.h
-libunity_la_SOURCES += unitylib/unityPlatformX11.cc
-libunity_la_SOURCES += unitylib/unityPlatformX11Settings.cc
-libunity_la_SOURCES += unitylib/unityPlatformX11Window.cc
-libunity_la_SOURCES += unitylib/unityX11.h
+libunity_la_SOURCES += unitylib/debug.c
+libunity_la_SOURCES += unitylib/event.cc
+libunity_la_SOURCES += unitylib/settings.cc
+libunity_la_SOURCES += unitylib/util.cc
+libunity_la_SOURCES += unitylib/window.cc
libunity_la_SOURCES += unitylib/windowPathFactory.cc
-libunity_la_SOURCES += unitylib/x11Event.cc
-libunity_la_SOURCES += unitylib/x11Util.cc
+libunity_la_SOURCES += unitylib/x11Platform.cc
+libunity_la_SOURCES += unitylib/x11Platform.h
libunity_la_SOURCES += unityWindowTracker/unityWindowTracker.c
#include "guestrpc/unityActive.h"
#include "rpcin.h"
#include "rpcout.h"
+ #include "str.h"
#include "strutil.h"
#if defined(OPEN_VM_TOOLS)
#include "unitylib/unity.h"
--- /dev/null
+/*********************************************************
+ * Copyright (C) 2010 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation version 2.1 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ *********************************************************/
+
+/*
+ * debug.c --
+ *
+ * Debugging functions for unity window manager intergration.
+ *
+ */
+
+#include "vmware.h"
+#include "debug.h"
+#include "util.h"
+#include "region.h"
+#include "unityPlatform.h"
+#include "unityWindowTracker.h"
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnityDebug_Init --
+ *
+ * One time initialization stuff. Create our Window GDI objects.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+UnityDebug_Init(UnityWindowTracker *tracker) // IN
+{
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * UnityDebug_OnUpdate --
+ *
+ * Called everytime we get an update request from the tools. Just
+ * invalidate the debug window to trigger a repaint.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+UnityDebug_OnUpdate(void)
+{
+}
*********************************************************/
/**
- * @file x11Event.c
+ * @file event.cc
*
* Provides code relating the Glib main loop and Xlib/X11 event sources.
*/
extern "C" {
-#include <stdlib.h>
-#include <stdio.h>
-#include "vmware.h"
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include "vmware.h"
}
-#include "unityX11.h"
+#include "x11Platform.h"
/*
*********************************************************/
/*
- * unityPlatformX11Settings.c --
+ * settings.cc --
*
* Handles saving and restoring various system settings that are needed for Unity to
* work well.
*/
-#include "unityX11.h"
+#include "x11Platform.h"
#if !defined(VM_HAVE_X11_SS_EXT) && !defined(USING_AUTOCONF)
-#error "We're not building with the X11 ScreenSaver extension."
+ #error "We're not building with the X11 ScreenSaver extension."
#endif
* @li UnityRpcGH
*/
+#include <glib.h>
+#include <glib-object.h>
#include "vmware.h"
#include "debug.h"
-#include "util.h"
-#include "strutil.h"
-#include "region.h"
-#include "unityWindowTracker.h"
-#include "unityCommon.h"
-#include "unity.h"
+#include "unityDebug.h"
#include "unityInt.h"
#include "unityPlatform.h"
-#include "unityDebug.h"
#include "vmware/tools/unityevents.h"
-#include "vmware/tools/plugin.h"
-#include "appUtil.h"
-#include <stdio.h>
-#include <glib-object.h>
/*
* Singleton object for tracking the state of the service.
/*
* Helper Functions
*/
-
static void UnityUpdateCallbackFn(void *param, UnityUpdate *update);
-
static void UnitySetAddHiddenWindows(Bool enabled);
static void UnitySetInterlockMinimizeOperation(Bool enabled);
static void UnitySetSendWindowContents(Bool enabled);
* Dispatch table for Unity window commands. All commands performing actions on
* guest unity windows go here.
*/
-
typedef struct {
const char *name;
Bool (*exec)(UnityPlatform *up, UnityWindowId window);
{0, NULL}
};
-
/*
*----------------------------------------------------------------------------
*
#define _UNITY_H_
#include <glib.h>
-#include <string.h>
#include "dndGuest.h"
-#include "dbllnklst.h"
#include "dynbuf.h"
-#include "str.h"
#ifdef _WIN32
-#include "libExport.hh"
-#include "unityCommon.h"
+ #include "libExport.hh"
#endif
#include "unityWindowTracker.h"
* on host desktop. Right now we have 4 DnD detection window. 2 for DnD version 2
* or older, 2 for DnD version 3 or newer.
*/
-enum{
+enum {
UNITY_BLOCKED_WND_DND_FULL_DET_V2 = 0,
UNITY_BLOCKED_WND_DND_DET_V2 = 1,
UNITY_BLOCKED_WND_DND_FULL_DET_V3 = 2,
/*
* Maximum number of virtual desktops supported.
*/
-
#define MAX_VIRT_DESK 64
/*
* Represents a virtual desktop coordinates in the virtual desktop grid.
* The grid might look like {1,1} {1,2} {2,1} {2,2} or {1,1} {1,2} {1,2} etc.
*/
-
typedef struct UnityVirtualDesktop {
int32 x;
int32 y;
/*
* Represents a virtual desktop configuration.
*/
-
typedef struct UnityVirtualDesktopArray {
size_t desktopCount; // number of desktops in the grid
UnityVirtualDesktop desktops[MAX_VIRT_DESK]; // array of desktops
* The Unity library requires these functions to be provided so that the host
* is correctly updated as to changes of window state (essentially relaying the
* Unity protocol to the host).
+ *
+ * Prepares, builds and sends a sequence of Unity Window Tracker updates back
+ * to the host. flags is passed back to the UnityWindowTracker_RequestUpdates()
+ * function to set what type of updates are
+ * required - see bora/lib/public/unityWindowTracker.h
*/
-
- /*
- * Prepares, builds and sends a sequence of Unity Window Tracker updates back
- * to the host. flags is passed back to the UnityWindowTracker_RequestUpdates()
- * function to set what type of updates are
- * required - see bora/lib/public/unityWindowTracker.h
- */
typedef Bool (*UnityHostChannelBuildUpdateCallback)(void *param, int flags);
/*
void Unity_UnityToLocalPoint(UnityPoint *localPt, UnityPoint *unityPt);
void Unity_LocalToUnityPoint(UnityPoint *unityPt, UnityPoint *localPt);
void Unity_GetWindowCommandList(char ***commandList);
-
void Unity_SetActiveDnDDetWnd(UnityDnD *state);
#ifdef _WIN32
LIB_EXPORT HWND Unity_GetHwndFromUnityId(UnityWindowId id);
#endif
+
void Unity_SetUnityOptions(uint32 newFeaturesMask);
/*
#ifdef __cplusplus
};
#endif // __cplusplus
-
#endif
* Implementation specific functionality
*/
-#ifndef _UNITY_PLATFORM_H_
-#define _UNITY_PLATFORM_H_
+#ifndef _UNITYPLATFORM_H_
+#define _UNITYPLATFORM_H_
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
-
#include "unityWindowTracker.h"
#include "unity.h"
-
#ifdef __cplusplus
};
#endif // __cplusplus
};
#endif // __cplusplus
-#endif
+#endif // _UNITYPLATFORM_H_
*********************************************************/
/**
- * @file x11Util.c
+ * @file util.cc
*
* This file just adds some random X utility functions.
*/
-#include "unityX11.h"
+#include "x11Platform.h"
/*
*********************************************************/
/*
- * unityPlatformX11Window.c --
+ * window.cc --
*
* Implementation of Unity for guest operating systems that use the X11 windowing
* system. This file implements per-window operations (move, minimize, etc.)
*/
-#include "unityX11.h"
+#include "x11Platform.h"
extern "C" {
#include "base64.h"
#include "region.h"
*********************************************************/
/**
- * @file unityPlatformX11.c
+ * @file x11Platform.cc
*
- * Implementation of Unity for guest operating systems that use the X11 windowing
- * system. This file holds the basic things such as initialization/destruction of the
- * UnityPlatform object, overall event handling, and handling of some Unity
- * RPCs that are not window-centric.
+ * Implementation of Unity for guest operating systems that use the X11 window
+ * system. This file holds the basic things such as initialization/destruction
+ * of the UnityPlatform object, overall event handling, and handling of some
+ * Unity RPCs that are not window-centric.
*/
-#include "unityX11.h"
+#include "x11Platform.h"
extern "C" {
#include "appUtil.h"
*********************************************************/
/*
- * unityX11.h --
+ * x11Platform.h --
*
* Internal state shared between the various modules that implement Unity for X11.
*/
-#ifndef _UNITY_X11_H_
-#define _UNITY_X11_H_
+#ifndef _X11PLATFORM_H_
+#define _X11PLATFORM_H_
/*
* It's necessary to include glib, gtk+, and Xlib before the rest of the header files,
Bool UnityX11Util_IsWindowDecorationWidget(UnityPlatform *up,
Window operand);
-#endif
+#endif // _X11PLATFORM_H_