]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Move even more code out of lib/guestApp.
authorVMware, Inc <>
Wed, 20 Jul 2011 20:46:14 +0000 (13:46 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 20 Jul 2011 20:46:14 +0000 (13:46 -0700)
This time it's mouse and old copy & paste protocol functions, which are only
used by the dnd plugin.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/guestApp/guestApp.c
open-vm-tools/lib/include/guestApp.h
open-vm-tools/services/plugins/dndcp/Makefile.am
open-vm-tools/services/plugins/dndcp/copyPasteCompat.c [new file with mode: 0644]
open-vm-tools/services/plugins/dndcp/copyPasteCompat.h
open-vm-tools/services/plugins/dndcp/copyPasteCompatX11.c
open-vm-tools/services/plugins/dndcp/copyPasteUIX11.cpp
open-vm-tools/services/plugins/dndcp/dndPluginInt.h
open-vm-tools/services/plugins/dndcp/dndPluginIntX11.h
open-vm-tools/services/plugins/dndcp/pointer.cpp

index dbd36b85f3354183fed0cb31095a79db2e4aedfe..70e999ee50085e10ba10620709ab0b8e77533778 100644 (file)
@@ -278,250 +278,3 @@ GuestApp_GetConfPath(void)
 #endif
 }
 
-
-/*
- *----------------------------------------------------------------------------
- *
- * GuestApp_IsMouseAbsolute
- *
- *    Are the host/guest capable of using absolute mouse mode?
- *
- * Results:
- *    TRUE if host is in absolute mouse mode, FALSE otherwise.
- *
- * Side effects:
- *    Issues Tools RPC.
- *
- *----------------------------------------------------------------------------
- */
-
-GuestAppAbsoluteMouseState
-GuestApp_GetAbsoluteMouseState(void)
-{
-   Backdoor_proto bp;
-   GuestAppAbsoluteMouseState state = GUESTAPP_ABSMOUSE_UNKNOWN;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_ISMOUSEABSOLUTE;
-   Backdoor(&bp);
-   if (bp.out.ax.word == 0) {
-      state = GUESTAPP_ABSMOUSE_UNAVAILABLE;
-   } else if (bp.out.ax.word == 1) {
-      state = GUESTAPP_ABSMOUSE_AVAILABLE;
-   }
-
-   return state;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_GetPos --
- *
- *      Retrieve the host notion of the guest pointer location. --hpreg
- *
- * Results:
- *      '*x' and '*y' are the coordinates (top left corner is 0, 0) of the
- *      host notion of the guest pointer location. (-100, -100) means that the
- *      mouse is not grabbed on the host.
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestApp_GetPos(int16 *x, // OUT
-                int16 *y) // OUT
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_GETPTRLOCATION;
-   Backdoor(&bp);
-   *x = bp.out.ax.word >> 16;
-   *y = bp.out.ax.word;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_SetPos --
- *
- *      Update the host notion of the guest pointer location. 'x' and 'y' are
- *      the coordinates (top left corner is 0, 0). --hpreg
- *
- * Results:
- *      None
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestApp_SetPos(uint16 x, // IN
-                uint16 y) // IN
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_SETPTRLOCATION;
-   bp.in.size = (x << 16) | y;
-   Backdoor(&bp);
-}
-
-
-/*
- * XXX The 5 functions below should be re-implemented using the message layer,
- *     to benefit from:
- *     . The high-bandwidth backdoor or the generic "send 4 bytes at a time"
- *       logic of the low-bandwidth backdoor
- *     . The restore/resume detection logic
- *     --hpreg
- */
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_GetHostSelectionLen --
- *
- *      Retrieve the length of the clipboard (if any) to receive from the
- *      VMX. --hpreg
- *
- * Results:
- *      Length >= 0 if a clipboard must be retrieved from the host.
- *      < 0 on error (VMWARE_DONT_EXCHANGE_SELECTIONS or
- *                    VMWARE_SELECTION_NOT_READY currently)
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-int32
-GuestApp_GetHostSelectionLen(void)
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_GETSELLENGTH;
-   Backdoor(&bp);
-   return bp.out.ax.word;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestAppGetNextPiece --
- *
- *      Retrieve the next 4 bytes of the host clipboard. --hpreg
- *
- * Results:
- *      The next 4 bytes of the host clipboard.
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-static uint32
-GuestAppGetNextPiece(void)
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_GETNEXTPIECE;
-   Backdoor(&bp);
-   return bp.out.ax.word;
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_GetHostSelection --
- *
- *      Retrieve the host clipboard. 'data' must be a buffer whose size is at
- *      least (('size' + 4 - 1) / 4) * 4 bytes. --hpreg
- *
- * Results:
- *      The host clipboard in 'data'.
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestApp_GetHostSelection(unsigned int size, // IN
-                          char *data)        // OUT
-{
-   uint32 *current;
-   uint32 const *end;
-
-   current = (uint32 *)data;
-   end = current + (size + sizeof *current - 1) / sizeof *current;
-   for (; current < end; current++) {
-      *current = GuestAppGetNextPiece();
-   }
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_SetSelLength --
- *
- *      Tell the VMX about the length of the clipboard we are about to send
- *      to it. --hpreg
- *
- * Results:
- *      None
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestApp_SetSelLength(uint32 length) // IN
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_SETSELLENGTH;
-   bp.in.size = length;
-   Backdoor(&bp);
-}
-
-
-/*
- *-----------------------------------------------------------------------------
- *
- * GuestApp_SetNextPiece --
- *
- *      Send the next 4 bytes of the guest clipboard. --hpreg
- *
- * Results:
- *      None
- *
- * Side effects:
- *     None
- *
- *-----------------------------------------------------------------------------
- */
-
-void
-GuestApp_SetNextPiece(uint32 data) // IN
-{
-   Backdoor_proto bp;
-
-   bp.in.cx.halfs.low = BDOOR_CMD_SETNEXTPIECE;
-   bp.in.size = data;
-   Backdoor(&bp);
-}
-
index 55be7c88dfbd3c2a6ebd9bb9f100af0e6f51cdac..e618eeb41dbf215dce02b1b2c25ce4f3f1dda739 100644 (file)
@@ -51,35 +51,6 @@ GuestApp_GetInstallPath(void);
 char *
 GuestApp_GetConfPath(void);
 
