Commit a5618fba authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Add base handler for graphics IPCs; Register that handler.

parent 64519b08
......@@ -13,6 +13,7 @@ package javax.microedition.lcdui;
import cc.squirreljme.jvm.Assembly;
import cc.squirreljme.jvm.DeviceFeedbackType;
import cc.squirreljme.jvm.FramebufferProperty;
import cc.squirreljme.jvm.IPCManager;
import cc.squirreljme.jvm.SystemCallError;
import cc.squirreljme.jvm.SystemCallIndex;
import cc.squirreljme.runtime.lcdui.common.CommonColors;
......@@ -1425,12 +1426,19 @@ public class Display
// Create mapping for this display?
if (rv == null)
{
// Store it
displays.put(k, (rv = new Display(
new NativeUIBackend(__did))));
// Cache display zero?
if (__did == 0)
{
_DISPLAY_ZERO = rv;
// Register callback handler for IPC events
IPCManager.register(FramebufferProperty.IPC_ID,
__GfxIPCDispatch__.__instance());
}
}
return rv;
......
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
// Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------
package javax.microedition.lcdui;
import cc.squirreljme.jvm.IPCCallback;
/**
* This is the graphics IPC handler which dispatches any events to the
* appropriate widgets and such.
*
* @since 2019/12/28
*/
class __GfxIPCDispatch__
implements IPCCallback
{
/** The instance of this. */
private static __GfxIPCDispatch__ _INSTANCE;
/**
* {@inheritDoc}
* @since 2019/12/28
*/
@Override
public final long ipcCall(int __tid, int __ipcid, int __a, int __b,
int __c, int __d, int __e, int __f, int __g, int __h)
{
throw new todo.TODO();
}
/**
* Creates an instance of this class.
*
* @return The class instance.
* @since 2019/12/28
*/
static final __GfxIPCDispatch__ __instance()
{
__GfxIPCDispatch__ rv = _INSTANCE;
if (rv == null)
_INSTANCE = (rv = new __GfxIPCDispatch__());
return rv;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment