VBoxHelpers.cpp revision 74804912a237136f06d0b49682a119577135902b
/** @file
* helpers - Guest Additions Service helper functions
*/
/*
* Copyright (C) 2006-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include <malloc.h>
#include <windows.h>
#include <VBox/VBoxGuestLib.h>
#include <VBoxGuestInternal.h>
#include "VBoxHelpers.h"
#include "resource.h"
{
unsigned i;
for (i = 0; i < nRects; i++)
{
return i;
}
return ~0;
}
{
unsigned i;
for (i = 0; i < nRects; i++)
{
return i;
}
return ~0;
}
{
unsigned i;
for (i = 0; i < nRects; i++)
{
return i;
}
return ~0;
}
{
unsigned i;
for (i = 0; i < nRects; i++)
{
return i;
}
return ~0;
}
{
DDCLOG(("nRects %d, iPrimary %d, iResized %d, NewWidth %d, NewHeight %d\n", nRects, uPrimary, uResized, iNewWidth, iNewHeight));
paNewRects[uResized].bottom += iNewHeight - (paNewRects[uResized].bottom - paNewRects[uResized].top);
/* Verify all pairs of originally adjacent rectangles for all 4 directions.
* If the pair has a "good" delta (that is the first rectangle intersects the second)
* at a direction and the second rectangle is not primary one (which can not be moved),
* move the second rectangle to make it adjacent to the first one.
*/
/* X positive. */
unsigned iRect;
{
/* Find the next adjacent original rect in x positive direction. */
{
continue;
}
/* Check whether there is an X intersection between these adjacent rects in the new rectangles
* and fix the intersection if delta is "good".
*/
if (delta != 0)
{
DDCLOG(("XP intersection right %d left %d, diff %d\n",
delta));
}
}
/* X negative. */
{
/* Find the next adjacent original rect in x negative direction. */
{
continue;
}
/* Check whether there is an X intersection between these adjacent rects in the new rectangles
* and fix the intersection if delta is "good".
*/
if (delta != 0)
{
DDCLOG(("XN intersection left %d right %d, diff %d\n",
delta));
}
}
/* Y positive (in the computer sense, top->down). */
{
/* Find the next adjacent original rect in y positive direction. */
{
continue;
}
/* Check whether there is an Y intersection between these adjacent rects in the new rectangles
* and fix the intersection if delta is "good".
*/
if (delta != 0)
{
DDCLOG(("YP intersection bottom %d top %d, diff %d\n",
delta));
}
}
/* Y negative (in the computer sense, down->top). */
{
/* Find the next adjacent original rect in x negative direction. */
{
continue;
}
/* Check whether there is an Y intersection between these adjacent rects in the new rectangles
* and fix the intersection if delta is "good".
*/
if (delta != 0)
{
DDCLOG(("YN intersection top %d bottom %d, diff %d\n",
delta));
}
}
return;
}
{
if (dwInfoFlags == 0)
return FALSE;
{
{
//niData.dwInfoFlags = NIIF_USER; /* Use an own icon instead of the default one */
}
{
}
#endif
}
return GetLastError();
return 0;
}