diff options
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/GHOST_ISystemPaths.h | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_System.h | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemCocoa.mm | 43 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_Window.h | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 2 |
7 files changed, 31 insertions, 28 deletions
diff --git a/intern/ghost/GHOST_ISystemPaths.h b/intern/ghost/GHOST_ISystemPaths.h index e7ac752d322..74285b7e0ce 100644 --- a/intern/ghost/GHOST_ISystemPaths.h +++ b/intern/ghost/GHOST_ISystemPaths.h @@ -95,7 +95,7 @@ class GHOST_ISystemPaths { virtual void addToSystemRecentFiles(const char *filename) const = 0; private: - /** The one and only system paths*/ + /** The one and only system paths. */ static GHOST_ISystemPaths *m_systemPaths; #ifdef WITH_CXX_GUARDEDALLOC diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h index 279f90b9641..87ba0ae9c8c 100644 --- a/intern/ghost/intern/GHOST_System.h +++ b/intern/ghost/intern/GHOST_System.h @@ -328,8 +328,8 @@ class GHOST_System : public GHOST_ISystem { */ virtual GHOST_TSuccess showMessageBox(const char * /*title*/, const char * /*message*/, - const char * /*help_label */, - const char * /*continue_label */, + const char * /*help_label*/, + const char * /*continue_label*/, const char * /*link*/, GHOST_DialogOptions /*dialog_options*/) const { diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index e0e4438a8b2..97c5652f112 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -86,7 +86,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) { // printf("\nrecvchar %c 0x%x",recvChar,recvChar); switch (rawCode) { - /*Physical keycodes not used due to map changes in int'l keyboards + /* Physical key-codes: (not used due to map changes in int'l keyboards). */ +#if 0 case kVK_ANSI_A: return GHOST_kKeyA; case kVK_ANSI_B: return GHOST_kKeyB; case kVK_ANSI_C: return GHOST_kKeyC; @@ -112,9 +113,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) case kVK_ANSI_W: return GHOST_kKeyW; case kVK_ANSI_X: return GHOST_kKeyX; case kVK_ANSI_Y: return GHOST_kKeyY; - case kVK_ANSI_Z: return GHOST_kKeyZ;*/ - - /* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/ + case kVK_ANSI_Z: return GHOST_kKeyZ; +#endif + /* Numbers keys: mapped to handle some int'l keyboard (e.g. French). */ case kVK_ISO_Section: return GHOST_kKeyUnknown; case kVK_ANSI_1: @@ -244,8 +245,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) return GHOST_kKeyUpPage; case kVK_PageDown: return GHOST_kKeyDownPage; - - /*case kVK_ANSI_Minus: return GHOST_kKeyMinus; +#if 0 /* TODO: why are these commented? */ + case kVK_ANSI_Minus: return GHOST_kKeyMinus; case kVK_ANSI_Equal: return GHOST_kKeyEqual; case kVK_ANSI_Comma: return GHOST_kKeyComma; case kVK_ANSI_Period: return GHOST_kKeyPeriod; @@ -255,15 +256,15 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) case kVK_ANSI_Backslash: return GHOST_kKeyBackslash; case kVK_ANSI_LeftBracket: return GHOST_kKeyLeftBracket; case kVK_ANSI_RightBracket: return GHOST_kKeyRightBracket; - case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave;*/ - + case kVK_ANSI_Grave: return GHOST_kKeyAccentGrave; +#endif case kVK_VolumeUp: case kVK_VolumeDown: case kVK_Mute: return GHOST_kKeyUnknown; default: { - /* alphanumerical or punctuation key that is remappable in int'l keyboards */ + /* Alphanumerical or punctuation key that is remappable in int'l keyboards. */ if ((recvChar >= 'A') && (recvChar <= 'Z')) { return (GHOST_TKey)(recvChar - 'A' + GHOST_kKeyA); } @@ -271,8 +272,8 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) return (GHOST_TKey)(recvChar - 'a' + GHOST_kKeyA); } else { - /* Leopard and Snow Leopard 64bit compatible API*/ - CFDataRef uchrHandle; /*the keyboard layout*/ + /* Leopard and Snow Leopard 64bit compatible API. */ + CFDataRef uchrHandle; /* The keyboard layout. */ TISInputSourceRef kbdTISHandle; kbdTISHandle = TISCopyCurrentKeyboardLayoutInputSource(); @@ -280,9 +281,9 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) kTISPropertyUnicodeKeyLayoutData); CFRelease(kbdTISHandle); - /*get actual character value of the "remappable" keys in int'l keyboards, - if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger), - then fallback on using the received charactersIgnoringModifiers */ + /* Get actual character value of the "remappable" keys in int'l keyboards, + * if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger), + * then fallback on using the received #charactersIgnoringModifiers. */ if (uchrHandle) { UInt32 deadKeyState = 0; UniCharCount actualStrLength = 0; @@ -433,8 +434,10 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) // So WM_exit needs to be called directly, as the event loop will never run before termination - (void)applicationWillTerminate:(NSNotification *)aNotification { - /*G.is_break = FALSE; //Let Cocoa perform the termination at the end - WM_exit(C);*/ +#if 0 + G.is_break = false; /* Let Cocoa perform the termination at the end. */ + WM_exit(C); +#endif } - (void)applicationWillBecomeActive:(NSNotification *)aNotification @@ -1215,7 +1218,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType return GHOST_kFailure; } - /*Get the bitmap of the image*/ + /* Get the bitmap of the image. */ enumerator = [[droppedImg representations] objectEnumerator]; while ((representation = [enumerator nextObject])) { if ([representation isKindOfClass:[NSBitmapImageRep class]]) { @@ -1228,7 +1231,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType if (([bitmapImage bitsPerPixel] == 32) && (([bitmapImage bitmapFormat] & 0x5) == 0) && ![bitmapImage isPlanar]) { - /* Try a fast copy if the image is a meshed RGBA 32bit bitmap*/ + /* Try a fast copy if the image is a meshed RGBA 32bit bitmap. */ toIBuf = (GHOST_TUns8 *)ibuf->rect; rasterRGB = (GHOST_TUns8 *)[bitmapImage bitmapData]; for (y = 0; y < imgSize.height; y++) { @@ -1258,7 +1261,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType colorSpaceName:NSDeviceRGBColorSpace bitmapFormat:(NSBitmapFormat)0 bytesPerRow:4 * imgSize.width - bitsPerPixel:32 /*RGB format padded to 32bits*/]; + bitsPerPixel:32 /* RGB format padded to 32bits. */]; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext @@ -1305,7 +1308,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType return GHOST_kFailure; } - /*Copy the image to ibuf, flipping it vertically*/ + /* Copy the image to ibuf, flipping it vertically. */ toIBuf = (GHOST_TUns8 *)ibuf->rect; for (y = 0; y < imgSize.height; y++) { for (x = 0; x < imgSize.width; x++) { diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index e9fd771e866..cdfb950a72c 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1503,7 +1503,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, case WM_SYSKEYDOWN: case WM_KEYUP: case WM_SYSKEYUP: - /* These functions were replaced by WM_INPUT*/ + /* These functions were replaced by #WM_INPUT. */ case WM_CHAR: /* The WM_CHAR message is posted to the window with the keyboard focus when * a WM_KEYDOWN message is translated by the TranslateMessage function. WM_CHAR @@ -1851,7 +1851,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * to perform any move or size change processing during the WM_WINDOWPOSCHANGED * message without calling DefWindowProc. */ - /* see WM_SIZE comment*/ + /* See #WM_SIZE comment. */ if (window->m_inLiveResize) { system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); system->dispatchEvents(); diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h index 1f2fed5b823..3542c6f2bcf 100644 --- a/intern/ghost/intern/GHOST_Window.h +++ b/intern/ghost/intern/GHOST_Window.h @@ -365,7 +365,7 @@ class GHOST_Window : public GHOST_IWindow { /** The current grabbed state of the cursor */ GHOST_TGrabCursorMode m_cursorGrab; - /** Grab cursor axis.*/ + /** Grab cursor axis. */ GHOST_TAxisFlag m_cursorGrabAxis; /** Initial grab location. */ diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 0a647c446e7..82b86863125 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -287,7 +287,7 @@ void GHOST_WindowWin32::setTitle(const char *title) std::string GHOST_WindowWin32::getTitle() const { - char buf[s_maxTitleLength]; /*CHANGE + never used yet*/ + char buf[s_maxTitleLength]; /* CHANGE + never used yet. */ ::GetWindowText(m_hWnd, buf, s_maxTitleLength); return std::string(buf); } diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index 10ef57c3a0a..ea798441adb 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -1241,7 +1241,7 @@ GHOST_WindowX11::~GHOST_WindowX11() if (m_valid_setup) { static Atom Primary_atom, Clipboard_atom; Window p_owner, c_owner; - /*Change the owner of the Atoms to None if we are the owner*/ + /* Change the owner of the Atoms to None if we are the owner. */ Primary_atom = XInternAtom(m_display, "PRIMARY", False); Clipboard_atom = XInternAtom(m_display, "CLIPBOARD", False); |