PageRenderTime 39ms CodeModel.GetById 1ms app.highlight 31ms RepoModel.GetById 1ms 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
  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
 27#ifndef LL_LLWINDOWHEADLESS_H
 28#define LL_LLWINDOWHEADLESS_H
 29
 30#include "llwindow.h"
 31
 32class LLWindowHeadless : public LLWindow
 33{
 34public:
 35	/*virtual*/ void show() {};
 36	/*virtual*/ void hide() {};
 37	/*virtual*/ void close() {};
 38	/*virtual*/ BOOL getVisible() {return FALSE;};
 39	/*virtual*/ BOOL getMinimized() {return FALSE;};
 40	/*virtual*/ BOOL getMaximized() {return FALSE;};
 41	/*virtual*/ BOOL maximize() {return FALSE;};
 42	/*virtual*/ void minimize() {};
 43	/*virtual*/ void restore() {};
 44	/*virtual*/ BOOL getFullscreen() {return FALSE;};
 45	/*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
 46	/*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
 47	/*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
 48	/*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
 49	/*virtual*/ BOOL setSizeImpl(LLCoordScreen size) {return FALSE;};
 50	/*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
 51	/*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
 52	/*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
 53	/*virtual*/ void showCursor() {};
 54	/*virtual*/ void hideCursor() {};
 55	/*virtual*/ void showCursorFromMouseMove() {};
 56	/*virtual*/ void hideCursorUntilMouseMove() {};
 57	/*virtual*/ BOOL isCursorHidden() {return FALSE;};
 58	/*virtual*/ void updateCursor() {};
 59	//virtual ECursorType getCursor() { return mCurrentCursor; };
 60	/*virtual*/ void captureMouse() {};
 61	/*virtual*/ void releaseMouse() {};
 62	/*virtual*/ void setMouseClipping( BOOL b ) {};
 63	/*virtual*/ BOOL isClipboardTextAvailable() {return FALSE; };
 64	/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
 65	/*virtual*/ BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
 66	/*virtual*/ void flashIcon(F32 seconds) {};
 67	/*virtual*/ F32 getGamma() {return 1.0f; };
 68	/*virtual*/ BOOL setGamma(const F32 gamma) {return FALSE; }; // Set the gamma
 69	/*virtual*/ void setFSAASamples(const U32 fsaa_samples) { }
 70	/*virtual*/ U32 getFSAASamples() { return 0; }
 71	/*virtual*/ BOOL restoreGamma() {return FALSE; };	// Restore original gamma table (before updating gamma)
 72	//virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
 73	/*virtual*/ void gatherInput() {};
 74	/*virtual*/ void delayInputProcessing() {};
 75	/*virtual*/ void swapBuffers();
 76
 77	// handy coordinate space conversion routines
 78	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
 79	/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
 80	/*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
 81	/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
 82	/*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
 83	/*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
 84
 85	/*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
 86	/*virtual*/ F32	getNativeAspectRatio() { return 1.0f; };
 87	/*virtual*/ F32 getPixelAspectRatio() { return 1.0f; };
 88	/*virtual*/ void setNativeAspectRatio(F32 ratio) {}
 89
 90	/*virtual*/ void *getPlatformWindow() { return 0; };
 91	/*virtual*/ void bringToFront() {};
 92	
 93	LLWindowHeadless(LLWindowCallbacks* callbacks,
 94		const std::string& title, const std::string& name,
 95		S32 x, S32 y, 
 96		S32 width, S32 height,
 97		U32 flags,  BOOL fullscreen, BOOL clear_background,
 98		BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
 99	virtual ~LLWindowHeadless();
100
101private:
102};
103
104class LLSplashScreenHeadless : public LLSplashScreen
105{
106public:
107	LLSplashScreenHeadless() {};
108	virtual ~LLSplashScreenHeadless() {};
109
110	/*virtual*/ void showImpl() {};
111	/*virtual*/ void updateImpl(const std::string& mesg) {};
112	/*virtual*/ void hideImpl() {};
113
114};
115
116#endif //LL_LLWINDOWHEADLESS_H
117