Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-25 Thread Fred vS
Hello everybody.

Thanks Sieghard for the infos.

Some good news from the front.

I finally found a C demo that was working on a Wayland system.
Some tweak needed and some hair to loose to make it compile + run.

Then I tackled the big part: the conversion to Pascal.

My nearly-friend ChatGPT helped me (but lt of errors and non-sense, but ok, 
he's still young).

Finally, after hard and painfull fight, I get it: a beautifull Wayland 
chessboard.

https://github.com/fredvs/wayland-pascal/assets/3421249/694787e4-0b2c-4961-bacd-efb247cee2df

The source is in https://github.com/fredvs/wayland-pascal

And I have a other scoop: I will terminate the combat, I am happy with the 
first steps, Wayland is accessible to fpc, all the tools are there and work.

But for deeper exploration of Wayland, asap ( as so long as possible).

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-23 Thread Sieghard via mseide-msegui-talk
Hello Fred,

you wrote on Sat, 23 Sep 2023 02:41:00 +:

> Yes, sure and I am far to be ready for a msegui-wayland interface.
> 
> I think that I have all the tools now to use Wayland with fpc, all the
> demos of the demos-book are translated and compile.

Fine - I saw that you presented a Wayland client window picture already.

> But the problem now is the C code from the book, compiling the C demos
> with some surface and shell does not run. It crash at loading.

Well - as I don't have any notion (yet) about what's required here, I'm
totally clueless in this respect - sorry.

> And it seems because of the shell used in the demo are not the one used
> by Ubuntu-wayland. So I have to adapt the code using xdg_shell that is
> used by Ubuntu. And I am a totally newbie in that jungle.

Strange - shells should be freely interchangeable I thought, even on a
graphical system, using a terminal program. Isn't that a terminal window
what your Wayland picture shows? I.e. is that just an empty window without
anything able to accept application requests?
(So, you need a "shell" to run a shell program? Funny...)
...
> Imho, Wayland is far to be ready and x11 has still long days before to
> disapear.

I sure hope so for Linux, and it's no question for the BSDs and similar
systems anyway, as Wayland, AFAIK, is narrowly targeted on Linux only, and
beyond that, on Linux running systemd. I don't run a systemd Linux...
(And I do not want to.)

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---




___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-22 Thread Fred vS
Hello Sieghard.

>I'd suggest to be a bit more conservative and keep the old structure at
>least until you got "many" signs of agreement from users you asked.

Yes, sure and I am far to be ready for a msegui-wayland interface.

I think that I have all the tools now to use Wayland with fpc, all the demos of 
the demos-book are translated and compile.

But the problem now is the C code from the book, compiling the C demos with 
some surface and shell does not run.
It crash at loading.

And it seems because of the shell used in the demo are not the one used by 
Ubuntu-wayland.
So I have to adapt the code using xdg_shell that is used by Ubuntu.
And I am a totally newbie in that jungle.

(Hum, and then, if I understand ok, with wayland you must compile your 
application with the shell used by the OS... not very "universal")

Imho, Wayland is far to be ready and x11 has still long days before to disapear.

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-22 Thread Fred vS
Hello Vasi.

Yes, I know but... I already found a solution and it works, so I will continue 
the fight (even that I admit that Wayland is not wow)!

See screenshot:
https://github.com/fredvs/wayland-pascal/assets/3421249/e8053dbc-a7e7-4c8a-a206-bbd7ded16a84

The trick was to create a library-for-work with the declared functions and use 
that library for linking.
That library is only need for linking, users dont need it.
So now I think I get great keys.

Hum, yes, sorry but once again ChatGPT helped me a lot.
Here his answer:

--

If the `wl_display_get_registry` and `wl_registry_add_listener` functions are 
inlined in the C/C++ headers and you cannot directly access them from Pascal 
due to the inlining, you may need to use a workaround.

One approach is to create C/C++ wrapper functions that encapsulate the inlined 
Wayland functions and then call those wrapper functions from your Pascal code. 
Here's an example of how you can create such wrappers:

1. Create a C/C++ file, e.g., `wayland_wrapper.c`, and define wrapper functions 
for the inlined functions:

```c
// wayland_wrapper.c
#include 

// Wrapper for wl_display_get_registry
struct wl_registry* my_wl_display_get_registry(struct wl_display* display) {
return wl_display_get_registry(display);
}

// Wrapper for wl_registry_add_listener
int my_wl_registry_add_listener(struct wl_registry* registry,
const struct wl_registry_listener* listener,
void* data) {
return wl_registry_add_listener(registry, listener, data);
}
```

2. Compile `wayland_wrapper.c` into a shared library (e.g., 
`libwayland_wrapper.so`):

```bash
gcc -fPIC -shared -o libwayland_wrapper.so wayland_wrapper.c -lwayland-client
```

3. In your Pascal code, use the `external` keyword to declare the wrapper 
functions:

```pascal
function my_wl_display_get_registry(display: pwl_display): pwl_registry; cdecl; 
external 'libwayland_wrapper';
function my_wl_registry_add_listener(registry: pwl_registry; listener: 
Pwl_registry_listener; data: pointer): cint; cdecl; external 
'libwayland_wrapper';
```

4. Use these wrapper functions in your Pascal code as needed.

By creating C/C++ wrappers, you can access the inlined Wayland functions 
indirectly from your Pascal code. Make sure to link your Pascal program with 
the `libwayland_wrapper.so` shared library when building your Pascal project.

This approach allows you to work around the issue of inlined functions in the 
Wayland headers and use them in your Pascal code effectively.




De : vasi vasi 
Envoyé : vendredi 22 septembre 2023 19:10
À : General list for MSEide+MSEgui 
Objet : Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

Fred,

let the Wayland team to solve the problems they created in forcing the move 
from X-Window with a half baked solution. We (me and my family) use X server 
because is the only one that correctly manages the Wacom tablet.

For now we don't care about Wayland is not useful for us and is really their 
problem.

Wait for when things are usable. Not worth the effort at the expense of your 
health.

On Fri, Sep 22, 2023 at 6:40 PM Fred vS 
mailto:fi...@hotmail.com>> wrote:
Hello everybody.

I am already blocked because some methods in wayland-client.so are inlined and 
not accessible for fpc.

I have asked it to the maintainer of the Wayland book with the demos:
https://github.com/bugaevc/writing-wayland-clients/issues/2

But I dont understand his solution.

Do you have a idea what should be done to access those methods?

Fre;D


De : Fred vS mailto:fi...@hotmail.com>>
Envoyé : vendredi 22 septembre 2023 01:21
À : General list for MSEide+MSEgui 
mailto:mseide-msegui-talk@lists.sourceforge.net>>
Objet : Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

Hello everybody.

For the fun, I started a new Github project: 
https://github.com/fredvs/wayland-pascal

It takes inspiration of the demos from:
https://bugaevc.gitbooks.io/writing-wayland-clients/content/black-square/first-steps.html
(Yes, I confess, I was helped by ChatGPT for the translation of the C demos to 
Pascal.)

It uses the excellent fpc-wayland Bindings Generator for freepascal from 
Andrews Haines.
https://github.com/andrewd207/fpc-wayland

The goal is to discover step by step, with code, how to make Wayland work with 
fpc.
And maybe one day adapt this for msegui.

The first step is a Pascal program that connect to a Wayland Client (of course 
you need a Wayland session):

https://github.com/fredvs/wayland-pascal/assets/3421249/1a29cd1b-5af0-4fd4-9b70-d87a9a4e9148

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net<mailto:mseide-msegui-talk@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


--
Vasi
___
mseide-msegui-

Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-22 Thread vasi vasi
Fred,

let the Wayland team to solve the problems they created in forcing the move
from X-Window with a half baked solution. We (me and my family) use X
server because is the only one that correctly manages the Wacom tablet.

For now we don't care about Wayland is not useful for us and is really
their problem.

Wait for when things are usable. Not worth the effort at the expense of
your health.

On Fri, Sep 22, 2023 at 6:40 PM Fred vS  wrote:

> Hello everybody.
>
> I am already blocked because some methods in wayland-client.so are inlined
> and not accessible for fpc.
>
> I have asked it to the maintainer of the Wayland book with the demos:
> https://github.com/bugaevc/writing-wayland-clients/issues/2
>
> But I dont understand his solution.
>
> Do you have a idea what should be done to access those methods?
>
> Fre;D
>
> --
> *De :* Fred vS 
> *Envoyé :* vendredi 22 septembre 2023 01:21
> *À :* General list for MSEide+MSEgui <
> mseide-msegui-talk@lists.sourceforge.net>
> *Objet :* Re: [MSEide-MSEgui-talk] MSEgui and Wayland.
>
> Hello everybody.
>
> For the fun, I started a new Github project:
> https://github.com/fredvs/wayland-pascal
>
> It takes inspiration of the demos from:
>
> https://bugaevc.gitbooks.io/writing-wayland-clients/content/black-square/first-steps.html
> (Yes, I confess, I was helped by ChatGPT for the translation of the C
> demos to Pascal.)
>
> It uses the excellent fpc-wayland Bindings Generator for freepascal from
> Andrews Haines.
> https://github.com/andrewd207/fpc-wayland
>
> The goal is to discover step by step, with code, how to make Wayland work
> with fpc.
> And maybe one day adapt this for msegui.
>
> The first step is a Pascal program that connect to a Wayland Client (of
> course you need a Wayland session):
>
>
> https://github.com/fredvs/wayland-pascal/assets/3421249/1a29cd1b-5af0-4fd4-9b70-d87a9a4e9148
>
> Fre;D
> ___
> mseide-msegui-talk mailing list
> mseide-msegui-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>


-- 
Vasi
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-22 Thread Fred vS
Hello everybody.

I am already blocked because some methods in wayland-client.so are inlined and 
not accessible for fpc.

I have asked it to the maintainer of the Wayland book with the demos:
https://github.com/bugaevc/writing-wayland-clients/issues/2

But I dont understand his solution.

Do you have a idea what should be done to access those methods?

Fre;D


De : Fred vS 
Envoyé : vendredi 22 septembre 2023 01:21
À : General list for MSEide+MSEgui 
Objet : Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

Hello everybody.

For the fun, I started a new Github project: 
https://github.com/fredvs/wayland-pascal

It takes inspiration of the demos from:
https://bugaevc.gitbooks.io/writing-wayland-clients/content/black-square/first-steps.html
(Yes, I confess, I was helped by ChatGPT for the translation of the C demos to 
Pascal.)

It uses the excellent fpc-wayland Bindings Generator for freepascal from 
Andrews Haines.
https://github.com/andrewd207/fpc-wayland

The goal is to discover step by step, with code, how to make Wayland work with 
fpc.
And maybe one day adapt this for msegui.

The first step is a Pascal program that connect to a Wayland Client (of course 
you need a Wayland session):

https://github.com/fredvs/wayland-pascal/assets/3421249/1a29cd1b-5af0-4fd4-9b70-d87a9a4e9148

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-21 Thread Fred vS
Hello everybody.

For the fun, I started a new Github project: 
https://github.com/fredvs/wayland-pascal

It takes inspiration of the demos from:
https://bugaevc.gitbooks.io/writing-wayland-clients/content/black-square/first-steps.html
(Yes, I confess, I was helped by ChatGPT for the translation of the C demos to 
Pascal.)

It uses the excellent fpc-wayland Bindings Generator for freepascal from 
Andrews Haines.
https://github.com/andrewd207/fpc-wayland

The goal is to discover step by step, with code, how to make Wayland work with 
fpc.
And maybe one day adapt this for msegui.

The first step is a Pascal program that connect to a Wayland Client (of course 
you need a Wayland session):

https://github.com/fredvs/wayland-pascal/assets/3421249/1a29cd1b-5af0-4fd4-9b70-d87a9a4e9148

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-20 Thread Fred vS
Hello Sieghard.

Thanks for the precious infos.
I'm (not) sure that MSEgui for Wayland will appear soon but as much information 
as possible is needed to make it appear.

Also maybe it would be good to reorder-rename the sub-directories in 
/lib/kernel/.
Actually there is /kernel/windows and /kernel/linux.

I would vote to change /kernel/linux into /kernel/unix because there are code 
for BSD OS like FreeBSD, NetBSD, OpenBSD and DragonFlyBSD.
And, because of maybe new graphic interfaces, create directory /kernel/unix/x11 
and move all the x11-related units form /kernel/unix to /kernel/unix/x11.

For the users, just change in MSEide, config: Target OS = uinx (in place of 
linux).
And add in Project/Options/make/Directories: ${MSELIBDIR}kernel/$TARGETOSDIR/x11

And just change the sub-directory to compile with a other gui interface.

Maybe those change could be done with the new release with all the new 
properties, your new dialog files and the new MSEide binary release.
Of course MSEgui Wayland and will only "todo"


Fre;D

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui and Wayland.

2023-09-20 Thread Fred vS
Hello Sieghard.

Thanks for the precious infos.
I'm (not) sure that MSEgui for Wayland will appear soon but as much information 
as possible is needed to make it appear.

Also maybe it would be good to reorder-rename the sub-directories in 
/lib/kernel/.
Actually there is /kernel/windows and /kernel/linux.

I would vote to change /kernel/linux into /kernel/unix because there are code 
for BSD OS like FreeBSD, NetBSD, OpenBSD and DragonFlyBSD.
And, because of maybe new graphic interfaces, create directory /kernel/unix/x11 
and move all the x11-related units form /kernel/unix to /kernel/unix/x11.

For the users, just change in MSEide, config: Target OS = uinx (in place of 
linux).
And add in Project/Options/make/Directories: ${MSELIBDIR}kernel/$TARGETOSDIR/x11

And just change the sub-directory to compile with a other gui interface.

Maybe those change could be done with the new release with all the new 
properties, your new dialog files and the new MSEide binary release.
Of course MSEgui Wayland and will only "todo"


Fre;D

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui on Wayland.

2021-11-08 Thread Fred van Stappen
Re-hello.

It seems that XWayland is developped by the people of Xorg.
https://gitlab.freedesktop.org/xorg/xserver/-/tree/xwayland-21.1

And that Xorg it doesn't seem so dead, there are commits each day.

Who knows, maybe they will do a "extended X11" with some methods only 
accessible to Wayland and that will make X11 withl all the Wayland most missing 
features.

Fre;D


De : vasi vasi 
Envoyé : lundi 8 novembre 2021 12:19
À : General list for MSEide+MSEgui 
Objet : Re: [MSEide-MSEgui-talk] MSEgui on Wayland.

Wow, future assured,  many thanks Fred!

On Sun, Nov 7, 2021 at 5:33 PM Fred van Stappen 
mailto:fi...@hotmail.com>> wrote:
Re-hello.

About the problem of rounded button rendering in Wayland.

OK, fixed, just set Options of the TimageList with the images of the corners = 
[bmo_masked,bmo_graymask].

Conclusion, perfect, MSEgui is fully compatible with XWayland.

Fre;D


De : Fred van Stappen
Envoyé : samedi 23 octobre 2021 17:04
À : 
mseide-msegui-talk@lists.sourceforge.net<mailto:mseide-msegui-talk@lists.sourceforge.net>
 
mailto:mseide-msegui-talk@lists.sourceforge.net>>
Objet : MSEgui on Wayland.

Hello.

I did try a MSEgui application on Wayland.

Nearly no problem.

The unique problem was in some rounded frames.
It is not rendered correctly on Wayland.
Using "classical" rectangle frames is ok.

Otherwise all seems the same as Xorg and no speed difference in animations.

Fre;D

https://user-images.githubusercontent.com/3421249/138561400-04d8981a-2578-4f13-bcd8-e0537cc603fc.png
[X]

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net<mailto:mseide-msegui-talk@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


--
Vasi
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui on Wayland.

2021-11-08 Thread Fred van Stappen
Thanks Vasi vasi.

Hum, after deep search for infos about Wayland vs X11, I dont find lot of 
enthousiasts about Wayland.
Of course, like for every new thing there are nostalgics and heaters.

But here it seems something else.
Wayland is not so young (2008) and there are still "many" bugs, infinitly more 
than in X11.
Lot of people say, for example, better to use the X11-Firefox version on a 
Wayland system vs the Wayland-Firefox version.
X11-Firefox version will then use XWayland compositor.

Imho, many Linux distros will choose for Wayland as main graphic server but all 
of those Wayland-distros will-must have a robust XWayland (X11 emulator).

To resume, yes Wayland is the future but only with a perfect XWayland.
And the future of XWayland is assured till Wayland will be stable and this 
could take "a long future".

All that to say: yes, a MSEgui-Pure-Wayland interface is welcome, I will 
participate for it with pleasure, but it seems to me that we have some time to 
think-explore-develop it before it will really be needed.

(Some people predict also that Wayland started bad, the concept is already 
obsolete, too litle man-power and passion to continue the project, that it 
takes too long to be ok, better to create a totally new project.)

My 0.1 cent of course.

Fre;D
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui on Wayland.

2021-11-08 Thread vasi vasi
Wow, future assured,  many thanks Fred!

On Sun, Nov 7, 2021 at 5:33 PM Fred van Stappen  wrote:

> Re-hello.
>
> About the problem of rounded button rendering in Wayland.
>
> OK, fixed, just set Options of the TimageList with the images of the
> corners = [bmo_masked,bmo_graymask].
>
> Conclusion, perfect, MSEgui is fully compatible with XWayland.
>
> Fre;D
>
> --
> *De :* Fred van Stappen
> *Envoyé :* samedi 23 octobre 2021 17:04
> *À :* mseide-msegui-talk@lists.sourceforge.net <
> mseide-msegui-talk@lists.sourceforge.net>
> *Objet :* MSEgui on Wayland.
>
> Hello.
>
> I did try a MSEgui application on Wayland.
>
> Nearly no problem.
>
> The unique problem was in some rounded frames.
> It is not rendered correctly on Wayland.
> Using "classical" rectangle frames is ok.
>
> Otherwise all seems the same as Xorg and no speed difference in animations.
>
> Fre;D
>
>
> https://user-images.githubusercontent.com/3421249/138561400-04d8981a-2578-4f13-bcd8-e0537cc603fc.png
>
> ___
> mseide-msegui-talk mailing list
> mseide-msegui-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
>


-- 
Vasi
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] MSEgui on Wayland.

2021-11-07 Thread Fred van Stappen
Re-hello.

About the problem of rounded button rendering in Wayland.

OK, fixed, just set Options of the TimageList with the images of the corners = 
[bmo_masked,bmo_graymask].

Conclusion, perfect, MSEgui is fully compatible with XWayland.

Fre;D


De : Fred van Stappen
Envoyé : samedi 23 octobre 2021 17:04
À : mseide-msegui-talk@lists.sourceforge.net 

Objet : MSEgui on Wayland.

Hello.

I did try a MSEgui application on Wayland.

Nearly no problem.

The unique problem was in some rounded frames.
It is not rendered correctly on Wayland.
Using "classical" rectangle frames is ok.

Otherwise all seems the same as Xorg and no speed difference in animations.

Fre;D

https://user-images.githubusercontent.com/3421249/138561400-04d8981a-2578-4f13-bcd8-e0537cc603fc.png
[https://user-images.githubusercontent.com/3421249/138561400-04d8981a-2578-4f13-bcd8-e0537cc603fc.png]

___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk