Imagine: A GUI standard.

N

noridotjabi

Why isn't there a Graphical User Interface standard? Think about it
for a second. You may say, well evey systems API for GUIs is differnt,
but do take into acound: every operating system requires differnt
compilations and often totally differnt compiler code. For instance
gcc on windows in not the same code as gcc on linux/unix but it
produces the same programs when you use it to compile. Yes you can
take something like:

#include <stdio.h>

int main(void) {
printf("Hello, world!\n");
return 0;
}

And compile it on Mac OS X, Windows XP, Debian Linux, freeBSD, etc.
Each time(especially on the unposix driven OS's) differnt machine code
is generated. So why can't you take:

#include <stdgio.h>

int main(void) {
stdwin s_window;

s_window = makenewwin(WINDOW_DIALOG);
win_printf(s_window, "Hello, World!");
wait(5);
closewin(s_window);

return 0;
}

All of the functions above are imagineary of course but why havn't they
been created? Graphical User Interfaces have existed scince the Mid
80's (or maybe earlier correct me if I am wrong) yet there is still no
C standard about them. Yes more coding would be required on SEVERAL
systems, but it doesn't even apear as though there has been much effort
to make a standered for GUI. Porting GUI programs from linux to
windows, or back, is hell. Sure there are things that exist for
windows and linux for example GTK, but, there are differances, and this
is not "standard".
How long is it going to take before someone says "Okay, you know what,
text based user interfaces are not what most users use, wouldn't it be
nice to make it so that there is nice C standard based on GUIs?".
Well? Wouldn't it?
Nori
 
F

Frederick Gotham

(e-mail address removed) posted:
Why isn't there a Graphical User Interface standard?


There is, kind of. There's libararies available on the internet (can't
think of any of their names) which do exactly that -- you can compile your
GUI code for Windows, Linux, Mac OS...
 
A

Andrew Poelstra

(e-mail address removed) posted:



There is, kind of. There's libararies available on the internet (can't
think of any of their names) which do exactly that -- you can compile your
GUI code for Windows, Linux, Mac OS...

Allegro is one. But this is OT to comp.lang.c. It's possible that it'd
be ontopic in comp.std.c.
 
E

Eric Sosman

Why isn't there a Graphical User Interface standard? [...]

There are lots of them. Enough, as the humorists like
to say, so everybody can have a standard all his own.
How long is it going to take before someone says "Okay, you know what,
text based user interfaces are not what most users use, wouldn't it be
nice to make it so that there is nice C standard based on GUIs?".

You know, graphical interfaces are not the only other
standards that exist. There are also standards for sound,
for parallelism, for networking, for operating systems, for
safety-critical systems, for navigation, for telephony, ...

What do you think would happen if all these standards
were somehow adopted as part of the C programming language?
For one thing, the C Standard would need to be printed in
multiple volumes occupying a couple meters of shelf space.
For another, the committee meetings would have such a huge
number of participants with conflicting purposes that no
revision of the standard could ever be finished. And let's
not even think about how long it would take before complete
implementations of this super-C became available (just look
at how slow C99 uptake has been). And, of course, since all
these standards would be part of C -- not part of C++ or
Java or Lisp or Python or NameYourFavoriteLanguage -- there
would be enormous inter-language compabibility problems.

There are many useful standards. Most of them should
not be part of a programming language definition.
 
K

Keith Thompson

Andrew Poelstra said:
Allegro is one. But this is OT to comp.lang.c. It's possible that it'd
be ontopic in comp.std.c.

Only if you're suggesting a change to the C standard.
 
W

Walter Roberson

Why isn't there a Graphical User Interface standard?

There are lots of them! Indeed, that's a big part of the problem.
So why can't you take:
#include <stdgio.h>
int main(void) {
stdwin s_window;
s_window = makenewwin(WINDOW_DIALOG);
win_printf(s_window, "Hello, World!");
wait(5);
closewin(s_window);
return 0;
}
All of the functions above are imagineary of course but why havn't they
been created? Graphical User Interfaces have existed scince the Mid
80's (or maybe earlier correct me if I am wrong) yet there is still no
C standard about them.

With good reason. Have you ever looked at the size of the documentation
for X and Motif??? Programming a graphics system takes a *lot* of work,
if it is to be sufficiently general and flexible and efficient.

Various attempts have been made to create industry standards for
graphics. OpenGL (an open standard) is a good example -- as is Microsoft's
reaction to OpenGL of creating Direct-X. You know the refrains,
"OpenGL isn't efficient enough", and "OpenGL interferes with our
ability to innovate."

Graphics standards have a lot of economic politics involved, because
there is big business in creating fast graphics cards.

If you weren't thinking as big as X or OpenGL or Direct-X, then
you must be thinking of a relatively restricted API -- but then what
do you include and what don't you?


There has been a huge effort into creating portable graphic systems
that look pretty much the same on every platform -- it is called Java.
Released by Sun, made incompatible by Microsoft until a Sun forced
the issue in court.

