Better HL support, HelloWorld running in software
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -30,8 +31,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
ApplicationEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -30,8 +31,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
RenderEvent ();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace lime {
|
||||
virtual void Flip () = 0;
|
||||
virtual void* GetContext () = 0;
|
||||
virtual double GetScale () = 0;
|
||||
virtual value Lock () = 0;
|
||||
virtual void* Lock (bool useCFFIValue) = 0;
|
||||
virtual void MakeCurrent () = 0;
|
||||
virtual void ReadPixels (ImageBuffer *buffer, Rectangle *rect) = 0;
|
||||
virtual const char* Type () = 0;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -28,8 +29,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
ClipboardEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -32,8 +33,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
SensorEvent ();
|
||||
|
||||
|
||||
47
project/include/system/ValuePointer.h
Normal file
47
project/include/system/ValuePointer.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef LIME_SYSTEM_VALUE_POINTER_H
|
||||
#define LIME_SYSTEM_VALUE_POINTER_H
|
||||
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFIPrime.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class ValuePointer {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
ValuePointer (vobj* handle);
|
||||
ValuePointer (vdynamic* handle);
|
||||
ValuePointer (vclosure* handle);
|
||||
ValuePointer (value handle);
|
||||
~ValuePointer ();
|
||||
|
||||
void* Call ();
|
||||
void* Call (void* arg0);
|
||||
void* Call (void* arg0, void* arg1);
|
||||
void* Call (void* arg0, void* arg1, void* arg2);
|
||||
void* Call (void* arg0, void* arg1, void* arg2, void* arg3);
|
||||
void* Call (void* arg0, void* arg1, void* arg2, void* arg3, void* arg4);
|
||||
void* Get () const;
|
||||
bool IsCFFIValue ();
|
||||
bool IsHLValue ();
|
||||
void Set (vobj* handle);
|
||||
void Set (value handle);
|
||||
|
||||
private:
|
||||
|
||||
gcroot cffiRoot;
|
||||
value* cffiValue;
|
||||
vobj* hlValue;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -29,8 +30,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
DropEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -36,8 +37,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
GamepadEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -39,8 +40,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
JoystickEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -33,8 +34,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
KeyEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -38,8 +39,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
MouseEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -35,8 +36,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
TextEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -38,8 +39,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
TouchEvent ();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <hl.h>
|
||||
#include <hx/CFFI.h>
|
||||
#include <system/ValuePointer.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -45,8 +46,8 @@ namespace lime {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
static ValuePointer* callback;
|
||||
static ValuePointer* eventObject;
|
||||
|
||||
WindowEvent ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user