diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/public/vgui/IInputInternal.h | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/public/vgui/IInputInternal.h')
| -rw-r--r-- | mp/src/public/vgui/IInputInternal.h | 172 |
1 files changed, 86 insertions, 86 deletions
diff --git a/mp/src/public/vgui/IInputInternal.h b/mp/src/public/vgui/IInputInternal.h index 2b86bd3b..a72eaa8d 100644 --- a/mp/src/public/vgui/IInputInternal.h +++ b/mp/src/public/vgui/IInputInternal.h @@ -1,86 +1,86 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//===========================================================================//
-
-#ifndef IINPUTINTERNAL_H
-#define IINPUTINTERNAL_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-#include <vgui/IInput.h>
-
-namespace vgui
-{
-
-enum MouseCodeState_t
-{
- BUTTON_RELEASED = 0,
- BUTTON_PRESSED,
- BUTTON_DOUBLECLICKED,
-};
-
-typedef int HInputContext;
-
-#define DEFAULT_INPUT_CONTEXT ((vgui::HInputContext)~0)
-
-class IInputInternal : public IInput
-{
-public:
- // processes input for a frame
- virtual void RunFrame() = 0;
-
- virtual void UpdateMouseFocus(int x, int y) = 0;
-
- // called when a panel becomes invalid
- virtual void PanelDeleted(VPANEL panel) = 0;
-
- // inputs into vgui input handling
- virtual bool InternalCursorMoved(int x,int y) = 0; //expects input in surface space
- virtual bool InternalMousePressed(MouseCode code) = 0;
- virtual bool InternalMouseDoublePressed(MouseCode code) = 0;
- virtual bool InternalMouseReleased(MouseCode code) = 0;
- virtual bool InternalMouseWheeled(int delta) = 0;
- virtual bool InternalKeyCodePressed(KeyCode code) = 0;
- virtual void InternalKeyCodeTyped(KeyCode code) = 0;
- virtual void InternalKeyTyped(wchar_t unichar) = 0;
- virtual bool InternalKeyCodeReleased(KeyCode code) = 0;
-
- // Creates/ destroys "input" contexts, which contains information
- // about which controls have mouse + key focus, for example.
- virtual HInputContext CreateInputContext() = 0;
- virtual void DestroyInputContext( HInputContext context ) = 0;
-
- // Associates a particular panel with an input context
- // Associating NULL is valid; it disconnects the panel from the context
- virtual void AssociatePanelWithInputContext( HInputContext context, VPANEL pRoot ) = 0;
-
- // Activates a particular input context, use DEFAULT_INPUT_CONTEXT
- // to get the one normally used by VGUI
- virtual void ActivateInputContext( HInputContext context ) = 0;
-
- // This method is called to post a cursor message to the current input context
- virtual void PostCursorMessage() = 0;
-
- // Cursor position; this is the current position read from the input queue.
- // We need to set it because client code may read this during Mouse Pressed
- // events, etc.
- virtual void UpdateCursorPosInternal( int x, int y ) = 0;
-
- // Called to handle explicit calls to CursorSetPos after input processing is complete
- virtual void HandleExplicitSetCursor( ) = 0;
-
- // Updates the internal key/mouse state associated with the current input context without sending messages
- virtual void SetKeyCodeState( KeyCode code, bool bPressed ) = 0;
- virtual void SetMouseCodeState( MouseCode code, MouseCodeState_t state ) = 0;
- virtual void UpdateButtonState( const InputEvent_t &event ) = 0;
-};
-
-} // namespace vgui
-
-#define VGUI_INPUTINTERNAL_INTERFACE_VERSION "VGUI_InputInternal001"
-
-#endif // IINPUTINTERNAL_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//===========================================================================// + +#ifndef IINPUTINTERNAL_H +#define IINPUTINTERNAL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui/IInput.h> + +namespace vgui +{ + +enum MouseCodeState_t +{ + BUTTON_RELEASED = 0, + BUTTON_PRESSED, + BUTTON_DOUBLECLICKED, +}; + +typedef int HInputContext; + +#define DEFAULT_INPUT_CONTEXT ((vgui::HInputContext)~0) + +class IInputInternal : public IInput +{ +public: + // processes input for a frame + virtual void RunFrame() = 0; + + virtual void UpdateMouseFocus(int x, int y) = 0; + + // called when a panel becomes invalid + virtual void PanelDeleted(VPANEL panel) = 0; + + // inputs into vgui input handling + virtual bool InternalCursorMoved(int x,int y) = 0; //expects input in surface space + virtual bool InternalMousePressed(MouseCode code) = 0; + virtual bool InternalMouseDoublePressed(MouseCode code) = 0; + virtual bool InternalMouseReleased(MouseCode code) = 0; + virtual bool InternalMouseWheeled(int delta) = 0; + virtual bool InternalKeyCodePressed(KeyCode code) = 0; + virtual void InternalKeyCodeTyped(KeyCode code) = 0; + virtual void InternalKeyTyped(wchar_t unichar) = 0; + virtual bool InternalKeyCodeReleased(KeyCode code) = 0; + + // Creates/ destroys "input" contexts, which contains information + // about which controls have mouse + key focus, for example. + virtual HInputContext CreateInputContext() = 0; + virtual void DestroyInputContext( HInputContext context ) = 0; + + // Associates a particular panel with an input context + // Associating NULL is valid; it disconnects the panel from the context + virtual void AssociatePanelWithInputContext( HInputContext context, VPANEL pRoot ) = 0; + + // Activates a particular input context, use DEFAULT_INPUT_CONTEXT + // to get the one normally used by VGUI + virtual void ActivateInputContext( HInputContext context ) = 0; + + // This method is called to post a cursor message to the current input context + virtual void PostCursorMessage() = 0; + + // Cursor position; this is the current position read from the input queue. + // We need to set it because client code may read this during Mouse Pressed + // events, etc. + virtual void UpdateCursorPosInternal( int x, int y ) = 0; + + // Called to handle explicit calls to CursorSetPos after input processing is complete + virtual void HandleExplicitSetCursor( ) = 0; + + // Updates the internal key/mouse state associated with the current input context without sending messages + virtual void SetKeyCodeState( KeyCode code, bool bPressed ) = 0; + virtual void SetMouseCodeState( MouseCode code, MouseCodeState_t state ) = 0; + virtual void UpdateButtonState( const InputEvent_t &event ) = 0; +}; + +} // namespace vgui + +#define VGUI_INPUTINTERNAL_INTERFACE_VERSION "VGUI_InputInternal001" + +#endif // IINPUTINTERNAL_H |