I'm not at all familiar with Java internals; the rumblings I've heard
are that a port of Java to a new system is a considerable effort (which
is why it isn't uncommon for OS vendors to lag several releases
behind.) How productive would you say it would be for the X3.159
committee people to get together and re-invent the Java graphics
interface? Is Microsoft likely to adopt the hypothetical standard
if it it provides substantial flexibility? Or are you thinking
only of something with less capabilities than tcl/tk ?
 
W

William Ahern

On Mon, 26 Jun 2006 14:25:09 -0700, (e-mail address removed) wrote:
How long is it going to take before someone says "Okay, you know what,
text based user interfaces are not what most users use, wouldn't it be
nice to make it so that there is nice C standard based on GUIs?". Well?
Wouldn't it?
Nori

The fatal error here is assuming that C even provisions for a
"text based user interface". Fact is, I don't believe the C describes any
kind of user interface system.

It has stream oriented I/O and even records (aka "lines"), but Plan9
managed to use stream oriented I/O for building a GUI system, so....
 
A

Andrew Poelstra

Only if you're suggesting a change to the C standard.

Unless he was rambling in the wrong group and his post had absolutely
nothing to do with C, I believe that he /was/ suggesting a change to
the C standard.

But that's just my interpretation of what he decided to post and where
he decided to post it.
 
G

Gordon Burditt

Why isn't there a Graphical User Interface standard? Think about it
for a second. You may say, well evey systems API for GUIs is differnt,
but do take into acound: every operating system requires differnt
compilations and often totally differnt compiler code. For instance
gcc on windows in not the same code as gcc on linux/unix but it
produces the same programs when you use it to compile. Yes you can

Assume there is such a standard. How would you go about writing a
non-trivial application that runs well on (a) a cellphone with a
1" screen AND (b) a PC with a 15" or larger monitor? Also, cellphones
have considerably fewer keys than a PC keyboard. Some cellphones
don't have meece, thumbscroll, touchpads, or anything equivalent.
Regardless of the technology (e.g. you might be able to get a 1"
screen with 102400 x 76800 pixels if necessary), but you DO NOT get
to require laser eye surgery for the users attempting to use it,
nor do you get to reduce the size of the user's fingers.
int main(void) {
stdwin s_window;

s_window = makenewwin(WINDOW_DIALOG);
win_printf(s_window, "Hello, World!");

Didn't you forget something about what font to use here?
And the size of the window?
wait(5);
closewin(s_window);

return 0;
}

Gordon L. Burditt
 
G

Gernot Frisch

Well, C is a std language for all sorts of devices. Some don't even
have a display, or just a 6-char LCD display. What then? You implement
a std that can't be fulfilled by some device, which makes the language
crap.
Let C be C and GUI be GUI. Get a library for GUI programming. There's
lots out there and lots of free and lots of x-platform.
Examples:
C++: wxWidgets, Fox-Toolkit
C: GTK
 
F

Flash Gordon

Gordon said:
Assume there is such a standard. How would you go about writing a
non-trivial application that runs well on (a) a cellphone with a
1" screen AND (b) a PC with a 15" or larger monitor? Also, cellphones

One could reasonable assume that such a library would not be required
for freestanding environments just as most of the rest of the library is
not required for freestanding environments. So unless your cellphone is
a hosted environment it is not too relevant to the argument.

A bigger problem is a server with no GUI installed, and I certainly come
across those and use them as hosted implementations.

Didn't you forget something about what font to use here?
And the size of the window?

Yes, he missed some stuff. However I would assume it was only meant to
show the concept, not the detail. It is obviously possible to define a
cross platform GUI library since several have been done, the question is
whether it should be part of the C standard. I'm not convinced it should
be and I doubt that those producing cross platform libraries would be
convinced that they should change to meet some new GUI interface standard.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc

Inviato da X-Privat.Org - Registrazione gratuita http://www.x-privat.org/join.php
 
P

pemo

Why isn't there a Graphical User Interface standard?

<snip>

One of the 'standards' bodies I worked on for sometime had the rather catchy
title of P1201 (Google for IEEE and 1201 [also 1201.1 and 1201.2]). Anyway,
after years of work, the best we could politically get through was a
'recommended practice' - which was as effective as a one legged arse kicker
of course! If it weren't OT, I could bore you to death with some tales that
you curl your toes!
 
P

pete

pemo said:
as effective as a one legged arse kicker

http://www.obsessedwithwrestling.com/profiles/t/tenacious-z.html
Finishing Move: One-Legged Moonsault
Favorite Moves: One-Legged Dropkick
One-Legged Asai Moonsault
Swinging Neckbreaker

http://www.obsessedwithwrestling.com/profiles/b/big-show.html
Height & Weight: 7'1" - 493 lbs

http://www.obsessedwithwrestling.com/results/smackdown/030703.html
Zach Gowan kicks a chair into Big Show's face!
Zach Gowan dropkicks Vince McMahon,
and then hits a one-legged moonsault on the Big Show!!
Zach Gowan pins the Big Show to win a WWE wrestling contract!!!!!!!!!!
 
C

Christopher Benson-Manica

Flash Gordon said:
A bigger problem is a server with no GUI installed, and I certainly come
across those and use them as hosted implementations.

