aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmedia/llmediaimplllmozlib.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/llmedia/llmediaimplllmozlib.h
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to '')
-rw-r--r--linden/indra/llmedia/llmediaimplllmozlib.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/linden/indra/llmedia/llmediaimplllmozlib.h b/linden/indra/llmedia/llmediaimplllmozlib.h
new file mode 100644
index 0000000..fc5d4e5
--- /dev/null
+++ b/linden/indra/llmedia/llmediaimplllmozlib.h
@@ -0,0 +1,120 @@
1/**
2 * @file llmediaimplllmozlib.cpp
3 * @brief Example 2 of a media impl concrete class
4 *
5 * $LicenseInfo:firstyear=2007&license=viewergpl$
6 *
7 * Copyright (c) 2007-2008, Linden Research, Inc.
8 *
9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab
11 * to you under the terms of the GNU General Public License, version 2.0
12 * ("GPL"), unless you have obtained a separate licensing agreement
13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16 *
17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 *
22 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above,
24 * and agree to abide by those obligations.
25 *
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
30 */
31
32#ifndef LLMEDIAIMPLLLMOZLIB_H
33#define LLMEDIAIMPLLLMOZLIB_H
34
35#include "llmediaimplcommon.h"
36#include "llmediaimplfactory.h"
37
38#if LL_LLMOZLIB_ENABLED
39
40#include "llmozlib2.h"
41
42class LLMediaManagerData;
43
44class LLMediaImplLLMozLib :
45 public LLMediaImplCommon,
46 public LLEmbeddedBrowserWindowObserver
47{
48 public:
49 LLMediaImplLLMozLib();
50
51 static bool startup( LLMediaManagerData* init_data );
52 static bool closedown();
53
54 /* virtual */ bool init();
55 /* virtual */ std::string getVersion();
56 /* virtual */ bool set404RedirectUrl( std::string redirect_url );
57 /* virtual */ bool clr404RedirectUrl();
58 /* virtual */ bool setBackgroundColor( unsigned int red, unsigned int green, unsigned int blue ) const;
59 /* virtual */ bool setCaretColor( unsigned int red, unsigned int green, unsigned int blue ) const;
60 /* virtual */ bool navigateTo( const std::string url );
61 /* virtual */ bool updateMedia();
62 /* virtual */ unsigned char* getMediaData();
63 /* virtual */ int getMediaDataWidth() const;
64 /* virtual */ int getMediaDataHeight() const;
65 /* virtual */ bool setRequestedMediaSize(int width, int height);
66 /* virtual */ bool setAutoScaled( bool auto_scaled );
67 /* virtual */ int getTextureFormatPrimary() const;
68 /* virtual */ int getTextureFormatType() const;
69 /* virtual */ bool mouseDown( int x_pos, int y_pos );
70 /* virtual */ bool mouseUp( int x_pos, int y_pos );
71 /* virtual */ bool mouseMove( int x_pos, int y_pos );
72 /* virtual */ bool keyPress( int key_code );
73 /* virtual */ bool scrollByLines( int lines );
74 /* virtual */ bool focus( bool focus );
75 /* virtual */ bool unicodeInput( unsigned long uni_char );
76 /* virtual */ bool mouseLeftDoubleClick( int x_pos, int y_pos );
77 /* virtual */ bool navigateForward();
78 /* virtual */ bool navigateBack();
79 /* virtual */ bool canNavigateForward();
80 /* virtual */ bool canNavigateBack();
81 /* virtual */ bool enableCookies(bool enable);
82 /* virtual */ bool enableProxy(bool enable, std::string proxy_host_name, int proxy_port);
83 /* virtual */ bool clearCache();
84 /* virtual */ bool clearCookies();
85 /* virtual */ bool reset();
86
87 // LLMozLib observerables
88 virtual void onNavigateBegin( const EventType& eventIn );
89 virtual void onNavigateComplete( const EventType& eventIn );
90 virtual void onUpdateProgress( const EventType& eventIn );
91 virtual void onPageChanged( const EventType& eventIn );
92 virtual void onStatusTextChange( const EventType& eventIn );
93 virtual void onLocationChange( const EventType& eventIn );
94 virtual void onClickLinkHref( const EventType& eventIn );
95 virtual void onClickLinkNoFollow( const EventType& eventIn );
96
97 private:
98 bool recomputeSizes();
99 int mWindowId;
100 int mBrowserWindowWidth;
101 int mBrowserWindowHeight;
102 int mMediaDataWidth;
103 int mMediaDataHeight;
104 bool mNeedsUpdate;
105 bool updateState();
106};
107
108// The maker class
109class LLMediaImplLLMozLibMaker : public LLMediaImplMaker
110{
111 public:
112 LLMediaImplLLMozLibMaker();
113 LLMediaImplLLMozLib* create()
114 {
115 return new LLMediaImplLLMozLib();
116 }
117};
118#endif // LL_LLMOZLIB_ENABLED
119
120#endif // LLMEDIAIMPLLLMOZLIB_H