-void
-GuestApp_GetPos(int16 *x,  // OUT
-                int16 *y); // OUT
-
-void
-GuestApp_SetPos(uint16 x,  // IN
-                uint16 y); // IN
-
-int32
-GuestApp_GetHostSelectionLen(void);
-
-void
-GuestApp_GetHostSelection(unsigned int size, // IN
-                          char *data);       // OUT
-
-void
-GuestApp_SetSelLength(uint32 length); // IN
-
-void
-GuestApp_SetNextPiece(uint32 data); // IN
-
-typedef enum {
-   GUESTAPP_ABSMOUSE_UNAVAILABLE,
-   GUESTAPP_ABSMOUSE_AVAILABLE,
-   GUESTAPP_ABSMOUSE_UNKNOWN
-} GuestAppAbsoluteMouseState;
-
-GuestAppAbsoluteMouseState GuestApp_GetAbsoluteMouseState(void);
-
 #ifdef __cplusplus
 }
 #endif
index 35c256afd16a632eaa1993afcfbba01ce9d23da9..04422c7b973e91d6531ff38c90c3a2a70c76ccf6 100644 (file)
@@ -67,6 +67,7 @@ libdndcp_la_SOURCES += dndGuest/dndCPTransportGuestRpc.cpp
 
 libdndcp_la_SOURCES += stringxx/string.cc
 
+libdndcp_la_SOURCES += copyPasteCompat.c
 libdndcp_la_SOURCES += copyPasteCompatX11.c
 libdndcp_la_SOURCES += copyPasteDnDWrapper.cpp
 libdndcp_la_SOURCES += copyPasteDnDX11.cpp
