mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0032433: Visualization, TKService - introduce Wasm_Window implementing Aspect_Window interface using Emscripten SDK
Introduced Wasm_Window implementing Aspect_Window interface. Aspect_WindowInputListener has been extended by touch input callbacks (moved from AIS_ViewController), which now implements redirection of single taps to UpdateMouseClick(). AIS_ViewController::FetchNavigationKeys() now requests more frames even if Delta is zero, but navigation keys are pressed - indicated by a new flag AIS_WalkDelta::IsDefined(). Fixed missing implementation of Xw_Window::DisplayConnection() getter. The property has been moved to the base class Aspect_Window. Removed unused Aspect_Convert.hxx. DRAWEXE targeting Wasm: - added exposing of FS interface so that it is possible uploading/downloading files to/from emulated file system on JavaScript level; - added printer redirecting messages to Module.printMessage callback accepting message gravity; - Run_Appli() now skips std::cin when Module.noExitRuntime is set.
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
|
||||
#include <Xw_Window.hxx>
|
||||
|
||||
#include <Aspect_Convert.hxx>
|
||||
#include <Aspect_ScrollDelta.hxx>
|
||||
#include <Aspect_WindowDefinitionError.hxx>
|
||||
#include <Aspect_WindowInputListener.hxx>
|
||||
@@ -44,7 +43,6 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
|
||||
const Standard_Integer thePxWidth,
|
||||
const Standard_Integer thePxHeight)
|
||||
: Aspect_Window(),
|
||||
myDisplay (theXDisplay),
|
||||
myXWindow (0),
|
||||
myFBConfig (NULL),
|
||||
myXLeft (thePxLeft),
|
||||
@@ -53,6 +51,7 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
|
||||
myYBottom (thePxTop + thePxHeight),
|
||||
myIsOwnWin (Standard_True)
|
||||
{
|
||||
myDisplay = theXDisplay;
|
||||
if (thePxWidth <= 0 || thePxHeight <= 0)
|
||||
{
|
||||
throw Aspect_WindowDefinitionError("Xw_Window, Coordinate(s) out of range");
|
||||
@@ -129,7 +128,6 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
|
||||
const Aspect_Drawable theXWin,
|
||||
const Aspect_FBConfig theFBConfig)
|
||||
: Aspect_Window(),
|
||||
myDisplay (theXDisplay),
|
||||
myXWindow (theXWin),
|
||||
myFBConfig (theFBConfig),
|
||||
myXLeft (0),
|
||||
@@ -138,6 +136,7 @@ Xw_Window::Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
|
||||
myYBottom (512),
|
||||
myIsOwnWin (Standard_False)
|
||||
{
|
||||
myDisplay = theXDisplay;
|
||||
if (theXWin == 0)
|
||||
{
|
||||
throw Aspect_WindowDefinitionError("Xw_Window, given invalid X window");
|
||||
|
@@ -93,9 +93,6 @@ public:
|
||||
//! @return native Window handle
|
||||
Aspect_Drawable XWindow() const { return myXWindow; }
|
||||
|
||||
//! @return connection to X Display
|
||||
Standard_EXPORT const Handle(Aspect_DisplayConnection)& DisplayConnection() const;
|
||||
|
||||
//! @return native Window handle
|
||||
virtual Aspect_Drawable NativeHandle() const Standard_OVERRIDE
|
||||
{
|
||||
@@ -133,7 +130,6 @@ public:
|
||||
|
||||
protected:
|
||||
|
||||
Handle(Aspect_DisplayConnection) myDisplay; //!< X Display connection
|
||||
Aspect_Drawable myXWindow; //!< XLib window handle
|
||||
Aspect_FBConfig myFBConfig; //!< GLXFBConfig
|
||||
Standard_Integer myXLeft; //!< left position in pixels
|
||||
|
Reference in New Issue
Block a user