]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Move unity back-ends into subdirs.
authorVMware, Inc <>
Mon, 22 Aug 2011 20:21:04 +0000 (13:21 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 22 Aug 2011 20:21:04 +0000 (13:21 -0700)
Move the per-platform unity code into subdirs.  This change has
the makefile and source code changes required.

Note that I had to rename lib/unity/x11/platform.cc to
lib/unity/x11/x11platform.cc to work around a problem in the
open-vm-tools build; platform.h was renamed for consistency.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
13 files changed:
open-vm-tools/lib/include/unityCommon.h
open-vm-tools/services/plugins/unity/Makefile.am
open-vm-tools/services/plugins/unity/unityTclo.cpp
open-vm-tools/services/plugins/unity/unitylib/debug.c [new file with mode: 0644]
open-vm-tools/services/plugins/unity/unitylib/event.cc [moved from open-vm-tools/services/plugins/unity/unitylib/x11Event.cc with 98% similarity]
open-vm-tools/services/plugins/unity/unitylib/settings.cc [moved from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11Settings.cc with 99% similarity]
open-vm-tools/services/plugins/unity/unitylib/unity.c
open-vm-tools/services/plugins/unity/unitylib/unity.h
open-vm-tools/services/plugins/unity/unitylib/unityPlatform.h
open-vm-tools/services/plugins/unity/unitylib/util.cc [moved from open-vm-tools/services/plugins/unity/unitylib/x11Util.cc with 98% similarity]
open-vm-tools/services/plugins/unity/unitylib/window.cc [moved from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11Window.cc with 99% similarity]
open-vm-tools/services/plugins/unity/unitylib/x11Platform.cc [moved from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.cc with 99% similarity]
open-vm-tools/services/plugins/unity/unitylib/x11Platform.h [moved from open-vm-tools/services/plugins/unity/unitylib/unityX11.h with 99% similarity]

index 823475621a099597247abcafaa42ccad9cd900bb..cddd353a986cc808326da989c49f679e545ee8fe 100644 (file)
 #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.
index ec64feb132549eff1d9f0452c966339390b24c72..ecdc54906d3b2516462a6c775a9dbb9e002f62a1 100644 (file)
@@ -70,14 +70,16 @@ libunity_la_SOURCES += ghIntegration/platform.cc
 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
 
index d72ad5d1516ec04985ed8c8f056639e85463ceab..1a0a87458fe4baf03bc7389a2f06a47596ca6f77 100644 (file)
@@ -47,6 +47,7 @@ extern "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"
diff --git a/open-vm-tools/services/plugins/unity/unitylib/debug.c b/open-vm-tools/services/plugins/unity/unitylib/debug.c
new file mode 100644 (file)
index 0000000..54f0fe4
--- /dev/null
@@ -0,0 +1,75 @@
+/*********************************************************
+ * 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)
+{
+}
similarity index 98%
rename from open-vm-tools/services/plugins/unity/unitylib/x11Event.cc
rename to open-vm-tools/services/plugins/unity/unitylib/event.cc
index f269b8c8c69ceb67cd1af4f905c992e29c61f923..de1f5f003175c510b5d4ddebe64815ae70d95e38 100644 (file)
  *********************************************************/
 
 /**
- * @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"
 
 
 /*
similarity index 99%
rename from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11Settings.cc
rename to open-vm-tools/services/plugins/unity/unitylib/settings.cc
index 3cb68588b8efcd895e81df99851218757555b313..b152b3b564ef7acf731279907c58590f9c119f8c 100644 (file)
  *********************************************************/
 
 /*
- * 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
 
 
index a3dcb2403a40358f9f5965146a00bf138dd7a1c1..37042e80d63056ecb4fabf4168179585b09acf6c 100644 (file)
  *    @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.
@@ -64,9 +56,7 @@ UnityState unity;
 /*
  * Helper Functions
  */
-
 static void UnityUpdateCallbackFn(void *param, UnityUpdate *update);
-
 static void UnitySetAddHiddenWindows(Bool enabled);
 static void UnitySetInterlockMinimizeOperation(Bool enabled);
 static void UnitySetSendWindowContents(Bool enabled);
@@ -77,7 +67,6 @@ static void UnitySetDisableCompositing(Bool disabled);
  * 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);
@@ -133,7 +122,6 @@ static UnityFeatureSetter unityFeatureTable[] = {
    {0, NULL}
 };
 
-
 /*
  *----------------------------------------------------------------------------
  *
index 26c6f0585ba71a53f1f119666f5799fd314ad532..8a48281ce5100b5d2eae581647a77a12d0d0043e 100644 (file)
 #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"
 
@@ -42,7 +38,7 @@
  * 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,
@@ -53,14 +49,12 @@ enum{
 /*
  * 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;
@@ -85,7 +79,6 @@ typedef struct {
 /*
  * 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
@@ -99,14 +92,12 @@ typedef struct DesktopSwitchCallbackManager DesktopSwitchCallbackManager;
  * 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);
 
 /*
@@ -159,12 +150,12 @@ void Unity_Cleanup(void);
 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);
 
 /*
@@ -239,5 +230,4 @@ void Unity_InitializeDebugger(void);
 #ifdef __cplusplus
 };
 #endif // __cplusplus
-
 #endif
index 68b3e14723426335b621880a54d420404420715b..5534dc46970fdfb85551c1cbb5e02eb386503de3 100644 (file)
  * 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
@@ -138,4 +136,4 @@ void UnityPlatformSetDisableCompositing(UnityPlatform *up, Bool disabled);
 };
 #endif // __cplusplus
 
-#endif
+#endif // _UNITYPLATFORM_H_
similarity index 98%
rename from open-vm-tools/services/plugins/unity/unitylib/x11Util.cc
rename to open-vm-tools/services/plugins/unity/unitylib/util.cc
index bf621b6a85c1f5216d09160de0c06e2a86abfb73..186055aafe13fb14371c6f166ae2075bf80e62ac 100644 (file)
  *********************************************************/
 
 /**
- * @file x11Util.c
+ * @file util.cc
  *
  * This file just adds some random X utility functions.
  */
 
-#include "unityX11.h"
+#include "x11Platform.h"
 
 
 /*
similarity index 99%
rename from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11Window.cc
rename to open-vm-tools/services/plugins/unity/unitylib/window.cc
index 1d02e3b2e03e289d5fb8b6e6dcfd9ba664b69189..66964b5c2579b878b7a0d5bb2696f1bc8c5f044d 100644 (file)
  *********************************************************/
 
 /*
- * 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"
similarity index 99%
rename from open-vm-tools/services/plugins/unity/unitylib/unityPlatformX11.cc
rename to open-vm-tools/services/plugins/unity/unitylib/x11Platform.cc
index b2fd068fc2fc3b1eaa8fac49fb2aa71cd13e4d16..903199938ad0b62bc2422d08b19828184976372e 100644 (file)
  *********************************************************/
 
 /**
- * @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"
similarity index 99%
rename from open-vm-tools/services/plugins/unity/unitylib/unityX11.h
rename to open-vm-tools/services/plugins/unity/unitylib/x11Platform.h
index fb5c76ed4b3d9f05c0ac76c550ccae3b1859e346..64b506c15b35066dd5fb293eed3259e8b6759a50 100644 (file)
  *********************************************************/
 
 /*
- * 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,
@@ -493,4 +493,4 @@ void UnityX11EventTeardownSource(UnityPlatform *up);
 Bool UnityX11Util_IsWindowDecorationWidget(UnityPlatform *up,
                                            Window operand);
 
-#endif
+#endif // _X11PLATFORM_H_