Index: uspace/srv/hid/display/display.c
===================================================================
--- uspace/srv/hid/display/display.c	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ uspace/srv/hid/display/display.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -37,4 +37,7 @@
 #include <errno.h>
 #include <io/log.h>
+#include <stdlib.h>
+#include "display.h"
+#include "window.h"
 
 static errno_t disp_window_create(void *, sysarg_t *);
@@ -48,6 +51,18 @@
 static errno_t disp_window_create(void *arg, sysarg_t *rwnd_id)
 {
+	errno_t rc;
+	ds_display_t *disp = (ds_display_t *) arg;
+	ds_window_t *wnd;
+
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create()");
-	*rwnd_id = 42;
+
+	rc = ds_window_create(disp, &wnd);
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() - ds_window_create -> %d", rc);
+	if (rc != EOK)
+		return rc;
+
+	log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_create() -> EOK, id=%zu",
+	    wnd->id);
+	*rwnd_id = wnd->id;
 	return EOK;
 }
@@ -55,6 +70,122 @@
 static errno_t disp_window_destroy(void *arg, sysarg_t wnd_id)
 {
+	ds_display_t *disp = (ds_display_t *) arg;
+	ds_window_t *wnd;
+
+	wnd = ds_display_find_window(disp, wnd_id);
+	if (wnd == NULL)
+		return ENOENT;
+
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "disp_window_destroy()");
+	ds_display_remove_window(wnd);
+	ds_window_delete(wnd);
 	return EOK;
+}
+
+/** Create display.
+ *
+ * @param rdisp Place to store pointer to new display.
+ * @return EOK on success, ENOMEM if out of memory
+ */
+errno_t ds_display_create(ds_display_t **rdisp)
+{
+	ds_display_t *disp;
+
+	disp = calloc(1, sizeof(ds_display_t));
+	if (disp == NULL)
+		return ENOMEM;
+
+	list_initialize(&disp->windows);
+	disp->next_wnd_id = 1;
+	*rdisp = disp;
+	return EOK;
+}
+
+/** Destroy display.
+ *
+ * @param disp Display
+ */
+void ds_display_destroy(ds_display_t *disp)
+{
+	assert(list_empty(&disp->windows));
+	free(disp);
+}
+
+/** Add window to display.
+ *
+ * @param disp Display
+ * @param wnd Window
+ * @return EOK on success, ENOMEM if there are no free window identifiers
+ */
+errno_t ds_display_add_window(ds_display_t *disp, ds_window_t *wnd)
+{
+	assert(wnd->display == NULL);
+	assert(!link_used(&wnd->lwindows));
+
+	wnd->display = disp;
+	wnd->id = disp->next_wnd_id++;
+	list_append(&wnd->lwindows, &disp->windows);
+
+	return EOK;
+}
+
+/** Remove window from display.
+ *
+ * @param wnd Window
+ */
+void ds_display_remove_window(ds_window_t *wnd)
+{
+	list_remove(&wnd->lwindows);
+	wnd->display = NULL;
+}
+
+/** Find window by ID.
+ *
+ * @param disp Display
+ * @param id Window ID
+ */
+ds_window_t *ds_display_find_window(ds_display_t *disp, ds_wnd_id_t id)
+{
+	ds_window_t *wnd;
+
+	// TODO Make this faster
+	wnd = ds_display_first_window(disp);
+	while (wnd != NULL) {
+		if (wnd->id == id)
+			return wnd;
+		wnd = ds_display_next_window(wnd);
+	}
+
+	return NULL;
+}
+
+/** Get first window in display.
+ *
+ * @param disp Display
+ * @return First window or @c NULL if there is none
+ */
+ds_window_t *ds_display_first_window(ds_display_t *disp)
+{
+	link_t *link = list_first(&disp->windows);
+
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, ds_window_t, lwindows);
+}
+
+/** Get next window in display.
+ *
+ * @param wnd Current window
+ * @return Next window or @c NULL if there is none
+ */
+ds_window_t *ds_display_next_window(ds_window_t *wnd)
+{
+	link_t *link = list_next(&wnd->lwindows, &wnd->display->windows);
+
+	if (link == NULL)
+		return NULL;
+
+	return list_get_instance(link, ds_window_t, lwindows);
 }
 
Index: uspace/srv/hid/display/display.h
===================================================================
--- uspace/srv/hid/display/display.h	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ uspace/srv/hid/display/display.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -39,6 +39,17 @@
 
 #include <disp_srv.h>
+#include <errno.h>
+#include "types/display/display.h"
+#include "types/display/window.h"
 
 extern display_ops_t display_srv_ops;
