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:
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.h')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 79fed06c6a5..e615ef164c8 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -53,6 +53,8 @@ class GHOST_EventWheel;
class GHOST_EventWindow;
class GHOST_EventDragnDrop;
+class GHOST_WindowWin32;
+
/**
* WIN32 Implementation of GHOST_System class.
* \see GHOST_System.
@@ -69,7 +71,7 @@ public:
/**
* Destructor.
*/
- virtual ~GHOST_SystemWin32();
+ ~GHOST_SystemWin32();
/***************************************************************************************
** Time(r) functionality
@@ -81,7 +83,7 @@ public:
* This overloaded method uses the high frequency timer if available.
* \return The number of milliseconds.
*/
- virtual GHOST_TUns64 getMilliSeconds() const;
+ GHOST_TUns64 getMilliSeconds() const;
/***************************************************************************************
** Display/window management functionality
@@ -91,19 +93,19 @@ public:
* Returns the number of displays on this system.
* \return The number of displays.
*/
- virtual GHOST_TUns8 getNumDisplays() const;
+ GHOST_TUns8 getNumDisplays() const;
/**
* Returns the dimensions of the main display on this system.
* \return The dimension of the main display.
*/
- virtual void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
+ void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
/**
* Returns the dimensions of all displays on this system.
* \return The dimension of the main display.
*/
- virtual void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
+ void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const;
/**
* Create a new window.
@@ -121,13 +123,12 @@ public:
* \param parentWindow Parent (embedder) window
* \return The new window (or 0 if creation failed).
*/
- virtual GHOST_IWindow *createWindow(
+ GHOST_IWindow *createWindow(
const STR_String& title,
GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
GHOST_TWindowState state, GHOST_TDrawingContextType type,
- const bool stereoVisual = false,
- const bool exclusive = false,
- const GHOST_TUns16 numOfAASamples = 0,
+ GHOST_GLSettings glSettings,
+ const bool exclusive = false,
const GHOST_TEmbedderWindowID parentWindow = 0);
/***************************************************************************************
@@ -139,7 +140,7 @@ public:
* \param waitForEvent Flag to wait for an event (or return immediately).
* \return Indication of the presence of events.
*/
- virtual bool processEvents(bool waitForEvent);
+ bool processEvents(bool waitForEvent);
/***************************************************************************************
@@ -152,7 +153,7 @@ public:
* \param y The y-coordinate of the cursor.
* \return Indication of success.
*/
- virtual GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const;
+ GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const;
/**
* Updates the location of the cursor (location in screen coordinates).
@@ -160,7 +161,7 @@ public:
* \param y The y-coordinate of the cursor.
* \return Indication of success.
*/
- virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
+ GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/***************************************************************************************
** Access to mouse button and keyboard states.
@@ -171,28 +172,28 @@ public:
* \param keys The state of all modifier keys (true == pressed).
* \return Indication of success.
*/
- virtual GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const;
+ GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const;
/**
* Returns the state of the mouse buttons (ouside the message queue).
* \param buttons The state of the buttons.
* \return Indication of success.
*/
- virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const;
+ GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const;
/**
* Returns unsinged char from CUT_BUFFER0
* \param selection Used by X11 only
* \return Returns the Clipboard
*/
- virtual GHOST_TUns8 *getClipboard(bool selection) const;
+ GHOST_TUns8 *getClipboard(bool selection) const;
/**
* Puts buffer to system clipboard
* \param selection Used by X11 only
* \return No return
*/
- virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
+ void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
/**
* Creates a drag'n'drop event and pushes it immediately onto the event queue.
@@ -204,13 +205,13 @@ public:
* \param window The window on which the event occurred
* \return Indication whether the event was handled.
*/
- static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_IWindow *window, int mouseX, int mouseY, void *data);
+ static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowWin32 *window, int mouseX, int mouseY, void *data);
/**
* Confirms quitting he program when there is just one window left open
* in the application
*/
- virtual int confirmQuit(GHOST_IWindow *window) const;
+ int confirmQuit(GHOST_IWindow *window) const;
protected:
/**
@@ -218,42 +219,31 @@ protected:
* For now, it just registers the window class (WNDCLASS).
* \return A success value.
*/
- virtual GHOST_TSuccess init();
+ GHOST_TSuccess init();
/**
* Closes the system down.
* \return A success value.
*/
- virtual GHOST_TSuccess exit();
+ GHOST_TSuccess exit();
/**
* Converts raw WIN32 key codes from the wndproc to GHOST keys.
- * \param window-> The window for this handling
* \param vKey The virtual key from hardKey
- * \param ScanCode The ScanCode of pressed key (simular to PS/2 Set 1)
+ * \param ScanCode The ScanCode of pressed key (similar to PS/2 Set 1)
* \param extend Flag if key is not primly (left or right)
* \return The GHOST key (GHOST_kKeyUnknown if no match).
*/
- virtual GHOST_TKey convertKey(GHOST_IWindow *window, short vKey, short ScanCode, short extend) const;
+ GHOST_TKey convertKey(short vKey, short ScanCode, short extend) const;
/**
* Catches raw WIN32 key codes from WM_INPUT in the wndproc.
- * \param window The window for this handling
* \param raw RawInput structure with detailed info about the key event
* \param keyDown Pointer flag that specify if a key is down
* \param vk Pointer to virtual key
* \return The GHOST key (GHOST_kKeyUnknown if no match).
*/
- virtual GHOST_TKey hardKey(GHOST_IWindow *window, RAWINPUT const& raw, int *keyDown, char *vk);
-
- /**
- * Creates modifier key event(s) and updates the key data stored locally (m_modifierKeys).
- * With the modifier keys, we want to distinguish left and right keys.
- * Sometimes this is not possible (Windows ME for instance). Then, we want
- * events generated for both keys.
- * \param window The window receiving the event (the active window).
- */
- GHOST_EventKey *processModifierKeys(GHOST_IWindow *window);
+ GHOST_TKey hardKey(RAWINPUT const& raw, int *keyDown, char *vk);
/**
* Creates mouse button event.
@@ -262,7 +252,7 @@ protected:
* \param mask The button mask of this event.
* \return The event created.
*/
- static GHOST_EventButton *processButtonEvent(GHOST_TEventType type, GHOST_IWindow *window, GHOST_TButtonMask mask);
+ static GHOST_EventButton *processButtonEvent(GHOST_TEventType type, GHOST_WindowWin32 *window, GHOST_TButtonMask mask);
/**
* Creates cursor event.
@@ -270,7 +260,7 @@ protected:
* \param window The window receiving the event (the active window).
* \return The event created.
*/
- static GHOST_EventCursor *processCursorEvent(GHOST_TEventType type, GHOST_IWindow *Iwindow);
+ static GHOST_EventCursor *processCursorEvent(GHOST_TEventType type, GHOST_WindowWin32 *window);
/**
* Creates a mouse wheel event.
@@ -278,7 +268,7 @@ protected:
* \param wParam The wParam from the wndproc
* \param lParam The lParam from the wndproc
*/
- static GHOST_EventWheel *processWheelEvent(GHOST_IWindow *window, WPARAM wParam, LPARAM lParam);
+ static GHOST_EventWheel *processWheelEvent(GHOST_WindowWin32 *window, WPARAM wParam, LPARAM lParam);
/**
* Creates a key event and updates the key data stored locally (m_modifierKeys).
@@ -287,16 +277,15 @@ protected:
* \param window The window receiving the event (the active window).
* \param raw RawInput structure with detailed info about the key event
*/
- static GHOST_EventKey *processKeyEvent(GHOST_IWindow *window, RAWINPUT const& raw);
+ static GHOST_EventKey *processKeyEvent(GHOST_WindowWin32 *window, RAWINPUT const& raw);
/**
* Process special keys (VK_OEM_*), to see if current key layout
* gives us anything special, like ! on french AZERTY.
- * \param window The window receiving the event (the active window).
* \param vKey The virtual key from hardKey
* \param ScanCode The ScanCode of pressed key (simular to PS/2 Set 1)
*/
- virtual GHOST_TKey processSpecialKey(GHOST_IWindow *window, short vKey, short scanCode) const;
+ GHOST_TKey processSpecialKey(short vKey, short scanCode) const;
/**
* Creates a window event.
@@ -304,7 +293,18 @@ protected:
* \param window The window receiving the event (the active window).
* \return The event created.
*/
- static GHOST_Event *processWindowEvent(GHOST_TEventType type, GHOST_IWindow *window);
+ static GHOST_Event *processWindowEvent(GHOST_TEventType type, GHOST_WindowWin32 *window);
+
+#ifdef WITH_INPUT_IME
+ /**
+ * Creates a IME event.
+ * \param type The type of event to create.
+ * \param window The window receiving the event (the active window).
+ * \param data IME data.
+ * \return The event created.
+ */
+ static GHOST_Event *processImeEvent(GHOST_TEventType type, GHOST_WindowWin32 *window, GHOST_TEventImeData *data);
+#endif // WITH_INPUT_IME
/**
* Handles minimum window size.
@@ -327,19 +327,19 @@ protected:
* Returns the local state of the modifier keys (from the message queue).
* \param keys The state of the keys.
*/
- inline virtual void retrieveModifierKeys(GHOST_ModifierKeys& keys) const;
+ inline void retrieveModifierKeys(GHOST_ModifierKeys& keys) const;
/**
* Stores the state of the modifier keys locally.
* For internal use only!
* param keys The new state of the modifier keys.
*/
- inline virtual void storeModifierKeys(const GHOST_ModifierKeys& keys);
+ inline void storeModifierKeys(const GHOST_ModifierKeys& keys);
/**
* Check current key layout for AltGr
*/
- inline virtual void handleKeyboardChange(void);
+ inline void handleKeyboardChange(void);
/**
* Windows call back routine for our window class.