From 1eb4603b71ae21f45e9449efcd20a5086051489d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 26 Apr 2010 00:32:55 +0000 Subject: start improvements in surface handling add X surface handler (need to address the speed issues) svn path=/trunk/libnsfb/; revision=10485 --- src/surface/vnc.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/surface/vnc.c (limited to 'src/surface/vnc.c') diff --git a/src/surface/vnc.c b/src/surface/vnc.c new file mode 100644 index 0000000..eb6d6ff --- /dev/null +++ b/src/surface/vnc.c @@ -0,0 +1,59 @@ +/* + * Copyright 2009 Vincent Sanders + * + * This file is part of libnsfb, http://www.netsurf-browser.org/ + * Licenced under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + */ + +#include +#include + +#include "libnsfb.h" +#include "libnsfb_event.h" +#include "libnsfb_plot.h" +#include "nsfb.h" +#include "frontend.h" + +#define UNUSED(x) ((x) = (x)) + +static int vnc_set_geometry(nsfb_t *nsfb, int width, int height, int bpp) +{ + if (nsfb->frontend_priv != NULL) + return -1; /* if were already initialised fail */ + + nsfb->width = width; + nsfb->height = height; + nsfb->bpp = bpp; + + return 0; +} + +static int vnc_initialise(nsfb_t *nsfb) +{ + UNUSED(nsfb); + return 0; +} + +static int vnc_finalise(nsfb_t *nsfb) +{ + UNUSED(nsfb); + return 0; +} + +static bool vnc_input(nsfb_t *nsfb, nsfb_event_t *event, int timeout) +{ + UNUSED(nsfb); + UNUSED(event); + UNUSED(timeout); + return false; +} + +const nsfb_frontend_rtns_t vnc_rtns = { + .initialise = vnc_initialise, + .finalise = vnc_finalise, + .input = vnc_input, + .geometry = vnc_set_geometry, +}; + +NSFB_FRONTEND_DEF(vnc, NSFB_FRONTEND_VNC, &vnc_rtns) -- cgit v1.2.3