[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] Re: Mac OS X Port
|
Hello, Mark.
Thanks for the reply - I am forwarding it to the mailing list.
Please send all replies to the mailing list, not personal email.
We would like to make sure that email that would benefit the whole
community is always sent to the list.
About Cocoa - a common problem with bindings that are not one-to-one is
that they can be "slow and buggy".
Please read the SWT article that discusses the one-to-one mapping - this
is *very* important to us:
http://www.eclipsecorner.org/articles/Article-SWT-Design-1/SWT-Design-1.html
Please also read our mandate - baically, we try to provide as thin a layer
between the application and the OS as possible:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/main.html
The following article on writing your own widgets - particularly the
section on wrapping a native widget - may also be helpful:
http://www.eclipsecorner.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm
Having said all of that, when the team is put together, whether or not to
use Cocoa will be a team decision.
Carolyn
"Mark Phippard" <MarkP@xxxxxxxxxxxxxxx>
11/12/2001 04:16 PM
To: "Carolyn MacLeod/OTT/OTI" <Carolyn_MacLeod@xxxxxxx>
cc:
Subject: Re: [platform-swt-dev] Re: Mac OS X Port
Carolyn,
Thanks for the reply and the encouragement.
One great thing about using the Cocoa bindings is that currently every
copy
of OS X has these installed so there would be nothing extra to distribute.
Every OS X system is guaranteed to have JRE 1.3 and these Apple classes. I
think that they are even automatically in the CLASSPATH.
I do not think there are any licensing issues, they are just part of the
standard API provided by the OS.
There are actually only two ways you can write to Cocoa - Objective-C and
Java.
Hopefully someone will step forward to lead this. I posted a message on
the MacNN forums to hopefully drum up some more interest. On the negative
side, some of the postings on that forum indicate that the Cocoa bindings
are buggy and slow. Hopefully this is not truly the case.
Mark
"Carolyn
MacLeod/OTT/OTI" To:
platform-swt-dev@xxxxxxxxxxx
<Carolyn_MacLeod@xxxxxxx cc:
> Subject:
[platform-swt-dev] Re: Mac OS X Port
Sent by:
platform-swt-dev-admin@e
clipse.org
11/12/01 03:39 PM
We think it's a great idea to do a Mac port, and we are pleased to
see this much interest. To get you started we can set up separate Mac
mailing list, and provide a template of SWT API stubs. We are willing
to offer technical guidance, and review and commit code.
However there are certain things that are required before this can happen:
1) We need to get PMC approval to make this part of the Eclipse project.
2) A technical lead must come forward from the community who is willing
to make a commitment to see the project through to its completion.
The most important experience is **Mac OS programming** and C.
The current SWT team is already fully committed for the near future.
3) The port has to be well done and consistent with existing SWT
implementations.
Here are a few more notes based on the discussion so far.
The Cocoa bindings should be investigated but there are things you have to
keep in mind before using them:
- are there licensing issues?
- how big is the jar file?
- can we discard unused API to reduce memory footprint?
- does it map directly to the OS?
- what versions of the OS does it support?
We recommend you read the following:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/main.html
http://www.eclipsecorner.org/articles/Article-SWT-Design-1/SWT-Design-1.html
http://www.eclipsecorner.org/eclipse/eclipse-charter.html
To get a feel for swt programming, check out our example plugins:
- org.eclipse.swt.examples
- org.eclipse.swt.examples.controls
- org.eclipse.swt.examples.launcher
- org.eclipse.swt.examples.paint
To look at the SWT implementation, connect to the repository using:
:pserver:anonymous@xxxxxxxxxxxxxxx:/home/eclipse
and load the latest version (v2012) of org.eclipse.swt,
or if you are really wild, load org.eclipse.swt from the HEAD stream.
If you are using Eclipse to browse the code, you will need to copy the
.classpath_xxx file for your platform to ".classpath".
For example, copy .classpath_win32 to .classpath
To see an example SWT OS binding (to the win32 API) look at:
org.eclipse.swt.internal.win32.OS - Java side JNI code
org.eclipse.swt/Eclipse SWT/win32/library/swt.c - 'C' side JNI code
If you really want to get your feet wet and start coding to the Mac API,
the first step is to create a top level shell with a button in it using
only library calls, and implement an event loop. Here is an example from
win32:
package org.eclipse.swt.examples.win32;
import org.eclipse.swt.internal.win32.*;
public class BigButton {
public static void main (String [] args) {
TCHAR lpClassName = new TCHAR (0, "BUTTON", true);
int hInstance = OS.GetModuleHandle (null);
int hwnd = OS.CreateWindowEx (
0,
lpClassName,
null,
OS.WS_OVERLAPPEDWINDOW | OS.WS_VISIBLE,
OS.CW_USEDEFAULT,
OS.CW_USEDEFAULT,
OS.CW_USEDEFAULT,
OS.CW_USEDEFAULT,
0,
0,
hInstance,
null);
MSG msg = new MSG ();
while (OS.GetMessage (msg, 0, 0, 0)) OS.DispatchMessage (msg);
}
}
So just to reiterate:
If you want to get an SWT Mac port project started, here's what you do:
- find a technical lead
- establish that you have a community
- report back to Mike Wilson, the SWT team lead, to officially launch the
project
Carolyn, Veronika, Steve, and Mike
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev