llmediaimplllmozlib.h

Go to the documentation of this file.
00001 
00032 #ifndef LLMEDIAIMPLLLMOZLIB_H
00033 #define LLMEDIAIMPLLLMOZLIB_H
00034 
00035 #include "llmediaimplcommon.h"
00036 #include "llmediaimplfactory.h"
00037 
00038 #if LL_LLMOZLIB_ENABLED
00039 
00040 #include "llmozlib2.h"
00041 
00042 class LLMediaManagerData;
00043 
00044 class LLMediaImplLLMozLib :
00045         public LLMediaImplCommon,
00046                 public LLEmbeddedBrowserWindowObserver
00047 {
00048         public:
00049                 LLMediaImplLLMozLib();
00050 
00051                 static bool startup( LLMediaManagerData* init_data );
00052                 static bool closedown();
00053 
00054                 /* virtual */ bool init();
00055                 /* virtual */ std::string getVersion();
00056                 /* virtual */ bool set404RedirectUrl( std::string redirect_url );
00057                 /* virtual */ bool clr404RedirectUrl();
00058                 /* virtual */ bool setBackgroundColor( unsigned int red, unsigned int green, unsigned int blue ) const;
00059                 /* virtual */ bool setCaretColor( unsigned int red, unsigned int green, unsigned int blue ) const;
00060                 /* virtual */ bool navigateTo( const std::string url );
00061                 /* virtual */ bool updateMedia();
00062                 /* virtual */ unsigned char* getMediaData();
00063                 /* virtual */ int getMediaDataWidth() const;
00064                 /* virtual */ int getMediaDataHeight() const;
00065                 /* virtual */ bool setRequestedMediaSize(int width, int height);
00066         /* virtual */ bool setAutoScaled( bool auto_scaled );
00067                 /* virtual */ int getTextureFormatPrimary() const;
00068                 /* virtual */ int getTextureFormatType() const;
00069                 /* virtual */ bool mouseDown( int x_pos, int y_pos );
00070                 /* virtual */ bool mouseUp( int x_pos, int y_pos );
00071                 /* virtual */ bool mouseMove( int x_pos, int y_pos );
00072                 /* virtual */ bool keyPress( int key_code );
00073                 /* virtual */ bool scrollByLines( int lines );
00074                 /* virtual */ bool focus( bool focus );
00075                 /* virtual */ bool unicodeInput( unsigned long uni_char );
00076                 /* virtual */ bool mouseLeftDoubleClick( int x_pos, int y_pos );
00077                 /* virtual */ bool navigateForward();
00078                 /* virtual */ bool navigateBack();
00079                 /* virtual */ bool canNavigateForward();
00080                 /* virtual */ bool canNavigateBack();
00081                 /* virtual */ bool enableCookies(bool enable);
00082                 /* virtual */ bool enableProxy(bool enable, std::string proxy_host_name, int proxy_port);
00083                 /* virtual */ bool clearCache();
00084                 /* virtual */ bool clearCookies();
00085                 /* virtual */ bool reset();
00086 
00087                 // LLMozLib observerables
00088                 virtual void onNavigateBegin( const EventType& eventIn );
00089                 virtual void onNavigateComplete( const EventType& eventIn );
00090                 virtual void onUpdateProgress( const EventType& eventIn );
00091                 virtual void onPageChanged( const EventType& eventIn );
00092                 virtual void onStatusTextChange( const EventType& eventIn );
00093                 virtual void onLocationChange( const EventType& eventIn );
00094                 virtual void onClickLinkHref( const EventType& eventIn );
00095                 virtual void onClickLinkNoFollow( const EventType& eventIn );
00096 
00097         private:
00098                 bool recomputeSizes();
00099                 int mWindowId;
00100                 int mBrowserWindowWidth;
00101                 int mBrowserWindowHeight;
00102                 int mMediaDataWidth;
00103                 int mMediaDataHeight;
00104                 bool mNeedsUpdate;
00105                 bool updateState();
00106 };
00107 
00108 // The maker class
00109 class LLMediaImplLLMozLibMaker : public LLMediaImplMaker
00110 {
00111         public:
00112                 LLMediaImplLLMozLibMaker();
00113                 LLMediaImplLLMozLib* create()
00114                 {
00115                         return new LLMediaImplLLMozLib();
00116                 }
00117 };
00118 #endif  // LL_LLMOZLIB_ENABLED
00119 
00120 #endif  // LLMEDIAIMPLLLMOZLIB_H

Generated on Fri May 16 08:32:21 2008 for SecondLife by  doxygen 1.5.5