diff --git a/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c b/open-vm-tools/services/plugins/dndcp/copyPasteCompat.c
new file mode 100644 (file)
index 0000000..7c1a7bf
--- /dev/null
@@ -0,0 +1,171 @@
+/*********************************************************
+ * Copyright (C) 2011 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.
+ *
+ *********************************************************/
+
+/*
+ * copyPasteCompat.c --
+ *
+ *    Legacy copy/paste functions.
+ */
+
+#include "backdoor.h"
+#include "backdoor_def.h"
+#include "copyPasteCompat.h"
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPaste_GetHostSelectionLen --
+ *
+ *      Retrieve the length of the clipboard (if any) to receive from the
+ *      VMX.
+ *
+ * Results:
+ *      Length >= 0 if a clipboard must be retrieved from the host.
+ *      < 0 on error (VMWARE_DONT_EXCHANGE_SELECTIONS or
+ *                    VMWARE_SELECTION_NOT_READY currently)
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+int32
+CopyPaste_GetHostSelectionLen(void)
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_GETSELLENGTH;
+   Backdoor(&bp);
+   return bp.out.ax.word;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPasteGetNextPiece --
+ *
+ *      Retrieve the next 4 bytes of the host clipboard.
+ *
+ * Results:
+ *      The next 4 bytes of the host clipboard.
+ *
+ * Side effects:
+ *          None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static uint32
+CopyPasteGetNextPiece(void)
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_GETNEXTPIECE;
+   Backdoor(&bp);
+   return bp.out.ax.word;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPaste_GetHostSelection --
+ *
+ *      Retrieve the host clipboard. 'data' must be a buffer whose size is at
+ *      least (('size' + 4 - 1) / 4) * 4 bytes.
+ *
+ * Results:
+ *      The host clipboard in 'data'.
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+CopyPaste_GetHostSelection(unsigned int size, // IN
+                           char *data)        // OUT
+{
+   uint32 *current;
+   uint32 const *end;
+
+   current = (uint32 *)data;
+   end = current + (size + sizeof *current - 1) / sizeof *current;
+   for (; current < end; current++) {
+      *current = CopyPasteGetNextPiece();
+   }
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPaste_SetSelLength --
+ *
+ *      Tell the VMX about the length of the clipboard we are about to send
+ *      to it.
+ *
+ * Results:
+ *      None
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+CopyPaste_SetSelLength(uint32 length) // IN
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_SETSELLENGTH;
+   bp.in.size = length;
+   Backdoor(&bp);
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * CopyPaste_SetNextPiece --
+ *
+ *      Send the next 4 bytes of the guest clipboard.
+ *
+ * Results:
+ *      None
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+CopyPaste_SetNextPiece(uint32 data) // IN
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_SETNEXTPIECE;
+   bp.in.size = data;
+   Backdoor(&bp);
+}
+
index 30fd0bfe96d57a8e14b917ee1ae7f0c3c1bf174f..07374b2726e32d0844aeaac4571c627c249cd71b 100644 (file)
@@ -26,6 +26,8 @@
 #if !defined _COPYPASTE_COMPAT_H
 #define _COPYPASTE_COMPAT_H
 
+#include "vmware.h"
+
 /* Functions to be compatible with old text copy/paste directly based on backdoor cmd. */
 Bool CopyPaste_RequestSelection(void);
 Bool CopyPaste_GetBackdoorSelections(void);
@@ -33,4 +35,17 @@ Bool CopyPaste_IsRpcCPSupported(void);
 void CopyPaste_Init(void);
 void CopyPaste_SetVersion(int version);
 
+int32
+CopyPaste_GetHostSelectionLen(void);
+
+void
+CopyPaste_GetHostSelection(unsigned int size, // IN
+                           char *data);       // OUT
+
+void
+CopyPaste_SetSelLength(uint32 length); // IN
+
+void
+CopyPaste_SetNextPiece(uint32 data); // IN
+
 #endif
index e96a16ae6df55c8536f923101c8a014ed532a5d7..fc6f183c38085681ef04944f2e17be1a130b4d84 100644 (file)
@@ -45,9 +45,9 @@
 #include <errno.h>
 
 #include "vm_assert.h"
+#include "copyPasteCompat.h"
 #include "str.h"
 #include "strutil.h"
-#include "guestApp.h"
 #include "dnd.h"
 #include "util.h"
 #include "cpName.h"
@@ -547,7 +547,7 @@ CopyPasteSelectionClearCB(GtkWidget          *widget,         // IN: unused
  * CopyPasteSetBackdoorSelections --
  *
  *      Set the clipboard one of two ways, the old way or the new way.
- *      The old way uses GuestApp_SetSel and there's only one selection.
+ *      The old way uses CopyPaste_SetSelLength and there's only one selection.
  *      Set backdoor selection with either primary selection or clipboard.
  *      The primary selection is the first priority, then clipboard.
  *      If both unavailable, set backdoor selection length to be 0.
@@ -606,7 +606,7 @@ CopyPasteSetBackdoorSelections(void)
    }
 
    if (p == NULL) {
-      GuestApp_SetSelLength(0);
+      CopyPaste_SetSelLength(0);
       g_debug("CopyPasteSetBackdoorSelections Set empty text.\n");
    } else {
       len = strlen((char *)p);
@@ -616,9 +616,9 @@ CopyPasteSetBackdoorSelections(void)
       /* Here long string should already be truncated. */
       ASSERT(aligned_len <= MAX_SELECTION_BUFFER_LENGTH);
 
-      GuestApp_SetSelLength(len);
+      CopyPaste_SetSelLength(len);
       for (i = 0; i < len; i += 4, p++) {
-         GuestApp_SetNextPiece(*p);
+         CopyPaste_SetNextPiece(*p);
       }
    }
 }
