1. Win32 API is Huge
- Posted by Icy_Viking in May
- 444 views
Hi all,
Recently I have thought of making a new Win32lib, if you will. Something that would wrap more modern windows functions and wrap other windows related things such as DirectX and more. However, the Win API is huge.
https://learn.microsoft.com/en-us/windows/win32/api/
There are a lot of modules. Wrapping the complete API would be a massive undertaking. I don't think one person could do it. Although I wouldn't mind starting it. Using Greg's FFI Euphoria library would make it easier to wrap the structs and such. Then there are the typedef Windows variable such as LHANDLE and HBRUSH, which I'm not sure would be C_POINTER or C_LONG, or something else?
I have looked through the win32lib that was originally developed by David Cuny and later Derek P. Massive kudos to those guys. I guess it could be theoretically possible to build upon the win32lib by using the FFI library and making the required changes, though I feel a fresh apporach may be the best option, seeing how much Windows has changed and the new API features that modern Windows has. Thoughts, opinions and takes are welcome.
2. Re: Win32 API is Huge
- Posted by ChrisB (moderator) in May
- 420 views
Hi Andy
Yes it is huge, and yes it is a massive undertaking, as I know all too well from the many fiddles I have done with it.
I would question whether there is any point in writing one from scratch, as what else would a programmer actually need that isn't contained in the already existing one. Would it be actually easier to use. Incidentally, Judith's IDE still functions great (and is the greatest example of Win32lib functionality), but it produces WinXP style border decorations- now if you could give them the modern Win11 interface, that would be cool.
So by all means have a crack at it (you are more than capable), but be prepared to do it as an academic exercise because what you wil probably end up with is the functionally same black box, as exists now.
Incidentally, is there win64lib library?
Cheers
3. Re: Win32 API is Huge
- Posted by petelomax in May
- 409 views
Take a look at xpGUI (Phix only, but gotta be worth at least a quick glance).
It's a bit stalled at the moment, mainly on getting pixel-perfect "natural sizes", which is fairly obviously prevnting the layout manager from positioning things correctly.
4. Re: Win32 API is Huge
- Posted by Icy_Viking in May
- 399 views
Take a look at xpGUI (Phix only, but gotta be worth at least a quick glance).
It's a bit stalled at the moment, mainly on getting pixel-perfect "natural sizes", which is fairly obviously prevnting the layout manager from positioning things correctly.
Hmm after taking a glance at xpGUI. Maybe wrapping GTK for Euphoria may be a better idea? It would be GTK4 of course. I'll look into it some more.
5. Re: Win32 API is Huge
- Posted by ChrisB (moderator) in May
- 397 views
Yes, that makes much more sense.
Cheers
Chris
6. Re: Win32 API is Huge
- Posted by petelomax in May
- 397 views
Hmm after taking a glance at xpGUI. Maybe wrapping GTK for Euphoria may be a better idea? It would be GTK4 of course. I'll look into it some more.
I trust you clocked that xpGUI is WinAPI and GTK. Should you find/make some decent GTK4 dlls, let me know.