micken
January 23, 2025, 3:12pm
1
Hello,
When building my demo scenario with git genode,everything Gui related fails.
For example
error:no match for call to ‘(Framebuffer::Session_client) ()’
515 | env.rm(), gui.framebuffer()->dataspace());
Any hint what I should use instead?
I believe Genode ticket #5353 might have the pointers to the Gui session changes, and to several examples of how to adapt to those changes
EDIT: on second thought, the framebuffer API seems to have changed in 24.08 instead of 24.11, I have this diff in my code:
- server_events.framebuffer()->dataspace()
+ server_events.framebuffer.dataspace()
micken
January 23, 2025, 4:32pm
3
Thanks for the pointers… I think I need a major rethink of how I deal with Gui::
micken
January 29, 2025, 11:59am
4
I give up. Too many changes … and reading code doesn’t make me understand.
ttcoder
January 29, 2025, 12:53pm
5
Come on, take advantage of help offered, since I went through the same API migration ^^
Give us error messages and source code, and I’ll see what I can do. The framebuffer
bit took me just a few seconds to locate in my diffs and post here.
micken
January 29, 2025, 1:29pm
6
/*
* \brief RISCOS on second core
* \author Michael Grunditz
* \date 2024-08-15
*
*/
/*
* Copyright (C) 2012-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#include <base/component.h>
#include <base/log.h>
#include <base/thread.h>
#include <log_session/connection.h>
#include <base/attached_io_mem_dataspace.h>
#include <terminal_session/connection.h>
This file has been truncated. show original
I had a look again now, and I think that “View” is my main problem… I compared with test/nitpicker, and it seems to implement that functionality locally. ( That is from a quick look).
Perhaps simple to do. The reason for doing this at all is to build for MNT Reform. I don’t have that laptop … but if I can get it to build it should work.
But it isn’t life and death… Many projects is a one time demo…
Right, for instance this bit
using namespace Gui;
Gui::Session::View_handle _handle;
g_handle = &_handle;
_handle = gui.create_view();
Gui::Rect rect(Gui::Point(100,100), Gui::Area(scr_w,scr_h));
gui.enqueue<Command::Geometry>(_handle, rect);
gui.enqueue<Command::To_front>(_handle, Gui::Session::View_handle());
gui.enqueue<Command::Title>(_handle, "riscosfb");
gui.execute();
would become something like this
using namespace Gui;
Gui::View_id _handle; //Gui::Session::View_handle _handle;
// g_handle = &_handle;
gui.view( _handle,
{ } // we will set the title/rect/front attributes separately
);
//_handle = gui.create_view();
g_handle = &_handle; // T+
Gui::Rect rect = = Gui::Rect::compound(....);//rect(Gui::Point(100,100), Gui::Area(scr_w,scr_h));
gui.enqueue<Command::Geometry>(_handle, rect);
gui.enqueue<Command::Front>(_handle );//gui.enqueue<Command::To_front>(_handle, Gui::Session::View_handle());
gui.enqueue<Command::Title>(_handle, "riscosfb");
gui.execute();
Helps ?
EDIT: in fact I didn’t need to move around the g_handle
bit since it’s a reference, not a value copy, disregard.
1 Like
micken
January 29, 2025, 2:32pm
8
I don’t have that, seems like the View_handle is gone.
But thanks!
1 Like
Edited, thx! (it’s now Gui::View_id _handle;
) )
micken
January 29, 2025, 3:23pm
10
Thanks again. I think that should work. but I end up with type conversion errors in libc includes.
stdio.h:459:37: error: conversion from ‘int’ to ‘unsigned char’ may change value [-Werror=conversion]
459 | return (*_p->_p++ = _c);
| ^~
Is there a way to build with more relaxed flags?