+
+extern errno_t ds_display_create(ds_display_t **);
+extern void ds_display_destroy(ds_display_t *);
+extern errno_t ds_display_add_window(ds_display_t *, ds_window_t *);
+extern void ds_display_remove_window(ds_window_t *);
+extern ds_window_t *ds_display_find_window(ds_display_t *, ds_wnd_id_t);
+extern ds_window_t *ds_display_first_window(ds_display_t *);
+extern ds_window_t *ds_display_next_window(ds_window_t *);
 
 #endif
Index: uspace/srv/hid/display/main.c
===================================================================
--- uspace/srv/hid/display/main.c	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ uspace/srv/hid/display/main.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -46,5 +46,5 @@
 #include <task.h>
 #include "display.h"
-#include "wingc.h"
+#include "window.h"
 
 #define NAME  "display"
@@ -55,9 +55,14 @@
 static errno_t display_srv_init(void)
 {
+	ds_display_t *disp = NULL;
 	errno_t rc;
+
+	rc = ds_display_create(&disp);
+	if (rc != EOK)
+		goto error;
 
 	log_msg(LOG_DEFAULT, LVL_DEBUG, "display_srv_init()");
 
-	async_set_fallback_port_handler(display_client_conn, NULL/*parts*/);
+	async_set_fallback_port_handler(display_client_conn, disp);
 
 	rc = loc_server_register(NAME);
@@ -77,4 +82,6 @@
 	return EOK;
 error:
+	if (disp != NULL)
+		ds_display_destroy(disp);
 	return rc;
 }
@@ -86,7 +93,7 @@
 	sysarg_t wnd_id;
 	sysarg_t svc_id;
-	win_gc_t *wgc = NULL;
+	ds_window_t *wnd;
+	ds_display_t *disp = (ds_display_t *) arg;
 	gfx_context_t *gc;
-	errno_t rc;
 
 	log_msg(LOG_DEFAULT, LVL_NOTE, "display_client_conn arg1=%zu arg2=%zu arg3=%zu arg4=%zu.",
@@ -103,20 +110,17 @@
 		/* Display management */
 		srv.ops = &display_srv_ops;
-		srv.arg = NULL;
+		srv.arg = disp;
 
 		display_conn(icall, &srv);
 	} else {
-		(void) wnd_id;
 		/* Window GC */
-		rc = win_gc_create(&wgc);
-		if (rc != EOK) {
-			async_answer_0(icall, ENOMEM);
+		wnd = ds_display_find_window(disp, wnd_id);
+		if (wnd == NULL) {
+			async_answer_0(icall, ENOENT);
 			return;
 		}
 
-		gc = win_gc_get_ctx(wgc);
+		gc = ds_window_get_ctx(wnd);
 		gc_conn(icall, gc);
-
-		win_gc_delete(wgc);
 	}
 }
Index: uspace/srv/hid/display/meson.build
===================================================================
--- uspace/srv/hid/display/meson.build	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ uspace/srv/hid/display/meson.build	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -27,9 +27,16 @@
 #
 
-deps = [ 'ipcgfx', 'display' ]
+deps = [ 'ipcgfx', 'display', 'guigfx' ]
 
 src = files(
 	'display.c',
 	'main.c',
-	'wingc.c'
+	'window.c',
 )
