Gui changes in recent Genode?

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()

Thanks for the pointers… I think I need a major rethink of how I deal with Gui::

I give up. Too many changes … and reading code doesn’t make me understand.

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.

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

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;) )

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?

Please refer to

1 Like

Thanks a lot!!

Program server/riscos/riscos
COMPILE main.o
LINK riscos

Hurray!

I hope it works :slight_smile:

2 Likes