Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-25 16:31:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-25 16:31:21 +0400
commit274b9c8fb88ff6499ac3b13a081c1e60965e459e (patch)
tree461590235bfb22af06bb6a7079f4e1732acdc241 /intern/ghost
parent558b646216feaa43abf44eb332d2449c68bf1b39 (diff)
whitespace cleanup
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h2
-rw-r--r--intern/ghost/intern/GHOST_EventManager.h6
-rw-r--r--intern/ghost/intern/GHOST_System.h2
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp122
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp46
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h4
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.h8
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm4
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp4
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp6
10 files changed, 102 insertions, 102 deletions
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index 980e9f9fe9b..7179c295a98 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -53,7 +53,7 @@ public:
ULONG __stdcall Release (void);
/* IDropTarget implementation
- + The IDropTarget interface is one of the interfaces you implement to
+ + The IDropTarget interface is one of the interfaces you implement to
provide drag-and-drop operations in your application. It contains methods
used in any application that can be a target for data during a
drag-and-drop operation. A drop-target application is responsible for:
diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h
index 9e68a13fd74..3dc751507d6 100644
--- a/intern/ghost/intern/GHOST_EventManager.h
+++ b/intern/ghost/intern/GHOST_EventManager.h
@@ -127,9 +127,9 @@ public:
* Removes all events for a window from the stack.
* @param window The window to remove events for.
*/
- virtual void
- removeWindowEvents(
- GHOST_IWindow* window
+ virtual void
+ removeWindowEvents(
+ GHOST_IWindow* window
);
/**
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index c1e70916be6..e5ec8681de1 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -250,7 +250,7 @@ public:
virtual inline GHOST_WindowManager* getWindowManager() const;
#ifdef WITH_INPUT_NDOF
- /**
+ /**
* Returns a pointer to our n-degree of freedeom manager.
* @return A pointer to our n-degree of freedeom manager.
*/
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index e02e569cc6e..02ff5c0f559 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -394,7 +394,7 @@ GHOST_TUns8 GHOST_SystemCarbon::getNumDisplays() const
void GHOST_SystemCarbon::getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const
{
BitMap screenBits;
- Rect bnds = GetQDGlobalsScreenBits(&screenBits)->bounds;
+ Rect bnds = GetQDGlobalsScreenBits(&screenBits)->bounds;
width = bnds.right - bnds.left;
height = bnds.bottom - bnds.top;
}
@@ -413,28 +413,28 @@ GHOST_IWindow* GHOST_SystemCarbon::createWindow(
const GHOST_TEmbedderWindowID parentWindow
)
{
- GHOST_IWindow* window = 0;
+ GHOST_IWindow* window = 0;
window = new GHOST_WindowCarbon (title, left, top, width, height, state, type);
- if (window) {
- if (window->getValid()) {
- // Store the pointer to the window
- GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");
- m_windowManager->addWindow(window);
- m_windowManager->setActiveWindow(window);
- pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));
- }
- else {
+ if (window) {
+ if (window->getValid()) {
+ // Store the pointer to the window
+ GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");
+ m_windowManager->addWindow(window);
+ m_windowManager->setActiveWindow(window);
+ pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));
+ }
+ else {
GHOST_PRINT("GHOST_SystemCarbon::createWindow(): window invalid\n");
- delete window;
- window = 0;
- }
- }
+ delete window;
+ window = 0;
+ }
+ }
else {
GHOST_PRINT("GHOST_SystemCarbon::createWindow(): could not create window\n");
}
- return window;
+ return window;
}
GHOST_TSuccess GHOST_SystemCarbon::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual)
@@ -522,19 +522,19 @@ bool GHOST_SystemCarbon::processEvents(bool waitForEvent)
}
} while (waitForEvent && !anyProcessed);
- return anyProcessed;
+ return anyProcessed;
}
GHOST_TSuccess GHOST_SystemCarbon::getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const
{
- Point mouseLoc;
- // Get the position of the mouse in the active port
- ::GetGlobalMouse(&mouseLoc);
- // Convert the coordinates to screen coordinates
- x = (GHOST_TInt32)mouseLoc.h;
- y = (GHOST_TInt32)mouseLoc.v;
- return GHOST_kSuccess;
+ Point mouseLoc;
+ // Get the position of the mouse in the active port
+ ::GetGlobalMouse(&mouseLoc);
+ // Convert the coordinates to screen coordinates
+ x = (GHOST_TInt32)mouseLoc.h;
+ y = (GHOST_TInt32)mouseLoc.v;
+ return GHOST_kSuccess;
}
@@ -552,29 +552,29 @@ GHOST_TSuccess GHOST_SystemCarbon::setCursorPosition(GHOST_TInt32 x, GHOST_TInt3
// this call below sends event, but empties other events (like shift)
// CGPostMouseEvent(CGPointMake(xf, yf), TRUE, 1, FALSE, 0);
- return GHOST_kSuccess;
+ return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemCarbon::getModifierKeys(GHOST_ModifierKeys& keys) const
{
- UInt32 modifiers = ::GetCurrentKeyModifiers();
+ UInt32 modifiers = ::GetCurrentKeyModifiers();
- keys.set(GHOST_kModifierKeyOS, (modifiers & cmdKey) ? true : false);
- keys.set(GHOST_kModifierKeyLeftAlt, (modifiers & optionKey) ? true : false);
- keys.set(GHOST_kModifierKeyLeftShift, (modifiers & shiftKey) ? true : false);
- keys.set(GHOST_kModifierKeyLeftControl, (modifiers & controlKey) ? true : false);
+ keys.set(GHOST_kModifierKeyOS, (modifiers & cmdKey) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftAlt, (modifiers & optionKey) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftShift, (modifiers & shiftKey) ? true : false);
+ keys.set(GHOST_kModifierKeyLeftControl, (modifiers & controlKey) ? true : false);
- return GHOST_kSuccess;
+ return GHOST_kSuccess;
}
- /* XXX, incorrect for multibutton mice */
+/* XXX, incorrect for multibutton mice */
GHOST_TSuccess GHOST_SystemCarbon::getButtons(GHOST_Buttons& buttons) const
{
- Boolean theOnlyButtonIsDown = ::Button();
- buttons.clear();
- buttons.set(GHOST_kButtonMaskLeft, theOnlyButtonIsDown);
- return GHOST_kSuccess;
+ Boolean theOnlyButtonIsDown = ::Button();
+ buttons.clear();
+ buttons.set(GHOST_kButtonMaskLeft, theOnlyButtonIsDown);
+ return GHOST_kSuccess;
}
#define FIRSTFILEBUFLG 512
@@ -659,35 +659,35 @@ OSErr GHOST_SystemCarbon::sAEHandlerQuit(const AppleEvent *event, AppleEvent *re
GHOST_TSuccess GHOST_SystemCarbon::init()
{
-
- GHOST_TSuccess success = GHOST_System::init();
- if (success) {
+
+ GHOST_TSuccess success = GHOST_System::init();
+ if (success) {
/*
- * Initialize the cursor to the standard arrow shape (so that we can change it later on).
- * This initializes the cursor's visibility counter to 0.
- */
- ::InitCursor();
+ * Initialize the cursor to the standard arrow shape (so that we can change it later on).
+ * This initializes the cursor's visibility counter to 0.
+ */
+ ::InitCursor();
MenuRef windMenu;
::CreateStandardWindowMenu(0, &windMenu);
::InsertMenu(windMenu, 0);
::DrawMenuBar();
- ::InstallApplicationEventHandler(sEventHandlerProc, GetEventTypeCount(kEvents), kEvents, this, &m_handler);
+ ::InstallApplicationEventHandler(sEventHandlerProc, GetEventTypeCount(kEvents), kEvents, this, &m_handler);
::AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, sAEHandlerLaunch, (SInt32) this, false);
::AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, sAEHandlerOpenDocs, (SInt32) this, false);
::AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, sAEHandlerPrintDocs, (SInt32) this, false);
::AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, sAEHandlerQuit, (SInt32) this, false);
- }
- return success;
+ }
+ return success;
}
GHOST_TSuccess GHOST_SystemCarbon::exit()
{
- return GHOST_System::exit();
+ return GHOST_System::exit();
}
@@ -847,11 +847,11 @@ OSStatus GHOST_SystemCarbon::handleMouseEvent(EventRef event)
err = noErr;
}
}
- break;
+ break;
case kEventMouseMoved:
case kEventMouseDragged: {
- Point mousePos;
+ Point mousePos;
if (window) {
//handle any tablet events that may have come with the mouse event (optional)
@@ -860,7 +860,7 @@ OSStatus GHOST_SystemCarbon::handleMouseEvent(EventRef event)
::GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &mousePos);
pushEvent(new GHOST_EventCursor(getMilliSeconds(), GHOST_kEventCursorMove, window, mousePos.h, mousePos.v));
err = noErr;
- }
+ }
break;
}
case kEventMouseWheelMoved:
@@ -1094,38 +1094,38 @@ bool GHOST_SystemCarbon::handleMenuCommand(GHOST_TInt32 menuResult)
}
::HiliteMenu(0);
- return handled;
+ return handled;
}
OSStatus GHOST_SystemCarbon::sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData)
{
GHOST_SystemCarbon* sys = (GHOST_SystemCarbon*) userData;
- OSStatus err = eventNotHandledErr;
+ OSStatus err = eventNotHandledErr;
GHOST_IWindow* window;
#ifdef WITH_INPUT_NDOF
GHOST_TEventNDOFData data;
#endif
UInt32 kind;
- switch (::GetEventClass(event))
- {
+ switch (::GetEventClass(event))
+ {
case kEventClassAppleEvent:
EventRecord eventrec;
if (ConvertEventRefToEventRecord(event, &eventrec)) {
err = AEProcessAppleEvent(&eventrec);
}
break;
- case kEventClassMouse:
- err = sys->handleMouseEvent(event);
- break;
+ case kEventClassMouse:
+ err = sys->handleMouseEvent(event);
+ break;
case kEventClassWindow:
err = sys->handleWindowEvent(event);
break;
case kEventClassKeyboard:
err = sys->handleKeyEvent(event);
break;
- case kEventClassBlender :
+ case kEventClassBlender :
#ifdef WITH_INPUT_NDOF
window = sys->m_windowManager->getActiveWindow();
sys->m_ndofManager->GHOST_NDOFGetDatas(data);
@@ -1146,11 +1146,11 @@ OSStatus GHOST_SystemCarbon::sEventHandlerProc(EventHandlerCallRef handler, Even
err = noErr;
break;
default :
- ;
+ ;
break;
- }
+ }
- return err;
+ return err;
}
GHOST_TUns8* GHOST_SystemCarbon::getClipboard(bool selection) const
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 63bfa9619e4..27a61cf57fc 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1018,18 +1018,18 @@ convertXKey(KeySym key)
GXMAP(type,XK_bracketright, GHOST_kKeyRightBracket);
GXMAP(type,XK_Pause, GHOST_kKeyPause);
- GXMAP(type,XK_Shift_L, GHOST_kKeyLeftShift);
- GXMAP(type,XK_Shift_R, GHOST_kKeyRightShift);
+ GXMAP(type,XK_Shift_L, GHOST_kKeyLeftShift);
+ GXMAP(type,XK_Shift_R, GHOST_kKeyRightShift);
GXMAP(type,XK_Control_L, GHOST_kKeyLeftControl);
GXMAP(type,XK_Control_R, GHOST_kKeyRightControl);
- GXMAP(type,XK_Alt_L, GHOST_kKeyLeftAlt);
- GXMAP(type,XK_Alt_R, GHOST_kKeyRightAlt);
+ GXMAP(type,XK_Alt_L, GHOST_kKeyLeftAlt);
+ GXMAP(type,XK_Alt_R, GHOST_kKeyRightAlt);
GXMAP(type,XK_Super_L, GHOST_kKeyOS);
GXMAP(type,XK_Super_R, GHOST_kKeyOS);
- GXMAP(type,XK_Insert, GHOST_kKeyInsert);
- GXMAP(type,XK_Delete, GHOST_kKeyDelete);
- GXMAP(type,XK_Home, GHOST_kKeyHome);
+ GXMAP(type,XK_Insert, GHOST_kKeyInsert);
+ GXMAP(type,XK_Delete, GHOST_kKeyDelete);
+ GXMAP(type,XK_Home, GHOST_kKeyHome);
GXMAP(type,XK_End, GHOST_kKeyEnd);
GXMAP(type,XK_Page_Up, GHOST_kKeyUpPage);
GXMAP(type,XK_Page_Down, GHOST_kKeyDownPage);
@@ -1045,27 +1045,27 @@ convertXKey(KeySym key)
/* keypad events */
- GXMAP(type,XK_KP_0, GHOST_kKeyNumpad0);
- GXMAP(type,XK_KP_1, GHOST_kKeyNumpad1);
- GXMAP(type,XK_KP_2, GHOST_kKeyNumpad2);
- GXMAP(type,XK_KP_3, GHOST_kKeyNumpad3);
- GXMAP(type,XK_KP_4, GHOST_kKeyNumpad4);
- GXMAP(type,XK_KP_5, GHOST_kKeyNumpad5);
- GXMAP(type,XK_KP_6, GHOST_kKeyNumpad6);
- GXMAP(type,XK_KP_7, GHOST_kKeyNumpad7);
- GXMAP(type,XK_KP_8, GHOST_kKeyNumpad8);
- GXMAP(type,XK_KP_9, GHOST_kKeyNumpad9);
+ GXMAP(type,XK_KP_0, GHOST_kKeyNumpad0);
+ GXMAP(type,XK_KP_1, GHOST_kKeyNumpad1);
+ GXMAP(type,XK_KP_2, GHOST_kKeyNumpad2);
+ GXMAP(type,XK_KP_3, GHOST_kKeyNumpad3);
+ GXMAP(type,XK_KP_4, GHOST_kKeyNumpad4);
+ GXMAP(type,XK_KP_5, GHOST_kKeyNumpad5);
+ GXMAP(type,XK_KP_6, GHOST_kKeyNumpad6);
+ GXMAP(type,XK_KP_7, GHOST_kKeyNumpad7);
+ GXMAP(type,XK_KP_8, GHOST_kKeyNumpad8);
+ GXMAP(type,XK_KP_9, GHOST_kKeyNumpad9);
GXMAP(type,XK_KP_Decimal, GHOST_kKeyNumpadPeriod);
GXMAP(type,XK_KP_Insert, GHOST_kKeyNumpad0);
- GXMAP(type,XK_KP_End, GHOST_kKeyNumpad1);
- GXMAP(type,XK_KP_Down, GHOST_kKeyNumpad2);
+ GXMAP(type,XK_KP_End, GHOST_kKeyNumpad1);
+ GXMAP(type,XK_KP_Down, GHOST_kKeyNumpad2);
GXMAP(type,XK_KP_Page_Down, GHOST_kKeyNumpad3);
- GXMAP(type,XK_KP_Left, GHOST_kKeyNumpad4);
- GXMAP(type,XK_KP_Begin, GHOST_kKeyNumpad5);
+ GXMAP(type,XK_KP_Left, GHOST_kKeyNumpad4);
+ GXMAP(type,XK_KP_Begin, GHOST_kKeyNumpad5);
GXMAP(type,XK_KP_Right, GHOST_kKeyNumpad6);
- GXMAP(type,XK_KP_Home, GHOST_kKeyNumpad7);
- GXMAP(type,XK_KP_Up, GHOST_kKeyNumpad8);
+ GXMAP(type,XK_KP_Home, GHOST_kKeyNumpad7);
+ GXMAP(type,XK_KP_Up, GHOST_kKeyNumpad8);
GXMAP(type,XK_KP_Page_Up, GHOST_kKeyNumpad9);
GXMAP(type,XK_KP_Delete, GHOST_kKeyNumpadPeriod);
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 845243f92e5..b43d955d156 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -285,7 +285,7 @@ private :
void
processEvent(
XEvent *xe
- );
+ );
Time
lastEventTime(
@@ -294,7 +294,7 @@ private :
bool
generateWindowExposeEvents(
- );
+ );
};
#endif
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h
index ce28f8c4538..a5f195153dd 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowCocoa.h
@@ -305,13 +305,13 @@ protected:
int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color);
virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
-
- /** The window containing the OpenGL view */
- CocoaWindow *m_window;
+
+ /** The window containing the OpenGL view */
+ CocoaWindow *m_window;
/** The openGL view */
CocoaOpenGLView *m_openGLView;
-
+
/** The opgnGL drawing context */
NSOpenGLContext *m_openGLContext;
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 937dffe9fba..faae903827d 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -1009,7 +1009,7 @@ GHOST_TSuccess GHOST_WindowCocoa::installDrawingContext(GHOST_TDrawingContextTyp
switch (type) {
case GHOST_kDrawingContextTypeOpenGL:
if (!getValid()) break;
-
+
pixelFormat = [m_openGLView pixelFormat];
tmpOpenGLContext = [[NSOpenGLContext alloc] initWithFormat:pixelFormat
shareContext:s_firstOpenGLcontext];
@@ -1332,7 +1332,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 *bitmap
cursorImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil
- pixelsWide:sizex
+ pixelsWide:sizex
pixelsHigh:sizey
bitsPerSample:1
samplesPerPixel:2
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index d9a495ad0f4..fbab3df1351 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -255,7 +255,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(
title, // pointer to window name
WS_POPUP | WS_MAXIMIZE, // window style
left, // horizontal position of window
- top, // vertical position of window
+ top, // vertical position of window
width, // window width
height, // window height
HWND_DESKTOP, // handle to parent or owner window
@@ -633,7 +633,7 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
break;
}
SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */
- return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+ return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index de725151607..160980b6331 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -614,7 +614,7 @@ void GHOST_WindowX11::initXInputDevices()
ici = (XAnyClassPtr)(((char *)ici) + ici->length);
}
} else {
- m_xtablet.StylusID= 0;
+ m_xtablet.StylusID= 0;
}
}
else if(m_xtablet.EraserDevice==NULL && is_eraser(device_info[i].name, device_type)) {
@@ -1216,11 +1216,11 @@ activateDrawingContext(
return GHOST_kFailure;
}
- GHOST_TSuccess
+ GHOST_TSuccess
GHOST_WindowX11::
invalidate(
){
-
+
// So the idea of this function is to generate an expose event
// for the window.
// Unfortunately X does not handle expose events for you and