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 /sp/src/public/VGuiMatSurface | |
| 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 'sp/src/public/VGuiMatSurface')
| -rw-r--r-- | sp/src/public/VGuiMatSurface/IMatSystemSurface.h | 224 | ||||
| -rw-r--r-- | sp/src/public/VGuiMatSurface/IMatSystemSurfaceV5.h | 176 |
2 files changed, 200 insertions, 200 deletions
diff --git a/sp/src/public/VGuiMatSurface/IMatSystemSurface.h b/sp/src/public/VGuiMatSurface/IMatSystemSurface.h index 604fa76e..ddc73e69 100644 --- a/sp/src/public/VGuiMatSurface/IMatSystemSurface.h +++ b/sp/src/public/VGuiMatSurface/IMatSystemSurface.h @@ -1,112 +1,112 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose: An extra interface implemented by the material system
-// implementation of vgui::ISurface
-//
-// $Revision: $
-// $NoKeywords: $
-//===========================================================================//
-
-#ifndef IMATSYSTEMSURFACE_H
-#define IMATSYSTEMSURFACE_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#include <vgui/VGUI.h>
-#include "vgui/ISurface.h"
-
-
-//-----------------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------------
-class VMatrix;
-class IMaterial;
-struct InputEvent_t;
-
-
-//-----------------------------------------------------------------------------
-// Callbacks for mouse getting + setting
-//-----------------------------------------------------------------------------
-typedef void (*GetMouseCallback_t)(int &x, int &y);
-typedef void (*SetMouseCallback_t)(int x, int y);
-
-//-----------------------------------------------------------------------------
-// Callbacks for sound playing
-//-----------------------------------------------------------------------------
-typedef void (*PlaySoundFunc_t)(const char *pFileName);
-
-
-//-----------------------------------------------------------------------------
-//
-// An extra interface implemented by the material system implementation of vgui::ISurface
-//
-//-----------------------------------------------------------------------------
-#define MAT_SYSTEM_SURFACE_INTERFACE_VERSION "MatSystemSurface008"
-class IMatSystemSurface : public vgui::ISurface
-{
-public:
- // Hook needed to get input to work.
- // If the app drives the input (like the engine needs to do for VCR mode),
- // it can set bLetAppDriveInput to true and call HandleInputEvent for the input events.
- virtual void AttachToWindow( void *hwnd, bool bLetAppDriveInput=false ) = 0;
-
- // Tells the surface to ignore windows messages
- virtual void EnableWindowsMessages( bool bEnable ) = 0;
-
- // Starts, ends 3D painting
- // NOTE: These methods should only be called from within the paint()
- // method of a panel.
- virtual void Begin3DPaint( int iLeft, int iTop, int iRight, int iBottom, bool bRenderToTexture = true ) = 0;
- virtual void End3DPaint() = 0;
-
- // NOTE: This also should only be called from within the paint()
- // method of a panel. Use it to disable clipping for the rendering
- // of this panel.
- virtual void DisableClipping( bool bDisable ) = 0;
- virtual void GetClippingRect( int &left, int &top, int &right, int &bottom, bool &bClippingDisabled ) = 0; // <<<<< NOTE: output flag is *disabled* state, not enabled, to match the rest of the interface
- virtual void SetClippingRect( int left, int top, int right, int bottom ) = 0;
-
- // Prevents vgui from changing the cursor
- virtual bool IsCursorLocked() const = 0;
-
- // Sets the mouse get + set callbacks
- virtual void SetMouseCallbacks( GetMouseCallback_t getFunc, SetMouseCallback_t setFunc ) = 0;
-
- // Installs a function to play sounds
- virtual void InstallPlaySoundFunc( PlaySoundFunc_t soundFunc ) = 0;
-
- // Some drawing methods that cannot be accomplished under Win32
- virtual void DrawColoredCircle( int centerx, int centery, float radius, int r, int g, int b, int a ) = 0;
- virtual int DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
-
- // Draws text with current font at position and wordwrapped to the rect using color values specified
- virtual void DrawColoredTextRect( vgui::HFont font, int x, int y, int w, int h, int r, int g, int b, int a, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
- virtual void DrawTextHeight( vgui::HFont font, int w, int& h, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
-
- // Returns the length of the text string in pixels
- virtual int DrawTextLen( vgui::HFont font, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
-
- // Draws a panel in 3D space. Assumes view + projection are already set up
- // Also assumes the (x,y) coordinates of the panels are defined in 640xN coords
- // (N isn't necessary 480 because the panel may not be 4x3)
- // The width + height specified are the size of the panel in world coordinates
- virtual void DrawPanelIn3DSpace( vgui::VPANEL pRootPanel, const VMatrix &panelCenterToWorld, int nPixelWidth, int nPixelHeight, float flWorldWidth, float flWorldHeight ) = 0;
-
- // Binds a material to a surface texture ID
- virtual void DrawSetTextureMaterial( int id, IMaterial *pMaterial ) = 0;
-
- // Handles an input event, returns true if the event should be filtered from the rest of the game
- virtual bool HandleInputEvent( const InputEvent_t &event ) = 0;
-
- virtual void Set3DPaintTempRenderTarget( const char *pRenderTargetName ) = 0;
- virtual void Reset3DPaintTempRenderTarget( void ) = 0;
-
-// Gets a material bound to a surface texture ID
- virtual IMaterial *DrawGetTextureMaterial( int id ) = 0;
-};
-
-
-#endif // IMATSYSTEMSURFACE_H
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: An extra interface implemented by the material system +// implementation of vgui::ISurface +// +// $Revision: $ +// $NoKeywords: $ +//===========================================================================// + +#ifndef IMATSYSTEMSURFACE_H +#define IMATSYSTEMSURFACE_H +#ifdef _WIN32 +#pragma once +#endif + + +#include <vgui/VGUI.h> +#include "vgui/ISurface.h" + + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class VMatrix; +class IMaterial; +struct InputEvent_t; + + +//----------------------------------------------------------------------------- +// Callbacks for mouse getting + setting +//----------------------------------------------------------------------------- +typedef void (*GetMouseCallback_t)(int &x, int &y); +typedef void (*SetMouseCallback_t)(int x, int y); + +//----------------------------------------------------------------------------- +// Callbacks for sound playing +//----------------------------------------------------------------------------- +typedef void (*PlaySoundFunc_t)(const char *pFileName); + + +//----------------------------------------------------------------------------- +// +// An extra interface implemented by the material system implementation of vgui::ISurface +// +//----------------------------------------------------------------------------- +#define MAT_SYSTEM_SURFACE_INTERFACE_VERSION "MatSystemSurface008" +class IMatSystemSurface : public vgui::ISurface +{ +public: + // Hook needed to get input to work. + // If the app drives the input (like the engine needs to do for VCR mode), + // it can set bLetAppDriveInput to true and call HandleInputEvent for the input events. + virtual void AttachToWindow( void *hwnd, bool bLetAppDriveInput=false ) = 0; + + // Tells the surface to ignore windows messages + virtual void EnableWindowsMessages( bool bEnable ) = 0; + + // Starts, ends 3D painting + // NOTE: These methods should only be called from within the paint() + // method of a panel. + virtual void Begin3DPaint( int iLeft, int iTop, int iRight, int iBottom, bool bRenderToTexture = true ) = 0; + virtual void End3DPaint() = 0; + + // NOTE: This also should only be called from within the paint() + // method of a panel. Use it to disable clipping for the rendering + // of this panel. + virtual void DisableClipping( bool bDisable ) = 0; + virtual void GetClippingRect( int &left, int &top, int &right, int &bottom, bool &bClippingDisabled ) = 0; // <<<<< NOTE: output flag is *disabled* state, not enabled, to match the rest of the interface + virtual void SetClippingRect( int left, int top, int right, int bottom ) = 0; + + // Prevents vgui from changing the cursor + virtual bool IsCursorLocked() const = 0; + + // Sets the mouse get + set callbacks + virtual void SetMouseCallbacks( GetMouseCallback_t getFunc, SetMouseCallback_t setFunc ) = 0; + + // Installs a function to play sounds + virtual void InstallPlaySoundFunc( PlaySoundFunc_t soundFunc ) = 0; + + // Some drawing methods that cannot be accomplished under Win32 + virtual void DrawColoredCircle( int centerx, int centery, float radius, int r, int g, int b, int a ) = 0; + virtual int DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0; + + // Draws text with current font at position and wordwrapped to the rect using color values specified + virtual void DrawColoredTextRect( vgui::HFont font, int x, int y, int w, int h, int r, int g, int b, int a, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0; + virtual void DrawTextHeight( vgui::HFont font, int w, int& h, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0; + + // Returns the length of the text string in pixels + virtual int DrawTextLen( vgui::HFont font, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0; + + // Draws a panel in 3D space. Assumes view + projection are already set up + // Also assumes the (x,y) coordinates of the panels are defined in 640xN coords + // (N isn't necessary 480 because the panel may not be 4x3) + // The width + height specified are the size of the panel in world coordinates + virtual void DrawPanelIn3DSpace( vgui::VPANEL pRootPanel, const VMatrix &panelCenterToWorld, int nPixelWidth, int nPixelHeight, float flWorldWidth, float flWorldHeight ) = 0; + + // Binds a material to a surface texture ID + virtual void DrawSetTextureMaterial( int id, IMaterial *pMaterial ) = 0; + + // Handles an input event, returns true if the event should be filtered from the rest of the game + virtual bool HandleInputEvent( const InputEvent_t &event ) = 0; + + virtual void Set3DPaintTempRenderTarget( const char *pRenderTargetName ) = 0; + virtual void Reset3DPaintTempRenderTarget( void ) = 0; + +// Gets a material bound to a surface texture ID + virtual IMaterial *DrawGetTextureMaterial( int id ) = 0; +}; + + +#endif // IMATSYSTEMSURFACE_H + diff --git a/sp/src/public/VGuiMatSurface/IMatSystemSurfaceV5.h b/sp/src/public/VGuiMatSurface/IMatSystemSurfaceV5.h index b4a6d99d..3c4aa68c 100644 --- a/sp/src/public/VGuiMatSurface/IMatSystemSurfaceV5.h +++ b/sp/src/public/VGuiMatSurface/IMatSystemSurfaceV5.h @@ -1,88 +1,88 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================
-
-#ifndef IMATSYSTEMSURFACEV5_H
-#define IMATSYSTEMSURFACEV5_H
-#ifdef _WIN32
-#pragma once
-#endif
-
-
-#include <vgui/VGUI.h>
-#include "vgui/isurfacev30.h"
-
-
-namespace MatSystemSurfaceV5
-{
- #define MAT_SYSTEM_SURFACE_INTERFACE_VERSION_5 "MatSystemSurface005"
-
-
- class IMatSystemSurface : public SurfaceV30::ISurface
- {
- public:
- // Hook needed to get input to work.
- // If the app drives the input (like the engine needs to do for VCR mode),
- // it can set bLetAppDriveInput to true and call HandleWindowMessage for the Windows messages.
- virtual void AttachToWindow( void *hwnd, bool bLetAppDriveInput=false ) = 0;
-
- // If you specified true for bLetAppDriveInput, then call this for each window message that comes in.
- virtual void HandleWindowMessage( void *hwnd, unsigned int uMsg, unsigned int wParam, long lParam ) = 0;
-
- // Tells the surface to ignore windows messages
- virtual void EnableWindowsMessages( bool bEnable ) = 0;
-
- // Starts, ends 3D painting
- // NOTE: These methods should only be called from within the paint()
- // method of a panel.
- virtual void Begin3DPaint( int iLeft, int iTop, int iRight, int iBottom ) = 0;
- virtual void End3DPaint() = 0;
-
- // NOTE: This also should only be called from within the paint()
- // method of a panel. Use it to disable clipping for the rendering
- // of this panel.
- virtual void DisableClipping( bool bDisable ) = 0;
-
- // Prevents vgui from changing the cursor
- virtual bool IsCursorLocked() const = 0;
-
- // Sets the mouse get + set callbacks
- virtual void SetMouseCallbacks( GetMouseCallback_t getFunc, SetMouseCallback_t setFunc ) = 0;
-
- // Installs a function to play sounds
- virtual void InstallPlaySoundFunc( PlaySoundFunc_t soundFunc ) = 0;
-
- // Some drawing methods that cannot be accomplished under Win32
- virtual void DrawColoredCircle( int centerx, int centery, float radius, int r, int g, int b, int a ) = 0;
- virtual int DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, PRINTF_FORMAT_STRING char *fmt, ... ) = 0;
-
- // Draws text with current font at position and wordwrapped to the rect using color values specified
- virtual void DrawColoredTextRect( vgui::HFont font, int x, int y, int w, int h, int r, int g, int b, int a, PRINTF_FORMAT_STRING char *fmt, ... ) = 0;
- virtual void DrawTextHeight( vgui::HFont font, int w, int& h, PRINTF_FORMAT_STRING char *fmt, ... ) = 0;
-
- // Returns the length of the text string in pixels
- virtual int DrawTextLen( vgui::HFont font, PRINTF_FORMAT_STRING char *fmt, ... ) = 0;
-
- // Draws a panel in 3D space. Assumes view + projection are already set up
- // Also assumes the (x,y) coordinates of the panels are defined in 640xN coords
- // (N isn't necessary 480 because the panel may not be 4x3)
- // The width + height specified are the size of the panel in world coordinates
- virtual void DrawPanelIn3DSpace( vgui::VPANEL pRootPanel, const VMatrix &panelCenterToWorld, int nPixelWidth, int nPixelHeight, float flWorldWidth, float flWorldHeight ) = 0;
-
- // Binds a material to a surface texture ID
- virtual void DrawSetTextureMaterial( int id, IMaterial *pMaterial ) = 0;
- };
-
-}
-
-//-----------------------------------------------------------------------------
-// FIXME: This works around using scoped interfaces w/ EXPOSE_SINGLE_INTERFACE
-//-----------------------------------------------------------------------------
-class IMatSystemSurfaceV5 : public MatSystemSurfaceV5::IMatSystemSurface
-{
-public:
-};
-
-#endif // IMATSYSTEMSURFACEV5_H
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef IMATSYSTEMSURFACEV5_H +#define IMATSYSTEMSURFACEV5_H +#ifdef _WIN32 +#pragma once +#endif + + +#include <vgui/VGUI.h> +#include "vgui/isurfacev30.h" + + +namespace MatSystemSurfaceV5 +{ + #define MAT_SYSTEM_SURFACE_INTERFACE_VERSION_5 "MatSystemSurface005" + + + class IMatSystemSurface : public SurfaceV30::ISurface + { + public: + // Hook needed to get input to work. + // If the app drives the input (like the engine needs to do for VCR mode), + // it can set bLetAppDriveInput to true and call HandleWindowMessage for the Windows messages. + virtual void AttachToWindow( void *hwnd, bool bLetAppDriveInput=false ) = 0; + + // If you specified true for bLetAppDriveInput, then call this for each window message that comes in. + virtual void HandleWindowMessage( void *hwnd, unsigned int uMsg, unsigned int wParam, long lParam ) = 0; + + // Tells the surface to ignore windows messages + virtual void EnableWindowsMessages( bool bEnable ) = 0; + + // Starts, ends 3D painting + // NOTE: These methods should only be called from within the paint() + // method of a panel. + virtual void Begin3DPaint( int iLeft, int iTop, int iRight, int iBottom ) = 0; + virtual void End3DPaint() = 0; + + // NOTE: This also should only be called from within the paint() + // method of a panel. Use it to disable clipping for the rendering + // of this panel. + virtual void DisableClipping( bool bDisable ) = 0; + + // Prevents vgui from changing the cursor + virtual bool IsCursorLocked() const = 0; + + // Sets the mouse get + set callbacks + virtual void SetMouseCallbacks( GetMouseCallback_t getFunc, SetMouseCallback_t setFunc ) = 0; + + // Installs a function to play sounds + virtual void InstallPlaySoundFunc( PlaySoundFunc_t soundFunc ) = 0; + + // Some drawing methods that cannot be accomplished under Win32 + virtual void DrawColoredCircle( int centerx, int centery, float radius, int r, int g, int b, int a ) = 0; + virtual int DrawColoredText( vgui::HFont font, int x, int y, int r, int g, int b, int a, PRINTF_FORMAT_STRING char *fmt, ... ) = 0; + + // Draws text with current font at position and wordwrapped to the rect using color values specified + virtual void DrawColoredTextRect( vgui::HFont font, int x, int y, int w, int h, int r, int g, int b, int a, PRINTF_FORMAT_STRING char *fmt, ... ) = 0; + virtual void DrawTextHeight( vgui::HFont font, int w, int& h, PRINTF_FORMAT_STRING char *fmt, ... ) = 0; + + // Returns the length of the text string in pixels + virtual int DrawTextLen( vgui::HFont font, PRINTF_FORMAT_STRING char *fmt, ... ) = 0; + + // Draws a panel in 3D space. Assumes view + projection are already set up + // Also assumes the (x,y) coordinates of the panels are defined in 640xN coords + // (N isn't necessary 480 because the panel may not be 4x3) + // The width + height specified are the size of the panel in world coordinates + virtual void DrawPanelIn3DSpace( vgui::VPANEL pRootPanel, const VMatrix &panelCenterToWorld, int nPixelWidth, int nPixelHeight, float flWorldWidth, float flWorldHeight ) = 0; + + // Binds a material to a surface texture ID + virtual void DrawSetTextureMaterial( int id, IMaterial *pMaterial ) = 0; + }; + +} + +//----------------------------------------------------------------------------- +// FIXME: This works around using scoped interfaces w/ EXPOSE_SINGLE_INTERFACE +//----------------------------------------------------------------------------- +class IMatSystemSurfaceV5 : public MatSystemSurfaceV5::IMatSystemSurface +{ +public: +}; + +#endif // IMATSYSTEMSURFACEV5_H |