+
+test_src = files(
+	'display.c',
+	'window.c',
+	'test/main.c',
+	'test/display.c',
+)
Index: uspace/srv/hid/display/test/display.c
===================================================================
--- uspace/srv/hid/display/test/display.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/test/display.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <errno.h>
+#include <pcut/pcut.h>
+#include <stdio.h>
+#include <str.h>
+
+#include "../display.h"
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(display);
+
+/** Display creation and destruction. */
+PCUT_TEST(display_basic)
+{
+	ds_display_t *disp;
+	errno_t rc;
+
+	rc = ds_display_create(&disp);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ds_display_destroy(disp);
+}
+
+PCUT_EXPORT(display);
Index: uspace/srv/hid/display/test/main.c
===================================================================
--- uspace/srv/hid/display/test/main.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/test/main.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <pcut/pcut.h>
+
+PCUT_INIT;
+
+PCUT_IMPORT(display);
+
+PCUT_MAIN();
Index: uspace/srv/hid/display/types/display/display.h
===================================================================
--- uspace/srv/hid/display/types/display/display.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/types/display/display.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libipcgfx
+ * @{
+ */
+/**
+ * @file Display server display type
+ */
+
+#ifndef TYPES_DISPLAY_DISPLAY_H
+#define TYPES_DISPLAY_DISPLAY_H
+
+#include <adt/list.h>
+#include "window.h"
+
+typedef struct ds_display {
+	/** Windows (of ds_window_t) */
+	list_t windows;
+	/** Next ID to assign to a window */
+	ds_wnd_id_t next_wnd_id;
+} ds_display_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/srv/hid/display/types/display/window.h
===================================================================
--- uspace/srv/hid/display/types/display/window.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/types/display/window.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libipcgfx
+ * @{
+ */
+/**
+ * @file Display server window type
+ */
+
+#ifndef TYPES_DISPLAY_WINDOW_H
+#define TYPES_DISPLAY_WINDOW_H
+
+#include <adt/list.h>
+#include <gfx/context.h>
+
+typedef sysarg_t ds_wnd_id_t;
+
+typedef struct ds_window {
+	/** Parent display */
+	struct ds_display *display;
+	/** Link to @c display->windows */
+	link_t lwindows;
+	/** Window ID */
+	ds_wnd_id_t id;
+	/** Graphic context */
+	gfx_context_t *gc;
+} ds_window_t;
+
+#endif
+
+/** @}
+ */
Index: pace/srv/hid/display/types/wingc.h
===================================================================
--- uspace/srv/hid/display/types/wingc.h	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup libipcgfx
- * @{
- */
-/**
- * @file GFX IPC backend
- */
-
-#ifndef TYPES_WINGC_H
-#define TYPES_WINGC_H
-
-#include <gfx/context.h>
-
-typedef struct win_gc {
-	/** Base graphic context */
-	gfx_context_t *gc;
-} win_gc_t;
-
-#endif
-
-/** @}
- */
Index: uspace/srv/hid/display/window.c
===================================================================
--- uspace/srv/hid/display/window.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/window.c	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup display
+ * @{
+ */
+/**
+ * @file GFX window backend
+ *
+ * This implements a graphics context over display server window.
+ */
+
+#include <gfx/color.h>
+#include <gfx/context.h>
+#include <gfx/render.h>
+#include <io/log.h>
+#include <stdlib.h>
+#include "display.h"
+#include "window.h"
+
+static errno_t ds_window_set_color(void *, gfx_color_t *);
+static errno_t ds_window_fill_rect(void *, gfx_rect_t *);
+
+gfx_context_ops_t ds_window_ops = {
+	.set_color = ds_window_set_color,
+	.fill_rect = ds_window_fill_rect
+};
+
+/** Set color on window GC.
+ *
+ * Set drawing color on window GC.
+ *
+ * @param arg Console GC
+ * @param color Color
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t ds_window_set_color(void *arg, gfx_color_t *color)
+{
+	ds_window_t *wnd = (ds_window_t *) arg;
+
+	(void) wnd;
+	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_set_color");
+	return EOK;
+}
+
+/** Fill rectangle on window GC.
+ *
+ * @param arg Window GC
+ * @param rect Rectangle
+ *
+ * @return EOK on success or an error code
+ */
+static errno_t ds_window_fill_rect(void *arg, gfx_rect_t *rect)
+{
+	ds_window_t *wnd = (ds_window_t *) arg;
+
+	(void) wnd;
+	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect");
+	return EOK;
+}
+
+/** Create window.
+ *
+ * Create graphics context for rendering into a window.
+ *
+ * @param disp Display to create window on
+ * @param rgc Place to store pointer to new GC.
+ *
+ * @return EOK on success or an error code
+ */
+errno_t ds_window_create(ds_display_t *disp, ds_window_t **rgc)
+{
+	ds_window_t *wnd = NULL;
+	gfx_context_t *gc = NULL;
+	errno_t rc;
+
+	wnd = calloc(1, sizeof(ds_window_t));
+	if (wnd == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	rc = gfx_context_new(&ds_window_ops, wnd, &gc);
+	if (rc != EOK)
+		goto error;
+
+	ds_display_add_window(disp, wnd);
+
+	wnd->gc = gc;
+	*rgc = wnd;
+	return EOK;
+error:
+	if (wnd != NULL)
+		free(wnd);
+	gfx_context_delete(gc);
+	return rc;
+}
+
+/** Delete window GC.
+ *
+ * @param wnd Window GC
+ */
+errno_t ds_window_delete(ds_window_t *wnd)
+{
+	errno_t rc;
+
+	rc = gfx_context_delete(wnd->gc);
+	if (rc != EOK)
+		return rc;
+
+	free(wnd);
+	return EOK;
+}
+
+/** Get generic graphic context from window.
+ *
+ * @param wnd Window
+ * @return Graphic context
+ */
+gfx_context_t *ds_window_get_ctx(ds_window_t *wnd)
+{
+	return wnd->gc;
+}
+
+/** @}
+ */
Index: uspace/srv/hid/display/window.h
===================================================================
--- uspace/srv/hid/display/window.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
+++ uspace/srv/hid/display/window.h	(revision 6af4b4f4b0f0e333036628944619c262e74b3b8d)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2019 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup display
+ * @{
+ */
+/**
+ * @file Display server window
+ */
+
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include <errno.h>
+#include <types/gfx/context.h>
+#include <types/gfx/ops/context.h>
+#include "types/display/display.h"
+#include "types/display/window.h"
+
+extern gfx_context_ops_t window_gc_ops;
+
+extern errno_t ds_window_create(ds_display_t *, ds_window_t **);
+extern errno_t ds_window_delete(ds_window_t *);
+extern gfx_context_t *ds_window_get_ctx(ds_window_t *);
+
+#endif
+
+/** @}
+ */
Index: pace/srv/hid/display/wingc.c
===================================================================
--- uspace/srv/hid/display/wingc.c	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ 	(revision )
@@ -1,148 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup display
- * @{
- */
-/**
- * @file GFX window backend
- *
- * This implements a graphics context over display server window.
- */
-
-#include <gfx/color.h>
-#include <gfx/context.h>
-#include <gfx/render.h>
-#include <io/log.h>
-#include <stdlib.h>
-#include "wingc.h"
-
-static errno_t win_gc_set_color(void *, gfx_color_t *);
-static errno_t win_gc_fill_rect(void *, gfx_rect_t *);
-
-gfx_context_ops_t win_gc_ops = {
-	.set_color = win_gc_set_color,
-	.fill_rect = win_gc_fill_rect
-};
-
-/** Set color on window GC.
- *
- * Set drawing color on window GC.
- *
- * @param arg Console GC
- * @param color Color
- *
- * @return EOK on success or an error code
- */
-static errno_t win_gc_set_color(void *arg, gfx_color_t *color)
-{
-	win_gc_t *wgc = (win_gc_t *) arg;
-
-	(void) wgc;
-	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_set_color");
-	return EOK;
-}
-
-/** Fill rectangle on window GC.
- *
- * @param arg Console GC
- * @param rect Rectangle
- *
- * @return EOK on success or an error code
- */
-static errno_t win_gc_fill_rect(void *arg, gfx_rect_t *rect)
-{
-	win_gc_t *wgc = (win_gc_t *) arg;
-
-	(void) wgc;
-	log_msg(LOG_DEFAULT, LVL_NOTE, "gc_fill_rect");
-	return EOK;
-}
-
-/** Create window GC.
- *
- * Create graphics context for rendering into a window.
- *
- * @param rgc Place to store pointer to new GC.
- *
- * @return EOK on success or an error code
- */
-errno_t win_gc_create(win_gc_t **rgc)
-{
-	win_gc_t *wgc = NULL;
-	gfx_context_t *gc = NULL;
-	errno_t rc;
-
-	wgc = calloc(1, sizeof(win_gc_t));
-	if (wgc == NULL) {
-		rc = ENOMEM;
-		goto error;
-	}
-
-	rc = gfx_context_new(&win_gc_ops, wgc, &gc);
-	if (rc != EOK)
-		goto error;
-
-	wgc->gc = gc;
-	*rgc = wgc;
-	return EOK;
-error:
-	if (wgc != NULL)
-		free(wgc);
-	gfx_context_delete(gc);
-	return rc;
-}
-
-/** Delete window GC.
- *
- * @param wgc Console GC
- */
-errno_t win_gc_delete(win_gc_t *wgc)
-{
-	errno_t rc;
-
-	rc = gfx_context_delete(wgc->gc);
-	if (rc != EOK)
-		return rc;
-
-	free(wgc);
-	return EOK;
-}
-
-/** Get generic graphic context from window GC.
- *
- * @param wgc Console GC
- * @return Graphic context
- */
-gfx_context_t *win_gc_get_ctx(win_gc_t *wgc)
-{
-	return wgc->gc;
-}
-
-/** @}
- */
Index: pace/srv/hid/display/wingc.h
===================================================================
--- uspace/srv/hid/display/wingc.h	(revision c8cf261a450bf22fa6cc6e9872a1f07f9e7dccda)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2019 Jiri Svoboda
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** @addtogroup display
- * @{
- */
-/**
- * @file Window graphics context
- */
-
-#ifndef WINGC_H
-#define WINGC_H
-
-#include <types/gfx/context.h>
-#include <types/gfx/ops/context.h>
-#include "types/wingc.h"
-
-extern gfx_context_ops_t win_gc_ops;
-
-extern errno_t win_gc_create(win_gc_t **);
-extern errno_t win_gc_delete(win_gc_t *);
-extern gfx_context_t *win_gc_get_ctx(win_gc_t *);
-
-#endif
-
-/** @}
- */