Indeed, although it would theoretically be possible for the GUI calls
to degenerate to some curses-like functionality on such a system.
Yes, he missed some stuff. However I would assume it was only meant to
show the concept, not the detail. It is obviously possible to define a
cross platform GUI library since several have been done, the question is
whether it should be part of the C standard. I'm not convinced it should
be and I doubt that those producing cross platform libraries would be
convinced that they should change to meet some new GUI interface standard.

I'm not convinced people would use this proposed GUI interface
standard even if it could be wished into implemented existence
tomorrow. Presumably the vast majority of situations where standard
or nearly-standard cross-platform GUI behaviors are required are
already being handled by Java or any of the numerous GUI toolkits
previously mentioned.
 
C

Chris Hills

Why isn't there a Graphical User Interface standard?

This got argued to death in comp.std.c a few months ago.
Think about it
for a second.

They did and the answer was still "NO"

All of the functions above are imagineary of course but why havn't they
been created? Graphical User Interfaces have existed scince the Mid
80's (or maybe earlier correct me if I am wrong) yet there is still no
C standard about them.

Because every one has their own way of doing it. There are many
commercial systems already out there who will not want to conform to
your version. So most if not all of the companies doing graphic
libraries or GUI's (not the same thing) would stop your proposed system
for years in the standards process. IT would die there and not one wants
to put effort into it.
Yes more coding would be required on SEVERAL
systems, but it doesn't even apear as though there has been much effort
to make a standered for GUI.

Because no one wants one. If the industry wanted one they would do it.
How long is it going to take before someone says "Okay, you know what,
text based user interfaces are not what most users use, wouldn't it be
nice to make it so that there is nice C standard based on GUIs?".
Well? Wouldn't it?
Nori

No.
 
G

Gordon Burditt

Why isn't there a Graphical User Interface standard? Think about it
One could reasonable assume that such a library would not be required
for freestanding environments just as most of the rest of the library is
not required for freestanding environments. So unless your cellphone is
a hosted environment it is not too relevant to the argument.

Assume that this is something called the "C GUI Extension", not a
requirement for C itself, and that the author of the implementation
on the cellphone actually tried hard to make it work well on the
cellphone, even if other parts like a file system not present or
very limited. I think there's a real use for common GUI code for,
say, option setting, between a cellphone and a program on a PC
used to sync data to the cellphone and mass-program cellphones.
A bigger problem is a server with no GUI installed, and I certainly come
across those and use them as hosted implementations.

My point here is that the "least common denominator" for a GUI,
assuming you've GOT hardware for a GUI, may be virtually unusable,
entirely due to hardware issues such as size of the screen, that
can't be papered over with software or surgery on the prospective
users of the device.
Yes, he missed some stuff. However I would assume it was only meant to
show the concept, not the detail. It is obviously possible to define a
cross platform GUI library since several have been done,

Have several been done in a way that portable programs can be written
that run on very GUI hardware-limited platforms so that they are
actually considered USABLE on such a platform *and* don't look
painfully primitive on a PC with decent display and graphics hardware?
the question is
whether it should be part of the C standard.

At best, I can see it as "The C GUI extension" which a C implementation
may claim to include or may not. (compare against POSIX compatability).
I have my doubts about whether that should be included in the C
standard vs. another standard.
I'm not convinced it should
be and I doubt that those producing cross platform libraries would be
convinced that they should change to meet some new GUI interface standard.

Gordon L. Burditt
 
W

websnarf

Why isn't there a Graphical User Interface standard?

There are many such standards to choose from!

A GUI is a specific solution to a problem which connects event-based
user input from devices such as mice and keyboard with a 2D graphics
output frame buffer device. So what you should first ask for is a
standard for for input devices such as mice and keyboard (and maybe
joysticks) based on events and then a standard for graphics frame
buffer devices.

Microsoft's Direct X is an example standard that covers these (but
which is obviously platform specific.) X exists but is not considered
ideal. OpenGL is an example of a graphics frame buffer device
standard. OpenGL has a not insignificant amount of platform buy-in.
So it would seem that the real problem is the lack of an event-based
user input standard that is really missing.

Designing a GUI on top of such standards seems to me to be really kind
of application specific. But by having good device standards to begin
with, it would make it more possible to make any such GUIs more
portable. This would mean that competition would be more vibrant and
might eventually lead to a dominant market leader which might lead to a
defacto standard.
 
M

Mark McIntyre

Why isn't there a Graphical User Interface standard?

There are many...
80's (or maybe earlier correct me if I am wrong) yet there is still no
C standard about them.

Note that a GUI isn't a C feature, its an OS feature.
systems, but it doesn't even apear as though there has been much effort
to make a standered for GUI.

Actually there have been many efforts, going back as far as I can
remember. I first programmed UIs in PANEL, which was a multiplatform
UI. Then there's GTK ,which exists across multiple platforms, and
TCL/TK, and Neuron Data's OI, and....
nice to make it so that there is nice C standard based on GUIs?".
Well? Wouldn't it?

Not much call for a GUI on refrigerators, train track monitors and
nuclear installations.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top