I've got two questions:
You can use:
String platform = SWT.getPlatform();
which returns "win32", "motif", "gtk", "photon", "carbon", "cocoa", "wpf" ...
It is rare to actually need to use this.