-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error while comiling code using gtklayershell #204
Comments
another thing, im on harfbuzz 4.4.1-1 |
Thanks for reporting. I have to admit that I can currently not remember what gtklayershell is, maybe we have not a single test for it. I guess someone requested it years ago, and then vanished soon. I am not sure if layershell is available for my Gentoo Linux as a package, maybe I have to install from git sources. But I will try to test soon. My general recommendation for people new to GTK or people that do not intend to do some serious stuff: just use another GUI toolkit, Nim has 20 of them, and for toy apps these may be simpler to use then GTK. |
It is available for Gentoo Linux now, at least in version 0.6: https://packages.gentoo.org/packages/gui-libs/gtk-layer-shell. That makes testings easier for me -- currently it is not installed on my box. I hope it is not an v0.7 only issue. |
Seems that the Gentoo version supports only GTK3 still, and they ship only the GIR file for v0.1:
Have you managed to install a version for GTK4? And do you really intent to do serious work with it? |
The bad news is, that I can not reproduce your issue with v0.6:
So I may have to install latest v0.7 from git. For the case that you are just playing around with things, having fun finding stuff that fails, I would suggest that we wait with the fix til end of this year. I have just migrated to a new box, as my old one did some random reboots in the last weeks, and I have to prepare the box to allow installation of additional stuff in /opt from git. |
ok i can always try downgrading layershell, but i dont think its a layershell issue tho it seems to be with harfbuzz |
Interesting. I have currently harfbuzz 4.3, but Gentoo provides unstable 4.4.1. I can try to install that this evening and then try again. |
Well I never do that, I always use "nim c myprog.nim". I have no idea for the error message "expression cannot be cast to Face00=object". What is your Nim compiler version? And are you using Linux or Windows/Mac? |
Yes, you were right:
I was not aware that we have a harfbuzz package for gintro at all. Will investigate this evening. |
The whole harfbuzz.nim looks strange. Why start all the type names in lower case? |
My current guess is, that the defined types in harfbuzz and freetype are very different from the other GTK modules. For example https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_face typedef struct FT_FaceRec_* FT_Face; So here the defined type is already a pointer! That is very different from the ordinary GTK modules as in https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbutton.h typedef struct _GtkButton GtkButton; Fixing that in the generator script gen.nim may be a lot of work, maybe more than 100 hours? I have no idea, and I wonder if that makes sense at all, as we have no real users for gintro. The basic working shape of gen.nim was created 6 years ago, initially only for the GTK core modules. I can currently absolutely not remember which changes would be needed to fix these freetype and hardbuzz issues. |
I just noticed that with latest harfbuzz all my gintro apps fail to compile. Well we can fix that manually, that it make the other modules compile and work with:
As long as you do not explicitly use freetype and harfbuzz, with that fix layershell may work for you? |
Oh thanks I'll try it out as soon as I get a chance! Thanks for your help with this |
I think I will start by asking at the Gnome forum, maybe Mr Bassi or Mr Droege can give us some hints: |
OK, should be fixed now. At least my own apps seems to compile and run again. You can try with
As you may have noticed, there was no reaction at Gnome forum -- maybe Mr. Bassi and Mr. Droege are in vacation or have retired. So I applied this ugly fix:
With this patch, we get now
The other modules remain unchanged, so I have not done further testings. Another question is, if we should try to make all the harfbuzz data types starting with upper case. But I think I will not try that this year, maybe next. You may try that your own, should be not difficult. maybe some work. And may result in new trouble of course. I think I will tag this latest release as v0.99 soon, before other do a plain "nimble install gintro" and get the same trouble. Problem is, that then next tag is already 1.0, and I hesitate to call it already a 1.0 version. |
Oh ok I'm on vacation now so I can't test it :/ but thanks for your help! As soon as I get back I'll be sure to test it |
this is the code
and while compiling with nimble build i get this error
The text was updated successfully, but these errors were encountered: