<windows.h> for macOS?

Pages: 12
Does anyone know if there is a good version of the <windows.h> header file for macOS? Specifically, Mac OS X High Sierra. Any suggestions/advice is welcome.

My objective is to eventually get into making GUI's with HTML, but I want to start with some basic TUI programs.

Thanks!
max
Last edited on
Unsurprisingly, the Windows API exists on Windows only.

To make terminal UIs you can use ncurses or PDcurses.
I've heard of those, are they standard on macOS or do you have to download them?
I would guess the latter.
Ah, ok. Well thanks! I'll look into them!
google, she say brew install ncurses
who knows what it means, but they claim it works.
Last edited on
It might be referring to Homebrew...I'm not sure exactly what that is, but it has something to do with curses.

Ah. Wikipedia to the rescue:
https://en.wikipedia.org/wiki/Homebrew_(package_manager)

I'll see if I can find Ncurses for download from something that doesn't look too seedy...
I would help but they locked up macs a while back (guess it was a bit before 2000, the last 20 have been a bit of a blur) and made them too much trouble to use with that 'certified programs only from our store only' nonsense and all. I am way too far out of the loop to do more than suggest search terms
Hmm. When I use the debugger lldb, it has a command "gui" that "switches into the curses-based GUI mode." I wonder if that means I already have it? This is what it looks like:
| LLDB (F1) | Target (F2) | Process (F3) | Thread (F4) | View (F5) | Help (F6) |
┌──<Sources>───────────────────────────────────────────────────┐┌──<Threads>───┐
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
└──────────────────────────────────────────────────────────────┘│              │
┌──<Variables>─────────────────────────────────────────────────┐│              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
│                                                              ││              │
└──────────────────────────────────────────────────────────────┘└──────────────┘

You can switch between the three "windows" using the Tab key, and "h" brings up a help menu, but I can't figure out what else it does.
The "f1", "f2", etc keys don't do anything, which makes no sense.

Edit:
I googled "lldb curses mode" and found this:
http://peeterjoot.com/2019/08/26/the-lldb-tui-text-user-interface/
Last edited on
If'n you are wanting to create GUI apps like you can with the Windows API you might want to look at a cross-platform library.

SFML, wxWidgets or Qt are 3 very popular libraries, not necessarily in this order:
https://www.sfml-dev.org/
http://wxwidgets.org/
https://www.qt.io/

Bjarne Stroustrup, the creator of C++, uses FLTK in his "Programming Principles and Practice Using C++, 2nd Edition" book:
https://www.fltk.org/index.php
Thanks! I'll check those out!

I have heard of wxWidgets before, but I thought it was for Windows.
I don't use any 3rd party GUI libraries, but if'n I were to choose one it would probably be wxWidgets.

Why? Because the library uses the given platform's native API instead of creating a simulated graphical API. AFAIK other GUI libraries use their own GUI API.

When I do GUI I use Windows system API, since all my tools are usable on Win 10.

2nd choice would be FLTK. Saint Bjarne can't be wrong about it. :Þ
I don't use a mac, but if I remember correctly, Apple used to use a framework called Carbon, then discontinued it favor of their newer framework called Cocoa.
https://en.wikipedia.org/wiki/Cocoa_(API)
Why? Because the library uses the given platform's native API instead of creating a simulated graphical API. AFAIK other GUI libraries use their own GUI API.
What most GUI toolkits do is manually draw their own controls. If you look at Qt applications carefully you can spot the differences. wxWidgets just translates its calls into the underlying API.
IMO by itself this is kind of a silly reason to choose one library over another.
Furry Guy,
I don't think I can use Windows API's since I have a Mac, but I'll look into wxWidgets.

Ganado,
Thanks! I'll try that!
I know you can't use the Windows System API on a Mac, but I can 'cuz I have Win 10 for my computers.
My objective is to eventually get into making GUI's with HTM


VS2019 for MAC provides development with :

C#, F#, Razor, HTML5, CSS, Javascript, Typescript, XAML, and XML
https://visualstudio.microsoft.com/vs/mac/

At the bottom of the page is a comparison chart listing what VS 2019 does, Windows vs. Mac.

Visual Studio for Mac is available in a Community edition, it's free.
https://visualstudio.microsoft.com/vs/mac/activation/

FYI, <windows.h> isn't the sole header needed for creating GUI apps on Windows devices. Depending on what Windows System features you are wanting to utilize other headers have to be included. There are other headers included in <windows.h> already.

seeplus,
I know that Microsoft is making VS available for Mac, but I don't really want it, mainly because

1: it's waaay too complicated for a simple programmer like me...most Windows software seems to be like that; huge, complicated, and slow (It literally took me three weeks just to figure out how to change the page view in Word).

2: I'm one of those purists that thinks you shouldn't use Windows software on a Mac computer (the only reason I use MS Word is because it's what my boss wants me to use).

3: It doesn't have Python (!!!), which I am planning to teach myself one of these days.

4: I don't particularly need all those languages, and the ones I might need, like HTML5, CSS, JavaScript, and XML, I already have in my code editor (TextMate).

Furry Guy,
Thanks, but like I said above, I don't want VS. I used it before, in college, and...no offense...but it sucked. It might have improved over the years, but Word and PowerPoint haven't, so...

I want to note; if I haven't said this already, I have a Mac, not Windows. So, I don't want Windows software. I want something that does the same thing, but is designed for Mac, not Windows.

I'm not trying to be rude– and if I am, I'm sorry– , I'm just trying to make sure you understand what I'm looking for.
I take it you're not a windows fan.... :) :)
Pages: 12