Initial support for text input/edit events
This commit is contained in:
41
project/include/ui/TextEvent.h
Normal file
41
project/include/ui/TextEvent.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef LIME_UI_TEXT_EVENT_H
|
||||
#define LIME_UI_TEXT_EVENT_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
enum TextEventType {
|
||||
|
||||
TEXT_INPUT,
|
||||
TEXT_EDIT
|
||||
|
||||
};
|
||||
|
||||
|
||||
class TextEvent {
|
||||
|
||||
public:
|
||||
|
||||
static AutoGCRoot* callback;
|
||||
static AutoGCRoot* eventObject;
|
||||
|
||||
TextEvent ();
|
||||
|
||||
static void Dispatch (TextEvent* event);
|
||||
|
||||
long length;
|
||||
long start;
|
||||
char text[32];
|
||||
TextEventType type;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -19,12 +19,14 @@ namespace lime {
|
||||
public:
|
||||
|
||||
virtual void Close () = 0;
|
||||
virtual bool GetEnableTextEvents () = 0;
|
||||
virtual int GetHeight () = 0;
|
||||
virtual int GetWidth () = 0;
|
||||
virtual int GetX () = 0;
|
||||
virtual int GetY () = 0;
|
||||
virtual void Move (int x, int y) = 0;
|
||||
virtual void Resize (int width, int height) = 0;
|
||||
virtual void SetEnableTextEvents (bool enable) = 0;
|
||||
virtual bool SetFullscreen (bool fullscreen) = 0;
|
||||
virtual void SetIcon (ImageBuffer *imageBuffer) = 0;
|
||||
virtual bool SetMinimized (bool minimized) = 0;
|
||||
|
||||
Reference in New Issue
Block a user