extern struct VirtualMachine* interpreterProxy;
extern void setIoProcessEventsHandler(void * handler);
static int inited = 0;
static int inputSemaphoreIndex = 0;
/**
��* Called by the VM heartbeat if installed, to check for the presence of events.
��*/
static void ioCheckForEvents() {
������ if (inited) {
�������������� SDL_PumpEvents();
������ ������ if (SDL_HasEvents(SDL_FIRSTEVENT, SDL_LASTEVENT)) {
������ ������ ������ interpreterProxy->signalSemaphoreWithIndex(inputSemaphoreIndex);
������ ������ }
������ }
}
void setSDL2InputSemaphoreIndex(int semaIndex) {
������ inited = 1;
������ inputSemaphoreIndex = semaIndex;
������ setIoProcessEventsHandler(&ioCheckForEvents);
}
/*sqWin32Window.c*/
/*Line 179*//**��* HACK: Hook for SDL2./*Line 1586 */�������������� /* HACK: for SDL2.*/
��*/
static void (*ioCheckForEventsHooks)(void);
EXPORT(void) setIoProcessEventsHandler(void * handler) {
������ ioCheckForEventsHooks = (void (*)())handler;
}
�������������� if(ioCheckForEventsHooks)
���������������������� ioCheckForEventsHooks();
Ronie,Throw the VM sources somewhere so that I can try this on CentOS. Glibc 2_15 issue...PhilOn Sat, May 31, 2014 at 5:12 PM, Laurent Laffont <laurent.laffont@gmail.com> wrote:Hi,
��
Seems to work well on my linux machine too (Arch 64). The main Pharo window is better handled by KDE (don't know why, but nice side effect :)
��
Laurent
��
Le samedi 31 mai 2014, 05:54:52 Ronie Salgado a ��crit :
> Hello There,
>
> I have been working in OSWindow, which is a cross platform API for dealing
> with native operating system windows. This API requires using a custom VM
> and the library SDL2.
>
> With this API, even the main Pharo window is handled almost completely in
> image side using NativeBoost.
>
> The only support required from the VM is a small periodical check in the
> heartbeat about the presence of events. This no more than 10 lines of code.
>
> This is currently working very well in my Linux machine, so I need to start
> testing this stuff.
>
> For Windows, soon I will be building the custom VM. My last built was very
> dirty and I want to do something more clean.
>
> For Mac OS X, I don't have one for testing. But Alex is going allow me to
> borrow one for some time. So be patience.
>
> As for Woden, it is a new 3D graphics engine that I started making. This
> one requires currently support of OSWindow and also shows some cool stuffs.
>
> As for prebuilt versions of the VM with OSWindow support along with
> preloaded images for both, OSWindow and Woden. And screenshots.
>
> Well, I am putting them here: http://ronie.cl/OSWindow/
>
> Greetings,
> Ronie
��