PageRenderTime 61ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llwindow/llwindowheadless.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 117 lines | 76 code | 13 blank | 28 comment | 0 complexity | 8330b7457e79c61c4420a5ef8d3ec89a MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llwindowheadless.h
  3. * @brief Headless definition of LLWindow class
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_LLWINDOWHEADLESS_H
  27. #define LL_LLWINDOWHEADLESS_H
  28. #include "llwindow.h"
  29. class LLWindowHeadless : public LLWindow
  30. {
  31. public:
  32. /*virtual*/ void show() {};
  33. /*virtual*/ void hide() {};
  34. /*virtual*/ void close() {};
  35. /*virtual*/ BOOL getVisible() {return FALSE;};
  36. /*virtual*/ BOOL getMinimized() {return FALSE;};
  37. /*virtual*/ BOOL getMaximized() {return FALSE;};
  38. /*virtual*/ BOOL maximize() {return FALSE;};
  39. /*virtual*/ void minimize() {};
  40. /*virtual*/ void restore() {};
  41. /*virtual*/ BOOL getFullscreen() {return FALSE;};
  42. /*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
  43. /*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
  44. /*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
  45. /*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
  46. /*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
  47. /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
  48. /*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
  49. /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
  50. /*virtual*/ void showCursor() {};
  51. /*virtual*/ void hideCursor() {};
  52. /*virtual*/ void showCursorFromMouseMove() {};
  53. /*virtual*/ void hideCursorUntilMouseMove() {};
  54. /*virtual*/ BOOL isCursorHidden() {return FALSE;};
  55. /*virtual*/ void updateCursor() {};
  56. //virtual ECursorType getCursor() { return mCurrentCursor; };
  57. /*virtual*/ void captureMouse() {};
  58. /*virtual*/ void releaseMouse() {};
  59. /*virtual*/ void setMouseClipping( BOOL b ) {};
  60. /*virtual*/ BOOL isClipboardTextAvailable() {return FALSE; };
  61. /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
  62. /*virtual*/ BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
  63. /*virtual*/ void flashIcon(F32 seconds) {};
  64. /*virtual*/ F32 getGamma() {return 1.0f; };
  65. /*virtual*/ BOOL setGamma(const F32 gamma) {return FALSE; }; // Set the gamma
  66. /*virtual*/ void setFSAASamples(const U32 fsaa_samples) { }
  67. /*virtual*/ U32 getFSAASamples() { return 0; }
  68. /*virtual*/ BOOL restoreGamma() {return FALSE; }; // Restore original gamma table (before updating gamma)
  69. //virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
  70. /*virtual*/ void gatherInput() {};
  71. /*virtual*/ void delayInputProcessing() {};
  72. /*virtual*/ void swapBuffers();
  73. // handy coordinate space conversion routines
  74. /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
  75. /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
  76. /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
  77. /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
  78. /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
  79. /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
  80. /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
  81. /*virtual*/ F32 getNativeAspectRatio() { return 1.0f; };
  82. /*virtual*/ F32 getPixelAspectRatio() { return 1.0f; };
  83. /*virtual*/ void setNativeAspectRatio(F32 ratio) {}
  84. /*virtual*/ void *getPlatformWindow() { return 0; };
  85. /*virtual*/ void bringToFront() {};
  86. LLWindowHeadless(LLWindowCallbacks* callbacks,
  87. const std::string& title, const std::string& name,
  88. S32 x, S32 y,
  89. S32 width, S32 height,
  90. U32 flags, BOOL fullscreen, BOOL clear_background,
  91. BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
  92. virtual ~LLWindowHeadless();
  93. private:
  94. };
  95. class LLSplashScreenHeadless : public LLSplashScreen
  96. {
  97. public:
  98. LLSplashScreenHeadless() {};
  99. virtual ~LLSplashScreenHeadless() {};
  100. /*virtual*/ void showImpl() {};
  101. /*virtual*/ void updateImpl(const std::string& mesg) {};
  102. /*virtual*/ void hideImpl() {};
  103. };
  104. #endif //LL_LLWINDOWHEADLESS_H