2
0
Michael Ragazzon 6 жил өмнө
parent
commit
b0ac9e598b

+ 0 - 1
Cmake/FileList.cmake

@@ -170,7 +170,6 @@ set(Core_PUB_HDR_FILES
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/PropertySpecification.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/PropertySpecification.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ReferenceCountable.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ReferenceCountable.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/RenderInterface.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/RenderInterface.h
-    ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/ScriptInterface.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Spritesheet.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Spritesheet.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Stream.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/Stream.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/StreamMemory.h
     ${PROJECT_SOURCE_DIR}/Include/RmlUi/Core/StreamMemory.h

+ 0 - 1
Include/RmlUi/Controls/DataFormatter.h

@@ -29,7 +29,6 @@
 #ifndef RMLUICONTROLSDATAFORMATTER_H
 #ifndef RMLUICONTROLSDATAFORMATTER_H
 #define RMLUICONTROLSDATAFORMATTER_H
 #define RMLUICONTROLSDATAFORMATTER_H
 
 
-#include "../Core/ScriptInterface.h"
 #include "../Core/String.h"
 #include "../Core/String.h"
 #include "Header.h"
 #include "Header.h"
 
 

+ 1 - 2
Include/RmlUi/Core/Context.h

@@ -35,7 +35,6 @@
 #include "ElementReference.h"
 #include "ElementReference.h"
 #include "Input.h"
 #include "Input.h"
 #include "String.h"
 #include "String.h"
-#include "ScriptInterface.h"
 #include "ViewState.h"
 #include "ViewState.h"
 
 
 namespace Rml {
 namespace Rml {
@@ -54,7 +53,7 @@ enum class EventId : uint16_t;
 	@author Peter Curry
 	@author Peter Curry
  */
  */
 
 
-class RMLUICORE_API Context : public ScriptInterface
+class RMLUICORE_API Context : public ReferenceCountable
 {
 {
 public:
 public:
 	/// Constructs a new, uninitialised context. This should not be called directly, use Core::CreateContext()
 	/// Constructs a new, uninitialised context. This should not be called directly, use Core::CreateContext()

+ 1 - 2
Include/RmlUi/Core/Element.h

@@ -30,7 +30,6 @@
 #define RMLUICOREELEMENT_H
 #define RMLUICOREELEMENT_H
 
 
 #include "ReferenceCountable.h"
 #include "ReferenceCountable.h"
-#include "ScriptInterface.h"
 #include "Header.h"
 #include "Header.h"
 #include "Box.h"
 #include "Box.h"
 #include "ComputedValues.h"
 #include "ComputedValues.h"
@@ -72,7 +71,7 @@ struct ElementMeta;
 	@author Peter Curry
 	@author Peter Curry
  */
  */
 
 
-class RMLUICORE_API Element : public ScriptInterface
+class RMLUICORE_API Element : public ReferenceCountable
 {
 {
 public:
 public:
 	/// Constructs a new RmlUi element. This should not be called directly; use the Factory
 	/// Constructs a new RmlUi element. This should not be called directly; use the Factory

+ 2 - 2
Include/RmlUi/Core/Event.h

@@ -31,7 +31,7 @@
 
 
 #include "Header.h"
 #include "Header.h"
 #include "Dictionary.h"
 #include "Dictionary.h"
-#include "ScriptInterface.h"
+#include "ReferenceCountable.h"
 #include "ID.h"
 #include "ID.h"
 
 
 namespace Rml {
 namespace Rml {
@@ -51,7 +51,7 @@ enum class DefaultActionPhase { None, Target = (int)EventPhase::Target, Bubble =
 	@author Lloyd Weehuizen
 	@author Lloyd Weehuizen
  */
  */
 
 
-class RMLUICORE_API Event : public ScriptInterface
+class RMLUICORE_API Event : public ReferenceCountable
 {
 {
 public:
 public:
 	/// Constructor
 	/// Constructor

+ 0 - 60
Include/RmlUi/Core/ScriptInterface.h

@@ -1,60 +0,0 @@
-/*
- * This source file is part of RmlUi, the HTML/CSS Interface Middleware
- *
- * For the latest information, see http://github.com/mikke89/RmlUi
- *
- * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
- * Copyright (c) 2019 The RmlUi Team, and contributors
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- */
-
-#ifndef RMLUICORESCRIPTINTERFACE_H
-#define RMLUICORESCRIPTINTERFACE_H
-
-#include "Header.h"
-#include "ReferenceCountable.h"
-#include "Types.h"
-
-namespace Rml {
-namespace Core {
-
-/**
-	Base class for all objects that hold a scriptable object.
-	@author Peter Curry
- */
-
-class RMLUICORE_API ScriptInterface : public ReferenceCountable
-{
-	public:
-		virtual ~ScriptInterface()
-		{
-		}
-
-		virtual ScriptObject GetScriptObject() const
-		{
-			return NULL;
-		}
-};
-
-}
-}
-
-#endif

+ 0 - 3
Include/RmlUi/Core/TypeConverter.inl

@@ -117,9 +117,6 @@ PASS_THROUGH(Colourb);
 PASS_THROUGH(String);
 PASS_THROUGH(String);
 
 
 // Pointer types need to be typedef'd
 // Pointer types need to be typedef'd
-class ScriptInterface;
-typedef ScriptInterface* ScriptInterfacePtr;
-PASS_THROUGH(ScriptInterfacePtr);
 typedef void* voidPtr;
 typedef void* voidPtr;
 PASS_THROUGH(voidPtr);
 PASS_THROUGH(voidPtr);
 
 

+ 0 - 2
Include/RmlUi/Core/Variant.h

@@ -64,7 +64,6 @@ public:
 		VECTOR4 = '4',
 		VECTOR4 = '4',
 		COLOURF = 'g',
 		COLOURF = 'g',
 		COLOURB = 'h',
 		COLOURB = 'h',
-		SCRIPTINTERFACE = 'p',
 		TRANSFORMREF = 't',
 		TRANSFORMREF = 't',
 		TRANSITIONLIST = 'T',
 		TRANSITIONLIST = 'T',
 		ANIMATIONLIST = 'A',
 		ANIMATIONLIST = 'A',
@@ -133,7 +132,6 @@ private:
 	void Set(const Vector4f& value);
 	void Set(const Vector4f& value);
 	void Set(const Colourf& value);
 	void Set(const Colourf& value);
 	void Set(const Colourb& value);
 	void Set(const Colourb& value);
-	void Set(ScriptInterface* value);
 
 
 	void Set(const String& value);
 	void Set(const String& value);
 	void Set(String&& value);
 	void Set(String&& value);

+ 0 - 4
Include/RmlUi/Core/Variant.inl

@@ -98,10 +98,6 @@ bool Variant::GetInto(T& value) const
 		return TypeConverter< Colourb, T >::Convert(*(Colourb*)data, value);
 		return TypeConverter< Colourb, T >::Convert(*(Colourb*)data, value);
 		break;
 		break;
 
 
-	case SCRIPTINTERFACE:
-		return TypeConverter< ScriptInterface*, T >::Convert(*(ScriptInterface * *)data, value);
-		break;
-
 	case VOIDPTR:
 	case VOIDPTR:
 		return TypeConverter< void*, T >::Convert(*(void**)data, value);
 		return TypeConverter< void*, T >::Convert(*(void**)data, value);
 		break;
 		break;

+ 1 - 0
Source/Controls/DataFormatter.cpp

@@ -26,6 +26,7 @@
  *
  *
  */
  */
 
 
+#include "../../Include/RmlUi/Core/Types.h"
 #include "../../Include/RmlUi/Controls/DataFormatter.h"
 #include "../../Include/RmlUi/Controls/DataFormatter.h"
 
 
 namespace Rml {
 namespace Rml {

+ 0 - 9
Source/Core/Variant.cpp

@@ -263,13 +263,6 @@ void Variant::Set(const Colourb& value)
 	SET_VARIANT(Colourb);
 	SET_VARIANT(Colourb);
 }
 }
 
 
-void Variant::Set(ScriptInterface* value)
-{
-	type = SCRIPTINTERFACE;
-	memcpy(data, &value, sizeof(ScriptInterface*));
-}
-
-
 void Variant::Set(const String& value)
 void Variant::Set(const String& value)
 {
 {
 	if (type == STRING)
 	if (type == STRING)
@@ -467,8 +460,6 @@ bool Variant::operator==(const Variant & other) const
 		return DEFAULT_VARIANT_COMPARE(Colourf);
 		return DEFAULT_VARIANT_COMPARE(Colourf);
 	case COLOURB:
 	case COLOURB:
 		return DEFAULT_VARIANT_COMPARE(Colourb);
 		return DEFAULT_VARIANT_COMPARE(Colourb);
-	case SCRIPTINTERFACE:
-		return DEFAULT_VARIANT_COMPARE(ScriptInterface*);
 	case VOIDPTR:
 	case VOIDPTR:
 		return DEFAULT_VARIANT_COMPARE(void*);
 		return DEFAULT_VARIANT_COMPARE(void*);
 	case TRANSFORMREF:
 	case TRANSFORMREF: