X11 library wrapper for Cocoa

drewangst

Registered
I've seen a lot of posts the touch on the subject but I haven't seen any major discussion on it.
Is anyone working on or considering working on creating X11 wrappers for Cocoa? Basically you just compile your X windows app with these libraries. It seems like it would be a great way to get more people using OS X.
It would be good to release it under the BSD license rather then GPL. This would allow companies that are porting their apps from Solaris to Linux/FreeBSD to create an OS X port with minimal effort. This could help legitimize OS X for the corporate workstation. (kind of like what's happening to linux right now)

Andrew
 

strobe

Puny Member
There are several problems with this proposal:

1) X11 is not just a graphics library

2) If I were porting an X11 app, the first thing I would do is throw away all the X11 code even if I could retain it. 90% of X11 code is drawing stuff which is taken care of by various Views like tables, text, images, buttons, sliders, etc. The exceptions to this rule are mostly cheesy 2D games not using SDL.

3) There is absolutely no point to porting an app to OS X if you're not going to change the interface. Writing a library allowing X11 programmers to recompile their aps will result in X11 apps. X11 code results in X11 apps. You may as well run rootless X11.

4) X11 apps generally suck ass and aren't worth porting. Those which do not are for the most part commercial and ought to be ported properly.
 

drewangst

Registered
>1) X11 is not just a graphics library
Needless nitpicking, a useless statement. I know it's not just a library. I'm just trying to simplify the description.

>2) If I were porting an X11 app, the first thing I would do is throw away all the X11 code even if I could retain it. 90% of X11 code is drawing stuff which is taken care of by various Views like tables, text, images, buttons, sliders, etc. The exceptions to this rule are mostly cheesy 2D games not using SDL.

That takes time. What if I didn't have to throw away anything and could recompile my app with this wrapper? Couldn't I get my product out the door faster? Wouldn't it be just as usable as before?

>3) There is absolutely no point to porting an app to OS X if you're not going to change the interface. Writing a library allowing X11 programmers to recompile their aps will result in X11 apps. X11 code results in X11 apps. You may as well run rootless X11.

Yes there is a point to porting X11 apps to OS X. Apparently you missed it. Say I have a piece of software and I want to port that to OS X with minimal effort. If I could just recompile it with Cocoa and the X11 cocoa wrappers, then I wouldn't have to do much else to get it running on OS X. Why would someone want to redesign a perfectly good interface just to port it to some onther os?

>4) X11 apps generally suck ass and aren't worth porting. Those which do not are for the most part commercial and ought to be ported properly.

I've seen a lot of very good freeware X11 apps, but that's not my main focus. This would give companies a way to get their apps up and running in a short time.
Then after it is out you can work at your leasure to port it properly. (mainly for performance)

You missed the whole point of my post. I'm thinking from
a mac workstation point of view. Basically there are tons of commercial apps out, that are very good and very useful. I'm not talking about all the freeware open source apps, some of which are very good.
Runnng a rootless version of X if fine for a typical person using their mac as at home, but it wouldn't fly in a corporate environment, plus rootless X is still alpha. I'm talking about a company using macs as their workstations as an alternative to a Sun workstations. This is starting to happen with Linux.

Andrew

 

strobe

Puny Member
Originally posted by drewangst
>1) X11 is not just a graphics library
Needless nitpicking, a useless statement. I know it's not just a library. I'm just trying to simplify the description.
It's not nitpicking, it's relevant to the question asked. A graphics library like quickdraw or say GRASS 5 display driver can fall within the scope of a view. Only some of X11 can be treated like this, a lot of it cannot and thus falls outside the scope of such a wrapper.



>2) If I were porting an X11 app, the first thing I would do is throw away all the X11 code even if I could retain it. 90% of X11 code is drawing stuff which is taken care of by various Views like tables, text, images, buttons, sliders, etc. The exceptions to this rule are mostly cheesy 2D games not using SDL.

That takes time. What if I didn't have to throw away anything and could recompile my app with this wrapper? Couldn't I get my product out the door faster? Wouldn't it be just as usable as before?
It would be exactly like running rootless X11 therefore it's pointless.

It would not be a mac app, it would be an X11 app not technically using 'X11' but looking, behaving, in fact BEING an X11 app.

It would only be usable to somebody who wants to use an X11 app and not a mac app.



>3) There is absolutely no point to porting an app to OS X if you're not going to change the interface. Writing a library allowing X11 programmers to recompile their aps will result in X11 apps. X11 code results in X11 apps. You may as well run rootless X11.

Yes there is a point to porting X11 apps to OS X. Apparently you missed it. Say I have a piece of software and I want to port that to OS X with minimal effort. If I could just recompile it with Cocoa and the X11 cocoa wrappers, then I wouldn't have to do much else to get it running on OS X. Why would someone want to redesign a perfectly good interface just to port it to some onther os?
Two reasons:

1) The result would be no different than using rootless X11

2) OS X has interface guidelines, something X11 programmers don't have a clue about.

I didn't miss anything. I'm running X11 applications using gparker's rootless patch for XFree86. What you're prosing wouldn't change anything. It's pointless.



>4) X11 apps generally suck ass and aren't worth porting. Those which do not are for the most part commercial and ought to be ported properly.

I've seen a lot of very good freeware X11 apps, but that's not my main focus. This would give companies a way to get their apps up and running in a short time.
Then after it is out you can work at your leasure to port it properly. (mainly for performance)

You missed the whole point of my post. I'm thinking from
a mac workstation point of view. Basically there are tons of commercial apps out, that are very good and very useful. I'm not talking about all the freeware open source apps, some of which are very good.
Runnng a rootless version of X if fine for a typical person using their mac as at home, but it wouldn't fly in a corporate environment, plus rootless X is still alpha. I'm talking about a company using macs as their workstations as an alternative to a Sun workstations. This is starting to happen with Linux.

Andrew

What you're proposing would be absolutely no different than running rootless X11 in terms of interface. If rootless X11 isn't going to fly, neither is your suggestion. Unless you're going to waste time writing it yourself I would give up on the idea.
 

rharder

Do not read this sign.
Anyhoo, I haven't heard of a project such as you describe, drewangst, but I agree that having an easy way to port apps from other windowing systems to OS X would be great.

-Rob
 

strobe

Puny Member
great...except it breaks the expectation that when you see an app which appears to be a mac app, it behaves like one.

Say goodbye to HI uniformity, which is the only reason people use MacOS
 
Top