server/nitpicker: API transition

Ref #1987
This commit is contained in:
Emery Hemingway 2017-01-02 14:10:33 +01:00 committed by Norman Feske
parent 5f4ead01bb
commit 811bd1561b
2 changed files with 13 additions and 10 deletions

View File

@ -14,6 +14,8 @@
#ifndef _DOMAIN_REGISTRY_
#define _DOMAIN_REGISTRY_
#include <base/allocator.h>
#include <base/log.h>
#include <util/xml_node.h>
#include <util/color.h>

View File

@ -1103,8 +1103,8 @@ struct Nitpicker::Main
/*
* Sessions to the required external services
*/
Framebuffer::Connection framebuffer;
Input::Connection input;
Framebuffer::Connection framebuffer { env, Framebuffer::Mode() };
Input::Connection input { env };
Input::Event * const ev_buf = env.rm().attach(input.dataspace());
@ -1122,17 +1122,18 @@ struct Nitpicker::Main
Framebuffer::Mode const mode = framebuffer.mode();
Attached_dataspace fb_ds = { framebuffer.dataspace() };
Attached_dataspace fb_ds;
Screen<PT> screen = { fb_ds.local_addr<PT>(), Area(mode.width(), mode.height()) };
/**
* Constructor
*/
Framebuffer_screen(Framebuffer::Session &fb) : framebuffer(fb) { }
Framebuffer_screen(Genode::Region_map &rm, Framebuffer::Session &fb)
: framebuffer(fb), fb_ds(rm, framebuffer.dataspace()) { }
};
Genode::Reconstructible<Framebuffer_screen> fb_screen = { framebuffer };
Genode::Reconstructible<Framebuffer_screen> fb_screen = { env.rm(), framebuffer };
void handle_fb_mode();
@ -1167,9 +1168,9 @@ struct Nitpicker::Main
*/
Genode::Sliced_heap sliced_heap { env.ram(), env.rm() };
Genode::Reporter pointer_reporter = { "pointer" };
Genode::Reporter hover_reporter = { "hover" };
Genode::Reporter focus_reporter = { "focus" };
Genode::Reporter pointer_reporter = { env, "pointer" };
Genode::Reporter hover_reporter = { env, "hover" };
Genode::Reporter focus_reporter = { env, "focus" };
Genode::Attached_rom_dataspace config { env, "config" };
@ -1198,7 +1199,7 @@ struct Nitpicker::Main
/*
* Dispatch input and redraw periodically
*/
Timer::Connection timer;
Timer::Connection timer { env };
/**
* Counter that is incremented periodically
@ -1380,7 +1381,7 @@ void Nitpicker::Main::handle_config()
void Nitpicker::Main::handle_fb_mode()
{
/* reconstruct framebuffer screen and menu bar */
fb_screen.construct(framebuffer);
fb_screen.construct(env.rm(), framebuffer);
/* let the view stack use the new size */
user_state.size(Area(fb_screen->mode.width(), fb_screen->mode.height()));