1. Win32lib Constants

Hello all,

I just noticed that in the win32lib constants for Windows Version, it only went up to Vista. We're at Windows 11 now.

global constant 
    WIN_3_1     = 1, 
    WIN_95      = 2, 
    WIN_95_OSR2 = 2.5, 
    WIN_98      = 3, 
    WIN_98SE    = 3.5, 
    WIN_ME      = 4, 
    WIN_NT_3_51 = 5, 
    WIN_NT_4    = 6, 
    WIN_2000    = 7, 
    WIN_XP      = 8, 
    WIN_VISTA   = 9, 
    WIN_7 		= 10, 
    WIN_8 		= 11, 
    WIN_8.1		= 11.5, 
    WIN_10		= 12, 
    WIN_11		= 13, 
    WIN_UNKNOWN = 0 

I've added the the other Windows versions. I've also noticed that it could or would probably be a good idea to use change global to public and perhaps even change it to an enum?

Note that I'm not currently maintaining the win32lib library, I'm simply making suggestions for now.

new topic     » topic index » view message » categorize

2. Re: Win32lib Constants

Hi

Is there an official win32lib maintainer? While I am happy to do so, it would essentially be a curator role, as I am sure there are many more capable programmers out there than me.

Also win32 is is being superceded by win64, and ideally there should be a win64 library 'in production'. I know that a lot (most) of the functions have win64 equivalents, its just that Eu / Phix doesn't have a lib to access these.

Cheers

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Win32lib Constants

ChrisB said...

Is there an official win32lib maintainer? While I am happy to do so, it would essentially be a curator role, as I am sure there are many more capable programmers out there than me.

As of late, no. The SourceForge project page lists: dcuny, derekparnell, and mattlewis, all of whom we haven't seen around here more than briefly in the past several years. If anyone's interested in taking over, I could at least go through the work to bring the project over to our OpenEuphoria group on GitHub.

ChrisB said...

Also win32 is is being superceded by win64, and ideally there should be a win64 library 'in production'. I know that a lot (most) of the functions have win64 equivalents, its just that Eu / Phix doesn't have a lib to access these.

It's weird and complicated but in short: they're basically the same thing. The problem isn't access to the 64-bit equivalent functions; that happens automatically when you use 64-bit Euphoria. The problem is that Win32Lib is hard-locked on 32-bit structures.

You'd have to go through and update all of the structure offsets and peek/poke calls to account for 32-bit or 64-bit pointer/integer widths. It might just require changes to w32allot(), w32peek(), etc.

The best approach is to rebuild using "memstruct" feature coming with Euphoria 4.2. I'm hoping to get that feature merged in soon-ish, which means it will hit the bleeding-edge builds on GitHub when I do.

-Greg

new topic     » goto parent     » topic index » view message » categorize

4. Re: Win32lib Constants

ghaberek said...
ChrisB said...

Is there an official win32lib maintainer? While I am happy to do so, it would essentially be a curator role, as I am sure there are many more capable programmers out there than me.

As of late, no. The SourceForge project page lists: dcuny, derekparnell, and mattlewis, all of whom we haven't seen around here more than briefly in the past several years. If anyone's interested in taking over, I could at least go through the work to bring the project over to our OpenEuphoria group on GitHub.

ChrisB said...

Also win32 is is being superceded by win64, and ideally there should be a win64 library 'in production'. I know that a lot (most) of the functions have win64 equivalents, its just that Eu / Phix doesn't have a lib to access these.

It's weird and complicated but in short: they're basically the same thing. The problem isn't access to the 64-bit equivalent functions; that happens automatically when you use 64-bit Euphoria. The problem is that Win32Lib is hard-locked on 32-bit structures.

You'd have to go through and update all of the structure offsets and peek/poke calls to account for 32-bit or 64-bit pointer/integer widths. It might just require changes to w32allot(), w32peek(), etc.

The best approach is to rebuild using "memstruct" feature coming with Euphoria 4.2. I'm hoping to get that feature merged in soon-ish, which means it will hit the bleeding-edge builds on GitHub when I do.

-Greg

Perhaps once 4.2 release which will have the memstruct feature, updating win32lib would be a little easier, though I'd imagine it would take some work to update it, as it is quite a big library.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Win32lib Constants

Icy_Viking said...

Perhaps once 4.2 release which will have the memstruct feature, updating win32lib would be a little easier, though I'd imagine it would take some work to update it, as it is quite a big library.

What I'd recommend, for whoever might take over the project, is to wrap the requisite parts of the Win32 API natively first and then go back and rebuild Win32Lib using those native wrappers.

-Greg

new topic     » goto parent     » topic index » view message » categorize

6. Re: Win32lib Constants

Icy_Viking said...
ghaberek said...

It might just require changes to w32allot(), w32peek(), etc.

memstruct feature, updating win32lib would be a little easier, though I'd imagine it would take some work to update it, as it is quite a big library.

Off the top of my head, a few things would be easier
Create a fair and equitable society
Eliminate world poverty and famine
Prove the existence of your God(s)
Write an oscar winning music score

I know it is loved, for reasons I completely fail to grasp, however rewriting win32lib to be 64-bit compatible would not only be insanely difficult but a complete and awful waste of anyone's time.
It would take at least 5 man-years worth of effort, and I don't think you'd even get 5 users.

Actually, I'll lay down an open challenge: write something [simple or not] in pGUI and tell me why it's worse than win32lib.
Same goes (if it ever gets released) for Irv's new GTK (again as in why that's worse than win32lib).

new topic     » goto parent     » topic index » view message » categorize

7. Re: Win32lib Constants

petelomax said...
Icy_Viking said...
ghaberek said...

It might just require changes to w32allot(), w32peek(), etc.

memstruct feature, updating win32lib would be a little easier, though I'd imagine it would take some work to update it, as it is quite a big library.

Off the top of my head, a few things would be easier
Create a fair and equitable society
Eliminate world poverty and famine
Prove the existence of your God(s)
Write an oscar winning music score

I know it is loved, for reasons I completely fail to grasp, however rewriting win32lib to be 64-bit compatible would not only be insanely difficult but a complete and awful waste of anyone's time.
It would take at least 5 man-years worth of effort, and I don't think you'd even get 5 users.

Actually, I'll lay down an open challenge: write something [simple or not] in pGUI and tell me why it's worse than win32lib.
Same goes (if it ever gets released) for Irv's new GTK (again as in why that's worse than win32lib).

If I was able to get EFL/Enlightenment to compile/build under Windows, I'd write a wrapper for that. But so far I haven't had any luck. The EFL library has a nice simple C-API and lots of widgets for a GUI.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Win32lib Constants

Icy_Viking said...

If I was able to get EFL/Enlightenment to compile/build under Windows, I'd write a wrapper for that. But so far I haven't had any luck. The EFL library has a nice simple C-API and lots of widgets for a GUI.

One thing that would really help me is for someone to peruse https://rosettacode.org/wiki/Category:Phix/pGUI (though it may be easier to begin with those that are also on https://rosettacode.org/wiki/Category:Phix/online) and see what needs improvement. Then get it running locally and try tweaking pGUI.js and pGUI.css to see if you can make it better, which will require some JavaScript and CSS but hopefully not much more than the stuff already there. Resize is known to be a shambles. (Fun fact: Did you know that shambles was originally the word for a butcher's table? It later came to mean a meat market and then an open air slaughterhouse, before picking up the modern sense of "mess".)

I am open to bending JavaScript/CSS to match desktop/Phix, or bending desktop/Phix to match JavaScript/CSS, and of course will answer any questions that might pop up as best I can.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu