[AD] allegro_message under X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Under UNIX/linux, allegro_message() outputs to stdout no matter what. This
makes sense when using the console driver, but when running under X, this is
far from optimal. Just like in Windows, stdout might not be visible to the
user.
That's why I would like to make allegro_message() display a dialog box under
X, if possible. The problem is that as I understand it, there is no universal
"MessageBox()" API like in Windows. I can see the following ways of
displaying a message box:
1. use the command line utility kdialog (or gdialog) if available
2. use xdialog if available (maybe it is always available with X ?)
3. implement a message box using the X11 lib (ugh!)
kdialog and gdialog are nice because they follow KDE's/Gnome's look and feel.
If the idea seems good, I can have a go at implementing it. There are just a
few issues:
A. I know nothing about the X11 lib, so I won't use it :-) I'm not sure it's
a good idea anyway.
B. what's the best way to check for the existence of a command ? Try to run
it with system("kdialog...") and check the return status ?
C. if both kdialog and gdialog are available, is there a fool-proof way to
know what Desktop Environment the user is currently running ?
--
Julien Cugnière