+ break;
+ }
+
+ case NAVIGATOR_SWIPE_DOWN:
+ /* XXX Open app menu */
+ break;
+
+ /* Orientation is a bunch of handshakes.
+ - First the app get's asked if it wants to rotate (NAVIGATOR_ORIENTATION_CHECK)
+ - If the app wants to rotate, then it will be told what size it will be after rotate (NAVIGATOR_ORIENTATION_SIZE).
+ - Once the OS confirms that it's ready to rotate, it tells the app to handle rotation (NAVIGATOR_ORIENTATION).
+ - Once rotation is complete, the OS tells the app it's done (NAVIGATOR_ORIENTATION_DONE) */
+ case NAVIGATOR_ORIENTATION_CHECK:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_ORIENTATION_CHECK");
+
+ /* Reset sizes */
+ window->State.pWState.newWidth = 0;
+ window->State.pWState.newHeight = 0;
+
+ /* Notify that we want to rotate */
+ navigator_orientation_check_response(fgDisplay.pDisplay.event, true);
+ break;
+
+ case NAVIGATOR_ORIENTATION:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_ORIENTATION");
+
+ /* Rotate and resize the window */
+ fgPlatformRotateWindow(window, navigator_event_get_orientation_angle(fgDisplay.pDisplay.event));
+ fghOnReshapeNotify(window, window->State.pWState.newWidth, window->State.pWState.newHeight, GL_FALSE);
+
+ /* Reset sizes */
+ window->State.pWState.newWidth = 0;
+ window->State.pWState.newHeight = 0;
+
+ /* Done rotating */
+ navigator_done_orientation(fgDisplay.pDisplay.event);
+ break;
+
+ case NAVIGATOR_BACK:
+ /* XXX Should this be a Special/SpecialUp event? */
+ break;
+
+ case NAVIGATOR_WINDOW_ACTIVE:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_ACTIVE");
+ INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_RESUME));
+ break;
+
+ case NAVIGATOR_WINDOW_INACTIVE:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_WINDOW_INACTIVE");
+ INVOKE_WCB(*window, AppStatus, (GLUT_APPSTATUS_PAUSE));
+ break;
+
+ case NAVIGATOR_ORIENTATION_DONE:
+ case NAVIGATOR_ORIENTATION_RESULT:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_ORIENTATION_DONE\NAVIGATOR_ORIENTATION_RESULT");
+ break;
+
+ case NAVIGATOR_KEYBOARD_STATE:
+ /* XXX Should something be done with this? */
+ break;
+
+ case NAVIGATOR_KEYBOARD_POSITION:
+ /* TODO Invoke resize with the modified screen size (((y + height) - keyboardPos) - y).
+ * If result is less then zero then window is covered. If == height, then no change in size. Else, change in size */
+ break;
+
+ case NAVIGATOR_DEVICE_LOCK_STATE:
+ break;
+
+ case NAVIGATOR_WINDOW_COVER:
+ case NAVIGATOR_WINDOW_COVER_ENTER:
+ case NAVIGATOR_WINDOW_COVER_EXIT:
+ /* BlackBerry specific. Let app status and window status take care of everything */
+ break;
+
+ case NAVIGATOR_APP_STATE:
+ /* Can do the same as NAVIGATOR_WINDOW_ACTIVE/NAVIGATOR_WINDOW_INACTIVE but
+ seems less likely to work when the app comes to the foreground. Might be a bug */
+ break;
+
+ case NAVIGATOR_ORIENTATION_SIZE:
+ LOGI("fgPlatformProcessSingleEvent: NAVIGATOR_ORIENTATION_SIZE");
+
+ /* Get new window size */
+ window->State.pWState.newWidth = navigator_event_get_orientation_size_width(fgDisplay.pDisplay.event);
+ window->State.pWState.newHeight = navigator_event_get_orientation_size_height(fgDisplay.pDisplay.event);
+ break;
+
+ case 0: //Doesn't exist in header, but shows up when keyboard shows and resizes
+ break;
+
+ default:
+ LOGW("fgPlatformProcessSingleEvent: unknown navigator event: 0x%X", SLOG2_FA_SIGNED(eventType));
+ break;