00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #if defined( _WIN32 ) || defined( __WIN32__ )
00024 #if !defined( RemoteVizServices_EXPORTS )
00025 #if _DEBUG
00026 #pragma comment(lib,"RemoteVizServicesD")
00027 #else
00028 #pragma comment(lib,"RemoteVizServices")
00029 #endif
00030 #endif
00031 #endif
00032
00033 #include <Inventor/sys/port.h>
00034
00035 #include <string>
00036
00037 #include <Inventor/events/SoKeyboardEvent.h>
00038 #include <Inventor/events/SoMouseButtonEvent.h>
00039
00040 class SbRasterImage;
00041
00042 namespace RemoteViz
00043 {
00044 namespace Rendering
00045 {
00046
00047 class Connection;
00048
00049 class RenderArea;
00050
00051 class FrameEncoders;
00052
00063 class RENDERSERVICE_API RenderAreaListener
00064 {
00065 public:
00069 virtual ~RenderAreaListener();
00085 virtual void onOpenedConnection(RenderArea* renderArea, Connection *connection, FrameEncoders* frameEncoders);
00095 virtual void onInitializedConnection(RenderArea* renderArea, Connection *sender, FrameEncoders* frameEncoders);
00107 virtual void onClosedConnection(RenderArea* renderArea, const std::string& connectionId, bool aborted);
00119 virtual void onReceivedMessage(RenderArea* renderArea, Connection* sender, const std::string& message);
00139 virtual bool onPreRender(RenderArea* renderArea, bool &clearWindow, bool &clearZbuffer);
00150 virtual void onPostRender(RenderArea* renderArea);
00162 virtual void onResize(RenderArea* renderArea, unsigned int width, unsigned int height);
00179 virtual void onRequestedSize(RenderArea* renderArea, Connection *sender, unsigned int width, unsigned int height);
00194 virtual void onRefusedEncoder(RenderArea* renderArea, Connection *sender, FrameEncoders* encoders);
00196
00215 virtual bool onMouseUp(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00236 virtual bool onMouseDown(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00256 virtual bool onMouseDoubleClick(RenderArea* renderArea, Connection *sender, int x, int y, SoMouseButtonEvent::Button button);
00275 virtual bool onMouseMove(RenderArea* renderArea, Connection *sender, int x, int y);
00294 virtual bool onMouseEnter(RenderArea* renderArea, Connection *sender, int x, int y);
00313 virtual bool onMouseLeave(RenderArea* renderArea, Connection *sender, int x, int y);
00334 virtual bool onMouseWheel(RenderArea* renderArea, Connection *sender, int x, int y, int delta);
00355 virtual bool onKeyUp(RenderArea* renderArea, Connection *sender, int x, int y, const SoKeyboardEvent::Key& key);
00376 virtual bool onKeyDown(RenderArea* renderArea, Connection *sender, int x, int y, const SoKeyboardEvent::Key& key);
00397 virtual bool onTouchStart(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00418 virtual bool onTouchMove(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00439 virtual bool onTouchEnd(RenderArea* renderArea, Connection *sender, unsigned int id, int x, int y);
00441
00461 virtual void onRequestedFrame(RenderArea* renderArea, Connection* sender, SbRasterImage* rasterImage, bool& isInteractive);
00462
00477 virtual void onSendingFrame(RenderArea* renderArea, Connection* sender, size_t frameId, size_t dataSize, std::string& message);
00478
00479 };
00480
00481
00482 }
00483 }
00484