@@ -630,9 +630,9 @@ CopyPasteSetBackdoorSelections(void)
  * CopyPaste_GetBackdoorSelections --
  *
  *      Get the clipboard "the old way".
- *      The old way uses GuestApp_SetSel and there's only one selection.
- *      We don't have to do anything for the "new way", since the host
- *      will just push PRIMARY and/or CLIPBOARD when they are available
+ *      The old way uses CopyPaste_GetHostSelectionLen and there's only one
+ *      selection. We don't have to do anything for the "new way", since the
+ *      host will just push PRIMARY and/or CLIPBOARD when they are available
  *      on the host.
  *
  *      XXX: the "new way" isn't availble yet because the vmx doesn't
@@ -658,11 +658,11 @@ CopyPaste_GetBackdoorSelections(void)
       return TRUE;
    }
 
-   selLength = GuestApp_GetHostSelectionLen();
+   selLength = CopyPaste_GetHostSelectionLen();
    if (selLength < 0 || selLength > MAX_SELECTION_BUFFER_LENGTH) {
       return FALSE;
    } else if (selLength > 0) {
-      GuestApp_GetHostSelection(selLength, gHostClipboardBuf);
+      CopyPaste_GetHostSelection(selLength, gHostClipboardBuf);
       gHostClipboardBuf[selLength] = 0;
       g_debug("CopyPaste_GetBackdoorSelections Get text [%s].\n", gHostClipboardBuf);
       gtk_selection_owner_set(gUserMainWidget,
index 922b49c298844d19f33fd2349cdfaa45cc98d76a..043a4ccd7b928ea944c485164d069f5c0b65f99c 100644 (file)
@@ -45,7 +45,6 @@ extern "C" {
    #include "cpNameUtil.h"
    #include "rpcout.h"
    #include "vmware/guestrpc/tclodefs.h"
-   #include "guestApp.h"
 }
 
 /*
index 9be0cab1ef98c9cde60bcf6d6c5ca0ce885e36ae..5f6536681bcfe5b5b54a57d53fe736b994d1e7c8 100644 (file)
@@ -27,7 +27,6 @@
 #define __DNDPLUGIN_INT_H__
 
 extern "C" {
-   #include "guestApp.h"
    #include "conf.h"
 }
 
index 405c768a00107608e522176d9a5c4a7688557b20..4f48d5b16b5ff6fdc27c0135056bceb899bc6a3b 100644 (file)
@@ -31,8 +31,6 @@
 #include "vm_basic_types.h"
 #include "dnd.h"
 
-#include "guestApp.h"
-
 #define UNGRABBED_POS (-100)
 
 extern Display *gXDisplay;
index f5e6a6f2ed6ed9552236335d027ab1f4cd215cc1..195c7955ce128e44c766a92d0d8c902566fb2946 100644 (file)
@@ -41,13 +41,21 @@ extern "C" {
 
 extern "C" {
    #include "vm_assert.h"
-   #include "guestApp.h"
    #include "backdoor_def.h"
+   #include "backdoor.h"
    #include "rpcvmx.h"
 }
 
+
+typedef enum {
+   ABSMOUSE_UNAVAILABLE,
+   ABSMOUSE_AVAILABLE,
+   ABSMOUSE_UNKNOWN
+} AbsoluteMouseState;
+
+
 static Bool mouseIsGrabbed;
-static GuestAppAbsoluteMouseState absoluteMouseState = GUESTAPP_ABSMOUSE_UNKNOWN;
+static AbsoluteMouseState absoluteMouseState = ABSMOUSE_UNKNOWN;
 static uint8 gHostClipboardTries = 0;
 
 #if defined(WIN32)
@@ -60,6 +68,41 @@ static gboolean PointerUpdatePointerLoop(gpointer clientData);
 
 #define POINTER_UPDATE_TIMEOUT 100
 
+
+/*
+ *----------------------------------------------------------------------------
+ *
+ * PointerGetAbsoluteMouseState
+ *
+ *    Are the host/guest capable of using absolute mouse mode?
+ *
+ * Results:
+ *    TRUE if host is in absolute mouse mode, FALSE otherwise.
+ *
+ * Side effects:
+ *    Issues Tools RPC.
+ *
+ *----------------------------------------------------------------------------
+ */
+
+static AbsoluteMouseState
+PointerGetAbsoluteMouseState(void)
+{
+   Backdoor_proto bp;
+   AbsoluteMouseState state = ABSMOUSE_UNKNOWN;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_ISMOUSEABSOLUTE;
+   Backdoor(&bp);
+   if (bp.out.ax.word == 0) {
+      state = ABSMOUSE_UNAVAILABLE;
+   } else if (bp.out.ax.word == 1) {
+      state = ABSMOUSE_AVAILABLE;
+   }
+
+   return state;
+}
+
+
 #if !defined(WIN32)
 /*
  *-----------------------------------------------------------------------------
@@ -114,6 +157,67 @@ PointerSetXCursorPos(int x, int y)
 
 #endif
 
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * PointerGetPos --
+ *
+ *      Retrieve the host notion of the guest pointer location.
+ *
+ * Results:
+ *      '*x' and '*y' are the coordinates (top left corner is 0, 0) of the
+ *      host notion of the guest pointer location. (-100, -100) means that the
+ *      mouse is not grabbed on the host.
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static void
+PointerGetPos(int16 *x, // OUT
+              int16 *y) // OUT
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_GETPTRLOCATION;
+   Backdoor(&bp);
+   *x = bp.out.ax.word >> 16;
+   *y = bp.out.ax.word;
+}
+
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * PointerSetPos --
+ *
+ *      Update the host notion of the guest pointer location. 'x' and 'y' are
+ *      the coordinates (top left corner is 0, 0).
+ *
+ * Results:
+ *      None
+ *
+ * Side effects:
+ *     None
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+static void
+PointerSetPos(uint16 x, // IN
+              uint16 y) // IN
+{
+   Backdoor_proto bp;
+
+   bp.in.cx.halfs.low = BDOOR_CMD_SETPTRLOCATION;
+   bp.in.size = (x << 16) | y;
+   Backdoor(&bp);
+}
+
+
 /*
  *-----------------------------------------------------------------------------
  *
@@ -138,7 +242,7 @@ PointerGrabbed(void)
    short hostPosX;
    short hostPosY;
 
-   GuestApp_GetPos(&hostPosX, &hostPosY);
+   PointerGetPos(&hostPosX, &hostPosY);
 #if defined(WIN32)
    SetCursorPos(hostPosX, hostPosY);
 #else
@@ -220,7 +324,7 @@ PointerUpdatePointerLoop(gpointer clientData) // IN: unused
    int guestX, guestY;
 #endif
 
-   GuestApp_GetPos(&hostPosX, &hostPosY);
+   PointerGetPos(&hostPosX, &hostPosY);
    if (mouseIsGrabbed) {
       if (hostPosX == UNGRABBED_POS) {
          /* We transitioned from grabbed to ungrabbed */
@@ -243,13 +347,13 @@ PointerUpdatePointerLoop(gpointer clientData) // IN: unused
                 * where to position the outside pointer if the user releases the guest
                 * pointer via the key combination).
                 */
-               GuestApp_SetPos(guestPos.x, guestPos.y);
+               PointerSetPos(guestPos.x, guestPos.y);
             }
          }
 #else
          PointerGetXCursorPos(&guestX, &guestY);
          if ( hostPosX != guestX || hostPosY != guestY) {
-            GuestApp_SetPos(guestX, guestY);
+            PointerSetPos(guestX, guestY);
          }
 #endif
          CopyPasteDnDWrapper *wrapper = CopyPasteDnDWrapper::GetInstance();
@@ -271,7 +375,7 @@ PointerUpdatePointerLoop(gpointer clientData) // IN: unused
    }
 
    if (!CopyPaste_IsRpcCPSupported() ||
-       (absoluteMouseState == GUESTAPP_ABSMOUSE_UNAVAILABLE)) {
+       (absoluteMouseState == ABSMOUSE_UNAVAILABLE)) {
 
       GSource *src;
 
@@ -310,7 +414,7 @@ PointerUpdatePointerLoop(gpointer clientData) // IN: unused
 void
 Pointer_Init(ToolsAppCtx *ctx)
 {
-   absoluteMouseState = GuestApp_GetAbsoluteMouseState();
+   absoluteMouseState = PointerGetAbsoluteMouseState();
    PointerUpdatePointerLoop(NULL);
    mouseIsGrabbed = FALSE;
 }