[swt-gtk] 01/01: Imported Upstream version 4.3.1

Jakub Adam xhaakon-guest at moszumanska.debian.org
Sun Dec 15 15:29:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

xhaakon-guest pushed a commit to annotated tag upstream/4.3.1
in repository swt-gtk.

commit 8b78e239ba36c5288043aecc11776a70a6b7599a
Author: Jakub Adam <jakub.adam at ktknet.cz>
Date:   Sun Dec 15 16:17:28 2013 +0100

    Imported Upstream version 4.3.1
---
 about.html                                         |    4 -
 about_files/about_cairo.html                       |   48 -
 about_files/pixman-licenses.txt                    |   92 -
 atk.c                                              |   70 -
 atk_stats.c                                        |   19 +-
 atk_stats.h                                        |   14 +-
 build.sh                                           |   43 +-
 c_stats.c                                          |    7 +-
 cairo.c                                            |   38 +
 cairo_custom.h                                     |    2 +
 cairo_stats.c                                      |    7 +-
 cairo_stats.h                                      |    2 +
 cairo_structs.c                                    |    2 +-
 cairo_structs.h                                    |    2 +-
 callback.h                                         |    2 +-
 cde_stats.c                                        |    7 +-
 glx_stats.c                                        |    7 +-
 gnome.c                                            |  100 +-
 gnome_stats.c                                      |   16 +-
 gnome_stats.h                                      |   11 +-
 make_common.mak                                    |    6 +-
 make_freebsd.mak                                   |    2 +-
 make_linux.mak                                     |   21 +-
 make_solaris_x86.mak                               |    2 +-
 nsIScriptContext.h                                 |    2 +-
 nsIScriptContext_17.h                              |  398 ++
 nsIScriptGlobalObject.h                            |    2 +-
 nsIScriptGlobalObject_17.h                         |  140 +
 org/eclipse/swt/SWT.java                           |   48 +-
 org/eclipse/swt/SWTError.java                      |    2 +-
 org/eclipse/swt/SWTException.java                  |    2 +-
 org/eclipse/swt/accessibility/ACC.java             |    8 +-
 org/eclipse/swt/accessibility/Accessible.java      |   85 +-
 .../accessibility/AccessibleAttributeAdapter.java  |    5 +-
 .../accessibility/AccessibleAttributeEvent.java    |   86 +-
 .../accessibility/AccessibleAttributeListener.java |    5 +-
 .../swt/accessibility/AccessibleFactory.java       |    4 +-
 .../swt/accessibility/AccessibleObject.java        |  257 +-
 org/eclipse/swt/awt/SWT_AWT.java                   |   13 +-
 org/eclipse/swt/browser/AppFileLocProvider.java    |   10 +-
 org/eclipse/swt/browser/Browser.java               |   27 +-
 org/eclipse/swt/browser/BrowserFactory.java        |   16 +-
 org/eclipse/swt/browser/DownloadFactory.java       |    4 +-
 org/eclipse/swt/browser/DownloadFactory_1_8.java   |    4 +-
 org/eclipse/swt/browser/Download_1_8.java          |    2 +-
 org/eclipse/swt/browser/External.java              |   15 +-
 org/eclipse/swt/browser/ExternalFactory.java       |    4 +-
 org/eclipse/swt/browser/FilePicker.java            |   15 +-
 org/eclipse/swt/browser/FilePickerFactory.java     |   10 +-
 .../{FilePicker_1_8.java => FilePicker_17.java}    |   62 +-
 org/eclipse/swt/browser/FilePicker_1_8.java        |    2 +-
 .../swt/browser/HelperAppLauncherDialog.java       |    4 +-
 .../browser/HelperAppLauncherDialogFactory.java    |    4 +-
 .../swt/browser/HelperAppLauncherDialog_1_9.java   |    4 +-
 org/eclipse/swt/browser/InputStream.java           |    4 +-
 org/eclipse/swt/browser/Mozilla.java               |  327 +-
 org/eclipse/swt/browser/MozillaDelegate.java       |   50 +-
 org/eclipse/swt/browser/PromptAuth2.java           |    4 +-
 org/eclipse/swt/browser/PromptFactory.java         |    6 +-
 org/eclipse/swt/browser/PromptService2.java        |    4 +-
 org/eclipse/swt/browser/PromptService2Factory.java |    8 +-
 org/eclipse/swt/browser/WebKit.java                |   51 +-
 org/eclipse/swt/browser/WindowCreator2.java        |    6 +-
 org/eclipse/swt/custom/AnimatedProgress.java       |    2 +-
 org/eclipse/swt/custom/BidiSegmentListener.java    |    7 +-
 org/eclipse/swt/custom/BusyIndicator.java          |    2 +-
 org/eclipse/swt/custom/CCombo.java                 |    2 +-
 org/eclipse/swt/custom/CLabel.java                 |   15 +-
 org/eclipse/swt/custom/CTabFolder.java             |  332 +-
 org/eclipse/swt/custom/CTabFolderAdapter.java      |    2 +-
 org/eclipse/swt/custom/CTabFolderEvent.java        |    2 +-
 org/eclipse/swt/custom/CTabFolderLayout.java       |    6 +-
 org/eclipse/swt/custom/CTabFolderListener.java     |    2 +-
 org/eclipse/swt/custom/CTabFolderRenderer.java     |   67 +-
 org/eclipse/swt/custom/CTabItem.java               |   63 +-
 org/eclipse/swt/custom/ControlEditor.java          |    2 +-
 org/eclipse/swt/custom/ExtendedModifyEvent.java    |    2 +-
 org/eclipse/swt/custom/ExtendedModifyListener.java |    2 +-
 org/eclipse/swt/custom/LineBackgroundEvent.java    |    2 +-
 org/eclipse/swt/custom/LineBackgroundListener.java |    2 +-
 org/eclipse/swt/custom/LineStyleEvent.java         |    2 +-
 org/eclipse/swt/custom/LineStyleListener.java      |    2 +-
 org/eclipse/swt/custom/PopupList.java              |    2 +-
 org/eclipse/swt/custom/ScrolledComposite.java      |   21 +-
 .../swt/custom/ScrolledCompositeLayout.java        |    8 +-
 org/eclipse/swt/custom/StackLayout.java            |    2 +-
 org/eclipse/swt/custom/StyleRange.java             |    2 +-
 org/eclipse/swt/custom/StyledText.java             |   75 +-
 org/eclipse/swt/custom/StyledTextContent.java      |    2 +-
 org/eclipse/swt/custom/StyledTextRenderer.java     |    3 +-
 org/eclipse/swt/custom/TableEditor.java            |    2 +-
 org/eclipse/swt/custom/TableTree.java              |    2 +-
 org/eclipse/swt/custom/TableTreeEditor.java        |    2 +-
 org/eclipse/swt/custom/TableTreeItem.java          |    2 +-
 org/eclipse/swt/custom/TextChangeListener.java     |    2 +-
 org/eclipse/swt/custom/TextChangedEvent.java       |    2 +-
 org/eclipse/swt/custom/TextChangingEvent.java      |    2 +-
 org/eclipse/swt/custom/TreeEditor.java             |    2 +-
 org/eclipse/swt/custom/VerifyKeyListener.java      |    2 +-
 org/eclipse/swt/custom/ViewForm.java               |    2 +-
 org/eclipse/swt/dnd/ByteArrayTransfer.java         |    2 +-
 org/eclipse/swt/dnd/Clipboard.java                 |   63 +-
 org/eclipse/swt/dnd/ClipboardProxy.java            |   34 +-
 org/eclipse/swt/dnd/DND.java                       |    2 +-
 org/eclipse/swt/dnd/DNDEvent.java                  |    2 +-
 org/eclipse/swt/dnd/DNDListener.java               |    2 +-
 org/eclipse/swt/dnd/DragSource.java                |   71 +-
 org/eclipse/swt/dnd/DragSourceAdapter.java         |    2 +-
 org/eclipse/swt/dnd/DragSourceEvent.java           |    2 +-
 org/eclipse/swt/dnd/DragSourceListener.java        |    2 +-
 org/eclipse/swt/dnd/DropTarget.java                |   77 +-
 org/eclipse/swt/dnd/DropTargetAdapter.java         |    2 +-
 org/eclipse/swt/dnd/DropTargetEvent.java           |    2 +-
 org/eclipse/swt/dnd/DropTargetListener.java        |    2 +-
 org/eclipse/swt/dnd/FileTransfer.java              |   10 +-
 org/eclipse/swt/dnd/HTMLTransfer.java              |    9 +-
 org/eclipse/swt/dnd/ImageTransfer.java             |    4 +-
 org/eclipse/swt/dnd/RTFTransfer.java               |    2 +-
 org/eclipse/swt/dnd/TableDragSourceEffect.java     |   81 +-
 org/eclipse/swt/dnd/TableDropTargetEffect.java     |    2 +-
 org/eclipse/swt/dnd/TextTransfer.java              |    7 +-
 org/eclipse/swt/dnd/TransferData.java              |    2 +-
 org/eclipse/swt/dnd/TreeDragSourceEffect.java      |   87 +-
 org/eclipse/swt/dnd/TreeDropTargetEffect.java      |    4 +-
 org/eclipse/swt/dnd/URLTransfer.java               |    2 +-
 org/eclipse/swt/events/ArmEvent.java               |    2 +-
 org/eclipse/swt/events/ArmListener.java            |    2 +-
 org/eclipse/swt/events/ControlAdapter.java         |    2 +-
 org/eclipse/swt/events/ControlEvent.java           |    2 +-
 org/eclipse/swt/events/ControlListener.java        |    2 +-
 org/eclipse/swt/events/DisposeEvent.java           |    2 +-
 org/eclipse/swt/events/DisposeListener.java        |    2 +-
 org/eclipse/swt/events/FocusAdapter.java           |    2 +-
 org/eclipse/swt/events/FocusEvent.java             |    2 +-
 org/eclipse/swt/events/FocusListener.java          |    2 +-
 org/eclipse/swt/events/HelpEvent.java              |    2 +-
 org/eclipse/swt/events/HelpListener.java           |    2 +-
 org/eclipse/swt/events/KeyAdapter.java             |    2 +-
 org/eclipse/swt/events/KeyListener.java            |    2 +-
 org/eclipse/swt/events/MenuAdapter.java            |    2 +-
 org/eclipse/swt/events/MenuEvent.java              |    2 +-
 org/eclipse/swt/events/MenuListener.java           |    2 +-
 org/eclipse/swt/events/ModifyEvent.java            |    2 +-
 org/eclipse/swt/events/ModifyListener.java         |    2 +-
 org/eclipse/swt/events/MouseAdapter.java           |    2 +-
 org/eclipse/swt/events/MouseEvent.java             |   13 +-
 org/eclipse/swt/events/MouseListener.java          |    2 +-
 org/eclipse/swt/events/MouseMoveListener.java      |    2 +-
 org/eclipse/swt/events/MouseTrackAdapter.java      |    2 +-
 org/eclipse/swt/events/MouseTrackListener.java     |    2 +-
 org/eclipse/swt/events/PaintEvent.java             |    2 +-
 org/eclipse/swt/events/PaintListener.java          |    2 +-
 org/eclipse/swt/events/SegmentEvent.java           |    4 +-
 org/eclipse/swt/events/SegmentListener.java        |    8 +-
 org/eclipse/swt/events/SelectionAdapter.java       |    2 +-
 org/eclipse/swt/events/SelectionListener.java      |    2 +-
 org/eclipse/swt/events/ShellAdapter.java           |    2 +-
 org/eclipse/swt/events/ShellEvent.java             |    2 +-
 org/eclipse/swt/events/ShellListener.java          |    2 +-
 org/eclipse/swt/events/TraverseEvent.java          |    2 +-
 org/eclipse/swt/events/TraverseListener.java       |    2 +-
 org/eclipse/swt/events/TreeAdapter.java            |    2 +-
 org/eclipse/swt/events/TreeEvent.java              |    2 +-
 org/eclipse/swt/events/TreeListener.java           |    2 +-
 org/eclipse/swt/events/TypedEvent.java             |    2 +-
 org/eclipse/swt/events/VerifyEvent.java            |    2 +-
 org/eclipse/swt/events/VerifyListener.java         |    2 +-
 org/eclipse/swt/graphics/Color.java                |   18 +-
 org/eclipse/swt/graphics/Cursor.java               |   76 +-
 org/eclipse/swt/graphics/Device.java               |   43 +-
 org/eclipse/swt/graphics/Drawable.java             |    2 +-
 org/eclipse/swt/graphics/Font.java                 |    2 +-
 org/eclipse/swt/graphics/GC.java                   |  132 +-
 org/eclipse/swt/graphics/GCData.java               |   13 +-
 org/eclipse/swt/graphics/Image.java                |   42 +-
 org/eclipse/swt/graphics/ImageData.java            |    2 +-
 org/eclipse/swt/graphics/ImageLoaderEvent.java     |    2 +-
 org/eclipse/swt/graphics/ImageLoaderListener.java  |    2 +-
 org/eclipse/swt/graphics/PaletteData.java          |    2 +-
 org/eclipse/swt/graphics/Path.java                 |    2 +-
 org/eclipse/swt/graphics/Pattern.java              |    2 +-
 org/eclipse/swt/graphics/Point.java                |    2 +-
 org/eclipse/swt/graphics/RGB.java                  |   13 +-
 org/eclipse/swt/graphics/Rectangle.java            |    2 +-
 org/eclipse/swt/graphics/Region.java               |   74 +-
 org/eclipse/swt/graphics/TextLayout.java           |   40 +-
 org/eclipse/swt/internal/BidiUtil.java             |    2 +-
 org/eclipse/swt/internal/C.java                    |    2 +-
 org/eclipse/swt/internal/Callback.java             |    2 +-
 org/eclipse/swt/internal/Converter.java            |    2 +-
 org/eclipse/swt/internal/ImageList.java            |    6 +-
 org/eclipse/swt/internal/LONG.java                 |    2 +-
 org/eclipse/swt/internal/Library.java              |    4 +-
 org/eclipse/swt/internal/SWTMessages.properties    |    5 +-
 org/eclipse/swt/internal/SWTMessages_de.properties |    7 +
 .../swt/internal/SWTMessages_en_CA.properties      |    2 +
 org/eclipse/swt/internal/SWTMessages_es.properties |    5 +
 org/eclipse/swt/internal/SWTMessages_eu.properties |   23 +
 org/eclipse/swt/internal/SWTMessages_ja.properties |   10 +
 org/eclipse/swt/internal/SWTMessages_ml.properties |    2 +
 org/eclipse/swt/internal/SWTMessages_pt.properties |    1 +
 .../swt/internal/SWTMessages_pt_BR.properties      |    1 +
 org/eclipse/swt/internal/SWTMessages_uk.properties |    1 +
 org/eclipse/swt/internal/SWTMessages_zh.properties |    1 +
 .../swt/internal/SWTMessages_zh_TW.properties      |    1 +
 .../swt/internal/accessibility/gtk/ATK.java        |   31 +-
 .../internal/accessibility/gtk/AtkAttribute.java   |    2 +-
 .../accessibility/gtk/AtkComponentIface.java       |    2 +-
 .../accessibility/gtk/AtkEditableTextIface.java    |    2 +-
 .../accessibility/gtk/AtkHypertextIface.java       |    2 +-
 .../accessibility/gtk/AtkObjectFactoryClass.java   |    2 +-
 .../accessibility/gtk/AtkSelectionIface.java       |    2 +-
 .../internal/accessibility/gtk/AtkTextIface.java   |    2 +-
 .../internal/accessibility/gtk/AtkTextRange.java   |    2 +-
 .../internal/accessibility/gtk/AtkValueIface.java  |    2 +-
 .../internal/accessibility/gtk/GtkAccessible.java  |    2 +-
 org/eclipse/swt/internal/cairo/Cairo.java          |   20 +
 org/eclipse/swt/internal/cairo/cairo_path_t.java   |    2 +-
 org/eclipse/swt/internal/cde/CDE.java              |    2 +-
 org/eclipse/swt/internal/cde/DtActionArg.java      |    2 +-
 org/eclipse/swt/internal/gnome/GNOME.java          |   96 +-
 .../internal/gnome/GnomeVFSMimeApplication.java    |    2 +-
 org/eclipse/swt/internal/gtk/GInterfaceInfo.java   |    2 +-
 org/eclipse/swt/internal/gtk/GObjectClass.java     |    2 +-
 org/eclipse/swt/internal/gtk/GTypeInfo.java        |    2 +-
 org/eclipse/swt/internal/gtk/GTypeQuery.java       |    2 +-
 org/eclipse/swt/internal/gtk/GdkDragContext.java   |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventAny.java      |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventButton.java   |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventCrossing.java |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventExpose.java   |    4 +-
 org/eclipse/swt/internal/gtk/GdkEventFocus.java    |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventKey.java      |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventMotion.java   |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventProperty.java |    2 +-
 org/eclipse/swt/internal/gtk/GdkEventScroll.java   |    2 +-
 .../swt/internal/gtk/GdkEventVisibility.java       |    2 +-
 .../swt/internal/gtk/GdkEventWindowState.java      |    2 +-
 org/eclipse/swt/internal/gtk/GdkGCValues.java      |    3 +-
 org/eclipse/swt/internal/gtk/GdkImage.java         |    2 +-
 .../{GtkCellRendererClass.java => GdkRGBA.java}    |   13 +-
 org/eclipse/swt/internal/gtk/GdkWindowAttr.java    |    4 +-
 .../swt/internal/gtk/GtkCellRendererClass.java     |    6 +-
 .../swt/internal/gtk/GtkColorSelectionDialog.java  |    2 +-
 org/eclipse/swt/internal/gtk/GtkFixed.java         |    2 +-
 org/eclipse/swt/internal/gtk/GtkSelectionData.java |    2 +-
 org/eclipse/swt/internal/gtk/GtkTargetEntry.java   |    2 +-
 org/eclipse/swt/internal/gtk/GtkTargetPair.java    |   26 -
 org/eclipse/swt/internal/gtk/GtkWidgetClass.java   |  124 +-
 org/eclipse/swt/internal/gtk/OS.java               | 3285 +++++++-----
 org/eclipse/swt/internal/gtk/PangoAttribute.java   |    2 +-
 org/eclipse/swt/internal/gtk/PangoItem.java        |    2 +-
 org/eclipse/swt/internal/gtk/PangoLayoutLine.java  |    2 +-
 org/eclipse/swt/internal/gtk/PangoLayoutRun.java   |    2 +-
 org/eclipse/swt/internal/gtk/XAnyEvent.java        |    2 +-
 .../swt/internal/gtk/XClientMessageEvent.java      |    2 +-
 org/eclipse/swt/internal/gtk/XCrossingEvent.java   |    2 +-
 .../swt/internal/gtk/XRenderPictureAttributes.java |    2 +-
 org/eclipse/swt/internal/gtk/XWindowChanges.java   |    2 +-
 org/eclipse/swt/internal/image/GIFFileFormat.java  |   77 +-
 org/eclipse/swt/internal/image/JPEGAppn.java       |    2 +-
 .../image/JPEGArithmeticConditioningTable.java     |    2 +-
 org/eclipse/swt/internal/image/JPEGComment.java    |    2 +-
 org/eclipse/swt/internal/image/JPEGEndOfImage.java |    2 +-
 .../swt/internal/image/JPEGFixedSizeSegment.java   |    2 +-
 .../swt/internal/image/JPEGFrameHeader.java        |    2 +-
 .../swt/internal/image/JPEGHuffmanTable.java       |    2 +-
 .../swt/internal/image/JPEGQuantizationTable.java  |    2 +-
 .../swt/internal/image/JPEGRestartInterval.java    |    2 +-
 org/eclipse/swt/internal/image/JPEGScanHeader.java |    2 +-
 org/eclipse/swt/internal/image/JPEGSegment.java    |    2 +-
 .../swt/internal/image/JPEGStartOfImage.java       |    2 +-
 .../internal/image/JPEGVariableSizeSegment.java    |    2 +-
 .../swt/internal/image/LEDataInputStream.java      |    2 +-
 .../swt/internal/image/LEDataOutputStream.java     |    2 +-
 org/eclipse/swt/internal/image/LZWCodec.java       |    2 +-
 org/eclipse/swt/internal/image/LZWNode.java        |    2 +-
 org/eclipse/swt/internal/image/PNGFileFormat.java  |    2 +-
 org/eclipse/swt/internal/image/PngChunk.java       |    2 +-
 org/eclipse/swt/internal/image/PngChunkReader.java |    2 +-
 .../swt/internal/image/PngDecodingDataStream.java  |    2 +-
 .../swt/internal/image/PngFileReadState.java       |    2 +-
 .../swt/internal/image/PngHuffmanTable.java        |    2 +-
 .../swt/internal/image/PngHuffmanTables.java       |    2 +-
 org/eclipse/swt/internal/image/PngIdatChunk.java   |    2 +-
 org/eclipse/swt/internal/image/PngIendChunk.java   |    2 +-
 org/eclipse/swt/internal/image/PngIhdrChunk.java   |    2 +-
 .../swt/internal/image/PngLzBlockReader.java       |    2 +-
 org/eclipse/swt/internal/image/PngPlteChunk.java   |    2 +-
 org/eclipse/swt/internal/image/PngTrnsChunk.java   |    2 +-
 .../swt/internal/image/WinBMPFileFormat.java       |    2 +-
 org/eclipse/swt/internal/mozilla/XPCOM.java        |   86 +-
 org/eclipse/swt/internal/mozilla/XPCOMObject.java  |    2 +-
 .../swt/internal/mozilla/init/GREProperty.java     |    2 +-
 .../swt/internal/mozilla/init/GREVersionRange.java |    2 +-
 .../swt/internal/mozilla/init/XPCOMInit.java       |    2 +-
 .../internal/mozilla/nsDynamicFunctionLoad.java    |    2 +-
 .../swt/internal/mozilla/nsEmbedString.java        |    2 +-
 org/eclipse/swt/internal/mozilla/nsIAppShell.java  |    4 +-
 .../swt/internal/mozilla/nsIAuthInformation.java   |    2 +-
 .../swt/internal/mozilla/nsIAuthPrompt2.java       |   55 -
 .../swt/internal/mozilla/nsIBadCertListener2.java  |   47 -
 .../swt/internal/mozilla/nsIBaseWindow.java        |   78 +-
 .../swt/internal/mozilla/nsICancelable.java        |    2 +-
 .../swt/internal/mozilla/nsICategoryManager.java   |    2 +-
 .../internal/mozilla/nsICertOverrideService.java   |    2 +-
 .../internal/mozilla/nsICertificateDialogs.java    |    2 +-
 org/eclipse/swt/internal/mozilla/nsIChannel.java   |   10 +-
 org/eclipse/swt/internal/mozilla/nsIClassInfo.java |    2 +-
 .../swt/internal/mozilla/nsIComponentManager.java  |   18 +-
 .../internal/mozilla/nsIComponentRegistrar.java    |    2 +-
 .../internal/mozilla/nsIContextMenuListener.java   |   54 -
 org/eclipse/swt/internal/mozilla/nsICookie.java    |    2 +-
 .../swt/internal/mozilla/nsICookieManager.java     |    2 +-
 .../swt/internal/mozilla/nsICookieService.java     |    2 +-
 .../swt/internal/mozilla/nsICookieService_1_9.java |    2 +-
 org/eclipse/swt/internal/mozilla/nsID.java         |    2 +-
 .../swt/internal/mozilla/nsIDOMDocument.java       |  306 +-
 .../swt/internal/mozilla/nsIDOMElement.java        |  133 -
 org/eclipse/swt/internal/mozilla/nsIDOMEvent.java  |   48 +-
 .../swt/internal/mozilla/nsIDOMEventTarget.java    |   18 +-
 .../swt/internal/mozilla/nsIDOMKeyEvent.java       |   15 +-
 .../swt/internal/mozilla/nsIDOMMouseEvent.java     |   50 +-
 org/eclipse/swt/internal/mozilla/nsIDOMNode.java   |  173 +-
 .../swt/internal/mozilla/nsIDOMSerializer.java     |    2 +-
 .../swt/internal/mozilla/nsIDOMSerializer_1_7.java |    2 +-
 .../swt/internal/mozilla/nsIDOMUIEvent.java        |   70 +-
 org/eclipse/swt/internal/mozilla/nsIDOMWindow.java |  637 +--
 .../internal/mozilla/nsIDOMWindowCollection.java   |    2 +-
 org/eclipse/swt/internal/mozilla/nsIDataType.java  |    2 +-
 .../swt/internal/mozilla/nsIDirectoryService.java  |   55 -
 .../mozilla/nsIDirectoryServiceProvider.java       |   47 -
 .../mozilla/nsIDirectoryServiceProvider2.java      |   47 -
 org/eclipse/swt/internal/mozilla/nsIDocShell.java  |  224 +-
 org/eclipse/swt/internal/mozilla/nsIDownload.java  |    2 +-
 .../swt/internal/mozilla/nsIDownload_1_8.java      |    2 +-
 .../internal/mozilla/nsIEmbeddingSiteWindow.java   |   38 +-
 org/eclipse/swt/internal/mozilla/nsIFactory.java   |   51 -
 org/eclipse/swt/internal/mozilla/nsIFile.java      |  178 +-
 .../swt/internal/mozilla/nsIFilePicker.java        |   89 +-
 ...onLoad.java => nsIFilePickerShownCallback.java} |   22 +-
 .../swt/internal/mozilla/nsIFilePicker_1_8.java    |  139 -
 .../swt/internal/mozilla/nsIFocusManager.java      |    6 +-
 .../swt/internal/mozilla/nsIHelperAppLauncher.java |    2 +-
 .../mozilla/nsIHelperAppLauncherDialog.java        |   55 -
 .../mozilla/nsIHelperAppLauncherDialog_1_9.java    |   55 -
 .../internal/mozilla/nsIHelperAppLauncher_1_8.java |    2 +-
 .../internal/mozilla/nsIHelperAppLauncher_1_9.java |    2 +-
 .../swt/internal/mozilla/nsIHttpChannel.java       |    2 +-
 .../swt/internal/mozilla/nsIHttpHeaderVisitor.java |    2 +-
 org/eclipse/swt/internal/mozilla/nsIIOService.java |    2 +-
 .../swt/internal/mozilla/nsIInputStream.java       |   26 +-
 .../internal/mozilla/nsIInterfaceRequestor.java    |    2 +-
 .../swt/internal/mozilla/nsIJSContextStack.java    |    2 +-
 org/eclipse/swt/internal/mozilla/nsILocalFile.java |   78 +-
 .../swt/internal/mozilla/nsIMIMEInputStream.java   |    2 +-
 org/eclipse/swt/internal/mozilla/nsIMemory.java    |    2 +-
 .../swt/internal/mozilla/nsIObserverService.java   |    2 +-
 .../swt/internal/mozilla/nsIPrefBranch.java        |   58 +-
 .../internal/mozilla/nsIPrefLocalizedString.java   |    2 +-
 .../swt/internal/mozilla/nsIPrefService.java       |    2 +-
 org/eclipse/swt/internal/mozilla/nsIPrincipal.java |  114 +-
 .../swt/internal/mozilla/nsIProgressDialog.java    |    2 +-
 .../internal/mozilla/nsIProgressDialog_1_8.java    |    2 +-
 .../swt/internal/mozilla/nsIPromptFactory.java     |   47 -
 .../swt/internal/mozilla/nsIPromptService.java     |   46 +-
 .../swt/internal/mozilla/nsIPromptService2.java    |   51 -
 .../swt/internal/mozilla/nsIProperties.java        |    2 +-
 org/eclipse/swt/internal/mozilla/nsIRequest.java   |    2 +-
 org/eclipse/swt/internal/mozilla/nsISSLStatus.java |    6 +-
 .../internal/mozilla/nsIScriptSecurityManager.java |  123 +-
 .../swt/internal/mozilla/nsISeekableStream.java    |    2 +-
 .../swt/internal/mozilla/nsISerializable.java      |    2 +-
 .../swt/internal/mozilla/nsIServiceManager.java    |    2 +-
 .../swt/internal/mozilla/nsISimpleEnumerator.java  |    2 +-
 org/eclipse/swt/internal/mozilla/nsISupports.java  |    4 +-
 .../internal/mozilla/nsISupportsWeakReference.java |   47 -
 .../swt/internal/mozilla/nsITooltipListener.java   |   51 -
 org/eclipse/swt/internal/mozilla/nsITransfer.java  |    2 +-
 org/eclipse/swt/internal/mozilla/nsIURI.java       |   16 +-
 .../internal/mozilla/nsIURIContentListener.java    |   75 -
 .../swt/internal/mozilla/nsIUploadChannel.java     |    2 +-
 org/eclipse/swt/internal/mozilla/nsIVariant.java   |   21 +-
 .../swt/internal/mozilla/nsIWeakReference.java     |   47 -
 .../swt/internal/mozilla/nsIWebBrowser.java        |    8 +-
 .../swt/internal/mozilla/nsIWebBrowserChrome.java  |   40 +-
 .../internal/mozilla/nsIWebBrowserChromeFocus.java |   51 -
 .../swt/internal/mozilla/nsIWebBrowserFocus.java   |    2 +-
 .../swt/internal/mozilla/nsIWebBrowserSetup.java   |    2 +-
 .../swt/internal/mozilla/nsIWebBrowserStream.java  |    2 +-
 .../swt/internal/mozilla/nsIWebNavigation.java     |    2 +-
 .../swt/internal/mozilla/nsIWebNavigationInfo.java |    2 +-
 .../swt/internal/mozilla/nsIWebProgress.java       |    2 +-
 .../internal/mozilla/nsIWebProgressListener.java   |   28 +-
 .../internal/mozilla/nsIWebProgressListener2.java  |    2 +-
 .../swt/internal/mozilla/nsIWindowCreator.java     |   47 -
 .../swt/internal/mozilla/nsIWindowCreator2.java    |   49 -
 .../swt/internal/mozilla/nsIWindowWatcher.java     |    2 +-
 .../swt/internal/mozilla/nsIWritableVariant.java   |    6 +-
 org/eclipse/swt/internal/mozilla/nsIX509Cert.java  |    2 +-
 .../swt/internal/mozilla/nsIX509CertValidity.java  |    2 +-
 .../internal/mozilla/nsIXPCSecurityManager.java    |    2 +-
 org/eclipse/swt/internal/mozilla/nsIXPConnect.java |   12 +-
 org/eclipse/swt/internal/opengl/glx/GLX.java       |    2 +-
 .../swt/internal/opengl/glx/XVisualInfo.java       |    2 +-
 org/eclipse/swt/internal/theme/ButtonDrawData.java |   42 +-
 org/eclipse/swt/internal/theme/ComboDrawData.java  |   23 +-
 org/eclipse/swt/internal/theme/DrawData.java       |  111 +-
 .../swt/internal/theme/ExpanderDrawData.java       |   12 +-
 org/eclipse/swt/internal/theme/GroupDrawData.java  |   17 +-
 .../swt/internal/theme/ProgressBarDrawData.java    |   27 +-
 .../swt/internal/theme/TabFolderDrawData.java      |   16 +-
 .../swt/internal/theme/TabItemDrawData.java        |   35 +-
 org/eclipse/swt/internal/theme/Theme.java          |   53 +-
 .../swt/internal/theme/ToolBarDrawData.java        |    4 +-
 .../swt/internal/theme/ToolItemDrawData.java       |   32 +-
 .../swt/internal/webkit/JSClassDefinition.java     |    2 +-
 org/eclipse/swt/layout/FillLayout.java             |    2 +-
 org/eclipse/swt/layout/GridData.java               |    2 +-
 org/eclipse/swt/layout/GridLayout.java             |    2 +-
 org/eclipse/swt/layout/RowData.java                |    2 +-
 org/eclipse/swt/layout/RowLayout.java              |    4 +-
 org/eclipse/swt/opengl/GLCanvas.java               |   47 +-
 org/eclipse/swt/printing/PrintDialog.java          |    2 +-
 org/eclipse/swt/printing/Printer.java              |   45 +-
 org/eclipse/swt/program/Program.java               |  181 +-
 org/eclipse/swt/widgets/Button.java                |   98 +-
 org/eclipse/swt/widgets/Canvas.java                |   54 +-
 org/eclipse/swt/widgets/Caret.java                 |    2 +-
 org/eclipse/swt/widgets/ColorDialog.java           |   90 +-
 org/eclipse/swt/widgets/Combo.java                 |  286 +-
 org/eclipse/swt/widgets/Composite.java             |   77 +-
 org/eclipse/swt/widgets/Control.java               |  615 ++-
 org/eclipse/swt/widgets/CoolBar.java               |    4 +-
 org/eclipse/swt/widgets/DateTime.java              |   22 +-
 org/eclipse/swt/widgets/Dialog.java                |    2 +-
 org/eclipse/swt/widgets/DirectoryDialog.java       |   13 +-
 org/eclipse/swt/widgets/Display.java               |  400 +-
 org/eclipse/swt/widgets/EventTable.java            |    2 +-
 org/eclipse/swt/widgets/ExpandBar.java             |   22 +-
 org/eclipse/swt/widgets/ExpandItem.java            |   41 +-
 org/eclipse/swt/widgets/FileDialog.java            |    8 +-
 org/eclipse/swt/widgets/FontDialog.java            |   34 +-
 org/eclipse/swt/widgets/Group.java                 |   20 +-
 org/eclipse/swt/widgets/IME.java                   |    2 +-
 org/eclipse/swt/widgets/Item.java                  |   11 +-
 org/eclipse/swt/widgets/Label.java                 |   69 +-
 org/eclipse/swt/widgets/Layout.java                |    2 +-
 org/eclipse/swt/widgets/Link.java                  |   79 +-
 org/eclipse/swt/widgets/List.java                  |   67 +-
 org/eclipse/swt/widgets/Listener.java              |    2 +-
 org/eclipse/swt/widgets/Menu.java                  |   44 +-
 org/eclipse/swt/widgets/MenuItem.java              |   40 +-
 org/eclipse/swt/widgets/Monitor.java               |    2 +-
 org/eclipse/swt/widgets/ProgressBar.java           |   29 +-
 org/eclipse/swt/widgets/RunnableLock.java          |    2 +-
 org/eclipse/swt/widgets/Sash.java                  |   71 +-
 org/eclipse/swt/widgets/Scale.java                 |   39 +-
 org/eclipse/swt/widgets/ScrollBar.java             |  163 +-
 org/eclipse/swt/widgets/Scrollable.java            |  132 +-
 org/eclipse/swt/widgets/Shell.java                 |  339 +-
 org/eclipse/swt/widgets/Slider.java                |   72 +-
 org/eclipse/swt/widgets/Spinner.java               |  139 +-
 org/eclipse/swt/widgets/TabFolder.java             |   23 +-
 org/eclipse/swt/widgets/TabItem.java               |   24 +-
 org/eclipse/swt/widgets/Table.java                 |  381 +-
 org/eclipse/swt/widgets/TableColumn.java           |   28 +-
 org/eclipse/swt/widgets/TableItem.java             |   24 +-
 org/eclipse/swt/widgets/Text.java                  |  191 +-
 org/eclipse/swt/widgets/ToolBar.java               |   58 +-
 org/eclipse/swt/widgets/ToolItem.java              |  165 +-
 org/eclipse/swt/widgets/ToolTip.java               |  228 +-
 org/eclipse/swt/widgets/TouchSource.java           |    2 +-
 org/eclipse/swt/widgets/Tracker.java               |  183 +-
 org/eclipse/swt/widgets/TrayItem.java              |   29 +-
 org/eclipse/swt/widgets/Tree.java                  |  405 +-
 org/eclipse/swt/widgets/TreeColumn.java            |   28 +-
 org/eclipse/swt/widgets/TreeItem.java              |   24 +-
 org/eclipse/swt/widgets/Widget.java                |  410 +-
 os.c                                               | 5605 +++++++++++++-------
 os.h                                               |   99 +-
 os_custom.c                                        |  452 +-
 os_custom.h                                        |  368 +-
 os_stats.c                                         |  321 +-
 os_stats.h                                         |  316 +-
 os_structs.c                                       |  286 +-
 os_structs.h                                       |   26 +-
 version.txt                                        |    2 +-
 webkitgtk.h                                        |   14 +-
 webkitgtk_stats.c                                  |    5 +-
 xpcom.cpp                                          |   68 +-
 xpcom.h                                            |    9 +-
 xpcom_custom.cpp                                   |    4 +-
 xpcom_stats.cpp                                    |   15 +-
 xpcom_stats.h                                      |   10 +-
 xpcominit.h                                        |    2 +-
 xpcominit_stats.cpp                                |    7 +-
 497 files changed, 14517 insertions(+), 10869 deletions(-)

diff --git a/about.html b/about.html
index 6c5fbd8..a6c1519 100644
--- a/about.html
+++ b/about.html
@@ -176,10 +176,6 @@ Changes to the original files were made by SWT on April 7, 2009 and are marked w
 conditions of the Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is
 provided with the Content (<a href="about_files/mpl-v11.txt" target="_blank">mpl-v11.txt</a>) and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>.</p>
 
-<h4>Cairo for Linux</h4>
-
-<p>Refer to the file <a href="about_files/about_cairo.html">about_files/about_cairo.html</a> for licensing details about "Cairo for Linux."
-
 <h4>Independent JPEG Group's JPEG software release 6b</h4>
 
 <p>This software is based in part on the work of the Independent JPEG Group's JPEG software release 6b ("LIBJPEG").
diff --git a/about_files/about_cairo.html b/about_files/about_cairo.html
deleted file mode 100644
index 0132307..0000000
--- a/about_files/about_cairo.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
- 
-<p>March 27, 2006</p>	
-<h3>License</h3>
-
-<p>The Eclipse Foundation has included the following package for your convenience:</p> 
-
-<h4>Cairo 1.0.2 for Linux</h4>
-
-<p>Cairo for Linux ("Cairo") is developed by The Cairo Project (<a href="http://www.cairographics.org" target="_blank">http://www.cairographics.org</a>):</p>
-
-<p>Cairo is delivered in the following file ("Cairo Library"):</p>
-<ul>
-    <li>libcairo-swt.so</li>
-</ul>
-
-<p>which was compiled from Cairo source code available at <a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.</p>
-
-<p>Your use of the Cairo code in binary form is subject to
-the terms and conditions of Mozilla Public License Version 1.1 ("MPL").  A copy of the MPL is provided (<a href="mpl-v11.txt" target="blank">mpl-v11.txt</a>)
-and is also available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html" target="_blank">http://www.mozilla.org/MPL/MPL-1.1.html.</a>
-
-<h4>pixman 0.1.6</h4>
-
-<p>pixman ("pixman") is packaged within the Cairo Library and was compiled from source code available at
-<a href="http://www.cairographics.org/snapshots" target="_blank">http://www.cairographics.org/snapshots</a>.
-pixman includes the following packages:</p>
-
-<ul>
-	<li>libpixregion</li>
-	<li>libic</li>
-	<li>slim</li>
-</ul>
-
-Your use of pixman is subject to the terms and conditions of the licenses in <a href="pixman-licenses.txt" target="blank">pixman-licenses.txt</a>.</p>
-
-<p>If you did not receive the Cairo Library directly from the Eclipse Foundation, the package is being redistributed by another party ("Redistributor") and different terms and conditions may
-apply its use.  Check the Redistributor's license that was provided with the content.  If no such license exists, contact the Redistributor.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/about_files/pixman-licenses.txt b/about_files/pixman-licenses.txt
deleted file mode 100644
index 5d8dca6..0000000
--- a/about_files/pixman-licenses.txt
+++ /dev/null
@@ -1,92 +0,0 @@
-libpixregion
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-----------------------------------------------------------------------
-libic
-
-Copyright � 2001 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Keith Packard not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Keith Packard makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-----------------------------------------------------------------------
-slim
-
-slim is Copyright � 2003 Richard Henderson
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Richard Henderson not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  Richard Henderson
-makes no representations about the suitability of this software for
-any purpose.  It is provided "as is" without express or implied
-warranty.
-
-RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/atk.c b/atk.c
index 34a5351..9cf516f 100644
--- a/atk.c
+++ b/atk.c
@@ -201,18 +201,6 @@ JNIEXPORT jint JNICALL ATK_NATIVE(AtkTextRectangle_1sizeof)
 }
 #endif
 
-#ifndef NO_GTK_1TYPE_1ACCESSIBLE
-JNIEXPORT jintLong JNICALL ATK_NATIVE(GTK_1TYPE_1ACCESSIBLE)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	ATK_NATIVE_ENTER(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
-	rc = (jintLong)GTK_TYPE_ACCESSIBLE;
-	ATK_NATIVE_EXIT(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1ATK_1ACTION_1GET_1IFACE
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1ACTION_1GET_1IFACE)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -321,18 +309,6 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1ATK_1VALUE_1GET_1IFACE)
 }
 #endif
 
-#ifndef NO__1GTK_1ACCESSIBLE
-JNIEXPORT jintLong JNICALL ATK_NATIVE(_1GTK_1ACCESSIBLE)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	ATK_NATIVE_ENTER(env, that, _1GTK_1ACCESSIBLE_FUNC);
-	rc = (jintLong)GTK_ACCESSIBLE(arg0);
-	ATK_NATIVE_EXIT(env, that, _1GTK_1ACCESSIBLE_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1atk_1focus_1tracker_1notify
 JNIEXPORT void JNICALL ATK_NATIVE(_1atk_1focus_1tracker_1notify)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -616,29 +592,6 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__JJJJ)(JNIEnv *env, jclass that, ji
 }
 #endif
 
-#if (!defined(NO__1call__IIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#else
-JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__JJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
-#endif
-{
-	jintLong rc = 0;
-#ifndef JNI64
-	ATK_NATIVE_ENTER(env, that, _1call__IIIII_FUNC);
-#else
-	ATK_NATIVE_ENTER(env, that, _1call__JJJJJ_FUNC);
-#endif
-	rc = (jintLong)((jintLong (*)())arg0)(arg1, arg2, arg3, arg4);
-#ifndef JNI64
-	ATK_NATIVE_EXIT(env, that, _1call__IIIII_FUNC);
-#else
-	ATK_NATIVE_EXIT(env, that, _1call__JJJJJ_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #if (!defined(NO__1call__IIIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__IIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5)
@@ -662,29 +615,6 @@ JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__JJJJJJ)(JNIEnv *env, jclass that,
 }
 #endif
 
-#if (!defined(NO__1call__IIIIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJJJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__IIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#else
-JNIEXPORT jintLong JNICALL ATK_NATIVE(_1call__JJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-#endif
-{
-	jintLong rc = 0;
-#ifndef JNI64
-	ATK_NATIVE_ENTER(env, that, _1call__IIIIIII_FUNC);
-#else
-	ATK_NATIVE_ENTER(env, that, _1call__JJJJJJJ_FUNC);
-#endif
-	rc = (jintLong)((jintLong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6);
-#ifndef JNI64
-	ATK_NATIVE_EXIT(env, that, _1call__IIIIIII_FUNC);
-#else
-	ATK_NATIVE_EXIT(env, that, _1call__JJJJJJJ_FUNC);
-#endif
-	return rc;
-}
-#endif
-
 #ifndef NO_g_1strdup
 JNIEXPORT jintLong JNICALL ATK_NATIVE(g_1strdup)
 	(JNIEnv *env, jclass that, jintLong arg0)
diff --git a/atk_stats.c b/atk_stats.c
index 8563724..7c818b4 100644
--- a/atk_stats.c
+++ b/atk_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,8 +18,6 @@
 
 #ifdef NATIVE_STATS
 
-int ATK_nativeFunctionCount = 78;
-int ATK_nativeFunctionCallCount[78];
 char * ATK_nativeFunctionNames[] = {
 	"ATK_1IS_1NO_1OP_1OBJECT_1FACTORY",
 	"ATK_1TYPE_1ACTION",
@@ -36,7 +34,6 @@ char * ATK_nativeFunctionNames[] = {
 	"AtkObjectFactory_1sizeof",
 	"AtkTextRange_1sizeof",
 	"AtkTextRectangle_1sizeof",
-	"GTK_1TYPE_1ACCESSIBLE",
 	"_1ATK_1ACTION_1GET_1IFACE",
 	"_1ATK_1COMPONENT_1GET_1IFACE",
 	"_1ATK_1EDITABLE_1TEXT_1GET_1IFACE",
@@ -46,7 +43,6 @@ char * ATK_nativeFunctionNames[] = {
 	"_1ATK_1TABLE_1GET_1IFACE",
 	"_1ATK_1TEXT_1GET_1IFACE",
 	"_1ATK_1VALUE_1GET_1IFACE",
-	"_1GTK_1ACCESSIBLE",
 	"_1atk_1focus_1tracker_1notify",
 	"_1atk_1get_1default_1registry",
 	"_1atk_1object_1factory_1create_1accessible",
@@ -81,20 +77,10 @@ char * ATK_nativeFunctionNames[] = {
 	"_1call__JJJJ",
 #endif
 #ifndef JNI64
-	"_1call__IIIII",
-#else
-	"_1call__JJJJJ",
-#endif
-#ifndef JNI64
 	"_1call__IIIIII",
 #else
 	"_1call__JJJJJJ",
 #endif
-#ifndef JNI64
-	"_1call__IIIIIII",
-#else
-	"_1call__JJJJJJJ",
-#endif
 	"g_1strdup",
 #ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2",
@@ -232,6 +218,9 @@ char * ATK_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_accessibility_gtk_GtkAccessible_2J",
 #endif
 };
+#define NATIVE_FUNCTION_COUNT sizeof(ATK_nativeFunctionNames) / sizeof(char*)
+int ATK_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int ATK_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/atk_stats.h b/atk_stats.h
index 4b40bb9..8ef65c4 100644
--- a/atk_stats.h
+++ b/atk_stats.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -44,7 +44,6 @@ typedef enum {
 	AtkObjectFactory_1sizeof_FUNC,
 	AtkTextRange_1sizeof_FUNC,
 	AtkTextRectangle_1sizeof_FUNC,
-	GTK_1TYPE_1ACCESSIBLE_FUNC,
 	_1ATK_1ACTION_1GET_1IFACE_FUNC,
 	_1ATK_1COMPONENT_1GET_1IFACE_FUNC,
 	_1ATK_1EDITABLE_1TEXT_1GET_1IFACE_FUNC,
@@ -54,7 +53,6 @@ typedef enum {
 	_1ATK_1TABLE_1GET_1IFACE_FUNC,
 	_1ATK_1TEXT_1GET_1IFACE_FUNC,
 	_1ATK_1VALUE_1GET_1IFACE_FUNC,
-	_1GTK_1ACCESSIBLE_FUNC,
 	_1atk_1focus_1tracker_1notify_FUNC,
 	_1atk_1get_1default_1registry_FUNC,
 	_1atk_1object_1factory_1create_1accessible_FUNC,
@@ -89,20 +87,10 @@ typedef enum {
 	_1call__JJJJ_FUNC,
 #endif
 #ifndef JNI64
-	_1call__IIIII_FUNC,
-#else
-	_1call__JJJJJ_FUNC,
-#endif
-#ifndef JNI64
 	_1call__IIIIII_FUNC,
 #else
 	_1call__JJJJJJ_FUNC,
 #endif
-#ifndef JNI64
-	_1call__IIIIIII_FUNC,
-#else
-	_1call__JJJJJJJ_FUNC,
-#endif
 	g_1strdup_FUNC,
 #ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_accessibility_gtk_AtkActionIface_2_FUNC,
diff --git a/build.sh b/build.sh
index 9a23f36..689616e 100755
--- a/build.sh
+++ b/build.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #*******************************************************************************
-# Copyright (c) 2000, 2011 IBM Corporation and others.
+# Copyright (c) 2000, 2012 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -140,7 +140,7 @@ case $SWT_OS.$SWT_ARCH in
 			export JAVA_HOME="/bluebird/teamswt/swt-builddir/JDKs/x86_64/jdk1.5.0"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			export PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_x86_64/lib/pkgconfig"
+			export PKG_CONFIG_PATH="/usr/lib64/pkgconfig"
 		fi
 		if [ "${MOZILLA_SDK}" = "" ]; then
 			export MOZILLA_SDK="/bluebird/teamswt/swt-builddir/mozilla/1.7/amd64/mozilla/dist/sdk"
@@ -195,7 +195,7 @@ case $SWT_OS.$SWT_ARCH in
 			export CC=gcc
 		fi
 		if [ "${JAVA_HOME}" = "" ]; then
-			export JAVA_HOME="/bluebird/teamswt/swt-builddir/JDKs/PPC64/ibm-java2-ppc64-50"
+			export JAVA_HOME="/bluebird/teamswt/swt-builddir/JDKs/PPC64/jre5u10"
 		fi
 		if [ "${MOZILLA_SDK}" = "" ]; then
 			export MOZILLA_SDK=" /bluebird/teamswt/swt-builddir/mozilla/1.7/ppc64/mozilla/dist/sdk"
@@ -216,7 +216,7 @@ case $SWT_OS.$SWT_ARCH in
 			export XULRUNNER_LIBS="-m64 -L${XULRUNNER_SDK}/lib -lxpcomglue"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/:/bluebird/teamswt/swt-builddir/cairo_1.0.2/linux_ppc64/lib/pkgconfig/:/usr/local/GNOME/lib/pkgconfig:/usr/local/gtk2.4/lib/pkgconfig/"
+			export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/"
 		fi
 		;;
 	"solaris.x86")
@@ -252,7 +252,7 @@ case $SWT_OS.$SWT_ARCH in
 #		export PATH="/export/home/SUNWspro/bin:/usr/ccs/bin:/usr/bin"
 		if [ "${CC}" = "" ]; then
 			export CC="cc"
-		fi
+		fi	
 		if [ "${CXX}" = "" ]; then
 			export CXX="CC"
 		fi
@@ -290,7 +290,7 @@ case $SWT_OS.$SWT_ARCH in
 			JAVA_HOME="/usr/j2se"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			PKG_CONFIG_PATH="/usr/local/cairo-1.4.10/lib/pkgconfig/"
+			PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
 		fi
 		if [ "${MOZILLA_SDK}" = "" ]; then
 			MOZILLA_SDK="/bluebird/teamswt/swt-builddir/geckoSDK/1.4/gecko-sdk"
@@ -308,10 +308,10 @@ case $SWT_OS.$SWT_ARCH in
 			export CC=gcc
 		fi
 		if [ "${JAVA_HOME}" = "" ]; then
-			export JAVA_HOME="/home/swtbuild/java5/ibm-java2-s390-50"
+			export JAVA_HOME="/home/swtbuild/java5/s390/ibm-java2-s390-50"
 		fi
 		if [ "${MOZILLA_SDK}" = "" ]; then
-			export MOZILLA_SDK="/home/swtbuild/mozilla-1.7.13/mozilla/dist/sdk"
+			export MOZILLA_SDK="/home/swtbuild/mozilla/s390/mozilla-1.7.13/mozilla/dist/sdk"
 		fi
 		if [ "${MOZILLA_INCLUDES}" = "" ]; then
 			export MOZILLA_INCLUDES="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
@@ -320,7 +320,7 @@ case $SWT_OS.$SWT_ARCH in
 			export MOZILLA_LIBS="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
 		fi
 		if [ "${XULRUNNER_SDK}" = "" ]; then
-			export XULRUNNER_SDK="/home/swtbuild/xulrunner-1.8.0.1/mozilla/dist/sdk"
+			export XULRUNNER_SDK="/home/swtbuild/mozilla/s390/xulrunner-1.8.0.1/mozilla/dist/sdk"
 		fi
 		if [ "${XULRUNNER_INCLUDES}" = "" ]; then
 			export XULRUNNER_INCLUDES="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
@@ -329,7 +329,7 @@ case $SWT_OS.$SWT_ARCH in
 			export XULRUNNER_LIBS="-L${XULRUNNER_SDK}/lib -lxpcomglue"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
+			export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
 		fi
 		;;
 	"linux.s390x")
@@ -337,10 +337,10 @@ case $SWT_OS.$SWT_ARCH in
 			export CC=gcc
 		fi
 		if [ "${JAVA_HOME}" = "" ]; then
-			export JAVA_HOME="/home/swtbuild/java5/ibm-java2-s390x-50"
+			export JAVA_HOME="/home/swtbuild/java5/s390x/ibm-java2-s390x-50"
 		fi
 		if [ "${MOZILLA_SDK}" = "" ]; then
-			export MOZILLA_SDK="/home/swtbuild/mozilla1.7.13/mozilla/dist/sdk"
+			export MOZILLA_SDK="/home/swtbuild/mozilla/s390x/mozilla1.7.13/mozilla/dist/sdk"
 		fi
 		if [ "${MOZILLA_INCLUDES}" = "" ]; then
 			export MOZILLA_INCLUDES="-include ${MOZILLA_SDK}/include/mozilla-config.h -I${MOZILLA_SDK}/../include/xpcom -I${MOZILLA_SDK}/../include/nspr -I${MOZILLA_SDK}/../include/embed_base -I${MOZILLA_SDK}/../include/embedstring -I${MOZILLA_SDK}/../include/string"
@@ -349,7 +349,7 @@ case $SWT_OS.$SWT_ARCH in
 			export MOZILLA_LIBS="-L${MOZILLA_SDK}/lib -L${MOZILLA_SDK}/bin -lxpcom -lnspr4 -lplds4 -lplc4"
 		fi
 		if [ "${XULRUNNER_SDK}" = "" ]; then
-			export XULRUNNER_SDK="/home/swtbuild/xulrunner-1.8.0.1/mozilla/dist/sdk"
+			export XULRUNNER_SDK="/home/swtbuild/mozilla/s390x/xulrunner-1.8.0.1/mozilla/dist/sdk"
 		fi
 		if [ "${XULRUNNER_INCLUDES}" = "" ]; then
 			export XULRUNNER_INCLUDES="-include ${XULRUNNER_SDK}/include/mozilla-config.h -I${XULRUNNER_SDK}/include"
@@ -358,7 +358,7 @@ case $SWT_OS.$SWT_ARCH in
 			export XULRUNNER_LIBS="-L${XULRUNNER_SDK}/lib -lxpcomglue"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			export PKG_CONFIG_PATH="/usr/local/cairo64/lib/pkgconfig"
+			export PKG_CONFIG_PATH="/usr/lib64/pkgconfig"
 		fi
 		;;
 	"aix.ppc")
@@ -393,18 +393,18 @@ case $SWT_OS.$SWT_ARCH in
 		fi
 		;;
 	"hpux.ia64")
-#		export PATH="/bluebird/teamswt/bog/gtk/hpux/bin:${PATH}"
+		export PATH="/opt/hp-gcc/bin:/opt/gtk_64bit/bin:/opt/${PATH}"
 		if [ "${CC}" = "" ]; then
 			export CC=gcc
 		fi
 		if [ "${JAVA_HOME}" = "" ]; then
 			export JAVA_HOME="/opt/java1.5"
 		fi
-		if [ "${AWT_HOME}" = "" ]; then
-			export AWT_HOME="/opt/java1.5/jre/lib/IA64W/"
+		if [ "${AWT_LIB_PATH}" = "" ]; then
+			export AWT_LIB_PATH="/opt/java1.5/jre/lib/IA64W/"
 		fi
 		if [ "${PKG_CONFIG_PATH}" = "" ]; then
-			export PKG_CONFIG_PATH="/bluebird/teamswt/bog/gtk/hpux/lib/pkgconfig"
+			export PKG_CONFIG_PATH="/opt/gtk_64bit/lib/hpux64/pkgconfig"
 		fi
 		;;
 esac	
@@ -449,8 +449,13 @@ if [ ${MODEL} = 's390' ]; then
 	SWT_LFLAGS=-m31
 	export SWT_LFLAGS SWT_PTR_CFLAGS
 fi
+if [ ${MODEL} = 'x86' -a ${SWT_OS} = 'linux' ]; then
+	SWT_PTR_CFLAGS="-m32"	
+	SWT_LFLAGS=-m32
+	export SWT_LFLAGS SWT_PTR_CFLAGS
+fi
 
-if [ x`pkg-config --exists gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 && echo YES` = "xYES"  -a 	 ${MODEL} != "sparc64" 	]; then
+if [ x`pkg-config --exists gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0 && echo YES` = "xYES"  -a ${MODEL} != "sparc64" -a ${MODEL} != 'ia64' ]; then
 	echo "libgnomeui-2.0 found, compiling SWT program support using GNOME"
 	MAKE_GNOME=make_gnome
 else
diff --git a/c_stats.c b/c_stats.c
index ee4a74d..932c91c 100644
--- a/c_stats.c
+++ b/c_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@
 
 #ifdef NATIVE_STATS
 
-int C_nativeFunctionCount = 23;
-int C_nativeFunctionCallCount[23];
 char * C_nativeFunctionNames[] = {
 	"PTR_1sizeof",
 	"free",
@@ -109,6 +107,9 @@ char * C_nativeFunctionNames[] = {
 	"memset",
 	"strlen",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(C_nativeFunctionNames) / sizeof(char*)
+int C_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int C_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/cairo.c b/cairo.c
index 72220cf..8c2052b 100644
--- a/cairo.c
+++ b/cairo.c
@@ -1179,6 +1179,44 @@ JNIEXPORT jintLong JNICALL Cairo_NATIVE(_1cairo_1reference)
 }
 #endif
 
+#ifndef NO__1cairo_1region_1get_1rectangle
+JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1region_1get_1rectangle)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2)
+{
+	Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1get_1rectangle_FUNC);
+/*
+	cairo_region_get_rectangle(arg0, arg1, arg2);
+*/
+	{
+		Cairo_LOAD_FUNCTION(fp, cairo_region_get_rectangle)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jintLong))fp)(arg0, arg1, arg2);
+		}
+	}
+	Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1get_1rectangle_FUNC);
+}
+#endif
+
+#ifndef NO__1cairo_1region_1num_1rectangles
+JNIEXPORT jint JNICALL Cairo_NATIVE(_1cairo_1region_1num_1rectangles)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	Cairo_NATIVE_ENTER(env, that, _1cairo_1region_1num_1rectangles_FUNC);
+/*
+	rc = (jint)cairo_region_num_rectangles(arg0);
+*/
+	{
+		Cairo_LOAD_FUNCTION(fp, cairo_region_num_rectangles)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	Cairo_NATIVE_EXIT(env, that, _1cairo_1region_1num_1rectangles_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1cairo_1rel_1curve_1to
 JNIEXPORT void JNICALL Cairo_NATIVE(_1cairo_1rel_1curve_1to)
 	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6)
diff --git a/cairo_custom.h b/cairo_custom.h
index f050ad1..87252e2 100644
--- a/cairo_custom.h
+++ b/cairo_custom.h
@@ -42,3 +42,5 @@
 #define cairo_surface_get_content_LIB LIB_CAIRO
 #define cairo_push_group_LIB LIB_CAIRO
 #define cairo_pop_group_to_source_LIB LIB_CAIRO
+#define cairo_region_num_rectangles_LIB LIB_CAIRO
+#define cairo_region_get_rectangle_LIB LIB_CAIRO
diff --git a/cairo_stats.c b/cairo_stats.c
index 67b21fe..5cdb9a0 100644
--- a/cairo_stats.c
+++ b/cairo_stats.c
@@ -24,8 +24,6 @@
 
 #ifdef NATIVE_STATS
 
-int Cairo_nativeFunctionCount = 157;
-int Cairo_nativeFunctionCallCount[157];
 char * Cairo_nativeFunctionNames[] = {
 	"CAIRO_1VERSION_1ENCODE",
 	"_1cairo_1append_1path",
@@ -117,6 +115,8 @@ char * Cairo_nativeFunctionNames[] = {
 	"_1cairo_1push_1group",
 	"_1cairo_1rectangle",
 	"_1cairo_1reference",
+	"_1cairo_1region_1get_1rectangle",
+	"_1cairo_1region_1num_1rectangles",
 	"_1cairo_1rel_1curve_1to",
 	"_1cairo_1rel_1line_1to",
 	"_1cairo_1rel_1move_1to",
@@ -197,6 +197,9 @@ char * Cairo_nativeFunctionNames[] = {
 	"memmove___3DJJ",
 #endif
 };
+#define NATIVE_FUNCTION_COUNT sizeof(Cairo_nativeFunctionNames) / sizeof(char*)
+int Cairo_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int Cairo_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/cairo_stats.h b/cairo_stats.h
index 62206dc..79bfc95 100644
--- a/cairo_stats.h
+++ b/cairo_stats.h
@@ -125,6 +125,8 @@ typedef enum {
 	_1cairo_1push_1group_FUNC,
 	_1cairo_1rectangle_FUNC,
 	_1cairo_1reference_FUNC,
+	_1cairo_1region_1get_1rectangle_FUNC,
+	_1cairo_1region_1num_1rectangles_FUNC,
 	_1cairo_1rel_1curve_1to_FUNC,
 	_1cairo_1rel_1line_1to_FUNC,
 	_1cairo_1rel_1move_1to_FUNC,
diff --git a/cairo_structs.c b/cairo_structs.c
index 085d180..e9b4407 100644
--- a/cairo_structs.c
+++ b/cairo_structs.c
@@ -15,7 +15,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Cairo and SWT
- * -  Copyright (C) 2005, 2009 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2005, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 
diff --git a/cairo_structs.h b/cairo_structs.h
index 1e0ece9..4e8a012 100644
--- a/cairo_structs.h
+++ b/cairo_structs.h
@@ -15,7 +15,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Cairo and SWT
- * -  Copyright (C) 2005, 2009 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2005, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 
diff --git a/callback.h b/callback.h
index 352d67b..49a93ba 100644
--- a/callback.h
+++ b/callback.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/cde_stats.c b/cde_stats.c
index 1011b90..3cd504a 100644
--- a/cde_stats.c
+++ b/cde_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@
 
 #ifdef NATIVE_STATS
 
-int CDE_nativeFunctionCount = 19;
-int CDE_nativeFunctionCallCount[19];
 char * CDE_nativeFunctionNames[] = {
 	"DtActionArg_1sizeof",
 	"_1DtActionInvoke",
@@ -37,6 +35,9 @@ char * CDE_nativeFunctionNames[] = {
 	"_1XtToolkitInitialize",
 	"_1topLevelShellWidgetClass",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(CDE_nativeFunctionNames) / sizeof(char*)
+int CDE_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int CDE_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/glx_stats.c b/glx_stats.c
index 1d62603..6fd31eb 100644
--- a/glx_stats.c
+++ b/glx_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@
 
 #ifdef NATIVE_STATS
 
-int GLX_nativeFunctionCount = 23;
-int GLX_nativeFunctionCallCount[23];
 char * GLX_nativeFunctionNames[] = {
 	"XVisualInfo_1sizeof",
 	"_1glGetIntegerv",
@@ -41,6 +39,9 @@ char * GLX_nativeFunctionNames[] = {
 	"_1glXWaitX",
 	"memmove",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(GLX_nativeFunctionNames) / sizeof(char*)
+int GLX_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int GLX_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/gnome.c b/gnome.c
index be0abfc..84a7788 100644
--- a/gnome.c
+++ b/gnome.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -33,60 +33,6 @@ JNIEXPORT jint JNICALL GNOME_NATIVE(GnomeVFSMimeApplication_1sizeof)
 }
 #endif
 
-#ifndef NO__1g_1free
-JNIEXPORT void JNICALL GNOME_NATIVE(_1g_1free)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	GNOME_NATIVE_ENTER(env, that, _1g_1free_FUNC);
-	g_free((gpointer)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1g_1free_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1list_1append
-JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1g_1list_1append)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	jintLong rc = 0;
-	GNOME_NATIVE_ENTER(env, that, _1g_1list_1append_FUNC);
-	rc = (jintLong)g_list_append((GList *)arg0, (gpointer)arg1);
-	GNOME_NATIVE_EXIT(env, that, _1g_1list_1append_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1list_1free
-JNIEXPORT void JNICALL GNOME_NATIVE(_1g_1list_1free)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	GNOME_NATIVE_ENTER(env, that, _1g_1list_1free_FUNC);
-	g_list_free((GList *)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1g_1list_1free_FUNC);
-}
-#endif
-
-#ifndef NO__1g_1list_1next
-JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1g_1list_1next)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	GNOME_NATIVE_ENTER(env, that, _1g_1list_1next_FUNC);
-	rc = (jintLong)g_list_next(arg0);
-	GNOME_NATIVE_EXIT(env, that, _1g_1list_1next_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1object_1unref
-JNIEXPORT void JNICALL GNOME_NATIVE(_1g_1object_1unref)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	GNOME_NATIVE_ENTER(env, that, _1g_1object_1unref_FUNC);
-	g_object_unref((gpointer)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1g_1object_1unref_FUNC);
-}
-#endif
-
 #ifndef NO__1gnome_1icon_1lookup
 JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1icon_1lookup)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jbyteArray arg3, jintLong arg4, jbyteArray arg5, jint arg6, jintArray arg7)
@@ -155,18 +101,6 @@ JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1get_1mime_1type)
 }
 #endif
 
-#ifndef NO__1gnome_1vfs_1get_1registered_1mime_1types
-JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1get_1registered_1mime_1types)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1get_1registered_1mime_1types_FUNC);
-	rc = (jintLong)gnome_vfs_get_registered_mime_types();
-	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1get_1registered_1mime_1types_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gnome_1vfs_1init
 JNIEXPORT jboolean JNICALL GNOME_NATIVE(_1gnome_1vfs_1init)
 	(JNIEnv *env, jclass that)
@@ -265,16 +199,6 @@ JNIEXPORT jint JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1application_1launch)
 }
 #endif
 
-#ifndef NO__1gnome_1vfs_1mime_1extensions_1list_1free
-JNIEXPORT void JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1extensions_1list_1free)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1mime_1extensions_1list_1free_FUNC);
-	gnome_vfs_mime_extensions_list_free((GList *)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1mime_1extensions_1list_1free_FUNC);
-}
-#endif
-
 #ifndef NO__1gnome_1vfs_1mime_1get_1default_1application
 JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1get_1default_1application)
 	(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -291,28 +215,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gnome_1vfs_1mime_1get_1extensions_1list
-JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1get_1extensions_1list)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1mime_1get_1extensions_1list_FUNC);
-	rc = (jintLong)gnome_vfs_mime_get_extensions_list((const char *)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1mime_1get_1extensions_1list_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free
-JNIEXPORT void JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	GNOME_NATIVE_ENTER(env, that, _1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free_FUNC);
-	gnome_vfs_mime_registered_mime_type_list_free((GList *)arg0);
-	GNOME_NATIVE_EXIT(env, that, _1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free_FUNC);
-}
-#endif
-
 #ifndef NO__1gnome_1vfs_1mime_1type_1from_1name
 JNIEXPORT jintLong JNICALL GNOME_NATIVE(_1gnome_1vfs_1mime_1type_1from_1name)
 	(JNIEnv *env, jclass that, jbyteArray arg0)
diff --git a/gnome_stats.c b/gnome_stats.c
index 27d6a54..857e003 100644
--- a/gnome_stats.c
+++ b/gnome_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,35 +18,27 @@
 
 #ifdef NATIVE_STATS
 
-int GNOME_nativeFunctionCount = 25;
-int GNOME_nativeFunctionCallCount[25];
 char * GNOME_nativeFunctionNames[] = {
 	"GnomeVFSMimeApplication_1sizeof",
-	"_1g_1free",
-	"_1g_1list_1append",
-	"_1g_1list_1free",
-	"_1g_1list_1next",
-	"_1g_1object_1unref",
 	"_1gnome_1icon_1lookup",
 	"_1gnome_1icon_1theme_1lookup_1icon",
 	"_1gnome_1icon_1theme_1new",
 	"_1gnome_1vfs_1get_1mime_1type",
-	"_1gnome_1vfs_1get_1registered_1mime_1types",
 	"_1gnome_1vfs_1init",
 	"_1gnome_1vfs_1is_1executable_1command_1string",
 	"_1gnome_1vfs_1make_1uri_1from_1input",
 	"_1gnome_1vfs_1make_1uri_1from_1input_1with_1dirs",
 	"_1gnome_1vfs_1mime_1application_1free",
 	"_1gnome_1vfs_1mime_1application_1launch",
-	"_1gnome_1vfs_1mime_1extensions_1list_1free",
 	"_1gnome_1vfs_1mime_1get_1default_1application",
-	"_1gnome_1vfs_1mime_1get_1extensions_1list",
-	"_1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free",
 	"_1gnome_1vfs_1mime_1type_1from_1name",
 	"_1gnome_1vfs_1mime_1type_1get_1equivalence",
 	"_1gnome_1vfs_1url_1show",
 	"memmove",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(GNOME_nativeFunctionNames) / sizeof(char*)
+int GNOME_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int GNOME_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/gnome_stats.h b/gnome_stats.h
index eea5ffe..4004fae 100644
--- a/gnome_stats.h
+++ b/gnome_stats.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -30,26 +30,17 @@ extern char* GNOME_nativeFunctionNames[];
 
 typedef enum {
 	GnomeVFSMimeApplication_1sizeof_FUNC,
-	_1g_1free_FUNC,
-	_1g_1list_1append_FUNC,
-	_1g_1list_1free_FUNC,
-	_1g_1list_1next_FUNC,
-	_1g_1object_1unref_FUNC,
 	_1gnome_1icon_1lookup_FUNC,
 	_1gnome_1icon_1theme_1lookup_1icon_FUNC,
 	_1gnome_1icon_1theme_1new_FUNC,
 	_1gnome_1vfs_1get_1mime_1type_FUNC,
-	_1gnome_1vfs_1get_1registered_1mime_1types_FUNC,
 	_1gnome_1vfs_1init_FUNC,
 	_1gnome_1vfs_1is_1executable_1command_1string_FUNC,
 	_1gnome_1vfs_1make_1uri_1from_1input_FUNC,
 	_1gnome_1vfs_1make_1uri_1from_1input_1with_1dirs_FUNC,
 	_1gnome_1vfs_1mime_1application_1free_FUNC,
 	_1gnome_1vfs_1mime_1application_1launch_FUNC,
-	_1gnome_1vfs_1mime_1extensions_1list_1free_FUNC,
 	_1gnome_1vfs_1mime_1get_1default_1application_FUNC,
-	_1gnome_1vfs_1mime_1get_1extensions_1list_FUNC,
-	_1gnome_1vfs_1mime_1registered_1mime_1type_1list_1free_FUNC,
 	_1gnome_1vfs_1mime_1type_1from_1name_FUNC,
 	_1gnome_1vfs_1mime_1type_1get_1equivalence_FUNC,
 	_1gnome_1vfs_1url_1show_FUNC,
diff --git a/make_common.mak b/make_common.mak
index f4b71fb..083eaf4 100644
--- a/make_common.mak
+++ b/make_common.mak
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2012 IBM Corporation and others.
+# Copyright (c) 2000, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -10,5 +10,5 @@
 #*******************************************************************************
 
 maj_ver=4
-min_ver=233
-comma_ver=4,2,3,3
+min_ver=333
+comma_ver=4,3,3,3
diff --git a/make_freebsd.mak b/make_freebsd.mak
index 6f71c76..0bf9416 100644
--- a/make_freebsd.mak
+++ b/make_freebsd.mak
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/make_linux.mak b/make_linux.mak
index 2e40747..6e12009 100644
--- a/make_linux.mak
+++ b/make_linux.mak
@@ -14,13 +14,18 @@
 include make_common.mak
 
 SWT_VERSION=$(maj_ver)$(min_ver)
+GTK_VERSION?=2.0
 
 # Define the various shared libraries to be build.
 WS_PREFIX = gtk
 SWT_PREFIX = swt
 CDE_PREFIX = swt-cde
 AWT_PREFIX = swt-awt
+ifeq ($(GTK_VERSION), 3.0)
+SWTPI_PREFIX = swt-pi3
+else
 SWTPI_PREFIX = swt-pi
+endif
 CAIRO_PREFIX = swt-cairo
 ATK_PREFIX = swt-atk
 GNOME_PREFIX = swt-gnome
@@ -47,16 +52,20 @@ CAIROCFLAGS = `pkg-config --cflags cairo`
 CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
 
 # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0)
-GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
-GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-2.0 -lgthread-2.0 -lXtst
+GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION)`
+ifeq ($(GTK_VERSION), 3.0)
+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0 -lXtst
+else
+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-$(GTK_VERSION) -lgthread-2.0 -lXtst
+endif
 
 CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc
 
 AWT_LFLAGS = -shared ${SWT_LFLAGS} 
 AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
 
-ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0`
-ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0
+ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION)`
+ATKLIBS = `pkg-config --libs-only-L atk` -latk-1.0 
 
 GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0`
 GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2
@@ -79,7 +88,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/linux \
 	${SWT_PTR_CFLAGS}
-MOZILLALFLAGS = -shared -Wl,--version-script=mozilla_exports -Bsymbolic
+MOZILLALFLAGS = -shared ${SWT_LFLAGS} -Wl,--version-script=mozilla_exports -Bsymbolic
 MOZILLAEXCLUDES = -DNO__1XPCOMGlueShutdown \
 	-DNO__1XPCOMGlueStartup \
 	-DNO__1XPCOMGlueLoadXULFunctions \
@@ -241,7 +250,7 @@ xpcom_stats.o: xpcom_stats.cpp
 make_xulrunner:$(XULRUNNER_LIB)
 
 $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS)
-	echo -e "#include<stdlib.h>\nsize_t je_malloc_usable_size_in_advance(size_t n) {\nreturn n;\n}" | gcc --shared -xc - -o libswt-xulrunner-fix.so
+	echo -e "#include<stdlib.h>\nsize_t je_malloc_usable_size_in_advance(size_t n) {\nreturn n;\n}" | gcc  $(LFLAGS) $(CFLAGS) -xc - -o libswt-xulrunner-fix.so
 	$(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS}
 
 xpcomxul.o: xpcom.cpp
diff --git a/make_solaris_x86.mak b/make_solaris_x86.mak
index 6764c33..e0a3896 100644
--- a/make_solaris_x86.mak
+++ b/make_solaris_x86.mak
@@ -1,5 +1,5 @@
 #*******************************************************************************
-# Copyright (c) 2000, 2010 IBM Corporation and others.
+# Copyright (c) 2000, 2011 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
diff --git a/nsIScriptContext.h b/nsIScriptContext.h
index 783cf3d..5c42418 100644
--- a/nsIScriptContext.h
+++ b/nsIScriptContext.h
@@ -48,7 +48,7 @@
 #include "nscore.h"
 //#include "nsStringGlue.h" //SWT-20090407
 #include "nsISupports.h"
-#include "nsCOMPtr.h"
+//#include "nsCOMPtr.h" //SWT-20090407
 #include "nsIProgrammingLanguage.h"
 
 class nsIScriptGlobalObject;
diff --git a/nsIScriptContext_17.h b/nsIScriptContext_17.h
new file mode 100644
index 0000000..31a9529
--- /dev/null
+++ b/nsIScriptContext_17.h
@@ -0,0 +1,398 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * This file is derived from the Original Code provided by mozilla.org,
+ * whose Initial Developer is Netscape Communications Corporation.  Changes
+ * to the original file were made by SWT on March 7, 2013 and are marked
+ * with trailing comment "//SWT-20130307".
+ */
+
+#ifndef nsIScriptContext17_h__ //SWT-20130307
+#define nsIScriptContext17_h__ //SWT-20130307
+
+#define int32_t int //SWT-20130307
+#define uint32_t unsigned int //SWT-20130307
+#include "nscore.h"
+//#include "nptypes.h" //SWT-20130307
+//#include "nsStringGlue.h" //SWT-20130307
+#include "nsISupports.h"
+//#include "nsCOMPtr.h" //SWT-20130307
+#include "nsIProgrammingLanguage.h"
+//#include "jsfriendapi.h" //SWT-20130307
+//#include "jspubtd.h" //SWT-20130307
+
+class nsIScriptGlobalObject17; //SWT-20130307
+//class nsIScriptSecurityManager; //SWT-20130307
+//class nsIPrincipal; //SWT-20130307
+//class nsIAtom; //SWT-20130307
+//class nsIArray; //SWT-20130307
+//class nsIVariant; //SWT-20130307
+//class nsIObjectInputStream; //SWT-20130307
+//class nsIObjectOutputStream; //SWT-20130307
+template<class> class nsScriptObjectHolder17; //SWT-20130307
+class nsIScriptObjectPrincipal;
+class nsIDOMWindow;
+class nsIURI;
+class JSContext; //SWT-20130307
+class JSVersion; //SWT-20130307
+class Value; //SWT-20130307
+typedef struct JSScript JSScript; //SWT-20130307
+typedef struct JSObject JSObject; //SWT-20130307
+
+typedef void (*nsScriptTerminationFunc)(nsISupports* aRef);
+
+// #define NS_ISCRIPTCONTEXTPRINCIPAL_IID \ //SWT-20130307
+//  { 0xd012cdb3, 0x8f1e, 0x4440, \ //SWT-20130307
+//    { 0x8c, 0xbd, 0x32, 0x7f, 0x98, 0x1d, 0x37, 0xb4 } } //SWT-20130307
+
+class nsIScriptContextPrincipal17 : public nsISupports //SWT-20130307
+{
+public:
+//  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTCONTEXTPRINCIPAL_IID) //SWT-20130307
+
+  virtual nsIScriptObjectPrincipal* GetObjectPrincipal() = 0;
+};
+
+// NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContextPrincipal, //SWT-20130307
+//                              NS_ISCRIPTCONTEXTPRINCIPAL_IID) //SWT-20130307
+
+//#define NS_ISCRIPTCONTEXT_IID \ //SWT-20130307
+//{ 0x8bdcea47, 0x6704, 0x4dd9, \ //SWT-20130307
+//  { 0xa1, 0x48, 0x05, 0x34, 0xcf, 0xe2, 0xdd, 0x57 } } //SWT-20130307
+
+/* This MUST match JSVERSION_DEFAULT.  This version stuff if we don't
+   know what language we have is a little silly... */
+#define SCRIPTVERSION_DEFAULT JSVERSION_DEFAULT
+
+/**
+ * It is used by the application to initialize a runtime and run scripts.
+ * A script runtime would implement this interface.
+ */
+class nsIScriptContext17 : public nsIScriptContextPrincipal17  //SWT-20130307
+{
+public:
+//  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTCONTEXT_IID) //SWT-20130307
+
+  virtual void SetGlobalObject(nsIScriptGlobalObject* aGlobalObject) = 0;
+
+  /**
+   * Compile and execute a script.
+   *
+   * @param aScript a string representing the script to be executed
+   * @param aScopeObject a script object for the scope to execute in, or
+   *                     nullptr to use a default scope
+   * @param aPrincipal the principal the script should be evaluated with
+   * @param aOriginPrincipal the principal the script originates from.  If null,
+   *                         aPrincipal is used.
+   * @param aURL the URL or filename for error messages
+   * @param aLineNo the starting line number of the script for error messages
+   * @param aVersion the script language version to use when executing
+   * @param aRetValue the result of executing the script, or null for no result.
+   *        If this is a JS context, it's the caller's responsibility to
+   *        preserve aRetValue from GC across this call
+   * @param aIsUndefined true if the result of executing the script is the
+   *                     undefined value
+   *
+   * @return NS_OK if the script was valid and got executed
+   *
+   **/
+  virtual nsresult EvaluateString(const nsAString& aScript,
+                                  JSObject* aScopeObject,
+                                  nsIPrincipal *aPrincipal,
+                                  nsIPrincipal *aOriginPrincipal,
+                                  const char *aURL,
+                                  uint32_t aLineNo,
+                                  JSVersion aVersion,
+                                  nsAString *aRetValue,
+                                  bool* aIsUndefined) = 0;
+
+  virtual nsresult EvaluateStringWithValue(const nsAString& aScript,
+                                           JSObject* aScopeObject,
+                                           nsIPrincipal *aPrincipal,
+                                           const char *aURL,
+                                           uint32_t aLineNo,
+                                           uint32_t aVersion,
+                                           /*JS::*/Value* aRetValue, //SWT-20130307
+                                           bool* aIsUndefined) = 0;
+
+  /**
+   * Compile a script.
+   *
+   * @param aText a PRUnichar buffer containing script source
+   * @param aTextLength number of characters in aText
+   * @param aPrincipal the principal that produced the script
+   * @param aURL the URL or filename for error messages
+   * @param aLineNo the starting line number of the script for error messages
+   * @param aVersion the script language version to use when executing
+   * @param aScriptObject an executable object that's the result of compiling
+   *                      the script.
+   * @param aSaveSource force the source code to be saved by the JS engine in memory
+   *
+   * @return NS_OK if the script source was valid and got compiled.
+   *
+   **/
+  virtual nsresult CompileScript(const PRUnichar* aText,
+                                 int32_t aTextLength,
+                                 nsIPrincipal* aPrincipal,
+                                 const char* aURL,
+                                 uint32_t aLineNo,
+                                 uint32_t aVersion,
+                                 nsScriptObjectHolder17<JSScript>& aScriptObject, //SWT-20130307
+                                 bool aSaveSource = false) = 0;
+
+  /**
+   * Execute a precompiled script object.
+   *
+   * @param aScriptObject an object representing the script to be executed
+   * @param aScopeObject an object telling the scope in which to execute,
+   *                     or nullptr to use a default scope
+   * @param aRetValue the result of executing the script, may be null in
+   *                  which case no result string is computed
+   * @param aIsUndefined true if the result of executing the script is the
+   *                     undefined value, may be null for "don't care"
+   *
+   * @return NS_OK if the script was valid and got executed
+   *
+   */
+  virtual nsresult ExecuteScript(JSScript* aScriptObject,
+                                 JSObject* aScopeObject,
+                                 nsAString* aRetValue,
+                                 bool* aIsUndefined) = 0;
+
+  /**
+   * Compile the event handler named by atom aName, with function body aBody
+   * into a function object returned if ok via aHandler.  Does NOT bind the
+   * function to anything - BindCompiledEventHandler() should be used for that
+   * purpose.  Note that this event handler is always considered 'shared' and
+   * hence is compiled without principals.  Never call the returned object
+   * directly - it must be bound (and thereby cloned, and therefore have the 
+   * correct principals) before use!
+   *
+   * If the compilation sets a pending exception on the native context, it is
+   * this method's responsibility to report said exception immediately, without
+   * relying on callers to do so.
+   *
+   *
+   * @param aName an nsIAtom pointer naming the function; it must be lowercase
+   *        and ASCII, and should not be longer than 63 chars.  This bound on
+   *        length is enforced only by assertions, so caveat caller!
+   * @param aEventName the name that the event object should be bound to
+   * @param aBody the event handler function's body
+   * @param aURL the URL or filename for error messages
+   * @param aLineNo the starting line number of the script for error messages
+   * @param aVersion the script language version to use when executing
+   * @param aHandler the out parameter in which a void pointer to the compiled
+   *        function object is stored on success
+   *
+   * @return NS_OK if the function body was valid and got compiled
+   */
+  virtual nsresult CompileEventHandler(nsIAtom* aName,
+                                       uint32_t aArgCount,
+                                       const char** aArgNames,
+                                       const nsAString& aBody,
+                                       const char* aURL,
+                                       uint32_t aLineNo,
+                                       uint32_t aVersion,
+                                       nsScriptObjectHolder17<JSObject>& aHandler) = 0; //SWT-20130307
+
+  /**
+   * Call the function object with given args and return its boolean result,
+   * or true if the result isn't boolean.
+   *
+   * @param aTarget the event target
+   * @param aScript an object telling the scope in which to call the compiled
+   *        event handler function.
+   * @param aHandler function object (function and static scope) to invoke.
+   * @param argv array of arguments.  Note each element is assumed to
+   *        be an nsIVariant.
+   * @param rval out parameter returning result
+   **/
+  virtual nsresult CallEventHandler(nsISupports* aTarget,
+                                    JSObject* aScope, JSObject* aHandler,
+                                    nsIArray *argv, nsIVariant **rval) = 0;
+
+  /**
+   * Bind an already-compiled event handler function to the given
+   * target.  Scripting languages with static scoping must re-bind the
+   * scope chain for aHandler to begin (after the activation scope for
+   * aHandler itself, typically) with aTarget's scope.
+   *
+   * The result of the bind operation is a new handler object, with
+   * principals now set and scope set as above.  This is returned in
+   * aBoundHandler.  When this function is called, aBoundHandler is
+   * expected to not be holding an object.
+   *
+   * @param aTarget an object telling the scope in which to bind the compiled
+   *        event handler function.  The context will presumably associate
+   *        this nsISupports with a native script object.
+   * @param aScope the scope in which the script object for aTarget should be
+   *        looked for.
+   * @param aHandler the function object to bind, created by an earlier call to
+   *        CompileEventHandler
+   * @param aBoundHandler [out] the result of the bind operation.
+   * @return NS_OK if the function was successfully bound
+   */
+  virtual nsresult BindCompiledEventHandler(nsISupports* aTarget,
+                                            JSObject* aScope,
+                                            JSObject* aHandler,
+                                            nsScriptObjectHolder17<JSObject>& aBoundHandler) = 0; //SWT-20130307
+
+  /**
+   * Compile a function that isn't used as an event handler.
+   *
+   * NOTE: Not yet language agnostic (main problem is XBL - not yet agnostic)
+   * Caller must make sure aFunctionObject is a JS GC root.
+   *
+   **/
+  virtual nsresult CompileFunction(JSObject* aTarget,
+                                   const nsACString& aName,
+                                   uint32_t aArgCount,
+                                   const char** aArgArray,
+                                   const nsAString& aBody,
+                                   const char* aURL,
+                                   uint32_t aLineNo,
+                                   uint32_t aVersion,
+                                   bool aShared,
+                                   JSObject** aFunctionObject) = 0;
+
+  /**
+   * Return the global object.
+   *
+   **/
+  virtual nsIScriptGlobalObject *GetGlobalObject() = 0;
+
+  /**
+   * Return the native script context
+   *
+   **/
+  virtual JSContext* GetNativeContext() = 0;
+
+  /**
+   * Return the native global object for this context.
+   *
+   **/
+  virtual JSObject* GetNativeGlobal() = 0;
+
+  /**
+   * Initialize the context generally. Does not create a global object.
+   **/
+  virtual nsresult InitContext() = 0;
+
+  /**
+   * Check to see if context is as yet intialized. Used to prevent
+   * reentrancy issues during the initialization process.
+   *
+   * @return true if initialized, false if not
+   *
+   */
+  virtual bool IsContextInitialized() = 0;
+
+  /**
+   * For garbage collected systems, do a synchronous collection pass.
+   * May be a no-op on other systems
+   *
+   * @return NS_OK if the method is successful
+   */
+ // virtual void GC(js::gcreason::Reason aReason) = 0; //SWT-20130307
+
+  /**
+   * Inform the context that a script was evaluated.
+   * A GC may be done if "necessary."
+   * This call is necessary if script evaluation is done
+   * without using the EvaluateScript method.
+   * @param aTerminated If true then call termination function if it was 
+   *    previously set. Within DOM this will always be true, but outside 
+   *    callers (such as xpconnect) who may do script evaluations nested
+   *    inside DOM script evaluations can pass false to avoid premature
+   *    calls to the termination function.
+   * @return NS_OK if the method is successful
+   */
+  virtual void ScriptEvaluated(bool aTerminated) = 0;
+
+  virtual nsresult Serialize(nsIObjectOutputStream* aStream,
+                             JSScript* aScriptObject) = 0;
+  
+  /* Deserialize a script from a stream.
+   */
+  virtual nsresult Deserialize(nsIObjectInputStream* aStream,
+                               nsScriptObjectHolder17<JSScript>& aResult) = 0; //SWT-20130307
+
+  /**
+   * JS only - this function need not be implemented by languages other
+   * than JS (ie, this should be moved to a private interface!)
+   * Called to specify a function that should be called when the current
+   * script (if there is one) terminates. Generally used if breakdown
+   * of script state needs to happen, but should be deferred till
+   * the end of script evaluation.
+   *
+   * @throws NS_ERROR_OUT_OF_MEMORY if that happens
+   */
+  virtual void SetTerminationFunction(nsScriptTerminationFunc aFunc,
+                                      nsIDOMWindow* aRef) = 0;
+
+  /**
+   * Called to disable/enable script execution in this context.
+   */
+  virtual bool GetScriptsEnabled() = 0;
+  virtual void SetScriptsEnabled(bool aEnabled, bool aFireTimeouts) = 0;
+
+  // SetProperty is suspect and jst believes should not be needed.  Currenly
+  // used only for "arguments".
+  virtual nsresult SetProperty(JSObject* aTarget, const char* aPropName, nsISupports* aVal) = 0;
+  /** 
+   * Called to set/get information if the script context is
+   * currently processing a script tag
+   */
+  virtual bool GetProcessingScriptTag() = 0;
+  virtual void SetProcessingScriptTag(bool aResult) = 0;
+
+  /**
+   * Called to find out if this script context might be executing script.
+   */
+  virtual bool GetExecutingScript() = 0;
+
+  /**
+   * Tell the context whether or not to GC when destroyed.  An optimization
+   * used when the window is a [i]frame, so GC will happen anyway.
+   */
+  virtual void SetGCOnDestruction(bool aGCOnDestruction) = 0;
+
+  /**
+   * Initialize DOM classes on aGlobalObj, always call
+   * WillInitializeContext() before calling InitContext(), and always
+   * call DidInitializeContext() when a context is fully
+   * (successfully) initialized.
+   */
+  virtual nsresult InitClasses(JSObject* aGlobalObj) = 0;
+
+  /**
+   * Tell the context we're about to be reinitialize it.
+   */
+  virtual void WillInitializeContext() = 0;
+
+  /**
+   * Tell the context we're done reinitializing it.
+   */
+  virtual void DidInitializeContext() = 0;
+
+  /* Memory managment for script objects.  Used by the implementation of
+   * nsScriptObjectHolder to manage the lifetimes of the held script objects.
+   *
+   * See also nsIScriptRuntime, which has identical methods and is useful
+   * in situations when you do not have an nsIScriptContext.
+   * 
+   */
+  virtual nsresult DropScriptObject(void *object) = 0;
+  virtual nsresult HoldScriptObject(void *object) = 0;
+
+  virtual void EnterModalState() = 0;
+  virtual void LeaveModalState() = 0;
+};
+
+//NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContext, NS_ISCRIPTCONTEXT_IID) //SWT-20130307
+
+#endif // nsIScriptContext17_h__ //SWT-20130307
+
diff --git a/nsIScriptGlobalObject.h b/nsIScriptGlobalObject.h
index 276d40f..c382e69 100644
--- a/nsIScriptGlobalObject.h
+++ b/nsIScriptGlobalObject.h
@@ -187,7 +187,7 @@ public:
 //virtual nsresult HandleScriptError(nsScriptErrorEvent *aErrorEvent, //SWT-20090407
 //                                   nsEventStatus *aEventStatus) { //SWT-20090407
 //  return NS_HandleScriptError(this, aErrorEvent, aEventStatus); //SWT-20090407
-//}
+//} //SWT-20090407
 };
 
 //NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptGlobalObject, //SWT-20090407
diff --git a/nsIScriptGlobalObject_17.h b/nsIScriptGlobalObject_17.h
new file mode 100644
index 0000000..e1ceb97
--- /dev/null
+++ b/nsIScriptGlobalObject_17.h
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 sw=2 et tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/*
+ * This file is derived from the Original Code provided by mozilla.org,
+ * whose Initial Developer is Netscape Communications Corporation.  Changes
+ * to the original file were made by SWT on May 7, 2013 and are marked
+ * with trailing comment "//SWT-20130307".
+ */
+ 
+#ifndef nsIScriptGlobalObject17_h__ //SWT-20130307
+#define nsIScriptGlobalObject17_h__ //SWT-20130307
+
+#include "nsISupports.h"
+//#include "nsEvent.h" //SWT-20130307
+#include "nsIProgrammingLanguage.h"
+
+class nsIScriptContext;
+class nsIDOMEvent;
+class nsIScriptGlobalObjectOwner;
+class nsIArray;
+class nsScriptErrorEvent;
+class nsIScriptGlobalObject;
+struct JSObject; // until we finally remove GetGlobalJSObject...
+
+// Some helpers for working with integer "script type IDs", and specifically
+// for working with arrays of such objects. For example, it is common for
+// implementations supporting multiple script languages to keep each
+// language's nsIScriptContext in an array indexed by the language ID.
+
+// Implementation note: We always ignore nsIProgrammingLanguage::UNKNOWN and
+// nsIProgrammingLanguage::CPLUSPLUS - this gives javascript slot 0.  An
+// attempted micro-optimization tried to avoid us going all the way to 
+// nsIProgrammingLanguage::MAX; however:
+// * Someone is reportedly working on a PHP impl - that has value 9
+// * nsGenericElement therefore allows 4 bits for the value.
+// So there is no good reason for us to be more restrictive again...
+
+#define NS_STID_FIRST nsIProgrammingLanguage::JAVASCRIPT
+// like nsGenericElement, only 4 bits worth is valid...
+#define NS_STID_LAST (nsIProgrammingLanguage::MAX > 0x000FU ? \
+                      0x000FU : nsIProgrammingLanguage::MAX)
+
+// Use to declare the array size
+#define NS_STID_ARRAY_UBOUND (NS_STID_LAST-NS_STID_FIRST+1)
+
+// Is a language ID valid?
+#define NS_STID_VALID(langID) (langID >= NS_STID_FIRST && langID <= NS_STID_LAST)
+
+// Return an index for a given ID.
+#define NS_STID_INDEX(langID) (langID-NS_STID_FIRST)
+
+// Create a 'for' loop iterating over all possible language IDs (*not* indexes)
+#define NS_STID_FOR_ID(varName) \
+          for (varName=NS_STID_FIRST;varName<=NS_STID_LAST;varName++)
+
+// Create a 'for' loop iterating over all indexes (when you don't need to know
+// what language it is)
+#define NS_STID_FOR_INDEX(varName) \
+          for (varName=0;varName<=NS_STID_INDEX(NS_STID_LAST);varName++)
+
+// A helper function for nsIScriptGlobalObject implementations to use
+// when handling a script error.  Generally called by the global when a context
+// notifies it of an error via nsIScriptGlobalObject::HandleScriptError.
+// Returns true if HandleDOMEvent was actually called, in which case
+// aStatus will be filled in with the status.
+//bool //SWT-20130307
+//NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal, //SWT-20130307
+//                     nsScriptErrorEvent *aErrorEvent, //SWT-20130307
+//                     nsEventStatus *aStatus); //SWT-20130307
+
+
+//#define NS_ISCRIPTGLOBALOBJECT_IID \ //SWT-20130307
+//{ 0x92569431, 0x6e6e, 0x408a, \ //SWT-20130307
+//  { 0xa8, 0x8c, 0x45, 0x28, 0x5c, 0x1c, 0x85, 0x73 } } //SWT-20130307
+
+/**
+ * The global object which keeps a script context for each supported script
+ * language. This often used to store per-window global state.
+ */
+
+class nsIScriptGlobalObject17 : public nsISupports //SWT-20130307
+{
+public:
+//  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTGLOBALOBJECT_IID) //SWT-20130307
+
+  /**
+   * Ensure that the script global object is initialized for working with the
+   * specified script language ID.  This will set up the nsIScriptContext
+   * and 'script global' for that language, allowing these to be fetched
+   * and manipulated.
+   * @return NS_OK if successful; error conditions include that the language
+   * has not been registered, as well as 'normal' errors, such as
+   * out-of-memory
+   */
+  virtual nsresult EnsureScriptEnvironment() = 0;
+  /**
+   * Get a script context (WITHOUT added reference) for the specified language.
+   */
+  virtual nsIScriptContext *GetScriptContext() = 0;
+  
+  virtual JSObject* GetGlobalJSObject() = 0;
+
+  nsIScriptContext* GetContext() {
+    return GetScriptContext();
+  }
+
+  /**
+   * Called when the global script for a language is finalized, typically as
+   * part of its GC process.  By the time this call is made, the
+   * nsIScriptContext for the language has probably already been removed.
+   * After this call, the passed object is dead - which should generally be the
+   * same object the global is using for a global for that language.
+   */
+  virtual void OnFinalize(JSObject* aObject) = 0;
+
+  /**
+   * Called to enable/disable scripts.
+   */
+  virtual void SetScriptsEnabled(bool aEnabled, bool aFireTimeouts) = 0;
+
+  /**
+   * Handle a script error.  Generally called by a script context.
+   */
+//  virtual nsresult HandleScriptError(nsScriptErrorEvent *aErrorEvent, //SWT-20130307
+//                                     nsEventStatus *aEventStatus) { //SWT-20130307
+//    NS_ENSURE_STATE(NS_HandleScriptError(this, aErrorEvent, aEventStatus)); //SWT-20130307
+//    return NS_OK; //SWT-20130307
+//  } //SWT-20130307
+
+  virtual bool IsBlackForCC() { return false; }
+};
+
+//NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptGlobalObject, //SWT-20130307
+//                              NS_ISCRIPTGLOBALOBJECT_IID) //SWT-20130307
+
+#endif
diff --git a/org/eclipse/swt/SWT.java b/org/eclipse/swt/SWT.java
index d774019..fbad42d 100644
--- a/org/eclipse/swt/SWT.java
+++ b/org/eclipse/swt/SWT.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -1784,6 +1784,23 @@ public class SWT {
 	public static final int TRANSPARENT = 1 << 30;
 	
 	/**
+	 * Style constant to indicate base text direction (value is 1<<31).
+	 * <p>
+	 * When the bit is set, text direction mismatches the widget orientation.
+	 * <br>Note that this is a <em>HINT</em>.
+	 * </p>
+	 * <p><b>Used By:</b><ul>
+	 * <li><code>Control</code></li>
+	 * </ul></p>
+	 * 
+	 * @see org.eclipse.swt.widgets.Control#setTextDirection(int)
+	 * @see org.eclipse.swt.widgets.Control#getTextDirection()
+	 * 
+	 * @since 3.102
+	 */
+	public static final int FLIP_TEXT_DIRECTION = 1 << 31;
+
+	/**
 	 * Style constant for align up behavior (value is 1<<7,
 	 * since align UP and align TOP are considered the same).
 	 * <p><b>Used By:</b><ul>
@@ -2266,19 +2283,19 @@ public class SWT {
 	public static final int MODIFIER_MASK;
 	
 	/**
-	 * Keyboard and/or mouse event mask indicating that mouse button one
+	 * Keyboard and/or mouse event mask indicating that mouse button one (usually 'left')
 	 * was pushed when the event was generated. (value is 1<<19).
 	 */
 	public static final int BUTTON1 = 1 << 19;
 
 	/**
-	 * Keyboard and/or mouse event mask indicating that mouse button two
+	 * Keyboard and/or mouse event mask indicating that mouse button two (usually 'middle')
 	 * was pushed when the event was generated. (value is 1<<20).
 	 */
 	public static final int BUTTON2 = 1 << 20;
 
 	/**
-	 * Keyboard and/or mouse event mask indicating that mouse button three
+	 * Keyboard and/or mouse event mask indicating that mouse button three (usually 'right')
 	 * was pushed when the event was generated. (value is 1<<21).
 	 */
 	public static final int BUTTON3 = 1 << 21;
@@ -2320,6 +2337,9 @@ public class SWT {
 	 * was pushed on the keyboard when the event was generated.
 	 * 
 	 * This is the primary keyboard modifier for the platform.
+	 * <p>
+	 * {@link #CTRL} on most platforms ({@link #COMMAND} on the Mac).
+	 * </p>
 	 * 
 	 * @since 2.1
 	 */
@@ -2330,6 +2350,9 @@ public class SWT {
 	 * was pushed on the keyboard when the event was generated.
 	 * 
 	 * This is the secondary keyboard modifier for the platform.
+	 * <p>
+	 * {@link #SHIFT} on most platforms.
+	 * </p>
 	 * 
 	 * @since 2.1
 	 */
@@ -2338,6 +2361,9 @@ public class SWT {
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD3 key
 	 * was pushed on the keyboard when the event was generated.
+	 * <p>
+	 * {@link #ALT} on most platforms.
+	 * </p>
 	 * 
 	 * @since 2.1
 	 */
@@ -2346,6 +2372,9 @@ public class SWT {
 	/**
 	 * Keyboard and/or mouse event mask indicating that the MOD4 key
 	 * was pushed on the keyboard when the event was generated.
+	 * <p>
+	 * Undefined on most platforms ({@link #CTRL} on the Mac).
+	 * </p>
 	 * 
 	 * @since 2.1
 	 */
@@ -3156,6 +3185,13 @@ public class SWT {
 	 * System color used to paint inactive title background gradient (value is 35).
 	 */
 	public static final int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = 35;
+
+	/**
+	 * System color used to paint link text (value is 36).
+	 * 
+	 * @since 3.102
+	 */
+	public static final int COLOR_LINK_FOREGROUND = 36;
 	
 	/**
 	 * Draw constant indicating whether the drawing operation
@@ -4096,7 +4132,7 @@ public class SWT {
 	 * 
 	 * @since 3.6
 	 */
-	public static final String SKIN_CLASS = "org.eclipse.swt.skin.class";
+	public static final String SKIN_CLASS = "org.eclipse.swt.skin.class"; //$NON-NLS-1$
 
 	/**
 	 * Key value for setting and getting the skin id of a widget.
@@ -4106,7 +4142,7 @@ public class SWT {
 	 * 
 	 * @since 3.6
 	 */
-	public static final String SKIN_ID = "org.eclipse.swt.skin.id";
+	public static final String SKIN_ID = "org.eclipse.swt.skin.id"; //$NON-NLS-1$
 	
 	/**
 	 * The <code>Scrollable</code> constant to indicate that
diff --git a/org/eclipse/swt/SWTError.java b/org/eclipse/swt/SWTError.java
index 6a2341d..e190b8d 100644
--- a/org/eclipse/swt/SWTError.java
+++ b/org/eclipse/swt/SWTError.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/SWTException.java b/org/eclipse/swt/SWTException.java
index c139457..cebb96c 100644
--- a/org/eclipse/swt/SWTException.java
+++ b/org/eclipse/swt/SWTException.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/accessibility/ACC.java b/org/eclipse/swt/accessibility/ACC.java
index 1cf770e..dc0291d 100644
--- a/org/eclipse/swt/accessibility/ACC.java
+++ b/org/eclipse/swt/accessibility/ACC.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -139,7 +139,8 @@ public class ACC {
 	 * 
 	 * @see AccessibleControlListener#getChild
 	 * 
-	 * @since 3.6 */
+	 * @since 3.6
+	 */
 	public static final int CHILDID_CHILD_AT_INDEX = -4;
 	
 	/**
@@ -147,7 +148,8 @@ public class ACC {
 	 * 
 	 * @see AccessibleControlListener#getChild
 	 * 
-	 * @since 3.6 */
+	 * @since 3.6
+	 */
 	public static final int CHILDID_CHILD_INDEX = -5;
 	
 	/**
diff --git a/org/eclipse/swt/accessibility/Accessible.java b/org/eclipse/swt/accessibility/Accessible.java
index 9c2821c..a3f046e 100644
--- a/org/eclipse/swt/accessibility/Accessible.java
+++ b/org/eclipse/swt/accessibility/Accessible.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -40,17 +40,9 @@ import org.eclipse.swt.internal.gtk.*;
  * @since 2.0
  */
 public class Accessible {
-	Vector accessibleListeners = new Vector ();
-	Vector accessibleControlListeners = new Vector ();
-	Vector accessibleTextListeners = new Vector ();
-	Vector accessibleActionListeners = new Vector();
-	Vector accessibleEditableTextListeners = new Vector();
-	Vector accessibleHyperlinkListeners = new Vector();
-	Vector accessibleTableListeners = new Vector();
-	Vector accessibleTableCellListeners = new Vector();
-	Vector accessibleTextExtendedListeners = new Vector();
-	Vector accessibleValueListeners = new Vector();
-	Vector accessibleAttributeListeners = new Vector();
+	Vector accessibleListeners, accessibleControlListeners, accessibleTextListeners, accessibleActionListeners,
+		accessibleEditableTextListeners, accessibleHyperlinkListeners, accessibleTableListeners, accessibleTableCellListeners,
+		accessibleTextExtendedListeners, accessibleValueListeners, accessibleAttributeListeners;
 	Accessible parent;
 	AccessibleObject accessibleObject;
 	Control control;
@@ -137,6 +129,7 @@ public class Accessible {
 	public void addAccessibleListener (AccessibleListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleListeners == null) accessibleListeners = new Vector();
 		accessibleListeners.addElement (listener);	
 	}
 
@@ -164,6 +157,7 @@ public class Accessible {
 	public void addAccessibleControlListener (AccessibleControlListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleControlListeners == null) accessibleControlListeners = new Vector();
 		accessibleControlListeners.addElement (listener);		
 	}
 
@@ -195,8 +189,10 @@ public class Accessible {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 		if (listener instanceof AccessibleTextExtendedListener) {
+			if (accessibleTextExtendedListeners == null) accessibleTextExtendedListeners = new Vector();
 			accessibleTextExtendedListeners.addElement (listener);		
 		} else {
+			if (accessibleTextListeners == null) accessibleTextListeners = new Vector();
 			accessibleTextListeners.addElement (listener);
 		}
 	}
@@ -225,6 +221,7 @@ public class Accessible {
 	public void addAccessibleActionListener(AccessibleActionListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleActionListeners == null) accessibleActionListeners = new Vector();
 		accessibleActionListeners.addElement(listener);
 	}
 
@@ -252,6 +249,7 @@ public class Accessible {
 	public void addAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
 	    checkWidget();
 	    if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleEditableTextListeners == null) accessibleEditableTextListeners = new Vector();
 	    accessibleEditableTextListeners.addElement(listener);
 	}
 
@@ -279,6 +277,7 @@ public class Accessible {
 	public void addAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleHyperlinkListeners == null) accessibleHyperlinkListeners = new Vector();
 		accessibleHyperlinkListeners.addElement(listener);
 	}
 
@@ -306,6 +305,7 @@ public class Accessible {
 	public void addAccessibleTableListener(AccessibleTableListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleTableListeners == null) accessibleTableListeners = new Vector();
 		accessibleTableListeners.addElement(listener);
 	}
 
@@ -333,6 +333,7 @@ public class Accessible {
 	public void addAccessibleTableCellListener(AccessibleTableCellListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleTableCellListeners == null) accessibleTableCellListeners = new Vector();
 		accessibleTableCellListeners.addElement(listener);
 	}
 
@@ -360,6 +361,7 @@ public class Accessible {
 	public void addAccessibleValueListener(AccessibleValueListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleValueListeners == null) accessibleValueListeners = new Vector();
 		accessibleValueListeners.addElement(listener);
 	}
 
@@ -387,6 +389,7 @@ public class Accessible {
 	public void addAccessibleAttributeListener(AccessibleAttributeListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
+		if (accessibleAttributeListeners == null) accessibleAttributeListeners = new Vector();
 		accessibleAttributeListeners.addElement(listener);
 	}
 
@@ -476,7 +479,7 @@ public class Accessible {
 				int /*long*/ temp = list;
 				while (temp != 0) {
 					int /*long*/ widget = OS.g_list_data( temp);
-					if (OS.GTK_WIDGET_VISIBLE (widget)) {
+					if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0) ? OS.gtk_widget_get_visible (widget) : OS.GTK_WIDGET_VISIBLE (widget)) {
 						result = widget;
 						break;
 					}
@@ -541,6 +544,7 @@ public class Accessible {
 			accessibleObject = null;
 		}
 	}
+	
 	/**
 	 * Removes the listener from the collection of listeners who will
 	 * be notified when an accessible client asks for custom control
@@ -563,7 +567,10 @@ public class Accessible {
 	public void removeAccessibleControlListener (AccessibleControlListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleControlListeners.removeElement (listener);
+		if (accessibleControlListeners != null) {
+			accessibleControlListeners.removeElement(listener);
+			if (accessibleControlListeners.isEmpty()) accessibleControlListeners = null;
+		}
 	}
 
 	/**
@@ -588,7 +595,10 @@ public class Accessible {
 	public void removeAccessibleListener (AccessibleListener listener) {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
-		accessibleListeners.removeElement (listener);
+		if (accessibleListeners != null) {
+			accessibleListeners.removeElement(listener);
+			if (accessibleListeners.isEmpty()) accessibleListeners = null;
+		}
 	}
 
 	/**
@@ -617,9 +627,15 @@ public class Accessible {
 		checkWidget ();
 		if (listener == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
 		if (listener instanceof AccessibleTextExtendedListener) {
-			accessibleTextExtendedListeners.removeElement (listener);
+			if (accessibleTextExtendedListeners != null) {
+				accessibleTextExtendedListeners.removeElement (listener);
+				if (accessibleTextExtendedListeners.isEmpty()) accessibleTextExtendedListeners = null;
+			}
 		} else {
-			accessibleTextListeners.removeElement (listener);
+			if (accessibleTextListeners != null) {
+				accessibleTextListeners.removeElement (listener);
+				if (accessibleTextListeners.isEmpty()) accessibleTextListeners = null;
+			}
 		}
 	}
 	
@@ -647,7 +663,10 @@ public class Accessible {
 	public void removeAccessibleActionListener(AccessibleActionListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleActionListeners.removeElement(listener);
+		if (accessibleActionListeners != null) {
+			accessibleActionListeners.removeElement(listener);
+			if (accessibleActionListeners.isEmpty()) accessibleActionListeners = null;
+		}
 	}
 
 	/**
@@ -674,7 +693,10 @@ public class Accessible {
 	public void removeAccessibleEditableTextListener(AccessibleEditableTextListener listener) {
 	    checkWidget();
 	    if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-	    accessibleEditableTextListeners.removeElement(listener);
+	    if (accessibleEditableTextListeners != null) {
+	    	accessibleEditableTextListeners.removeElement(listener);
+			if (accessibleEditableTextListeners.isEmpty()) accessibleEditableTextListeners = null;
+	    }
 	}
 	
 	/**
@@ -701,7 +723,10 @@ public class Accessible {
 	public void removeAccessibleHyperlinkListener(AccessibleHyperlinkListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleHyperlinkListeners.removeElement(listener);
+		if (accessibleHyperlinkListeners != null) {
+			accessibleHyperlinkListeners.removeElement(listener);
+			if (accessibleHyperlinkListeners.isEmpty()) accessibleHyperlinkListeners = null;
+		}
 	}
 
 	/**
@@ -728,7 +753,10 @@ public class Accessible {
 	public void removeAccessibleTableListener(AccessibleTableListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleTableListeners.removeElement(listener);
+		if (accessibleTableListeners != null) {
+			accessibleTableListeners.removeElement(listener);
+			if (accessibleTableListeners.isEmpty()) accessibleTableListeners = null;
+		}
 	}
 
 	/**
@@ -755,7 +783,10 @@ public class Accessible {
 	public void removeAccessibleTableCellListener(AccessibleTableCellListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleTableCellListeners.removeElement(listener);
+		if (accessibleTableCellListeners != null) {
+			accessibleTableCellListeners.removeElement(listener);
+			if (accessibleTableCellListeners.isEmpty()) accessibleTableCellListeners = null;
+		}
 	}
 
 	/**
@@ -782,7 +813,10 @@ public class Accessible {
 	public void removeAccessibleValueListener(AccessibleValueListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleValueListeners.removeElement(listener);
+		if (accessibleValueListeners != null) {
+			accessibleValueListeners.removeElement(listener);
+			if (accessibleValueListeners.isEmpty()) accessibleValueListeners = null;
+		}
 	}
 
 	/**
@@ -809,7 +843,10 @@ public class Accessible {
 	public void removeAccessibleAttributeListener(AccessibleAttributeListener listener) {
 		checkWidget();
 		if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
-		accessibleAttributeListeners.removeElement(listener);
+		if (accessibleAttributeListeners != null) {
+			accessibleAttributeListeners.removeElement(listener);
+			if (accessibleAttributeListeners.isEmpty()) accessibleAttributeListeners = null;
+		}
 	}
 
 	/**
diff --git a/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java b/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java
index f51f7eb..461b3d7 100644
--- a/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java
+++ b/org/eclipse/swt/accessibility/AccessibleAttributeAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,6 +38,9 @@ public class AccessibleAttributeAdapter implements AccessibleAttributeListener {
 	 * <li>[out] justify - whether or not to justify the text</li>
 	 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
 	 * <li>[out] indent - the indent in pixels</li>
+	 * <li>[out] groupLevel - the level of this accessible in its group</li>
+	 * <li>[out] groupCount - the number of similar children in this accessible's group</li>
+	 * <li>[out] groupIndex - the index of this accessible in its group</li>
 	 * <li>[out] attributes - an array of alternating key and value Strings
 	 * 		which represent additional (i.e. non predefined) attributes</li>
 	 * </ul>
diff --git a/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java b/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
index 87a3a08..0eb4d03 100644
--- a/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
+++ b/org/eclipse/swt/accessibility/AccessibleAttributeEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -23,17 +23,96 @@ import org.eclipse.swt.internal.*;
  */
 public class AccessibleAttributeEvent extends SWTEventObject {
 
+	/**
+	 * [out] the top margin in pixels 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int topMargin;
+
+	/**
+	 * [out] the bottom margin in pixels 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int bottomMargin;
+
+	/**
+	 * [out] the left margin in pixels 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int leftMargin;
+
+	/**
+	 * [out] the right margin in pixels 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int rightMargin;
+
+	/**
+	 * [out] an array of pixel locations representing tab stops
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int[] tabStops;
+
+	/**
+	 * [out] whether or not to justify the text 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public boolean justify;
+
+	/**
+	 * [out] the alignment, which is one of SWT#LEFT, SWT#RIGHT or SWT#CENTER 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int alignment;
+
+	/**
+	 * [out] the indent in pixels 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public int indent;
+	
+	/**
+	 * [out] the 1-based level of this accessible in its group
+	 *  (0 means "not applicable")
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 * @since 3.102
+	 */
+	public int groupLevel;
+	/**
+	 * [out] the 1-based number of similar children in this accessible's group,
+	 * including this accessible (0 means "not applicable")
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 * @since 3.102
+	 */
+	public int groupCount;
+	/**
+	 * [out] the 1-based index of this accessible in its group
+	 *  (0 means "not applicable")
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 * @since 3.102
+	 */
+	public int groupIndex;
+	
+	/**
+	 * [out] an array of alternating key and value Strings which
+	 * represent additional (i.e. non predefined) attributes 
+	 * 
+	 * @see AccessibleAttributeListener#getAttributes
+	 */
 	public String [] attributes;
 
-	static final long serialVersionUID = 2237016128901566049L;
+	static final long serialVersionUID = -2894665777259297851L;
 
 /**
  * Constructs a new instance of this class.
@@ -60,6 +139,9 @@ public String toString () {
 		+ " justify=" + justify   //$NON-NLS-1$
 		+ " alignment=" + alignment   //$NON-NLS-1$
 		+ " indent=" + indent   //$NON-NLS-1$
+		+ " groupLevel=" + groupLevel   //$NON-NLS-1$
+		+ " groupCount=" + groupCount   //$NON-NLS-1$
+		+ " groupIndex=" + groupIndex   //$NON-NLS-1$
 		+ "}";  //$NON-NLS-1$
 }
 }
diff --git a/org/eclipse/swt/accessibility/AccessibleAttributeListener.java b/org/eclipse/swt/accessibility/AccessibleAttributeListener.java
index da725e0..961041a 100644
--- a/org/eclipse/swt/accessibility/AccessibleAttributeListener.java
+++ b/org/eclipse/swt/accessibility/AccessibleAttributeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,9 @@ public interface AccessibleAttributeListener extends SWTEventListener {
 	 * <li>[out] justify - whether or not to justify the text</li>
 	 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
 	 * <li>[out] indent - the indent in pixels</li>
+	 * <li>[out] groupLevel - the level of this accessible in its group</li>
+	 * <li>[out] groupCount - the number of similar children in this accessible's group</li>
+	 * <li>[out] groupIndex - the index of this accessible in its group</li>
 	 * <li>[out] attributes - an array of alternating key and value Strings
 	 * 		which represent additional (i.e. non predefined) attributes</li>
 	 * </ul>
diff --git a/org/eclipse/swt/accessibility/AccessibleFactory.java b/org/eclipse/swt/accessibility/AccessibleFactory.java
index 03e4031..d055927 100644
--- a/org/eclipse/swt/accessibility/AccessibleFactory.java
+++ b/org/eclipse/swt/accessibility/AccessibleFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -357,7 +357,7 @@ class AccessibleFactory {
 		AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 		event.childID = childId;
 		Vector listeners = accessible.accessibleControlListeners;
-		for (int i = 0, length = listeners.size(); i < length; i++) {
+		for (int i = 0, length = listeners == null ? 0 : listeners.size(); i < length; i++) {
 			AccessibleControlListener listener = (AccessibleControlListener)listeners.elementAt (i);
 			listener.getRole (event);
 		}
diff --git a/org/eclipse/swt/accessibility/AccessibleObject.java b/org/eclipse/swt/accessibility/AccessibleObject.java
index 92c38a3..05a9eb8 100644
--- a/org/eclipse/swt/accessibility/AccessibleObject.java
+++ b/org/eclipse/swt/accessibility/AccessibleObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,10 @@ class AccessibleObject {
 		System.out.println (str);
 	}
 	
+	static int size(Vector listeners) {
+		return listeners == null ? 0 : listeners.size();
+	}
+
 	static AtkActionIface getActionIface (int /*long*/ atkObject) {
 		if (ATK.g_type_is_a (OS.g_type_parent (OS.G_OBJECT_TYPE (atkObject)), ATK.ATK_TYPE_ACTION())) {
 			AtkActionIface iface = new AtkActionIface ();
@@ -74,7 +78,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleActionListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
 				event.index = (int)/*64*/index;
@@ -99,7 +103,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleActionListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -123,7 +127,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleActionListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
 				event.index = (int)/*64*/index;
@@ -155,7 +159,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleActionListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
 				event.index = (int)/*64*/index;
@@ -169,7 +173,7 @@ class AccessibleObject {
 				}
 			}
 			listeners = accessible.accessibleListeners;
-			length = listeners.size();
+			length = size(listeners);
 			if (length > 0) {
 				AccessibleEvent event = new AccessibleEvent (accessible);
 				event.childID = object.id;
@@ -198,7 +202,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleActionListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleActionEvent event = new AccessibleActionEvent(accessible);
 				event.index = (int)/*64*/index;
@@ -213,7 +217,7 @@ class AccessibleObject {
 			}
 			if (index == 0) {
 				listeners = accessible.accessibleControlListeners;
-				length = listeners.size();
+				length = size(listeners);
 				if (length > 0) {
 					AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 					event.childID = object.id;
@@ -255,7 +259,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int[] parentX = new int [1], parentY = new int [1];
 				int[] parentWidth = new int [1], parentHeight = new int [1];
@@ -303,7 +307,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int[] parentX = new int [1], parentY = new int [1];
 				OS.memmove (parentX, x, 4);
@@ -344,7 +348,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int[] parentWidth = new int [1], parentHeight = new int [1];
 				OS.memmove (parentWidth, width, 4);
@@ -369,7 +373,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 				event.childID = object.id;
@@ -417,7 +421,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				Display display = accessible.control.getDisplay();
 				int /*long*/ fontDesc = OS.pango_font_description_new ();
@@ -582,7 +586,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				event.start = 0;
@@ -611,7 +615,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				int[] pos = new int [1];
@@ -640,7 +644,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				event.start = (int)/*64*/start_pos;
@@ -667,7 +671,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				event.start = (int)/*64*/start_pos;
@@ -694,7 +698,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				event.start = (int)/*64*/start_pos;
@@ -722,7 +726,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleEditableTextListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEditableTextEvent event = new AccessibleEditableTextEvent(accessible);
 				event.start = (int)/*64*/position;
@@ -756,7 +760,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.index = (int)/*int*/link_index;
@@ -782,7 +786,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -806,7 +810,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.offset = (int)/*int*/char_index;
@@ -843,7 +847,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEvent event = new AccessibleEvent (accessible);
 				event.childID = object.id;
@@ -872,10 +876,11 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleAttributeListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleAttributeEvent event = new AccessibleAttributeEvent (accessible);
-				event.topMargin = event.bottomMargin = event.leftMargin = event.rightMargin = event.alignment = event.indent = -1;
+				event.topMargin = event.bottomMargin = event.leftMargin = event.rightMargin = event.alignment
+					= event.indent = event.groupLevel = event.groupCount = event.groupIndex = -1;
 				for (int i = 0; i < length; i++) {
 					AccessibleAttributeListener listener = (AccessibleAttributeListener)listeners.elementAt (i);
 					listener.getAttributes (event);
@@ -936,6 +941,49 @@ class AccessibleObject {
 					parentResult = OS.g_slist_append(parentResult, attrPtr);
 				}
 				//TODO - tabStops
+				
+				/* Check for group attributes. */
+				int level = (event.groupLevel != -1) ? event.groupLevel : 0;
+				int setsize = (event.groupCount != -1) ? event.groupCount : 0;
+				int posinset = (event.groupIndex != -1) ? event.groupIndex : 0;
+				if (setsize == 0 && posinset == 0) {
+					/* Determine position and count for radio buttons. */
+					Control control = accessible.control;
+					if (control instanceof Button && ((control.getStyle() & SWT.RADIO) != 0)) {
+						Control [] children = control.getParent().getChildren();
+						posinset = 1;
+						setsize = 1;
+						for (int i = 0; i < children.length; i++) {
+							Control child = children[i];
+							if (child instanceof Button && ((child.getStyle() & SWT.RADIO) != 0)) {
+								if (child == control) posinset = setsize;
+								else setsize++;
+							}
+						}
+					}
+				}
+				if (level != 0) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = getStringPtr ("level"); //$NON-NLS-1$
+					attr.value = getStringPtr (String.valueOf(level));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (setsize != 0) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = getStringPtr ("setsize"); //$NON-NLS-1$
+					attr.value = getStringPtr (String.valueOf(setsize));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				if (posinset != 0) {
+					int /*long*/ attrPtr = OS.g_malloc(AtkAttribute.sizeof);
+					attr.name = getStringPtr ("posinset"); //$NON-NLS-1$
+					attr.value = getStringPtr (String.valueOf(posinset));
+					ATK.memmove(attrPtr, attr, AtkAttribute.sizeof);
+					parentResult = OS.g_slist_append(parentResult, attrPtr);
+				}
+				
 				if (event.attributes != null) {
 					int end = event.attributes.length / 2 * 2;
 					for (int i = 0; i < end; i+= 2) {
@@ -962,7 +1010,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleEvent event = new AccessibleEvent (accessible);
 				event.childID = object.id;
@@ -991,7 +1039,7 @@ class AccessibleObject {
 		if (object != null && object.id == ACC.CHILDID_SELF) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 				event.childID = object.id;
@@ -1016,7 +1064,7 @@ class AccessibleObject {
 			AccessibleControlEvent event = new AccessibleControlEvent(accessible);
 			event.childID = ACC.CHILDID_CHILD_INDEX;
 			event.detail = -1;
-			for (int i = 0; i < listeners.size(); i++) {
+			for (int i = 0; i < size(listeners); i++) {
 				AccessibleControlListener listener = (AccessibleControlListener) listeners.elementAt(i);
 				listener.getChild(event);
 			}
@@ -1058,7 +1106,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 				event.childID = object.id;
@@ -1138,7 +1186,7 @@ class AccessibleObject {
 		if (object != null && object.id == ACC.CHILDID_SELF) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleControlEvent event = new AccessibleControlEvent(accessible);
 				event.childID = ACC.CHILDID_CHILD_AT_INDEX;
@@ -1176,7 +1224,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int /*long*/ set = parentResult;
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
@@ -1238,7 +1286,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {	
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 				event.childID = object.id;
@@ -1267,7 +1315,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleControlListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {	
 				AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 				event.childID = object.id;
@@ -1301,7 +1349,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1332,7 +1380,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1365,7 +1413,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1391,7 +1439,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1422,7 +1470,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.count = (int)/*64*/parentResult;
@@ -1447,7 +1495,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.count = (int)/*64*/parentResult;
@@ -1472,7 +1520,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1484,7 +1532,7 @@ class AccessibleObject {
 				Accessible result = event.accessible;
 				if (result != null) {
 					listeners = result.accessibleTableCellListeners;
-					length = listeners.size();
+					length = size(listeners);
 					if (length > 0) {
 						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
 						cellEvent.count = (int)/*64*/parentResult;
@@ -1511,7 +1559,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1523,7 +1571,7 @@ class AccessibleObject {
 				Accessible result = event.accessible;
 				if (result != null) {
 					listeners = result.accessibleTableCellListeners;
-					length = listeners.size();
+					length = size(listeners);
 					if (length > 0) {
 						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
 						cellEvent.count = (int)/*64*/parentResult;
@@ -1545,7 +1593,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1570,7 +1618,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1600,7 +1648,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.column = (int)/*64*/column;
@@ -1623,7 +1671,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1657,7 +1705,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1680,7 +1728,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1709,7 +1757,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1737,7 +1785,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -1770,7 +1818,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.isSelected = parentResult != 0;
@@ -1796,7 +1844,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.isSelected = parentResult != 0;
@@ -1822,7 +1870,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1834,7 +1882,7 @@ class AccessibleObject {
 				Accessible result = event.accessible;
 				if (result != null) {
 					listeners = result.accessibleTableCellListeners;
-					length = listeners.size();
+					length = size(listeners);
 					if (length > 0) {
 						AccessibleTableCellEvent cellEvent = new AccessibleTableCellEvent(result);
 						cellEvent.isSelected = parentResult != 0;
@@ -1856,7 +1904,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1881,7 +1929,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.row = (int)/*64*/row;
@@ -1906,7 +1954,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.column = (int)/*64*/column;
@@ -1931,7 +1979,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTableListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTableEvent event = new AccessibleTableEvent(accessible);
 				event.column = (int)/*64*/column;
@@ -1965,7 +2013,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.start = (int)/*64*/offset;
@@ -2014,7 +2062,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.start = (int)/*64*/start_offset;
@@ -2051,7 +2099,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleAttributeListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextAttributeEvent event = new AccessibleTextAttributeEvent(accessible);
 				event.offset = (int)/*64*/offset;
@@ -2177,7 +2225,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.x = (int)/*64*/x;
@@ -2209,7 +2257,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.start = (int)/*64*/start_offset;
@@ -2235,7 +2283,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.index = (int)/*64*/selection_num;
@@ -2260,7 +2308,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.offset = (int)/*64*/offset;
@@ -2284,7 +2332,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.index = (int)/*64*/selection_num;
@@ -2316,7 +2364,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -2326,7 +2374,7 @@ class AccessibleObject {
 				return event.offset;
 			}
 			listeners = accessible.accessibleTextListeners;
-			length = listeners.size();
+			length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
 				event.childID = object.id;
@@ -2347,7 +2395,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				AtkTextRectangle atkRect = new AtkTextRectangle();
@@ -2408,7 +2456,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.start = (int)/*64*/offset;
@@ -2437,7 +2485,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -2462,7 +2510,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				for (int i = 0; i < length; i++) {
@@ -2472,7 +2520,7 @@ class AccessibleObject {
 				return event.count;
 			}
 			listeners = accessible.accessibleTextListeners;
-			length = listeners.size();
+			length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent (object.accessible);
 				event.childID = object.id;
@@ -2508,7 +2556,7 @@ class AccessibleObject {
 			OS.memmove (parentEnd, end_offset, 4);
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.index = (int)/*64*/selection_num;
@@ -2533,7 +2581,7 @@ class AccessibleObject {
 			}
 			if (selection_num == 0) {
 				listeners = accessible.accessibleTextListeners;
-				length = listeners.size();
+				length = size(listeners);
 				if (length > 0) {
 					AccessibleTextEvent event = new AccessibleTextEvent (accessible);
 					event.childID = object.id;
@@ -2566,7 +2614,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
 				event.start = (int)/*64*/start_offset;
@@ -2603,7 +2651,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int /*long*/ charCount = atkText_get_character_count (atkObject);
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
@@ -2851,7 +2899,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int /*long*/ charCount = atkText_get_character_count (atkObject);
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
@@ -3042,7 +3090,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleTextExtendedListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				int /*long*/ charCount = atkText_get_character_count (atkObject);
 				AccessibleTextEvent event = new AccessibleTextEvent(accessible);
@@ -3277,7 +3325,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleValueListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
 				event.value = getGValue(value);
@@ -3301,7 +3349,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleValueListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
 				event.value = getGValue(value);
@@ -3325,7 +3373,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleValueListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
 				event.value = getGValue(value);
@@ -3345,7 +3393,7 @@ class AccessibleObject {
 		if (object != null) {
 			Accessible accessible = object.accessible;
 			Vector listeners = accessible.accessibleValueListeners;
-			int length = listeners.size();
+			int length = size(listeners);
 			if (length > 0) {
 				AccessibleValueEvent event = new AccessibleValueEvent(accessible);
 				event.value = getGValue(value);
@@ -3392,7 +3440,7 @@ class AccessibleObject {
 	
 	String getText () {
 		Vector listeners = accessible.accessibleControlListeners;
-		int length = listeners.size();
+		int length = size(listeners);
 		if (length > 0) {
 			String parentText = "";	//$NON-NLS-1$
 			AtkTextIface iface = getTextIface (handle);
@@ -3454,15 +3502,32 @@ class AccessibleObject {
 	}
 	
 	static void windowPoint (AccessibleObject object, int [] x, int [] y) {
-		GtkAccessible gtkAccessible = new GtkAccessible ();
-		ATK.memmove (gtkAccessible, object.handle);
-		while (gtkAccessible.widget == 0 && object.parent != null) {
-			object = object.parent;
+		int /*long*/ widget;
+		if (OS.GTK_VERSION >= OS.VERSION(2, 22, 0)) {
+			widget = OS.gtk_accessible_get_widget(object.handle);
+		} else {
+			GtkAccessible gtkAccessible = new GtkAccessible ();
 			ATK.memmove (gtkAccessible, object.handle);
+			widget = gtkAccessible.widget;
+		}
+		while (widget == 0 && object.parent != null) {
+			object = object.parent;
+			if (OS.GTK_VERSION >= OS.VERSION(2, 22, 0)) {
+				widget = OS.gtk_accessible_get_widget(object.handle);
+			} else {
+				GtkAccessible gtkAccessible = new GtkAccessible ();
+				ATK.memmove (gtkAccessible, object.handle);
+				widget = gtkAccessible.widget;
+			}
+		}
+		if (widget == 0) return;
+		int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (widget);
+		int /*long*/ window;
+		if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+			window = OS.gtk_widget_get_window (topLevel);
+		} else {
+			window = OS.GTK_WIDGET_WINDOW (topLevel);	
 		}
-		if (gtkAccessible.widget == 0) return;
-		int /*long*/ topLevel = ATK.gtk_widget_get_toplevel (gtkAccessible.widget);
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (topLevel);				
 		OS.gdk_window_get_origin (window, x, y);
 	}
 	
@@ -3583,7 +3648,7 @@ class AccessibleObject {
 			}
 			case ACC.EVENT_LOCATION_CHANGED: {
 				Vector listeners = accessible.accessibleControlListeners;
-				int length = listeners.size();
+				int length = size(listeners);
 				GdkRectangle rect = new GdkRectangle();
 				if (length > 0) {
 					AccessibleControlEvent e = new AccessibleControlEvent (accessible);
@@ -3695,7 +3760,7 @@ class AccessibleObject {
 			case ACC.EVENT_TEXT_COLUMN_CHANGED: {
 				int offset = 0;
 				Vector listeners = accessible.accessibleTextExtendedListeners;
-				int length = listeners.size();
+				int length = size(listeners);
 				AccessibleTextEvent e = new AccessibleTextEvent (accessible);
 				if (length > 0) {
 					for (int i = 0; i < length; i++) {
@@ -3704,7 +3769,7 @@ class AccessibleObject {
 					}
 				} else {
 					listeners = accessible.accessibleTextListeners;
-					length = listeners.size();
+					length = size(listeners);
 					if (length > 0) {
 						e.childID = id;
 						for (int i = 0; i < length; i++) {
@@ -3771,7 +3836,7 @@ class AccessibleObject {
 	
 	void updateChildren () {
 		Vector listeners = accessible.accessibleControlListeners;
-		int length = listeners.size();
+		int length = size(listeners);
 		AccessibleControlEvent event = new AccessibleControlEvent (accessible);
 		event.childID = id;
 		for (int i = 0; i < length; i++) {
diff --git a/org/eclipse/swt/awt/SWT_AWT.java b/org/eclipse/swt/awt/SWT_AWT.java
index 998cfa0..3a6431d 100644
--- a/org/eclipse/swt/awt/SWT_AWT.java
+++ b/org/eclipse/swt/awt/SWT_AWT.java
@@ -187,8 +187,8 @@ public static Frame new_Frame (final Composite parent) {
 	}
 	try {
 		/* Call registerListeners() to make XEmbed focus traversal work */
-		Method method = clazz.getMethod("registerListeners", null);
-		if (method != null) method.invoke(value, null);
+		Method method = clazz.getMethod("registerListeners", (Class[])null);
+		if (method != null) method.invoke(value, (Object[])null);
 	} catch (Throwable e) {}
 	final AWTEventListener awtListener = new AWTEventListener() {
 		public void eventDispatched(AWTEvent event) {
@@ -202,7 +202,14 @@ public static Frame new_Frame (final Composite parent) {
 							loadLibrary();
 							int /*long*/ awtHandle = getAWTHandle(window);
 							if (awtHandle == 0) return;
-							int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid(OS.GTK_WIDGET_WINDOW(OS.gtk_widget_get_toplevel(shell.handle)));
+							int /*long*/ xWindow;
+							if (OS.GTK3) {
+								xWindow = OS.gdk_x11_window_get_xid (OS.gtk_widget_get_window (shell.handle));
+							} else if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+								xWindow = OS.gdk_x11_drawable_get_xid(OS.gtk_widget_get_window(OS.gtk_widget_get_toplevel(shell.handle)));
+							} else {
+								xWindow = OS.gdk_x11_drawable_get_xid(OS.GTK_WIDGET_WINDOW(OS.gtk_widget_get_toplevel(shell.handle)));
+							}
 							OS.XSetTransientForHint(OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), awtHandle, xWindow);
 						}
 					});
diff --git a/org/eclipse/swt/browser/AppFileLocProvider.java b/org/eclipse/swt/browser/AppFileLocProvider.java
index 2be80e9..02b6dfb 100644
--- a/org/eclipse/swt/browser/AppFileLocProvider.java
+++ b/org/eclipse/swt/browser/AppFileLocProvider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -120,12 +120,12 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIDirectoryServiceProvider.NS_IDIRECTORYSERVICEPROVIDER_IID)) {
+	if (guid.Equals (XPCOM.NS_IDIRECTORYSERVICEPROVIDER_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {directoryServiceProvider.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIDirectoryServiceProvider2.NS_IDIRECTORYSERVICEPROVIDER2_IID)) {
+	if (guid.Equals (XPCOM.NS_IDIRECTORYSERVICEPROVIDER2_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {directoryServiceProvider2.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -220,7 +220,7 @@ int getFiles (int /*long*/ prop, int /*long*/ _retval) {
 
 				nsILocalFile localFile = new nsILocalFile (result[0]);
 				result[0] = 0;
-				rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); 
+				rc = localFile.QueryInterface (Mozilla.IsPre_17 ? nsIFile.NS_IFILE_IID : nsIFile.NS_IFILE_17_IID, result);
 				if (rc != XPCOM.NS_OK) Mozilla.error (rc);
 				if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE);
 				localFile.Release ();
@@ -315,7 +315,7 @@ int getFile(int /*long*/ prop, int /*long*/ persistent, int /*long*/ _retval) {
 		
 		nsILocalFile localFile = new nsILocalFile (result [0]);
 		result[0] = 0;
-	    rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); 
+	    rc = localFile.QueryInterface (Mozilla.IsPre_17 ? nsIFile.NS_IFILE_IID : nsIFile.NS_IFILE_17_IID, result); 
 		if (rc != XPCOM.NS_OK) Mozilla.error (rc);
 		if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE);
 
diff --git a/org/eclipse/swt/browser/Browser.java b/org/eclipse/swt/browser/Browser.java
index 6168c20..0988954 100644
--- a/org/eclipse/swt/browser/Browser.java
+++ b/org/eclipse/swt/browser/Browser.java
@@ -125,6 +125,7 @@ static Composite checkParent (Composite parent) {
 }
 
 static int checkStyle(int style) {
+	String platform = SWT.getPlatform ();
 	if (DefaultType == SWT.DEFAULT) {
 		/*
 		* Some Browser clients that explicitly specify the native renderer to use
@@ -154,11 +155,26 @@ static int checkStyle(int style) {
 
 		String value = System.getProperty (PROPERTY_DEFAULTTYPE);
 		if (value != null) {
-			if (value.equalsIgnoreCase ("mozilla")) { //$NON-NLS-1$
-				DefaultType = SWT.MOZILLA;
-			} else if (value.equalsIgnoreCase ("webkit")) { //$NON-NLS-1$
-				DefaultType = SWT.WEBKIT;
-			}
+			int index = 0;
+			int length = value.length();
+			do {
+				int newIndex = value.indexOf(',', index);
+				if (newIndex == -1) {
+					newIndex = length;
+				}
+				String current = value.substring(index, newIndex).trim();
+				if (current.equalsIgnoreCase ("mozilla")) { //$NON-NLS-1$
+					DefaultType = SWT.MOZILLA;
+					break;
+				} else if (current.equalsIgnoreCase ("webkit")) { //$NON-NLS-1$
+					DefaultType = SWT.WEBKIT;
+					break;
+				} else if (current.equalsIgnoreCase ("ie") && "win32".equals (platform)) { //$NON-NLS-1$ //$NON-NLS-2$
+					DefaultType = SWT.NONE;
+					break;
+				}
+				index = newIndex + 1;
+			} while (index < length);
 		}
 		if (DefaultType == SWT.DEFAULT) {
 			DefaultType = SWT.NONE;
@@ -172,7 +188,6 @@ static int checkStyle(int style) {
 	if ((style & (SWT.MOZILLA | SWT.WEBKIT)) == (SWT.MOZILLA | SWT.WEBKIT)) {
 		style &= ~SWT.WEBKIT;
 	}
-	String platform = SWT.getPlatform ();
 	if ((style & SWT.MOZILLA) != 0 || (style & SWT.WEBKIT) != 0) {
 		if ("carbon".equals (platform)) return style | SWT.EMBEDDED; //$NON-NLS-1$
 		if ("motif".equals (platform)) return style | SWT.EMBEDDED; //$NON-NLS-1$
diff --git a/org/eclipse/swt/browser/BrowserFactory.java b/org/eclipse/swt/browser/BrowserFactory.java
index 12e6276..b66feac 100644
--- a/org/eclipse/swt/browser/BrowserFactory.java
+++ b/org/eclipse/swt/browser/BrowserFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,27 +14,13 @@ import org.eclipse.swt.SWT;
 
 class BrowserFactory {
 
-	static boolean mozillaLibsLoaded;
-
 WebBrowser createWebBrowser (int style) {
 	boolean webkitInstalled = WebKit.IsInstalled ();
 	if ((style & SWT.MOZILLA) != 0 || (!webkitInstalled && (style & SWT.WEBKIT) == 0)) {
-		mozillaLibsLoaded = true;
 		return new Mozilla ();
 	}
 	if (!webkitInstalled) return null;
 
-	/*
-	* A crash can occur if XULRunner-1.9.2.x is loaded into a process where WebKit has
-	* already been loaded, as a result of conflicting versions of the sqlite3 library.
-	* Loading these native renderers in the reverse order does not cause a problem.  The
-	* crash workaround is to ensure that Mozilla's libraries (if available) are always
-	* loaded before WebKit's.
-	*/
-	if (!mozillaLibsLoaded) {
-		mozillaLibsLoaded = true;
-		Mozilla.LoadLibraries ();
-	}
 	return new WebKit ();
 }
 
diff --git a/org/eclipse/swt/browser/DownloadFactory.java b/org/eclipse/swt/browser/DownloadFactory.java
index 901786c..5e942a3 100644
--- a/org/eclipse/swt/browser/DownloadFactory.java
+++ b/org/eclipse/swt/browser/DownloadFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/DownloadFactory_1_8.java b/org/eclipse/swt/browser/DownloadFactory_1_8.java
index 1af0069..e0eba7b 100644
--- a/org/eclipse/swt/browser/DownloadFactory_1_8.java
+++ b/org/eclipse/swt/browser/DownloadFactory_1_8.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/Download_1_8.java b/org/eclipse/swt/browser/Download_1_8.java
index 3ec20e7..c6870cd 100644
--- a/org/eclipse/swt/browser/Download_1_8.java
+++ b/org/eclipse/swt/browser/Download_1_8.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/browser/External.java b/org/eclipse/swt/browser/External.java
index cd4201a..b8e9016 100644
--- a/org/eclipse/swt/browser/External.java
+++ b/org/eclipse/swt/browser/External.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2008, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -251,9 +251,16 @@ static Object convertToJava (nsIVariant variant, short type) {
 					case nsIDataType.VTYPE_BOOL:
 						arrayReturn = new Object[count[0]];
 						for (int i = 0; i < count[0]; i++) {
-							int[] boolValue = new int[1]; /* PRUInt32 */
-							C.memmove (boolValue, ptr[0] + i * 4, 4);
-							arrayReturn[i] = new Boolean (boolValue[0] != 0);
+							/* mozilla's representation of boolean changed from 4 bytes to 1 byte as of XULRunner 4.x */
+							if (nsISupports.IsXULRunner10 || nsISupports.IsXULRunner17) {
+								byte[] byteValue = new byte[1];
+								C.memmove (byteValue, ptr[0] + i, 1);
+								arrayReturn[i] = new Boolean (byteValue[0] != 0);
+							} else {
+								int[] boolValue = new int[1]; /* PRUInt32 */
+								C.memmove (boolValue, ptr[0] + i * 4, 4);
+								arrayReturn[i] = new Boolean (boolValue[0] != 0);
+							}
 						}
 						break;
 					case nsIDataType.VTYPE_INT32:
diff --git a/org/eclipse/swt/browser/ExternalFactory.java b/org/eclipse/swt/browser/ExternalFactory.java
index 84462ec..e292b93 100644
--- a/org/eclipse/swt/browser/ExternalFactory.java
+++ b/org/eclipse/swt/browser/ExternalFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008 IBM Corporation and others.
+ * Copyright (c) 2008, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/FilePicker.java b/org/eclipse/swt/browser/FilePicker.java
index 0203016..345d934 100644
--- a/org/eclipse/swt/browser/FilePicker.java
+++ b/org/eclipse/swt/browser/FilePicker.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -85,23 +85,28 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 	if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE;
 	nsID guid = new nsID ();
 	XPCOM.memmove (guid, riid, nsID.sizeof);
-	
+
 	if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFilePicker.NS_IFILEPICKER_IID)) {
+	if (guid.Equals (nsIFilePicker.NS_IFILEPICKER_17_IID)) {
 		XPCOM.memmove(ppvObject, new int /*long*/[] {filePicker.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFilePicker_1_8.NS_IFILEPICKER_IID)) {
+	if (guid.Equals (nsIFilePicker.NS_IFILEPICKER_10_IID)) {
 		XPCOM.memmove(ppvObject, new int /*long*/[] {filePicker.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFilePicker_1_8.NS_IFILEPICKER_10_IID)) {
+	if (guid.Equals (nsIFilePicker.NS_IFILEPICKER_1_8_IID)) {
+		XPCOM.memmove(ppvObject, new int /*long*/[] {filePicker.getAddress ()}, C.PTR_SIZEOF);
+		AddRef ();
+		return XPCOM.NS_OK;
+	}
+	if (guid.Equals (nsIFilePicker.NS_IFILEPICKER_IID)) {
 		XPCOM.memmove(ppvObject, new int /*long*/[] {filePicker.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/FilePickerFactory.java b/org/eclipse/swt/browser/FilePickerFactory.java
index 44fcbd6..2f90395 100644
--- a/org/eclipse/swt/browser/FilePickerFactory.java
+++ b/org/eclipse/swt/browser/FilePickerFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -88,7 +88,11 @@ int Release () {
 /* nsIFactory */
 
 int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) {
-	if (!Mozilla.IsPre_4) {
+	if (!Mozilla.IsPre_17) {
+		FilePicker_17 picker = new FilePicker_17 ();
+		picker.AddRef ();
+		XPCOM.memmove (result, new int /*long*/[] {picker.getAddress ()}, C.PTR_SIZEOF);
+	} else if (!Mozilla.IsPre_4) {
 		FilePicker_10 picker = new FilePicker_10 ();
 		picker.AddRef ();
 		XPCOM.memmove (result, new int /*long*/[] {picker.getAddress ()}, C.PTR_SIZEOF);
diff --git a/org/eclipse/swt/browser/FilePicker_1_8.java b/org/eclipse/swt/browser/FilePicker_17.java
similarity index 57%
copy from org/eclipse/swt/browser/FilePicker_1_8.java
copy to org/eclipse/swt/browser/FilePicker_17.java
index a73840f..6dcb9ae 100644
--- a/org/eclipse/swt/browser/FilePicker_1_8.java
+++ b/org/eclipse/swt/browser/FilePicker_17.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,9 +10,12 @@
  *******************************************************************************/
 package org.eclipse.swt.browser;
 
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.internal.mozilla.*;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Shell;
 
-class FilePicker_1_8 extends FilePicker {
+class FilePicker_17 extends FilePicker_1_8 {
 
 void createCOMInterfaces () {
 	/* Create each of the interfaces that this object implements */
@@ -22,7 +25,7 @@ void createCOMInterfaces () {
 		public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
 	};
 
-	filePicker = new XPCOMObject (new int[] {2, 0, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) {
+	filePicker = new XPCOMObject (new int[] {2, 0, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}) {
 		public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
 		public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
 		public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
@@ -40,21 +43,48 @@ void createCOMInterfaces () {
 		public int /*long*/ method14 (int /*long*/[] args) {return GetFile (args[0]);}
 		public int /*long*/ method15 (int /*long*/[] args) {return GetFileURL (args[0]);}
 		public int /*long*/ method16 (int /*long*/[] args) {return GetFiles (args[0]);}
-		public int /*long*/ method17 (int /*long*/[] args) {return Show (args[0]);}
+		public int /*long*/ method17 (int /*long*/[] args) {return XPCOM.NS_ERROR_NOT_IMPLEMENTED;}
+		public int /*long*/ method18 (int /*long*/[] args) {return XPCOM.NS_ERROR_NOT_IMPLEMENTED;}
+		public int /*long*/ method19 (int /*long*/[] args) {return Show (args[0]);}
+		public int /*long*/ method20 (int /*long*/[] args) {return Open (args[0]);}
 	};
 }
 
-/*
- * As of Mozilla 1.8 some of nsIFilePicker's string arguments changed type.  This method
- * answers a java string based on the type of string that is appropriate for the Mozilla
- * version being used.
- */
-String parseAString (int /*long*/ string) {
-	if (string == 0) return null;
-	int length = XPCOM.nsEmbedString_Length (string);
-	int /*long*/ buffer = XPCOM.nsEmbedString_get (string);
-	char[] chars = new char[length];
-	XPCOM.memmove (chars, buffer, length * 2);
-	return new String (chars);
+int Open (int /*long*/ aFilePickerShownCallback) {
+	if (mode == nsIFilePicker.modeGetFolder) {
+		/* picking a directory */
+		int result = showDirectoryPicker ();
+		if (aFilePickerShownCallback != 0) {
+			new nsIFilePickerShownCallback (aFilePickerShownCallback).Done (result);
+		}
+		return XPCOM.NS_OK;
+	}
+
+	/* picking a file */
+	int style = mode == nsIFilePicker.modeSave ? SWT.SAVE : SWT.OPEN;
+	if (mode == nsIFilePicker.modeOpenMultiple) style |= SWT.MULTI;
+	Browser browser = getBrowser (parentHandle);
+	Shell parent = null;
+	if (browser != null) {
+		parent = browser.getShell ();
+	} else {
+		parent = new Shell ();
+	}
+	FileDialog dialog = new FileDialog (parent, style);
+	if (title != null) dialog.setText (title);
+	if (directory != null) dialog.setFilterPath (directory);
+	if (masks != null) dialog.setFilterExtensions (masks);
+	if (defaultFilename != null) dialog.setFileName (defaultFilename);
+	String filename = dialog.open ();
+	files = dialog.getFileNames ();
+	directory = dialog.getFilterPath ();
+	title = defaultFilename = null;
+	masks = null;
+	int result = filename == null ? nsIFilePicker.returnCancel : nsIFilePicker.returnOK; 
+	if (aFilePickerShownCallback != 0) {
+		new nsIFilePickerShownCallback (aFilePickerShownCallback).Done (result);
+	}
+	return XPCOM.NS_OK;
 }
+
 }
diff --git a/org/eclipse/swt/browser/FilePicker_1_8.java b/org/eclipse/swt/browser/FilePicker_1_8.java
index a73840f..6d39abd 100644
--- a/org/eclipse/swt/browser/FilePicker_1_8.java
+++ b/org/eclipse/swt/browser/FilePicker_1_8.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/browser/HelperAppLauncherDialog.java b/org/eclipse/swt/browser/HelperAppLauncherDialog.java
index 706ec08..dfe92f6 100644
--- a/org/eclipse/swt/browser/HelperAppLauncherDialog.java
+++ b/org/eclipse/swt/browser/HelperAppLauncherDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIHelperAppLauncherDialog.NS_IHELPERAPPLAUNCHERDIALOG_IID)) {
+	if (guid.Equals (XPCOM.NS_IHELPERAPPLAUNCHERDIALOG_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/HelperAppLauncherDialogFactory.java b/org/eclipse/swt/browser/HelperAppLauncherDialogFactory.java
index 43f96bd..205b2b3 100644
--- a/org/eclipse/swt/browser/HelperAppLauncherDialogFactory.java
+++ b/org/eclipse/swt/browser/HelperAppLauncherDialogFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/HelperAppLauncherDialog_1_9.java b/org/eclipse/swt/browser/HelperAppLauncherDialog_1_9.java
index dd2e0cb..0f31da5 100644
--- a/org/eclipse/swt/browser/HelperAppLauncherDialog_1_9.java
+++ b/org/eclipse/swt/browser/HelperAppLauncherDialog_1_9.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -77,7 +77,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIHelperAppLauncherDialog_1_9.NS_IHELPERAPPLAUNCHERDIALOG_IID)) {
+	if (guid.Equals (XPCOM.NS_IHELPERAPPLAUNCHERDIALOG_1_9_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/InputStream.java b/org/eclipse/swt/browser/InputStream.java
index cc0f34d..f4dc809 100644
--- a/org/eclipse/swt/browser/InputStream.java
+++ b/org/eclipse/swt/browser/InputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -66,7 +66,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIInputStream.NS_IINPUTSTREAM_IID)) {
+	if (guid.Equals (nsIInputStream.NS_IINPUTSTREAM_IID) || guid.Equals (nsIInputStream.NS_IINPUTSTREAM_17_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {inputStream.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/Mozilla.java b/org/eclipse/swt/browser/Mozilla.java
index 2218d1b..849f7ca 100644
--- a/org/eclipse/swt/browser/Mozilla.java
+++ b/org/eclipse/swt/browser/Mozilla.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -32,9 +32,11 @@ class Mozilla extends WebBrowser {
 	XPCOMObject supports;
 	XPCOMObject weakReference;
 	XPCOMObject webProgressListener;
+	XPCOMObject webProgressListener_17;
 	XPCOMObject	webBrowserChrome;
 	XPCOMObject webBrowserChromeFocus;
 	XPCOMObject embeddingSiteWindow;
+	XPCOMObject embeddingSiteWindow_17;
 	XPCOMObject interfaceRequestor;
 	XPCOMObject supportsWeakReference;
 	XPCOMObject contextMenuListener;	
@@ -48,7 +50,7 @@ class Mozilla extends WebBrowser {
 	int refCount, lastKeyCode, lastCharCode, authCount;
 	int /*long*/ request, badCertRequest;
 	Point location, size;
-	boolean visible, isChild, ignoreDispose, isRetrievingBadCert, isViewingErrorPage, ignoreAllMessages, untrustedText;
+	boolean visible, isActive, isChild, ignoreDispose, isRetrievingBadCert, isViewingErrorPage, ignoreAllMessages, untrustedText;
 	boolean updateLastNavigateUrl;
 	Shell tip = null;
 	Listener listener;
@@ -62,7 +64,7 @@ class Mozilla extends WebBrowser {
 	static int BrowserCount, NextJSFunctionIndex = 1;
 	static Hashtable AllFunctions = new Hashtable ();
 	static Listener DisplayListener;
-	static boolean Initialized, IsPre_1_8, IsPre_1_9, IsPre_4, IsXULRunner, PerformedVersionCheck, XPCOMWasGlued, XPCOMInitWasGlued;
+	static boolean Initialized, IsPre_1_8, IsPre_1_9, IsPre_4, IsPre_17, IsXULRunner, PerformedVersionCheck, XPCOMWasGlued, XPCOMInitWasGlued;
 	static boolean IsGettingSiteWindow;
 	static String MozillaPath;
 	static String oldProxyHostFTP, oldProxyHostHTTP, oldProxyHostSSL;
@@ -156,7 +158,7 @@ class Mozilla extends WebBrowser {
 
 					nsILocalFile localFile = new nsILocalFile (result [0]);
 					result[0] = 0;
-					rc = localFile.QueryInterface (nsIFile.NS_IFILE_IID, result); 
+					rc = localFile.QueryInterface (IsPre_17 ? nsIFile.NS_IFILE_IID : nsIFile.NS_IFILE_17_IID, result); 
 					if (rc != XPCOM.NS_OK) Mozilla.error (rc);
 					if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NO_INTERFACE);
 					localFile.Release ();
@@ -706,6 +708,9 @@ public void create (Composite parent, int style) {
 			LocationProvider = new AppFileLocProvider (MozillaPath, profilePath, cacheParentPath, IsXULRunner);
 			LocationProvider.AddRef ();
 
+			/* write external.xpt to the file system if needed */
+			initExternal (LocationProvider.profilePath);
+
 			/* invoke appropriate Init function (based on mozilla version) */
 			initXPCOM (MozillaPath, IsXULRunner);
 		}
@@ -819,6 +824,7 @@ public void create (Composite parent, int style) {
 	initWebBrowserWindows ();
 
 	if (!PerformedVersionCheck) {
+		/* IsPre_4 and IsPre_17 are already determined in initXPCOM() */
 		PerformedVersionCheck = true;
 
 		rc = componentManager.QueryInterface (nsIComponentRegistrar.NS_ICOMPONENTREGISTRAR_IID, result);
@@ -861,7 +867,6 @@ public void create (Composite parent, int style) {
 			new nsISupports (result[0]).Release ();
 		}
 		IsPre_1_9 = true;
-		IsPre_4 = true;
 		result[0] = 0;
 
 		/*
@@ -875,7 +880,7 @@ public void create (Composite parent, int style) {
 		*/
 		if (!IsPre_1_8) {
 			rc = interfaceRequestor.GetInterface (nsIDocShell.NS_IDOCSHELL_1_8_IID, result);
-			if (rc == XPCOM.NS_OK && result[0] != 0) { /* 1.8 */
+			if (rc == XPCOM.NS_OK && result[0] != 0) { /* 1.8.x */
 				new nsISupports (result[0]).Release ();
 				result[0] = 0;
 
@@ -891,23 +896,14 @@ public void create (Composite parent, int style) {
 					}
 					downloadFactory_1_8.Release ();
 				}
-			} else { /* >= 1.9 */
+			} else { /* >= 1.9.x */
 				IsPre_1_9 = false;
-				result[0] = 0;
-				rc = interfaceRequestor.GetInterface(nsIDocShell.NS_IDOCSHELL_10_IID, result);
-				if (rc == XPCOM.NS_OK && result[0] != 0) { /* >= 4.0 */
-					IsPre_4 = false;
-					new nsISupports (result[0]).Release();
-				}
 			}
 		}
 		result[0] = 0;
 		interfaceRequestor.Release ();
 		componentRegistrar.Release ();
 
-		/* write external.xpt to the file system if needed */
-		initExternal (LocationProvider.profilePath);
-
 		if (!factoriesRegistered) {
 			HelperAppLauncherDialogFactory dialogFactory = new HelperAppLauncherDialogFactory ();
 			dialogFactory.AddRef ();
@@ -938,7 +934,7 @@ public void create (Composite parent, int style) {
 	}
 
 	/* add listeners for progress and content */
-	rc = webBrowser.AddWebBrowserListener (weakReference.getAddress (), nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID);
+	rc = webBrowser.AddWebBrowserListener (weakReference.getAddress (), IsPre_17 ? nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID : nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_17_IID);
 	if (rc != XPCOM.NS_OK) {
 		browser.dispose ();
 		error (rc);
@@ -1004,10 +1000,9 @@ public void create (Composite parent, int style) {
 										rc = domDocument.GetDocumentElement (result);
 										domDocument.Release ();
 										if (rc == XPCOM.NS_OK && result[0] != 0) {
-											nsIDOMElement domElement = new nsIDOMElement (result[0]);
+											rc = focusManager.SetFocus (result[0], nsIFocusManager.FLAG_BYKEY);
+											new nsISupports(result[0]).Release ();
 											result[0] = 0;
-											rc = focusManager.SetFocus (domElement.getAddress (), nsIFocusManager.FLAG_BYKEY);
-											domElement.Release ();
 										}
 									}
 								}
@@ -1112,6 +1107,17 @@ void createCOMInterfaces () {
 		public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);}
 	};
 	
+	webProgressListener_17 = new XPCOMObject (new int[] {2, 0, 0, 4, 6, 4, 4, 3}) {
+		public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
+		public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
+		public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
+		public int /*long*/ method3 (int /*long*/[] args) {return OnStateChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3]);}
+		public int /*long*/ method4 (int /*long*/[] args) {return OnProgressChange (args[0], args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4], (int)/*64*/args[5]);}
+		public int /*long*/ method5 (int /*long*/[] args) {return OnLocationChange (args[0], args[1], args[2], (int)/*64*/args[3]);}
+		public int /*long*/ method6 (int /*long*/[] args) {return OnStatusChange (args[0], args[1], (int)/*64*/args[2], args[3]);}
+		public int /*long*/ method7 (int /*long*/[] args) {return OnSecurityChange (args[0], args[1], (int)/*64*/args[2]);}
+	};
+
 	webBrowserChrome = new XPCOMObject (new int[] {2, 0, 0, 2, 1, 1, 1, 1, 0, 2, 0, 1, 1}) {
 		public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
 		public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
@@ -1150,6 +1156,21 @@ void createCOMInterfaces () {
 		public int /*long*/ method10 (int /*long*/[] args) {return GetSiteWindow (args[0]);}
 	};
 	
+	embeddingSiteWindow_17 = new XPCOMObject (new int[] {2, 0, 0, 5, 5, 0, 1, 1, 1, 1, 1, 0}) {
+		public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
+		public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
+		public int /*long*/ method2 (int /*long*/[] args) {return Release ();}
+		public int /*long*/ method3 (int /*long*/[] args) {return SetDimensions ((int)/*64*/args[0], (int)/*64*/args[1], (int)/*64*/args[2], (int)/*64*/args[3], (int)/*64*/args[4]);}
+		public int /*long*/ method4 (int /*long*/[] args) {return GetDimensions ((int)/*64*/args[0], args[1], args[2], args[3], args[4]);}
+		public int /*long*/ method5 (int /*long*/[] args) {return SetFocus ();}
+		public int /*long*/ method6 (int /*long*/[] args) {return GetVisibility (args[0]);}
+		public int /*long*/ method7 (int /*long*/[] args) {return SetVisibility ((int)/*64*/args[0]);}
+		public int /*long*/ method8 (int /*long*/[] args) {return GetTitle (args[0]);}
+		public int /*long*/ method9 (int /*long*/[] args) {return SetTitle (args[0]);}
+		public int /*long*/ method10 (int /*long*/[] args) {return GetSiteWindow (args[0]);}
+		public int /*long*/ method11 (int /*long*/[] args) {return Blur ();}
+	};
+
 	interfaceRequestor = new XPCOMObject (new int[] {2, 0, 0, 2} ){
 		public int /*long*/ method0 (int /*long*/[] args) {return QueryInterface (args[0], args[1]);}
 		public int /*long*/ method1 (int /*long*/[] args) {return AddRef ();}
@@ -1226,6 +1247,10 @@ void disposeCOMInterfaces () {
 		webProgressListener.dispose ();
 		webProgressListener = null;
 	}
+	if (webProgressListener_17 != null) {
+		webProgressListener_17.dispose ();
+		webProgressListener_17 = null;
+	}
 	if (webBrowserChrome != null) {
 		webBrowserChrome.dispose ();
 		webBrowserChrome = null;
@@ -1238,6 +1263,10 @@ void disposeCOMInterfaces () {
 		embeddingSiteWindow.dispose ();
 		embeddingSiteWindow = null;
 	}
+	if (embeddingSiteWindow_17 != null) {
+		embeddingSiteWindow_17.dispose ();
+		embeddingSiteWindow_17 = null;
+	}
 	if (interfaceRequestor != null) {
 		interfaceRequestor.dispose ();
 		interfaceRequestor = null;
@@ -1289,16 +1318,24 @@ public boolean execute (String script) {
 		if (rc != XPCOM.NS_OK) error (rc);
 		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 
+		boolean isXULRunner190x = false;
 		nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
 		result[0] = 0;
 		byte[] aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_SCRIPTSECURITYMANAGER_CONTRACTID, true);
-		rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_10_IID, result);
+		rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_17_IID, result);
 		if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 			result[0] = 0;
-			rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_191_IID, result);
+			rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_10_IID, result);
 			if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 				result[0] = 0;
-				rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_IID, result);
+				rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_191_IID, result);
+				if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
+					result[0] = 0;
+					rc = serviceManager.GetServiceByContractID (aContractID, nsIScriptSecurityManager.NS_ISCRIPTSECURITYMANAGER_IID, result);
+					if (rc == XPCOM.NS_OK && result[0] != 0) {
+						isXULRunner190x = true;
+					}
+				}
 			}
 		}
 
@@ -1317,16 +1354,17 @@ public boolean execute (String script) {
 
 				nsIInterfaceRequestor interfaceRequestor = new nsIInterfaceRequestor (result[0]);
 				result[0] = 0;
-				nsID scriptGlobalObjectNSID_10 = new nsID ("08f73284-26e3-4fa6-bf89-8326f92a94b3"); /* nsIScriptGlobalObject */ //$NON-NLS-1$
-				rc = interfaceRequestor.GetInterface (scriptGlobalObjectNSID_10, result);
+				rc = interfaceRequestor.GetInterface (XPCOM.NS_ISCRIPTGLOBALOBJECT_17_IID, result);
 				if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 					result[0] = 0;
-					nsID scriptGlobalObjectNSID_1_9_2 = new nsID ("e9f3f2c1-2d94-4722-bbd4-2bf6fdf42f48"); /* nsIScriptGlobalObject */ //$NON-NLS-1$
-					rc = interfaceRequestor.GetInterface (scriptGlobalObjectNSID_1_9_2, result);
+					rc = interfaceRequestor.GetInterface (XPCOM.NS_ISCRIPTGLOBALOBJECT_10_IID, result);
 					if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 						result[0] = 0;
-						nsID scriptGlobalObjectNSID_1_9 = new nsID ("6afecd40-0b9a-4cfd-8c42-0f645cd91829"); /* nsIScriptGlobalObject */ //$NON-NLS-1$
-						rc = interfaceRequestor.GetInterface (scriptGlobalObjectNSID_1_9, result);
+						rc = interfaceRequestor.GetInterface (XPCOM.NS_ISCRIPTGLOBALOBJECT_1_9_2_IID, result);
+						if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
+							result[0] = 0;
+							rc = interfaceRequestor.GetInterface (XPCOM.NS_ISCRIPTGLOBALOBJECT_1_9_IID, result);
+						}
 					}
 				}
 				interfaceRequestor.Release ();
@@ -1334,26 +1372,36 @@ public boolean execute (String script) {
 				if (rc == XPCOM.NS_OK && result[0] != 0) {
 					int /*long*/ scriptGlobalObject = result[0];
 					result[0] = 0;
-					rc = (int/*64*/)XPCOM.nsIScriptGlobalObject_EnsureScriptEnvironment (scriptGlobalObject, 2); /* nsIProgrammingLanguage.JAVASCRIPT */
+					if (IsPre_17) {
+						rc = (int/*64*/)XPCOM.nsIScriptGlobalObject_EnsureScriptEnvironment (scriptGlobalObject, 2); /* nsIProgrammingLanguage.JAVASCRIPT */
+					} else {
+						rc = (int/*64*/)XPCOM.nsIScriptGlobalObject17_EnsureScriptEnvironment (scriptGlobalObject);
+					}
 					if (rc != XPCOM.NS_OK) {
 						new nsISupports (scriptGlobalObject).Release ();
 					} else {
-						int /*long*/ scriptContext = XPCOM.nsIScriptGlobalObject_GetScriptContext (scriptGlobalObject, 2); /* nsIProgrammingLanguage.JAVASCRIPT */
+						int /*long*/ scriptContext;
+						if (IsPre_17) {
+							scriptContext = XPCOM.nsIScriptGlobalObject_GetScriptContext (scriptGlobalObject, 2); /* nsIProgrammingLanguage.JAVASCRIPT */
+						} else {
+							scriptContext = XPCOM.nsIScriptGlobalObject17_GetScriptContext (scriptGlobalObject);
+						}
 						new nsISupports (scriptGlobalObject).Release ();
 
 						if (scriptContext != 0) {
 							/* ensure that the received nsIScriptContext implements the expected interface */
 							nsISupports supports = new nsISupports (scriptContext);
-							nsID scriptContextNSID_10 = new nsID ("2e583bf4-3c1f-432d-8283-8dee7eccc88b"); /* nsIScriptContext */ //$NON-NLS-1$					
-							rc = supports.QueryInterface (scriptContextNSID_10, result);
+							rc = supports.QueryInterface (XPCOM.NS_ISCRIPTCONTEXT_17_IID, result);
 							if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 								result[0] = 0;
-								nsID scriptContextNSID_1_9_2 = new nsID ("87482b5e-e019-4df5-9bc2-b2a51b1f2d28"); /* nsIScriptContext */ //$NON-NLS-1$					
-								rc = supports.QueryInterface (scriptContextNSID_1_9_2, result);
+								rc = supports.QueryInterface (XPCOM.NS_ISCRIPTCONTEXT_10_IID, result);
 								if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
 									result[0] = 0;
-									nsID scriptContextNSID_1_9 = new nsID ("e7b9871d-3adc-4bf7-850d-7fb9554886bf"); /* nsIScriptContext */ //$NON-NLS-1$					
-									rc = supports.QueryInterface (scriptContextNSID_1_9, result);
+									rc = supports.QueryInterface (XPCOM.NS_ISCRIPTCONTEXT_1_9_2_IID, result);
+									if (!(rc == XPCOM.NS_OK && result[0] != 0)) {
+										result[0] = 0;
+										rc = supports.QueryInterface (XPCOM.NS_ISCRIPTCONTEXT_1_9_IID, result);
+									}
 								}
 							}
 
@@ -1361,38 +1409,43 @@ public boolean execute (String script) {
 								new nsISupports (result[0]).Release ();
 								result[0] = 0;
 
-								int /*long*/ nativeContext = XPCOM.nsIScriptContext_GetNativeContext (scriptContext);
-								if (nativeContext != 0) {
+								int /*long*/ jsContext;
+								if (IsPre_17) {
+									jsContext = XPCOM.nsIScriptContext_GetNativeContext (scriptContext);
+								} else {
+									jsContext = XPCOM.nsIScriptContext17_GetNativeContext (scriptContext);
+								}
+								if (jsContext != 0) {
 									int length = script.length ();
 									char[] scriptChars = new char[length];
 									script.getChars(0, length, scriptChars, 0);
 									byte[] urlbytes = MozillaDelegate.wcsToMbcs (null, getUrl (), true);
-									rc = principal.GetJSPrincipals (nativeContext, result);
+									rc = principal.GetJSPrincipals (jsContext, result);
+									int /*long*/ principals = 0;
 									if (rc == XPCOM.NS_OK && result[0] != 0) {
-										int /*long*/ principals = result[0];
+										principals = result[0];
 										result[0] = 0;
-
-										byte[] jsLibPath = getJSLibPathBytes ();
-										int /*long*/ globalJSObject = XPCOM.JS_GetGlobalObject (jsLibPath, nativeContext);
-										if (globalJSObject != 0) {
-											aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_CONTEXTSTACK_CONTRACTID, true);
-											rc = serviceManager.GetServiceByContractID (aContractID, nsIJSContextStack.NS_IJSCONTEXTSTACK_IID, result);
-											if (rc == XPCOM.NS_OK && result[0] != 0) {
-												nsIJSContextStack stack = new nsIJSContextStack (result[0]);
+									}
+									byte[] jsLibPath = getJSLibPathBytes ();
+									int /*long*/ globalJSObject = XPCOM.JS_GetGlobalObject (jsLibPath, jsContext);
+									if (globalJSObject != 0) {
+										aContractID = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_CONTEXTSTACK_CONTRACTID, true);
+										rc = serviceManager.GetServiceByContractID (aContractID, nsIJSContextStack.NS_IJSCONTEXTSTACK_IID, result);
+										if (rc == XPCOM.NS_OK && result[0] != 0) {
+											nsIJSContextStack stack = new nsIJSContextStack (result[0]);
+											result[0] = 0;
+											rc = stack.Push (jsContext);
+											if (rc != XPCOM.NS_OK) {
+												stack.Release ();
+											} else {
+												boolean success = XPCOM.JS_EvaluateUCScriptForPrincipals (jsLibPath, jsContext, globalJSObject, principals, scriptChars, length, urlbytes, 0, isXULRunner190x ? result : null) != 0;
 												result[0] = 0;
-												rc = stack.Push (nativeContext);
-												if (rc != XPCOM.NS_OK) {
-													stack.Release ();
-												} else {
-													boolean success = XPCOM.JS_EvaluateUCScriptForPrincipals (jsLibPath, nativeContext, globalJSObject, principals, scriptChars, length, urlbytes, 0, result) != 0;
-													result[0] = 0;
-													rc = stack.Pop (result);
-													stack.Release ();
-													// should principals be Release()d too?
-													principal.Release ();
-													serviceManager.Release ();
-													return success;
-												}
+												rc = stack.Pop (result);
+												stack.Release ();
+												// should principals be Release()d too?
+												principal.Release ();
+												serviceManager.Release ();
+												return success;
 											}
 										}
 									}
@@ -1458,7 +1511,7 @@ static Browser getBrowser (int /*long*/ aDOMWindow) {
 
 	nsIWebBrowserChrome webBrowserChrome = new nsIWebBrowserChrome (result[0]);
 	result[0] = 0;
-	rc = webBrowserChrome.QueryInterface (nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_IID, result);
+	rc = webBrowserChrome.QueryInterface (IsPre_17 ? nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_IID : nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_17_IID, result);
 	if (rc != XPCOM.NS_OK) Mozilla.error (rc);
 	if (result[0] == 0) Mozilla.error (XPCOM.NS_NOINTERFACE);		
 	webBrowserChrome.Release ();
@@ -1496,12 +1549,18 @@ public String getBrowserType () {
 
 static byte[] getJSLibPathBytes () {
 	if (jsLibPathBytes == null) {
-		String jsLibraryName = IsPre_4 ? MozillaDelegate.getJSLibraryName_Pre4 () : MozillaDelegate.getJSLibraryName ();
-		String mozillaPath = getMozillaPath () + jsLibraryName + '\0';
-		try {
-			jsLibPathBytes = mozillaPath.getBytes ("UTF-8"); //$NON-NLS-1$
-		} catch (UnsupportedEncodingException e) {
-			jsLibPathBytes = mozillaPath.getBytes ();
+		String[] names = IsPre_4 ? new String[] {MozillaDelegate.getJSLibraryName_Pre4 ()} : MozillaDelegate.getJSLibraryNames ();
+		for (int i = 0; i < names.length; i++) {
+			File file = new File (getMozillaPath (), names[i]);
+			if (file.exists ()) {
+				String pathString = file.getAbsolutePath () + '\0';
+				try {
+					jsLibPathBytes = pathString.getBytes ("UTF-8"); //$NON-NLS-1$
+				} catch (UnsupportedEncodingException e) {
+					jsLibPathBytes = pathString.getBytes ();
+				}
+				break;
+			}
 		}
 	}
 	return jsLibPathBytes;
@@ -1519,12 +1578,12 @@ static String getMozillaPath () {
 	nsIServiceManager serviceManager = new nsIServiceManager (result[0]);
 	result[0] = 0;
 	byte[] buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_DIRECTORYSERVICE_CONTRACTID, true);
-	rc = serviceManager.GetServiceByContractID (buffer, nsIDirectoryService.NS_IDIRECTORYSERVICE_IID, result);
+	rc = serviceManager.GetServiceByContractID (buffer, XPCOM.NS_IDIRECTORYSERVICE_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 	serviceManager.Release();
 
-	nsIDirectoryService directoryService = new nsIDirectoryService (result[0]);
+	nsISupports directoryService = new nsISupports (result[0]);
 	result[0] = 0;
 	rc = directoryService.QueryInterface (nsIProperties.NS_IPROPERTIES_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
@@ -1534,7 +1593,7 @@ static String getMozillaPath () {
 	nsIProperties properties = new nsIProperties (result[0]);
 	result[0] = 0;
 	buffer = MozillaDelegate.wcsToMbcs (null, XPCOM.NS_GRE_DIR, true);
-	rc = properties.Get (buffer, nsIFile.NS_IFILE_IID, result);
+	rc = properties.Get (buffer, IsPre_17 ? nsIFile.NS_IFILE_IID : nsIFile.NS_IFILE_17_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 	properties.Release ();
@@ -1757,13 +1816,6 @@ static String InitDiscoverXULRunner () {
 }
 
 void initExternal (String profilePath) {
-	/*
-	 * external.xpt does not need to be written to the file system if the
-	 * XULRunner version is >= 4 since External.java handles this case
-	 * differently than for earlier XULRunner releases.
-	 */
-	if (!IsPre_4) return;
-
 	File componentsDir = new File (profilePath, AppFileLocProvider.COMPONENTS_DIR);
 	java.io.InputStream is = Library.class.getResourceAsStream ("/external.xpt"); //$NON-NLS-1$
 	if (is != null) {
@@ -1801,7 +1853,9 @@ void initFactories (nsIServiceManager serviceManager, nsIComponentManager compon
 	
 	nsIComponentRegistrar componentRegistrar = new nsIComponentRegistrar (result[0]);
 	result[0] = 0;
-	componentRegistrar.AutoRegister (0);	 /* detect the External component */ 
+	if (IsPre_17) {
+		componentRegistrar.AutoRegister (0);	 /* detect the External component */
+	}
 
 	PromptService2Factory factory = new PromptService2Factory ();
 	factory.AddRef ();
@@ -1989,7 +2043,7 @@ void initXPCOM (String mozillaPath, boolean isXULRunner) {
 		error (XPCOM.NS_ERROR_NULL_POINTER);
 	}
 
-	nsILocalFile localFile = new nsILocalFile (result[0]);
+	nsIFile localFile = new nsIFile (result[0]);
 	result[0] = 0;
 	if (isXULRunner) {
 		int size = XPCOM.nsDynamicFunctionLoad_sizeof ();
@@ -2009,9 +2063,22 @@ void initXPCOM (String mozillaPath, boolean isXULRunner) {
 		C.memmove (functionLoad.function, new int /*long*/[] {0} , C.PTR_SIZEOF);
 		XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
 		rc = XPCOM.XPCOMGlueLoadXULFunctions (ptr);
-		if (rc == XPCOM.NS_OK) {
-			IsPre_4 = false;
-			nsISupports.IsXULRunner10 = true;
+		if (rc == XPCOM.NS_OK) { /* > 3.x */
+			result[0] = 0;
+			rc = localFile.QueryInterface(nsIFile.NS_IFILE_17_IID, result);
+			if (rc == XPCOM.NS_OK) { /* 17.x */
+				nsISupports.IsXULRunner17 = true;
+			} else { /* 10.x */
+				rc = localFile.QueryInterface (nsILocalFile.NS_ILOCALFILE_IID, result);
+				if (rc != XPCOM.NS_OK) {
+					browser.dispose ();
+					error (rc);
+				}
+				IsPre_17 = true;
+				nsISupports.IsXULRunner10 = true;
+			}
+			if (result[0] != 0) new nsISupports (result[0]).Release();
+			result[0] = 0;
 		} else {
 			/*
 			 * XRE_InitEmbedding2 was not found, so fall back to XRE_InitEmbedding, which is
@@ -2021,11 +2088,9 @@ void initXPCOM (String mozillaPath, boolean isXULRunner) {
 			bytes = MozillaDelegate.wcsToMbcs (null, "XRE_InitEmbedding", true); //$NON-NLS-1$
 			functionLoad.functionName = C.malloc (bytes.length);
 			C.memmove (functionLoad.functionName, bytes, bytes.length);
+			XPCOM.memmove (ptr, functionLoad, XPCOM.nsDynamicFunctionLoad_sizeof ());
 			rc = XPCOM.XPCOMGlueLoadXULFunctions (ptr);
-			if (rc == XPCOM.NS_OK) {
-				IsPre_4 = true;
-				nsISupports.IsXULRunner10 = false;
-			}
+			IsPre_4 = IsPre_17 = true;
 		}
 
 		C.memmove (result, functionLoad.function, C.PTR_SIZEOF);
@@ -2038,6 +2103,12 @@ void initXPCOM (String mozillaPath, boolean isXULRunner) {
 			browser.dispose ();
 			error (XPCOM.NS_ERROR_NULL_POINTER);
 		}
+
+		if (nsISupports.IsXULRunner17 && !MozillaDelegate.supportsXULRunner17 ()) {
+			browser.dispose ();
+			SWT.error (SWT.ERROR_NO_HANDLES, null, " [XULRunner 17 is not supported on this platform]"); //$NON-NLS-1$
+		}
+
 		if (IsPre_4) {
 			rc = XPCOM.Call (functionPtr, localFile.getAddress (), localFile.getAddress (), LocationProvider.getAddress (), 0, 0);
 		} else {
@@ -2047,6 +2118,7 @@ void initXPCOM (String mozillaPath, boolean isXULRunner) {
 			System.setProperty (XULRUNNER_PATH, mozillaPath);
 		}
 	} else {
+		IsPre_4 = IsPre_17 = true;
 		rc = XPCOM.NS_InitXPCOM2 (0, localFile.getAddress(), LocationProvider.getAddress ());
 	}
 	localFile.Release ();
@@ -2657,7 +2729,7 @@ void onDispose (Display display) {
 		new nsISupports (badCertRequest).Release ();
 	}
 
-	int rc = webBrowser.RemoveWebBrowserListener (weakReference.getAddress (), nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID);
+	int rc = webBrowser.RemoveWebBrowserListener (weakReference.getAddress (), IsPre_17 ? nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_IID : nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_17_IID);
 	if (rc != XPCOM.NS_OK) error (rc);
 
 	rc = webBrowser.SetParentURIContentListener (0);
@@ -2716,6 +2788,7 @@ void onDispose (Display display) {
 }
 
 void Activate () {
+	isActive = true;
 	int /*long*/[] result = new int /*long*/[1];
 	int rc = webBrowser.QueryInterface (nsIWebBrowserFocus.NS_IWEBBROWSERFOCUS_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
@@ -2728,6 +2801,7 @@ void Activate () {
 }
 
 void Deactivate () {
+	isActive = false;
 	int /*long*/[] result = new int /*long*/[1];
 	int rc = webBrowser.QueryInterface (nsIWebBrowserFocus.NS_IWEBBROWSERFOCUS_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
@@ -2763,10 +2837,18 @@ void navigate (int /*long*/ requestHandle) {
 				if (rc == XPCOM.NS_OK) {
 					rc = seekableStream.Seek (nsISeekableStream.NS_SEEK_SET, 0);
 					if (rc == XPCOM.NS_OK) {
-						int[] available = new int[1];
-						rc = inputStream.Available (available);
+						long available;
+						if (IsPre_17) {
+							int[] _retval = new int[1];
+							rc = inputStream.Available (_retval);
+							available = _retval[0];
+						} else {
+							long[] _retval = new long[1];
+							rc = inputStream.Available (_retval);
+							available = _retval[0];
+						}
 						if (rc == XPCOM.NS_OK) {
-							int length = available[0];
+							int length = (int)available;
 							byte[] bytes = new byte[length];
 							int[] retVal = new int[1];
 							rc = inputStream.Read (bytes, length, retVal);
@@ -3252,7 +3334,7 @@ void unhookDOMListeners () {
 
 	nsIDOMWindow window = new nsIDOMWindow (result[0]);
 	result[0] = 0;
-	rc = window.QueryInterface (!IsPre_4 ? nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result);
+	rc = window.QueryInterface (IsPre_17 ? (IsPre_4 ?  nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID) : nsIDOMEventTarget.NS_IDOMEVENTTARGET_17_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
 	nsIDOMEventTarget target = new nsIDOMEventTarget (result[0]);
@@ -3279,7 +3361,7 @@ void unhookDOMListeners () {
 
 			nsIDOMWindow frame = new nsIDOMWindow (result[0]);
 			result[0] = 0;
-			rc = frame.QueryInterface (!IsPre_4 ? nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result);
+			rc = frame.QueryInterface (IsPre_17 ? (IsPre_4 ?  nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID) : nsIDOMEventTarget.NS_IDOMEVENTTARGET_17_IID, result);
 			if (rc != XPCOM.NS_OK) error (rc);
 			if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
 
@@ -3346,7 +3428,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIWeakReference.NS_IWEAKREFERENCE_IID)) {
+	if (guid.Equals (XPCOM.NS_IWEAKREFERENCE_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {weakReference.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -3356,12 +3438,17 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIWebBrowserChrome.NS_IWEBBROWSERCHROME_IID)) {
+	if (guid.Equals (nsIWebProgressListener.NS_IWEBPROGRESSLISTENER_17_IID)) {
+		XPCOM.memmove (ppvObject, new int /*long*/[] {webProgressListener_17.getAddress ()}, C.PTR_SIZEOF);
+		AddRef ();
+		return XPCOM.NS_OK;
+	}
+	if (guid.Equals (nsIWebBrowserChrome.NS_IWEBBROWSERCHROME_IID) || guid.Equals (nsIWebBrowserChrome.NS_IWEBBROWSERCHROME_17_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {webBrowserChrome.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIWebBrowserChromeFocus.NS_IWEBBROWSERCHROMEFOCUS_IID)) {
+	if (guid.Equals (XPCOM.NS_IWEBBROWSERCHROMEFOCUS_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {webBrowserChromeFocus.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -3371,32 +3458,37 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
+	if (guid.Equals (nsIEmbeddingSiteWindow.NS_IEMBEDDINGSITEWINDOW_17_IID)) {
+		XPCOM.memmove (ppvObject, new int /*long*/[] {embeddingSiteWindow_17.getAddress ()}, C.PTR_SIZEOF);
+		AddRef ();
+		return XPCOM.NS_OK;
+	}
 	if (guid.Equals (nsIInterfaceRequestor.NS_IINTERFACEREQUESTOR_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {interfaceRequestor.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsISupportsWeakReference.NS_ISUPPORTSWEAKREFERENCE_IID)) {
+	if (guid.Equals (XPCOM.NS_ISUPPORTSWEAKREFERENCE_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {supportsWeakReference.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIContextMenuListener.NS_ICONTEXTMENULISTENER_IID)) {
+	if (guid.Equals (XPCOM.NS_ICONTEXTMENULISTENER_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {contextMenuListener.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIURIContentListener.NS_IURICONTENTLISTENER_IID)) {
+	if (guid.Equals (XPCOM.NS_IURICONTENTLISTENER_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {uriContentListener.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsITooltipListener.NS_ITOOLTIPLISTENER_IID)) {
+	if (guid.Equals (XPCOM.NS_ITOOLTIPLISTENER_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {tooltipListener.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIBadCertListener2.NS_IBADCERTLISTENER2_IID)) {
+	if (guid.Equals (XPCOM.NS_IBADCERTLISTENER2_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {badCertListener.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -3428,7 +3520,7 @@ int GetInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 	if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE;
 	nsID guid = new nsID ();
 	XPCOM.memmove (guid, riid, nsID.sizeof);
-	if (guid.Equals (nsIDOMWindow.NS_IDOMWINDOW_10_IID) || guid.Equals (nsIDOMWindow.NS_IDOMWINDOW_IID)) {
+	if (guid.Equals (nsIDOMWindow.NS_IDOMWINDOW_17_IID) || guid.Equals (nsIDOMWindow.NS_IDOMWINDOW_10_IID) || guid.Equals (nsIDOMWindow.NS_IDOMWINDOW_IID)) {
 		int /*long*/[] aContentDOMWindow = new int /*long*/[1];
 		int rc = webBrowser.GetContentDOMWindow (aContentDOMWindow);
 		if (rc != XPCOM.NS_OK) error (rc);
@@ -3593,7 +3685,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 			result[0] = 0;
 
 			nsIDOMWindow domWindow = new nsIDOMWindow (window[0]);
-			rc = domWindow.QueryInterface (!IsPre_4 ? nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result);
+			rc = domWindow.QueryInterface (IsPre_17 ? (IsPre_4 ?  nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID) : nsIDOMEventTarget.NS_IDOMEVENTTARGET_17_IID, result);
 			domWindow.Release();
 			if (rc != XPCOM.NS_OK) error (rc);
 			if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
@@ -3739,7 +3831,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 				result[0] = 0;
 
 				nsIDOMWindow domWindow = new nsIDOMWindow (window[0]);
-				rc = domWindow.QueryInterface (!IsPre_4 ? nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result);
+				rc = domWindow.QueryInterface (IsPre_17 ? (IsPre_4 ?  nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID) : nsIDOMEventTarget.NS_IDOMEVENTTARGET_17_IID, result);
 				domWindow.Release();
 				if (rc != XPCOM.NS_OK) error (rc);
 				if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
@@ -3849,7 +3941,7 @@ int OnStateChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateF
 			new nsISupports (result[0]).Release ();
 			result[0] = 0;
 
-			rc = domWindow.QueryInterface (!IsPre_4 ? nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result);
+			rc = domWindow.QueryInterface (IsPre_17 ? (IsPre_4 ?  nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID : nsIDOMEventTarget.NS_IDOMEVENTTARGET_10_IID) : nsIDOMEventTarget.NS_IDOMEVENTTARGET_17_IID, result);
 			if (rc != XPCOM.NS_OK) error (rc);
 			if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE);
 
@@ -3884,6 +3976,10 @@ int OnProgressChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int aCur
 }
 
 int OnLocationChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int /*long*/ aLocation) {
+	return OnLocationChange(aWebProgress, aRequest, aLocation, 0);
+}
+
+int OnLocationChange (int /*long*/ aWebProgress, int /*long*/ aRequest, int /*long*/ aLocation, int aFlags) {
 	/*
 	* Feature in Mozilla.  When a page is loaded via setText before a previous
 	* setText page load has completed, the expected OnStateChange STATE_STOP for the
@@ -4234,7 +4330,11 @@ int GetSiteWindow (int /*long*/ aSiteWindow) {
 	XPCOM.memmove (aSiteWindow, new int /*long*/[] {siteWindow}, C.PTR_SIZEOF);
 	return XPCOM.NS_OK;     	
 }
- 
+
+int Blur () {
+	return XPCOM.NS_OK;
+}
+
 /* nsIWebBrowserChromeFocus */
 
 int FocusNextElement () {
@@ -4274,7 +4374,7 @@ int FocusPrevElement () {
 int OnShowContextMenu (int aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) {
 	nsIDOMEvent domEvent = new nsIDOMEvent (aEvent);
 	int /*long*/[] result = new int /*long*/[1];
-	int rc = domEvent.QueryInterface (!IsPre_4 ? nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_10_IID : nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID, result);
+	int rc = domEvent.QueryInterface (IsPre_17 ? (IsPre_4 ? nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID : nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_10_IID) :nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_17_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 
@@ -4536,7 +4636,7 @@ int HandleEvent (int /*long*/ event) {
 
 	if (XPCOM.DOMEVENT_KEYDOWN.equals (typeString)) {
 		int /*long*/[] result = new int /*long*/[1];
-		rc = domEvent.QueryInterface (!IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID, result);
+		rc = domEvent.QueryInterface (IsPre_17 ? (IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID) : nsIDOMKeyEvent.NS_IDOMKEYEVENT_17_IID, result);
 		if (rc != XPCOM.NS_OK) error (rc);
 		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 		nsIDOMKeyEvent domKeyEvent = new nsIDOMKeyEvent (result[0]);
@@ -4644,7 +4744,7 @@ int HandleEvent (int /*long*/ event) {
 		}
 
 		int /*long*/[] result = new int /*long*/[1];
-		rc = domEvent.QueryInterface (!IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID, result);
+		rc = domEvent.QueryInterface (IsPre_17 ? (IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID) : nsIDOMKeyEvent.NS_IDOMKEYEVENT_17_IID, result);
 		if (rc != XPCOM.NS_OK) error (rc);
 		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 		nsIDOMKeyEvent domKeyEvent = new nsIDOMKeyEvent (result[0]);
@@ -4659,11 +4759,10 @@ int HandleEvent (int /*long*/ event) {
 		if (rc != XPCOM.NS_OK) error (rc);
 		rc = domKeyEvent.GetMetaKey (aMetaKey);
 		if (rc != XPCOM.NS_OK) error (rc);
-		domKeyEvent.Release ();
-
 		int[] aCharCode = new int[1]; /* PRUint32 */
 		rc = domKeyEvent.GetCharCode (aCharCode);
 		if (rc != XPCOM.NS_OK) error (rc);
+		domKeyEvent.Release ();
 		lastCharCode = aCharCode[0];
 		if (lastCharCode == 0) {
 			switch (lastKeyCode) {
@@ -4700,7 +4799,7 @@ int HandleEvent (int /*long*/ event) {
 
 	if (XPCOM.DOMEVENT_KEYUP.equals (typeString)) {
 		int /*long*/[] result = new int /*long*/[1];
-		rc = domEvent.QueryInterface (!IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID, result);
+		rc = domEvent.QueryInterface (IsPre_17 ? (IsPre_4 ? nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID : nsIDOMKeyEvent.NS_IDOMKEYEVENT_10_IID) : nsIDOMKeyEvent.NS_IDOMKEYEVENT_17_IID, result);
 		if (rc != XPCOM.NS_OK) error (rc);
 		if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 		nsIDOMKeyEvent domKeyEvent = new nsIDOMKeyEvent (result[0]);
@@ -4757,7 +4856,7 @@ int HandleEvent (int /*long*/ event) {
 	/* mouse event */
 
 	int /*long*/[] result = new int /*long*/[1];
-	rc = domEvent.QueryInterface (!IsPre_4 ? nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_10_IID : nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID, result);
+	rc = domEvent.QueryInterface (IsPre_17 ? (IsPre_4 ? nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID : nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_10_IID) : nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_17_IID, result);
 	if (rc != XPCOM.NS_OK) error (rc);
 	if (result[0] == 0) error (XPCOM.NS_NOINTERFACE);
 	nsIDOMMouseEvent domMouseEvent = new nsIDOMMouseEvent (result[0]);
diff --git a/org/eclipse/swt/browser/MozillaDelegate.java b/org/eclipse/swt/browser/MozillaDelegate.java
index 3a92ce3..985b525 100644
--- a/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/org/eclipse/swt/browser/MozillaDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -75,8 +75,8 @@ static String getCacheParentPath () {
 	return getProfilePath ();
 }
 
-static String getJSLibraryName () {
-	return "libxul.so"; //$NON-NLS-1$
+static String[] getJSLibraryNames () {
+	return new String[] {"libxul.so"}; //$NON-NLS-1$
 }
 
 static String getJSLibraryName_Pre4() {
@@ -122,25 +122,26 @@ static void loadAdditionalLibraries (String mozillaPath) {
 	String libName = "libswt-xulrunner-fix.so"; //$NON-NLS-1$
 	File libsDir = new File (getProfilePath () + "/libs/" + Mozilla.OS() + '/' + Mozilla.Arch ()); //$NON-NLS-1$
 	File file = new File (libsDir, libName);
-	java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName);
-	if (is != null) {
-		if (!libsDir.exists ()) {
-			libsDir.mkdirs ();
-		}
-		int read;
-		byte [] buffer = new byte [4096];
-		try {
-			FileOutputStream os = new FileOutputStream (file);
-			while ((read = is.read (buffer)) != -1) {
-				os.write(buffer, 0, read);
+	if (!file.exists()) {
+		java.io.InputStream is = Library.class.getResourceAsStream ('/' + libName);
+		if (is != null) {
+			if (!libsDir.exists ()) {
+				libsDir.mkdirs ();
+			}
+			int read;
+			byte [] buffer = new byte [4096];
+			try {
+				FileOutputStream os = new FileOutputStream (file);
+				while ((read = is.read (buffer)) != -1) {
+					os.write(buffer, 0, read);
+				}
+				os.close ();
+				is.close ();
+			} catch (FileNotFoundException e) {
+			} catch (IOException e) {
 			}
-			os.close ();
-			is.close ();
-		} catch (FileNotFoundException e) {
-		} catch (IOException e) {
 		}
 	}
-
 	if (file.exists ()) {
 		byte[] bytes = Converter.wcsToMbcs (null, file.getAbsolutePath (), true);
 		OS.dlopen (bytes, OS.RTLD_NOW | OS.RTLD_GLOBAL);
@@ -155,6 +156,10 @@ static boolean needsSpinup () {
 	return true;
 }
 
+static boolean supportsXULRunner17 () {
+	return false;
+}
+
 static byte[] wcsToMbcs (String codePage, String string, boolean terminate) {
 	return Converter.wcsToMbcs (codePage, string, terminate);
 }
@@ -177,7 +182,12 @@ int /*long*/ getHandle () {
 	* causing the child of the GtkFixed handle to be resized to 1.
 	* The workaround is to embed Mozilla into a GtkHBox handle.
 	*/
-	embedHandle = OS.gtk_hbox_new (false, 0);
+	if (OS.GTK3) {
+		embedHandle = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0);
+		OS.gtk_box_set_homogeneous (embedHandle, false);
+	} else {
+		embedHandle = OS.gtk_hbox_new (false, 0);
+	}
 	OS.gtk_container_add (browser.handle, embedHandle);
 	OS.gtk_widget_show (embedHandle);
 	return embedHandle;
diff --git a/org/eclipse/swt/browser/PromptAuth2.java b/org/eclipse/swt/browser/PromptAuth2.java
index 40d9855..a6df7cc 100644
--- a/org/eclipse/swt/browser/PromptAuth2.java
+++ b/org/eclipse/swt/browser/PromptAuth2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -72,7 +72,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIAuthPrompt2.NS_IAUTHPROMPT2_IID)) {
+	if (guid.Equals (XPCOM.NS_IAUTHPROMPT2_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {promptAuth.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/PromptFactory.java b/org/eclipse/swt/browser/PromptFactory.java
index 001bd1b..f6f464f 100644
--- a/org/eclipse/swt/browser/PromptFactory.java
+++ b/org/eclipse/swt/browser/PromptFactory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -68,7 +68,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIPromptFactory.NS_IPROMPTFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -98,7 +98,7 @@ int GetPrompt (int /*long*/ aParent, int /*long*/ iid, int /*long*/ result) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIAuthPrompt2.NS_IAUTHPROMPT2_IID)) {
+	if (guid.Equals (XPCOM.NS_IAUTHPROMPT2_IID)) {
 		PromptAuth2 promptAuth = new PromptAuth2();
 		promptAuth.AddRef ();
 		promptAuth.setParent (aParent);
diff --git a/org/eclipse/swt/browser/PromptService2.java b/org/eclipse/swt/browser/PromptService2.java
index 16cbe4f..c8b8e3a 100644
--- a/org/eclipse/swt/browser/PromptService2.java
+++ b/org/eclipse/swt/browser/PromptService2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -105,7 +105,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIPromptService2.NS_IPROMPTSERVICE2_IID)) {
+	if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {promptService2.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/browser/PromptService2Factory.java b/org/eclipse/swt/browser/PromptService2Factory.java
index 3ec1c35..d700924 100644
--- a/org/eclipse/swt/browser/PromptService2Factory.java
+++ b/org/eclipse/swt/browser/PromptService2Factory.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -69,7 +69,7 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIFactory.NS_IFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IFACTORY_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {factory.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
@@ -90,13 +90,13 @@ int Release () {
 int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) {
 	nsID guid = new nsID ();
 	XPCOM.memmove (guid, iid, nsID.sizeof);
-	if (guid.Equals (nsIPromptService2.NS_IPROMPTSERVICE2_IID) || guid.Equals(nsIPromptService.NS_IPROMPTSERVICE_IID)) {
+	if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID) || guid.Equals(nsIPromptService.NS_IPROMPTSERVICE_IID)) {
 		PromptService2 promptService = new PromptService2 ();
 		promptService.AddRef ();
 		XPCOM.memmove (result, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF);
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIPromptFactory.NS_IPROMPTFACTORY_IID)) {
+	if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) {
 		PromptFactory promptFactory = new PromptFactory();
 		promptFactory.AddRef ();
 		XPCOM.memmove (result, new int /*long*/[] {promptFactory.getAddress ()}, C.PTR_SIZEOF);
diff --git a/org/eclipse/swt/browser/WebKit.java b/org/eclipse/swt/browser/WebKit.java
index 0bae664..3a8007c 100644
--- a/org/eclipse/swt/browser/WebKit.java
+++ b/org/eclipse/swt/browser/WebKit.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -597,9 +597,13 @@ public void create (Composite parent, int style) {
 	*/
 	int /*long*/ session = WebKitGTK.webkit_get_default_session ();
 	int /*long*/ originalAuth = WebKitGTK.soup_session_get_feature (session, WebKitGTK.webkit_soup_auth_dialog_get_type ());
-	WebKitGTK.soup_session_feature_detach (originalAuth, session);
+	if (originalAuth != 0) {
+		WebKitGTK.soup_session_feature_detach (originalAuth, session);
+	}
 	OS.g_signal_connect (session, WebKitGTK.authenticate, Proc5.getAddress (), webView);
-	WebKitGTK.soup_session_feature_attach (originalAuth, session);
+	if (originalAuth != 0) {
+		WebKitGTK.soup_session_feature_attach (originalAuth, session);
+	}
 
 	/*
 	* Check for proxy values set as documented java properties and update the
@@ -644,6 +648,23 @@ public void create (Composite parent, int style) {
 	* be changed.
 	*/
 	browser.setData (KEY_CHECK_SUBWINDOW, Boolean.FALSE);
+
+	/*
+	 * Bug in WebKitGTK.  In WebKitGTK 1.10.x a crash can occur if an
+	 * attempt is made to show a browser before a size has been set on
+	 * it.  The workaround is to temporarily give it a size that forces
+	 * the native resize events to fire.
+	 */
+	int major = WebKitGTK.webkit_major_version ();
+	int minor = WebKitGTK.webkit_minor_version ();
+	if (major == 1 && minor >= 10) {
+		Rectangle minSize = browser.computeTrim (0, 0, 2, 2);
+		Point size = browser.getSize ();
+		size.x += minSize.width; size.y += minSize.height;
+		browser.setSize (size);
+		size.x -= minSize.width; size.y -= minSize.height;
+		browser.setSize (size);
+	}
 }
 
 void addEventHandlers (int /*long*/ web_view, boolean top) {
@@ -912,13 +933,25 @@ boolean handleDOMEvent (int /*long*/ event, int type) {
 	}
 
 	/* key event */
+	int keyEventState = 0;
+	int /*long*/ eventPtr = OS.gtk_get_current_event ();
+	if (eventPtr != 0) {
+		GdkEventKey gdkEvent = new GdkEventKey ();
+		OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof);
+		switch (gdkEvent.type) {
+			case OS.GDK_KEY_PRESS:
+			case OS.GDK_KEY_RELEASE:
+				keyEventState = gdkEvent.state;
+				break;
+		}
+		OS.gdk_event_free (eventPtr);
+	}
 	int keyCode = (int)WebKitGTK.webkit_dom_ui_event_get_key_code (event);
 	int charCode = (int)WebKitGTK.webkit_dom_ui_event_get_char_code (event);
-	boolean altKey = WebKitGTK.webkit_dom_mouse_event_get_alt_key (event) != 0;
-	boolean ctrlKey = WebKitGTK.webkit_dom_mouse_event_get_ctrl_key (event) != 0;
-	boolean shiftKey = WebKitGTK.webkit_dom_mouse_event_get_shift_key (event) != 0;
-	boolean metaKey = WebKitGTK.webkit_dom_mouse_event_get_meta_key (event) != 0;
-	return handleKeyEvent(typeString, keyCode, charCode, altKey, ctrlKey, shiftKey, metaKey);
+	boolean altKey = (keyEventState & OS.GDK_MOD1_MASK) != 0;
+	boolean ctrlKey = (keyEventState & OS.GDK_CONTROL_MASK) != 0;
+	boolean shiftKey = (keyEventState & OS.GDK_SHIFT_MASK) != 0;
+	return handleKeyEvent(typeString, keyCode, charCode, altKey, ctrlKey, shiftKey, false);
 }
 
 boolean handleEventFromFunction (Object[] arguments) {
@@ -972,7 +1005,7 @@ boolean handleEventFromFunction (Object[] arguments) {
 		((Double)arguments[1]).intValue (),
 		((Double)arguments[2]).intValue (),
 		((Double)arguments[3]).intValue (),
-		((Double)arguments[4]).intValue () + 1,
+		(arguments[4] != null ? ((Double)arguments[4]).intValue () : 0) + 1,
 		((Boolean)arguments[5]).booleanValue (),
 		((Boolean)arguments[6]).booleanValue (),
 		((Boolean)arguments[7]).booleanValue (),
diff --git a/org/eclipse/swt/browser/WindowCreator2.java b/org/eclipse/swt/browser/WindowCreator2.java
index 8882a4f..1db3055 100644
--- a/org/eclipse/swt/browser/WindowCreator2.java
+++ b/org/eclipse/swt/browser/WindowCreator2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -86,12 +86,12 @@ int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) {
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIWindowCreator.NS_IWINDOWCREATOR_IID)) {
+	if (guid.Equals (XPCOM.NS_IWINDOWCREATOR_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {windowCreator.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
 	}
-	if (guid.Equals (nsIWindowCreator2.NS_IWINDOWCREATOR2_IID)) {
+	if (guid.Equals (XPCOM.NS_IWINDOWCREATOR2_IID)) {
 		XPCOM.memmove (ppvObject, new int /*long*/[] {windowCreator2.getAddress ()}, C.PTR_SIZEOF);
 		AddRef ();
 		return XPCOM.NS_OK;
diff --git a/org/eclipse/swt/custom/AnimatedProgress.java b/org/eclipse/swt/custom/AnimatedProgress.java
index 41b34f7..1ba6793 100644
--- a/org/eclipse/swt/custom/AnimatedProgress.java
+++ b/org/eclipse/swt/custom/AnimatedProgress.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/BidiSegmentListener.java b/org/eclipse/swt/custom/BidiSegmentListener.java
index 11bd99e..02ed1c0 100644
--- a/org/eclipse/swt/custom/BidiSegmentListener.java
+++ b/org/eclipse/swt/custom/BidiSegmentListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.custom;
 
-import org.eclipse.swt.internal.SWTEventListener;
+import org.eclipse.swt.internal.*;
 
 /**
  * This listener interface may be implemented in order to receive
@@ -27,11 +27,10 @@ public interface BidiSegmentListener extends SWTEventListener {
  * <li>event.lineOffset line start offset (input)</li>
  * <li>event.lineText line text (input)</li>
  * <li>event.segments text segments that should be reordered separately (output)</li> 
- * <li>event.segmentsChars characters that should be inserted (output)</li>
+ * <li>event.segmentsChars characters that should be inserted (output, optional)</li>
  * </ul>
  *
  * @param event the given event
- *	separately. (output)
  * @see BidiSegmentEvent
  */
 public void lineGetSegments(BidiSegmentEvent event);
diff --git a/org/eclipse/swt/custom/BusyIndicator.java b/org/eclipse/swt/custom/BusyIndicator.java
index 7f2f39d..60259a5 100644
--- a/org/eclipse/swt/custom/BusyIndicator.java
+++ b/org/eclipse/swt/custom/BusyIndicator.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/CCombo.java b/org/eclipse/swt/custom/CCombo.java
index 6fa207e..04c0528 100644
--- a/org/eclipse/swt/custom/CCombo.java
+++ b/org/eclipse/swt/custom/CCombo.java
@@ -1054,7 +1054,7 @@ void initAccessible() {
 	});
 }
 boolean isDropped () {
-	return popup.getVisible ();
+	return !isDisposed() && popup.getVisible ();
 }
 public boolean isFocusControl () {
 	checkWidget();
diff --git a/org/eclipse/swt/custom/CLabel.java b/org/eclipse/swt/custom/CLabel.java
index b45797e..9e4ef9e 100644
--- a/org/eclipse/swt/custom/CLabel.java
+++ b/org/eclipse/swt/custom/CLabel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -36,12 +36,13 @@ import org.eclipse.swt.accessibility.*;
  * </dl>
  * 
  * </p><p>
- * IMPORTANT: This class is <em>not</em> intended to be subclassed.
+ * This class may be subclassed for the purpose of overriding the default string
+ * shortening algorithm that is implemented in method <code>shortenText()</code>.
  * </p>
  *
  * @see <a href="http://www.eclipse.org/swt/examples.php">SWT Example: CustomControlExample</a>
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
- * @noextend This class is not intended to be subclassed by clients.
+ * @see CLabel#shortenText(GC, String, int)
  */
 public class CLabel extends Canvas {
 
@@ -148,14 +149,6 @@ private static int checkStyle (int style) {
 	return style |= SWT.NO_FOCUS | SWT.DOUBLE_BUFFERED;
 }
 
-//protected void checkSubclass () {
-//	String name = getClass().getName ();
-//	String validName = CLabel.class.getName();
-//	if (!validName.equals(name)) {
-//		SWT.error (SWT.ERROR_INVALID_SUBCLASS);
-//	}
-//}
-
 public Point computeSize(int wHint, int hHint, boolean changed) {
 	checkWidget();
 	Point e = getTotalSize(image, text);
diff --git a/org/eclipse/swt/custom/CTabFolder.java b/org/eclipse/swt/custom/CTabFolder.java
index 1f0716f..3563681 100644
--- a/org/eclipse/swt/custom/CTabFolder.java
+++ b/org/eclipse/swt/custom/CTabFolder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -124,6 +124,7 @@ public class CTabFolder extends Composite {
 	boolean mru = false;
 	Listener listener;
 	boolean ignoreTraverse;
+	boolean useDefaultRenderer;
 	
 	/* External Listener management */
 	CTabFolder2Listener[] folderListeners = new CTabFolder2Listener[0];
@@ -166,10 +167,10 @@ public class CTabFolder extends Composite {
 	Menu showMenu;
 	ToolBar chevronTb;
 	ToolItem chevronItem;
-	Image chevronImage;
 	int chevronCount;
 	boolean chevronVisible = true;
 	
+	Image chevronImage;
 	Control topRight;
 	int topRightAlignment = SWT.RIGHT;
 	boolean ignoreResize;
@@ -178,6 +179,12 @@ public class CTabFolder extends Composite {
 	Rectangle[] controlRects;
 	Image[] controlBkImages;
 	
+	int updateFlags;
+	final static int REDRAW = 1 << 1;
+	final static int REDRAW_TABS = 1 << 2;
+	final static int UPDATE_TAB_HEIGHT = 1 << 3;
+	Runnable updateRun;
+	
 	// when disposing CTabFolder, don't try to layout the items or 
 	// change the selection as each child is destroyed.
 	boolean inDispose = false;
@@ -251,6 +258,7 @@ void init(int style) {
 	selectionForeground = display.getSystemColor(SELECTION_FOREGROUND);
 	selectionBackground = display.getSystemColor(SELECTION_BACKGROUND);
 	renderer = new CTabFolderRenderer(this);
+	useDefaultRenderer = true;
 	controls = new Control[0];
 	controlAlignments = new int[0];
 	controlRects = new Rectangle[0];
@@ -266,6 +274,7 @@ void init(int style) {
 				case SWT.FocusIn:          onFocus(event);	break;
 				case SWT.FocusOut:         onFocus(event);	break;
 				case SWT.KeyDown:          onKeyDown(event); break;
+				case SWT.MenuDetect:       onMenuDetect(event); break;
 				case SWT.MouseDoubleClick: onMouseDoubleClick(event); break;
 				case SWT.MouseDown:        onMouse(event);	break;
 				case SWT.MouseEnter:       onMouse(event);	break;
@@ -287,6 +296,7 @@ void init(int style) {
 		SWT.FocusIn, 
 		SWT.FocusOut, 
 		SWT.KeyDown,
+		SWT.MenuDetect,
 		SWT.MouseDoubleClick, 
 		SWT.MouseDown,
 		SWT.MouseEnter, 
@@ -391,8 +401,7 @@ public void addCTabFolderListener(CTabFolderListener listener) {
 	// display close button to be backwards compatible
 	if (!showClose) {
 		showClose = true;
-		updateItems();
-		redraw();
+		updateFolder(REDRAW);
 	}
 }
 /**	 
@@ -449,7 +458,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
 	int rightWidth = 0;
 	int allWidth = 0;
 	for (int i = 0; i < controls.length; i++) {
-		Point ctrlSize = tabControlSize[i] = controls[i].getVisible() ? controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT) : new Point(0,0);
+		Point ctrlSize = tabControlSize[i] = !controls[i].isDisposed() && controls[i].getVisible() ? controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT) : new Point(0,0);
 		int alignment = controlAlignments[i];
 		if ((alignment & SWT.LEAD) != 0) {
 			rects[i].width = ctrlSize.x;
@@ -555,7 +564,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
 	int bodyLeft = -bodyTrim.x;
 	int bodyWidth = size.x - bodyLeft - bodyRight;
 	x = size.x - bodyRight;
-	int y = -bodyTrim.y;
+	int y = onBottom ? this.getSize().y - getTabHeight() + 2*bodyTrim.y : -bodyTrim.y;
 	availableWidth = bodyWidth;
 	int maxHeight = 0;
 	for (int i = 0; i < controls.length; i++) {
@@ -564,7 +573,7 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
 			if (availableWidth > ctrlSize.x) {
 				x -= ctrlSize.x;
 				rects[i].width = ctrlSize.x;
-				rects[i].y = y;
+				rects[i].y = onBottom ? y - ctrlSize.y : y;
 				rects[i].height = ctrlSize.y;
 				rects[i].x = x;
 				availableWidth -= ctrlSize.x;
@@ -578,9 +587,9 @@ Rectangle[] computeControlBounds (Point size, boolean[][] position) {
 					//Relayout this control in the next line
 					i--;
 				} else {
-					ctrlSize = controls[i].computeSize(bodyWidth, SWT.DEFAULT);
+					ctrlSize = controls[i].isDisposed() ? new Point(0,0) : controls[i].computeSize(bodyWidth, SWT.DEFAULT);
 					rects[i].width = bodyWidth;
-					rects[i].y = y;
+					rects[i].y = onBottom ? y - ctrlSize.y : y;
 					rects[i].height = ctrlSize.y;
 					rects[i].x = size.x - ctrlSize.x - bodyRight;
 					y += ctrlSize.y;
@@ -635,7 +644,9 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	return trim;
 }
 Image createButtonImage(Display display, int button) {
-	Point size = renderer.computeSize(button, SWT.NONE, null, SWT.DEFAULT, SWT.DEFAULT);
+	GC tempGC = new GC (this);
+	Point size = renderer.computeSize(button, SWT.NONE, tempGC, SWT.DEFAULT, SWT.DEFAULT);
+	tempGC.dispose();
 	Rectangle trim = renderer.computeTrim(button, SWT.NONE, 0, 0, 0, 0);
 	Image image = new Image (display, size.x - trim.width, size.y - trim.height);
 	GC gc = new GC (image);
@@ -678,11 +689,9 @@ void createItem (CTabItem item, int index) {
 	priority = newPriority;
 	
 	if (items.length == 1) {
-		if (!updateTabHeight(false)) updateItems();
-		redraw();
+		updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 	} else {
-		updateItems();
-		redrawTabs();
+		updateFolder(REDRAW_TABS);
 	}
 }
 void destroyItem (CTabItem item) {
@@ -696,7 +705,7 @@ void destroyItem (CTabItem item) {
 		firstIndex = -1;
 		selectedIndex = -1;
 		
-		Control control = item.getControl();
+		Control control = item.control;
 		if (control != null && !control.isDisposed()) {
 			control.setVisible(false);
 		}
@@ -734,8 +743,7 @@ void destroyItem (CTabItem item) {
 		selectedIndex --;
 	}
 	
-	updateItems();
-	redrawTabs();
+	updateFolder(UPDATE_TAB_HEIGHT | REDRAW_TABS);
 }
 
 /**
@@ -835,6 +843,7 @@ public CTabItem getItem (int index) {
 public CTabItem getItem (Point pt) {
 	//checkWidget();
 	if (items.length == 0) return null;
+	runUpdate();
 	Point size = getSize();
 	Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
 	if (size.x <= trim.width) return null;
@@ -880,7 +889,7 @@ int getLeftItemEdge (GC gc, int part){
 	int x = -trim.x; 
 	int width = 0;
 	for (int i = 0; i < controls.length; i++) {
-		if ((controlAlignments[i] & SWT.LEAD) != 0 && controls[i].getVisible()) {
+		if ((controlAlignments[i] & SWT.LEAD) != 0 && !controls[i].isDisposed() && controls[i].getVisible()) {
 			width += controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT).x;	
 		}
 	}
@@ -1056,7 +1065,7 @@ int getRightItemEdge (GC gc){
 	int width = 0;
 	for (int i = 0; i < controls.length; i++) {
 		int align = controlAlignments[i];
-		if ((align & SWT.WRAP) == 0 && (align & SWT.LEAD) == 0 && controls[i].getVisible()) {
+		if ((align & SWT.WRAP) == 0 && (align & SWT.LEAD) == 0 && !controls[i].isDisposed() && controls[i].getVisible()) {
 			Point rightSize = controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT);
 			width += rightSize.x;
 		}
@@ -1281,12 +1290,16 @@ void initAccessible() {
 	final Accessible accessible = getAccessible();
 	accessible.addAccessibleListener(new AccessibleAdapter() {
 		public void getName(AccessibleEvent e) {
-			String name = null;
+			CTabItem item = null;
 			int childID = e.childID;
-			if (childID >= 0 && childID < items.length) {
-				name = stripMnemonic(items[childID].getText());
+			if (childID == ACC.CHILDID_SELF) {
+				if (selectedIndex != -1) {
+					item = items[selectedIndex];
+				}
+			} else if (childID >= 0 && childID < items.length) {
+				item = items[childID];
 			}
-			e.result = name;
+			e.result = item == null ? null : stripMnemonic(item.getText());
 		}
 
 		public void getHelp(AccessibleEvent e) {
@@ -1348,7 +1361,7 @@ void initAccessible() {
 				location = getBounds();
 				pt = getParent().toDisplay(location.x, location.y);
 			} else {
-				if (childID >= 0 && childID < items.length && items[childID].isShowing()) {
+				if (childID >= 0 && childID < items.length && items[childID].showing) {
 					location = items[childID].getBounds();
 				}
 				if (location != null) {
@@ -1480,6 +1493,7 @@ void initAccessibleChevronTb() {
 	});
 }
 void onKeyDown (Event event) {
+	runUpdate();
 	switch (event.keyCode) {
 		case SWT.ARROW_LEFT:
 		case SWT.ARROW_RIGHT:
@@ -1553,6 +1567,7 @@ void onDispose(Event event) {
 		}
 	}
 
+	gradientColors = null;
 	
 	selectionGradientColors = null;
 	selectionGradientPercents = null;
@@ -1585,6 +1600,16 @@ void onDispose(Event event) {
 	
 	if (renderer != null) renderer.dispose();
 	renderer = null;
+
+	minItem = null;
+	maxItem = null;
+	minMaxTb = null;
+	
+	chevronItem = null;
+	chevronTb = null;
+	
+	if (folderListeners.length != 0) folderListeners = new CTabFolder2Listener[0];
+	if (tabListeners.length != 0) tabListeners = new CTabFolderListener[0];
 }
 void onDragDetect(Event event) {
 	boolean consume = false;
@@ -1624,6 +1649,23 @@ boolean onMnemonic (Event event, boolean doit) {
 	}
 	return false;
 }
+void onMenuDetect(Event event) {
+	if (event.detail == SWT.MENU_KEYBOARD) {
+		if (selectedIndex != -1) {
+			CTabItem item = items[selectedIndex];
+			Rectangle rect = getDisplay().map(this, null, item.getBounds());
+			if (!rect.contains(event.x, event.y)) {
+				/* If the mouse is not in the currently-selected tab,
+				 * then pop up the menu near the top-right corner of the current tab.
+				 */
+				Rectangle itemTrim = renderer.computeTrim(selectedIndex, SWT.NONE, 0, 0, 0, 0);
+				Rectangle closeTrim = renderer.computeTrim(CTabFolderRenderer.PART_CLOSE_BUTTON, SWT.NONE, 0, 0, 0, 0);
+				event.x = rect.x + rect.width - item.closeRect.width + itemTrim.x - closeTrim.width;
+				event.y = rect.y - itemTrim.y - closeTrim.y;
+			}
+		}
+	}
+}
 void onMouseDoubleClick(Event event) {	
 	if (event.button != 1 || 
 		(event.stateMask & SWT.BUTTON2) != 0 || 
@@ -1967,8 +2009,9 @@ void onPaint(Event event) {
 void onResize(Event event) {
 	if (inDispose) return;
 	if (ignoreResize) return;
-	if (updateItems()) redrawTabs();
-	
+	if (updateItems()) {
+		redrawTabs();
+	}
 	Point size = getSize();
 	if (oldSize == null) {
 		redraw();
@@ -2041,6 +2084,7 @@ void onSelection(Event event) {
 }
 void onTraverse (Event event) {
 	if (ignoreTraverse) return;
+	runUpdate();
 	switch (event.detail) {
 		case SWT.TRAVERSE_ESCAPE:
 		case SWT.TRAVERSE_RETURN:
@@ -2341,13 +2385,7 @@ public void setBorderVisible(boolean show) {
 	checkWidget();
 	if (borderVisible == show) return;
 	this.borderVisible = show;
-	Rectangle rectBefore = getClientArea();
-	updateItems();
-	Rectangle rectAfter = getClientArea();
-	if (!rectBefore.equals(rectAfter)) {
-		notifyListeners(SWT.Resize, new Event());
-	}
-	redraw();
+	updateFolder(REDRAW);
 }
 void setButtonBounds(GC gc) {
 	Point size = getSize();
@@ -2456,11 +2494,13 @@ void setButtonBounds(GC gc) {
 	boolean changed = false;
 	ignoreResize = true;
 	for (int i = 0; i < controls.length; i++) {
-		if (overflow[0][i]) {
-			controls[i].setBounds(rects[i]);
-		} else {
-			controls[i].setBounds(rects[i].x, rects[i].y, rects[i].width, headerHeight);
-			controls[i].moveAbove(null);
+		if (!controls[i].isDisposed()) {
+			if (overflow[0][i]) {
+				controls[i].setBounds(rects[i]);
+			} else {
+				controls[i].moveAbove(null);
+				controls[i].setBounds(rects[i].x, rects[i].y, rects[i].width, headerHeight);
+			}
 		}
 		if (!changed && !rects[i].equals(controlRects[i])) changed = true;
 	}
@@ -2468,15 +2508,41 @@ void setButtonBounds(GC gc) {
 	controlRects = rects;
 	if (changed || hovering) updateBkImages();
 }
+public boolean setFocus () {
+	checkWidget ();
+	
+	/*
+	* Feature in SWT.  When a new tab item is selected
+	* and the previous tab item had focus, removing focus
+	* from the previous tab item causes fixFocus() to give
+	* focus to the first child, which is usually one of the
+	* toolbars. This is unexpected.
+	* The fix is to try to set focus on the first tab item
+	* if fixFocus() is called.
+	*/
+	Control focusControl = getDisplay().getFocusControl ();
+	boolean fixFocus = isAncestor (focusControl);
+	if (fixFocus) {
+		CTabItem item = getSelection();
+		if (item != null) {
+			if (item.setFocus ()) return true;
+		}
+	}
+	return super.setFocus ();
+}
+/* Copy of isFocusAncestor from Control. */
+boolean isAncestor (Control control) {
+	while (control != null && control != this && !(control instanceof Shell)) {
+		control = control.getParent();
+	}
+	return control == this;
+}
 public void setFont(Font font) {
 	checkWidget();
 	if (font != null && font.equals(getFont())) return;
 	super.setFont(font);
 	oldFont = getFont();
-	if (!updateTabHeight(false)) {
-		updateItems();
-		redraw();
-	}
+	updateFolder(REDRAW);
 }
 public void setForeground (Color color) {
 	super.setForeground(color);
@@ -2618,8 +2684,7 @@ boolean setItemLocation(GC gc) {
 	}
 	items = temp;
 	selectedIndex = newSelectedIndex;
-	updateItems();
-	redraw();
+	updateFolder(REDRAW);
 }
 boolean setItemSize(GC gc) {
 	boolean changed = false;
@@ -2759,8 +2824,7 @@ public void setMaximizeVisible(boolean visible) {
 	if (showMax == visible) return;
 	// display maximize button
 	showMax = visible;
-	updateItems();
-	redraw();
+	updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 }
 /**
  * Sets the layout which is associated with the receiver to be
@@ -2823,8 +2887,7 @@ public void setMinimizeVisible(boolean visible) {
 	if (showMin == visible) return;
 	// display minimize button
 	showMin = visible;
-	updateItems();
-	redraw();
+	updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 }
 /**
  * Sets the minimized state of the receiver.
@@ -2870,7 +2933,7 @@ public void setMinimumCharacters(int count) {
 	if (count < 0) SWT.error(SWT.ERROR_INVALID_RANGE);
 	if (minChars == count) return;
 	minChars = count;
-	if (updateItems()) redrawTabs();
+	updateFolder(REDRAW_TABS);
 }
 
 /**
@@ -2913,7 +2976,7 @@ public void setMRUVisible(boolean show) {
 		for (int i = 0; i < idx; i++) {
 			priority[next++] = i;
 		}
-		if (updateItems()) redrawTabs();
+		updateFolder(REDRAW_TABS);
 	}
 }
 /**
@@ -2934,18 +2997,12 @@ public void setMRUVisible(boolean show) {
  */
 public void setRenderer(CTabFolderRenderer renderer) {
 	checkWidget();
-	if (this.renderer == renderer) return;
+	if (this.renderer == renderer || (useDefaultRenderer && renderer == null)) return;
 	if (this.renderer != null) this.renderer.dispose();
-	if (renderer == null) renderer = new CTabFolderRenderer(this);
+	useDefaultRenderer = renderer == null;
+	if (useDefaultRenderer) renderer = new CTabFolderRenderer(this);
 	this.renderer = renderer;
-	updateTabHeight(false);
-	Rectangle rectBefore = getClientArea();
-	updateItems();
-	Rectangle rectAfter = getClientArea();
-	if (!rectBefore.equals(rectAfter)) {
-		notifyListeners(SWT.Resize, new Event());
-	}
-	redraw();
+	updateFolder(REDRAW);
 }
 /**
  * Set the selection to the tab at the specified item.
@@ -3261,13 +3318,7 @@ public void setSimple(boolean simple) {
 	checkWidget();
 	if (this.simple != simple) {
 		this.simple = simple;
-		Rectangle rectBefore = getClientArea();
-		updateItems();
-		Rectangle rectAfter = getClientArea();
-		if (!rectBefore.equals(rectAfter)) {
-			notifyListeners(SWT.Resize, new Event());
-		}
-		redraw();
+		updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 	}
 }
 /**
@@ -3293,19 +3344,13 @@ public void setSingle(boolean single) {
 				}
 			}
 		}
-		Rectangle rectBefore = getClientArea();
-		updateItems();
-		Rectangle rectAfter = getClientArea();
-		if (!rectBefore.equals(rectAfter)) {
-			notifyListeners(SWT.Resize, new Event());
-		}
-		redraw();
+		updateFolder(REDRAW);
 	}
 }
 
 int getControlY(Point size, Rectangle[] rects, int borderBottom, int borderTop, int i) {
 	int center = fixedTabHeight != SWT.DEFAULT ? 0 : (tabHeight - rects[i].height)/2;
-	return onBottom ? size.y - 1 - borderBottom - tabHeight + center : 1 + borderTop + center;
+	return onBottom ? size.y - borderBottom - tabHeight + center : 1 + borderTop + center;
 }
 
 /**
@@ -3327,7 +3372,7 @@ public void setTabHeight(int height) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
 	fixedTabHeight = height;
-	updateTabHeight(false);
+	updateFolder(UPDATE_TAB_HEIGHT);
 }
 /**
  * Specify whether the tabs should appear along the top of the folder 
@@ -3350,14 +3395,7 @@ public void setTabPosition(int position) {
 	}
 	if (onBottom != (position == SWT.BOTTOM)) {
 		onBottom = position == SWT.BOTTOM;
-		updateTabHeight(true);
-		Rectangle rectBefore = getClientArea();
-		updateItems();
-		Rectangle rectAfter = getClientArea();
-		if (!rectBefore.equals(rectAfter)) {
-			notifyListeners(SWT.Resize, new Event());
-		}
-		redraw();
+		updateFolder(REDRAW);
 	}
 }
 /**
@@ -3371,7 +3409,7 @@ public void setTabPosition(int position) {
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the control is disposed, or not a child of this CTabFolder</li>
  * </ul>
  * 
  * @since 2.1
@@ -3400,7 +3438,7 @@ public void setTopRight(Control control) {
  * @exception SWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- *    <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this CTabFolder</li>
+ *    <li>ERROR_INVALID_ARGUMENT - if the control is disposed, or not a child of this CTabFolder</li>
  * </ul>
  * 
  * @since 3.0
@@ -3410,18 +3448,16 @@ public void setTopRight(Control control, int alignment) {
 	if (alignment != SWT.RIGHT && alignment != SWT.FILL && alignment != (SWT.RIGHT | SWT.WRAP)) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
-	if (control != null && control.getParent() != this) {
+	if (control != null && (control.isDisposed() || control.getParent() != this)) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
 	if (topRight == control && topRightAlignment == alignment) return;
-	if (topRight != null) removeTabControl(topRight, false);
+	if (topRight != null && !topRight.isDisposed()) removeTabControl(topRight, false);
 	topRight = control;
 	topRightAlignment = alignment;
 	alignment &= ~SWT.RIGHT;
 	if (control != null) addTabControl(control, SWT.TRAIL | alignment, -1, false);
-	updateTabHeight(false);
-	if (updateItems()) redraw();
-	updateBkImages();
+	updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 }
 
 
@@ -3443,8 +3479,7 @@ public void setUnselectedCloseVisible(boolean visible) {
 	if (showUnselectedClose == visible) return;
 	// display close button when mouse hovers
 	showUnselectedClose = visible;
-	updateItems();
-	redraw();
+	updateFolder(REDRAW);
 }
 /**
  * Specify whether the image appears on unselected tabs.
@@ -3463,8 +3498,7 @@ public void setUnselectedImageVisible(boolean visible) {
 	if (showUnselectedImage == visible) return;
 	// display image on unselected items
 	showUnselectedImage = visible;
-	updateItems();
-	redraw();
+	updateFolder(REDRAW);
 }
 /**
  * Shows the item.  If the item is already showing in the receiver,
@@ -3507,9 +3541,8 @@ public void showItem (CTabItem item) {
 		newPriority[0] = index;
 		priority = newPriority;
 	}
-	if (item.isShowing()) return;
-	updateItems(index);
-	redrawTabs();
+	if (item.showing) return;
+	updateFolder(REDRAW_TABS);
 }
 void showList (Rectangle rect) {
 	if (items.length == 0 || !showChevron) return;
@@ -3576,7 +3609,7 @@ boolean updateItems() {
 	return updateItems(selectedIndex);
 }
 
-boolean updateItems(int showIndex) {
+boolean updateItems (int showIndex) {
 	GC gc = new GC(this);
 	if (!single && !mru && showIndex != -1) {
 		// make sure selected item will be showing
@@ -3655,45 +3688,92 @@ boolean updateTabHeight(boolean force){
 	gc.dispose();
 	if (fixedTabHeight == SWT.DEFAULT && controls != null && controls.length > 0) {
 		for (int i = 0; i < controls.length; i++) {		
-			if ((controlAlignments[i] & SWT.WRAP) == 0 && controls[i].getVisible()) {
+			if ((controlAlignments[i] & SWT.WRAP) == 0 && !controls[i].isDisposed() && (controls[i].getVisible() || controls[i] == chevronTb)) {
 				int topHeight = controls[i].computeSize(SWT.DEFAULT, SWT.DEFAULT).y;
-				topHeight += renderer.computeTrim(CTabFolderRenderer.PART_HEADER, SWT.NONE, 0,0,0,0).height + 1;
+				topHeight +=  renderer.computeTrim(CTabFolderRenderer.PART_HEADER, SWT.NONE, 0,0,0,0).height + 1;
 				tabHeight = Math.max(topHeight, tabHeight);
 			}
 		}
 	}
 	if (!force && tabHeight == oldHeight) return false;
 	oldSize = null;
-	notifyListeners(SWT.Resize, new Event());
 	return true;
 }
 
+void updateFolder (int flags) {
+	updateFlags |= flags;
+	if (updateRun != null) return;
+	updateRun = new Runnable() {
+		public void run() {
+			updateRun = null;
+			if (isDisposed()) return;
+			runUpdate();
+		}
+	};
+	getDisplay().asyncExec(updateRun);
+}
+
+void runUpdate() {
+	if (updateFlags == 0) return; 
+	int flags = updateFlags;
+	updateFlags = 0;
+	Rectangle rectBefore = getClientArea();
+	updateTabHeight(false);
+	updateItems(selectedIndex);
+	if ((flags & REDRAW) != 0) {
+		redraw();
+	} else if ((flags & REDRAW_TABS) != 0) {
+		redrawTabs();
+	}
+	Rectangle rectAfter = getClientArea();
+	if (!rectBefore.equals(rectAfter)) {
+		notifyListeners(SWT.Resize, new Event());
+		layout();
+	}
+}
+
 void updateBkImages() {
 	if (controls != null && controls.length > 0) {
 		for (int i = 0; i < controls.length; i++) {
 			Control control = controls[i];
-			if (hovering) {
-				if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_NONE);
-				control.setBackgroundImage(null);
-				control.setBackground(getBackground());
-			} else {
-				if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_DEFAULT);
-				Rectangle bounds = control.getBounds();
-				if (bounds.y > getTabHeight() || gradientColors == null) {
+			if (!control.isDisposed()) {
+				if (hovering) {
+					if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_NONE);
 					control.setBackgroundImage(null);
 					control.setBackground(getBackground());
 				} else {
-					bounds.width = 10;
-					bounds.y = -bounds.y;
-					bounds.height -= 2*bounds.y - 1;
-					bounds.x = 0;
-					if (controlBkImages[i] != null) controlBkImages[i].dispose();
-					controlBkImages[i] = new Image(control.getDisplay(), bounds);
-					GC gc = new GC(controlBkImages[i]);
-					renderer.drawBackground(gc, bounds, 0);
-					gc.dispose();
-					control.setBackground(null);
-					control.setBackgroundImage(controlBkImages[i]);
+					if (control instanceof Composite) ((Composite) control).setBackgroundMode(SWT.INHERIT_DEFAULT);
+					Rectangle bounds = control.getBounds();
+					int tabHeight = getTabHeight();
+					int height = this.getSize().y;
+					boolean wrapped = onBottom ? bounds.y + bounds.height < height - tabHeight : bounds.y > tabHeight; 
+					if (wrapped || gradientColors == null) {
+						control.setBackgroundImage(null);
+						control.setBackground(getBackground());
+					} else {
+						bounds.width = 10;
+						if (!onBottom) {
+							bounds.y = -bounds.y;
+							bounds.height -= 2*bounds.y - 1;
+						} else {
+							Rectangle trim = renderer.computeTrim(CTabFolderRenderer.PART_BORDER, SWT.NONE, 0, 0, 0, 0);
+							int borderRight = trim.width + trim.x;
+							int borderLeft = -trim.x;
+							int borderBottom = trim.height + trim.y;
+							int borderTop = -trim.y;
+							int origY = bounds.y + bounds.height;
+							bounds.height += height - (bounds.y + bounds.height);
+							bounds.y = -1; 
+						}
+						bounds.x = 0;
+						if (controlBkImages[i] != null) controlBkImages[i].dispose();
+						controlBkImages[i] = new Image(control.getDisplay(), bounds);
+						GC gc = new GC(controlBkImages[i]);
+						renderer.drawBackground(gc, bounds, 0);
+						gc.dispose();
+						control.setBackground(null);
+						control.setBackgroundImage(controlBkImages[i]);
+					}
 				}
 			}
 		}
@@ -3790,9 +3870,7 @@ void addTabControl(Control control, int flags, int index, boolean update) {
 	controlAlignments[index] = flags;
 	controlRects[index] = new Rectangle(0, 0, 0, 0);
 	if (update) {
-		updateTabHeight(false);
-		if (updateItems()) redraw();
-		updateBkImages();
+		updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 	}
 }
 
@@ -3860,8 +3938,7 @@ void removeTabControl (Control control, boolean update) {
 		controlBkImages = newBkImages;
 	}
 	if (update) {
-		updateItems();
-		redraw();
+		updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 	}
 }
 
@@ -3895,7 +3972,6 @@ int getWrappedHeight (Point size) {
 	checkWidget();
 	if (chevronVisible == visible) return;
 	chevronVisible = visible;
-	updateItems();
-	redraw();
+	updateFolder(UPDATE_TAB_HEIGHT | REDRAW);
 }
 }
diff --git a/org/eclipse/swt/custom/CTabFolderAdapter.java b/org/eclipse/swt/custom/CTabFolderAdapter.java
index 85f210a..e20a581 100644
--- a/org/eclipse/swt/custom/CTabFolderAdapter.java
+++ b/org/eclipse/swt/custom/CTabFolderAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/CTabFolderEvent.java b/org/eclipse/swt/custom/CTabFolderEvent.java
index 99394bf..d97cdfe 100644
--- a/org/eclipse/swt/custom/CTabFolderEvent.java
+++ b/org/eclipse/swt/custom/CTabFolderEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/CTabFolderLayout.java b/org/eclipse/swt/custom/CTabFolderLayout.java
index 38998e8..592bf96 100644
--- a/org/eclipse/swt/custom/CTabFolderLayout.java
+++ b/org/eclipse/swt/custom/CTabFolderLayout.java
@@ -44,7 +44,7 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
 	if (wHint == SWT.DEFAULT) {
 		for (int i = 0; i < folder.controls.length; i++) {
 			Control control = folder.controls[i];
-			if (control.getVisible()) {
+			if (!control.isDisposed() && control.getVisible()) {
 				if ((folder.controlAlignments[i] & SWT.LEAD) != 0) {
 					leftControl = true;
 				} else {
@@ -83,7 +83,7 @@ protected Point computeSize(Composite composite, int wHint, int hHint, boolean f
 	int controlH = 0;
 	// preferred size of controls in tab items
 	for (int i = 0; i < items.length; i++) {
-		Control control = items[i].getControl();
+		Control control = items[i].control;
 		if (control != null && !control.isDisposed()){
 			Point size = control.computeSize (wHint, hHint, flushCache);
 			controlW = Math.max (controlW, size.x);
@@ -108,7 +108,7 @@ protected void layout(Composite composite, boolean flushCache) {
 	CTabFolder folder = (CTabFolder)composite;
 	// resize content
 	if (folder.selectedIndex != -1) {
-		Control control = folder.items[folder.selectedIndex].getControl();
+		Control control = folder.items[folder.selectedIndex].control;
 		if (control != null && !control.isDisposed()) {
 			control.setBounds(folder.getClientArea());
 		}
diff --git a/org/eclipse/swt/custom/CTabFolderListener.java b/org/eclipse/swt/custom/CTabFolderListener.java
index 4fdeab5..4d5f44e 100644
--- a/org/eclipse/swt/custom/CTabFolderListener.java
+++ b/org/eclipse/swt/custom/CTabFolderListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/CTabFolderRenderer.java b/org/eclipse/swt/custom/CTabFolderRenderer.java
index 95a2863..5ce5f40 100644
--- a/org/eclipse/swt/custom/CTabFolderRenderer.java
+++ b/org/eclipse/swt/custom/CTabFolderRenderer.java
@@ -96,13 +96,77 @@ public class CTabFolderRenderer {
 	static final String ELLIPSIS = "..."; //$NON-NLS-1$ 
 	
 	//Part constants
+	/**
+	 * Part constant indicating the body of the tab folder. The body is the
+	 * underlying container for all of the tab folder and all other parts are
+	 * drawn on top of it. (value is -1).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_BODY = -1;
+	/**
+	 * Part constant indicating the tab header of the folder (value is -2). The
+	 * header is drawn on top of the body and provides an area for the tabs and
+	 * other tab folder buttons to be rendered.
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_HEADER = -2;
+	/**
+	 * Part constant indicating the border of the tab folder. (value is -3). The
+	 * border is drawn around the body and is part of the body trim.
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_BORDER = -3;
+	/**
+	 * Part constant indicating the background of the tab folder. (value is -4).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_BACKGROUND = -4;
+	/**
+	 * Part constant indicating the maximize button of the tab folder. (value is
+	 * -5).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_MAX_BUTTON = -5;
+	/**
+	 * Part constant indicating the minimize button of the tab folder. (value is
+	 * -6).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_MIN_BUTTON = -6;
+	/**
+	 * Part constant indicating the chevron button of the tab folder. (value is
+	 * -7).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_CHEVRON_BUTTON = -7;
+	/**
+	 * Part constant indicating the close button of a tab item. (value is -8).
+	 *
+	 * @see #computeSize(int, int, GC, int, int)
+	 * @see #computeTrim(int, int, int, int, int, int)
+	 * @see #draw(int, int, Rectangle, GC)
+	 */
 	public static final int PART_CLOSE_BUTTON = -8;
 
 	public static final int MINIMUM_SIZE = 1 << 24; //TODO: Should this be a state?
@@ -1719,7 +1783,8 @@ public class CTabFolderRenderer {
 	}
 	
 	void updateCurves () {
-		if (this.getClass() != CTabFolderRenderer.class) return;
+		//Temp fix for Bug 384743
+		if (this.getClass().getName().equals("org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering")) return;
 		int tabHeight = parent.tabHeight;
 		if (tabHeight == lastTabHeight) return;
 		if (parent.onBottom) {
diff --git a/org/eclipse/swt/custom/CTabItem.java b/org/eclipse/swt/custom/CTabItem.java
index 1d1185d..0a98222 100644
--- a/org/eclipse/swt/custom/CTabItem.java
+++ b/org/eclipse/swt/custom/CTabItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -145,6 +145,7 @@ public void dispose() {
  */
 public Rectangle getBounds () {
 	//checkWidget();
+	parent.runUpdate();
 	return new Rectangle(x, y, width, height);
 }
 /**
@@ -296,7 +297,7 @@ public void setControl (Control control) {
 		    int selectedIndex = parent.getSelectionIndex();
 		    Control selectedControl = null;
 		    if (selectedIndex != -1) {
-		    	selectedControl = parent.getItem(selectedIndex).getControl();
+		    	selectedControl = parent.getItem(selectedIndex).control;
 		    }
 		    if (this.control != selectedControl) {
 		    	this.control.setVisible(false);
@@ -324,6 +325,9 @@ public void setDisabledImage (Image image) {
 	}
 	this.disabledImage = image;
 }
+boolean setFocus () {
+	return control != null && !control.isDisposed() && control.setFocus ();
+}
 /**
  * Sets the font that the receiver will use to paint textual information
  * for this item to the font specified by the argument, or to the default font
@@ -349,10 +353,7 @@ public void setFont (Font font){
 	if (font == null && this.font == null) return;
 	if (font != null && font.equals(this.font)) return;
 	this.font = font;
-	if (!parent.updateTabHeight(false)) {
-		parent.updateItems();
-		parent.redrawTabs();
-	}
+	parent.updateFolder(CTabFolder.UPDATE_TAB_HEIGHT | CTabFolder.REDRAW_TABS);
 }
 public void setImage (Image image) {
 	checkWidget();
@@ -363,47 +364,7 @@ public void setImage (Image image) {
 	if (image == null && oldImage == null) return;
 	if (image != null && image.equals(oldImage)) return;
 	super.setImage(image);
-	if (!parent.updateTabHeight(false)) {
-		// If image is the same size as before, 
-		// redraw only the image
-		if (oldImage != null && image != null) {
-			Rectangle oldBounds = oldImage.getBounds();
-			Rectangle bounds = image.getBounds();
-			if (bounds.width == oldBounds.width && bounds.height == oldBounds.height) {
-				if (showing) {
-					int index = parent.indexOf(this);
-					boolean selected = index == parent.selectedIndex;
-					if (selected || parent.showUnselectedImage) {
-						CTabFolderRenderer renderer = parent.renderer;
-						Rectangle trim = renderer.computeTrim(index, SWT.NONE, 0, 0, 0, 0);
-						int imageX = x - trim.x, maxImageWidth;
-						if (selected) {
-							GC gc = new GC(parent);
-							if (parent.single && (parent.showClose || showClose)) {
-								imageX += renderer.computeSize(CTabFolderRenderer.PART_CLOSE_BUTTON, SWT.NONE, gc, SWT.DEFAULT, SWT.DEFAULT).x; 
-							}
-							int rightEdge = Math.min (x + width, parent.getRightItemEdge(gc));
-							gc.dispose();
-							maxImageWidth = rightEdge - imageX - (trim.width + trim.x);
-							if (!parent.single && closeRect.width > 0) maxImageWidth -= closeRect.width + CTabFolderRenderer.INTERNAL_SPACING;
-						} else {
-							maxImageWidth = x + width - imageX  - (trim.width + trim.x);
-							if (parent.showUnselectedClose && (parent.showClose || showClose)) {
-								maxImageWidth -= closeRect.width + CTabFolderRenderer.INTERNAL_SPACING;
-							}
-						}
-						if (bounds.width < maxImageWidth) {
-							int imageY = y + (height - bounds.height) / 2 + (parent.onBottom ? -1 : 1);
-							parent.redraw(imageX, imageY, bounds.width, bounds.height, false);
-						}
-					}
-				}
-				return;
-			}
-		} 
-		parent.updateItems();
-		parent.redrawTabs();
-	}
+	parent.updateFolder(CTabFolder.UPDATE_TAB_HEIGHT | CTabFolder.REDRAW_TABS);
 }
 /**
  * Sets to <code>true</code> to indicate that the receiver's close button should be shown.
@@ -423,8 +384,7 @@ public void setShowClose(boolean close) {
 	checkWidget();
 	if (showClose == close) return;
 	showClose = close;
-	parent.updateItems();
-	parent.redrawTabs();
+	parent.updateFolder(CTabFolder.REDRAW_TABS);
 }
 public void setText (String string) {
 	checkWidget();
@@ -433,10 +393,7 @@ public void setText (String string) {
 	super.setText(string);
 	shortenedText = null;
 	shortenedTextWidth = 0;
-	if (!parent.updateTabHeight(false)) {
-		parent.updateItems();
-		parent.redrawTabs();
-	}
+	parent.updateFolder(CTabFolder.UPDATE_TAB_HEIGHT | CTabFolder.REDRAW_TABS);
 }
 /**
  * Sets the receiver's tool tip text to the argument, which
diff --git a/org/eclipse/swt/custom/ControlEditor.java b/org/eclipse/swt/custom/ControlEditor.java
index 9e7de3e..310462a 100644
--- a/org/eclipse/swt/custom/ControlEditor.java
+++ b/org/eclipse/swt/custom/ControlEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/ExtendedModifyEvent.java b/org/eclipse/swt/custom/ExtendedModifyEvent.java
index 3d42929..8191523 100644
--- a/org/eclipse/swt/custom/ExtendedModifyEvent.java
+++ b/org/eclipse/swt/custom/ExtendedModifyEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/ExtendedModifyListener.java b/org/eclipse/swt/custom/ExtendedModifyListener.java
index 86ca395..eea4d4c 100644
--- a/org/eclipse/swt/custom/ExtendedModifyListener.java
+++ b/org/eclipse/swt/custom/ExtendedModifyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/LineBackgroundEvent.java b/org/eclipse/swt/custom/LineBackgroundEvent.java
index 2337737..1f3c250 100644
--- a/org/eclipse/swt/custom/LineBackgroundEvent.java
+++ b/org/eclipse/swt/custom/LineBackgroundEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/LineBackgroundListener.java b/org/eclipse/swt/custom/LineBackgroundListener.java
index ebfac4d..49df4e3 100644
--- a/org/eclipse/swt/custom/LineBackgroundListener.java
+++ b/org/eclipse/swt/custom/LineBackgroundListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/LineStyleEvent.java b/org/eclipse/swt/custom/LineStyleEvent.java
index bfa853e..dde6f12 100644
--- a/org/eclipse/swt/custom/LineStyleEvent.java
+++ b/org/eclipse/swt/custom/LineStyleEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/LineStyleListener.java b/org/eclipse/swt/custom/LineStyleListener.java
index a6acfda..fd7ed84 100644
--- a/org/eclipse/swt/custom/LineStyleListener.java
+++ b/org/eclipse/swt/custom/LineStyleListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/PopupList.java b/org/eclipse/swt/custom/PopupList.java
index 4db6100..79c8bed 100644
--- a/org/eclipse/swt/custom/PopupList.java
+++ b/org/eclipse/swt/custom/PopupList.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/ScrolledComposite.java b/org/eclipse/swt/custom/ScrolledComposite.java
index f115784..fc7a513 100644
--- a/org/eclipse/swt/custom/ScrolledComposite.java
+++ b/org/eclipse/swt/custom/ScrolledComposite.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -113,6 +113,7 @@ public class ScrolledComposite extends Composite {
 	boolean expandVertical = false;
 	boolean alwaysShowScroll = false;
 	boolean showFocusedControl = false;
+	boolean showNextFocusedControl = true;
 
 /**
  * Constructs a new instance of this class given its parent
@@ -173,9 +174,18 @@ public ScrolledComposite(Composite parent, int style) {
 	
 	filter = new Listener() {
 		public void handleEvent(Event event) {
-			if (event.widget instanceof Control) {
-				Control control = (Control) event.widget;
-				if (contains(control)) showControl(control);
+			if (event.type == SWT.FocusIn) {
+				if (!showNextFocusedControl) {
+					showNextFocusedControl = true;
+				} else if (event.widget instanceof Control) {
+					Control control = (Control) event.widget;
+					if (contains(control)) showControl(control);
+				}
+			} else {
+				Widget w = event.widget;
+				if (w instanceof Control) {
+					showNextFocusedControl = w.getDisplay().getActiveShell() == ((Control) w).getShell(); 
+				}
 			}
 		}
 	};
@@ -183,6 +193,7 @@ public ScrolledComposite(Composite parent, int style) {
 	addDisposeListener(new DisposeListener() {
 		public void widgetDisposed(DisposeEvent e) {
 			getDisplay().removeFilter(SWT.FocusIn, filter);
+			getDisplay().removeFilter(SWT.FocusOut, filter);
 		}
 	});
 }
@@ -645,9 +656,11 @@ public void setShowFocusedControl(boolean show) {
 	if (showFocusedControl == show) return;
 	Display display = getDisplay();
 	display.removeFilter(SWT.FocusIn, filter);
+	display.removeFilter(SWT.FocusOut, filter);
 	showFocusedControl = show;
 	if (!showFocusedControl) return;
 	display.addFilter(SWT.FocusIn, filter);
+	display.addFilter(SWT.FocusOut, filter);
 	Control control = display.getFocusControl();
 	if (contains(control)) showControl(control);
 }
diff --git a/org/eclipse/swt/custom/ScrolledCompositeLayout.java b/org/eclipse/swt/custom/ScrolledCompositeLayout.java
index 0af0148..c99710d 100644
--- a/org/eclipse/swt/custom/ScrolledCompositeLayout.java
+++ b/org/eclipse/swt/custom/ScrolledCompositeLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -78,9 +78,12 @@ protected void layout(Composite composite, boolean flushCache) {
 		contentRect.height = Math.max(sc.minHeight, hostRect.height);
 	}
 
+	GC gc = new GC (sc);
 	if (hBar != null) {
 		hBar.setMaximum (contentRect.width);
 		hBar.setThumb (Math.min (contentRect.width, hostRect.width));
+		hBar.setIncrement (gc.getFontMetrics ().getAverageCharWidth ());
+		hBar.setPageIncrement (hostRect.width);
 		int hPage = contentRect.width - hostRect.width;
 		int hSelection = hBar.getSelection ();
 		if (hSelection >= hPage) {
@@ -95,6 +98,8 @@ protected void layout(Composite composite, boolean flushCache) {
 	if (vBar != null) {
 		vBar.setMaximum (contentRect.height);
 		vBar.setThumb (Math.min (contentRect.height, hostRect.height));
+		vBar.setIncrement (gc.getFontMetrics ().getHeight ());
+		vBar.setPageIncrement (hostRect.height);
 		int vPage = contentRect.height - hostRect.height;
 		int vSelection = vBar.getSelection ();
 		if (vSelection >= vPage) {
@@ -105,6 +110,7 @@ protected void layout(Composite composite, boolean flushCache) {
 			contentRect.y = -vSelection;
 		}
 	}
+	gc.dispose ();
 	
 	sc.content.setBounds (contentRect);
 	inLayout = false;
diff --git a/org/eclipse/swt/custom/StackLayout.java b/org/eclipse/swt/custom/StackLayout.java
index afa0ad5..275d260 100644
--- a/org/eclipse/swt/custom/StackLayout.java
+++ b/org/eclipse/swt/custom/StackLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/StyleRange.java b/org/eclipse/swt/custom/StyleRange.java
index 76469db..492f27a 100644
--- a/org/eclipse/swt/custom/StyleRange.java
+++ b/org/eclipse/swt/custom/StyleRange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/StyledText.java b/org/eclipse/swt/custom/StyledText.java
index 41a9db9..b790cdf 100644
--- a/org/eclipse/swt/custom/StyledText.java
+++ b/org/eclipse/swt/custom/StyledText.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -247,7 +247,7 @@ public class StyledText extends Canvas {
 		fontData = styledText.getFont().getFontData()[0];
 		tabLength = styledText.tabLength;
 		int lineCount = printerRenderer.lineCount;
-		if (styledText.isListening(ST.LineGetBackground) || (styledText.isBidi() && styledText.isListening(ST.LineGetSegments)) || styledText.isListening(ST.LineGetStyle)) {
+		if (styledText.isListening(ST.LineGetBackground) || (styledText.isListening(ST.LineGetSegments)) || styledText.isListening(ST.LineGetStyle)) {
 			StyledTextContent content = printerRenderer.content;
 			for (int i = 0; i < lineCount; i++) {
 				String line = content.getLine(i);
@@ -256,12 +256,10 @@ public class StyledText extends Canvas {
 				if (event != null && event.lineBackground != null) {
 					printerRenderer.setLineBackground(i, 1, event.lineBackground);
 				}
-				if (styledText.isBidi()) {
-					event = styledText.getBidiSegments(lineOffset, line);
-					if (event != null) {
-						printerRenderer.setLineSegments(i, 1, event.segments);
-						printerRenderer.setLineSegmentChars(i, 1, event.segmentsChars);
-					}
+				event = styledText.getBidiSegments(lineOffset, line);
+				if (event != null) {
+					printerRenderer.setLineSegments(i, 1, event.segments);
+					printerRenderer.setLineSegmentChars(i, 1, event.segmentsChars);
 				}
 				event = styledText.getLineStyleData(lineOffset, line);
 				if (event != null) {
@@ -1289,12 +1287,12 @@ public void addExtendedModifyListener(ExtendedModifyListener extendedModifyListe
  * Adds a bidirectional segment listener.
  * <p>
  * A BidiSegmentEvent is sent 
- * whenever a line of text is measured or rendered. The user can 
+ * whenever a line of text is measured or rendered. You can 
  * specify text ranges in the line that should be treated as if they 
  * had a different direction than the surrounding text.
  * This may be used when adjacent segments of right-to-left text should
  * not be reordered relative to each other. 
- * E.g., Multiple Java string literals in a right-to-left language
+ * E.g., multiple Java string literals in a right-to-left language
  * should generally remain in logical order to each other, that is, the
  * way they are stored. 
  * </p>
@@ -1314,6 +1312,9 @@ public void addBidiSegmentListener(BidiSegmentListener listener) {
 	checkWidget();
 	if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	addListener(ST.LineGetSegments, new StyledTextListener(listener));
+	resetCache(0, content.getLineCount());
+	setCaretLocation();
+	super.redraw();
 }
 /**
  * Adds a caret listener. CaretEvent is sent when the caret offset changes.
@@ -2306,6 +2307,12 @@ void doBlockColumn(boolean next) {
 		showLocation(rect, true);
 	}
 }
+void doBlockContentStartEnd(boolean end) {
+	if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
+	int offset = end ? content.getCharCount() : 0;
+	setBlockSelectionOffset(offset, true);
+	showCaret();
+}
 void doBlockWord(boolean next) {
 	if (blockXLocation == -1) setBlockSelectionOffset(caretOffset, false);
 	int x = blockXLocation - horizontalScrollOffset;
@@ -4766,7 +4773,6 @@ public String getSelectionText() {
 	return content.getTextRange(selection.x, selection.y - selection.x);
 }
 StyledTextEvent getBidiSegments(int lineOffset, String line) {
-	if (!isBidi()) return null;
 	if (!isListening(ST.LineGetSegments)) {
 		StyledTextEvent event = new StyledTextEvent(content);
 		event.segments = getBidiSegmentsCompatibility(line, lineOffset);
@@ -4779,8 +4785,9 @@ StyledTextEvent getBidiSegments(int lineOffset, String line) {
 	if (segments[0] > lineLength) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
+	boolean hasSegmentsChars = event.segmentsChars != null;
 	for (int i = 1; i < segments.length; i++) {
-		if (segments[i] <= segments[i - 1] || segments[i] > lineLength) {
+		if ((hasSegmentsChars ? segments[i] < segments[i - 1] : segments[i] <= segments[i - 1]) || segments[i] > lineLength) {
 			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 		}
 	}
@@ -5766,14 +5773,28 @@ void handleCompositionOffset (Event event) {
 	event.count = trailing[0];
 }
 void handleCompositionSelection (Event event) {
-	event.start = selection.x;
-	event.end = selection.y;
-	event.text = getSelectionText();
+	if (event.start != event.end) {
+		int charCount = getCharCount();
+		event.start = Math.max(0, Math.min(event.start, charCount));
+		event.end = Math.max(0, Math.min(event.end, charCount));
+		if (event.text != null) {
+			setSelection(event.start, event.end);
+		} else {
+			event.text = getTextRange(event.start, event.end - event.start);
+		}
+	} else {
+		event.start = selection.x;
+		event.end = selection.y;
+		event.text = getSelectionText();
+	}
 }
 void handleCompositionChanged(Event event) {
 	String text = event.text;
 	int start = event.start;
 	int end = event.end;
+	int charCount = content.getCharCount();
+	start = Math.min(start, charCount);
+	end = Math.min(end, charCount);
 	int length = text.length();
 	if (length == ime.getCommitCount()) {
 		content.replaceTextRange(start, end - start, "");
@@ -5922,6 +5943,7 @@ void handleKeyDown(Event event) {
 		clipboardSelection = new Point(selection.x, selection.y);
 	}
 	newOrientation = SWT.NONE;
+	event.stateMask &= SWT.MODIFIER_MASK;
 	
 	Event verifyEvent = new Event();
 	verifyEvent.character = event.character;
@@ -7053,10 +7075,14 @@ boolean invokeBlockAction(int action) {
 			return true;
 		case ST.SELECT_ALL:
 			return false;
-		case ST.SELECT_PAGE_UP:
-		case ST.SELECT_PAGE_DOWN:
 		case ST.SELECT_TEXT_START:
+			doBlockContentStartEnd(false);
+			break;
 		case ST.SELECT_TEXT_END:
+			doBlockContentStartEnd(true);
+			break;
+		case ST.SELECT_PAGE_UP:
+		case ST.SELECT_PAGE_DOWN:
 		case ST.SELECT_WINDOW_START:
 		case ST.SELECT_WINDOW_END:
 			//blocked actions
@@ -7080,12 +7106,6 @@ boolean invokeBlockAction(int action) {
 	}
 	return false;
 }
-/**
- * Temporary until SWT provides this
- */
-boolean isBidi() {
-	return IS_GTK || IS_MAC || BidiUtil.isBidiPlatform() || isMirrored();
-}
 boolean isBidiCaret() {
 	return BidiUtil.isBidiPlatform();
 }
@@ -7489,6 +7509,9 @@ public void removeBidiSegmentListener(BidiSegmentListener listener) {
 	checkWidget();
 	if (listener == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	removeListener(ST.LineGetSegments, listener);	
+	resetCache(0, content.getLineCount());
+	setCaretLocation();
+	super.redraw();
 }
 /**
  * Removes the specified caret listener.
@@ -9502,7 +9525,11 @@ void setSelection(int start, int length, boolean sendEvent, boolean doBlock) {
 		(length > 0 && selectionAnchor != selection.x) || 
 		(length < 0 && selectionAnchor != selection.y)) {
 		if (blockSelection && doBlock) {
-			setBlockSelectionOffset(start, end, sendEvent);
+			if (length < 0) {
+				setBlockSelectionOffset(end, start, sendEvent);
+			} else {
+				setBlockSelectionOffset(start, end, sendEvent);
+			}
 		} else {
 			clearSelection(sendEvent);
 			if (length < 0) {
diff --git a/org/eclipse/swt/custom/StyledTextContent.java b/org/eclipse/swt/custom/StyledTextContent.java
index 0e6728c..86b3e01 100644
--- a/org/eclipse/swt/custom/StyledTextContent.java
+++ b/org/eclipse/swt/custom/StyledTextContent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/StyledTextRenderer.java b/org/eclipse/swt/custom/StyledTextRenderer.java
index f3ce6d2..c604b06 100644
--- a/org/eclipse/swt/custom/StyledTextRenderer.java
+++ b/org/eclipse/swt/custom/StyledTextRenderer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -941,6 +941,7 @@ TextLayout getTextLayout(int lineIndex, int orientation, int width, int lineSpac
 							int end = imeRanges[i*2+1] - lineOffset;
 							TextStyle imeStyle = imeStyles[i], userStyle;
 							for (int j = start; j <= end; j++) {
+								if (!(0 <= j && j < length)) break;
 								userStyle = layout.getStyle(j);
 								if (userStyle == null && j > 0) userStyle = layout.getStyle(j - 1);
 								if (userStyle == null && j + 1 < length) userStyle = layout.getStyle(j + 1);
diff --git a/org/eclipse/swt/custom/TableEditor.java b/org/eclipse/swt/custom/TableEditor.java
index 05278af..3e9a690 100644
--- a/org/eclipse/swt/custom/TableEditor.java
+++ b/org/eclipse/swt/custom/TableEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TableTree.java b/org/eclipse/swt/custom/TableTree.java
index 4ac4da4..9259ceb 100644
--- a/org/eclipse/swt/custom/TableTree.java
+++ b/org/eclipse/swt/custom/TableTree.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TableTreeEditor.java b/org/eclipse/swt/custom/TableTreeEditor.java
index 792527b..ea33a69 100644
--- a/org/eclipse/swt/custom/TableTreeEditor.java
+++ b/org/eclipse/swt/custom/TableTreeEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TableTreeItem.java b/org/eclipse/swt/custom/TableTreeItem.java
index 83c2fc8..8abde81 100644
--- a/org/eclipse/swt/custom/TableTreeItem.java
+++ b/org/eclipse/swt/custom/TableTreeItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TextChangeListener.java b/org/eclipse/swt/custom/TextChangeListener.java
index a7c53a8..fd1b880 100644
--- a/org/eclipse/swt/custom/TextChangeListener.java
+++ b/org/eclipse/swt/custom/TextChangeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TextChangedEvent.java b/org/eclipse/swt/custom/TextChangedEvent.java
index 0cacf8a..4542726 100644
--- a/org/eclipse/swt/custom/TextChangedEvent.java
+++ b/org/eclipse/swt/custom/TextChangedEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TextChangingEvent.java b/org/eclipse/swt/custom/TextChangingEvent.java
index cf109a2..fb681a4 100644
--- a/org/eclipse/swt/custom/TextChangingEvent.java
+++ b/org/eclipse/swt/custom/TextChangingEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/TreeEditor.java b/org/eclipse/swt/custom/TreeEditor.java
index de4f7b2..abaf4d0 100644
--- a/org/eclipse/swt/custom/TreeEditor.java
+++ b/org/eclipse/swt/custom/TreeEditor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/VerifyKeyListener.java b/org/eclipse/swt/custom/VerifyKeyListener.java
index 6d308ae..2e9351e 100644
--- a/org/eclipse/swt/custom/VerifyKeyListener.java
+++ b/org/eclipse/swt/custom/VerifyKeyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/custom/ViewForm.java b/org/eclipse/swt/custom/ViewForm.java
index 55c1915..c601ac0 100644
--- a/org/eclipse/swt/custom/ViewForm.java
+++ b/org/eclipse/swt/custom/ViewForm.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/ByteArrayTransfer.java b/org/eclipse/swt/dnd/ByteArrayTransfer.java
index 6620e74..11f1804 100644
--- a/org/eclipse/swt/dnd/ByteArrayTransfer.java
+++ b/org/eclipse/swt/dnd/ByteArrayTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/Clipboard.java b/org/eclipse/swt/dnd/Clipboard.java
index 541830f..9155d93 100644
--- a/org/eclipse/swt/dnd/Clipboard.java
+++ b/org/eclipse/swt/dnd/Clipboard.java
@@ -313,13 +313,20 @@ public Object getContents(Transfer transfer, int clipboards) {
 		}
 	}
 	if (selection_data == 0) return null;
-	GtkSelectionData gtkSelectionData = new GtkSelectionData();
-	OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
 	TransferData tdata = new TransferData();
-	tdata.type = gtkSelectionData.type;
-	tdata.pValue = gtkSelectionData.data;
-	tdata.length = gtkSelectionData.length;
-	tdata.format = gtkSelectionData.format;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+		tdata.type = OS.gtk_selection_data_get_data_type(selection_data);
+		tdata.pValue = OS.gtk_selection_data_get_data(selection_data);
+		tdata.length = OS.gtk_selection_data_get_length(selection_data);
+		tdata.format = OS.gtk_selection_data_get_format(selection_data);
+	} else {
+		GtkSelectionData gtkSelectionData = new GtkSelectionData();
+		OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+		tdata.type = gtkSelectionData.type;
+		tdata.pValue = gtkSelectionData.data;
+		tdata.length = gtkSelectionData.length;
+		tdata.format = gtkSelectionData.format;
+	}
 	Object result = transfer.nativeToJava(tdata);
 	OS.gtk_selection_data_free(selection_data);
 	return result;
@@ -602,11 +609,23 @@ private  int[] getAvailablePrimaryTypes() {
 	OS.gdk_threads_leave();
 	if (selection_data != 0) {
 		try {
-			GtkSelectionData gtkSelectionData = new GtkSelectionData();
-			OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
-			if (gtkSelectionData.length != 0) {
-				types = new int[gtkSelectionData.length * 8 / gtkSelectionData.format];
-				OS.memmove(types, gtkSelectionData.data, gtkSelectionData.length);
+			int length;
+			int format;
+			int /*long*/ data;
+			if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+				length = OS.gtk_selection_data_get_length(selection_data);
+				format = OS.gtk_selection_data_get_format(selection_data);
+				data = OS.gtk_selection_data_get_data(selection_data);
+			} else {
+				GtkSelectionData gtkSelectionData = new GtkSelectionData();
+				OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+				length = gtkSelectionData.length;
+				format = gtkSelectionData.format;
+				data = gtkSelectionData.data;
+			}
+			if (length != 0) {
+				types = new int[length * 8 / format];
+				OS.memmove(types, data, length);
 			}
 		} finally {
 			OS.gtk_selection_data_free(selection_data);
@@ -626,11 +645,23 @@ private int[] getAvailableClipboardTypes () {
 	OS.gdk_threads_leave();
 	if (selection_data != 0) {
 		try {
-			GtkSelectionData gtkSelectionData = new GtkSelectionData();
-			OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
-			if (gtkSelectionData.length != 0) {
-				types = new int[gtkSelectionData.length * 8 / gtkSelectionData.format];
-				OS.memmove(types, gtkSelectionData.data, gtkSelectionData.length);
+			int length;
+			int format;
+			int /*long*/ data;
+			if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+				length = OS.gtk_selection_data_get_length(selection_data);
+				format = OS.gtk_selection_data_get_format(selection_data);
+				data = OS.gtk_selection_data_get_data(selection_data);
+			} else {
+				GtkSelectionData gtkSelectionData = new GtkSelectionData();
+				OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+				length = gtkSelectionData.length;
+				format = gtkSelectionData.format;
+				data = gtkSelectionData.data;
+			}
+			if (length != 0) {
+				types = new int[length * 8 / format];
+				OS.memmove(types, data, length);
 			}
 		} finally {
 			OS.gtk_selection_data_free(selection_data);
diff --git a/org/eclipse/swt/dnd/ClipboardProxy.java b/org/eclipse/swt/dnd/ClipboardProxy.java
index c03768f..a7ce112 100644
--- a/org/eclipse/swt/dnd/ClipboardProxy.java
+++ b/org/eclipse/swt/dnd/ClipboardProxy.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -89,18 +89,10 @@ int /*long*/ clearFunc(int /*long*/ clipboard,int /*long*/ user_data_or_owner){
 void dispose () {
 	if (display == null) return;
 	if (activeClipboard != null) {
-		if (OS.GTK_VERSION >= OS.VERSION(2, 6, 0)) {
-			OS.gtk_clipboard_store(Clipboard.GTKCLIPBOARD);
-		} else {
-			OS.gtk_clipboard_clear(Clipboard.GTKCLIPBOARD);
-		}
+		OS.gtk_clipboard_store(Clipboard.GTKCLIPBOARD);
 	}
 	if (activePrimaryClipboard != null) {
-		if (OS.GTK_VERSION >= OS.VERSION(2, 6, 0)) {
-			OS.gtk_clipboard_store(Clipboard.GTKPRIMARYCLIPBOARD);
-		} else {
-			OS.gtk_clipboard_clear(Clipboard.GTKPRIMARYCLIPBOARD);
-		}
+		OS.gtk_clipboard_store(Clipboard.GTKPRIMARYCLIPBOARD);
 	}
 	display = null;
 	if (getFunc != null ) getFunc.dispose();
@@ -121,10 +113,16 @@ void dispose () {
  */
 int /*long*/ getFunc(int /*long*/ clipboard, int /*long*/ selection_data, int /*long*/ info, int /*long*/ user_data_or_owner){
 	if (selection_data == 0) return 0;
-	GtkSelectionData selectionData = new GtkSelectionData();
-	OS.memmove(selectionData, selection_data, GtkSelectionData.sizeof);
+	int /*long*/ target;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+		target = OS.gtk_selection_data_get_target(selection_data);
+	} else {
+		GtkSelectionData selectionData = new GtkSelectionData();
+		OS.memmove(selectionData, selection_data, GtkSelectionData.sizeof);
+		target = selectionData.target;
+	}
 	TransferData tdata = new TransferData();
-	tdata.type = selectionData.target;
+	tdata.type = target;
 	Transfer[] types = (clipboard == Clipboard.GTKCLIPBOARD) ? clipboardDataTypes : primaryClipboardDataTypes;
 	int index = -1;
 	for (int i = 0; i < types.length; i++) {
@@ -190,9 +188,7 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
 			if (!OS.gtk_clipboard_set_with_owner (Clipboard.GTKCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
 				return false;
 			}
-			if (OS.GTK_VERSION >= OS.VERSION(2, 6, 0)) {
-				OS.gtk_clipboard_set_can_store(Clipboard.GTKCLIPBOARD, 0, 0);
-			}
+			OS.gtk_clipboard_set_can_store(Clipboard.GTKCLIPBOARD, 0, 0);
 			activeClipboard = owner;
 		}
 		if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) {
@@ -203,9 +199,7 @@ boolean setData(Clipboard owner, Object[] data, Transfer[] dataTypes, int clipbo
 			if (!OS.gtk_clipboard_set_with_owner (Clipboard.GTKPRIMARYCLIPBOARD, pTargetsList, entries.length, getFuncProc, clearFuncProc, clipboardOwner)) {
 				return false;
 			}
-			if (OS.GTK_VERSION >= OS.VERSION(2, 6, 0)) {
-				OS.gtk_clipboard_set_can_store(Clipboard.GTKPRIMARYCLIPBOARD, 0, 0);
-			}
+			OS.gtk_clipboard_set_can_store(Clipboard.GTKPRIMARYCLIPBOARD, 0, 0);
 			activePrimaryClipboard = owner;
 		}
 		return true;
diff --git a/org/eclipse/swt/dnd/DND.java b/org/eclipse/swt/dnd/DND.java
index 0cfec0a..daa47bc 100644
--- a/org/eclipse/swt/dnd/DND.java
+++ b/org/eclipse/swt/dnd/DND.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DNDEvent.java b/org/eclipse/swt/dnd/DNDEvent.java
index b74fd27..f2a9ba8 100644
--- a/org/eclipse/swt/dnd/DNDEvent.java
+++ b/org/eclipse/swt/dnd/DNDEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DNDListener.java b/org/eclipse/swt/dnd/DNDListener.java
index 9c57173..a7ab3ee 100644
--- a/org/eclipse/swt/dnd/DNDListener.java
+++ b/org/eclipse/swt/dnd/DNDListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DragSource.java b/org/eclipse/swt/dnd/DragSource.java
index 87113a3..079b38a 100644
--- a/org/eclipse/swt/dnd/DragSource.java
+++ b/org/eclipse/swt/dnd/DragSource.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -299,9 +299,13 @@ void drag(Event dragEvent) {
 	Image image = event.image; 
 	int /*long*/ context = OS.gtk_drag_begin(control.handle, targetList, actions, 1, 0);
 	if (context != 0 && image != null) {
-		int /*long*/ pixbuf = ImageList.createPixbuf(image);
-		OS.gtk_drag_set_icon_pixbuf(context, pixbuf, 0, 0);
-		OS.g_object_unref(pixbuf);
+		if (OS.GTK3) {
+			OS.gtk_drag_set_icon_surface(context, image.surface);
+		} else {
+			int /*long*/ pixbuf = ImageList.createPixbuf(image);
+			OS.gtk_drag_set_icon_pixbuf(context, pixbuf, 0, 0);
+			OS.g_object_unref(pixbuf);
+		}
 	}
 }
 
@@ -315,18 +319,36 @@ void dragEnd(int /*long*/ widget, int /*long*/ context){
 	 * NOTE: We believe that it is never an error to ungrab when
 	 * a drag is finished.
 	 */
-	OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME); 
-	OS.gdk_keyboard_ungrab(OS.GDK_CURRENT_TIME);
+	if (OS.GTK3) {
+		int /*long*/ display = OS.gdk_window_get_display(OS.gtk_widget_get_window(widget));
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager(display);
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer(device_manager);
+		int /*long*/ keyboard = OS.gdk_device_get_associated_device(pointer);
+		OS.gdk_device_ungrab(pointer, OS.GDK_CURRENT_TIME);
+		OS.gdk_device_ungrab(keyboard, OS.GDK_CURRENT_TIME);
+	} else {
+		OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME);
+		OS.gdk_keyboard_ungrab(OS.GDK_CURRENT_TIME);
+	}
 	
 	int operation = DND.DROP_NONE;
 	if (context != 0) {
-		GdkDragContext gdkDragContext = new GdkDragContext ();
-		OS.memmove(gdkDragContext, context, GdkDragContext.sizeof);
-		if (gdkDragContext.dest_window != 0) { //NOTE: if dest_window is 0, drag was aborted
+		int /*long*/ dest_window = 0;
+		int action = 0;
+		if (OS.GTK3) {
+			dest_window = OS.gdk_drag_context_get_dest_window(context);
+			action = OS.gdk_drag_context_get_selected_action(context);
+		} else {
+			GdkDragContext gdkDragContext = new GdkDragContext ();
+			OS.memmove(gdkDragContext, context, GdkDragContext.sizeof);
+			dest_window = gdkDragContext.dest_window;
+			action = gdkDragContext.action;
+		}
+		if (dest_window != 0) { //NOTE: if dest_window is 0, drag was aborted
 			if (moveData) {
 				operation = DND.DROP_MOVE;
 			} else {
-				operation = osOpToOp(gdkDragContext.action);
+				operation = osOpToOp(action);
 				if (operation == DND.DROP_MOVE) operation = DND.DROP_NONE;
 			}
 		}
@@ -343,15 +365,30 @@ void dragEnd(int /*long*/ widget, int /*long*/ context){
 
 void dragGetData(int /*long*/ widget, int /*long*/ context, int /*long*/ selection_data,  int info, int time){
 	if (selection_data == 0) return;	
-	GtkSelectionData gtkSelectionData = new GtkSelectionData();
-	OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
-	if (gtkSelectionData.target == 0) return;
+	int length;
+	int format;
+	int /*long*/ data;
+	int /*long*/ target;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+		length = OS.gtk_selection_data_get_length(selection_data);
+		format = OS.gtk_selection_data_get_format(selection_data);
+		data = OS.gtk_selection_data_get_data(selection_data);
+		target = OS.gtk_selection_data_get_target(selection_data);
+	} else {
+		GtkSelectionData gtkSelectionData = new GtkSelectionData();
+		OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+		length = gtkSelectionData.length;
+		format = gtkSelectionData.format;
+		data = gtkSelectionData.data;
+		target = gtkSelectionData.target;
+	}
+	if (target == 0) return;
 	
 	TransferData transferData = new TransferData();
-	transferData.type = gtkSelectionData.target;
-	transferData.pValue = gtkSelectionData.data;
-	transferData.length = gtkSelectionData.length;
-	transferData.format = gtkSelectionData.format;
+	transferData.type = target;
+	transferData.pValue = data;
+	transferData.length = length;
+	transferData.format = format;
 		
 	DNDEvent event = new DNDEvent();
 	event.widget = this;
diff --git a/org/eclipse/swt/dnd/DragSourceAdapter.java b/org/eclipse/swt/dnd/DragSourceAdapter.java
index 662b957..2f0e01d 100644
--- a/org/eclipse/swt/dnd/DragSourceAdapter.java
+++ b/org/eclipse/swt/dnd/DragSourceAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DragSourceEvent.java b/org/eclipse/swt/dnd/DragSourceEvent.java
index 9336768..6a156fb 100644
--- a/org/eclipse/swt/dnd/DragSourceEvent.java
+++ b/org/eclipse/swt/dnd/DragSourceEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DragSourceListener.java b/org/eclipse/swt/dnd/DragSourceListener.java
index 0ce0aa7..0882d2f 100644
--- a/org/eclipse/swt/dnd/DragSourceListener.java
+++ b/org/eclipse/swt/dnd/DragSourceListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DropTarget.java b/org/eclipse/swt/dnd/DropTarget.java
index c9cc25a..1f79968 100644
--- a/org/eclipse/swt/dnd/DropTarget.java
+++ b/org/eclipse/swt/dnd/DropTarget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -332,9 +332,9 @@ protected void checkSubclass () {
 	}
 }
 
-void drag_data_received ( int /*long*/ widget, int /*long*/ context, int x, int y, int /*long*/ data, int info, int time){
+void drag_data_received ( int /*long*/ widget, int /*long*/ context, int x, int y, int /*long*/ selection_data, int info, int time){
 	DNDEvent event = new DNDEvent();
-	if (data == 0 || !setEventData(context, x, y, time, event)) {
+	if (selection_data == 0 || !setEventData(context, x, y, time, event)) {
 		keyOperation = -1;
 		return;
 	}
@@ -345,13 +345,28 @@ void drag_data_received ( int /*long*/ widget, int /*long*/ context, int x, int
 	// Get data in a Java format	
 	Object object = null;
 	TransferData transferData = new TransferData();
-	GtkSelectionData selectionData = new GtkSelectionData(); 
-	OS.memmove(selectionData, data, GtkSelectionData.sizeof);
-	if (selectionData.data != 0) {
-		transferData.type = selectionData.type;
-		transferData.length = selectionData.length;
-		transferData.pValue = selectionData.data;
-		transferData.format = selectionData.format;
+	int length;
+	int format;
+	int /*long*/ data;
+	int /*long*/ type;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)) {
+		length = OS.gtk_selection_data_get_length(selection_data);
+		format = OS.gtk_selection_data_get_format(selection_data);
+		data = OS.gtk_selection_data_get_data(selection_data);
+		type = OS.gtk_selection_data_get_data_type(selection_data);
+	} else {
+		GtkSelectionData gtkSelectionData = new GtkSelectionData();
+		OS.memmove(gtkSelectionData, selection_data, GtkSelectionData.sizeof);
+		length = gtkSelectionData.length;
+		format = gtkSelectionData.format;
+		data = gtkSelectionData.data;
+		type = gtkSelectionData.type;
+	}
+	if (data != 0) {
+		transferData.type = type;
+		transferData.length = length;
+		transferData.pValue = data;
+		transferData.format = format;
 		for (int i = 0; i < transferAgents.length; i++) {
 			Transfer transfer = transferAgents[i];
 			if (transfer != null && transfer.isSupportedType(transferData)) {
@@ -569,7 +584,14 @@ public DropTargetEffect getDropTargetEffect() {
 
 int getOperationFromKeyState() {
 	int[] state = new int[1];
-	OS.gdk_window_get_pointer(0, null, null, state);
+	if (OS.GTK3) {
+		int /*long*/ root = OS.gdk_get_default_root_window ();
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (OS.gdk_window_get_display (root));
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager);
+		OS.gdk_window_get_device_position(root, pointer, null, null, state);
+	} else {
+		OS.gdk_window_get_pointer(0, null, null, state);
+	}
 	boolean ctrl = (state[0] & OS.GDK_CONTROL_MASK) != 0;
 	boolean shift = (state[0] & OS.GDK_SHIFT_MASK) != 0;
 	if (ctrl && shift) return DND.DROP_LINK;
@@ -730,13 +752,22 @@ public void setDropTargetEffect(DropTargetEffect effect) {
 
 boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent event) {
 	if (context == 0) return false;
-	GdkDragContext dragContext = new GdkDragContext();
-	OS.memmove(dragContext, context, GdkDragContext.sizeof);
-	if (dragContext.targets == 0) return false;
+	int /*long*/ targets = 0;
+	int actions = 0;
+	if (OS.GTK3) {
+		targets = OS.gdk_drag_context_list_targets(context);
+		actions = OS.gdk_drag_context_get_actions(context);
+	} else {
+		GdkDragContext dragContext = new GdkDragContext();
+		OS.memmove(dragContext, context, GdkDragContext.sizeof);
+		targets = dragContext.targets;
+		actions = dragContext.actions;
+	}
+	if (targets == 0) return false;
 	
 	// get allowed operations
 	int style = getStyle();
-	int operations = osOpToOp(dragContext.actions) & style;
+	int operations = osOpToOp(actions) & style;
 	if (operations == DND.DROP_NONE) return false;
 	
 	// get current operation
@@ -751,14 +782,12 @@ boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent even
 	}
 
 	// Get allowed transfer types
-	int length = OS.g_list_length(dragContext.targets);
+	int length = OS.g_list_length(targets);
 	TransferData[] dataTypes = new TransferData[0];
 	for (int i = 0; i < length; i++) {
-		int /*long*/ pData = OS.g_list_nth(dragContext.targets, i);
-		GtkTargetPair gtkTargetPair = new GtkTargetPair();
-		OS.memmove(gtkTargetPair, pData, GtkTargetPair.sizeof);
+		int /*long*/ pData = OS.g_list_nth_data(targets, i);
 		TransferData data = new TransferData();
-		data.type = gtkTargetPair.target;
+		data.type = pData;
 		for (int j = 0; j < transferAgents.length; j++) {
 			Transfer transfer = transferAgents[j];
 			if (transfer != null && transfer.isSupportedType(data)) {
@@ -771,8 +800,12 @@ boolean setEventData(int /*long*/ context, int x, int y, int time, DNDEvent even
 		}
 	}
 	if (dataTypes.length == 0) return false;
-
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW(control.handle);
+	int /*long*/ window;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+		window = OS.gtk_widget_get_window (control.handle);
+	} else {
+		window = OS.GTK_WIDGET_WINDOW(control.handle);
+	}
 	int [] origin_x = new int[1], origin_y = new int[1];
 	OS.gdk_window_get_origin(window, origin_x, origin_y);
 	Point coordinates = new Point(origin_x[0] + x, origin_y[0] + y);
diff --git a/org/eclipse/swt/dnd/DropTargetAdapter.java b/org/eclipse/swt/dnd/DropTargetAdapter.java
index ec57ad9..4fc923f 100644
--- a/org/eclipse/swt/dnd/DropTargetAdapter.java
+++ b/org/eclipse/swt/dnd/DropTargetAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DropTargetEvent.java b/org/eclipse/swt/dnd/DropTargetEvent.java
index 3b38964..d7cd5ad 100644
--- a/org/eclipse/swt/dnd/DropTargetEvent.java
+++ b/org/eclipse/swt/dnd/DropTargetEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/DropTargetListener.java b/org/eclipse/swt/dnd/DropTargetListener.java
index 9f30c84..72ee5c9 100644
--- a/org/eclipse/swt/dnd/DropTargetListener.java
+++ b/org/eclipse/swt/dnd/DropTargetListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/FileTransfer.java b/org/eclipse/swt/dnd/FileTransfer.java
index 8b0338f..af728e9 100644
--- a/org/eclipse/swt/dnd/FileTransfer.java
+++ b/org/eclipse/swt/dnd/FileTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -174,12 +174,14 @@ public Object nativeToJava(TransferData transferData) {
 		int /*long*/ localePtr = OS.g_filename_from_uri(files[i], null, error);
 		OS.g_free(files[i]);
 		if (error[0] != 0 || localePtr == 0) continue;
-		int /*long*/ utf8Ptr = OS.g_filename_to_utf8(localePtr, -1, null, null, error);
-		OS.g_free(localePtr);
-		if (error[0] != 0 || utf8Ptr == 0) continue;
+		int /*long*/ utf8Ptr = OS.g_filename_to_utf8(localePtr, -1, null, null, null);
+		if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (localePtr);
+		if (localePtr != utf8Ptr) OS.g_free (localePtr);
+		if (utf8Ptr == 0) continue;
 		int /*long*/[] items_written = new int /*long*/[1];
 		int /*long*/ utf16Ptr = OS.g_utf8_to_utf16(utf8Ptr, -1, null, items_written, null);
 		OS.g_free(utf8Ptr);
+		if (utf16Ptr == 0) continue;
 		length = (int)/*64*/items_written[0];
 		char[] buffer = new char[length];
 		OS.memmove(buffer, utf16Ptr, length * 2);
diff --git a/org/eclipse/swt/dnd/HTMLTransfer.java b/org/eclipse/swt/dnd/HTMLTransfer.java
index d91873d..cd7465f 100644
--- a/org/eclipse/swt/dnd/HTMLTransfer.java
+++ b/org/eclipse/swt/dnd/HTMLTransfer.java
@@ -10,6 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.dnd;
 
+import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gtk.*;
  
 /**
@@ -61,13 +62,11 @@ public void javaToNative (Object object, TransferData transferData){
 		DND.error(DND.ERROR_INVALID_DATA);
 	}
 	String string = (String)object;
-	int charCount = string.length();
-	char [] chars = new char[charCount +1];
-	string.getChars(0, charCount , chars, 0);
-	int byteCount = chars.length*2;
+	byte[] utf8 = Converter.wcsToMbcs(null, string, true);
+	int byteCount = utf8.length;
 	int /*long*/ pValue = OS.g_malloc(byteCount);
 	if (pValue == 0) return;
-	OS.memmove(pValue, chars, byteCount);
+	OS.memmove(pValue, utf8, byteCount);
 	transferData.length = byteCount;
 	transferData.format = 8;
 	transferData.pValue = pValue;
diff --git a/org/eclipse/swt/dnd/ImageTransfer.java b/org/eclipse/swt/dnd/ImageTransfer.java
index ffc92bb..ccf7399 100644
--- a/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/org/eclipse/swt/dnd/ImageTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -84,8 +84,6 @@ public void javaToNative(Object object, TransferData transferData) {
 	if (!checkImage(object) || !isSupportedType(transferData)) {
 		DND.error(DND.ERROR_INVALID_DATA);
 	}
-	if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return;
-	
 	ImageData imgData = (ImageData)object;
 	if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
 	Image image = new Image(Display.getCurrent(), imgData);	
diff --git a/org/eclipse/swt/dnd/RTFTransfer.java b/org/eclipse/swt/dnd/RTFTransfer.java
index 74aae33..bc38679 100644
--- a/org/eclipse/swt/dnd/RTFTransfer.java
+++ b/org/eclipse/swt/dnd/RTFTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/TableDragSourceEffect.java b/org/eclipse/swt/dnd/TableDragSourceEffect.java
index fdb6313..42942fc 100644
--- a/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.swt.dnd;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.widgets.*;
 
@@ -77,12 +78,12 @@ public class TableDragSourceEffect extends DragSourceEffect {
 	
 	Image getDragSourceImage(DragSourceEvent event) {
 		if (dragSourceImage != null) dragSourceImage.dispose();
-		dragSourceImage = null;		
-		
+		dragSourceImage = null;
+
 		Table table = (Table) control;
-		if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) return null;
 		//TEMPORARY CODE
 		if (table.isListening(SWT.EraseItem) || table.isListening (SWT.PaintItem)) return null;
+		
 		/*
 		* Bug in GTK.  gtk_tree_selection_get_selected_rows() segmentation faults
 		* in versions smaller than 2.2.4 if the model is NULL.  The fix is
@@ -90,7 +91,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
 		*/
 		int /*long*/ handle = table.handle;
 		int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
-		int /*long*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new int /*long*/ [1] : null;
+		int /*long*/ [] model = null;
 		int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
 		if (list == 0) return null;
 		int count = Math.min(10, OS.g_list_length (list));
@@ -98,47 +99,69 @@ public class TableDragSourceEffect extends DragSourceEffect {
 		Display display = table.getDisplay();
 		if (count == 1) {
 			int /*long*/ path = OS.g_list_nth_data (list, 0);
-			int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path);
-			dragSourceImage =  Image.gtk_new(display, SWT.ICON, pixmap, 0);
+			int /*long*/ icon = OS.gtk_tree_view_create_row_drag_icon (handle, path);
+			dragSourceImage =  Image.gtk_new (display, SWT.ICON, icon, 0);
 			OS.gtk_tree_path_free (path);
 		} else {
 			int width = 0, height = 0;
 			int[] w = new int[1], h = new int[1];
 			int[] yy = new int[count], hh = new int[count];
-			int /*long*/ [] pixmaps = new int /*long*/ [count];
+			int /*long*/ [] icons = new int /*long*/ [count];
 			GdkRectangle rect = new GdkRectangle ();
 			for (int i=0; i<count; i++) {
 				int /*long*/ path = OS.g_list_nth_data (list, i);
 				OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
-				pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
-				OS.gdk_drawable_get_size(pixmaps[i], w, h);
+				icons[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
+				if (OS.GTK3) {
+					w[0] = Cairo.cairo_xlib_surface_get_width(icons[i]);
+					h[0] = Cairo.cairo_xlib_surface_get_height(icons[i]);
+				} else if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+					OS.gdk_pixmap_get_size(icons[i], w, h);
+				} else {
+					OS.gdk_drawable_get_size(icons[i], w, h);
+				}
 				width = Math.max(width, w[0]);
 				height = rect.y + h[0] - yy[0];
 				yy[i] = rect.y;
 				hh[i] = h[0];
 				OS.gtk_tree_path_free (path);
 			}
-			int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1);
-			int /*long*/ gcSource = OS.gdk_gc_new(source);
-			int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1);
-			int /*long*/ gcMask = OS.gdk_gc_new(mask);
-			GdkColor color = new GdkColor();
-			color.pixel = 0;
-			OS.gdk_gc_set_foreground(gcMask, color);
-			OS.gdk_draw_rectangle(mask, gcMask, 1, 0, 0, width, height);
-			color.pixel = 1;
-			OS.gdk_gc_set_foreground(gcMask, color);
-			for (int i=0; i<count; i++) {
-				OS.gdk_draw_drawable(source, gcSource, pixmaps[i], 0, 0, 0, yy[i] - yy[0], -1, -1);
-				OS.gdk_draw_rectangle(mask, gcMask, 1, 0, yy[i] - yy[0], width, hh[i]);
-				OS.g_object_unref(pixmaps[i]);
+			if (OS.GTK3) {
+				int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
+				if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+				int /*long*/ cairo = Cairo.cairo_create(surface);
+				if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+				Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
+				for (int i=0; i<count; i++) {
+					Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2);
+					Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]);
+					Cairo.cairo_fill(cairo);
+					Cairo.cairo_surface_destroy(icons[i]);
+				}
+				Cairo.cairo_destroy(cairo);
+				dragSourceImage =  Image.gtk_new (display, SWT.ICON, surface, 0);
+			} else {
+				int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1);
+				int /*long*/ gcSource = OS.gdk_gc_new(source);
+				int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1);
+				int /*long*/ gcMask = OS.gdk_gc_new(mask);
+				GdkColor color = new GdkColor();
+				color.pixel = 0;
+				OS.gdk_gc_set_foreground(gcMask, color);
+				OS.gdk_draw_rectangle(mask, gcMask, 1, 0, 0, width, height);
+				color.pixel = 1;
+				OS.gdk_gc_set_foreground(gcMask, color);
+				for (int i=0; i<count; i++) {
+					OS.gdk_draw_drawable(source, gcSource, icons[i], 0, 0, 0, yy[i] - yy[0], -1, -1);
+					OS.gdk_draw_rectangle(mask, gcMask, 1, 0, yy[i] - yy[0], width, hh[i]);
+					OS.g_object_unref(icons[i]);
+				}
+				OS.g_object_unref(gcSource);
+				OS.g_object_unref(gcMask);
+				dragSourceImage  = Image.gtk_new(display, SWT.ICON, source, mask);
 			}
-			OS.g_object_unref(gcSource);
-			OS.g_object_unref(gcMask);
-			dragSourceImage  = Image.gtk_new(display, SWT.ICON, source, mask);
 		}
 		OS.g_list_free (list);
-		
 		return dragSourceImage;
-}
+	}
 }
diff --git a/org/eclipse/swt/dnd/TableDropTargetEffect.java b/org/eclipse/swt/dnd/TableDropTargetEffect.java
index dc81136..b621862 100644
--- a/org/eclipse/swt/dnd/TableDropTargetEffect.java
+++ b/org/eclipse/swt/dnd/TableDropTargetEffect.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/TextTransfer.java b/org/eclipse/swt/dnd/TextTransfer.java
index f6de5c5..6e2a842 100644
--- a/org/eclipse/swt/dnd/TextTransfer.java
+++ b/org/eclipse/swt/dnd/TextTransfer.java
@@ -76,7 +76,12 @@ public void javaToNative (Object object, TransferData transferData) {
 		int[] format = new int[1];
 		int /*long*/[] ctext = new int /*long*/[1];
 		int[] length = new int[1];
-		boolean result = OS.gdk_utf8_to_compound_text(utf8, encoding, format, ctext, length);
+		boolean result;
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			result = OS.gdk_x11_display_utf8_to_compound_text (OS.gdk_display_get_default(), utf8, encoding, format, ctext, length);
+		} else {
+			result = OS.gdk_utf8_to_compound_text(utf8, encoding, format, ctext, length);
+		}
 		if (!result) return;
 		transferData.type = encoding[0];
 		transferData.format = format[0];
diff --git a/org/eclipse/swt/dnd/TransferData.java b/org/eclipse/swt/dnd/TransferData.java
index dc8fcfb..45f7d33 100644
--- a/org/eclipse/swt/dnd/TransferData.java
+++ b/org/eclipse/swt/dnd/TransferData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index 78e4cd1..0c2b1e4 100644
--- a/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.swt.dnd;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.widgets.*;
 
@@ -76,20 +77,20 @@ public class TreeDragSourceEffect extends DragSourceEffect {
 
 	Image getDragSourceImage(DragSourceEvent event) {
 		if (dragSourceImage != null) dragSourceImage.dispose();
-		dragSourceImage = null;		
-		
+		dragSourceImage = null;
+
 		Tree tree = (Tree) control;
-		if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) return null;
 		//TEMPORARY CODE
 		if (tree.isListening(SWT.EraseItem) || tree.isListening (SWT.PaintItem)) return null;
+
 		/*
-		* Bug in GTK.  gtk_tree_selection_get_selected_rows() segmentation faults
-		* in versions smaller than 2.2.4 if the model is NULL.  The fix is
-		* to give a valid pointer instead.
-		*/
+		 * Bug in GTK.  gtk_tree_selection_get_selected_rows() segmentation faults
+		 * in versions smaller than 2.2.4 if the model is NULL.  The fix is
+		 * to give a valid pointer instead.
+		 */
 		int /*long*/ handle = tree.handle;
 		int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
-		int /*long*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new int /*long*/ [1] : null;
+		int /*long*/ [] model =  null;
 		int /*long*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
 		if (list == 0) return null;
 		int count = Math.min(10, OS.g_list_length (list));
@@ -97,47 +98,69 @@ public class TreeDragSourceEffect extends DragSourceEffect {
 		Display display = tree.getDisplay();
 		if (count == 1) {
 			int /*long*/ path = OS.g_list_nth_data (list, 0);
-			int /*long*/ pixmap = OS.gtk_tree_view_create_row_drag_icon(handle, path);
-			dragSourceImage =  Image.gtk_new(display, SWT.ICON, pixmap, 0);
+			int /*long*/ icon = OS.gtk_tree_view_create_row_drag_icon (handle, path);
+			dragSourceImage =  Image.gtk_new (display, SWT.ICON, icon, 0);
 			OS.gtk_tree_path_free (path);
 		} else {
 			int width = 0, height = 0;
 			int[] w = new int[1], h = new int[1];
 			int[] yy = new int[count], hh = new int[count];
-			int /*long*/ [] pixmaps = new int /*long*/ [count];
+			int /*long*/ [] icons = new int /*long*/ [count];
 			GdkRectangle rect = new GdkRectangle ();
 			for (int i=0; i<count; i++) {
 				int /*long*/ path = OS.g_list_nth_data (list, i);
 				OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
-				pixmaps[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
-				OS.gdk_drawable_get_size(pixmaps[i], w, h);
+				icons[i] = OS.gtk_tree_view_create_row_drag_icon(handle, path);
+				if (OS.GTK3) {
+					w[0] = Cairo.cairo_xlib_surface_get_width(icons[i]);
+					h[0] = Cairo.cairo_xlib_surface_get_height(icons[i]);
+				} else if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+					OS.gdk_pixmap_get_size(icons[i], w, h);
+				} else {
+					OS.gdk_drawable_get_size(icons[i], w, h);
+				}
 				width = Math.max(width, w[0]);
 				height = rect.y + h[0] - yy[0];
 				yy[i] = rect.y;
 				hh[i] = h[0];
 				OS.gtk_tree_path_free (path);
 			}
-			int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1);
-			int /*long*/ gcSource = OS.gdk_gc_new(source);
-			int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1);
-			int /*long*/ gcMask = OS.gdk_gc_new(mask);
-			GdkColor color = new GdkColor();
-			color.pixel = 0;
-			OS.gdk_gc_set_foreground(gcMask, color);
-			OS.gdk_draw_rectangle(mask, gcMask, 1, 0, 0, width, height);
-			color.pixel = 1;
-			OS.gdk_gc_set_foreground(gcMask, color);
-			for (int i=0; i<count; i++) {
-				OS.gdk_draw_drawable(source, gcSource, pixmaps[i], 0, 0, 0, yy[i] - yy[0], -1, -1);
-				OS.gdk_draw_rectangle(mask, gcMask, 1, 0, yy[i] - yy[0], width, hh[i]);
-				OS.g_object_unref(pixmaps[i]);
+			if (OS.GTK3) {
+				int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, width, height);
+				if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+				int /*long*/ cairo = Cairo.cairo_create(surface);
+				if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+				Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
+				for (int i=0; i<count; i++) {
+					Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2);
+					Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]);
+					Cairo.cairo_fill(cairo);
+					Cairo.cairo_surface_destroy(icons[i]);
+				}
+				Cairo.cairo_destroy(cairo);
+				dragSourceImage =  Image.gtk_new (display, SWT.ICON, surface, 0);
+			} else {
+				int /*long*/ source = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1);
+				int /*long*/ gcSource = OS.gdk_gc_new(source);
+				int /*long*/ mask = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, 1);
+				int /*long*/ gcMask = OS.gdk_gc_new(mask);
+				GdkColor color = new GdkColor();
+				color.pixel = 0;
+				OS.gdk_gc_set_foreground(gcMask, color);
+				OS.gdk_draw_rectangle(mask, gcMask, 1, 0, 0, width, height);
+				color.pixel = 1;
+				OS.gdk_gc_set_foreground(gcMask, color);
+				for (int i=0; i<count; i++) {
+					OS.gdk_draw_drawable(source, gcSource, icons[i], 0, 0, 0, yy[i] - yy[0], -1, -1);
+					OS.gdk_draw_rectangle(mask, gcMask, 1, 0, yy[i] - yy[0], width, hh[i]);
+					OS.g_object_unref(icons[i]);
+				}
+				OS.g_object_unref(gcSource);
+				OS.g_object_unref(gcMask);
+				dragSourceImage  = Image.gtk_new(display, SWT.ICON, source, mask);
 			}
-			OS.g_object_unref(gcSource);
-			OS.g_object_unref(gcMask);
-			dragSourceImage  = Image.gtk_new(display, SWT.ICON, source, mask);
 		}
 		OS.g_list_free (list);
-		
 		return dragSourceImage;
 	}
 }
diff --git a/org/eclipse/swt/dnd/TreeDropTargetEffect.java b/org/eclipse/swt/dnd/TreeDropTargetEffect.java
index c7c5fd0..91a6f2d 100644
--- a/org/eclipse/swt/dnd/TreeDropTargetEffect.java
+++ b/org/eclipse/swt/dnd/TreeDropTargetEffect.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -168,7 +168,7 @@ public class TreeDropTargetEffect extends DropTargetEffect {
 					if (cellRect.y < cellRect.height) {
 						int[] tx = new int[1], ty = new int[1];
 						if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
-							OS.gtk_tree_view_convert_widget_to_bin_window_coords(handle, cellRect.x, cellRect.y - cellRect.height, tx, ty);
+							OS.gtk_tree_view_convert_bin_window_to_tree_coords(handle, cellRect.x, cellRect.y - cellRect.height, tx, ty);
 						} else {
 							OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y - cellRect.height, tx, ty);
 						}
diff --git a/org/eclipse/swt/dnd/URLTransfer.java b/org/eclipse/swt/dnd/URLTransfer.java
index 63226b1..7444986 100644
--- a/org/eclipse/swt/dnd/URLTransfer.java
+++ b/org/eclipse/swt/dnd/URLTransfer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ArmEvent.java b/org/eclipse/swt/events/ArmEvent.java
index 5b6f982..56bcc6f 100644
--- a/org/eclipse/swt/events/ArmEvent.java
+++ b/org/eclipse/swt/events/ArmEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ArmListener.java b/org/eclipse/swt/events/ArmListener.java
index 23e983a..bfeea7b 100644
--- a/org/eclipse/swt/events/ArmListener.java
+++ b/org/eclipse/swt/events/ArmListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ControlAdapter.java b/org/eclipse/swt/events/ControlAdapter.java
index 10f273b..6224f12 100644
--- a/org/eclipse/swt/events/ControlAdapter.java
+++ b/org/eclipse/swt/events/ControlAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ControlEvent.java b/org/eclipse/swt/events/ControlEvent.java
index 3513ef3..b8143c4 100644
--- a/org/eclipse/swt/events/ControlEvent.java
+++ b/org/eclipse/swt/events/ControlEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ControlListener.java b/org/eclipse/swt/events/ControlListener.java
index 4895ec1..28b02c6 100644
--- a/org/eclipse/swt/events/ControlListener.java
+++ b/org/eclipse/swt/events/ControlListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/DisposeEvent.java b/org/eclipse/swt/events/DisposeEvent.java
index 04dbdd9..c756ec3 100644
--- a/org/eclipse/swt/events/DisposeEvent.java
+++ b/org/eclipse/swt/events/DisposeEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/DisposeListener.java b/org/eclipse/swt/events/DisposeListener.java
index 980f0b3..c6794bc 100644
--- a/org/eclipse/swt/events/DisposeListener.java
+++ b/org/eclipse/swt/events/DisposeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/FocusAdapter.java b/org/eclipse/swt/events/FocusAdapter.java
index eab687e..5ec97bd 100644
--- a/org/eclipse/swt/events/FocusAdapter.java
+++ b/org/eclipse/swt/events/FocusAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/FocusEvent.java b/org/eclipse/swt/events/FocusEvent.java
index a703db7..22c8c2e 100644
--- a/org/eclipse/swt/events/FocusEvent.java
+++ b/org/eclipse/swt/events/FocusEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/FocusListener.java b/org/eclipse/swt/events/FocusListener.java
index 9aa3097..f67b1f3 100644
--- a/org/eclipse/swt/events/FocusListener.java
+++ b/org/eclipse/swt/events/FocusListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/HelpEvent.java b/org/eclipse/swt/events/HelpEvent.java
index fd38eba..516fd0b 100644
--- a/org/eclipse/swt/events/HelpEvent.java
+++ b/org/eclipse/swt/events/HelpEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/HelpListener.java b/org/eclipse/swt/events/HelpListener.java
index 9437c09..da73f61 100644
--- a/org/eclipse/swt/events/HelpListener.java
+++ b/org/eclipse/swt/events/HelpListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/KeyAdapter.java b/org/eclipse/swt/events/KeyAdapter.java
index dca53cc..e0bdb10 100644
--- a/org/eclipse/swt/events/KeyAdapter.java
+++ b/org/eclipse/swt/events/KeyAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/KeyListener.java b/org/eclipse/swt/events/KeyListener.java
index 6107f83..7f3c2ec 100644
--- a/org/eclipse/swt/events/KeyListener.java
+++ b/org/eclipse/swt/events/KeyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MenuAdapter.java b/org/eclipse/swt/events/MenuAdapter.java
index 6bd3c6e..9dd12f8 100644
--- a/org/eclipse/swt/events/MenuAdapter.java
+++ b/org/eclipse/swt/events/MenuAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MenuEvent.java b/org/eclipse/swt/events/MenuEvent.java
index 4697a9d..2a65610 100644
--- a/org/eclipse/swt/events/MenuEvent.java
+++ b/org/eclipse/swt/events/MenuEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MenuListener.java b/org/eclipse/swt/events/MenuListener.java
index 0c74780..99fc280 100644
--- a/org/eclipse/swt/events/MenuListener.java
+++ b/org/eclipse/swt/events/MenuListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ModifyEvent.java b/org/eclipse/swt/events/ModifyEvent.java
index 36642cf..fa7732a 100644
--- a/org/eclipse/swt/events/ModifyEvent.java
+++ b/org/eclipse/swt/events/ModifyEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ModifyListener.java b/org/eclipse/swt/events/ModifyListener.java
index 614b13a..6ae0d6b 100644
--- a/org/eclipse/swt/events/ModifyListener.java
+++ b/org/eclipse/swt/events/ModifyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MouseAdapter.java b/org/eclipse/swt/events/MouseAdapter.java
index 1ae1c48..bb539ca 100644
--- a/org/eclipse/swt/events/MouseAdapter.java
+++ b/org/eclipse/swt/events/MouseAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MouseEvent.java b/org/eclipse/swt/events/MouseEvent.java
index d9f746f..a5ce20b 100644
--- a/org/eclipse/swt/events/MouseEvent.java
+++ b/org/eclipse/swt/events/MouseEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,7 +11,7 @@
 package org.eclipse.swt.events;
 
 
-import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.*;
 
 /**
  * Instances of this class are sent whenever mouse
@@ -33,9 +33,12 @@ import org.eclipse.swt.widgets.Event;
 public class MouseEvent extends TypedEvent {
 	
 	/**
-	 * the button that was pressed or released; 1 for the
-	 * first button, 2 for the second button, and 3 for the
-	 * third button, etc.
+	 * the button that was pressed or released;
+	 * <ul>
+	 * <li>1 for the first button (usually 'left')</li>
+	 * <li>2 for the second button (usually 'middle')</li>
+	 * <li>3 for the third button (usually 'right')</li>
+	 * <li>etc.</li>
 	 */
 	public int button;
 	
diff --git a/org/eclipse/swt/events/MouseListener.java b/org/eclipse/swt/events/MouseListener.java
index 8ee2158..d83150a 100644
--- a/org/eclipse/swt/events/MouseListener.java
+++ b/org/eclipse/swt/events/MouseListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MouseMoveListener.java b/org/eclipse/swt/events/MouseMoveListener.java
index cc4e00f..3e34b56 100644
--- a/org/eclipse/swt/events/MouseMoveListener.java
+++ b/org/eclipse/swt/events/MouseMoveListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MouseTrackAdapter.java b/org/eclipse/swt/events/MouseTrackAdapter.java
index d5ba0ef..9500b66 100644
--- a/org/eclipse/swt/events/MouseTrackAdapter.java
+++ b/org/eclipse/swt/events/MouseTrackAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/MouseTrackListener.java b/org/eclipse/swt/events/MouseTrackListener.java
index 9b01407..65de21d 100644
--- a/org/eclipse/swt/events/MouseTrackListener.java
+++ b/org/eclipse/swt/events/MouseTrackListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/PaintEvent.java b/org/eclipse/swt/events/PaintEvent.java
index e7c4443..1f12daf 100644
--- a/org/eclipse/swt/events/PaintEvent.java
+++ b/org/eclipse/swt/events/PaintEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/PaintListener.java b/org/eclipse/swt/events/PaintListener.java
index 7a047c8..708f338 100644
--- a/org/eclipse/swt/events/PaintListener.java
+++ b/org/eclipse/swt/events/PaintListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/SegmentEvent.java b/org/eclipse/swt/events/SegmentEvent.java
index 02ed7c4..4e76974 100644
--- a/org/eclipse/swt/events/SegmentEvent.java
+++ b/org/eclipse/swt/events/SegmentEvent.java
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.events;
 
-import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.*;
 
 /**
  * This event is sent to SegmentListeners when a text content is to be modified.
@@ -54,7 +54,7 @@ import org.eclipse.swt.widgets.Event;
  * </pre>
  * 
  * <p>
- * The segments and segementsChars fields can be used together to obtain different
+ * The segments and segmentsChars fields can be used together to obtain different
  * types of bidi reordering and text display. The application can use these two fields
  * to insert Unicode Control Characters in specific offsets in the text, the character
  * at segmentsChars[i] is inserted at the offset specified by segments[i]. When both fields 
diff --git a/org/eclipse/swt/events/SegmentListener.java b/org/eclipse/swt/events/SegmentListener.java
index dfcc2fc..d9c27a8 100644
--- a/org/eclipse/swt/events/SegmentListener.java
+++ b/org/eclipse/swt/events/SegmentListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package org.eclipse.swt.events;
 
-import org.eclipse.swt.internal.SWTEventListener;
+import org.eclipse.swt.internal.*;
 
 /**
  * This listener interface may be implemented in order to receive
@@ -25,9 +25,9 @@ public interface SegmentListener extends SWTEventListener {
  * This method is called when text content is being modified. 
  * <p>
  * The following event fields are used:<ul>
- * <li>event.text text content (input)</li>
- * <li>event.segmentsChars characters that should be inserted (output)</li>
+ * <li>event.lineText text content (input)</li>
  * <li>event.segments text offsets for segment characters (output)</li>
+ * <li>event.segmentsChars characters that should be inserted (output, optional)</li>
  * </ul>
  *
  * @param event the given event
diff --git a/org/eclipse/swt/events/SelectionAdapter.java b/org/eclipse/swt/events/SelectionAdapter.java
index be1fe9f..a3cd82e 100644
--- a/org/eclipse/swt/events/SelectionAdapter.java
+++ b/org/eclipse/swt/events/SelectionAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/SelectionListener.java b/org/eclipse/swt/events/SelectionListener.java
index 32938d3..8655396 100644
--- a/org/eclipse/swt/events/SelectionListener.java
+++ b/org/eclipse/swt/events/SelectionListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ShellAdapter.java b/org/eclipse/swt/events/ShellAdapter.java
index 39e7d18..abd8ec6 100644
--- a/org/eclipse/swt/events/ShellAdapter.java
+++ b/org/eclipse/swt/events/ShellAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ShellEvent.java b/org/eclipse/swt/events/ShellEvent.java
index 736cca3..fe8d8eb 100644
--- a/org/eclipse/swt/events/ShellEvent.java
+++ b/org/eclipse/swt/events/ShellEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/ShellListener.java b/org/eclipse/swt/events/ShellListener.java
index 36cd8a1..5e0a37d 100644
--- a/org/eclipse/swt/events/ShellListener.java
+++ b/org/eclipse/swt/events/ShellListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TraverseEvent.java b/org/eclipse/swt/events/TraverseEvent.java
index f50e42a..8c97a76 100644
--- a/org/eclipse/swt/events/TraverseEvent.java
+++ b/org/eclipse/swt/events/TraverseEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TraverseListener.java b/org/eclipse/swt/events/TraverseListener.java
index 2d1d4b3..e3072e5 100644
--- a/org/eclipse/swt/events/TraverseListener.java
+++ b/org/eclipse/swt/events/TraverseListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TreeAdapter.java b/org/eclipse/swt/events/TreeAdapter.java
index c7dacb8..e59b238 100644
--- a/org/eclipse/swt/events/TreeAdapter.java
+++ b/org/eclipse/swt/events/TreeAdapter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TreeEvent.java b/org/eclipse/swt/events/TreeEvent.java
index 1a3dbc5..46c0ed8 100644
--- a/org/eclipse/swt/events/TreeEvent.java
+++ b/org/eclipse/swt/events/TreeEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TreeListener.java b/org/eclipse/swt/events/TreeListener.java
index 9e45cc2..82b44ec 100644
--- a/org/eclipse/swt/events/TreeListener.java
+++ b/org/eclipse/swt/events/TreeListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/TypedEvent.java b/org/eclipse/swt/events/TypedEvent.java
index 1f2f867..a15ea2d 100644
--- a/org/eclipse/swt/events/TypedEvent.java
+++ b/org/eclipse/swt/events/TypedEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/VerifyEvent.java b/org/eclipse/swt/events/VerifyEvent.java
index 527aaba..96e179b 100644
--- a/org/eclipse/swt/events/VerifyEvent.java
+++ b/org/eclipse/swt/events/VerifyEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/events/VerifyListener.java b/org/eclipse/swt/events/VerifyListener.java
index 653e203..8bc7fb7 100644
--- a/org/eclipse/swt/events/VerifyListener.java
+++ b/org/eclipse/swt/events/VerifyListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Color.java b/org/eclipse/swt/graphics/Color.java
index c544508..333fc2f 100644
--- a/org/eclipse/swt/graphics/Color.java
+++ b/org/eclipse/swt/graphics/Color.java
@@ -117,8 +117,10 @@ void destroy() {
 			device.gdkColors[pixel] = null;
 		}
 	}
-	int /*long*/ colormap = OS.gdk_colormap_get_system();
-	OS.gdk_colormap_free_colors(colormap, handle, 1);
+	if (!OS.GTK3) {
+		int /*long*/ colormap = OS.gdk_colormap_get_system();
+		OS.gdk_colormap_free_colors(colormap, handle, 1);
+	}
 	handle = null;
 }
 
@@ -244,11 +246,13 @@ void init(int red, int green, int blue) {
 	gdkColor.red = (short)((red & 0xFF) | ((red & 0xFF) << 8));
 	gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8));
 	gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8));
-	int /*long*/ colormap = OS.gdk_colormap_get_system();
-	if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) {
-		/* Allocate black. */
-		gdkColor = new GdkColor();
-		OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true);
+	if (!OS.GTK3) {
+		int /*long*/ colormap = OS.gdk_colormap_get_system();
+		if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) {
+			/* Allocate black. */
+			gdkColor = new GdkColor();
+			OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true);
+		}
 	}
 	handle = gdkColor;
 	if (device.colorRefCount != null) {
diff --git a/org/eclipse/swt/graphics/Cursor.java b/org/eclipse/swt/graphics/Cursor.java
index f66a8de..bfcbf5e 100644
--- a/org/eclipse/swt/graphics/Cursor.java
+++ b/org/eclipse/swt/graphics/Cursor.java
@@ -161,7 +161,11 @@ public Cursor(Device device, int style) {
 			SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
 	if (shape == 0 && style == SWT.CURSOR_APPSTARTING) {
-		handle = createCursor(APPSTARTING_SRC, APPSTARTING_MASK, 32, 32, 2, 2, true);		
+		byte[] src = new byte[APPSTARTING_SRC.length];
+		System.arraycopy(APPSTARTING_SRC, 0, src, 0, src.length);
+		byte[] mask = new byte[APPSTARTING_MASK.length];
+		System.arraycopy(APPSTARTING_MASK, 0, mask, 0, mask.length);
+		handle = createCursor(src, mask, 32, 32, 2, 2, true);
 	} else {
 		handle = OS.gdk_cursor_new(shape);
 	}
@@ -291,7 +295,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
 		SWT.error(SWT.ERROR_INVALID_ARGUMENT);
 	}
 	int /*long*/ display = 0;
-	if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0) && OS.gdk_display_supports_cursor_color(display = OS.gdk_display_get_default ())) {
+	if (OS.gdk_display_supports_cursor_color(display = OS.gdk_display_get_default ())) {
 		int width = source.width;
 		int height = source.height;
 		PaletteData palette = source.palette;	
@@ -433,6 +437,64 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) {
 }
 
 int /*long*/ createCursor(byte[] sourceData, byte[] maskData, int width, int height, int hotspotX, int hotspotY, boolean reverse) {
+	if (OS.GTK3) {
+		for (int i = 0; i < sourceData.length; i++) {
+			byte s = sourceData[i];
+			sourceData[i] = (byte)(((s & 0x80) >> 7) |
+				((s & 0x40) >> 5) |
+				((s & 0x20) >> 3) |
+				((s & 0x10) >> 1) |
+				((s & 0x08) << 1) |
+				((s & 0x04) << 3) |
+				((s & 0x02) << 5) |
+				((s & 0x01) << 7));
+			sourceData[i] = (byte) ~sourceData[i];
+		}
+		for (int i = 0; i < maskData.length; i++) {
+			byte s = maskData[i];
+			maskData[i] = (byte)(((s & 0x80) >> 7) |
+				((s & 0x40) >> 5) |
+				((s & 0x20) >> 3) |
+				((s & 0x10) >> 1) |
+				((s & 0x08) << 1) |
+				((s & 0x04) << 3) |
+				((s & 0x02) << 5) |
+				((s & 0x01) << 7));
+			maskData[i] = (byte) ~maskData[i];
+		}
+		PaletteData palette = new PaletteData(new RGB[]{new RGB(0, 0, 0), new RGB(255, 255, 255)});
+		ImageData source = new ImageData(width, height, 1, palette, 1, sourceData);
+		ImageData mask = new ImageData(width, height, 1, palette, 1, maskData);
+		byte[] data = new byte[source.width * source.height * 4];
+		for (int y = 0; y < source.height; y++) {
+			int offset = y * source.width * 4;
+			for (int x = 0; x < source.width; x++) {
+				int pixel = source.getPixel(x, y);
+				int maskPixel = mask.getPixel(x, y);
+				if (pixel == 0 && maskPixel == 0) {
+					// BLACK
+					data[offset+3] = (byte)0xFF;
+				} else if (pixel == 0 && maskPixel == 1) {
+					// WHITE - cursor color
+					data[offset] = data[offset + 1] = data[offset + 2] = data[offset + 3] = (byte)0xFF;
+				} else if (pixel == 1 && maskPixel == 0) {
+					// SCREEN
+				} else {
+					/* no support */
+					// REVERSE SCREEN -> SCREEN
+				}
+				offset += 4;
+			}
+		}
+		int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height);
+		if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+		int stride = OS.gdk_pixbuf_get_rowstride(pixbuf);
+		int /*long*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf);
+		OS.memmove(pixels, data, stride * height);
+		int /*long*/ cursor = OS.gdk_cursor_new_from_pixbuf(OS.gdk_display_get_default(), pixbuf, hotspotX, hotspotY);
+		OS.g_object_unref(pixbuf);
+		return cursor;
+	}
 	int /*long*/ sourcePixmap = OS.gdk_bitmap_create_from_data(0, sourceData, width, height);
 	int /*long*/ maskPixmap = OS.gdk_bitmap_create_from_data(0, maskData, width, height);
 	int /*long*/ cursor = 0;
@@ -449,7 +511,7 @@ int /*long*/ createCursor(byte[] sourceData, byte[] maskData, int width, int hei
 }
 
 void destroy() {
-	OS.gdk_cursor_unref(handle);
+	gdk_cursor_unref(handle);
 	handle = 0;
 }
 
@@ -530,4 +592,12 @@ public String toString () {
 	return "Cursor {" + handle + "}";
 }
 
+void gdk_cursor_unref (int /*long*/ cursor) {
+	if (OS.GTK3) {
+		OS.g_object_unref (cursor);
+	} else {
+		OS.gdk_cursor_unref(cursor);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/graphics/Device.java b/org/eclipse/swt/graphics/Device.java
index fd2a4ac..71e6a5f 100644
--- a/org/eclipse/swt/graphics/Device.java
+++ b/org/eclipse/swt/graphics/Device.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,7 +58,7 @@ public abstract class Device implements Drawable {
 	int /*long*/ logProc;
 	Callback logCallback;
 	//NOT DONE - get list of valid names
-	String [] log_domains = {"GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS", "GIO"};
+	String [] log_domains = {"", "GLib-GObject", "GLib", "GObject", "Pango", "ATK", "GdkPixbuf", "Gdk", "Gtk", "GnomeVFS", "GIO"};
 	int [] handler_ids = new int [log_domains.length];
 	int warningLevel;
 	
@@ -659,7 +659,21 @@ protected void init () {
 	OS.gtk_widget_realize(shellHandle);
 
 	/* Initialize the system font slot */
-	systemFont = getSystemFont ();
+	int /*long*/ defaultFont;
+	if (OS.GTK3) {
+		int /*long*/ context = OS.gtk_widget_get_style_context (shellHandle);	
+		defaultFont = OS.gtk_style_context_get_font (context, OS.GTK_STATE_FLAG_NORMAL);
+	} else {
+		int /*long*/ style = OS.gtk_widget_get_style (shellHandle);	
+		defaultFont = OS.gtk_style_get_font_desc (style);
+	}	
+	defaultFont = OS.pango_font_description_copy (defaultFont);
+	Point dpi = getDPI(), screenDPI = getScreenDPI();
+	if (dpi.y != screenDPI.y) {
+		int size = OS.pango_font_description_get_size(defaultFont);
+		OS.pango_font_description_set_size(defaultFont, size * dpi.y / screenDPI.y);
+	}
+	systemFont = Font.gtk_new (this, defaultFont);
 }
 
 /**	 
@@ -736,6 +750,9 @@ public boolean loadFont (String path) {
 }
 
 int /*long*/ logProc (int /*long*/ log_domain, int /*long*/ log_level, int /*long*/ message, int /*long*/ user_data) {
+	if (DEBUG) {
+		new Error ().printStackTrace ();
+	}
 	if (warningLevel == 0) {
 		if (DEBUG || debug) {
 			new Error ().printStackTrace ();
@@ -804,15 +821,21 @@ static synchronized void register (Device device) {
 protected void release () {
 	if (shellHandle != 0) OS.gtk_widget_destroy(shellHandle);
 	shellHandle = 0;
+	
+	/* Dispose the default font */
+	if (systemFont != null) systemFont.dispose ();
+	systemFont = null;
 
 	if (gdkColors != null) {
-		int /*long*/ colormap = OS.gdk_colormap_get_system();
-		for (int i = 0; i < gdkColors.length; i++) {
-			GdkColor color = gdkColors [i];
-			if (color != null) {
-				while (colorRefCount [i] > 0) {
-					OS.gdk_colormap_free_colors(colormap, color, 1);
-					--colorRefCount [i];
+		if (!OS.GTK3) {
+			int /*long*/ colormap = OS.gdk_colormap_get_system();
+			for (int i = 0; i < gdkColors.length; i++) {
+				GdkColor color = gdkColors [i];
+				if (color != null) {
+					while (colorRefCount [i] > 0) {
+						OS.gdk_colormap_free_colors(colormap, color, 1);
+						--colorRefCount [i];
+					}
 				}
 			}
 		}
diff --git a/org/eclipse/swt/graphics/Drawable.java b/org/eclipse/swt/graphics/Drawable.java
index 141268b..b821508 100644
--- a/org/eclipse/swt/graphics/Drawable.java
+++ b/org/eclipse/swt/graphics/Drawable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Font.java b/org/eclipse/swt/graphics/Font.java
index 70a7b7d..aa8a472 100644
--- a/org/eclipse/swt/graphics/Font.java
+++ b/org/eclipse/swt/graphics/Font.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/GC.java b/org/eclipse/swt/graphics/GC.java
index 6c45c0f..09296ad 100644
--- a/org/eclipse/swt/graphics/GC.java
+++ b/org/eclipse/swt/graphics/GC.java
@@ -194,6 +194,23 @@ static int checkStyle (int style) {
 	return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
 }
 
+/**	 
+ * Invokes platform specific functionality to wrap a graphics context.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>GC</code>. It is marked public only so that it
+ * can be shared within the packages provided by SWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param handle the handle to the OS device context
+ * @param data the data for the receiver.
+ *
+ * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
+ */
 public static GC gtk_new(int /*long*/ handle, GCData data) {
 	GC gc = new GC();
 	gc.device = data.device;
@@ -201,6 +218,23 @@ public static GC gtk_new(int /*long*/ handle, GCData data) {
 	return gc;
 }
 
+/**	 
+ * Invokes platform specific functionality to allocate a new graphics context.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>GC</code>. It is marked public only so that it
+ * can be shared within the packages provided by SWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param drawable the Drawable for the receiver.
+ * @param data the data for the receiver.
+ *
+ * @return a new <code>GC</code>
+ * 
+ * @noreference This method is not intended to be referenced by clients.
+ */
 public static GC gtk_new(Drawable drawable, GCData data) {
 	GC gc = new GC();
 	int /*long*/ gdkGC = drawable.internal_new_GC(data);
@@ -394,7 +428,7 @@ int /*long*/ convertRgn(int /*long*/ rgn, double[] matrix) {
 	int /*long*/ newRgn = OS.gdk_region_new();
 	int[] nRects = new int[1];
 	int /*long*/[] rects = new int /*long*/[1];
-	OS.gdk_region_get_rectangles(rgn, rects, nRects);
+	Region.gdk_region_get_rectangles(rgn, rects, nRects);
 	GdkRectangle rect = new GdkRectangle();
 	int[] pointArray = new int[8];
 	double[] x = new double[1], y = new double[1];
@@ -420,7 +454,7 @@ int /*long*/ convertRgn(int /*long*/ rgn, double[] matrix) {
 		Cairo.cairo_matrix_transform_point(matrix, x, y);
 		pointArray[6] = (int)x[0];
 		pointArray[7] = (int)Math.round(y[0]);
-		int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
+		int /*long*/ polyRgn = Region.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
 		OS.gdk_region_union(newRgn, polyRgn);
 		OS.gdk_region_destroy(polyRgn);
 	}
@@ -452,6 +486,7 @@ public void copyArea(Image image, int x, int y) {
 		int /*long*/ cairo = Cairo.cairo_create(image.surface);
 		if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 		Cairo.cairo_translate(cairo, -x, -y);
+		Cairo.cairo_push_group(cairo);
 		if (data.image != null) {
 			Cairo.cairo_set_source_surface(cairo, data.image.surface, 0, 0);
 		} else if (data.drawable != 0) {
@@ -468,10 +503,13 @@ public void copyArea(Image image, int x, int y) {
 				Cairo.cairo_set_source_surface(cairo, srcSurface, 0, 0);
 			}
 		} else {
+			Cairo.cairo_destroy(cairo);
 			return;
 		}
 		Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE);
 		Cairo.cairo_paint(cairo);
+		Cairo.cairo_pop_group_to_source(cairo);
+		Cairo.cairo_paint(cairo);
 		Cairo.cairo_destroy(cairo);
         return;
 	}
@@ -546,7 +584,12 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
 			Cairo.cairo_paint(handle);
 			Cairo.cairo_restore(handle);
 			if (paint) {
-				int /*long*/ visibleRegion = OS.gdk_drawable_get_visible_region (drawable);
+				int /*long*/ visibleRegion;
+				if (OS.GTK3) {
+					visibleRegion = OS.gdk_window_get_visible_region (drawable);
+				} else {
+					visibleRegion = OS.gdk_drawable_get_visible_region (drawable);
+				}
 				GdkRectangle srcRect = new GdkRectangle ();
 				srcRect.x = srcX;
 				srcRect.y = srcY;
@@ -612,15 +655,7 @@ void createLayout() {
 	data.layout = layout;
 	OS.pango_context_set_language(context, OS.gtk_get_default_language());
 	OS.pango_context_set_base_dir(context, (data.style & SWT.MIRRORED) != 0 ? OS.PANGO_DIRECTION_RTL : OS.PANGO_DIRECTION_LTR);
-	/*
-	 * Colormap is automatically set for GTK 2.6.0 and newer.
-	 */
-	if (OS.GTK_VERSION < OS.VERSION(2, 6, 0)) {
-	    OS.gdk_pango_context_set_colormap(context, OS.gdk_colormap_get_system());	
-	}
-	if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) {
-		OS.pango_layout_set_auto_dir(layout, false);
-	}
+	OS.pango_layout_set_auto_dir(layout, false);
 }
 
 void disposeLayout() {
@@ -746,6 +781,27 @@ public void drawArc(int x, int y, int width, int height, int startAngle, int arc
  */
 public void drawFocus(int x, int y, int width, int height) {
 	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
+	int /*long*/ cairo = data.cairo;
+	if (cairo != 0) {
+		checkGC(FOREGROUND);
+		if (OS.GTK3) {
+			int /*long*/  context = OS.gtk_widget_get_style_context(data.device.shellHandle);
+			OS.gtk_render_focus(context, cairo, x, y, width, height);
+		} else {
+			int[] lineWidth = new int[1];
+			OS.gtk_widget_style_get(data.device.shellHandle, OS.focus_line_width, lineWidth, 0);
+			Cairo.cairo_save(cairo);		
+			Cairo.cairo_set_line_width(cairo, lineWidth[0]);
+			double[] dashes = new double[]{1, 1};
+			double dash_offset = -lineWidth[0] / 2f;
+			while (dash_offset < 0) dash_offset += 2;
+			Cairo.cairo_set_dash(cairo, dashes, dashes.length, dash_offset);
+			Cairo.cairo_rectangle(cairo, x + lineWidth[0] / 2f, y + lineWidth[0] / 2f, width, height);
+			Cairo.cairo_stroke(cairo);
+			Cairo.cairo_restore(cairo);
+		}
+		return;
+	}
 	/*
 	* Feature in GTK.  The function gtk_widget_get_default_style() 
 	* can't be used here because gtk_paint_focus() uses GCs, which
@@ -753,22 +809,6 @@ public void drawFocus(int x, int y, int width, int height) {
 	* from a widget.
 	*/
 	int /*long*/ style = OS.gtk_widget_get_style(data.device.shellHandle);
-	int /*long*/ cairo = data.cairo;
-	if (cairo != 0) {
-		checkGC(FOREGROUND);
-		int[] lineWidth = new int[1];
-		OS.gtk_widget_style_get(data.device.shellHandle, OS.focus_line_width, lineWidth, 0);
-		Cairo.cairo_save(cairo);		
-		Cairo.cairo_set_line_width(cairo, lineWidth[0]);
-		double[] dashes = new double[]{1, 1};
-		double dash_offset = -lineWidth[0] / 2f;
-		while (dash_offset < 0) dash_offset += 2;
-		Cairo.cairo_set_dash(cairo, dashes, dashes.length, dash_offset);
-		Cairo.cairo_rectangle(cairo, x + lineWidth[0] / 2f, y + lineWidth[0] / 2f, width, height);
-		Cairo.cairo_stroke(cairo);
-		Cairo.cairo_restore(cairo);
-		return;
-	}
 	OS.gtk_paint_focus(style, data.drawable, OS.GTK_STATE_NORMAL, null, data.device.shellHandle, new byte[1], x, y, width, height);
 }
 
@@ -849,7 +889,11 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
 	} else {
 		int[] width = new int[1];
 		int[] height = new int[1];
-	 	OS.gdk_drawable_get_size(srcImage.pixmap, width, height);
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			OS.gdk_pixmap_get_size(srcImage.pixmap, width, height);
+		} else {
+			OS.gdk_drawable_get_size(srcImage.pixmap, width, height);
+		}
 	 	imgWidth = width[0];
 	 	imgHeight = height[0];
 	}
@@ -2744,7 +2788,12 @@ void getSize(int[] width, int[] height) {
 		return;
 	}
 	if (data.drawable != 0) {
-		OS.gdk_drawable_get_size(data.drawable, width, height);
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			width[0] = OS.gdk_window_get_width(data.drawable);
+			height[0] = OS.gdk_window_get_height(data.drawable);
+		} else {
+			OS.gdk_drawable_get_size(data.drawable, width, height);
+		}
 		return;
 	}
 	if (OS.USE_CAIRO) {
@@ -2942,9 +2991,17 @@ void initCairo() {
 				translateY = -y[0];
 			}
 		}
-		int[] w = new int[1], h = new int[1];
-		OS.gdk_drawable_get_size(drawable, w, h);
-		int width = w[0], height = h[0];
+		int width = 0;
+		int height = 0;
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			width = OS.gdk_window_get_width(data.drawable);
+			height = OS.gdk_window_get_height(data.drawable);
+		} else {
+			int[] w = new int[1], h = new int[1];
+			OS.gdk_drawable_get_size(drawable, w, h);
+			width = w[0];
+			height = h[0];
+		}
 		int /*long*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height);
 		if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 		Cairo.cairo_surface_set_device_offset(surface, translateX, translateY);
@@ -2962,9 +3019,9 @@ void initCairo() {
 
 void computeStringSize() {
 	int[] width = new int[1], height = new int[1];
-	OS.pango_layout_get_size(data.layout, width, height);
-	data.stringHeight = OS.PANGO_PIXELS(height[0]);
-	data.stringWidth = OS.PANGO_PIXELS(width[0]);
+	OS.pango_layout_get_pixel_size(data.layout, width, height);
+	data.stringHeight = height[0];
+	data.stringWidth = width[0];
 }
 
 /**
@@ -3212,6 +3269,7 @@ public void setBackgroundPattern(Pattern pattern) {
 }
 
 static void setCairoFont(int /*long*/ cairo, Font font) {
+	if (font == null || font.isDisposed()) return;
 	setCairoFont(cairo, font.handle);
 }
 
@@ -3260,7 +3318,7 @@ static void setCairoPatternColor(int /*long*/ pattern, int offset, Color c, int
 
 void setCairoClip(int /*long*/ damageRgn, int /*long*/ clipRgn) {
 	int /*long*/ cairo = data.cairo;
-	if (OS.GTK_VERSION >= OS.VERSION(2,18,0) && data.drawable != 0) {
+	if (OS.GTK_VERSION >= OS.VERSION(2,18,0) && data.drawable != 0 && !OS.GTK3) {
 		OS.gdk_cairo_reset_clip(cairo, data.drawable);
 	} else {
 		Cairo.cairo_reset_clip(cairo);
diff --git a/org/eclipse/swt/graphics/GCData.java b/org/eclipse/swt/graphics/GCData.java
index 2259ddc..960f91f 100644
--- a/org/eclipse/swt/graphics/GCData.java
+++ b/org/eclipse/swt/graphics/GCData.java
@@ -24,17 +24,18 @@ import org.eclipse.swt.*;
  * platforms, and should never be called from application code.
  * </p>
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
- * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients
  */
 public final class GCData {
 	public Device device;
 	public int style, state = -1;
+
 	public GdkColor foreground;
+
 	public GdkColor background;
 	public Font font;
 	public Pattern foregroundPattern;
 	public Pattern backgroundPattern;
-	public int /*long*/ clipRgn;
 	public float lineWidth;
 	public int lineStyle = SWT.LINE_SOLID;
 	public float[] lineDashes;
@@ -45,13 +46,9 @@ public final class GCData {
 	public boolean xorMode;
 	public int alpha = 0xFF;
 	public int interpolation = SWT.DEFAULT;
-
-	public int /*long*/ context;
-	public int /*long*/ layout;
-	public int /*long*/ damageRgn;
 	public Image image;
-	public int /*long*/ drawable;	
-	public int /*long*/ cairo;
+
+	public int /*long*/ clipRgn, context, layout, damageRgn, drawable, cairo;
 	public double cairoXoffset, cairoYoffset;
 	public boolean disposeCairo;
 	public double[] identity, clippingTransform;
diff --git a/org/eclipse/swt/graphics/Image.java b/org/eclipse/swt/graphics/Image.java
index 9f7fda7..252f11f 100644
--- a/org/eclipse/swt/graphics/Image.java
+++ b/org/eclipse/swt/graphics/Image.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -363,7 +363,11 @@ public Image(Device device, Image srcImage, int flag) {
 
 	/* Get source image size */
 	int[] w = new int[1], h = new int[1];
- 	OS.gdk_drawable_get_size(srcImage.pixmap, w, h);
+	if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+		OS.gdk_pixmap_get_size(srcImage.pixmap, w, h);
+	} else {
+		OS.gdk_drawable_get_size(srcImage.pixmap, w, h);
+	}
  	int width = w[0];
  	int height = h[0];
  	
@@ -866,11 +870,19 @@ int /*long*/ createMask(ImageData image, boolean copy) {
 
 void createSurface() {
 	if (surface != 0) return;
+	/* There is no pixmaps in GTK 3. */
+	if (OS.GTK3) return;
 	/* Generate the mask if necessary. */
 	if (transparentPixel != -1) createMask();
 	int[] w = new int[1], h = new int[1];
-	OS.gdk_drawable_get_size(pixmap, w, h);
+	if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+		OS.gdk_pixmap_get_size(pixmap, w, h);
+	} else {
+		OS.gdk_drawable_get_size(pixmap, w, h);
+	}
 	int width = w[0], height = h[0];
+	this.width = width;
+	this.height = height;
 	if (mask != 0 || alpha != -1 || alphaData != null) {
 	 	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height);
 		if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -1069,7 +1081,11 @@ public Rectangle getBounds() {
 		return new Rectangle(0, 0, width, height);
 	}
 	int[] w = new int[1]; int[] h = new int[1];
-	OS.gdk_drawable_get_size(pixmap, w, h);
+	if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+		OS.gdk_pixmap_get_size(pixmap, w, h);
+	} else {
+		OS.gdk_drawable_get_size(pixmap, w, h);
+	}
 	return new Rectangle(0, 0, width = w[0], height = h[0]);
 }
 
@@ -1142,7 +1158,11 @@ public ImageData getImageData() {
 		return data;
 	}
 	int[] w = new int[1], h = new int[1];
- 	OS.gdk_drawable_get_size(pixmap, w, h);
+	if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+		OS.gdk_pixmap_get_size(pixmap, w, h);
+	} else {
+		OS.gdk_drawable_get_size(pixmap, w, h);
+	}
  	int width = w[0], height = h[0]; 	
  	int /*long*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height);
 	if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES);
@@ -1207,17 +1227,21 @@ public ImageData getImageData() {
  *
  * @param device the device on which to allocate the color
  * @param type the type of the image (<code>SWT.BITMAP</code> or <code>SWT.ICON</code>)
- * @param pixmap the OS handle for the image
+ * @param imageHandle the OS handle for the image
  * @param mask the OS handle for the image mask
  *
  * @noreference This method is not intended to be referenced by clients.
  */
-public static Image gtk_new(Device device, int type, int /*long*/ pixmap, int /*long*/ mask) {
+public static Image gtk_new(Device device, int type, int /*long*/ imageHandle, int /*long*/ mask) {
 	Image image = new Image(device);
 	image.type = type;
-	image.pixmap = pixmap;
+	if (OS.GTK3) {
+		image.surface = imageHandle;
+	} else {
+		image.pixmap = imageHandle;
+		if (OS.USE_CAIRO) image.createSurface();
+	}
 	image.mask = mask;
-	if (OS.USE_CAIRO) image.createSurface();
 	return image;
 }
 
diff --git a/org/eclipse/swt/graphics/ImageData.java b/org/eclipse/swt/graphics/ImageData.java
index ea9f1d4..8b8b4fa 100644
--- a/org/eclipse/swt/graphics/ImageData.java
+++ b/org/eclipse/swt/graphics/ImageData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/ImageLoaderEvent.java b/org/eclipse/swt/graphics/ImageLoaderEvent.java
index d365596..5eeb024 100644
--- a/org/eclipse/swt/graphics/ImageLoaderEvent.java
+++ b/org/eclipse/swt/graphics/ImageLoaderEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/ImageLoaderListener.java b/org/eclipse/swt/graphics/ImageLoaderListener.java
index 631779f..81799b1 100644
--- a/org/eclipse/swt/graphics/ImageLoaderListener.java
+++ b/org/eclipse/swt/graphics/ImageLoaderListener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/PaletteData.java b/org/eclipse/swt/graphics/PaletteData.java
index c73a01f..c66f619 100644
--- a/org/eclipse/swt/graphics/PaletteData.java
+++ b/org/eclipse/swt/graphics/PaletteData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Path.java b/org/eclipse/swt/graphics/Path.java
index 4a2cb56..18dcfb7 100644
--- a/org/eclipse/swt/graphics/Path.java
+++ b/org/eclipse/swt/graphics/Path.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Pattern.java b/org/eclipse/swt/graphics/Pattern.java
index 9e94116..7543d19 100644
--- a/org/eclipse/swt/graphics/Pattern.java
+++ b/org/eclipse/swt/graphics/Pattern.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Point.java b/org/eclipse/swt/graphics/Point.java
index 3d3f9cb..3c0516a 100644
--- a/org/eclipse/swt/graphics/Point.java
+++ b/org/eclipse/swt/graphics/Point.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/RGB.java b/org/eclipse/swt/graphics/RGB.java
index e7a5630..d3bda91 100644
--- a/org/eclipse/swt/graphics/RGB.java
+++ b/org/eclipse/swt/graphics/RGB.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -10,8 +10,8 @@
  *******************************************************************************/
 package org.eclipse.swt.graphics;
 
-import org.eclipse.swt.internal.SerializableCompatibility;
 import org.eclipse.swt.*;
+import org.eclipse.swt.internal.*;
 
 /**
  * Instances of this class are descriptions of colors in
@@ -152,8 +152,13 @@ public RGB(float hue, float saturation, float brightness) {
 /**
  * Returns the hue, saturation, and brightness of the color.
  * 
- * @return color space values in float format (hue, saturation, brightness)
- *
+ * @return color space values in float format:<ul>
+ *             <li>hue (from 0 to 360)</li>
+ *             <li>saturation (from 0 to 1)</li>
+ *             <li>brightness (from 0 to 1)</li>
+ *             </ul>
+ * @see #RGB(float, float, float)
+ * 
  * @since 3.2
  */
 public float[] getHSB() {	
diff --git a/org/eclipse/swt/graphics/Rectangle.java b/org/eclipse/swt/graphics/Rectangle.java
index c09e15f..04ec716 100644
--- a/org/eclipse/swt/graphics/Rectangle.java
+++ b/org/eclipse/swt/graphics/Rectangle.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/graphics/Region.java b/org/eclipse/swt/graphics/Region.java
index a2b8995..cf5f85c 100644
--- a/org/eclipse/swt/graphics/Region.java
+++ b/org/eclipse/swt/graphics/Region.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
 package org.eclipse.swt.graphics;
 
 
+import org.eclipse.swt.internal.cairo.*;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.*;
 
@@ -84,6 +85,57 @@ Region(Device device, int /*long*/ handle) {
 	this.handle = handle;
 }
 
+static int /*long*/ gdk_region_polygon(int[] pointArray, int npoints, int fill_rule) {
+	if (!OS.GTK3) {
+		return OS.gdk_region_polygon(pointArray, npoints, fill_rule);
+	}
+	//TODO this does not perform well and could fail if the polygon is too big
+	int minX = pointArray[0], maxX = minX;
+	int minY = pointArray[1], maxY = minY;
+	int count = npoints * 2;
+	for (int i=2; i<count; i+=2) {
+		int x = pointArray[i], y = pointArray[i + 1];
+		if (x < minX) minX = x;
+		if (x > maxX) maxX = x;
+		if (y < minY) minY = y;
+		if (y > maxY) maxY = y;
+	}
+	int /*long*/ surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_A1, maxX - minX, maxY - minY);
+	if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+	int /*long*/ cairo = Cairo.cairo_create(surface);
+	if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+	Cairo.cairo_move_to(cairo, pointArray[0] - minX, pointArray[1] - minY);
+	for (int i=2; i<count; i+=2) {
+		Cairo.cairo_line_to(cairo, pointArray[i]- minX, pointArray[i+1] - minY);
+	}
+	Cairo.cairo_close_path(cairo);
+	Cairo.cairo_set_source_rgb(cairo, 1, 1, 1);
+	int cairo_rule = Cairo.CAIRO_FILL_RULE_WINDING;
+	if (fill_rule == OS.GDK_EVEN_ODD_RULE) {
+		cairo_rule = Cairo.CAIRO_FILL_RULE_EVEN_ODD;
+	}
+	Cairo.cairo_set_fill_rule(cairo, cairo_rule);
+	Cairo.cairo_fill(cairo);
+	Cairo.cairo_destroy(cairo);
+	int /*long*/ polyRgn = OS.gdk_cairo_region_create_from_surface(surface);
+	OS.gdk_region_offset (polyRgn, minX, minY);
+	Cairo.cairo_surface_destroy(surface);
+	return polyRgn;
+}
+
+static void gdk_region_get_rectangles(int /*long*/ region, int /*long*/[] rectangles, int[] n_rectangles) {
+	if (!OS.GTK3) {
+		OS.gdk_region_get_rectangles (region, rectangles, n_rectangles);
+		return;
+	}
+	int num = Cairo.cairo_region_num_rectangles (region);
+	if (n_rectangles != null) n_rectangles[0] = num;
+	rectangles[0] = OS.g_malloc(GdkRectangle.sizeof * num);
+	for (int n = 0; n < num; n++) {
+		Cairo.cairo_region_get_rectangle (region, n, rectangles[0] + (n * GdkRectangle.sizeof));
+	}
+}
+
 /**
  * Adds the given polygon to the collection of polygons
  * the receiver maintains to describe its area.
@@ -109,7 +161,7 @@ public void add (int[] pointArray) {
 	* with enough points for a polygon.
 	*/
 	if (pointArray.length < 6) return;
-	int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
+	int /*long*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
 	OS.gdk_region_union(handle, polyRgn);
 	OS.gdk_region_destroy(polyRgn);
 }
@@ -265,6 +317,22 @@ public Rectangle getBounds() {
 	return new Rectangle(gdkRect.x, gdkRect.y, gdkRect.width, gdkRect.height);
 }
 
+/**	 
+ * Invokes platform specific functionality to allocate a new region.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>Region</code>. It is marked public only so that it
+ * can be shared within the packages provided by SWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param device the device on which to allocate the region
+ * @param handle the handle for the region
+ * @return a new region object containing the specified device and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
+ */
 public static Region gtk_new(Device device, int /*long*/ handle) {
 	return new Region(device, handle);
 }
@@ -462,7 +530,7 @@ public void subtract (int[] pointArray) {
 	* with enough points for a polygon.
 	*/
 	if (pointArray.length < 6) return;
-	int /*long*/ polyRgn = OS.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
+	int /*long*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE);
 	OS.gdk_region_subtract(handle, polyRgn);
 	OS.gdk_region_destroy(polyRgn);
 }
diff --git a/org/eclipse/swt/graphics/TextLayout.java b/org/eclipse/swt/graphics/TextLayout.java
index c0f4ff3..7c9659d 100644
--- a/org/eclipse/swt/graphics/TextLayout.java
+++ b/org/eclipse/swt/graphics/TextLayout.java
@@ -79,12 +79,6 @@ public TextLayout (Device device) {
 	if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	OS.pango_context_set_language(context, OS.gtk_get_default_language());
 	OS.pango_context_set_base_dir(context, OS.PANGO_DIRECTION_LTR);
-	/*
-	 * Colormap is automatically set for GTK 2.6.0 and newer.
-	 */
-	if (OS.GTK_VERSION < OS.VERSION(2, 6, 0)) {
-	    OS.gdk_pango_context_set_colormap(context, OS.gdk_colormap_get_system());	
-	}
 	layout = OS.pango_layout_new(context);
 	if (layout == 0) SWT.error(SWT.ERROR_NO_HANDLES);
 	OS.pango_layout_set_font_description(layout, device.systemFont.handle);
@@ -240,12 +234,14 @@ void computeRuns () {
 			if (style.underlineColor != null) {
 				GdkColor fg = style.underlineColor.handle;
 				attr = OS.pango_attr_underline_color_new(fg.red, fg.green, fg.blue);
-				OS.memmove(attribute, attr, PangoAttribute.sizeof);
-				attribute.start_index = byteStart;
-				attribute.end_index = byteEnd;
-				OS.memmove(attr, attribute, PangoAttribute.sizeof);
-				OS.pango_attr_list_insert(attrList, attr);
-				OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
+				if (attr != 0) {
+					OS.memmove(attribute, attr, PangoAttribute.sizeof);
+					attribute.start_index = byteStart;
+					attribute.end_index = byteEnd;
+					OS.memmove(attr, attribute, PangoAttribute.sizeof);
+					OS.pango_attr_list_insert(attrList, attr);
+					OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
+				}
 			}
 		}
 		if (style.strikeout) {
@@ -259,12 +255,14 @@ void computeRuns () {
 			if (style.strikeoutColor != null) {
 				GdkColor fg = style.strikeoutColor.handle;
 				attr = OS.pango_attr_strikethrough_color_new(fg.red, fg.green, fg.blue);
-				OS.memmove(attribute, attr, PangoAttribute.sizeof);
-				attribute.start_index = byteStart;
-				attribute.end_index = byteEnd;
-				OS.memmove(attr, attribute, PangoAttribute.sizeof);
-				OS.pango_attr_list_insert(attrList, attr);
-				OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
+				if (attr != 0) {
+					OS.memmove(attribute, attr, PangoAttribute.sizeof);
+					attribute.start_index = byteStart;
+					attribute.end_index = byteEnd;
+					OS.memmove(attr, attribute, PangoAttribute.sizeof);
+					OS.pango_attr_list_insert(attrList, attr);
+					OS.pango_attr_list_insert(selAttrList, OS.pango_attribute_copy(attr));
+				}
 			}
 		}
 		Color foreground = style.foreground;
@@ -636,7 +634,7 @@ void drawBorder(GC gc, int x, int y, GdkColor selectionColor) {
 			if (rgn != 0) {
 				int[] nRects = new int[1];
 				int /*long*/[] rects = new int /*long*/[1];
-				OS.gdk_region_get_rectangles(rgn, rects, nRects);
+				Region.gdk_region_get_rectangles(rgn, rects, nRects);
 				GdkRectangle rect = new GdkRectangle();
 				GdkColor color = null;
 				if (color == null && style.borderColor != null) color = style.borderColor.handle;
@@ -2215,8 +2213,8 @@ int width () {
 	int wrapWidth = OS.pango_layout_get_width(layout);
 	if (wrapWidth != -1) return OS.PANGO_PIXELS(wrapWidth); 
 	int[] w = new int[1], h = new int[1];
-	OS.pango_layout_get_size(layout, w, h);
-	return OS.PANGO_PIXELS(w[0]);
+	OS.pango_layout_get_pixel_size(layout, w, h);
+	return w[0];
 }
 
 } 
diff --git a/org/eclipse/swt/internal/BidiUtil.java b/org/eclipse/swt/internal/BidiUtil.java
index b46c263..09d5187 100644
--- a/org/eclipse/swt/internal/BidiUtil.java
+++ b/org/eclipse/swt/internal/BidiUtil.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/C.java b/org/eclipse/swt/internal/C.java
index 886cb6e..7ea24b8 100644
--- a/org/eclipse/swt/internal/C.java
+++ b/org/eclipse/swt/internal/C.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/Callback.java b/org/eclipse/swt/internal/Callback.java
index ce73d17..6466257 100644
--- a/org/eclipse/swt/internal/Callback.java
+++ b/org/eclipse/swt/internal/Callback.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/Converter.java b/org/eclipse/swt/internal/Converter.java
index 779baed..2e8a186 100644
--- a/org/eclipse/swt/internal/Converter.java
+++ b/org/eclipse/swt/internal/Converter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/ImageList.java b/org/eclipse/swt/internal/ImageList.java
index 0bb0f4d..0a57b14 100644
--- a/org/eclipse/swt/internal/ImageList.java
+++ b/org/eclipse/swt/internal/ImageList.java
@@ -102,7 +102,11 @@ public static int /*long*/ createPixbuf(Image image) {
 		Cairo.cairo_surface_destroy(surface);
 	} else {
 		int [] w = new int [1], h = new int [1];
-	 	OS.gdk_drawable_get_size (image.pixmap, w, h);
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			OS.gdk_pixmap_get_size(image.pixmap, w, h);
+		} else {
+			OS.gdk_drawable_get_size (image.pixmap, w, h);
+		}
 		int /*long*/ colormap = OS.gdk_colormap_get_system ();
 		boolean hasMask = image.mask != 0 && OS.gdk_drawable_get_depth (image.mask) == 1;
 		if (hasMask) {
diff --git a/org/eclipse/swt/internal/LONG.java b/org/eclipse/swt/internal/LONG.java
index 91f0a09..f6225aa 100644
--- a/org/eclipse/swt/internal/LONG.java
+++ b/org/eclipse/swt/internal/LONG.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/Library.java b/org/eclipse/swt/internal/Library.java
index afe4556..daf9a45 100644
--- a/org/eclipse/swt/internal/Library.java
+++ b/org/eclipse/swt/internal/Library.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public class Library {
 	/**
 	 * SWT Minor version number (must be in the range 0..999)
 	 */
-    static int MINOR_VERSION = 233;
+    static int MINOR_VERSION = 333;
 	
 	/**
 	 * SWT revision number (must be >= 0)
diff --git a/org/eclipse/swt/internal/SWTMessages.properties b/org/eclipse/swt/internal/SWTMessages.properties
index a5c0a0f..94ffdca 100644
--- a/org/eclipse/swt/internal/SWTMessages.properties
+++ b/org/eclipse/swt/internal/SWTMessages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2000, 2011 IBM Corporation and others.
+# Copyright (c) 2000, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ SWT_Yes=Yes
 SWT_No=No
 SWT_OK=OK
 SWT_Cancel=Cancel
+SWT_Help=Help
 SWT_Abort=Abort
 SWT_Retry=Retry
 SWT_Ignore=Ignore
@@ -114,4 +115,4 @@ SWT_ValidFrom=Valid From
 SWT_ValidTo=Valid To
 SWT_ValidFromTo=Valid from: {0} to: {1}
 SWT_Subject=Subject
-SWT_SerialNumber=Serial Number
\ No newline at end of file
+SWT_SerialNumber=Serial Number
diff --git a/org/eclipse/swt/internal/SWTMessages_de.properties b/org/eclipse/swt/internal/SWTMessages_de.properties
index 01b482f..f1ba1fe 100644
--- a/org/eclipse/swt/internal/SWTMessages_de.properties
+++ b/org/eclipse/swt/internal/SWTMessages_de.properties
@@ -57,23 +57,30 @@ SWT_Maximize=Maximieren
 SWT_Restore=Wiederherstellen
 SWT_ShowList=Liste anzeigen
 SWT_FileDownload=Datei-Download
+SWT_Download_Error=Ein Fehler ist aufgetreten, Herunterladen wurde abgebrochen
 SWT_Download_File=Herunterladen: {0}
 SWT_Download_Location=Speichern von {0} von {1}
 SWT_Download_Started=Herunterladen...
 SWT_Download_Status=Download: {0,number,integer} KB von {1,number,integer} KB
 SWT_Authentication_Required=Authentifizierung erforderlich
 SWT_Enter_Username_and_Password=Benutzernamen und Kennwort f\u00fcr {0} unter {1} eingeben
+SWT_Page_Load_Failed=Laden der Seite schlug fehl mit Fehler: {0}
 SWT_InvalidCert_Title=Ung\u00fcltiges Zertifikat
 SWT_OnBeforeUnload_Message1=Sind sie sicher, dass sie diese Seite verlassen wollen?
 SWT_OnBeforeUnload_Message2=Klicken sie auf OK um fortzufahren oder auf Abbrechen um auf dieser Seite zu bleiben.
 SWT_ViewCertificate=Zertifikat anschauen
 SWT_Certificate=Zertifikat
 SWT_Continue=Weiter
+SWT_IssuedTo=Ausgestellt f\u00fcr:\t{0}
+SWT_IssuedFrom=Ausgestellt von:\t{0}
+SWT_Issuer=Herausgeber
 SWT_General=Allgemein
 SWT_Details=Details
 SWT_Field=Feld
 SWT_Value=Wert
 SWT_Version=Version
 SWT_ValidFrom=G\u00fcltig ab
+SWT_ValidTo=G\u00fcltig Bis
+SWT_ValidFromTo=G\u00fcltig von: {0} bis: {1}
 SWT_Subject=Subject
 SWT_SerialNumber=Seriennummer
diff --git a/org/eclipse/swt/internal/SWTMessages_en_CA.properties b/org/eclipse/swt/internal/SWTMessages_en_CA.properties
new file mode 100644
index 0000000..e65fb6d
--- /dev/null
+++ b/org/eclipse/swt/internal/SWTMessages_en_CA.properties
@@ -0,0 +1,2 @@
+# Copyright by many contributors; see http://babel.eclipse.org/
+SWT_Color=Colour
diff --git a/org/eclipse/swt/internal/SWTMessages_es.properties b/org/eclipse/swt/internal/SWTMessages_es.properties
index e3f6ff9..efd34e7 100644
--- a/org/eclipse/swt/internal/SWTMessages_es.properties
+++ b/org/eclipse/swt/internal/SWTMessages_es.properties
@@ -57,6 +57,7 @@ SWT_Maximize=Maximizar
 SWT_Restore=Restaurar
 SWT_ShowList=Mostrar Lista
 SWT_FileDownload=Descarga Fichero
+SWT_Download_Error=Ha ocurrido un error, descarga no completa
 SWT_Download_File=Descarga: {0}
 SWT_Download_Location=Guardando {0} desde {1}
 SWT_Download_Started=Descargando...
@@ -64,6 +65,7 @@ SWT_Download_Status=Descarga: {0,number,integer} KB de {1,number,integer} KB
 SWT_Authentication_Required=Autenticaci\u00f3n requerida
 SWT_Enter_Username_and_Password=Introduzca nombre de usuario y contrase\u00f1a para {0} en {1}
 SWT_Page_Load_Failed=Carga de p\u00e1gina fall\u00f3 con error: {0}
+SWT_InvalidCert_Title=Certificado no v\u00e1lido.
 SWT_Continue=Continuar
 SWT_General=General
 SWT_Details=Detalles
@@ -71,4 +73,7 @@ SWT_Field=Campo
 SWT_Value=Valor
 SWT_Version=Versi\u00f3n
 SWT_ValidFrom=V\u00e1lido desde
+SWT_ValidTo=V\u00e1lido hasta
+SWT_ValidFromTo=V\u00e1lido de: {0} a: {1}
 SWT_Subject=Sujeto
+SWT_SerialNumber=N\u00famero de serie
diff --git a/org/eclipse/swt/internal/SWTMessages_eu.properties b/org/eclipse/swt/internal/SWTMessages_eu.properties
new file mode 100644
index 0000000..ad22c21
--- /dev/null
+++ b/org/eclipse/swt/internal/SWTMessages_eu.properties
@@ -0,0 +1,23 @@
+# Copyright by many contributors; see http://babel.eclipse.org/
+SWT_Yes=Bai
+SWT_No=Ez
+SWT_OK=Ados
+SWT_Cancel=Utzi
+SWT_Ignore=Ez ikusia egin
+SWT_Selection=Hautapena
+SWT_Size=Tamaina
+SWT_Save=Gorde
+SWT_Remove=Kendu
+SWT_Up=Gora
+SWT_Down=Behera
+SWT_Charset_ASCII=ASCII
+SWT_Password=Pasahitza:
+SWT_Open=Ireki
+SWT_Close=Itxi
+SWT_Minimize=Minimizatu
+SWT_Restore=Leheneratu
+SWT_General=Orokorra
+SWT_Details=Xehetasunak
+SWT_Field=Eremua
+SWT_Value=Balioa
+SWT_Version=Bertsioa
diff --git a/org/eclipse/swt/internal/SWTMessages_ja.properties b/org/eclipse/swt/internal/SWTMessages_ja.properties
index 7ee4549..0e70089 100644
--- a/org/eclipse/swt/internal/SWTMessages_ja.properties
+++ b/org/eclipse/swt/internal/SWTMessages_ja.properties
@@ -68,6 +68,14 @@ SWT_Page_Load_Failed=\u30a8\u30e9\u30fc\u306b\u3088\u308a\u30da\u30fc\u30b8\u306
 SWT_InvalidCert_Title=\u7121\u52b9\u306a\u8a3c\u660e\u66f8
 SWT_ViewCertificate=\u8a3c\u660e\u66f8\u3092\u8868\u793a
 SWT_Certificate=\u8a3c\u660e\u66f8
+SWT_Controlled_By=\u7ba1\u7406\u8005
+SWT_Controller_For=\u7ba1\u7406\u5bfe\u8c61
+SWT_Described_By=\u8a18\u8f09\u8005
+SWT_Description_For=\u8a18\u8f09\u5bfe\u8c61
+SWT_Flows_From=\u4f9b\u7d66\u5143
+SWT_Flows_To=\u4f9b\u7d66\u5148
+SWT_Label_For=\u30e9\u30d9\u30eb\u5bfe\u8c61
+SWT_Labelled_By=\u30e9\u30d9\u30eb\u5143
 SWT_Continue=\u7d99\u7d9a
 SWT_IssuedTo=\u767a\u884c\u5148:\t{0}
 SWT_IssuedFrom=\u767a\u884c\u5143:\t{0}
@@ -78,5 +86,7 @@ SWT_Field=\u30d5\u30a3\u30fc\u30eb\u30c9
 SWT_Value=\u5024
 SWT_Version=\u30d0\u30fc\u30b8\u30e7\u30f3
 SWT_ValidFrom=\u6709\u52b9\u671f\u9650\u306e\u958b\u59cb
+SWT_ValidTo=\u6709\u52b9\u671f\u9650\u306e\u7d42\u4e86
+SWT_ValidFromTo=\u6709\u52b9\u671f\u9650: {0} - {1}
 SWT_Subject=\u30b5\u30d6\u30b8\u30a7\u30af\u30c8
 SWT_SerialNumber=\u30b7\u30ea\u30a2\u30eb\u756a\u53f7
diff --git a/org/eclipse/swt/internal/SWTMessages_ml.properties b/org/eclipse/swt/internal/SWTMessages_ml.properties
new file mode 100644
index 0000000..09f2699
--- /dev/null
+++ b/org/eclipse/swt/internal/SWTMessages_ml.properties
@@ -0,0 +1,2 @@
+# Copyright by many contributors; see http://babel.eclipse.org/
+SWT_Color=\u0d15\u0d32\u0d4b\u0d30\u0d4d
diff --git a/org/eclipse/swt/internal/SWTMessages_pt.properties b/org/eclipse/swt/internal/SWTMessages_pt.properties
index 58e89c9..fb14bea 100644
--- a/org/eclipse/swt/internal/SWTMessages_pt.properties
+++ b/org/eclipse/swt/internal/SWTMessages_pt.properties
@@ -3,6 +3,7 @@ SWT_Yes=Sim
 SWT_No=N\u00e3o
 SWT_OK=OK
 SWT_Cancel=Cancelar
+SWT_Help=Ajuda
 SWT_Abort=Abortar
 SWT_Retry=Tentar Novamente
 SWT_Ignore=Ignorar
diff --git a/org/eclipse/swt/internal/SWTMessages_pt_BR.properties b/org/eclipse/swt/internal/SWTMessages_pt_BR.properties
index 43993f6..afb3df2 100644
--- a/org/eclipse/swt/internal/SWTMessages_pt_BR.properties
+++ b/org/eclipse/swt/internal/SWTMessages_pt_BR.properties
@@ -3,6 +3,7 @@ SWT_Yes=Sim
 SWT_No=N\u00e3o
 SWT_OK=OK
 SWT_Cancel=Cancelar
+SWT_Help=Ajuda
 SWT_Abort=Interromper
 SWT_Retry=Tentar novamente
 SWT_Ignore=Ignorar
diff --git a/org/eclipse/swt/internal/SWTMessages_uk.properties b/org/eclipse/swt/internal/SWTMessages_uk.properties
index d10afab..48ee71e 100644
--- a/org/eclipse/swt/internal/SWTMessages_uk.properties
+++ b/org/eclipse/swt/internal/SWTMessages_uk.properties
@@ -65,5 +65,6 @@ SWT_Authentication_Required=\u041f\u043e\u0442\u0440\u0456\u0431\u043d\u0430 \u0
 SWT_Enter_Username_and_Password=\u0412\u0432\u0435\u0434\u0456\u0442\u044c \u0456\u043c\''\u044f \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0430 \u0442\u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f {0} \u0432 {1}
 SWT_Page_Load_Failed=\u0417\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u0434\u0430\u043b\u043e \u0437 \u043f\u043e\u043c\u0438\u043b\u043a\u043e\u044e: {0}
 SWT_General=\u0417\u0430\u0433\u0430\u043b\u044c\u043d\u0435
+SWT_Details=\u0414\u0435\u0442\u0430\u043b\u0456
 SWT_Value=\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f
 SWT_Version=\u0412\u0435\u0440\u0441\u0456\u044f
diff --git a/org/eclipse/swt/internal/SWTMessages_zh.properties b/org/eclipse/swt/internal/SWTMessages_zh.properties
index 236247b..5603cf9 100644
--- a/org/eclipse/swt/internal/SWTMessages_zh.properties
+++ b/org/eclipse/swt/internal/SWTMessages_zh.properties
@@ -3,6 +3,7 @@ SWT_Yes=\u662f
 SWT_No=\u5426
 SWT_OK=\u786e\u5b9a
 SWT_Cancel=\u53d6\u6d88
+SWT_Help=\u5E2E\u52A9
 SWT_Abort=\u653e\u5f03
 SWT_Retry=\u91cd\u8bd5
 SWT_Ignore=\u5ffd\u7565
diff --git a/org/eclipse/swt/internal/SWTMessages_zh_TW.properties b/org/eclipse/swt/internal/SWTMessages_zh_TW.properties
index 05e2d8e..8c15f70 100644
--- a/org/eclipse/swt/internal/SWTMessages_zh_TW.properties
+++ b/org/eclipse/swt/internal/SWTMessages_zh_TW.properties
@@ -2,6 +2,7 @@
 SWT_Yes=\u662f
 SWT_No=\u5426
 SWT_OK=\u78ba\u5b9a
+SWT_Help=\u8f14\u52a9\u8aaa\u660e
 SWT_Cancel=\u53d6\u6d88
 SWT_Abort=\u4e2d\u6b62
 SWT_Retry=\u91cd\u8a66
diff --git a/org/eclipse/swt/internal/accessibility/gtk/ATK.java b/org/eclipse/swt/internal/accessibility/gtk/ATK.java
index d643afc..9c38eb9 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/ATK.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/ATK.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -198,8 +198,6 @@ public static final native int AtkTextRectangle_sizeof ();
 /** Natives */
 
 /** @method flags=const */
-public static final native int /*long*/ GTK_TYPE_ACCESSIBLE ();
-/** @method flags=const */
 public static final native int /*long*/ ATK_TYPE_ACTION ();
 /** @method flags=const */
 public static final native int /*long*/ ATK_TYPE_COMPONENT ();
@@ -291,15 +289,6 @@ public static final int /*long*/ ATK_VALUE_GET_IFACE (int /*long*/ handle) {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _GTK_ACCESSIBLE (int /*long*/ handle);
-public static final int /*long*/ GTK_ACCESSIBLE (int /*long*/ handle) {
-	lock.lock();
-	try {
-		return _GTK_ACCESSIBLE(handle);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param object cast=(AtkObject *) */
 public static final native void _atk_focus_tracker_notify (int /*long*/ object);
 public static final void atk_focus_tracker_notify (int /*long*/ object) {
@@ -526,15 +515,6 @@ public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0,
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3);
-public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
-	lock.lock();
-	try {
-		return _call(function, arg0, arg1, arg2, arg3);
-	} finally {
-		lock.unlock();
-	}
-}
 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4);
 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4) {
 	lock.lock();
@@ -544,15 +524,6 @@ public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0,
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5);
-public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5) {
-	lock.lock();
-	try {
-		return _call(function, arg0, arg1, arg2, arg3, arg4, arg5);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param str cast=(char *) */
 public static final native int /*long*/ g_strdup (int /*long*/ str);
 public static final native void memmove (AtkActionIface dest, int /*long*/ src);
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java b/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java
index 1615e45..221b187 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkAttribute.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java
index 50fdc76..f5548fd 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkComponentIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkEditableTextIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkEditableTextIface.java
index f4f7723..566d915 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkEditableTextIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkEditableTextIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2010, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkHypertextIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkHypertextIface.java
index 44e2331..1588516 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkHypertextIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkHypertextIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java b/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java
index cf340b8..9bf25d1 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkObjectFactoryClass.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java
index 71052af..988032b 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkSelectionIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java
index 0ab9f65..557e9fc 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkTextIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java b/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java
index fedd295..15d81b5 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkTextRange.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java b/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java
index 26cfe52..80059fa 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/AtkValueIface.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java b/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java
index 6b1013b..7c00c02 100644
--- a/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java
+++ b/org/eclipse/swt/internal/accessibility/gtk/GtkAccessible.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/cairo/Cairo.java b/org/eclipse/swt/internal/cairo/Cairo.java
index 8f342be..17c6ef7 100644
--- a/org/eclipse/swt/internal/cairo/Cairo.java
+++ b/org/eclipse/swt/internal/cairo/Cairo.java
@@ -1697,6 +1697,26 @@ public static final int cairo_xlib_surface_get_width(int /*long*/ surface) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native int _cairo_region_num_rectangles(int /*long*/ region);
+public static final int cairo_region_num_rectangles(int /*long*/ region) {
+	lock.lock();
+	try {
+		return _cairo_region_num_rectangles(region);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _cairo_region_get_rectangle(int /*long*/ region, int nth, int /*long*/ rectangle);
+public static final void cairo_region_get_rectangle(int /*long*/ region, int nth, int /*long*/ rectangle) {
+	lock.lock();
+	try {
+		 _cairo_region_get_rectangle(region,nth,rectangle);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param dest cast=(void *)
  * @param src cast=(const void *)
diff --git a/org/eclipse/swt/internal/cairo/cairo_path_t.java b/org/eclipse/swt/internal/cairo/cairo_path_t.java
index db690aa..31cac92 100644
--- a/org/eclipse/swt/internal/cairo/cairo_path_t.java
+++ b/org/eclipse/swt/internal/cairo/cairo_path_t.java
@@ -15,7 +15,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Cairo and SWT
- * -  Copyright (C) 2005, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2005, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.cairo;
diff --git a/org/eclipse/swt/internal/cde/CDE.java b/org/eclipse/swt/internal/cde/CDE.java
index f2ea5b5..ec5ffda 100644
--- a/org/eclipse/swt/internal/cde/CDE.java
+++ b/org/eclipse/swt/internal/cde/CDE.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/cde/DtActionArg.java b/org/eclipse/swt/internal/cde/DtActionArg.java
index a9e3698..e9fe865 100644
--- a/org/eclipse/swt/internal/cde/DtActionArg.java
+++ b/org/eclipse/swt/internal/cde/DtActionArg.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/gnome/GNOME.java b/org/eclipse/swt/internal/gnome/GNOME.java
index 30f539d..5691692 100644
--- a/org/eclipse/swt/internal/gnome/GNOME.java
+++ b/org/eclipse/swt/internal/gnome/GNOME.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -38,58 +38,6 @@ public static final native int GnomeVFSMimeApplication_sizeof();
 
 /** Natives */
 
-/** @param mem cast=(gpointer) */
-public static final native void _g_free(int /*long*/ mem);
-public static final void g_free(int /*long*/ mem) {
-	lock.lock();
-	try {
-		_g_free(mem);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param list cast=(GList *)
- * @param data cast=(gpointer)
- */
-public static final native int /*long*/ _g_list_append(int /*long*/ list, int /*long*/ data);
-public static final int /*long*/ g_list_append(int /*long*/ list, int /*long*/ data) {
-	lock.lock();
-	try {
-		return _g_list_append(list, data);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param list cast=(GList *) */
-public static final native void _g_list_free(int /*long*/ list);
-public static final void g_list_free(int /*long*/ list) {
-	lock.lock();
-	try {
-		_g_list_free(list);
-	} finally {
-		lock.unlock();
-	}
-}
-public static final native int /*long*/ _g_list_next(int /*long*/ list);
-public static final int /*long*/ g_list_next(int /*long*/ list) {
-	lock.lock();
-	try {
-		return _g_list_next(list);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param object cast=(gpointer) */
-public static final native void _g_object_unref(int /*long*/ object);
-public static final void g_object_unref(int /*long*/ object) {
-	lock.lock();
-	try {
-		_g_object_unref(object);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param icon_theme cast=(GnomeIconTheme *)
  * @param thumbnail_factory cast=(GnomeThumbnailFactory *)
@@ -132,15 +80,7 @@ public static final int /*long*/ gnome_icon_theme_new() {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gnome_vfs_get_registered_mime_types();
-public static final int /*long*/ gnome_vfs_get_registered_mime_types() {
-	lock.lock();
-	try {
-		return _gnome_vfs_get_registered_mime_types();
-	} finally {
-		lock.unlock();
-	}
-}
+
 /** @param uri cast=(const char *) */
 public static final native int /*long*/ _gnome_vfs_get_mime_type(int /*long*/ uri);
 public static final int /*long*/ gnome_vfs_get_mime_type(int /*long*/ uri) {
@@ -218,16 +158,7 @@ public static final int gnome_vfs_mime_application_launch(int /*long*/ applicati
 		lock.unlock();
 	}
 }
-/** @param list cast=(GList *) */
-public static final native void _gnome_vfs_mime_extensions_list_free(int /*long*/ list);
-public static final void gnome_vfs_mime_extensions_list_free(int /*long*/ list) {
-	lock.lock();
-	try {
-		_gnome_vfs_mime_extensions_list_free(list);
-	} finally {
-		lock.unlock();
-	}
-}
+
 /** @param mimeType cast=(const char *) */
 public static final native int /*long*/ _gnome_vfs_mime_get_default_application(byte[] mimeType);
 public static final int /*long*/ gnome_vfs_mime_get_default_application(byte[] mimeType) {
@@ -238,26 +169,7 @@ public static final int /*long*/ gnome_vfs_mime_get_default_application(byte[] m
 		lock.unlock();
 	}
 }
-/** @param mime_type cast=(const char *) */
-public static final native int /*long*/ _gnome_vfs_mime_get_extensions_list(int /*long*/ mime_type);
-public static final int /*long*/ gnome_vfs_mime_get_extensions_list(int /*long*/ mime_type) {
-	lock.lock();
-	try {
-		return _gnome_vfs_mime_get_extensions_list(mime_type);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param list cast=(GList *) */
-public static final native void _gnome_vfs_mime_registered_mime_type_list_free(int /*long*/ list);
-public static final void gnome_vfs_mime_registered_mime_type_list_free(int /*long*/ list) {
-	lock.lock();
-	try {
-		_gnome_vfs_mime_registered_mime_type_list_free(list);
-	} finally {
-		lock.unlock();
-	}
-}
+
 /** @param file cast=(const char *) */
 public static final native int /*long*/ _gnome_vfs_mime_type_from_name(byte[] file);
 public static final int /*long*/ gnome_vfs_mime_type_from_name(byte[] file) {
diff --git a/org/eclipse/swt/internal/gnome/GnomeVFSMimeApplication.java b/org/eclipse/swt/internal/gnome/GnomeVFSMimeApplication.java
index 53ab852..7f22777 100644
--- a/org/eclipse/swt/internal/gnome/GnomeVFSMimeApplication.java
+++ b/org/eclipse/swt/internal/gnome/GnomeVFSMimeApplication.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GInterfaceInfo.java b/org/eclipse/swt/internal/gtk/GInterfaceInfo.java
index 6e5b746..1e8e288 100644
--- a/org/eclipse/swt/internal/gtk/GInterfaceInfo.java
+++ b/org/eclipse/swt/internal/gtk/GInterfaceInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GObjectClass.java b/org/eclipse/swt/internal/gtk/GObjectClass.java
index 649eba2..570f1ad 100644
--- a/org/eclipse/swt/internal/gtk/GObjectClass.java
+++ b/org/eclipse/swt/internal/gtk/GObjectClass.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GTypeInfo.java b/org/eclipse/swt/internal/gtk/GTypeInfo.java
index 645454e..254f5d6 100644
--- a/org/eclipse/swt/internal/gtk/GTypeInfo.java
+++ b/org/eclipse/swt/internal/gtk/GTypeInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GTypeQuery.java b/org/eclipse/swt/internal/gtk/GTypeQuery.java
index 56d24af..c7e11ae 100644
--- a/org/eclipse/swt/internal/gtk/GTypeQuery.java
+++ b/org/eclipse/swt/internal/gtk/GTypeQuery.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkDragContext.java b/org/eclipse/swt/internal/gtk/GdkDragContext.java
index 912bd5f..9ea6106 100644
--- a/org/eclipse/swt/internal/gtk/GdkDragContext.java
+++ b/org/eclipse/swt/internal/gtk/GdkDragContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventAny.java b/org/eclipse/swt/internal/gtk/GdkEventAny.java
index 5519285..e733e40 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventAny.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventAny.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventButton.java b/org/eclipse/swt/internal/gtk/GdkEventButton.java
index 68a2789..8bb56f4 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventButton.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventButton.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventCrossing.java b/org/eclipse/swt/internal/gtk/GdkEventCrossing.java
index 0c1b40e..326013c 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventCrossing.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventCrossing.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventExpose.java b/org/eclipse/swt/internal/gtk/GdkEventExpose.java
index df0afac..82ae2e0 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventExpose.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventExpose.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -28,7 +28,7 @@ public class GdkEventExpose extends GdkEvent {
 	public int area_width;
 	/** @field accessor=area.height */
 	public int area_height;
-	/** @field cast=(GdkRegion *) */
+	/** @field cast=(void *) */
 	public int /*long*/ region;
 	/** @field cast=(gint) */
 	public int count;
diff --git a/org/eclipse/swt/internal/gtk/GdkEventFocus.java b/org/eclipse/swt/internal/gtk/GdkEventFocus.java
index 83d66a9..95f40a0 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventFocus.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventFocus.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventKey.java b/org/eclipse/swt/internal/gtk/GdkEventKey.java
index 423dc2e..479276a 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventKey.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventKey.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventMotion.java b/org/eclipse/swt/internal/gtk/GdkEventMotion.java
index e813867..38a4669 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventMotion.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventMotion.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventProperty.java b/org/eclipse/swt/internal/gtk/GdkEventProperty.java
index 1abcbd6..48da5e5 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventProperty.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventProperty.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventScroll.java b/org/eclipse/swt/internal/gtk/GdkEventScroll.java
index f364cd6..4b418ed 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventScroll.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventScroll.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventVisibility.java b/org/eclipse/swt/internal/gtk/GdkEventVisibility.java
index 3613c17..4c4f07c 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventVisibility.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventVisibility.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkEventWindowState.java b/org/eclipse/swt/internal/gtk/GdkEventWindowState.java
index 1a5dfdf..b1713b0 100644
--- a/org/eclipse/swt/internal/gtk/GdkEventWindowState.java
+++ b/org/eclipse/swt/internal/gtk/GdkEventWindowState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GdkGCValues.java b/org/eclipse/swt/internal/gtk/GdkGCValues.java
index b05fc32..5b413b6 100644
--- a/org/eclipse/swt/internal/gtk/GdkGCValues.java
+++ b/org/eclipse/swt/internal/gtk/GdkGCValues.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -64,5 +64,4 @@ public class GdkGCValues {
 	public int cap_style;
 	/** @field cast=(GdkJoinStyle) */
 	public int join_style;
-	public static final int sizeof = OS.GdkGCValues_sizeof();
 }
diff --git a/org/eclipse/swt/internal/gtk/GdkImage.java b/org/eclipse/swt/internal/gtk/GdkImage.java
index e0dcf54..629d6a1 100644
--- a/org/eclipse/swt/internal/gtk/GdkImage.java
+++ b/org/eclipse/swt/internal/gtk/GdkImage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java b/org/eclipse/swt/internal/gtk/GdkRGBA.java
similarity index 78%
copy from org/eclipse/swt/internal/gtk/GtkCellRendererClass.java
copy to org/eclipse/swt/internal/gtk/GdkRGBA.java
index d82483b..cf35e2d 100644
--- a/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java
+++ b/org/eclipse/swt/internal/gtk/GdkRGBA.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -15,9 +15,10 @@
 package org.eclipse.swt.internal.gtk;
 
 
-public class GtkCellRendererClass {
-	/** @field cast=(void(*)()) */
-	public int /*long*/ render;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ get_size;
+public class GdkRGBA {
+	public double red; 
+	public double green;
+	public double blue;
+	public double alpha;
+	public static final int sizeof = OS.GdkRGBA_sizeof();
 }
diff --git a/org/eclipse/swt/internal/gtk/GdkWindowAttr.java b/org/eclipse/swt/internal/gtk/GdkWindowAttr.java
index 33e9930..eacf112 100644
--- a/org/eclipse/swt/internal/gtk/GdkWindowAttr.java
+++ b/org/eclipse/swt/internal/gtk/GdkWindowAttr.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -25,7 +25,7 @@ public class GdkWindowAttr {
 	public int wclass;
 	/** @field cast=(GdkVisual *) */
 	public int /*long*/ visual;
-	/** @field cast=(GdkColormap *) */
+	/** @field cast=(GdkColormap *),exclude=#ifndef GTK3 */
 	public int /*long*/ colormap;
 	public int window_type;
 	/** @field cast=(GdkCursor *) */
diff --git a/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java b/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java
index d82483b..af12680 100644
--- a/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java
+++ b/org/eclipse/swt/internal/gtk/GtkCellRendererClass.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,6 +18,8 @@ package org.eclipse.swt.internal.gtk;
 public class GtkCellRendererClass {
 	/** @field cast=(void(*)()) */
 	public int /*long*/ render;
-	/** @field cast=(void(*)()) */
+	/** @field cast=(void(*)()),exclude=#ifndef GTK3 */
 	public int /*long*/ get_size;
+	/** @field cast=(void(*)()),exclude=#ifdef GTK3 */
+	public int /*long*/ get_preferred_width;
 }
diff --git a/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java b/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java
index b94ccfa..1675375 100644
--- a/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java
+++ b/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GtkFixed.java b/org/eclipse/swt/internal/gtk/GtkFixed.java
index 93b1af7..3442789 100644
--- a/org/eclipse/swt/internal/gtk/GtkFixed.java
+++ b/org/eclipse/swt/internal/gtk/GtkFixed.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GtkSelectionData.java b/org/eclipse/swt/internal/gtk/GtkSelectionData.java
index 6c413af..006a3a7 100644
--- a/org/eclipse/swt/internal/gtk/GtkSelectionData.java
+++ b/org/eclipse/swt/internal/gtk/GtkSelectionData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GtkTargetEntry.java b/org/eclipse/swt/internal/gtk/GtkTargetEntry.java
index cf31774..789eec9 100644
--- a/org/eclipse/swt/internal/gtk/GtkTargetEntry.java
+++ b/org/eclipse/swt/internal/gtk/GtkTargetEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/GtkTargetPair.java b/org/eclipse/swt/internal/gtk/GtkTargetPair.java
deleted file mode 100644
index c98fb12..0000000
--- a/org/eclipse/swt/internal/gtk/GtkTargetPair.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html.  If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- * 
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.gtk;
-
-
-public class GtkTargetPair {
-	/** @field cast=(GdkAtom) */
-	public int /*long*/ target;
-	/** @field cast=(guint) */
-	public int flags;
-	/** @field cast=(guint) */
-	public int info;
-	public static final int sizeof = OS.GtkTargetPair_sizeof();
-}
diff --git a/org/eclipse/swt/internal/gtk/GtkWidgetClass.java b/org/eclipse/swt/internal/gtk/GtkWidgetClass.java
index 691a60f..cce3a18 100644
--- a/org/eclipse/swt/internal/gtk/GtkWidgetClass.java
+++ b/org/eclipse/swt/internal/gtk/GtkWidgetClass.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -16,130 +16,8 @@ package org.eclipse.swt.internal.gtk;
 
 
 public class GtkWidgetClass extends GObjectClass {
-	public int activate_signal;
-	public int set_scroll_adjustments_signal;	
-	/** @field cast=(void(*)()) */
-	public int /*long*/ dispatch_child_properties_changed;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ show;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ show_all;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ hide;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ hide_all;
 	/** @field cast=(void(*)()) */
 	public int /*long*/ map;
 	/** @field cast=(void(*)()) */
-	public int /*long*/ unmap;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ realize;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ unrealize;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ size_request;
-	/** @field cast=(void(*)()) */
 	public int /*long*/ size_allocate;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ state_changed; 
-	/** @field cast=(void(*)()) */
-	public int /*long*/ parent_set;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ hierarchy_changed;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ style_set;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ direction_changed;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ grab_notify;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ child_notify;	
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ mnemonic_activate;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ grab_focus;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ focus;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ button_press_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ button_release_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ scroll_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ motion_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ delete_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ destroy_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ expose_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ key_press_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ key_release_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ enter_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ leave_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ configure_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ focus_in_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ focus_out_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ map_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ unmap_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ property_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ selection_clear_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ selection_request_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ selection_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ proximity_in_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ proximity_out_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ visibility_notify_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ client_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ no_expose_event;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ window_state_event;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ selection_get;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ selection_received;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_begin;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_end;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_data_get;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_data_delete;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_leave;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ drag_motion;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ drag_drop;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ drag_data_received;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ popup_menu;
-	/** @field cast=(gboolean(*)()) */
-	public int /*long*/ show_help;
-	/** @field cast=(AtkObject*(*)()) */
-	public int /*long*/ get_accessible;
-	/** @field cast=(void(*)()) */
-	public int /*long*/ screen_changed;
 }
diff --git a/org/eclipse/swt/internal/gtk/OS.java b/org/eclipse/swt/internal/gtk/OS.java
index ea39bc8..c6b760e 100644
--- a/org/eclipse/swt/internal/gtk/OS.java
+++ b/org/eclipse/swt/internal/gtk/OS.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -19,7 +19,17 @@ import org.eclipse.swt.internal.*;
 
 public class OS extends C {
 	static {
-		Library.loadLibrary("swt-pi");
+		boolean loaded = false;
+		String prop = "SWT_GTK3";
+		if (System.getProperty(prop) != null || OS.getenv(ascii(prop)) != 0) {
+			try {
+				Library.loadLibrary("swt-pi3");
+				loaded = true;
+			} catch (Throwable e) {}
+		}
+		if (!loaded) {
+			Library.loadLibrary("swt-pi");
+		}
 	}
 	
 	/** OS Constants */
@@ -207,6 +217,7 @@ public class OS extends C {
 	public static final int GDK_NOTIFY_INFERIOR = 2;
 	public static final int GDK_Num_Lock = 0xFF7F;
 	public static final int GDK_OVERLAP_RECTANGLE_OUT = 0x1;
+	public static final int GDK_OWNERSHIP_NONE = 0;	
 	public static final int GDK_PIXBUF_ALPHA_BILEVEL = 0x0;
 	public static final int GDK_POINTER_MOTION_HINT_MASK = 0x8;
 	public static final int GDK_POINTER_MOTION_MASK = 0x4;
@@ -229,6 +240,9 @@ public class OS extends C {
 	public static final int GDK_SCROLL_DOWN = 1;
 	public static final int GDK_SCROLL_LEFT = 2;
 	public static final int GDK_SCROLL_RIGHT = 3;
+	public static final int GDK_SCROLL_SMOOTH = 4;
+	public static final int GDK_SCROLL_MASK = 1 << 21;
+	public static final int GDK_SMOOTH_SCROLL_MASK = 1 << 23;
 	public static final int GDK_SELECTION_CLEAR = 17;
 	public static final int GDK_SELECTION_NOTIFY = 19;
 	public static final int GDK_SELECTION_REQUEST = 18;
@@ -368,6 +382,14 @@ public class OS extends C {
 	public static final int GTK_STATE_NORMAL = 0x0;
 	public static final int GTK_STATE_PRELIGHT = 0x2;
 	public static final int GTK_STATE_SELECTED = 0x3;
+	public static final int GTK_STATE_FLAG_NORMAL = 0;
+	public static final int GTK_STATE_FLAG_ACTIVE = 1 << 0;
+	public static final int GTK_STATE_FLAG_PRELIGHT = 1 << 1;
+	public static final int GTK_STATE_FLAG_SELECTED = 1 << 2;
+	public static final int GTK_STATE_FLAG_INSENSITIVE = 1 << 3;
+	public static final int GTK_STATE_FLAG_INCONSISTENT = 1 << 4;
+	public static final int GTK_STATE_FLAG_FOCUSED = 1 << 5;
+	public static final int GTK_STATE_FLAG_BACKDROP  = 1 << 6;
 	public static final int GTK_TEXT_DIR_LTR = 1;
 	public static final int GTK_TEXT_DIR_NONE = 0 ;
 	public static final int GTK_TEXT_DIR_RTL = 2;
@@ -390,6 +412,7 @@ public class OS extends C {
 	public static final int GTK_TREE_VIEW_GRID_LINES_HORIZONTAL = 1;
 	public static final int GTK_TREE_VIEW_GRID_LINES_VERTICAL = 2;
 	public static final int GTK_TREE_VIEW_GRID_LINES_BOTH = 3;
+	public static final int GTK_STYLE_PROVIDER_PRIORITY_APPLICATION = 600;
 	public static final int GDK_UNMAP = 15;
 	public static final int GTK_UNIT_PIXEL = 0;
 	public static final int GTK_UNIT_POINTS = 1;
@@ -485,6 +508,7 @@ public class OS extends C {
 	public static final byte[] drag_end = ascii("drag_end");
 	public static final byte[] drag_leave = ascii("drag_leave");
 	public static final byte[] drag_motion = ascii("drag_motion");
+	public static final byte[] draw = ascii("draw");
 	public static final byte[] enter_notify_event = ascii("enter-notify-event");
 	public static final byte[] event = ascii("event");
 	public static final byte[] event_after = ascii("event-after");
@@ -501,6 +525,7 @@ public class OS extends C {
 	public static final byte[] key_press_event = ascii("key-press-event");
 	public static final byte[] key_release_event = ascii("key-release-event");
 	public static final byte[] leave_notify_event = ascii("leave-notify-event");
+	public static final byte[] link_color = ascii("link-color");
 	public static final byte[] map = ascii("map");
 	public static final byte[] map_event = ascii("map-event");
 	public static final byte[] mnemonic_activate = ascii("mnemonic-activate");
@@ -540,6 +565,12 @@ public class OS extends C {
 	public static final byte[] visibility_notify_event = ascii("visibility-notify-event");
 	public static final byte[] window_state_event = ascii("window-state-event");
 	
+	public static final byte[] GTK_STYLE_CLASS_TOOLTIP = ascii("tooltip");
+	public static final byte[] GTK_STYLE_CLASS_VIEW = ascii("view");
+	public static final byte[] GTK_STYLE_CLASS_CELL = ascii("cell");
+	public static final byte[] GTK_STYLE_CLASS_PANE_SEPARATOR = ascii("pane-separator");
+	public static final byte[] GTK_STYLE_CLASS_FRAME = ascii("frame");
+	
 	/** Properties */
 	public static final byte[] active = ascii("active");
 	public static final byte[] background_gdk = ascii("background-gdk");
@@ -563,6 +594,10 @@ public class OS extends C {
 	public static final byte[] gtk_menu_bar_accel = ascii("gtk-menu-bar-accel");
 	public static final byte[] gtk_menu_images = ascii("gtk-menu-images");
 	public static final byte[] inner_border = ascii("inner-border");
+	public static final byte[] has_backward_stepper = ascii("has-backward-stepper");
+	public static final byte[] has_secondary_backward_stepper = ascii("has-secondary-backward-stepper");
+	public static final byte[] has_forward_stepper = ascii("has-forward-stepper");
+	public static final byte[] has_secondary_forward_stepper = ascii("has-secondary-forward-stepper");
 	public static final byte[] horizontal_separator = ascii("horizontal-separator");
 	public static final byte[] inconsistent = ascii("inconsistent");
 	public static final byte[] indicator_size = ascii("indicator-size");
@@ -572,6 +607,7 @@ public class OS extends C {
 	public static final byte[] model = ascii("model");
 	public static final byte[] spacing = ascii("spacing");
 	public static final byte[] pixbuf = ascii("pixbuf");
+	public static final byte[] gicon = ascii("gicon");
 	public static final byte[] text = ascii("text");
 	public static final byte[] xalign = ascii("xalign");
 	public static final byte[] ypad = ascii("ypad");
@@ -581,13 +617,15 @@ public class OS extends C {
 	public static final byte[] GTK_STOCK_CLEAR = ascii("gtk-clear");
 	
 	public static final int GTK_VERSION = VERSION(gtk_major_version(), gtk_minor_version(), gtk_micro_version()); 
+	public static final int GLIB_VERSION = VERSION(glib_major_version(), glib_minor_version(), glib_micro_version());
+	public static final boolean GTK3 = GTK_VERSION >= VERSION(3, 0, 0);
 	public static final boolean USE_CAIRO, INIT_CAIRO;
 	static {
 		boolean useCairo = false;
 		if (!"false".equals(System.getProperty("org.eclipse.swt.internal.gtk.cairoGraphics"))) {
 			useCairo  = GTK_VERSION >= VERSION(2, 24, 0);
 		}
-		USE_CAIRO = useCairo;
+		USE_CAIRO = useCairo || OS.GTK3;
 		boolean initCairo = false;
 		if (!"false".equals(System.getProperty("org.eclipse.swt.internal.gtk.useCairo"))) {
 			initCairo  = GTK_VERSION >= VERSION(2, 17, 0);
@@ -616,6 +654,7 @@ public static final native int GPollFD_sizeof ();
 public static final native int GTypeInfo_sizeof ();
 public static final native int GTypeQuery_sizeof ();
 public static final native int GdkColor_sizeof();
+public static final native int GdkRGBA_sizeof();
 public static final native int GdkDragContext_sizeof();
 public static final native int GdkEvent_sizeof();
 public static final native int GdkEventAny_sizeof();
@@ -629,22 +668,16 @@ public static final native int GdkEventProperty_sizeof();
 public static final native int GdkEventScroll_sizeof();
 public static final native int GdkEventVisibility_sizeof();
 public static final native int GdkEventWindowState_sizeof();
-public static final native int GdkGCValues_sizeof();
 public static final native int GdkGeometry_sizeof();
-public static final native int GdkImage_sizeof();
 public static final native int GdkRectangle_sizeof();
-public static final native int GdkVisual_sizeof();
 public static final native int GdkWindowAttr_sizeof();
 public static final native int GtkAdjustment_sizeof();
 public static final native int GtkAllocation_sizeof();
 public static final native int GtkBorder_sizeof();
 public static final native int GtkColorSelectionDialog_sizeof();
-public static final native int GtkFixed_sizeof();
-public static final native int GtkFixedClass_sizeof();
 public static final native int GtkRequisition_sizeof();
 public static final native int GtkSelectionData_sizeof();
 public static final native int GtkTargetEntry_sizeof();
-public static final native int GtkTargetPair_sizeof();
 public static final native int GtkTextIter_sizeof();
 public static final native int GtkCellRendererText_sizeof();
 public static final native int GtkCellRendererTextClass_sizeof();
@@ -702,14 +735,6 @@ public static final native int GTK_WIDGET_Y(int /*long*/ widget);
 public static final native int GTK_RANGE_SLIDER_START(int /*long*/ widget);
 /** @param widget cast=(GtkRange *) */
 public static final native int GTK_RANGE_SLIDER_END(int /*long*/ widget);
-/** @param widget cast=(GtkRange *) */
-public static final native boolean GTK_RANGE_HAS_STEPPER_A(int /*long*/ widget);
-/** @param widget cast=(GtkRange *) */
-public static final native boolean GTK_RANGE_HAS_STEPPER_B(int /*long*/ widget);
-/** @param widget cast=(GtkRange *) */
-public static final native boolean GTK_RANGE_HAS_STEPPER_C(int /*long*/ widget);
-/** @param widget cast=(GtkRange *) */
-public static final native boolean GTK_RANGE_HAS_STEPPER_D(int /*long*/ widget);
 /** @param widget cast=(GtkScrolledWindow *) */
 public static final native int /*long*/ GTK_SCROLLED_WINDOW_HSCROLLBAR(int /*long*/ widget);
 /** @param widget cast=(GtkScrolledWindow *) */
@@ -739,10 +764,6 @@ public static final native void GTK_TOOLTIPS_SET_ACTIVE(int /*long*/ widget, int
  */
 public static final native int /*long*/ GTK_TOOLTIPS_GET_TIP_TEXT(int /*long*/ data);
 /** @param widget cast=(GtkWidget *) */
-public static final native void GTK_WIDGET_SET_HEIGHT(int /*long*/ widget, int height);
-/** @param widget cast=(GtkWidget *) */
-public static final native void GTK_WIDGET_SET_WIDTH(int /*long*/ widget, int width);
-/** @param widget cast=(GtkWidget *) */
 public static final native void GTK_WIDGET_SET_X(int /*long*/ widget, int x);
 /** @param widget cast=(GtkWidget *) */
 public static final native void GTK_WIDGET_SET_Y(int /*long*/ widget, int y);
@@ -809,43 +830,42 @@ public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0,
 		lock.unlock();
 	}
 }
-/** @method flags=no_gen */
-public static final native boolean GDK_WINDOWING_X11();
-/** @param pixmap cast=(GdkPixmap *) */
-public static final native int /*long*/ _GDK_PIXMAP_XID(int /*long*/ pixmap);
-public static final int /*long*/ GDK_PIXMAP_XID(int /*long*/ pixmap) {
+public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3);
+public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
 	lock.lock();
 	try {
-		return _GDK_PIXMAP_XID(pixmap);
+		return _call(function, arg0, arg1, arg2, arg3);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @param display cast=(Display *)
- * @param event_mask cast=(long)
- * @param event_return cast=(XEvent *)
- */
-public static final native boolean _XCheckMaskEvent(int /*long*/ display, int /*long*/ event_mask, int /*long*/ event_return);
-public static final boolean XCheckMaskEvent(int /*long*/ display, int /*long*/ event_mask, int /*long*/ event_return) {
+public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5);
+public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5) {
 	lock.lock();
 	try {
-		return _XCheckMaskEvent(display, event_mask, event_return);
+		return _call(function, arg0, arg1, arg2, arg3, arg4, arg5);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @param display cast=(Display *)
- * @param window cast=(Window)
- * @param event_mask cast=(long)
- * @param event_return cast=(XEvent *)
- */
-public static final native boolean _XCheckWindowEvent(int /*long*/ display, int /*long*/ window, int /*long*/ event_mask, int /*long*/ event_return);
-public static final boolean XCheckWindowEvent(int /*long*/ display, int /*long*/ window, int /*long*/ event_mask, int /*long*/ event_return) {
+/** @method flags=no_gen */
+public static final native void _call_get_size (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5, int /*long*/ arg6);
+public static final void call_get_size (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5, int /*long*/ arg6) {
+	lock.lock();
+	try {
+		 _call_get_size(function, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=no_gen */
+public static final native boolean GDK_WINDOWING_X11();
+/** @param pixmap cast=(GdkPixmap *) */
+public static final native int /*long*/ _GDK_PIXMAP_XID(int /*long*/ pixmap);
+public static final int /*long*/ GDK_PIXMAP_XID(int /*long*/ pixmap) {
 	lock.lock();
 	try {
-		return _XCheckWindowEvent(display, window, event_mask, event_return);
+		return _GDK_PIXMAP_XID(pixmap);
 	} finally {
 		lock.unlock();
 	}
@@ -992,23 +1012,6 @@ public static final int XQueryPointer(int /*long*/ display, int /*long*/ w, int
 }
 /**
  * @param display cast=(Display *)
- * @param w cast=(Window)
- * @param root_return cast=(Window *)
- * @param parent_return cast=(Window *)
- * @param children_return cast=(Window **)
- * @param nchildren_return cast=(unsigned int *)
- */
-public static final native int _XQueryTree(int /*long*/ display, int /*long*/ w, int /*long*/[] root_return, int /*long*/[] parent_return, int /*long*/[] children_return, int[] nchildren_return);
-public static final int XQueryTree(int /*long*/ display, int /*long*/ w, int /*long*/[] root_return, int /*long*/[] parent_return, int /*long*/[] children_return, int[] nchildren_return) {
-	lock.lock();
-	try {
-		return _XQueryTree(display, w, root_return, parent_return, children_return, nchildren_return);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param display cast=(Display *)
  * @param keysym cast=(KeySym)
  */
 public static final native int _XKeysymToKeycode(int /*long*/ display, int /*long*/ keysym);
@@ -1184,16 +1187,6 @@ public static final int /*long*/ gdk_x11_atom_to_xatom(int /*long*/ atom) {
 		lock.unlock();
 	}
 }
-/** @param colormap cast=(GdkColormap *) */
-public static final native int /*long*/ _gdk_x11_colormap_get_xcolormap(int /*long*/ colormap);
-public static final int /*long*/ gdk_x11_colormap_get_xcolormap(int /*long*/ colormap) {
-	lock.lock();
-	try {
-		return _gdk_x11_colormap_get_xcolormap(colormap);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param gdkdisplay cast=(GdkDisplay *) */
 public static final native int /*long*/ _gdk_x11_display_get_xdisplay(int /*long*/ gdkdisplay);
 public static final int /*long*/ gdk_x11_display_get_xdisplay (int /*long*/ gdkdisplay) {
@@ -1204,7 +1197,7 @@ public static final int /*long*/ gdk_x11_display_get_xdisplay (int /*long*/ gdkd
 		lock.unlock();
 	}
 }
-/** @param drawable cast=(GdkDrawable *) */
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_x11_drawable_get_xdisplay(int /*long*/ drawable);
 public static final int /*long*/ gdk_x11_drawable_get_xdisplay(int /*long*/ drawable) {
 	lock.lock();
@@ -1214,7 +1207,7 @@ public static final int /*long*/ gdk_x11_drawable_get_xdisplay(int /*long*/ draw
 		lock.unlock();
 	}
 }
-/** @param drawable cast=(GdkDrawable *) */
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_x11_drawable_get_xid(int /*long*/ drawable);
 public static final int /*long*/ gdk_x11_drawable_get_xid(int /*long*/ drawable) {
 	lock.lock();
@@ -1224,6 +1217,15 @@ public static final int /*long*/ gdk_x11_drawable_get_xid(int /*long*/ drawable)
 		lock.unlock();
 	}
 }
+public static final native int /*long*/ _gdk_x11_get_default_xdisplay();
+public static final int /*long*/ gdk_x11_get_default_xdisplay () {
+	lock.lock();
+	try {
+		return _gdk_x11_get_default_xdisplay();
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @method flags=dynamic
  * @param screen cast=(GdkScreen *)
@@ -1262,23 +1264,27 @@ public static final int /*long*/ gdk_x11_visual_get_xvisual(int /*long*/ visual)
 	}
 }
 /**
- * @method flags=dynamic
- * @param gdkdisplay cast=(GdkDisplay *)
- */
-public static final native int /*long*/ _gdk_x11_window_lookup_for_display(int /*long*/ gdkdisplay, int /*long*/ xid);
-public static final int /*long*/ gdk_x11_window_lookup_for_display(int /*long*/ gdkdisplay, int /*long*/ xid) {
+* @method flags=dynamic
+* @param gdkwindow cast=(GdkWindow *)
+*/
+public static final native int /*long*/ _gdk_x11_window_get_xid(int /*long*/ gdkwindow);
+public static final int /*long*/ gdk_x11_window_get_xid(int /*long*/ gdkwindow) {
 	lock.lock();
 	try {
-		return _gdk_x11_window_lookup_for_display(gdkdisplay, xid);
+		return _gdk_x11_window_get_xid(gdkwindow);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gdk_pixmap_foreign_new(int /*long*/ anid);
-public static final int /*long*/ gdk_pixmap_foreign_new(int /*long*/ anid) {
+/**
+ * @method flags=dynamic
+ * @param gdkdisplay cast=(GdkDisplay *)
+ */
+public static final native int /*long*/ _gdk_x11_window_lookup_for_display(int /*long*/ gdkdisplay, int /*long*/ xid);
+public static final int /*long*/ gdk_x11_window_lookup_for_display(int /*long*/ gdkdisplay, int /*long*/ xid) {
 	lock.lock();
 	try {
-		return _gdk_pixmap_foreign_new(anid);
+		return _gdk_x11_window_lookup_for_display(gdkdisplay, xid);
 	} finally {
 		lock.unlock();
 	}
@@ -1334,26 +1340,8 @@ public static final native void memmove(int /*long*/ dest, XClientMessageEvent s
  * @param src cast=(const void *),flags=no_out
  * @param size cast=(size_t)
  */
-public static final native void memmove(int /*long*/ dest, XCrossingEvent src, int /*long*/ size);
-/**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
 public static final native void memmove(int /*long*/ dest, XExposeEvent src, int /*long*/ size);
 /**
- * @param dest cast=(void *)
- * @param src cast=(const void *),flags=no_out
- * @param size cast=(size_t)
- */
-public static final native void memmove(int /*long*/ dest, XFocusChangeEvent src, int /*long*/ size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(XCrossingEvent dest, int /*long*/ src, int /*long*/ size);
-/**
  * @param dest cast=(void *),flags=no_in
  * @param src cast=(const void *)
  * @param size cast=(size_t)
@@ -1487,6 +1475,10 @@ public static final int /*long*/ XRenderFindVisualFormat(int /*long*/ display, i
 
 /** @method flags=no_gen */
 public static final native int /*long*/ pangoLayoutNewProc_CALLBACK(int /*long*/ func);
+/** @method flags=no_gen */
+public static final native int /*long*/ imContextNewProc_CALLBACK(int /*long*/ func);
+/** @method flags=no_gen */
+public static final native int /*long*/ imContextLast();
 
 
 /** Natives */
@@ -1512,6 +1504,9 @@ public static final int /*long*/ GDK_TYPE_PIXBUF() {
 		lock.unlock();
 	}
 }
+/** @method flags=const */
+public static final native int /*long*/ GTK_TYPE_ACCESSIBLE ();
+public static final native int /*long*/ _GTK_ACCESSIBLE (int /*long*/ handle);
 public static final native boolean _GTK_IS_ACCEL_LABEL(int /*long*/ obj);
 public static final boolean GTK_IS_ACCEL_LABEL(int /*long*/ obj) {
 	lock.lock();
@@ -1680,6 +1675,16 @@ public static final int /*long*/ GTK_TYPE_CELL_RENDERER_TOGGLE() {
 	}
 }
 /** @method flags=const */
+public static final native int /*long*/ _GTK_TYPE_IM_MULTICONTEXT();
+public static final int /*long*/ GTK_TYPE_IM_MULTICONTEXT() {
+	lock.lock();
+	try {
+		return _GTK_TYPE_IM_MULTICONTEXT();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=const */
 public static final native int /*long*/ _GTK_TYPE_FIXED();
 public static final int /*long*/ GTK_TYPE_FIXED() {
 	lock.lock();
@@ -1718,20 +1723,21 @@ public static final int GTK_WIDGET_FLAGS(int /*long*/ wid) {
 		lock.unlock();
 	}
 }
-public static final native int _GTK_WIDGET_STATE(int /*long*/ wid);
-public static final int GTK_WIDGET_STATE(int /*long*/ wid) {
+public static final native boolean _GTK_WIDGET_HAS_DEFAULT(int /*long*/ wid);
+public static final boolean GTK_WIDGET_HAS_DEFAULT(int /*long*/ wid) {
 	lock.lock();
 	try {
-		return _GTK_WIDGET_STATE(wid);
+		return _GTK_WIDGET_HAS_DEFAULT(wid);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native boolean _GTK_WIDGET_HAS_DEFAULT(int /*long*/ wid);
-public static final boolean GTK_WIDGET_HAS_DEFAULT(int /*long*/ wid) {
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_has_default(int /*long*/ widget);
+public static final boolean gtk_widget_has_default(int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _GTK_WIDGET_HAS_DEFAULT(wid);
+		return _gtk_widget_has_default(widget);
 	} finally {
 		lock.unlock();
 	}
@@ -1763,6 +1769,16 @@ public static final boolean GTK_WIDGET_SENSITIVE(int /*long*/ wid) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_get_sensitive(int /*long*/ widget);
+public static final boolean gtk_widget_get_sensitive(int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_sensitive(widget);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native void _GTK_WIDGET_SET_FLAGS(int /*long*/ wid, int flag);
 public static final void GTK_WIDGET_SET_FLAGS(int /*long*/ wid, int flag) {
 	lock.lock();
@@ -1959,16 +1975,6 @@ public static final int /*long*/ g_app_info_get_icon(int /*long*/ appInfo) {
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _g_app_info_get_id(int /*long*/ appInfo);
-public static final int /*long*/ g_app_info_get_id(int /*long*/ appInfo) {
-	lock.lock();
-	try {
-		return _g_app_info_get_id(appInfo);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int /*long*/ _g_app_info_get_name(int /*long*/ appInfo);
 public static final int /*long*/ g_app_info_get_name(int /*long*/ appInfo) {
 	lock.lock();
@@ -2039,8 +2045,8 @@ public static final int /*long*/ g_data_input_stream_new(int /*long*/ input_stre
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _g_data_input_stream_read_line(int /*long*/ stream, int[] count, int /*long*/ cancellable, int /*long*/ error);
-public static final int /*long*/ g_data_input_stream_read_line(int /*long*/ stream, int[] count, int /*long*/ cancellable, int /*long*/ error) {
+public static final native int /*long*/ _g_data_input_stream_read_line(int /*long*/ stream, int /*long*/ [] count, int /*long*/ cancellable, int /*long*/ error);
+public static final int /*long*/ g_data_input_stream_read_line(int /*long*/ stream, int /*long*/ [] count, int /*long*/ cancellable, int /*long*/ error) {
 	lock.lock();
 	try {
 		return _g_data_input_stream_read_line(stream, count, cancellable, error);
@@ -2069,36 +2075,6 @@ public static final boolean g_content_type_is_a(int /*long*/ type, byte[] supert
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _g_content_type_get_mime_type(byte[] mime_type);
-public static final int /*long*/ g_content_type_get_mime_type(byte[] mime_type) {
-	lock.lock();
-	try {
-		return _g_content_type_get_mime_type(mime_type);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native int /*long*/ _g_content_types_get_registered();
-public static final int /*long*/ g_content_types_get_registered() {
-	lock.lock();
-	try {
-		return _g_content_types_get_registered();
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native int /*long*/ _g_desktop_app_info_new_from_filename(byte[] fileName);
-public static final int /*long*/ g_desktop_app_info_new_from_filename(byte[] fileName) {
-	lock.lock();
-	try {
-		return _g_desktop_app_info_new_from_filename(fileName);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int /*long*/ _g_file_info_get_content_type (int /*long*/ info);
 public static final int /*long*/ g_file_info_get_content_type (int /*long*/ info) {
 	lock.lock();
@@ -2109,16 +2085,6 @@ public static final int /*long*/ g_file_info_get_content_type (int /*long*/ info
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _g_file_get_path(int /*long*/ file);
-public static final int /*long*/ g_file_get_path (int /*long*/ file) {
-	lock.lock();
-	try {
-		return _g_file_get_path(file);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int /*long*/ _g_file_get_uri(int /*long*/ file);
 public static final int /*long*/ g_file_get_uri (int /*long*/ file) {
 	lock.lock();
@@ -2139,16 +2105,6 @@ public static final void g_file_info_get_modification_time(int /*long*/ info, in
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _g_file_icon_get_file(int /*long*/ icon);
-public static final int /*long*/ g_file_icon_get_file(int /*long*/ icon) {
-	lock.lock();
-	try {
-		return _g_file_icon_get_file(icon);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int /*long*/ _g_file_new_for_path(byte[] fileName);
 public static final int /*long*/ g_file_new_for_path(byte[] fileName) {
 	lock.lock();
@@ -2335,16 +2291,6 @@ public static final boolean g_main_context_iteration(int /*long*/ context, boole
 	}
 }
 /** @param context cast=(GMainContext *) */
-public static final native boolean _g_main_context_pending(int /*long*/ context);
-public static final boolean g_main_context_pending(int /*long*/ context) {
-	lock.lock();
-	try {
-		return _g_main_context_pending(context);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param context cast=(GMainContext *) */
 public static final native int /*long*/ _g_main_context_get_poll_func(int /*long*/ context);
 public static final int /*long*/ g_main_context_get_poll_func(int /*long*/ context) {
 	lock.lock();
@@ -2406,6 +2352,18 @@ public static final int /*long*/ g_filename_to_utf8(int /*long*/ opsysstring, in
 	}
 }
 /**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _g_filename_display_name(int /*long*/ filename);
+public static final int /*long*/ g_filename_display_name(int /*long*/ filename) {
+	lock.lock();
+	try {
+		return _g_filename_display_name(filename);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param filename cast=(const char *)
  * @param hostname cast=(const char *)
  * @param error cast=(GError **)
@@ -2633,48 +2591,6 @@ public static final int /*long*/ g_list_remove_link(int /*long*/ list, int /*lon
 		lock.unlock();
 	}
 }
-/** @param list cast=(GList *) */
-public static final native int /*long*/ _g_list_reverse(int /*long*/ list);
-public static final int /*long*/ g_list_reverse(int /*long*/ list) {
-	lock.lock();
-	try {
-		return _g_list_reverse(list);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param utf8string cast=(const gchar *)
- * @param len cast=(gssize)
- * @param bytes_read cast=(gsize *)
- * @param bytes_written cast=(gsize *)
- * @param error cast=(GError **)
- */
-public static final native int /*long*/ _g_locale_from_utf8(int /*long*/ utf8string, int /*long*/ len, int /*long*/[] bytes_read, int /*long*/[] bytes_written, int /*long*/[] error);
-public static final int /*long*/ g_locale_from_utf8(int /*long*/ utf8string, int /*long*/ len, int /*long*/[] bytes_read, int /*long*/[] bytes_written, int /*long*/[] error) {
-	lock.lock();
-	try {
-		return _g_locale_from_utf8(utf8string, len, bytes_read, bytes_written, error);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param opsysstring cast=(const gchar *)
- * @param len cast=(gssize)
- * @param bytes_read cast=(gsize *)
- * @param bytes_written cast=(gsize *)
- * @param error cast=(GError **)
- */
-public static final native int /*long*/ _g_locale_to_utf8(int /*long*/ opsysstring, int /*long*/ len, int /*long*/[] bytes_read, int /*long*/[] bytes_written, int /*long*/[] error);
-public static final int /*long*/ g_locale_to_utf8(int /*long*/ opsysstring, int /*long*/ len, int /*long*/[] bytes_read, int /*long*/[] bytes_written, int /*long*/[] error) {
-	lock.lock();
-	try {
-		return _g_locale_to_utf8(opsysstring, len, bytes_read, bytes_written, error);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param log_domain cast=(gchar *)
  * @param log_levels cast=(GLogLevelFlags)
@@ -2995,21 +2911,6 @@ public static final int g_signal_connect_closure_by_id(int /*long*/ instance, in
 /**
  * @param instance cast=(gpointer)
  * @param detailed_signal cast=(const gchar *),flags=no_out
- * @param proc cast=(GCallback)
- * @param data cast=(gpointer)
- */
-public static final native int _g_signal_connect_after(int /*long*/ instance, byte[] detailed_signal, int /*long*/ proc, int /*long*/ data);
-public static final int g_signal_connect_after(int /*long*/ instance, byte[] detailed_signal, int /*long*/ proc, int /*long*/ data) {
-	lock.lock();
-	try {
-		return _g_signal_connect_after(instance, detailed_signal, proc, data);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param instance cast=(gpointer)
- * @param detailed_signal cast=(const gchar *),flags=no_out
  */
 public static final native void _g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal);
 public static final void g_signal_emit_by_name(int /*long*/ instance, byte[] detailed_signal) {
@@ -3128,24 +3029,6 @@ public static final int g_signal_handlers_block_matched(int /*long*/ instance, i
  * @param func cast=(gpointer)
  * @param data cast=(gpointer)
  */
-public static final native int _g_signal_handlers_disconnect_matched(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data);
-public static final int g_signal_handlers_disconnect_matched(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data) {
-	lock.lock();
-	try {
-		return _g_signal_handlers_disconnect_matched(instance, mask, signal_id, detail, closure, func, data);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param instance cast=(gpointer)
- * @param mask cast=(GSignalMatchType)
- * @param signal_id cast=(guint)
- * @param detail cast=(GQuark)
- * @param closure cast=(GClosure *)
- * @param func cast=(gpointer)
- * @param data cast=(gpointer)
- */
 public static final native int _g_signal_handlers_unblock_matched(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data);
 public static final int g_signal_handlers_unblock_matched(int /*long*/ instance, int mask, int signal_id, int detail, int /*long*/ closure, int /*long*/ func, int /*long*/ data) {
 	lock.lock();
@@ -3425,7 +3308,9 @@ public static final int /*long*/ g_type_register_static (int /*long*/ parent_typ
 		lock.unlock();
 	}
 }
-/** @param vtable cast=(GThreadFunctions *) */
+/** 
+ * @method flags=dynamic
+ */
 public static final native void _g_thread_init(int /*long*/ vtable);
 public static final void g_thread_init(int /*long*/ vtable) {
 	lock.lock();
@@ -3460,16 +3345,6 @@ public static final int /*long*/ g_utf16_to_utf8(char[] str, int /*long*/ len, i
 		lock.unlock();
 	}
 }
-/** @param str cast=(const gchar *) */
-public static final native int /*long*/ _g_utf8_offset_to_pointer(int /*long*/ str, int /*long*/ offset);
-public static final int /*long*/ g_utf8_offset_to_pointer(int /*long*/ str, int /*long*/ offset) {
-	lock.lock();
-	try {
-		return _g_utf8_offset_to_pointer(str, offset);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param str cast=(const gchar *)
  * @param pos cast=(const gchar *)
@@ -3641,6 +3516,7 @@ public static final void gdk_beep() {
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param data cast=(const gchar *),flags=no_out critical
  * @param width cast=(gint)
@@ -3666,6 +3542,16 @@ public static final int /*long*/ gdk_cairo_create(int /*long*/ drawable) {
 	}
 }
 /** @method flags=dynamic */
+public static final native boolean _gdk_cairo_get_clip_rectangle(int /*long*/ cr, GdkRectangle rect);
+public static final boolean gdk_cairo_get_clip_rectangle(int /*long*/ cr, GdkRectangle rect) {
+	lock.lock();
+	try {
+		return _gdk_cairo_get_clip_rectangle(cr, rect);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native void _gdk_cairo_region(int /*long*/ cairo, int /*long*/ region);
 public static final void gdk_cairo_region(int /*long*/ cairo, int /*long*/ region) {
 	lock.lock();
@@ -3695,12 +3581,65 @@ public static final void gdk_cairo_set_source_color(int /*long*/ cairo, GdkColor
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- * @param window cast=(GdkWindow *)
+/** 
+ * @param window cast=(GdkWindow *) 
+ * @method flags=dynamic 
  */
-public static final native void _gdk_cairo_set_source_window(int /*long*/ cairo, int /*long*/ window, int x, int y);
-public static final void gdk_cairo_set_source_window(int /*long*/ cairo, int /*long*/ window, int x, int y) {
+public static final native int _gdk_window_get_width(int /*long*/ window);
+public static final int gdk_window_get_width(int /*long*/ window) {
+	lock.lock();
+	try {
+		return _gdk_window_get_width(window);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @param window cast=(GdkWindow *) 
+ * @method flags=dynamic 
+ */
+public static final native int /*long*/ _gdk_window_get_visible_region(int /*long*/ window);
+public static final int /*long*/ gdk_window_get_visible_region(int /*long*/ window) {
+	lock.lock();
+	try {
+		return _gdk_window_get_visible_region(window);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ *  @param window cast=(GdkWindow *)
+ *  @method flags=dynamic  
+ */
+public static final native int _gdk_window_get_height(int /*long*/ window);
+public static final int gdk_window_get_height(int /*long*/ window) {
+	lock.lock();
+	try {
+		return _gdk_window_get_height(window);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param pixbuf cast=(const GdkPixbuf *)
+ */
+public static final native void _gdk_cairo_set_source_pixbuf(int /*long*/ cairo, int /*long*/ pixbuf, double pixbuf_x, double pixbuf_y);
+public static final void gdk_cairo_set_source_pixbuf(int /*long*/ cairo, int /*long*/ pixbuf, double pixbuf_x, double pixbuf_y) {
+        lock.lock();
+        try {
+                _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y);
+        }
+        finally {
+                lock.unlock();
+        }
+}
+/**
+ * @method flags=dynamic
+ * @param window cast=(GdkWindow *)
+ */
+public static final native void _gdk_cairo_set_source_window(int /*long*/ cairo, int /*long*/ window, int x, int y);
+public static final void gdk_cairo_set_source_window(int /*long*/ cairo, int /*long*/ window, int x, int y) {
         lock.lock();
         try {
                 _gdk_cairo_set_source_window(cairo, window, x, y);
@@ -3733,8 +3672,8 @@ public static final boolean gdk_color_parse(byte[] spec, GdkColor color) {
 	}
 }
 /**
- * @param colormap cast=(GdkColormap *)
- * @param color cast=(GdkColor *),flags=no_in
+ * @method flags=dynamic
+ * @param color flags=no_in
  */
 public static final native boolean _gdk_color_white(int /*long*/ colormap, GdkColor color);
 public static final boolean gdk_color_white(int /*long*/ colormap, GdkColor color) {
@@ -3746,7 +3685,7 @@ public static final boolean gdk_color_white(int /*long*/ colormap, GdkColor colo
 	}
 }
 /**
- * @param colormap cast=(GdkColormap *)
+ *  @method flags=dynamic
  * @param color cast=(GdkColor *)
  * @param writeable cast=(gboolean)
  * @param best_match cast=(gboolean)
@@ -3761,7 +3700,7 @@ public static final boolean gdk_colormap_alloc_color(int /*long*/ colormap, GdkC
 	}
 }
 /**
- * @param colormap cast=(GdkColormap *)
+ * @method flags=dynamic
  * @param colors cast=(GdkColor *),flags=no_out
  * @param ncolors cast=(gint)
  */
@@ -3774,6 +3713,7 @@ public static final void gdk_colormap_free_colors(int /*long*/ colormap, GdkColo
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_colormap_get_system();
 public static final int /*long*/ gdk_colormap_get_system() {
 	lock.lock();
@@ -3783,21 +3723,7 @@ public static final int /*long*/ gdk_colormap_get_system() {
 		lock.unlock();
 	}
 }
-/**
- * @param colormap cast=(GdkColormap *)
- * @param pixel cast=(gulong)
- * @param result cast=(GdkColor *)
- */
-public static final native void _gdk_colormap_query_color(int /*long*/ colormap, int /*long*/ pixel, GdkColor result);
-public static final void gdk_colormap_query_color(int /*long*/ colormap, int /*long*/ pixel, GdkColor result) {
-	lock.lock();
-	try {
-		_gdk_colormap_query_color(colormap, pixel, result);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param cursor cast=(GdkCursor *) */
+/** @method flags=dynamic */
 public static final native void _gdk_cursor_unref(int /*long*/ cursor);
 public static final void gdk_cursor_unref(int /*long*/ cursor) {
 	lock.lock();
@@ -3818,8 +3744,7 @@ public static final int /*long*/ gdk_cursor_new(int /*long*/ cursor_type) {
 	}
 }
 /**
- * @param source cast=(GdkPixmap *)
- * @param mask cast=(GdkPixmap *)
+ * @method flags=dynamic
  * @param fg cast=(GdkColor *),flags=no_out
  * @param bg cast=(GdkColor *),flags=no_out
  * @param x cast=(gint)
@@ -3854,6 +3779,56 @@ public static final int /*long*/ gdk_display_get_default() {
 		lock.unlock();
 	}
 }
+/**
+ *  @method flags=dynamic
+ *  @param window cast=(GdkWindow *)
+ */
+public static final native int /*long*/ _gdk_window_get_display(int /*long*/ window);
+public static final int /*long*/ gdk_window_get_display(int /*long*/ window) {
+	lock.lock();
+	try {
+		return _gdk_window_get_display(window);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ *  @method flags=dynamic
+ *  @param display cast=(GdkDisplay *)
+ */
+public static final native int /*long*/ _gdk_display_get_device_manager(int /*long*/ display);
+public static final int /*long*/ gdk_display_get_device_manager(int /*long*/ display) {
+	lock.lock();
+	try {
+		return _gdk_display_get_device_manager(display);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _gdk_device_manager_get_client_pointer(int /*long*/ device_manager);
+public static final int /*long*/ gdk_device_manager_get_client_pointer(int /*long*/ device_manager) {
+	lock.lock();
+	try {
+		return _gdk_device_manager_get_client_pointer(device_manager);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param win_x cast=(gint *)
+ * @param win_y cast=(gint *)
+ */
+public static final native int /*long*/ _gdk_device_get_window_at_position(int /*long*/ device, int[] win_x, int[] win_y);
+public static final int /*long*/ gdk_device_get_window_at_position(int /*long*/ device, int[] win_x, int[] win_y) {
+	lock.lock();
+	try {
+		return _gdk_device_get_window_at_position(device, win_x, win_y);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @method flags=dynamic */
 public static final native boolean _gdk_display_supports_cursor_color(int /*long*/ display);
 public static final boolean gdk_display_supports_cursor_color(int /*long*/ display) {
@@ -3865,6 +3840,58 @@ public static final boolean gdk_display_supports_cursor_color(int /*long*/ displ
 	}
 }
 /**
+ * @method flags=dynamic
+ * @param context cast=(GdkDragContext *)
+ */
+public static final native int _gdk_drag_context_get_actions(int /*long*/ context);
+public static final int gdk_drag_context_get_actions(int /*long*/ context) {
+	lock.lock();
+	try {
+		return _gdk_drag_context_get_actions(context);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param context cast=(GdkDragContext *)
+ */
+public static final native int /*long*/ _gdk_drag_context_get_dest_window(int /*long*/ context);
+public static final int /*long*/ gdk_drag_context_get_dest_window(int /*long*/ context) {
+	lock.lock();
+	try {
+		return _gdk_drag_context_get_dest_window(context);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param context cast=(GdkDragContext *)
+ */
+public static final native int _gdk_drag_context_get_selected_action(int /*long*/ context);
+public static final int gdk_drag_context_get_selected_action(int /*long*/ context) {
+	lock.lock();
+	try {
+		return _gdk_drag_context_get_selected_action(context);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param context cast=(GdkDragContext *)
+ */
+public static final native int /*long*/ _gdk_drag_context_list_targets(int /*long*/ context);
+public static final int /*long*/ gdk_drag_context_list_targets(int /*long*/ context) {
+	lock.lock();
+	try {
+		return _gdk_drag_context_list_targets(context);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param context cast=(GdkDragContext *)
  * @param action cast=(GdkDragAction)
  * @param time cast=(guint32)
@@ -3898,9 +3925,7 @@ public static final void gdk_draw_arc(int /*long*/ drawable, int /*long*/ gc, in
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param src cast=(GdkDrawable *)
+ * @method flags=dynamic
  * @param xsrc cast=(gint)
  * @param ysrc cast=(gint)
  * @param xdest cast=(gint)
@@ -3918,9 +3943,7 @@ public static final void gdk_draw_drawable(int /*long*/ drawable, int /*long*/ g
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param image cast=(GdkImage *)
+ * @method flags=dynamic
  */
 public static final native void _gdk_draw_image(int /*long*/ drawable, int /*long*/ gc, int /*long*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height);
 public static final void gdk_draw_image(int /*long*/ drawable, int /*long*/ gc, int /*long*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) {
@@ -3932,11 +3955,7 @@ public static final void gdk_draw_image(int /*long*/ drawable, int /*long*/ gc,
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param x cast=(gint)
- * @param y cast=(gint)
- * @param layout cast=(PangoLayout *)
+  @method flags=dynamic
  */
 public static final native void _gdk_draw_layout(int /*long*/ drawable, int /*long*/ gc, int x, int y, int /*long*/ layout);
 public static final void gdk_draw_layout(int /*long*/ drawable, int /*long*/ gc, int x, int y, int /*long*/ layout) {
@@ -3996,16 +4015,12 @@ public static final void gdk_draw_lines(int /*long*/ drawable, int /*long*/ gc,
 }
 /**
  * @method flags=dynamic
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param pixbuf cast=(GdkPixbuf *)
  * @param xsrc cast=(gint)
  * @param ysrc cast=(gint)
  * @param xdest cast=(gint)
  * @param ydest cast=(gint)
  * @param width cast=(gint)
  * @param height cast=(gint)
- * @param dither cast=(GdkRgbDither)
  * @param x_dither cast=(gint)
  * @param y_dither cast=(gint)
  */
@@ -4031,11 +4046,8 @@ public static final void gdk_draw_point(int /*long*/ drawable, int /*long*/ gc,
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param filled cast=(gint)
- * @param points cast=(GdkPoint *),flags=no_out critical
- * @param npoints cast=(gint)
+ * @method flags=dynamic
+ * @param points flags=no_out critical
  */
 public static final native void _gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints);
 public static final void gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc, int filled, int[] points, int npoints) {
@@ -4047,8 +4059,7 @@ public static final void gdk_draw_polygon(int /*long*/ drawable, int /*long*/ gc
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
+ * @method flags=dynamic
  * @param filled cast=(gint)
  * @param x cast=(gint)
  * @param y cast=(gint)
@@ -4064,7 +4075,7 @@ public static final void gdk_draw_rectangle(int /*long*/ drawable, int /*long*/
 		lock.unlock();
 	}
 }
-/** @param drawable cast=(GdkDrawable *) */
+/** @method flags=dynamic */
 public static final native int _gdk_drawable_get_depth(int /*long*/ drawable);
 public static final int gdk_drawable_get_depth(int /*long*/ drawable) {
 	lock.lock();
@@ -4074,9 +4085,23 @@ public static final int gdk_drawable_get_depth(int /*long*/ drawable) {
 		lock.unlock();
 	}
 }
-
+/** 
+ * @method flags=dynamic
+ * @param width cast=(gint *),flags=no_in critical
+ * @param height cast=(gint *),flags=no_in critical
+ * @method flags=dynamic
+ */
+public static final native void _gdk_pixmap_get_size(int /*long*/ pixmap, int[] width, int[] height);
+public static final void gdk_pixmap_get_size(int /*long*/ pixmap, int[] width, int[] height) {
+	lock.lock();
+	try {
+		_gdk_pixmap_get_size (pixmap,width,height);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
- * @param drawable cast=(GdkDrawable *)
+ * @method flags=dynamic
  * @param x cast=(gint)
  * @param y cast=(gint)
  * @param width cast=(gint)
@@ -4092,7 +4117,7 @@ public static final int /*long*/ gdk_drawable_get_image(int /*long*/ drawable, i
 	}
 }
 /**
- * @param drawable cast=(GdkDrawable *)
+ * @method flags=dynamic
  * @param width cast=(gint *),flags=no_in critical
  * @param height cast=(gint *),flags=no_in critical
  */
@@ -4105,7 +4130,7 @@ public static final void gdk_drawable_get_size(int /*long*/ drawable, int[] widt
 		lock.unlock();
 	}
 }
-/** @param drawable cast=(GdkDrawable *) */
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_drawable_get_visible_region(int /*long*/ drawable);
 public static final int /*long*/ gdk_drawable_get_visible_region(int /*long*/ drawable) {
 	lock.lock();
@@ -4149,38 +4174,37 @@ public static final int /*long*/ gdk_event_get() {
  * @param px cast=(gdouble *)
  * @param py cast=(gdouble *)
  */
-public static final native boolean _gdk_event_get_root_coords(int /*long*/ event, double[] px, double[] py);
-public static final boolean gdk_event_get_root_coords(int /*long*/ event, double[] px, double[] py) {
+public static final native boolean _gdk_event_get_coords(int /*long*/ event, double[] px, double[] py);
+public static final boolean gdk_event_get_coords(int /*long*/ event, double[] px, double[] py) {
 	lock.lock();
 	try {
-		return _gdk_event_get_root_coords(event, px, py);
+		return _gdk_event_get_coords(event, px, py);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
  * @param event cast=(GdkEvent *)
- * @param px cast=(gdouble *)
- * @param py cast=(gdouble *)
+ * @param pmod cast=(GdkModifierType *)
  */
-public static final native boolean _gdk_event_get_coords(int /*long*/ event, double[] px, double[] py);
-public static final boolean gdk_event_get_coords(int /*long*/ event, double[] px, double[] py) {
+public static final native boolean _gdk_event_get_state(int /*long*/ event, int[] pmod);
+public static final boolean gdk_event_get_state(int /*long*/ event, int[] pmod) {
 	lock.lock();
 	try {
-		return _gdk_event_get_coords(event, px, py);
+		return _gdk_event_get_state(event, pmod);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
+ * @method flags=dynamic
  * @param event cast=(GdkEvent *)
- * @param pmod cast=(GdkModifierType *)
  */
-public static final native boolean _gdk_event_get_state(int /*long*/ event, int[] pmod);
-public static final boolean gdk_event_get_state(int /*long*/ event, int[] pmod) {
+public static final native boolean _gdk_event_get_scroll_deltas(int /*long*/ event, double[] delta_x, double[] delta_y);
+public static final boolean gdk_event_get_scroll_deltas(int /*long*/ event, double[] delta_x, double[] delta_y) {
 	lock.lock();
 	try {
-		return _gdk_event_get_state(event, pmod);
+		return _gdk_event_get_scroll_deltas(event, delta_x, delta_y);
 	} finally {
 		lock.unlock();
 	}
@@ -4265,8 +4289,8 @@ public static final void gdk_flush() {
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param values cast=(GdkGCValues *),flags=no_in
+ * @method flags=dynamic
+ * @param values flags=no_in
  */
 public static final native void _gdk_gc_get_values(int /*long*/ gc, GdkGCValues values);
 public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values) {
@@ -4277,7 +4301,7 @@ public static final void gdk_gc_get_values(int /*long*/ gc, GdkGCValues values)
 		lock.unlock();
 	}
 }
-/** @param window cast=(GdkDrawable *) */
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_gc_new(int /*long*/ window);
 public static final int /*long*/ gdk_gc_new(int /*long*/ window) {
 	lock.lock();
@@ -4327,8 +4351,7 @@ public static final void gdk_gc_set_clip_origin(int /*long*/ gc, int x, int y) {
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param region cast=(GdkRegion *)
+ * @method flags=dynamic
  */
 public static final native void _gdk_gc_set_clip_region(int /*long*/ gc, int /*long*/ region);
 public static final void gdk_gc_set_clip_region(int /*long*/ gc, int /*long*/ region) {
@@ -4355,8 +4378,7 @@ public static final void gdk_gc_set_dashes(int /*long*/ gc, int dash_offset, byt
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param exposures cast=(gboolean)
+ * @method flags=dynamic
  */
 public static final native void _gdk_gc_set_exposures(int /*long*/ gc, boolean exposures);
 public static final void gdk_gc_set_exposures(int /*long*/ gc, boolean exposures) {
@@ -4367,10 +4389,7 @@ public static final void gdk_gc_set_exposures(int /*long*/ gc, boolean exposures
 		lock.unlock();
 	}
 }
-/**
- * @param gc cast=(GdkGC *)
- * @param fill cast=(GdkFill)
- */
+/** @method flags=dynamic */
 public static final native void _gdk_gc_set_fill(int /*long*/ gc, int fill);
 public static final void gdk_gc_set_fill(int /*long*/ gc, int fill) {
 	lock.lock();
@@ -4381,8 +4400,8 @@ public static final void gdk_gc_set_fill(int /*long*/ gc, int fill) {
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param color cast=(GdkColor *),flags=no_out
+ * @method flags=dynamic
+ * @param color flags=no_out
  */
 public static final native void _gdk_gc_set_foreground(int /*long*/ gc, GdkColor color);
 public static final void gdk_gc_set_foreground(int /*long*/ gc, GdkColor color) {
@@ -4394,8 +4413,7 @@ public static final void gdk_gc_set_foreground(int /*long*/ gc, GdkColor color)
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param function cast=(GdkFunction)
+ * @method flags=dynamic
  */
 public static final native void _gdk_gc_set_function(int /*long*/ gc, int /*long*/ function);
 public static final void gdk_gc_set_function(int /*long*/ gc, int /*long*/ function) {
@@ -4418,10 +4436,7 @@ public static final void gdk_gc_set_line_attributes(int /*long*/ gc, int line_wi
 		lock.unlock();
 	}
 }
-/**
- * @param gc cast=(GdkGC *)
- * @param stipple cast=(GdkPixmap *)
- */
+/** @method flags=dynamic */
 public static final native void _gdk_gc_set_stipple(int /*long*/ gc, int /*long*/ stipple);
 public static final void gdk_gc_set_stipple(int /*long*/ gc, int /*long*/ stipple) {
 	lock.lock();
@@ -4432,8 +4447,7 @@ public static final void gdk_gc_set_stipple(int /*long*/ gc, int /*long*/ stippl
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param mode cast=(GdkSubwindowMode)
+ * @method flags=dynamic
  */
 public static final native void _gdk_gc_set_subwindow(int /*long*/ gc, int /*long*/ mode);
 public static final void gdk_gc_set_subwindow(int /*long*/ gc, int /*long*/ mode) {
@@ -4469,9 +4483,8 @@ public static final void gdk_gc_set_ts_origin(int /*long*/ gc, int x, int y) {
 	}
 }
 /**
- * @param gc cast=(GdkGC *)
- * @param values cast=(GdkGCValues *),flags=no_out
- * @param values_mask cast=(GdkGCValuesMask)
+ * @method flags=dynamic
+ * @param values flags=no_out
  */
 public static final native void _gdk_gc_set_values(int /*long*/ gc, GdkGCValues values, int values_mask);
 public static final void gdk_gc_set_values(int /*long*/ gc, GdkGCValues values, int values_mask) {
@@ -4491,6 +4504,7 @@ public static final int /*long*/ gdk_get_default_root_window() {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
 public static final native void _gdk_keyboard_ungrab(int time);
 public static final void gdk_keyboard_ungrab(int time) {
 	lock.lock();
@@ -4544,15 +4558,6 @@ public static final int gdk_keyval_to_unicode(int keyval) {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gdk_pango_attr_embossed_new(boolean embossed);
-public static final int /*long*/ gdk_pango_attr_embossed_new(boolean embossed) {
-	lock.lock();
-	try {
-		return _gdk_pango_attr_embossed_new(embossed);
-	} finally {
-		lock.unlock();
-	}
-}
 public static final native int /*long*/ _gdk_pango_context_get();
 public static final int /*long*/ gdk_pango_context_get() {
 	lock.lock();
@@ -4562,20 +4567,6 @@ public static final int /*long*/ gdk_pango_context_get() {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic 
- * @param context cast=(PangoContext *)
- * @param colormap cast=(GdkColormap *)
- */
-public static final native void _gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap);
-public static final void gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap) {
-	lock.lock();
-	try {
-		_gdk_pango_context_set_colormap(context, colormap);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param layout cast=(PangoLayout *) */
 public static final native int /*long*/ _gdk_pango_layout_get_clip_region(int /*long*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges);
 public static final int /*long*/ gdk_pango_layout_get_clip_region(int /*long*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges) {
@@ -4600,9 +4591,8 @@ public static final void gdk_pixbuf_copy_area(int /*long*/ src_pixbuf, int src_x
 	}
 }
 /**
+ * @method flags=dynamic
  * @param dest cast=(GdkPixbuf *)
- * @param src cast=(GdkDrawable *)
- * @param cmap cast=(GdkColormap *)
  */
 public static final native int /*long*/ _gdk_pixbuf_get_from_drawable(int /*long*/ dest, int /*long*/ src, int /*long*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
 public static final int /*long*/ gdk_pixbuf_get_from_drawable(int /*long*/ dest, int /*long*/ src, int /*long*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) {
@@ -4613,6 +4603,23 @@ public static final int /*long*/ gdk_pixbuf_get_from_drawable(int /*long*/ dest,
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param window cast=(GdkWindow *)
+ * @param src_x cast=(gint)
+ * @param src_y cast=(gint)
+ * @param width cast=(gint)
+ * @param height cast=(gint)
+ */
+public static final native int /*long*/ _gdk_pixbuf_get_from_window(int /*long*/ window, int src_x, int src_y, int width, int height);
+public static final int /*long*/ gdk_pixbuf_get_from_window(int /*long*/ window, int src_x, int src_y, int width, int height) {
+	lock.lock();
+	try {
+		return _gdk_pixbuf_get_from_window(window, src_x, src_y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param pixbuf cast=(const GdkPixbuf *) */
 public static final native boolean _gdk_pixbuf_get_has_alpha(int /*long*/ pixbuf);
 public static final boolean gdk_pixbuf_get_has_alpha(int /*long*/ pixbuf) {
@@ -4737,10 +4744,7 @@ public static final int /*long*/ gdk_pixbuf_new_from_file(byte[] filename, int /
 	}
 }
 /**
- * @param pixbuf cast=(GdkPixbuf *)
- * @param drawable cast=(GdkDrawable *)
- * @param gc cast=(GdkGC *)
- * @param dither cast=(GdkRgbDither)
+ * @method flags=dynamic
  */
 public static final native void _gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int /*long*/ drawable, int /*long*/ gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int dither, int x_dither, int y_dither);
 public static final void gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int /*long*/ drawable, int /*long*/ gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int dither, int x_dither, int y_dither) {
@@ -4751,11 +4755,7 @@ public static final void gdk_pixbuf_render_to_drawable(int /*long*/ pixbuf, int
 		lock.unlock();
 	}
 }
-/**
- * @param pixbuf cast=(GdkPixbuf *)
- * @param pixmap_return cast=(GdkDrawable **)
- * @param mask_return cast=(GdkBitmap **)
- */
+/** @method flags=dynamic */
 public static final native void _gdk_pixbuf_render_pixmap_and_mask(int /*long*/ pixbuf, int /*long*/[] pixmap_return, int /*long*/[] mask_return, int alpha_threshold);
 public static final void gdk_pixbuf_render_pixmap_and_mask(int /*long*/ pixbuf, int /*long*/[] pixmap_return, int /*long*/[] mask_return, int alpha_threshold) {
 	lock.lock();
@@ -4786,23 +4786,6 @@ public static final boolean gdk_pixbuf_save_to_bufferv(int /*long*/ pixbuf, int
 }
 /**
  * @param src cast=(const GdkPixbuf *)
- * @param dest cast=(GdkPixbuf *)
- * @param offset_x cast=(double)
- * @param offset_y cast=(double)
- * @param scale_x cast=(double)
- * @param scale_y cast=(double)
- */
-public static final native void _gdk_pixbuf_scale(int /*long*/ src, int /*long*/ dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, int interp_type);
-public static final void gdk_pixbuf_scale(int /*long*/ src, int /*long*/ dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, int interp_type) {
-	lock.lock();
-	try {
-		_gdk_pixbuf_scale(src, dest, dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, interp_type);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param src cast=(const GdkPixbuf *)
  * @param interp_type cast=(GdkInterpType)
  */
 public static final native int /*long*/ _gdk_pixbuf_scale_simple(int /*long*/ src, int dest_width, int dest_height, int interp_type);
@@ -4815,6 +4798,7 @@ public static final int /*long*/ gdk_pixbuf_scale_simple(int /*long*/ src, int d
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param width cast=(gint)
  * @param height cast=(gint)
@@ -4830,6 +4814,7 @@ public static final int /*long*/ gdk_pixmap_new(int /*long*/ window, int width,
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param owner_events cast=(gboolean)
  * @param event_mask cast=(GdkEventMask)
@@ -4846,16 +4831,28 @@ public static final int gdk_pointer_grab(int /*long*/ window, boolean owner_even
 		lock.unlock();
 	}
 }
-public static final native boolean _gdk_pointer_is_grabbed();
-public static final boolean gdk_pointer_is_grabbed() {
+/**
+ * @method flags=dynamic
+ * @param device cast=(GdkDevice *)
+ * @param window cast=(GdkWindow *)
+ * @param owner_events cast=(gboolean)
+ * @param event_mask cast=(GdkEventMask)
+ * @param cursor cast=(GdkCursor *)
+ * @param time_ cast=(guint32)
+ */
+public static final native int _gdk_device_grab(int /*long*/ device, int /*long*/ window, int grab_ownership, boolean owner_events, int event_mask, int /*long*/ cursor, int time_);
+public static final int gdk_device_grab(int /*long*/ device, int /*long*/ window, int grab_ownership, boolean owner_events, int event_mask, int /*long*/ cursor, int time_) {
 	lock.lock();
 	try {
-		return _gdk_pointer_is_grabbed();
+		return _gdk_device_grab(device, window, grab_ownership, owner_events, event_mask, cursor,time_);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param time cast=(guint32) */
+/**
+ *  @method flags=dynamic
+ *  @param time cast=(guint32) 
+ */
 public static final native void _gdk_pointer_ungrab(int time);
 public static final void gdk_pointer_ungrab(int time) {
 	lock.lock();
@@ -4866,15 +4863,42 @@ public static final void gdk_pointer_ungrab(int time) {
 	}
 }
 /**
- * @param window cast=(GdkWindow *)
- * @param property cast=(GdkAtom)
- * @param type cast=(GdkAtom)
- * @param actual_property_type cast=(GdkAtom *)
- * @param actual_format cast=(gint *)
- * @param actual_length cast=(gint *)
- * @param data cast=(guchar **)
+ *  @method flags=dynamic
+ *  @param device cast=(GdkDevice *)
+ *  @param time_ cast=(guint32) 
  */
-public static final native boolean _gdk_property_get(int /*long*/ window, int /*long*/ property, int /*long*/ type, int /*long*/ offset, int /*long*/ length, int pdelete, int /*long*/[] actual_property_type, int[] actual_format, int[] actual_length, int /*long*/[] data);
+public static final native void _gdk_device_ungrab(int /*long*/ device, int time_);
+public static final void  gdk_device_ungrab(int /*long*/ device, int time_) {
+	lock.lock();
+	try {
+		_gdk_device_ungrab(device, time_);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ * @param device cast=(GdkDevice *)
+ */
+public static final native int /*long*/ _gdk_device_get_associated_device(int /*long*/ device);
+public static final int /*long*/  gdk_device_get_associated_device(int /*long*/ device) {
+	lock.lock();
+	try {
+		return _gdk_device_get_associated_device(device);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param window cast=(GdkWindow *)
+ * @param property cast=(GdkAtom)
+ * @param type cast=(GdkAtom)
+ * @param actual_property_type cast=(GdkAtom *)
+ * @param actual_format cast=(gint *)
+ * @param actual_length cast=(gint *)
+ * @param data cast=(guchar **)
+ */
+public static final native boolean _gdk_property_get(int /*long*/ window, int /*long*/ property, int /*long*/ type, int /*long*/ offset, int /*long*/ length, int pdelete, int /*long*/[] actual_property_type, int[] actual_format, int[] actual_length, int /*long*/[] data);
 public static final boolean gdk_property_get(int /*long*/ window, int /*long*/ property, int /*long*/ type, int /*long*/ offset, int /*long*/ length, int pdelete, int /*long*/[] actual_property_type, int[] actual_format, int[] actual_length, int /*long*/[] data) {
 	lock.lock();
 	try {
@@ -4917,8 +4941,7 @@ public static final void gdk_region_get_clipbox(int /*long*/ region, GdkRectangl
 	}
 }
 /**
- * @param region cast=(GdkRegion *)
- * @param rectangles cast=(GdkRectangle **)
+ * @method flags=dynamic
  * @param n_rectangles cast=(gint *)
  */
 public static final native void _gdk_region_get_rectangles(int /*long*/ region, int /*long*/[] rectangles, int[] n_rectangles);
@@ -4943,6 +4966,26 @@ public static final void gdk_region_intersect(int /*long*/ source1, int /*long*/
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native int /*long*/ _gdk_cairo_region_create_from_surface(int /*long*/ surface);
+public static final int /*long*/ gdk_cairo_region_create_from_surface(int /*long*/ surface) {
+	lock.lock();
+	try {
+		return _gdk_cairo_region_create_from_surface(surface);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _gtk_widget_shape_combine_region(int /*long*/ widget, int /*long*/ region);
+public static final void gtk_widget_shape_combine_region(int /*long*/ widget, int /*long*/ region) {
+	lock.lock();
+	try {
+		_gtk_widget_shape_combine_region(widget,region);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _gdk_region_new();
 public static final int /*long*/ gdk_region_new() {
 	lock.lock();
@@ -4980,10 +5023,7 @@ public static final boolean gdk_region_point_in(int /*long*/ region, int x, int
 		lock.unlock();
 	}
 }
-/**
- * @param points cast=(GdkPoint *)
- * @param fill_rule cast=(GdkFillRule)
- */
+/** @method flags=dynamic */
 public static final native int /*long*/ _gdk_region_polygon(int[] points, int npoints, int fill_rule);
 public static final int /*long*/ gdk_region_polygon(int[] points, int npoints, int fill_rule) {
 	lock.lock();
@@ -4993,7 +5033,9 @@ public static final int /*long*/ gdk_region_polygon(int[] points, int npoints, i
 		lock.unlock();
 	}
 }
-/** @param rectangle flags=no_out */
+/**
+ * @param rectangle flags=no_out 
+ */
 public static final native int /*long*/ _gdk_region_rectangle(GdkRectangle rectangle);
 public static final int /*long*/ gdk_region_rectangle(GdkRectangle rectangle) {
 	lock.lock();
@@ -5172,11 +5214,7 @@ public static final void gdk_set_program_class(byte[] program_class) {
 	}
 }
 /**
- * @param str cast=(const gchar *)
- * @param encoding cast=(GdkAtom *)
- * @param format cast=(gint *)
- * @param ctext cast=(guchar **)
- * @param length cast=(gint *)
+ * @method flags=dynamic
  */
 public static final native boolean _gdk_utf8_to_compound_text(byte[] str, int /*long*/[] encoding, int[] format, int /*long*/[] ctext, int[] length);
 public static final boolean gdk_utf8_to_compound_text(byte[] str, int /*long*/[] encoding, int[] format, int /*long*/[] ctext, int[] length) {
@@ -5187,6 +5225,19 @@ public static final boolean gdk_utf8_to_compound_text(byte[] str, int /*long*/[]
 		lock.unlock();
 	}
 }
+/**
+ * @param display cast=(GdkDisplay *)
+ * @method flags=dynamic
+ */
+public static final native boolean _gdk_x11_display_utf8_to_compound_text(int /*long*/ display, byte[] str, int /*long*/[] encoding, int[] format, int /*long*/[] ctext, int[] length);
+public static final boolean gdk_x11_display_utf8_to_compound_text(int /*long*/ display, byte[] str, int /*long*/[] encoding, int[] format, int /*long*/[] ctext, int[] length) {
+	lock.lock();
+	try {
+		return _gdk_x11_display_utf8_to_compound_text(display, str, encoding, format, ctext, length);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param str cast=(const gchar *) */
 public static final native int /*long*/ _gdk_utf8_to_string_target(byte[] str);
 public static final int /*long*/ gdk_utf8_to_string_target(byte[] str) {
@@ -5212,8 +5263,6 @@ public static final int gdk_text_property_to_utf8_list_for_display  (int /*long*
 		lock.unlock();
 	}
 }
-public static final native void gdk_threads_init ();
-public static final native void gdk_threads_enter ();
 public static final native void gdk_threads_leave ();
 /**
  * @method flags=dynamic
@@ -5229,6 +5278,19 @@ public static final  int gdk_unicode_to_keyval(int wc) {
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param visual cast=(GdkVisual *)
+ */
+public static final native int _gdk_visual_get_depth(int /*long*/ visual);
+public static final int gdk_visual_get_depth(int /*long*/ visual) {
+	lock.lock();
+	try {
+		return _gdk_visual_get_depth(visual);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _gdk_visual_get_system();
 public static final int /*long*/ gdk_visual_get_system() {
 	lock.lock();
@@ -5239,6 +5301,7 @@ public static final int /*long*/ gdk_visual_get_system() {
 	}
 }
 /**
+ * @method flags=dynamic
  * @param win_x cast=(gint *)
  * @param win_y cast=(gint *)
  */
@@ -5264,12 +5327,15 @@ public static final void gdk_window_begin_paint_rect(int /*long*/ window, GdkRec
 		lock.unlock();
 	}
 }
-/** @param window cast=(GdkWindow *) */
-public static final native void _gdk_window_clear_area(int /*long*/ window, int x, int y, int width, int height);
-public static final void gdk_window_clear_area(int /*long*/ window, int x, int y, int width, int height) {
+/**
+ * @method flags=dynamic
+ * @param window cast=(GdkWindow *)
+ */
+public static final native void _gdk_window_begin_paint_region(int /*long*/ window, int /*long*/ region);
+public static final void gdk_window_begin_paint_region(int /*long*/ window, int /*long*/ region) {
 	lock.lock();
 	try {
-		_gdk_window_clear_area(window, x, y, width, height);
+		_gdk_window_begin_paint_region(window, region);
 	} finally {
 		lock.unlock();
 	}
@@ -5337,16 +5403,6 @@ public static final void gdk_window_focus(int /*long*/ window, int timestamp) {
 		lock.unlock();
 	}
 }
-/** @param window cast=(GdkWindow *) */
-public static final native void _gdk_window_freeze_updates(int /*long*/ window);
-public static final void gdk_window_freeze_updates(int /*long*/ window) {
-	lock.lock();
-	try {
-		_gdk_window_freeze_updates(window);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param window cast=(GdkWindow *)
  * @param rect cast=(GdkRectangle *),flags=no_in
@@ -5361,8 +5417,8 @@ public static final void gdk_window_get_frame_extents(int /*long*/ window, GdkRe
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
- * @param real_drawable cast=(GdkDrawable **)
  * @param x_offset cast=(gint *)
  * @param y_offset cast=(gint *)
  */
@@ -5389,6 +5445,23 @@ public static final int gdk_window_get_origin(int /*long*/ window, int[] x, int[
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param window cast=(GdkWindow *)
+ * @param device cast=(GdkDevice *)
+ * @param x cast=(gint *)
+ * @param y cast=(gint *)
+ * @param mask cast=(GdkModifierType *)
+ */
+public static final native int /*long*/ _gdk_window_get_device_position(int /*long*/ window, int /*long*/ device, int[] x, int[] y, int[] mask);
+public static final int /*long*/ gdk_window_get_device_position(int /*long*/ window, int /*long*/ device, int[] x, int[] y, int[] mask) {
+	lock.lock();
+	try {
+		return _gdk_window_get_device_position(window, device, x, y, mask);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param window cast=(GdkWindow *) */
 public static final native int /*long*/ _gdk_window_get_parent(int /*long*/ window);
 public static final int /*long*/ gdk_window_get_parent(int /*long*/ window) {
@@ -5400,6 +5473,7 @@ public static final int /*long*/ gdk_window_get_parent(int /*long*/ window) {
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param x cast=(gint *)
  * @param y cast=(gint *)
@@ -5466,8 +5540,8 @@ public static final void gdk_window_invalidate_rect(int /*long*/ window, GdkRect
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
- * @param region cast=(GdkRegion *)
  * @param invalidate_children cast=(gboolean)
  */
 public static final native void _gdk_window_invalidate_region(int /*long*/ window, int /*long*/ region, boolean invalidate_children);
@@ -5490,16 +5564,6 @@ public static final boolean gdk_window_is_visible(int /*long*/ window) {
 	}
 }
 /** @param window cast=(GdkWindow *) */
-public static final native boolean _gdk_window_is_viewable (int /*long*/ window);
-public static final boolean gdk_window_is_viewable (int /*long*/ window) {
-	lock.lock();
-	try {
-		return _gdk_window_is_viewable (window);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param window cast=(GdkWindow *) */
 public static final native void _gdk_window_move(int /*long*/ window, int x, int y);
 public static final void gdk_window_move(int /*long*/ window, int x, int y) {
 	lock.lock();
@@ -5609,23 +5673,19 @@ public static final void gdk_window_scroll(int /*long*/ window, int dx, int dy)
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- * @param window cast=(GdkWindow *)
- * @param accept_focus cast=(gboolean)
- */
-public static final native void _gdk_window_set_accept_focus(int /*long*/ window, boolean accept_focus);
-public static final void gdk_window_set_accept_focus(int /*long*/ window, boolean accept_focus) {
+/** @method flags=dynamic */
+public static final native void _gdk_window_set_background_pattern(int /*long*/ window, int /*long*/ pattern);
+public static final void gdk_window_set_background_pattern(int /*long*/ window, int /*long*/ pattern) {
 	lock.lock();
 	try {
-		_gdk_window_set_accept_focus(window, accept_focus);
+		_gdk_window_set_background_pattern(window, pattern);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
- * @param pixmap cast=(GdkPixmap *)
  * @param parent_relative cast=(gboolean)
  */
 public static final native void _gdk_window_set_back_pixmap(int /*long*/ window, int /*long*/ pixmap, boolean parent_relative);
@@ -5685,48 +5745,6 @@ public static final void gdk_window_set_events(int /*long*/ window, int event_ma
 }
 /**
  * @param window cast=(GdkWindow *)
- * @param icon_window cast=(GdkWindow *)
- * @param pixmap cast=(GdkPixmap *)
- * @param mask cast=(GdkBitmap *)
- */
-public static final native void _gdk_window_set_icon(int /*long*/ window, int /*long*/ icon_window, int /*long*/ pixmap, int /*long*/ mask);
-public static final void gdk_window_set_icon(int /*long*/ window, int /*long*/ icon_window, int /*long*/ pixmap, int /*long*/ mask) {
-	lock.lock();
-	try {
-		_gdk_window_set_icon(window, icon_window, pixmap, mask);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param window cast=(GdkWindow *)
- * @param pixbufs cast=(GList *)
- */
-public static final native void _gdk_window_set_icon_list(int /*long*/ window, int /*long*/ pixbufs);
-public static final void gdk_window_set_icon_list(int /*long*/ window, int /*long*/ pixbufs) {
-	lock.lock();
-	try {
-		_gdk_window_set_icon_list(window, pixbufs);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @method flags=dynamic
- * @param window cast=(GdkWindow *)
- * @param setting cast=(gboolean)
- */
-public static final native void _gdk_window_set_keep_above(int /*long*/ window, boolean setting);
-public static final void gdk_window_set_keep_above(int /*long*/ window, boolean setting) {
-	lock.lock();
-	try {
-		_gdk_window_set_keep_above(window, setting);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param window cast=(GdkWindow *)
  * @param override_redirect cast=(gboolean)
  */
 public static final native void _gdk_window_set_override_redirect(int /*long*/ window, boolean override_redirect);
@@ -5752,8 +5770,8 @@ public static final void gdk_window_set_user_data(int /*long*/ window, int /*lon
 	}
 }
 /**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
- * @param shape_region cast=(GdkRegion *)
  */
 public static final native void _gdk_window_shape_combine_region (int /*long*/ window, int /*long*/  shape_region, int offset_x,  int offset_y);
 public static final void gdk_window_shape_combine_region (int /*long*/ window, int /*long*/  shape_region, int offset_x,  int offset_y) {
@@ -5784,16 +5802,6 @@ public static final void gdk_window_show_unraised(int /*long*/ window) {
 		lock.unlock();
 	}
 }
-/** @param window cast=(GdkWindow *) */
-public static final native void _gdk_window_thaw_updates(int /*long*/ window);
-public static final void gdk_window_thaw_updates(int /*long*/ window) {
-	lock.lock();
-	try {
-		_gdk_window_thaw_updates(window);
-	} finally {
-		lock.unlock();
-	}
-}
 public static final native int _gtk_accelerator_get_default_mod_mask();
 public static final int gtk_accelerator_get_default_mod_mask() {
 	lock.lock();
@@ -5827,28 +5835,27 @@ public static final int /*long*/ gtk_accel_group_new() {
 	}
 }
 /**
- * @param accelGroup cast=(GObject *)
- * @param accelKey cast=(guint)
- * @param accelMods cast=(GdkModifierType)
+ * @param accel_label cast=(GtkAccelLabel *)
+ * @param accel_widget cast=(GtkWidget *)
  */
-public static final native boolean _gtk_accel_groups_activate(int /*long*/ accelGroup, int accelKey, int accelMods);
-public static final boolean gtk_accel_groups_activate(int /*long*/ accelGroup, int accelKey, int accelMods) {
+public static final native void _gtk_accel_label_set_accel_widget(int /*long*/ accel_label, int /*long*/ accel_widget);
+public static final void gtk_accel_label_set_accel_widget(int /*long*/ accel_label, int /*long*/ accel_widget) {
 	lock.lock();
 	try {
-		return _gtk_accel_groups_activate(accelGroup, accelKey, accelMods);
+		_gtk_accel_label_set_accel_widget(accel_label, accel_widget);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param accel_label cast=(GtkAccelLabel *)
- * @param accel_widget cast=(GtkWidget *)
+ * @method flags=dynamic
+ * @param accessible cast=(GtkAccessible *)
  */
-public static final native void _gtk_accel_label_set_accel_widget(int /*long*/ accel_label, int /*long*/ accel_widget);
-public static final void gtk_accel_label_set_accel_widget(int /*long*/ accel_label, int /*long*/ accel_widget) {
+public static final native int /*long*/ _gtk_accessible_get_widget(int /*long*/ accessible);
+public static final int /*long*/ gtk_accessible_get_widget(int /*long*/ accessible) {
 	lock.lock();
 	try {
-		_gtk_accel_label_set_accel_widget(accel_label, accel_widget);
+		return _gtk_accessible_get_widget(accessible);
 	} finally {
 		lock.unlock();
 	}
@@ -5864,6 +5871,19 @@ public static final void gtk_adjustment_changed(int /*long*/ adjustment) {
 	}
 }
 /**
+ * @method flags=dynamic 
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native void _gtk_adjustment_configure(int /*long*/ adjustment, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
+public static final void gtk_adjustment_configure(int /*long*/ adjustment, double value, double lower, double upper, double step_increment, double page_increment, double page_size) {
+	lock.lock();
+	try {
+		_gtk_adjustment_configure(adjustment, value, lower, upper, step_increment, page_increment, page_size);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param value cast=(gdouble)
  * @param lower cast=(gdouble)
  * @param upper cast=(gdouble)
@@ -5880,6 +5900,84 @@ public static final int /*long*/ gtk_adjustment_new(double value, double lower,
 	}
 }
 /**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_lower(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_lower(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_lower(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_page_increment(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_page_increment(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_page_increment(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_page_size(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_page_size(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_page_size(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_step_increment(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_step_increment(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_step_increment(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_upper(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_upper(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_upper(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
+public static final native double _gtk_adjustment_get_value(int /*long*/ adjustment);
+public static final double gtk_adjustment_get_value(int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_adjustment_get_value(adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param adjustment cast=(GtkAdjustment *)
  * @param value cast=(gdouble)
  */
@@ -5892,6 +5990,34 @@ public static final void gtk_adjustment_set_value(int /*long*/ adjustment, doubl
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ * @param value cast=(gdouble)
+ */
+public static final native void _gtk_adjustment_set_step_increment(int /*long*/ adjustment, double value);
+public static final void gtk_adjustment_set_step_increment(int /*long*/ adjustment, double value) {
+	lock.lock();
+	try {
+		_gtk_adjustment_set_step_increment(adjustment, value);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ * @param value cast=(gdouble)
+ */
+public static final native void _gtk_adjustment_set_page_increment(int /*long*/ adjustment, double value);
+public static final void gtk_adjustment_set_page_increment(int /*long*/ adjustment, double value) {
+	lock.lock();
+	try {
+		_gtk_adjustment_set_page_increment(adjustment, value);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param adjustment cast=(GtkAdjustment *) */
 public static final native void _gtk_adjustment_value_changed(int /*long*/ adjustment);
 public static final void gtk_adjustment_value_changed(int /*long*/ adjustment) {
@@ -6151,6 +6277,7 @@ public static final void gtk_cell_layout_pack_start(int /*long*/ cell_layout, in
 	}
 }
 /**
+ * @method flags=dynamic
  * @param cell cast=(GtkCellRenderer *)
  * @param widget cast=(GtkWidget *)
  * @param area cast=(GdkRectangle *),flags=no_in
@@ -6168,11 +6295,92 @@ public static final void gtk_cell_renderer_get_size(int /*long*/ cell, int /*lon
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gtk_cell_renderer_pixbuf_new();
-public static final int /*long*/ gtk_cell_renderer_pixbuf_new() {
-	lock.lock();
-	try {
-		return _gtk_cell_renderer_pixbuf_new();
+/**
+ * @method flags=dynamic
+ * @param cell cast=(GtkCellRenderer *)
+ * @param widget cast=(GtkWidget *)
+ * @param minimum_size cast=(GtkRequisition *)
+ * @param natural_size cast=(GtkRequisition *)
+ */
+public static final native void _gtk_cell_renderer_get_preferred_size(int /*long*/ cell, int /*long*/ widget, GtkRequisition minimum_size, GtkRequisition natural_size);
+public static final void gtk_cell_renderer_get_preferred_size(int /*long*/ cell, int /*long*/ widget, GtkRequisition minimum_size, GtkRequisition natural_size) {
+	lock.lock();
+	try {
+		_gtk_cell_renderer_get_preferred_size(cell, widget, minimum_size, natural_size);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param cell cast=(GtkCellRenderer *)
+ */
+public static final native void _gtk_cell_renderer_get_preferred_height_for_width(int /*long*/ cell, int /*long*/ widget, int width, int[] minimum_height, int[] natural_height);
+public static final void gtk_cell_renderer_get_preferred_height_for_width(int /*long*/ cell, int /*long*/ widget, int width, int[] minimum_height, int[] natural_height) {
+	lock.lock();
+	try {
+		_gtk_cell_renderer_get_preferred_height_for_width(cell, widget, width, minimum_height, natural_height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param cell cast=(GtkCellRenderer *)
+ */
+public static final native void _gtk_cell_renderer_set_fixed_size(int /*long*/ cell, int width, int height);
+public static final void gtk_cell_renderer_set_fixed_size (int /*long*/ cell, int width, int height) {
+	lock.lock();
+	try {
+		_gtk_cell_renderer_set_fixed_size(cell, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param minimum_size cast=(GtkRequisition *)
+ * @param natural_size cast=(GtkRequisition *)
+ */
+public static final native void _gtk_widget_get_preferred_size(int /*long*/ widget, GtkRequisition minimum_size, GtkRequisition natural_size);
+public static final void gtk_widget_get_preferred_size(int /*long*/ widget, GtkRequisition minimum_size, GtkRequisition natural_size) {
+	lock.lock();
+	try {
+		_gtk_widget_get_preferred_size(widget, minimum_size, natural_size);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_get_preferred_height_for_width(int /*long*/ widget, int width, int[] minimum_size, int[] natural_size);
+public static final void gtk_widget_get_preferred_height_for_width(int /*long*/ widget, int width, int[] minimum_size, int[] natural_size) {
+	lock.lock();
+	try {
+		_gtk_widget_get_preferred_height_for_width(widget, width, minimum_size, natural_size);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_get_preferred_width_for_height(int /*long*/ widget, int height, int[] minimum_size, int[] natural_size);
+public static final void gtk_widget_get_preferred_width_for_height(int /*long*/ widget, int height, int[] minimum_size, int[] natural_size) {
+	lock.lock();
+	try {
+		_gtk_widget_get_preferred_width_for_height(widget, height, minimum_size, natural_size);
+	} finally {
+		lock.unlock();
+	}
+}
+public static final native int /*long*/ _gtk_cell_renderer_pixbuf_new();
+public static final int /*long*/ gtk_cell_renderer_pixbuf_new() {
+	lock.lock();
+	try {
+		return _gtk_cell_renderer_pixbuf_new();
 	} finally {
 		lock.unlock();
 	}
@@ -6274,23 +6482,6 @@ public static final int /*long*/ gtk_clipboard_get(int /*long*/ selection) {
  * @param clear_func cast=(GtkClipboardClearFunc)
  * @param user_data cast=(GObject *)
  */
-public static final native boolean _gtk_clipboard_set_with_data(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data);
-public static final boolean gtk_clipboard_set_with_data(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data) {
-	lock.lock();
-	try {
-		return _gtk_clipboard_set_with_data(clipboard, target, n_targets, get_func, clear_func, user_data);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param clipboard cast=(GtkClipboard *)
- * @param target cast=(const GtkTargetEntry *)
- * @param n_targets cast=(guint)
- * @param get_func cast=(GtkClipboardGetFunc)
- * @param clear_func cast=(GtkClipboardClearFunc)
- * @param user_data cast=(GObject *)
- */
 public static final native boolean _gtk_clipboard_set_with_owner(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data);
 public static final boolean gtk_clipboard_set_with_owner(int /*long*/ clipboard, int /*long*/ target, int n_targets, int /*long*/ get_func, int /*long*/ clear_func, int /*long*/ user_data) {
 	lock.lock();
@@ -6341,7 +6532,10 @@ public static final int /*long*/ gtk_clipboard_wait_for_contents(int /*long*/ cl
 		lock.unlock();
 	}
 }
-/** @param title cast=(const gchar *) */
+/** 
+ * @method flags=dynamic
+ * @param title cast=(const gchar *) 
+ */
 public static final native int /*long*/ _gtk_color_selection_dialog_new(byte[] title);
 public static final int /*long*/ gtk_color_selection_dialog_new(byte[] title) {
 	lock.lock();
@@ -6351,37 +6545,83 @@ public static final int /*long*/ gtk_color_selection_dialog_new(byte[] title) {
 		lock.unlock();
 	}
 }
+/** 
+ * @method flags=dynamic
+ * @param title cast=(const gchar *)
+ * @param parent cast=(GtkWindow *)
+ */
+public static final native int /*long*/ _gtk_color_chooser_dialog_new (byte[] title, int /*long*/ parent);
+public static final int /*long*/  gtk_color_chooser_dialog_new (byte[] title, int /*long*/ parent) {
+	lock.lock();
+	try {
+		return _gtk_color_chooser_dialog_new (title, parent);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ */
+public static final native void _gtk_color_chooser_set_use_alpha (int /*long*/ chooser, boolean use_alpha);
+public static final void  gtk_color_chooser_set_use_alpha (int /*long*/ chooser, boolean use_alpha) {
+	lock.lock();
+	try {
+		 _gtk_color_chooser_set_use_alpha (chooser, use_alpha);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
- * @param colorsel cast=(GtkColorSelection *)
- * @param color cast=(GdkColor *),flags=no_in
+ * @method flags=dynamic
+ * @param color_dialog cast=(GtkColorSelectionDialog *)
  */
-public static final native void _gtk_color_selection_get_current_color(int /*long*/ colorsel, GdkColor color);
-public static final void gtk_color_selection_get_current_color(int /*long*/ colorsel, GdkColor color) {
+public static final native int /*long*/ _gtk_color_selection_dialog_get_color_selection(int /*long*/ color_dialog);
+public static final int /*long*/ gtk_color_selection_dialog_get_color_selection(int /*long*/ color_dialog) {
 	lock.lock();
 	try {
-		_gtk_color_selection_get_current_color(colorsel, color);
+		return _gtk_color_selection_dialog_get_color_selection(color_dialog);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param str cast=(const gchar *)
- * @param colors cast=(GdkColor **)
- * @param n_colors cast=(gint *)
+ * @method flags=dynamic
  */
-public static final native void _gtk_color_selection_palette_from_string(byte[] str, int /*long*/ colors, int[] n_colors);
-public static final void gtk_color_selection_palette_from_string(byte[] str, int /*long*/ colors, int[] n_colors) {
+public static final native void _gtk_color_chooser_set_rgba(int /*long*/ chooser, GdkRGBA color);
+public static final void  gtk_color_chooser_get_rgba(int /*long*/ chooser, GdkRGBA color) {
 	lock.lock();
 	try {
-		_gtk_color_selection_palette_from_string(str, colors, n_colors);
+		 _gtk_color_chooser_get_rgba(chooser, color);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param colors cast=(GdkColor *)
- * @param n_colors cast=(gint)
+ * @method flags=dynamic
+ */
+public static final native void _gtk_color_chooser_get_rgba(int /*long*/ chooser, GdkRGBA color);
+public static final void  gtk_color_chooser_set_rgba(int /*long*/ chooser, GdkRGBA color) {
+	lock.lock();
+	try {
+		 _gtk_color_chooser_set_rgba(chooser, color);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic 
+ * @param color flags=no_in
  */
+public static final native void _gtk_color_selection_get_current_color(int /*long*/ colorsel, GdkColor color);
+public static final void gtk_color_selection_get_current_color(int /*long*/ colorsel, GdkColor color) {
+	lock.lock();
+	try {
+		_gtk_color_selection_get_current_color(colorsel, color);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native int /*long*/ _gtk_color_selection_palette_to_string(int /*long*/ colors, int n_colors);
 public static final int /*long*/ gtk_color_selection_palette_to_string(int /*long*/ colors, int n_colors) {
 	lock.lock();
@@ -6391,9 +6631,9 @@ public static final int /*long*/ gtk_color_selection_palette_to_string(int /*lon
 		lock.unlock();
 	}
 }
-/**
- * @param colorsel cast=(GtkColorSelection *)
- * @param color cast=(GdkColor *),flags=no_out
+/** 
+ * @method flags=dynamic 
+ * @param color flags=no_out
  */
 public static final native void _gtk_color_selection_set_current_color(int /*long*/ colorsel, GdkColor color);
 public static final void gtk_color_selection_set_current_color(int /*long*/ colorsel, GdkColor color) {
@@ -6404,7 +6644,7 @@ public static final void gtk_color_selection_set_current_color(int /*long*/ colo
 		lock.unlock();
 	}
 }
-/** @param colorsel cast=(GtkColorSelection *) */
+/** @method flags=dynamic */
 public static final native void _gtk_color_selection_set_has_palette(int /*long*/ colorsel, boolean has_palette);
 public static final void gtk_color_selection_set_has_palette(int /*long*/ colorsel, boolean has_palette) {
 	lock.lock();
@@ -6445,6 +6685,36 @@ public static final int /*long*/ gtk_combo_box_new_text() {
 	}
 }
 /** @method flags=dynamic */
+public static final native int /*long*/ _gtk_combo_box_text_new();
+public static final int /*long*/ gtk_combo_box_text_new() {
+	lock.lock();
+	try {
+		return _gtk_combo_box_text_new();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_combo_box_text_new_with_entry();
+public static final int /*long*/ gtk_combo_box_text_new_with_entry() {
+	lock.lock();
+	try {
+		return _gtk_combo_box_text_new_with_entry();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _gtk_combo_box_text_insert(int /*long*/ combo_box, int position, byte[] id, byte[] text);
+public static final void gtk_combo_box_text_insert(int /*long*/ combo_box, int position, byte[] id, byte[] text) {
+	lock.lock();
+	try {
+		_gtk_combo_box_text_insert(combo_box, position, id, text);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native void _gtk_combo_box_insert_text(int /*long*/ combo_box, int position, byte[] text);
 public static final void gtk_combo_box_insert_text(int /*long*/ combo_box, int position, byte[] text) {
 	lock.lock();
@@ -6465,6 +6735,26 @@ public static final void gtk_combo_box_remove_text(int /*long*/ combo_box, int p
 	}
 }
 /** @method flags=dynamic */
+public static final native void _gtk_combo_box_text_remove(int /*long*/ combo_box, int position);
+public static final void gtk_combo_box_text_remove(int /*long*/ combo_box, int position) {
+	lock.lock();
+	try {
+		_gtk_combo_box_text_remove(combo_box, position);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _gtk_combo_box_text_remove_all(int /*long*/ combo_box);
+public static final void gtk_combo_box_text_remove_all(int /*long*/ combo_box) {
+	lock.lock();
+	try {
+		_gtk_combo_box_text_remove_all(combo_box);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native int _gtk_combo_box_get_active(int /*long*/ combo_box);
 public static final int gtk_combo_box_get_active(int /*long*/ combo_box) {
 	lock.lock();
@@ -6736,11 +7026,12 @@ public static final void gtk_drag_set_icon_pixbuf(int /*long*/ context, int /*lo
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gtk_drawing_area_new();
-public static final int /*long*/ gtk_drawing_area_new() {
+/** @method flags=dynamic */
+public static final native void _gtk_drag_set_icon_surface(int /*long*/ context, int /*long*/ surface);
+public static final void gtk_drag_set_icon_surface(int /*long*/ context, int /*long*/ surface) {
 	lock.lock();
 	try {
-		return _gtk_drawing_area_new();
+		_gtk_drag_set_icon_surface(context, surface);
 	} finally {
 		lock.unlock();
 	}
@@ -6789,20 +7080,6 @@ public static final void gtk_editable_delete_text(int /*long*/ editable, int sta
 		lock.unlock();
 	}
 }
-/**
- * @param editable cast=(GtkEditable *)
- * @param start_pos cast=(gint)
- * @param end_pos cast=(gint)
- */
-public static final native int /*long*/ _gtk_editable_get_chars(int /*long*/ editable, int start_pos, int end_pos);
-public static final int /*long*/ gtk_editable_get_chars(int /*long*/ editable, int start_pos, int end_pos) {
-	lock.lock();
-	try {
-		return _gtk_editable_get_chars(editable, start_pos, end_pos);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param editable cast=(GtkEditable *) */
 public static final native boolean _gtk_editable_get_editable(int /*long*/ editable);
 public static final boolean gtk_editable_get_editable(int /*long*/ editable) {
@@ -6912,6 +7189,19 @@ public static final int /*long*/ gtk_entry_get_inner_border (int /*long*/ entry)
 		lock.unlock();
 	}
 }
+/** 
+ * @param self cast=(GtkEntry *)
+ * @param n_chars cast=(gint)
+ */
+public static final native void  _gtk_entry_set_width_chars (int /*long*/ self, int n_chars);
+public static final void  gtk_entry_set_width_chars (int /*long*/ self, int n_chars) {
+	lock.lock();
+	try {
+		_gtk_entry_set_width_chars(self, n_chars);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param entry cast=(GtkEntry *) */
 public static final native char _gtk_entry_get_invisible_char(int /*long*/ entry);
 public static final char gtk_entry_get_invisible_char(int /*long*/ entry) {
@@ -6952,6 +7242,19 @@ public static final int gtk_entry_text_index_to_layout_index (int /*long*/ entry
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param entry cast=(GtkEntry *)
+ */
+public static final native int _gtk_entry_get_icon_area(int /*long*/ entry, int icon_pos, GdkRectangle icon_area);
+public static final int gtk_entry_get_icon_area(int /*long*/ entry, int icon_pos, GdkRectangle icon_area) {
+	lock.lock();
+	try {
+		return _gtk_entry_get_icon_area(entry, icon_pos, icon_area);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param entry cast=(GtkEntry *) */
 public static final native int _gtk_entry_get_max_length(int /*long*/ entry);
 public static final int gtk_entry_get_max_length(int /*long*/ entry) {
@@ -7002,19 +7305,6 @@ public static final int /*long*/ gtk_entry_new() {
 	}
 }
 /**
- * @param entry cast=(GtkEntry *)
- * @param setting cast=(gboolean)
- */
-public static final native void _gtk_entry_set_activates_default(int /*long*/ entry, boolean setting);
-public static final void gtk_entry_set_activates_default(int /*long*/ entry, boolean setting) {
-	lock.lock();
-	try {
-		_gtk_entry_set_activates_default(entry, setting);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @method flags=dynamic
  * @param entry cast=(GtkEntry *)
  * @param xalign cast=(gfloat)
@@ -7101,23 +7391,28 @@ public static final void gtk_entry_set_text(int /*long*/ entry, byte[] text) {
 	}
 }
 /**
+ * @method flags=dynamic
  * @param entry cast=(GtkEntry *)
- * @param visible cast=(gboolean)
+ * @param text cast=(const gchar *)
  */
-public static final native void _gtk_entry_set_visibility(int /*long*/ entry, boolean visible);
-public static final void gtk_entry_set_visibility(int /*long*/ entry, boolean visible) {
+public static final native void _gtk_entry_set_placeholder_text(int /*long*/ entry, byte[] text);
+public static final void gtk_entry_set_placeholder_text(int /*long*/ entry, byte[] text) {
 	lock.lock();
 	try {
-		_gtk_entry_set_visibility(entry, visible);
+		_gtk_entry_set_placeholder_text(entry, text);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int _gtk_events_pending();
-public static final int gtk_events_pending() {
+/**
+ * @param entry cast=(GtkEntry *)
+ * @param visible cast=(gboolean)
+ */
+public static final native void _gtk_entry_set_visibility(int /*long*/ entry, boolean visible);
+public static final void gtk_entry_set_visibility(int /*long*/ entry, boolean visible) {
 	lock.lock();
 	try {
-		return _gtk_events_pending();
+		_gtk_entry_set_visibility(entry, visible);
 	} finally {
 		lock.unlock();
 	}
@@ -7132,16 +7427,6 @@ public static final boolean gtk_expander_get_expanded(int /*long*/ expander) {
 		lock.unlock();
 	}
 }
-/** @method flags=dynamic */
-public static final native int /*long*/ _gtk_expander_get_label_widget(int /*long*/ expander);
-public static final int /*long*/ gtk_expander_get_label_widget(int /*long*/ expander) {
-	lock.lock();
-	try {
-		return _gtk_expander_get_label_widget(expander);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @method flags=dynamic
  * @param label cast=(const gchar *)
@@ -7165,19 +7450,6 @@ public static final void gtk_expander_set_expanded(int /*long*/ expander, boolea
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- * @param label cast=(const gchar *)
- */
-public static final native void _gtk_expander_set_label(int /*long*/ expander, byte[] label);
-public static final void gtk_expander_set_label(int /*long*/ expander, byte[] label) {
-	lock.lock();
-	try {
-		_gtk_expander_set_label(expander, label);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @method flags=dynamic */
 public static final native void _gtk_expander_set_label_widget(int /*long*/ expander, int /*long*/ label_widget);
 public static final void  gtk_expander_set_label_widget(int /*long*/ expander, int /*long*/ label_widget) {
@@ -7209,16 +7481,6 @@ public static final int /*long*/ gtk_file_chooser_dialog_new(byte[] title, int /
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _gtk_file_chooser_get_current_folder(int /*long*/ chooser);
-public static final int /*long*/ gtk_file_chooser_get_current_folder(int /*long*/ chooser) {
-	lock.lock();
-	try {
-		return _gtk_file_chooser_get_current_folder(chooser);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int /*long*/ _gtk_file_chooser_get_filename(int /*long*/ chooser);
 public static final int /*long*/ gtk_file_chooser_get_filename(int /*long*/ chooser) {
 	lock.lock();
@@ -7433,8 +7695,7 @@ public static final int /*long*/ gtk_fixed_new() {
 	}
 }
 /**
- * @param fixed cast=(GtkFixed *)
- * @param has_window cast=(gboolean)
+ * @method flags=dynamic
  */
 public static final native void _gtk_fixed_set_has_window(int /*long*/ fixed, boolean has_window);
 public static final void gtk_fixed_set_has_window(int /*long*/ fixed, boolean has_window) {
@@ -7445,18 +7706,70 @@ public static final void gtk_fixed_set_has_window(int /*long*/ fixed, boolean ha
 		lock.unlock();
 	}
 }
-/** @param fsd cast=(GtkFontSelectionDialog *) */
-public static final native int /*long*/ _gtk_font_selection_dialog_get_font_name(int /*long*/ fsd);
-public static final int /*long*/ gtk_font_selection_dialog_get_font_name(int /*long*/ fsd) {
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_set_has_window(int /*long*/ widget, boolean has_window);
+public static final void gtk_widget_set_has_window(int /*long*/ widget, boolean has_window) {
 	lock.lock();
 	try {
-		return _gtk_font_selection_dialog_get_font_name(fsd);
+		_gtk_widget_set_has_window(widget, has_window);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param title cast=(const gchar *) */
-public static final native int /*long*/ _gtk_font_selection_dialog_new(byte[] title);
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_font_selection_dialog_get_font_name(int /*long*/ fsd);
+public static final int /*long*/ gtk_font_selection_dialog_get_font_name(int /*long*/ fsd) {
+	lock.lock();
+	try {
+		return _gtk_font_selection_dialog_get_font_name(fsd);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param title cast=(const gchar *)
+ * @param parent cast=(GtkWindow *)
+ */
+public static final native int /*long*/ _gtk_font_chooser_dialog_new(byte[] title, int /*long*/ parent);
+public static final int /*long*/ gtk_font_chooser_dialog_new(byte[] title, int /*long*/ parent) {
+	lock.lock();
+	try {
+		return _gtk_font_chooser_dialog_new(title, parent);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_font_chooser_get_font(int /*long*/ fontchooser);
+public static final int /*long*/ gtk_font_chooser_get_font(int /*long*/ fontchooser) {
+	lock.lock();
+	try {
+		return _gtk_font_chooser_get_font(fontchooser);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param fontname cast=(const gchar *)
+ */
+public static final native void _gtk_font_chooser_set_font(int /*long*/ fsd, byte[] fontname);
+public static final void gtk_font_chooser_set_font(int /*long*/ fsd, byte[] fontname) {
+	lock.lock();
+	try {
+		_gtk_font_chooser_set_font(fsd, fontname);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param title cast=(const gchar *)
+ */
+public static final native int /*long*/ _gtk_font_selection_dialog_new(byte[] title);
 public static final int /*long*/ gtk_font_selection_dialog_new(byte[] title) {
 	lock.lock();
 	try {
@@ -7466,7 +7779,7 @@ public static final int /*long*/ gtk_font_selection_dialog_new(byte[] title) {
 	}
 }
 /**
- * @param fsd cast=(GtkFontSelectionDialog *)
+ * @method flags=dynamic
  * @param fontname cast=(const gchar *)
  */
 public static final native boolean _gtk_font_selection_dialog_set_font_name(int /*long*/ fsd, byte[] fontname);
@@ -7500,19 +7813,6 @@ public static final int /*long*/ gtk_frame_get_label_widget(int /*long*/ frame)
 }
 /**
  * @param frame cast=(GtkFrame *)
- * @param label cast=(const gchar *)
- */
-public static final native void _gtk_frame_set_label(int /*long*/ frame, byte[] label);
-public static final void gtk_frame_set_label(int /*long*/ frame, byte[] label) {
-	lock.lock();
-	try {
-		_gtk_frame_set_label(frame, label);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param frame cast=(GtkFrame *)
  * @param label_widget cast=(GtkWidget *)
  */
 public static final native void _gtk_frame_set_label_widget(int /*long*/ frame, int /*long*/ label_widget);
@@ -7556,15 +7856,6 @@ public static final boolean gtk_get_current_event_state (int[] state) {
 		lock.unlock();
 	}
 }
-public static final native int _gtk_get_current_event_time();
-public static final int gtk_get_current_event_time() {
-	lock.lock();
-	try {
-		return _gtk_get_current_event_time();
-	} finally {
-		lock.unlock();
-	}
-}
 public static final native int /*long*/ _gtk_get_default_language();
 public static final int /*long*/ gtk_get_default_language() {
 	lock.lock();
@@ -7584,49 +7875,83 @@ public static final int /*long*/ gtk_get_event_widget(int /*long*/ event) {
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native void _gtk_grab_add(int /*long*/ widget);
-public static final void gtk_grab_add(int /*long*/ widget) {
+public static final native int /*long*/ _gtk_grab_get_current();
+public static final int /*long*/ gtk_grab_get_current() {
+	lock.lock();
+	try {
+		return _gtk_grab_get_current();
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param homogeneous cast=(gboolean)
+ * @param spacing cast=(gint)
+ */
+public static final native int /*long*/ _gtk_hbox_new(boolean homogeneous, int spacing);
+public static final int /*long*/ gtk_hbox_new(boolean homogeneous, int spacing) {
 	lock.lock();
 	try {
-		_gtk_grab_add(widget);
+		return _gtk_hbox_new(homogeneous, spacing);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gtk_grab_get_current();
-public static final int /*long*/ gtk_grab_get_current() {
+/**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b);
+public static final int /*long*/ gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b) {
 	lock.lock();
 	try {
-		return _gtk_grab_get_current();
+		return _gtk_hsv_to_rgb(h, s, v, r, g, b);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native void _gtk_grab_remove(int /*long*/ widget);
-public static final void gtk_grab_remove(int /*long*/ widget) {
+/**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v);
+public static final int /*long*/ gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v) {
 	lock.lock();
 	try {
-		_gtk_grab_remove(widget);
+		return _gtk_rgb_to_hsv(r, g, b, h, s, v);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param homogeneous cast=(gboolean)
- * @param spacing cast=(gint)
+ * @method flags=dynamic
+ * @param orientation cast=(GtkOrientation)
  */
-public static final native int /*long*/ _gtk_hbox_new(boolean homogeneous, int spacing);
-public static final int /*long*/ gtk_hbox_new(boolean homogeneous, int spacing) {
+public static final native int /*long*/ _gtk_box_new(int orientation, int spacing);
+public static final int /*long*/ gtk_box_new(int orientation, int spacing) {
 	lock.lock();
 	try {
-		return _gtk_hbox_new(homogeneous, spacing);
+		return _gtk_box_new(orientation, spacing);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param adjustment cast=(GtkAdjustment *) */
+/**
+ * @method flags=dynamic
+ * @param box cast=(GtkBox *)
+ */
+public static final native void _gtk_box_set_homogeneous(int /*long*/ box, boolean homogeneous);
+public static final void gtk_box_set_homogeneous(int /*long*/ box, boolean homogeneous) {
+	lock.lock();
+	try {
+		_gtk_box_set_homogeneous(box, homogeneous);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ *  @method flags=dynamic
+ *  @param adjustment cast=(GtkAdjustment *)
+ */
 public static final native int /*long*/ _gtk_hscale_new(int /*long*/ adjustment);
 public static final int /*long*/ gtk_hscale_new(int /*long*/ adjustment) {
 	lock.lock();
@@ -7636,7 +7961,24 @@ public static final int /*long*/ gtk_hscale_new(int /*long*/ adjustment) {
 		lock.unlock();
 	}
 }
-/** @param adjustment cast=(GtkAdjustment *) */
+/**
+ *  @method flags=dynamic
+ *  @param orientation cast=(GtkOrientation)
+ *  @param adjustment cast=(GtkAdjustment *) 
+ */
+public static final native int /*long*/ _gtk_scale_new(int orientation, int /*long*/ adjustment);
+public static final int /*long*/ gtk_scale_new(int orientation, int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_scale_new(orientation, adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+* @method flags=dynamic 
+* @param adjustment cast=(GtkAdjustment *)
+*/
 public static final native int /*long*/ _gtk_hscrollbar_new(int /*long*/ adjustment);
 public static final int /*long*/ gtk_hscrollbar_new(int /*long*/ adjustment) {
 	lock.lock();
@@ -7646,6 +7988,21 @@ public static final int /*long*/ gtk_hscrollbar_new(int /*long*/ adjustment) {
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param orientation cast=(GtkOrientation) 
+ * @param adjustment cast=(GtkAdjustment *) 
+ * */
+public static final native int /*long*/ _gtk_scrollbar_new(int orientation, int /*long*/ adjustment);
+public static final int /*long*/ gtk_scrollbar_new(int orientation, int /*long*/ adjustment) {
+	lock.lock();
+	try {
+		return _gtk_scrollbar_new(orientation, adjustment);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native int /*long*/ _gtk_hseparator_new();
 public static final int /*long*/ gtk_hseparator_new() {
 	lock.lock();
@@ -7655,6 +8012,19 @@ public static final int /*long*/ gtk_hseparator_new() {
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param orientation cast=(GtkOrientation)
+ */
+public static final native int /*long*/ _gtk_separator_new(int orientation);
+public static final int /*long*/ gtk_separator_new(int orientation) {
+	lock.lock();
+	try {
+		return _gtk_separator_new(orientation);
+	} finally {
+		lock.unlock();
+	}
+}
 public static final native int /*long*/ _gtk_status_icon_position_menu_func();
 public static final int /*long*/ gtk_status_icon_position_menu_func() {
 	lock.lock();
@@ -7719,6 +8089,7 @@ public static final void gtk_icon_source_set_pixbuf(int /*long*/ source, int /*l
 	}
 }
 /**
+ * @method flags=dynamic
  * @param icon_set cast=(GtkIconSet *)
  * @param style cast=(GtkStyle *)
  * @param direction cast=(GtkTextDirection)
@@ -7736,6 +8107,19 @@ public static final int /*long*/ gtk_icon_set_render_icon(int /*long*/ icon_set,
 		lock.unlock();
 	}
 }
+
+/**
+ * @method flags=dynamic
+ */
+public static final native int /*long*/ _gtk_icon_set_render_icon_pixbuf(int /*long*/ icon_set, int /*long*/ context, int size);
+public static final int /*long*/ gtk_icon_set_render_icon_pixbuf(int /*long*/ icon_set, int /*long*/ context, int size) {
+	lock.lock();
+	try {
+		return _gtk_icon_set_render_icon_pixbuf(icon_set, context, size);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @method flags=dynamic
  */
@@ -7930,19 +8314,6 @@ public static final int /*long*/ gtk_image_new_from_pixbuf(int /*long*/ pixbuf)
 	}
 }
 /**
- * @param pixmap cast=(GdkPixmap *)
- * @param mask cast=(GdkBitmap *)
- */
-public static final native int /*long*/ _gtk_image_new_from_pixmap(int /*long*/ pixmap, int /*long*/ mask);
-public static final int /*long*/ gtk_image_new_from_pixmap(int /*long*/ pixmap, int /*long*/ mask) {
-	lock.lock();
-	try {
-		return _gtk_image_new_from_pixmap(pixmap, mask);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @param image cast=(GtkImage *)
  * @param pixbuf cast=(GdkPixbuf *)
  */
@@ -7956,15 +8327,15 @@ public static final void gtk_image_set_from_pixbuf(int /*long*/ image, int /*lon
 	}
 }
 /**
+ * @method flags=dynamic
  * @param image cast=(GtkImage *)
- * @param pixmap cast=(GdkBitmap *)
- * @param mask cast=(GdkBitmap *)
+ * @param size cast=(GtkIconSize)
  */
-public static final native void _gtk_image_set_from_pixmap(int /*long*/ image, int /*long*/ pixmap, int /*long*/ mask);
-public static final void gtk_image_set_from_pixmap(int /*long*/ image, int /*long*/ pixmap, int /*long*/ mask) {
+public static final native void _gtk_image_set_from_gicon(int /*long*/ image, int /*long*/ gicon, int size);
+public static final void gtk_image_set_from_gicon(int /*long*/ image, int /*long*/ gicon, int size) {
 	lock.lock();
 	try {
-		_gtk_image_set_from_pixmap(image, pixmap, mask);
+		_gtk_image_set_from_gicon(image, gicon, size);
 	} finally {
 		lock.unlock();
 	}
@@ -8161,6 +8532,61 @@ public static final int /*long*/ gtk_list_store_newv(int numColumns, int /*long*
 	}
 }
 /**
+ * @method flags=dynamic
+ * @param data cast=(const gchar *)
+ * @param length cast=(gssize)
+ * @param error cast=(GError **)
+ */
+public static final native boolean _gtk_css_provider_load_from_data(int /*long*/ css_provider, byte[] data, int /*long*/ length, int /*long*/ error[]);
+public static final boolean gtk_css_provider_load_from_data(int /*long*/ css_provider, byte[] data, int /*long*/ length, int /*long*/ error[] ) {
+	lock.lock();
+	try {
+		return _gtk_css_provider_load_from_data(css_provider, data, length, error);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_css_provider_new();
+public static final int /*long*/gtk_css_provider_new() {
+	lock.lock();
+	try {
+		return _gtk_css_provider_new();
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param screen cast=(GdkScreen *)
+ * @param priority cast=(guint)
+ */
+public static final native void _gtk_style_context_add_provider_for_screen (int /*long*/ screen, int /*long*/ provider, int priority);
+public static final void gtk_style_context_add_provider_for_screen(int /*long*/ screen, int /*long*/ provider, int priority) {
+	lock.lock();
+	try {
+		_gtk_style_context_add_provider_for_screen(screen, provider, priority);
+	} finally {
+		lock.unlock();
+	}
+}
+
+
+/**
+* @method flags=dynamic
+* @param priority cast=(guint)
+*/
+public static final native void _gtk_style_context_add_provider (int /*long*/ context, int /*long*/ provider, int priority);
+public static final void gtk_style_context_add_provider(
+	int /*long*/context, int /*long*/provider, int priority) {
+	lock.lock();
+	try {
+		_gtk_style_context_add_provider(context, provider, priority);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param list_store cast=(GtkListStore *)
  * @param iter cast=(GtkTreeIter *)
  */
@@ -8177,8 +8603,8 @@ public static final void gtk_list_store_remove(int /*long*/ list_store, int /*lo
  * @param store cast=(GtkListStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator);
-public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator) {
+public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator);
+public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_list_store_set(store, iter, column, value, terminator);
@@ -8190,8 +8616,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkListStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator);
-public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator) {
+public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator);
+public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_list_store_set(store, iter, column, value, terminator);
@@ -8203,8 +8629,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkListStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator);
-public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator) {
+public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator);
+public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_list_store_set(store, iter, column, value, terminator);
@@ -8217,8 +8643,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite
  * @param iter cast=(GtkTreeIter *)
  * @param value flags=no_out
  */
-public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator);
-public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator) {
+public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator);
+public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_list_store_set(store, iter, column, value, terminator);
@@ -8230,8 +8656,8 @@ public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkListStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator);
-public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator) {
+public static final native void _gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator);
+public static final void gtk_list_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_list_store_set(store, iter, column, value, terminator);
@@ -8269,20 +8695,41 @@ public static final int gtk_micro_version() {
 		lock.unlock();
 	}
 }
-public static final native void _gtk_main();
-public static final void gtk_main() {
+/** @method flags=const */
+public static final native int _glib_major_version();
+public static final int glib_major_version() {
 	lock.lock();
 	try {
-		_gtk_main();
+		return _glib_major_version();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=const */
+public static final native int _glib_minor_version();
+public static final int glib_minor_version() {
+	lock.lock();
+	try {
+		return _glib_minor_version();
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=const */
+public static final native int _glib_micro_version();
+public static final int glib_micro_version() {
+	lock.lock();
+	try {
+		return _glib_micro_version();
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int _gtk_main_iteration();
-public static final int gtk_main_iteration() {
+public static final native void _gtk_main();
+public static final void gtk_main() {
 	lock.lock();
 	try {
-		return _gtk_main_iteration();
+		_gtk_main();
 	} finally {
 		lock.unlock();
 	}
@@ -8306,16 +8753,6 @@ public static final int /*long*/ gtk_menu_bar_new() {
 		lock.unlock();
 	}
 }
-/** @param menu cast=(GtkMenu *) */
-public static final native int /*long*/ _gtk_menu_get_attach_widget(int /*long*/ menu);
-public static final int /*long*/ gtk_menu_get_attach_widget(int /*long*/ menu) {
-	lock.lock();
-	try {
-		return _gtk_menu_get_attach_widget(menu);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @method flags=dynamic 
  * @param menu_item cast=(GtkMenuItem *) 
@@ -8414,19 +8851,6 @@ public static final void gtk_menu_shell_insert(int /*long*/ menu_shell, int /*lo
 	}
 }
 /**
- * @param menu_shell cast=(GtkMenuShell *)
- * @param menu_item cast=(GtkWidget *)
- */
-public static final native void _gtk_menu_shell_select_item(int /*long*/ menu_shell, int /*long*/ menu_item);
-public static final void gtk_menu_shell_select_item(int /*long*/ menu_shell, int /*long*/ menu_item) {
-	lock.lock();
-	try {
-		_gtk_menu_shell_select_item(menu_shell, menu_item);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @method flags=dynamic
  * @param menu_shell cast=(GtkMenuShell *)
  * @param take_focus cast=(gboolean)
@@ -8609,7 +9033,7 @@ public static final void gtk_notebook_set_tab_pos(int /*long*/ notebook, int pos
 		lock.unlock();
 	}
 }
-/** @param object cast=(GtkObject *) */
+/** @method flags=dynamic */
 public static final native void _gtk_object_sink(int /*long*/ object);
 public static final void gtk_object_sink(int /*long*/ object) {
 	lock.lock();
@@ -8620,6 +9044,16 @@ public static final void gtk_object_sink(int /*long*/ object) {
 	}
 }
 /** @method flags=dynamic */
+public static final native int /*long*/ _g_object_ref_sink(int /*long*/ object);
+public static final int /*long*/ g_object_ref_sink(int /*long*/ object) {
+	lock.lock();
+	try {
+		return _g_object_ref_sink(object);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
 public static final native void _gtk_orientable_set_orientation(int /*long*/ orientable, int orientation);
 public static final void gtk_orientable_set_orientation(int /*long*/ orientable, int orientation) {
 	lock.lock();
@@ -8800,7 +9234,7 @@ public static final double gtk_page_setup_get_page_height(int /*long*/ setup, in
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param area flags=no_out
  * @param widget cast=(GtkWidget *)
@@ -8816,83 +9250,198 @@ public static final void gtk_paint_handle(int /*long*/ style, int /*long*/ windo
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
- * @param window cast=(GdkWindow *)
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
  */
-public static final native void _gtk_paint_flat_box(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
-public static final void gtk_paint_flat_box(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+public static final native void _gtk_render_frame(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height);
+public static final void gtk_render_frame(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height) {
 	lock.lock();
 	try {
-		_gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+		_gtk_render_frame(context, cr, x, y, width, height);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
- * @param window cast=(GdkWindow *)
- * @param area flags=no_out
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
+ * @method flags=dynamic
+ * @param angle cast=(gdouble)
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
  */
-public static final native void _gtk_paint_focus(int /*long*/ style, int /*long*/ window, int state_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
-public static final void gtk_paint_focus(int /*long*/ style, int /*long*/ window, int state_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+public static final native void _gtk_render_arrow(int /*long*/ context, int /*long*/ cr, double angle, double x , double y, double size);
+public static final void gtk_render_arrow(int /*long*/ context, int /*long*/ cr, double angle, double x , double y, double size) {
 	lock.lock();
 	try {
-		_gtk_paint_focus(style, window, state_type, area, widget, detail, x, y, width, height);
+		_gtk_render_arrow(context, cr, angle, x, y, size);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_expander(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height);
+public static final void gtk_render_expander(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_expander(context, cr, x, y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ * @param xy0_gap cast=(gdouble)
+ * @param xy1_gap cast=(gdouble)
+ */
+public static final native void _gtk_render_frame_gap(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height, int gap_side, double xy0_gap, double xy1_gap);
+public static final void gtk_render_frame_gap(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height, int gap_side, double xy0_gap, double xy1_gap) {
+	lock.lock();
+	try {
+		_gtk_render_frame_gap(context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ * @param gap_side cast=(GtkPositionType)
+ */
+public static final native void _gtk_render_extension(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height, int gap_side);
+public static final void gtk_render_extension(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height, int gap_side) {
+	lock.lock();
+	try {
+		_gtk_render_extension(context, cr, x, y, width, height, gap_side);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param layout cast=(PangoLayout *)
+ */
+public static final native void _gtk_render_layout(int /*long*/ context, int /*long*/ cr, double x , double y, int /*long*/ layout);
+public static final void gtk_render_layout(int /*long*/ context, int /*long*/ cr, double x , double y, int /*long*/ layout) {
+	lock.lock();
+	try {
+		_gtk_render_layout(context, cr, x, y, layout);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_background(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height);
+public static final void gtk_render_background(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_background(context, cr, x, y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_option(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height);
+public static final void gtk_render_option(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_option(context, cr, x , y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
  */
-public static final native void _gtk_paint_option(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
-public static final void gtk_paint_option(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+public static final native void _gtk_paint_flat_box(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
+public static final void gtk_paint_flat_box(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
 	lock.lock();
 	try {
-		_gtk_paint_option(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+		_gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
+ * @param area flags=no_out
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
  */
-public static final native void _gtk_paint_slider(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height, int orientation);
-public static final void gtk_paint_slider(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height, int orientation) {
+public static final native void _gtk_paint_focus(int /*long*/ style, int /*long*/ window, int state_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
+public static final void gtk_paint_focus(int /*long*/ style, int /*long*/ window, int state_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
 	lock.lock();
 	try {
-		_gtk_paint_slider(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
+		_gtk_paint_focus(style, window, state_type, area, widget, detail, x, y, width, height);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+* @method flags=dynamic
+* @param x cast=(gdouble)
+* @param y cast=(gdouble)
+* @param width cast=(gdouble)
+* @param height cast=(gdouble)
+*/
+public static final native void _gtk_render_focus(int /*long*/ context, int /*long*/ cr,  double x , double y, double width, double height);
+public static final void gtk_render_focus(int /*long*/ context, int /*long*/ cr,  double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_focus(context, cr,  x, y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
  */
-public static final native void _gtk_paint_tab(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
-public static final void gtk_paint_tab(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+public static final native void _gtk_paint_option(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height);
+public static final void gtk_paint_option(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
 	lock.lock();
 	try {
-		_gtk_paint_tab(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+		_gtk_paint_option(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -8908,7 +9457,7 @@ public static final void gtk_paint_arrow(int /*long*/ style, int /*long*/ window
 }
 
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -8923,7 +9472,7 @@ public static final void gtk_paint_box(int /*long*/ style, int /*long*/ window,
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(gchar *)
@@ -8938,7 +9487,7 @@ public static final void gtk_paint_box_gap(int /*long*/ style, int /*long*/ wind
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -8953,7 +9502,23 @@ public static final void gtk_paint_check(int /*long*/ style, int /*long*/ window
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_check(int /*long*/ context, int /*long*/ cairo,  double x , double y, double width, double height);
+public static final void gtk_render_check(int /*long*/ context, int /*long*/ cairo,  double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_check(context,cairo,x,y,width,height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -8968,7 +9533,7 @@ public static final void gtk_paint_expander(int /*long*/ style, int /*long*/ win
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(gchar *)
@@ -8983,7 +9548,7 @@ public static final void gtk_paint_extension(int /*long*/ style, int /*long*/ wi
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -8998,7 +9563,7 @@ public static final void gtk_paint_hline(int /*long*/ style, int /*long*/ window
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -9014,7 +9579,7 @@ public static final void gtk_paint_layout(int /*long*/ style, int /*long*/ windo
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(gchar *)
@@ -9029,7 +9594,7 @@ public static final void gtk_paint_shadow_gap(int /*long*/ style, int /*long*/ w
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(gchar *)
@@ -9044,7 +9609,7 @@ public static final void gtk_paint_shadow(int /*long*/ style, int /*long*/ windo
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
+ * @method flags=dynamic
  * @param window cast=(GdkWindow *)
  * @param widget cast=(GtkWidget *)
  * @param detail cast=(const gchar *)
@@ -9058,6 +9623,22 @@ public static final void gtk_paint_vline(int /*long*/ style, int /*long*/ window
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic
+ * @param x0 cast=(gdouble)
+ * @param y0 cast=(gdouble)
+ * @param x1 cast=(gdouble)
+ * @param y1 cast=(gdouble)
+ */
+public static final native void _gtk_render_line(int /*long*/ context, int /*long*/ cr, double x0, double y0, double x1, double y1);
+public static final void gtk_render_line(int /*long*/ context, int /*long*/ cr, double x0, double y0, double x1, double y1) {
+	lock.lock();
+	try {
+		_gtk_render_line(context, cr, x0, y0, x1, y1);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @method flags=dynamic */
 public static final native void _gtk_paper_size_free(int /*long*/ size);
 public static final void gtk_paper_size_free(int /*long*/ size) {
@@ -9235,60 +9816,6 @@ public static final int /*long*/ gtk_print_job_new(byte[] title, int /*long*/ pr
 		lock.unlock();
 	}
 }
-/** @method flags=dynamic */
-public static final native int /*long*/ _gtk_print_job_get_settings(int /*long*/ job);
-public static final int /*long*/ gtk_print_job_get_settings(int /*long*/ job) {
-	lock.lock();
-	try {
-		return _gtk_print_job_get_settings(job);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native int /*long*/ _gtk_print_job_get_printer(int /*long*/ job);
-public static final int /*long*/ gtk_print_job_get_printer(int /*long*/ job) {
-	lock.lock();
-	try {
-		return _gtk_print_job_get_printer(job);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native int /*long*/ _gtk_print_job_get_title(int /*long*/ job);
-public static final int /*long*/ gtk_print_job_get_title(int /*long*/ job) {
-	lock.lock();
-	try {
-		return _gtk_print_job_get_title(job);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native int _gtk_print_job_get_status(int /*long*/ job);
-public static final int gtk_print_job_get_status(int /*long*/ job) {
-	lock.lock();
-	try {
-		return _gtk_print_job_get_status(job);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @method flags=dynamic
- * @param filename cast=(const gchar *)
- * @param error cast=(GError **)
- */
-public static final native boolean _gtk_print_job_set_source_file(int /*long*/ job, byte[] filename, int /*long*/ error[]);
-public static final boolean gtk_print_job_set_source_file(int /*long*/ job, byte[] filename, int /*long*/ error[]) {
-	lock.lock();
-	try {
-		return _gtk_print_job_set_source_file(job, filename, error);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @method flags=dynamic
  * @param error cast=(GError **)
@@ -9367,16 +9894,6 @@ public static final void gtk_print_settings_set(int /*long*/ settings, byte [] k
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _gtk_print_settings_get_printer(int /*long*/ settings);
-public static final int /*long*/ gtk_print_settings_get_printer(int /*long*/ settings) {
-	lock.lock();
-	try {
-		return _gtk_print_settings_get_printer(settings);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native void _gtk_print_settings_set_printer(int /*long*/ settings, byte[] printer);
 public static final void gtk_print_settings_set_printer(int /*long*/ settings, byte[] printer) {
 	lock.lock();
@@ -9387,16 +9904,6 @@ public static final void gtk_print_settings_set_printer(int /*long*/ settings, b
 	}
 }
 /** @method flags=dynamic */
-public static final native int _gtk_print_settings_get_orientation(int /*long*/ settings);
-public static final int gtk_print_settings_get_orientation(int /*long*/ settings) {
-	lock.lock();
-	try {
-		return _gtk_print_settings_get_orientation(settings);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native void _gtk_print_settings_set_orientation(int /*long*/ settings, int orientation);
 public static final void gtk_print_settings_set_orientation(int /*long*/ settings, int orientation) {
 	lock.lock();
@@ -9519,26 +10026,6 @@ public static final void gtk_print_settings_set_page_ranges(int /*long*/ setting
 	}
 }
 /** @method flags=dynamic */
-public static final native double _gtk_print_settings_get_paper_width(int /*long*/ settings, int unit);
-public static final double gtk_print_settings_get_paper_width(int /*long*/ settings, int unit) {
-	lock.lock();
-	try {
-		return _gtk_print_settings_get_paper_width(settings, unit);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
-public static final native double _gtk_print_settings_get_paper_height(int /*long*/ settings, int unit);
-public static final double gtk_print_settings_get_paper_height(int /*long*/ settings, int unit) {
-	lock.lock();
-	try {
-		return _gtk_print_settings_get_paper_height(settings, unit);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @method flags=dynamic */
 public static final native int _gtk_print_settings_get_resolution(int /*long*/ settings);
 public static final int gtk_print_settings_get_resolution(int /*long*/ settings) {
 	lock.lock();
@@ -9688,8 +10175,22 @@ public static final void gtk_progress_bar_set_fraction(int /*long*/ pbar, double
 	}
 }
 /**
+ * @method flags=dynamic
+ * @param pbar cast=(GtkProgressBar *)
+ * @param inverted cast=(gboolean)
+ */
+public static final native void _gtk_progress_bar_set_inverted(int /*long*/ pbar, boolean inverted);
+public static final void gtk_progress_bar_set_inverted(int /*long*/ pbar, boolean inverted) {
+	lock.lock();
+	try {
+		_gtk_progress_bar_set_inverted(pbar, inverted);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
  * @param pbar cast=(GtkProgressBar *)
- * @param orientation cast=(GtkProgressBarOrientation)
  */
 public static final native void _gtk_progress_bar_set_orientation(int /*long*/ pbar, int orientation);
 public static final void gtk_progress_bar_set_orientation(int /*long*/ pbar, int orientation) {
@@ -9803,7 +10304,25 @@ public static final void gtk_range_set_value(int /*long*/ range, double value) {
 		lock.unlock();
 	}
 }
-/** @param rc_string cast=(const gchar *) */
+/** 
+ *  @method flags=dynamic
+ *  @param range cast=(GtkRange *)
+ *  @param slider_start cast=(gint *)
+ *  @param slider_end cast=(gint *)
+ */
+public static final native void _gtk_range_get_slider_range(int /*long*/ range, int[] slider_start, int[] slider_end);
+public static final void gtk_range_get_slider_range(int /*long*/ range, int[] slider_start, int[] slider_end) {
+        lock.lock();
+        try {
+        	_gtk_range_get_slider_range(range, slider_start, slider_end);
+        } finally {
+                lock.unlock();
+        }
+}
+/**
+ * @method flags=dynamic
+ * @param rc_string cast=(const gchar *)
+ */
 public static final native void _gtk_rc_parse_string(byte[] rc_string);
 public static final void gtk_rc_parse_string(byte[] rc_string) {
 	lock.lock();
@@ -9944,6 +10463,19 @@ public static final int /*long*/ gtk_scrolled_window_get_hadjustment(int /*long*
 		lock.unlock();
 	}
 }
+/** 
+ * @method flags=dynamic
+ * @param scrolled_window cast=(GtkScrolledWindow *) 
+ */
+public static final native int /*long*/ _gtk_scrolled_window_get_hscrollbar(int /*long*/ scrolled_window);
+public static final int /*long*/ gtk_scrolled_window_get_hscrollbar(int /*long*/ scrolled_window) {
+	lock.lock();
+	try {
+		return _gtk_scrolled_window_get_hscrollbar(scrolled_window);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param scrolled_window cast=(GtkScrolledWindow *)
  * @param hscrollbar_policy cast=(GtkPolicyType *)
@@ -9978,28 +10510,28 @@ public static final int /*long*/ gtk_scrolled_window_get_vadjustment(int /*long*
 		lock.unlock();
 	}
 }
-/**
- * @param hadjustment cast=(GtkAdjustment *)
- * @param vadjustment cast=(GtkAdjustment *)
+/** 
+ * @method flags=dynamic
+ * @param scrolled_window cast=(GtkScrolledWindow *) 
  */
-public static final native int /*long*/ _gtk_scrolled_window_new(int /*long*/ hadjustment, int /*long*/ vadjustment);
-public static final int /*long*/ gtk_scrolled_window_new(int /*long*/ hadjustment, int /*long*/ vadjustment) {
+public static final native int /*long*/ _gtk_scrolled_window_get_vscrollbar(int /*long*/ scrolled_window);
+public static final int /*long*/ gtk_scrolled_window_get_vscrollbar(int /*long*/ scrolled_window) {
 	lock.lock();
 	try {
-		return _gtk_scrolled_window_new(hadjustment, vadjustment);
+		return _gtk_scrolled_window_get_vscrollbar(scrolled_window);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
- * @param scrolled_window cast=(GtkScrolledWindow *)
- * @param placement cast=(GtkCornerType)
+ * @param hadjustment cast=(GtkAdjustment *)
+ * @param vadjustment cast=(GtkAdjustment *)
  */
-public static final native void _gtk_scrolled_window_set_placement(int /*long*/ scrolled_window, int placement);
-public static final void gtk_scrolled_window_set_placement(int /*long*/ scrolled_window, int placement) {
+public static final native int /*long*/ _gtk_scrolled_window_new(int /*long*/ hadjustment, int /*long*/ vadjustment);
+public static final int /*long*/ gtk_scrolled_window_new(int /*long*/ hadjustment, int /*long*/ vadjustment) {
 	lock.lock();
 	try {
-		_gtk_scrolled_window_set_placement(scrolled_window, placement);
+		return _gtk_scrolled_window_new(hadjustment, vadjustment);
 	} finally {
 		lock.unlock();
 	}
@@ -10065,6 +10597,71 @@ public static final void gtk_selection_data_free(int /*long*/ selection_data) {
 		lock.unlock();
 	}
 }
+/** 
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *) 
+ */
+public static final native int /*long*/ _gtk_selection_data_get_data(int /*long*/ selection_data);
+public static final int /*long*/ gtk_selection_data_get_data(int /*long*/ selection_data) {
+	lock.lock();
+	try {
+		return _gtk_selection_data_get_data(selection_data);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *) 
+ */
+public static final native int _gtk_selection_data_get_format(int /*long*/ selection_data);
+public static final int gtk_selection_data_get_format(int /*long*/ selection_data) {
+	lock.lock();
+	try {
+		return _gtk_selection_data_get_format(selection_data);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *) 
+ */
+public static final native int _gtk_selection_data_get_length(int /*long*/ selection_data);
+public static final int gtk_selection_data_get_length(int /*long*/ selection_data) {
+	lock.lock();
+	try {
+		return _gtk_selection_data_get_length(selection_data);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *) 
+ */
+public static final native int /*long*/ _gtk_selection_data_get_target(int /*long*/ selection_data);
+public static final int /*long*/ gtk_selection_data_get_target(int /*long*/ selection_data) {
+	lock.lock();
+	try {
+		return _gtk_selection_data_get_target(selection_data);
+	} finally {
+		lock.unlock();
+	}
+}
+/** 
+ * @method flags=dynamic
+ * @param selection_data cast=(GtkSelectionData *) 
+ */
+public static final native int /*long*/ _gtk_selection_data_get_data_type(int /*long*/ selection_data);
+public static final int /*long*/ gtk_selection_data_get_data_type(int /*long*/ selection_data) {
+	lock.lock();
+	try {
+		return _gtk_selection_data_get_data_type(selection_data);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param selection_data cast=(GtkSelectionData *)
  * @param type cast=(GdkAtom)
@@ -10190,140 +10787,262 @@ public static final native void _gtk_spin_button_set_digits(int /*long*/ spin_bu
 public static final void gtk_spin_button_set_digits(int /*long*/ spin_button, int digits) {
 	lock.lock();
 	try {
-		_gtk_spin_button_set_digits(spin_button, digits);
+		_gtk_spin_button_set_digits(spin_button, digits);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param spin_button cast=(GtkSpinButton*) */
+public static final native void _gtk_spin_button_set_increments(int /*long*/ spin_button, double step, double page);
+public static final void gtk_spin_button_set_increments(int /*long*/ spin_button, double step, double page) {
+	lock.lock();
+	try {
+		_gtk_spin_button_set_increments(spin_button, step, page);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param spin_button cast=(GtkSpinButton*) */
+public static final native void _gtk_spin_button_set_range(int /*long*/ spin_button, double max, double min);
+public static final void gtk_spin_button_set_range(int /*long*/ spin_button, double max, double min) {
+	lock.lock();
+	try {
+		_gtk_spin_button_set_range(spin_button, max, min);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param spin_button cast=(GtkSpinButton*) */
+public static final native void _gtk_spin_button_set_value(int /*long*/ spin_button, double value);
+public static final void gtk_spin_button_set_value(int /*long*/ spin_button, double value) {
+	lock.lock();
+	try {
+		_gtk_spin_button_set_value(spin_button, value);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param spin_button cast=(GtkSpinButton*) */
+public static final native void _gtk_spin_button_set_wrap(int /*long*/ spin_button, boolean wrap);
+public static final void gtk_spin_button_set_wrap(int /*long*/ spin_button, boolean wrap) {
+	lock.lock();
+	try {
+		_gtk_spin_button_set_wrap(spin_button, wrap);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @param spin_button cast=(GtkSpinButton*) */
+public static final native void _gtk_spin_button_update(int /*long*/ spin_button);
+public static final void gtk_spin_button_update(int /*long*/ spin_button) {
+	lock.lock();
+	try {
+		_gtk_spin_button_update(spin_button);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native boolean _gtk_status_icon_get_geometry(int /*long*/ handle, int /*long*/ screen, GdkRectangle area, int /*long*/ orientation);
+public static final boolean gtk_status_icon_get_geometry(int /*long*/ handle, int /*long*/ screen, GdkRectangle area, int /*long*/ orientation) {
+	lock.lock();
+	try {
+		return _gtk_status_icon_get_geometry(handle, screen, area, orientation);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native boolean _gtk_status_icon_get_visible(int /*long*/ handle);
+public static final boolean gtk_status_icon_get_visible(int /*long*/ handle) {
+	lock.lock();
+	try {
+		return _gtk_status_icon_get_visible(handle);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_status_icon_new();
+public static final int /*long*/ gtk_status_icon_new() {
+	lock.lock();
+	try {
+		return _gtk_status_icon_new();
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_status_icon_set_from_pixbuf(int /*long*/ handle, int /*long*/ pixbuf);
+public static final void gtk_status_icon_set_from_pixbuf(int /*long*/ handle, int /*long*/ pixbuf) {
+	lock.lock();
+	try {
+		_gtk_status_icon_set_from_pixbuf(handle, pixbuf);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_status_icon_set_visible(int /*long*/ handle, boolean visible);
+public static final void gtk_status_icon_set_visible(int /*long*/ handle, boolean visible) {
+	lock.lock();
+	try {
+		_gtk_status_icon_set_visible(handle, visible);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_status_icon_set_tooltip(int /*long*/ handle, byte[] tip_text);
+public static final void gtk_status_icon_set_tooltip(int /*long*/ handle, byte[] tip_text) {
+	lock.lock();
+	try {
+		_gtk_status_icon_set_tooltip(handle, tip_text);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param style cast=(GtkStyle *)
+ * @param color flags=no_in
+ */
+public static final native void _gtk_style_get_base(int /*long*/ style, int index, GdkColor color);
+public static final void gtk_style_get_base(int /*long*/ style, int index, GdkColor color) {
+	lock.lock();
+	try {
+		_gtk_style_get_base(style, index, color);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param spin_button cast=(GtkSpinButton*) */
-public static final native void _gtk_spin_button_set_increments(int /*long*/ spin_button, double step, double page);
-public static final void gtk_spin_button_set_increments(int /*long*/ spin_button, double step, double page) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_add_class(int /*long*/ context, byte[] class_name);
+public static final void gtk_style_context_add_class(int /*long*/ context, byte[] class_name) {
 	lock.lock();
 	try {
-		_gtk_spin_button_set_increments(spin_button, step, page);
+		_gtk_style_context_add_class(context, class_name);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param spin_button cast=(GtkSpinButton*) */
-public static final native void _gtk_spin_button_set_range(int /*long*/ spin_button, double max, double min);
-public static final void gtk_spin_button_set_range(int /*long*/ spin_button, double max, double min) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_background_color(int /*long*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_background_color(int /*long*/ context, int state, GdkRGBA color) {
 	lock.lock();
 	try {
-		_gtk_spin_button_set_range(spin_button, max, min);
+		_gtk_style_context_get_background_color(context, state, color);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param spin_button cast=(GtkSpinButton*) */
-public static final native void _gtk_spin_button_set_value(int /*long*/ spin_button, double value);
-public static final void gtk_spin_button_set_value(int /*long*/ spin_button, double value) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_border_color(int /*long*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_border_color(int /*long*/ context, int state, GdkRGBA color) {
 	lock.lock();
 	try {
-		_gtk_spin_button_set_value(spin_button, value);
+		_gtk_style_context_get_border_color(context, state, color);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param spin_button cast=(GtkSpinButton*) */
-public static final native void _gtk_spin_button_set_wrap(int /*long*/ spin_button, boolean wrap);
-public static final void gtk_spin_button_set_wrap(int /*long*/ spin_button, boolean wrap) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_color(int /*long*/ context, int state, GdkRGBA color);
+public static final void gtk_style_context_get_color(int /*long*/ context, int state, GdkRGBA color) {
 	lock.lock();
 	try {
-		_gtk_spin_button_set_wrap(spin_button, wrap);
+		_gtk_style_context_get_color(context, state, color);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param spin_button cast=(GtkSpinButton*) */
-public static final native void _gtk_spin_button_update(int /*long*/ spin_button);
-public static final void gtk_spin_button_update(int /*long*/ spin_button) {
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_style_context_get_font(int /*long*/ context, int state);
+public static final int /*long*/ gtk_style_context_get_font(int /*long*/ context, int state) {
 	lock.lock();
 	try {
-		_gtk_spin_button_update(spin_button);
+		return _gtk_style_context_get_font(context, state);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- */
-public static final native boolean _gtk_status_icon_get_geometry(int /*long*/ handle, int /*long*/ screen, GdkRectangle area, int /*long*/ orientation);
-public static final boolean gtk_status_icon_get_geometry(int /*long*/ handle, int /*long*/ screen, GdkRectangle area, int /*long*/ orientation) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_padding(int /*long*/ context, int state, GtkBorder padding);
+public static final void gtk_style_context_get_padding(int /*long*/ context, int state, GtkBorder padding) {
 	lock.lock();
 	try {
-		return _gtk_status_icon_get_geometry(handle, screen, area, orientation);
+		_gtk_style_context_get_padding(context, state, padding);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- */
-public static final native boolean _gtk_status_icon_get_visible(int /*long*/ handle);
-public static final boolean gtk_status_icon_get_visible(int /*long*/ handle) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_get_border(int /*long*/ context, int state, GtkBorder padding);
+public static final void gtk_style_context_get_border(int /*long*/ context, int state, GtkBorder padding) {
 	lock.lock();
 	try {
-		return _gtk_status_icon_get_visible(handle);
+		_gtk_style_context_get_border(context, state, padding);
 	} finally {
 		lock.unlock();
 	}
 }
 /** @method flags=dynamic */
-public static final native int /*long*/ _gtk_status_icon_new();
-public static final int /*long*/ gtk_status_icon_new() {
+public static final native void _gtk_style_context_invalidate(int /*long*/ context);
+public static final void gtk_style_context_invalidate(int /*long*/ context) {
 	lock.lock();
 	try {
-		return _gtk_status_icon_new();
+		_gtk_style_context_invalidate(context);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- */
-public static final native void _gtk_status_icon_set_from_pixbuf(int /*long*/ handle, int /*long*/ pixbuf);
-public static final void gtk_status_icon_set_from_pixbuf(int /*long*/ handle, int /*long*/ pixbuf) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_save(int /*long*/ self);
+public static final void gtk_style_context_save(int /*long*/ self) {
 	lock.lock();
 	try {
-		_gtk_status_icon_set_from_pixbuf(handle, pixbuf);
+		_gtk_style_context_save(self);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- */
-public static final native void _gtk_status_icon_set_visible(int /*long*/ handle, boolean visible);
-public static final void gtk_status_icon_set_visible(int /*long*/ handle, boolean visible) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_restore(int /*long*/ context);
+public static final void gtk_style_context_restore(int /*long*/ context) {
 	lock.lock();
 	try {
-		_gtk_status_icon_set_visible(handle, visible);
+		_gtk_style_context_restore(context);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @method flags=dynamic
- */
-public static final native void _gtk_status_icon_set_tooltip(int /*long*/ handle, byte[] tip_text);
-public static final void gtk_status_icon_set_tooltip(int /*long*/ handle, byte[] tip_text) {
+/** @method flags=dynamic
+ *  @param self cast=(GtkWidget *)
+ *  */
+public static final native int /*long*/ _gtk_widget_get_state_flags(int /*long*/ self);
+public static final int /*long*/ gtk_widget_get_state_flags(int /*long*/ self) {
 	lock.lock();
 	try {
-		_gtk_status_icon_set_tooltip(handle, tip_text);
+		return _gtk_widget_get_state_flags(self);
 	} finally {
 		lock.unlock();
 	}
 }
-/**
- * @param style cast=(GtkStyle *)
- * @param color flags=no_in
- */
-public static final native void _gtk_style_get_base(int /*long*/ style, int index, GdkColor color);
-public static final void gtk_style_get_base(int /*long*/ style, int index, GdkColor color) {
+/** @method flags=dynamic */
+public static final native void _gtk_style_context_set_state(int /*long*/ context, int /*long*/ flags);
+public static final void gtk_style_context_set_state(int /*long*/ context, int /*long*/ flags) {
 	lock.lock();
 	try {
-		_gtk_style_get_base(style, index, color);
+		_gtk_style_context_set_state(context,flags);
 	} finally {
 		lock.unlock();
 	}
@@ -10554,10 +11273,7 @@ public static final int gtk_style_get_ythickness(int /*long*/ style) {
 	}
 }
 /**
- * @param style cast=(GtkStyle *)
- * @param source cast=(GtkIconSource *)
- * @param widget cast=(GtkWidget *)
- * @param detail cast=(const gchar *)
+ * @method flags=dynamic
  */
 public static final native int /*long*/ _gtk_style_render_icon(int /*long*/ style, int /*long*/ source, int direction, int state, int size, int /*long*/ widget, byte[] detail);
 public static final int /*long*/ gtk_style_render_icon(int /*long*/ style, int /*long*/ source, int direction, int state, int size, int /*long*/ widget, byte[] detail) {
@@ -10646,16 +11362,6 @@ public static final void gtk_text_buffer_get_bounds(int /*long*/ buffer, byte[]
 		lock.unlock();
 	}
 }
-/** @param buffer cast=(GtkTextBuffer *) */
-public static final native int _gtk_text_buffer_get_char_count(int /*long*/ buffer);
-public static final int gtk_text_buffer_get_char_count(int /*long*/ buffer) {
-	lock.lock();
-	try {
-		return _gtk_text_buffer_get_char_count(buffer);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param buffer cast=(GtkTextBuffer *)
  * @param iter cast=(GtkTextIter *)
@@ -11069,23 +11775,6 @@ public static final void gtk_text_view_set_wrap_mode(int /*long*/ text_view, int
 	}
 }
 /**
- * @param text_view cast=(GtkTextView *)
- * @param win cast=(GtkTextWindowType)
- * @param window_x cast=(gint)
- * @param window_y cast=(gint)
- * @param buffer_x cast=(gint *)
- * @param buffer_y cast=(gint *)
- */
-public static final native void _gtk_text_view_window_to_buffer_coords(int /*long*/ text_view, int win, int window_x, int window_y, int[] buffer_x, int[] buffer_y);
-public static final void gtk_text_view_window_to_buffer_coords(int /*long*/ text_view,  int win, int window_x, int window_y, int[] buffer_x, int[] buffer_y) {
-	lock.lock();
-	try {
-		_gtk_text_view_window_to_buffer_coords(text_view, win, window_x, window_y, buffer_x, buffer_y);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @param interval cast=(guint32)
  * @param function cast=(GSourceFunc)
  * @param data cast=(gpointer)
@@ -11118,16 +11807,6 @@ public static final int /*long*/ gtk_toggle_button_new() {
 		lock.unlock();
 	}
 }
-/** @param toggle_button cast=(GtkToggleButton *) */
-public static final native boolean _gtk_toggle_button_get_inconsistent(int /*long*/ toggle_button);
-public static final boolean gtk_toggle_button_get_inconsistent(int /*long*/ toggle_button) {
-	lock.lock();
-	try {
-		return _gtk_toggle_button_get_inconsistent(toggle_button);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param toggle_button cast=(GtkToggleButton *)
  * @param is_active cast=(gboolean)
@@ -11327,22 +12006,6 @@ public static final void gtk_toolbar_insert(int /*long*/ toolbar, int /*long*/ i
 		lock.unlock();
 	}
 }
-/**
- * @param toolbar cast=(GtkToolbar *)
- * @param widget cast=(GtkWidget *)
- * @param tooltip_text cast=(const char *)
- * @param tooltip_private_text cast=(const char *)
- * @param position cast=(gint)
- */
-public static final native void _gtk_toolbar_insert_widget(int /*long*/ toolbar, int /*long*/ widget, byte[] tooltip_text, byte[] tooltip_private_text, int position);
-public static final void gtk_toolbar_insert_widget(int /*long*/ toolbar, int /*long*/ widget, byte[] tooltip_text, byte[] tooltip_private_text, int position) {
-	lock.lock();
-	try {
-		_gtk_toolbar_insert_widget(toolbar, widget, tooltip_text, tooltip_private_text, position);
-	} finally {
-		lock.unlock();
-	}
-}
 public static final native int /*long*/ _gtk_toolbar_new();
 public static final int /*long*/ gtk_toolbar_new() {
 	lock.lock();
@@ -11391,6 +12054,17 @@ public static final void gtk_toolbar_set_style(int /*long*/ toolbar, int style)
 		lock.unlock();
 	}
 }
+/** @param toolbar cast=(GtkToolbar *) 
+ */
+public static final native void _gtk_toolbar_set_icon_size(int /*long*/ toolbar, int size);
+public static final void gtk_toolbar_set_icon_size(int /*long*/ toolbar, int size) {
+	lock.lock();
+	try {
+		_gtk_toolbar_set_icon_size(toolbar, size);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @method flags=dynamic */
 public static final native int /*long*/ _gtk_tooltips_data_get(int /*long*/ widget);
 public static final int /*long*/ gtk_tooltips_data_get(int /*long*/ widget) {
@@ -11421,6 +12095,7 @@ public static final void gtk_tooltips_enable(int /*long*/ tooltips) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
 public static final native int /*long*/ _gtk_tooltips_new();
 public static final int /*long*/ gtk_tooltips_new() {
 	lock.lock();
@@ -11456,8 +12131,8 @@ public static final void gtk_tooltips_set_tip(int /*long*/ tooltips, int /*long*
  * @param tree_model cast=(GtkTreeModel *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int /*long*/ terminator);
-public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int /*long*/ terminator) {
+public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int terminator);
+public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_model_get(tree_model, iter, column, value, terminator);
@@ -11469,8 +12144,8 @@ public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*
  * @param tree_model cast=(GtkTreeModel *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int /*long*/ terminator);
-public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, long[] value, int /*long*/ terminator) {
+public static final native void _gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int terminator);
+public static final void gtk_tree_model_get(int /*long*/ tree_model, int /*long*/ iter, int column, int[] value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_model_get(tree_model, iter, column, value, terminator);
@@ -11615,16 +12290,6 @@ public static final int /*long*/ gtk_tree_path_compare(int /*long*/ a, int /*lon
 	}
 }
 /** @param path cast=(GtkTreePath *) */
-public static final native void _gtk_tree_path_down(int /*long*/ path);
-public static final void gtk_tree_path_down(int /*long*/ path) {
-	lock.lock();
-	try {
-		 _gtk_tree_path_down(path);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param path cast=(GtkTreePath *) */
 public static final native void _gtk_tree_path_free(int /*long*/ path);
 public static final void gtk_tree_path_free(int /*long*/ path) {
 	lock.lock();
@@ -11663,15 +12328,6 @@ public static final int /*long*/ gtk_tree_path_new() {
 		lock.unlock();
 	}
 }
-public static final native int /*long*/ _gtk_tree_path_new_first();
-public static final int /*long*/ gtk_tree_path_new_first() {
-	lock.lock();
-	try {
-		return _gtk_tree_path_new_first();
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param path cast=(const gchar *) */
 public static final native int /*long*/ _gtk_tree_path_new_from_string(byte[] path);
 public static final int /*long*/ gtk_tree_path_new_from_string(byte[] path) {
@@ -11736,20 +12392,6 @@ public static final int gtk_tree_selection_count_selected_rows(int /*long*/ sele
 	}
 }
 /**
- * @param selection cast=(GtkTreeSelection *)
- * @param model cast=(GtkTreeModel **)
- * @param iter cast=(GtkTreeIter *)
- */
-public static final native boolean _gtk_tree_selection_get_selected(int /*long*/ selection, int /*long*/[] model, int /*long*/ iter);
-public static final boolean gtk_tree_selection_get_selected(int /*long*/ selection, int /*long*/[] model, int /*long*/ iter) {
-	lock.lock();
-	try {
-		return _gtk_tree_selection_get_selected(selection, model, iter);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @method flags=dynamic
  * @param selection cast=(GtkTreeSelection *)
  * @param model cast=(GtkTreeModel **)
@@ -11801,20 +12443,6 @@ public static final void gtk_tree_selection_select_iter(int /*long*/ selection,
 }
 /**
  * @param selection cast=(GtkTreeSelection *)
- * @param func cast=(GtkTreeSelectionForeachFunc)
- * @param data cast=(gpointer)
- */
-public static final native void _gtk_tree_selection_selected_foreach(int /*long*/ selection, int /*long*/ func, int /*long*/ data);
-public static final void gtk_tree_selection_selected_foreach(int /*long*/ selection, int /*long*/ func, int /*long*/ data) {
-	lock.lock();
-	try {
-		_gtk_tree_selection_selected_foreach(selection, func, data);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param selection cast=(GtkTreeSelection *)
  * @param mode cast=(GtkSelectionMode)
  */
 public static final native void _gtk_tree_selection_set_mode(int /*long*/ selection, int mode);
@@ -11915,8 +12543,8 @@ public static final void gtk_tree_store_remove(int /*long*/ store, int /*long*/
  * @param store cast=(GtkTreeStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator);
-public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int /*long*/ terminator) {
+public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator);
+public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, byte[] value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_store_set(store, iter, column, value, terminator);
@@ -11928,8 +12556,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkTreeStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator);
-public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int /*long*/ terminator) {
+public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator);
+public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, int value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_store_set(store, iter, column, value, terminator);
@@ -11941,8 +12569,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkTreeStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator);
-public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int /*long*/ terminator) {
+public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator);
+public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, long value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_store_set(store, iter, column, value, terminator);
@@ -11955,8 +12583,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite
  * @param iter cast=(GtkTreeIter *)
  * @param value flags=no_out
  */
-public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator);
-public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int /*long*/ terminator) {
+public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator);
+public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, GdkColor value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_store_set(store, iter, column, value, terminator);
@@ -11968,8 +12596,8 @@ public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ ite
  * @param store cast=(GtkTreeStore *)
  * @param iter cast=(GtkTreeIter *)
  */
-public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator);
-public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int /*long*/ terminator) {
+public static final native void _gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator);
+public static final void gtk_tree_store_set(int /*long*/ store, int /*long*/ iter, int column, boolean value, int terminator) {
 	lock.lock();
 	try {
 		_gtk_tree_store_set(store, iter, column, value, terminator);
@@ -12075,6 +12703,19 @@ public static final void gtk_tree_view_column_clear(int /*long*/ tree_column) {
 		lock.unlock();
 	}
 }
+/**
+ * @method flags=dynamic 
+ * @param column cast=(GtkTreeViewColumn *) 
+ */
+public static final native int /*long*/_gtk_tree_view_column_get_button(int /*long*/ column);
+public static final int /*long*/ gtk_tree_view_column_get_button(int /*long*/ column) {
+	lock.lock();
+	try {
+		return _gtk_tree_view_column_get_button(column);
+	} finally {
+		lock.unlock();
+	}
+}
 /** 
  * @method flags=dynamic
  * @param tree_column cast=(GtkTreeViewColumn *) 
@@ -12118,26 +12759,6 @@ public static final boolean gtk_tree_view_column_get_resizable(int /*long*/ colu
 		lock.unlock();
 	}
 }
-/** @param tree_column cast=(GtkTreeViewColumn *) */
-public static final native int _gtk_tree_view_column_get_sizing(int /*long*/ tree_column);
-public static final int gtk_tree_view_column_get_sizing(int /*long*/ tree_column) {
-	lock.lock();
-	try {
-		return _gtk_tree_view_column_get_sizing(tree_column);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param tree_column cast=(GtkTreeViewColumn *) */
-public static final native int _gtk_tree_view_column_get_spacing(int /*long*/ tree_column);
-public static final int gtk_tree_view_column_get_spacing(int /*long*/ tree_column) {
-	lock.lock();
-	try {
-		return _gtk_tree_view_column_get_spacing(tree_column);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param column cast=(GtkTreeViewColumn *) */
 public static final native boolean _gtk_tree_view_column_get_visible(int /*long*/ column);
 public static final boolean gtk_tree_view_column_get_visible(int /*long*/ column) {
@@ -12148,26 +12769,6 @@ public static final boolean gtk_tree_view_column_get_visible(int /*long*/ column
 		lock.unlock();
 	}
 }
-/** @param tree_column cast=(GtkTreeViewColumn *) */
-public static final native boolean _gtk_tree_view_column_get_sort_indicator(int /*long*/ tree_column);
-public static final boolean gtk_tree_view_column_get_sort_indicator(int /*long*/ tree_column) {
-	lock.lock();
-	try {
-		return _gtk_tree_view_column_get_sort_indicator(tree_column);
-	} finally {
-		lock.unlock();
-	}
-}
-/** @param tree_column cast=(GtkTreeViewColumn *) */
-public static final native int _gtk_tree_view_column_get_sort_order(int /*long*/ tree_column);
-public static final int gtk_tree_view_column_get_sort_order(int /*long*/ tree_column) {
-	lock.lock();
-	try {
-		return _gtk_tree_view_column_get_sort_order(tree_column);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param column cast=(GtkTreeViewColumn *) */
 public static final native int _gtk_tree_view_column_get_width(int /*long*/ column);
 public static final int gtk_tree_view_column_get_width(int /*long*/ column) {
@@ -12345,19 +12946,6 @@ public static final void gtk_tree_view_column_set_sort_order(int /*long*/ tree_c
 		lock.unlock();
 	}
 }
-/**
- * @param tree_column cast=(GtkTreeViewColumn *)
- * @param title cast=(const gchar *)
- */
-public static final native void _gtk_tree_view_column_set_title(int /*long*/ tree_column, byte[] title);
-public static final void gtk_tree_view_column_set_title(int /*long*/ tree_column, byte[] title) {
-	lock.lock();
-	try {
-		_gtk_tree_view_column_set_title(tree_column, title);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param tree_column cast=(GtkTreeViewColumn *) */
 public static final native void _gtk_tree_view_column_set_visible (int /*long*/ tree_column, boolean visible);
 public static final void gtk_tree_view_column_set_visible (int /*long*/ tree_column, boolean visible) {
@@ -12764,16 +13352,17 @@ public static final void gtk_tree_view_widget_to_tree_coords(int /*long*/ tree_v
  * @method flags=dynamic
  * @param tree_view cast=(GtkTreeView *) 
  */
-public static final native void _gtk_tree_view_convert_widget_to_bin_window_coords(int /*long*/ tree_view, int wx, int wy, int[] tx, int[] ty);
-public static final void gtk_tree_view_convert_widget_to_bin_window_coords(int /*long*/ tree_view, int wx, int wy, int[] tx, int[] ty) {
+public static final native void _gtk_tree_view_convert_bin_window_to_tree_coords(int /*long*/ tree_view, int bx, int by, int[] tx, int[] ty);
+public static final void gtk_tree_view_convert_bin_window_to_tree_coords(int /*long*/ tree_view, int bx, int by, int[] tx, int[] ty) {
 	lock.lock();
 	try {
-		_gtk_tree_view_convert_widget_to_bin_window_coords(tree_view, wx, wy, tx, ty);
+		_gtk_tree_view_convert_bin_window_to_tree_coords(tree_view, bx, by, tx, ty);
 	} finally {
 		lock.unlock();
 	}
 }
 /**
+ * @method flags=dynamic
  * @param homogeneous cast=(gboolean)
  * @param spacing cast=(gint)
  */
@@ -12786,16 +13375,6 @@ public static final int /*long*/ gtk_vbox_new(boolean homogeneous, int spacing)
 		lock.unlock();
 	}
 }
-/** @param viewport cast=(GtkViewport *) */
-public static final native int _gtk_viewport_get_shadow_type(int /*long*/ viewport);
-public static final int gtk_viewport_get_shadow_type(int /*long*/ viewport) {
-	lock.lock();
-	try {
-		return _gtk_viewport_get_shadow_type(viewport);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param viewport cast=(GtkViewport *)
  * @param type cast=(GtkShadowType)
@@ -12809,7 +13388,10 @@ public static final void gtk_viewport_set_shadow_type(int /*long*/ viewport, int
 		lock.unlock();
 	}
 }
-/** @param adjustment cast=(GtkAdjustment *) */
+/**
+ * @method flags=dynamic
+ * @param adjustment cast=(GtkAdjustment *)
+ */
 public static final native int /*long*/ _gtk_vscale_new(int /*long*/ adjustment);
 public static final int /*long*/ gtk_vscale_new(int /*long*/ adjustment) {
 	lock.lock();
@@ -12819,7 +13401,10 @@ public static final int /*long*/ gtk_vscale_new(int /*long*/ adjustment) {
 		lock.unlock();
 	}
 }
-/** @param adjustment cast=(GtkAdjustment *) */
+/**
+ * @method flags=dynamic 
+ * @param adjustment cast=(GtkAdjustment *)
+ */
 public static final native int /*long*/ _gtk_vscrollbar_new(int /*long*/ adjustment);
 public static final int /*long*/ gtk_vscrollbar_new(int /*long*/ adjustment) {
 	lock.lock();
@@ -12829,6 +13414,7 @@ public static final int /*long*/ gtk_vscrollbar_new(int /*long*/ adjustment) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
 public static final native int /*long*/ _gtk_vseparator_new();
 public static final int /*long*/ gtk_vseparator_new() {
 	lock.lock();
@@ -12913,6 +13499,16 @@ public static final void gtk_widget_destroy(int /*long*/ widget) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native void _gtk_widget_draw(int /*long*/ widget, int /*long*/ cr);
+public static final void gtk_widget_draw(int /*long*/ widget, int /*long*/ cr) {
+	lock.lock();
+	try {
+		_gtk_widget_draw(widget, cr);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param widget cast=(GtkWidget *)
  * @param event cast=(GdkEvent *)
@@ -12926,31 +13522,62 @@ public static final boolean gtk_widget_event(int /*long*/ widget, int /*long*/ e
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native int /*long*/ _gtk_widget_get_accessible (int /*long*/ widget);
-public static final int /*long*/ gtk_widget_get_accessible (int /*long*/ widget) {
+/** @param widget cast=(GtkWidget *) */
+public static final native int /*long*/ _gtk_widget_get_accessible (int /*long*/ widget);
+public static final int /*long*/ gtk_widget_get_accessible (int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_accessible(widget);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_get_visible (int /*long*/ widget);
+public static final boolean gtk_widget_get_visible (int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_visible(widget);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_get_realized (int /*long*/ widget);
+public static final boolean gtk_widget_get_realized (int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_realized(widget);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_get_has_window (int /*long*/ widget);
+public static final boolean gtk_widget_get_has_window (int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _gtk_widget_get_accessible(widget);
+		return _gtk_widget_get_has_window(widget);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native boolean _gtk_widget_get_child_visible (int /*long*/ widget);
-public static final boolean gtk_widget_get_child_visible (int /*long*/ widget) {
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_get_can_default (int /*long*/ widget);
+public static final boolean gtk_widget_get_can_default (int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _gtk_widget_get_child_visible(widget);
+		return _gtk_widget_get_can_default(widget);
 	} finally {
 		lock.unlock();
 	}
 }
-public static final native int _gtk_widget_get_default_direction();
-public static final int gtk_widget_get_default_direction() {
+/** @param widget cast=(GtkWidget *) */
+public static final native boolean _gtk_widget_get_child_visible (int /*long*/ widget);
+public static final boolean gtk_widget_get_child_visible (int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _gtk_widget_get_default_direction();
+		return _gtk_widget_get_child_visible(widget);
 	} finally {
 		lock.unlock();
 	}
@@ -12965,21 +13592,21 @@ public static final int /*long*/ gtk_widget_get_default_style() {
 	}
 }
 /** @param widget cast=(GtkWidget *) */
-public static final native int _gtk_widget_get_direction(int /*long*/ widget);
-public static final int gtk_widget_get_direction(int /*long*/ widget) {
+public static final native int _gtk_widget_get_events(int /*long*/ widget);
+public static final int gtk_widget_get_events(int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _gtk_widget_get_direction(widget);
+		return _gtk_widget_get_events(widget);
 	} finally {
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native int _gtk_widget_get_events(int /*long*/ widget);
-public static final int gtk_widget_get_events(int /*long*/ widget) {
+/** @method flags=dynamic */
+public static final native int /*long*/ _gtk_widget_get_window (int /*long*/ widget);
+public static final int /*long*/ gtk_widget_get_window (int /*long*/ widget) {
 	lock.lock();
 	try {
-		return _gtk_widget_get_events(widget);
+		return _gtk_widget_get_window(widget);
 	} finally {
 		lock.unlock();
 	}
@@ -12994,6 +13621,16 @@ public static final int /*long*/ gtk_widget_get_modifier_style(int /*long*/ widg
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic  */
+public static final native boolean _gtk_widget_get_mapped(int /*long*/ widget);
+public static final boolean gtk_widget_get_mapped(int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_mapped(widget);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param widget cast=(GtkWidget *) */
 public static final native int /*long*/ _gtk_widget_get_pango_context(int /*long*/ widget);
 public static final int /*long*/ gtk_widget_get_pango_context(int /*long*/ widget) {
@@ -13024,6 +13661,49 @@ public static final int /*long*/ gtk_widget_get_parent_window(int /*long*/ widge
 		lock.unlock();
 	}
 }
+/** 
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ * @param allocation cast=(GtkAllocation *),flags=no_in
+ * */
+public static final native void _gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation);
+public static final void gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation) {
+	lock.lock();
+	try {
+		_gtk_widget_get_allocation(widget, allocation);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param x cast=(gdouble)
+ * @param y cast=(gdouble)
+ * @param width cast=(gdouble)
+ * @param height cast=(gdouble)
+ */
+public static final native void _gtk_render_handle(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height);
+public static final void gtk_render_handle(int /*long*/ context, int /*long*/ cr, double x , double y, double width, double height) {
+	lock.lock();
+	try {
+		_gtk_render_handle(context,cr, x ,y, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
+public static final native int /*long*/ _gtk_widget_get_style_context(int /*long*/ widget);
+public static final int /*long*/ gtk_widget_get_style_context(int /*long*/ widget) {
+	lock.lock();
+	try {
+		return _gtk_widget_get_style_context(widget);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param widget cast=(GtkWidget *) */
 public static final native int /*long*/ _gtk_widget_get_style(int /*long*/ widget);
 public static final int /*long*/ gtk_widget_get_style(int /*long*/ widget) {
@@ -13078,6 +13758,16 @@ public static final void gtk_widget_grab_focus(int /*long*/ widget) {
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_has_focus(int /*long*/ widget);
+public static final boolean gtk_widget_has_focus(int /*long*/ widget) {
+       lock.lock();
+       try {
+               return _gtk_widget_has_focus(widget);
+       } finally {
+               lock.unlock();
+       }
+}
 /** @param widget cast=(GtkWidget *) */
 public static final native void _gtk_widget_hide(int /*long*/ widget);
 public static final void gtk_widget_hide(int /*long*/ widget) {
@@ -13092,6 +13782,19 @@ public static final void gtk_widget_hide(int /*long*/ widget) {
  * @method flags=dynamic
  * @param widget cast=(GtkWidget *)
  */
+public static final native void _gtk_widget_input_shape_combine_region(int /*long*/ widget, int /*long*/ region);
+public static final void gtk_widget_input_shape_combine_region(int /*long*/ widget, int /*long*/ region) {
+	lock.lock();
+	try {
+		_gtk_widget_input_shape_combine_region(widget, region);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ * @param widget cast=(GtkWidget *)
+ */
 public static final native boolean _gtk_widget_is_composited(int /*long*/ widget);
 public static final boolean gtk_widget_is_composited(int /*long*/ widget) {
 	lock.lock();
@@ -13164,20 +13867,6 @@ public static final void gtk_widget_modify_bg(int /*long*/ widget, int state, Gd
 }
 /**
  * @param widget cast=(GtkWidget *)
- * @param state cast=(GtkStateType)
- * @param color cast=(GdkColor *),flags=no_out
- */
-public static final native void _gtk_widget_modify_fg(int /*long*/ widget, int state, GdkColor color);
-public static final void gtk_widget_modify_fg(int /*long*/ widget, int state, GdkColor color) {
-	lock.lock();
-	try {
-		_gtk_widget_modify_fg(widget, state, color);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param widget cast=(GtkWidget *)
  * @param pango_font_descr cast=(PangoFontDescription *)
  */
 public static final native void _gtk_widget_modify_font(int /*long*/ widget, int /*long*/ pango_font_descr);
@@ -13203,15 +13892,37 @@ public static final void gtk_widget_modify_style(int /*long*/ widget, int /*long
 	}
 }
 /**
- * @param widget cast=(GtkWidget *)
- * @param state cast=(GtkStateType)
- * @param color cast=(GdkColor *),flags=no_out
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_override_color(int /*long*/ widget, int state, GdkRGBA color);
+public static final void gtk_widget_override_color(int /*long*/ widget, int state, GdkRGBA color) {
+	lock.lock();
+	try {
+		_gtk_widget_override_color(widget, state, color);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
+ */
+public static final native void _gtk_widget_override_background_color(int /*long*/ widget, int state, GdkRGBA color);
+public static final void gtk_widget_override_background_color(int /*long*/ widget, int state, GdkRGBA color) {
+	lock.lock();
+	try {
+		_gtk_widget_override_background_color(widget, state, color);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=dynamic
  */
-public static final native void _gtk_widget_modify_text(int /*long*/ widget, int state, GdkColor color);
-public static final void gtk_widget_modify_text(int /*long*/ widget, int state, GdkColor color) {
+public static final native void _gtk_widget_override_font(int /*long*/ widget, int /*long*/ font);
+public static final void gtk_widget_override_font(int /*long*/ widget, int /*long*/ font) {
 	lock.lock();
 	try {
-		_gtk_widget_modify_text(widget, state, color);
+		_gtk_widget_override_font(widget, font);
 	} finally {
 		lock.unlock();
 	}
@@ -13297,6 +14008,46 @@ public static final void gtk_widget_set_default_direction(int dir) {
 		lock.unlock();
 	}
 } 
+/** @method flags=dynamic */
+public static final native void _gtk_widget_set_can_default(int /*long*/ widget, boolean can_default);
+public static final void gtk_widget_set_can_default(int /*long*/ widget, boolean can_default) {
+	lock.lock();
+	try {
+		_gtk_widget_set_can_default(widget,can_default) ;
+	} finally {
+		lock.unlock();
+	}
+} 
+/** @method flags=dynamic */
+public static final native boolean _gtk_widget_set_can_focus(int /*long*/ widget, boolean can_focus);
+public static final boolean gtk_widget_set_can_focus(int /*long*/ widget, boolean can_focus) {
+	lock.lock();
+	try {
+		return _gtk_widget_set_can_focus(widget,can_focus);
+	} finally {
+		lock.unlock();
+	}
+} 
+/** @method flags=dynamic */
+public static final native void _gtk_widget_set_mapped(int /*long*/ widget, boolean mapped);
+public static final void gtk_widget_set_mapped(int /*long*/ widget, boolean mapped) {
+	lock.lock();
+	try {
+		_gtk_widget_set_mapped(widget,mapped);
+	} finally {
+		lock.unlock();
+	}
+}
+/** @method flags=dynamic */
+public static final native void _gtk_widget_set_visible(int /*long*/ widget, boolean visible);
+public static final void gtk_widget_set_visible(int /*long*/ widget, boolean visible) {
+	lock.lock();
+	try {
+		_gtk_widget_set_visible(widget, visible);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param widget cast=(GtkWidget *)
  * @param dir cast=(GtkTextDirection)
@@ -13310,6 +14061,16 @@ public static final void gtk_widget_set_direction(int /*long*/ widget, int dir)
 		lock.unlock();
 	}
 }
+/** @method flags=dynamic */
+public static final native void _gtk_widget_set_receives_default(int /*long*/ widget, boolean receives_default);
+public static final void gtk_widget_set_receives_default(int /*long*/ widget, boolean receives_default) {
+	lock.lock();
+	try {
+		_gtk_widget_set_receives_default(widget, receives_default);
+	} finally {
+		lock.unlock();
+	}
+}
 /**
  * @param widget cast=(GtkWidget *)
  * @param double_buffered cast=(gboolean)
@@ -13389,34 +14150,6 @@ public static final void gtk_widget_set_state(int /*long*/ widget, int state) {
 		lock.unlock();
 	}
 }
-/**
- * @param widget cast=(GtkWidget *)
- * @param style cast=(GtkStyle *)
- */
-public static final native void _gtk_widget_set_style(int /*long*/ widget, int /*long*/ style);
-public static final void gtk_widget_set_style(int /*long*/ widget, int /*long*/ style) {
-	lock.lock();
-	try {
-		_gtk_widget_set_style(widget, style);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
- * @param widget cast=(GtkWidget *)
- * @param shape_mask cast=(GdkBitmap *)
- * @param offset_x cast=(gint)
- * @param offset_y cast=(gint)
- */
-public static final native void _gtk_widget_shape_combine_mask(int /*long*/ widget, int /*long*/ shape_mask, int offset_x, int offset_y);
-public static final void gtk_widget_shape_combine_mask(int /*long*/ widget, int /*long*/ shape_mask, int offset_x, int offset_y) {
-	lock.lock();
-	try {
-		_gtk_widget_shape_combine_mask(widget, shape_mask, offset_x, offset_y);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param widget cast=(GtkWidget *) */
 public static final native void _gtk_widget_show(int /*long*/ widget);
 public static final void gtk_widget_show(int /*long*/ widget) {
@@ -13427,16 +14160,6 @@ public static final void gtk_widget_show(int /*long*/ widget) {
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native void _gtk_widget_show_now(int /*long*/ widget);
-public static final void gtk_widget_show_now(int /*long*/ widget) {
-	lock.lock();
-	try {
-		_gtk_widget_show_now(widget);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param widget cast=(GtkWidget *)
  * @param allocation cast=(GtkAllocation *),flags=no_out
@@ -13451,6 +14174,7 @@ public static final void gtk_widget_size_allocate(int /*long*/ widget, GtkAlloca
 	}
 }
 /**
+ * @method flags=dynamic
  * @param widget cast=(GtkWidget *)
  * @param requisition cast=(GtkRequisition *),flags=no_in
  */
@@ -13464,6 +14188,19 @@ public static final void gtk_widget_size_request(int /*long*/ widget, GtkRequisi
 	}
 }
 /**
+ * @method flags=dynamic
+ * @param allocation cast=(GtkAllocation *),flags=no_out
+ */
+public static final native void _gtk_widget_set_allocation(int /*long*/ widget, GtkAllocation allocation);
+public static final void gtk_widget_set_allocation(int /*long*/ widget, GtkAllocation allocation) {
+	lock.lock();
+	try {
+		_gtk_widget_set_allocation(widget, allocation);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
  * @param widget cast=(GtkWidget *)
  * @param property_name cast=(const gchar *)
  * @param terminator cast=(const gchar *),flags=sentinel
@@ -13504,16 +14241,6 @@ public static final boolean gtk_widget_translate_coordinates(int /*long*/ src_wi
 		lock.unlock();
 	}
 }
-/** @param widget cast=(GtkWidget *) */
-public static final native void _gtk_widget_unrealize(int /*long*/ widget);
-public static final void gtk_widget_unrealize(int /*long*/ widget) {
-	lock.lock();
-	try {
-		_gtk_widget_unrealize(widget);
-	} finally {
-		lock.unlock();
-	}
-}
 /** @param window cast=(GtkWindow *) */
 public static final native boolean _gtk_window_activate_default(int /*long*/ window);
 public static final boolean gtk_window_activate_default(int /*long*/ window) {
@@ -13628,20 +14355,6 @@ public static final void gtk_window_get_position(int /*long*/ handle, int[] x, i
 	}
 }
 /**
- * @param handle cast=(GtkWindow *)
- * @param x cast=(gint *)
- * @param y cast=(gint *)
- */
-public static final native void _gtk_window_get_size(int /*long*/ handle, int[] x, int[] y);
-public static final void gtk_window_get_size(int /*long*/ handle, int[] x, int[] y) {
-	lock.lock();
-	try {
-		_gtk_window_get_size(handle, x, y);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @param group cast=(GtkWindowGroup*)
  * @param window cast=(GtkWindow*)
  */
@@ -13759,16 +14472,6 @@ public static final int /*long*/ gtk_window_new(int type) {
 		lock.unlock();
 	}
 }
-/** @param window cast=(GtkWindow *) */
-public static final native void _gtk_window_present(int /*long*/ window);
-public static final void gtk_window_present(int /*long*/ window) {
-	lock.lock();
-	try {
-		_gtk_window_present(window);
-	} finally {
-		lock.unlock();
-	}
-}
 /**
  * @param window cast=(GtkWindow *)
  * @param accel_group cast=(GtkAccelGroup *)
@@ -13823,20 +14526,6 @@ public static final void gtk_window_set_destroy_with_parent(int /*long*/ window,
 	}
 }
 /**
- * @method flags=dynamic
- * @param window cast=(GtkWindow *)
- * @param setting cast=(gboolean)
- */
-public static final native void _gtk_window_set_keep_below(int /*long*/ window, boolean setting);
-public static final void gtk_window_set_keep_below(int /*long*/ window,  boolean setting) {
-	lock.lock();
-	try {
-		_gtk_window_set_keep_below(window, setting);
-	} finally {
-		lock.unlock();
-	}
-}
-/**
  * @param window cast=(GtkWindow *)
  * @param geometry_widget cast=(GtkWidget *)
  * @param geometry flags=no_out
@@ -14087,12 +14776,6 @@ public static final native void memmove(GtkWidgetClass dest, int /*long*/ src);
 /**
  * @param dest cast=(void *),flags=no_in
  * @param src cast=(const void *)
- * @param size cast=(size_t)
- */
-public static final native void memmove(GtkTargetPair dest, int /*long*/ src, int /*long*/ size);
-/**
- * @param dest cast=(void *),flags=no_in
- * @param src cast=(const void *)
  */
 public static final native void memmove(GtkAdjustment dest, int /*long*/ src);
 /**
@@ -15068,6 +15751,20 @@ public static final void pango_layout_get_size(int /*long*/ layout, int[] width,
 		lock.unlock();
 	}
 }
+/**
+ * @param layout cast=(PangoLayout *)
+ * @param width cast=(int *)
+ * @param height cast=(int *)
+ */
+public static final native void _pango_layout_get_pixel_size(int /*long*/ layout, int[] width, int[] height);
+public static final void pango_layout_get_pixel_size(int /*long*/ layout, int[] width, int[] height) {
+	lock.lock();
+	try {
+		_pango_layout_get_pixel_size(layout, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
 /** @param layout cast=(PangoLayout*) */
 public static final native int _pango_layout_get_spacing(int /*long*/ layout);
 public static final int pango_layout_get_spacing(int /*long*/ layout) {
@@ -15494,4 +16191,54 @@ public static final int access (byte [] path, int amode) {
  * @param s2 cast=(const char*)
  */
 public static final native int strcmp (int /*long*/ s1, byte [] s2);
+
+public static final native int /*long*/ _swt_fixed_get_type();
+public static final int /*long*/ swt_fixed_get_type() {
+	lock.lock();
+	try {
+		return _swt_fixed_get_type();
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param fixed cast=(SwtFixed*)
+ * @param widget cast=(GtkWidget*)
+ * @param sibling cast=(GtkWidget*)
+ */
+public static final native void _swt_fixed_restack(int /*long*/ fixed, int /*long*/ widget, int /*long*/ sibling, boolean above);
+public static final void swt_fixed_restack(int /*long*/ fixed, int /*long*/ widget, int /*long*/ sibling, boolean above) {
+	lock.lock();
+	try {
+		_swt_fixed_restack(fixed, widget, sibling, above);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param fixed cast=(SwtFixed*)
+ * @param widget cast=(GtkWidget*)
+ */
+public static final native void _swt_fixed_move(int /*long*/ fixed, int /*long*/ widget, int x, int y);
+public static final void swt_fixed_move(int /*long*/ fixed, int /*long*/ widget, int x, int y) {
+	lock.lock();
+	try {
+		_swt_fixed_move(fixed, widget, x, y);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @param fixed cast=(SwtFixed*)
+ * @param widget cast=(GtkWidget*)
+ */
+public static final native void _swt_fixed_resize(int /*long*/ fixed, int /*long*/ widget, int width, int height);
+public static final void swt_fixed_resize(int /*long*/ fixed, int /*long*/ widget, int width, int height) {
+	lock.lock();
+	try {
+		_swt_fixed_resize(fixed, widget, width, height);
+	} finally {
+		lock.unlock();
+	}
+}
 }
diff --git a/org/eclipse/swt/internal/gtk/PangoAttribute.java b/org/eclipse/swt/internal/gtk/PangoAttribute.java
index f218643..f68dd44 100644
--- a/org/eclipse/swt/internal/gtk/PangoAttribute.java
+++ b/org/eclipse/swt/internal/gtk/PangoAttribute.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/PangoItem.java b/org/eclipse/swt/internal/gtk/PangoItem.java
index c0f5b01..3932161 100644
--- a/org/eclipse/swt/internal/gtk/PangoItem.java
+++ b/org/eclipse/swt/internal/gtk/PangoItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/PangoLayoutLine.java b/org/eclipse/swt/internal/gtk/PangoLayoutLine.java
index d1517c6..7fc32b7 100644
--- a/org/eclipse/swt/internal/gtk/PangoLayoutLine.java
+++ b/org/eclipse/swt/internal/gtk/PangoLayoutLine.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/PangoLayoutRun.java b/org/eclipse/swt/internal/gtk/PangoLayoutRun.java
index b032b6a..2c4aec2 100644
--- a/org/eclipse/swt/internal/gtk/PangoLayoutRun.java
+++ b/org/eclipse/swt/internal/gtk/PangoLayoutRun.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/internal/gtk/XAnyEvent.java b/org/eclipse/swt/internal/gtk/XAnyEvent.java
index 9fc6482..736cae5 100644
--- a/org/eclipse/swt/internal/gtk/XAnyEvent.java
+++ b/org/eclipse/swt/internal/gtk/XAnyEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/gtk/XClientMessageEvent.java b/org/eclipse/swt/internal/gtk/XClientMessageEvent.java
index b1428fd..e7178ce 100644
--- a/org/eclipse/swt/internal/gtk/XClientMessageEvent.java
+++ b/org/eclipse/swt/internal/gtk/XClientMessageEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/gtk/XCrossingEvent.java b/org/eclipse/swt/internal/gtk/XCrossingEvent.java
index b8631b9..dd00ed1 100644
--- a/org/eclipse/swt/internal/gtk/XCrossingEvent.java
+++ b/org/eclipse/swt/internal/gtk/XCrossingEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/gtk/XRenderPictureAttributes.java b/org/eclipse/swt/internal/gtk/XRenderPictureAttributes.java
index 9509633..e6ab64b 100644
--- a/org/eclipse/swt/internal/gtk/XRenderPictureAttributes.java
+++ b/org/eclipse/swt/internal/gtk/XRenderPictureAttributes.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/gtk/XWindowChanges.java b/org/eclipse/swt/internal/gtk/XWindowChanges.java
index b748c34..098e17d 100644
--- a/org/eclipse/swt/internal/gtk/XWindowChanges.java
+++ b/org/eclipse/swt/internal/gtk/XWindowChanges.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/GIFFileFormat.java b/org/eclipse/swt/internal/image/GIFFileFormat.java
index 583e7c0..9eeb6c3 100644
--- a/org/eclipse/swt/internal/image/GIFFileFormat.java
+++ b/org/eclipse/swt/internal/image/GIFFileFormat.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -99,30 +99,34 @@ public final class GIFFileFormat extends FileFormat {
 		}
 		loader.backgroundPixel = backgroundPixel;
 
-		getExtensions();
-		int id = readID();
 		ImageData[] images = new ImageData[0];
-		while (id == GIF_IMAGE_BLOCK_ID) {
-			ImageData image = readImageBlock(palette);
-			if (loader.hasListeners()) {
-				loader.notifyListeners(new ImageLoaderEvent(loader, image, 3, true));
-			}
-			ImageData[] oldImages = images;
-			images = new ImageData[oldImages.length + 1];
-			System.arraycopy(oldImages, 0, images, 0, oldImages.length);
-			images[images.length - 1] = image;
-			try {
-				/* Read the 0-byte terminator at the end of the image. */
-				id = inputStream.read();
-				if (id > 0) {
-					/* We read the terminator earlier. */
-					inputStream.unread(new byte[] {(byte)id});
+		int id = readID();
+		while (id != GIF_TRAILER_ID && id != -1) {
+			if (id == GIF_IMAGE_BLOCK_ID) {
+				ImageData image = readImageBlock(palette);
+				if (loader.hasListeners()) {
+					loader.notifyListeners(new ImageLoaderEvent(loader, image, 3, true));
 				}
-			} catch (IOException e) {
-				SWT.error(SWT.ERROR_IO, e);
+				ImageData[] oldImages = images;
+				images = new ImageData[oldImages.length + 1];
+				System.arraycopy(oldImages, 0, images, 0, oldImages.length);
+				images[images.length - 1] = image;
+			} else if (id == GIF_EXTENSION_BLOCK_ID) {
+				/* Read the extension block. Currently, only the
+				 * interesting parts of certain extensions are kept,
+				 * and the rest is discarded. In future, if we want
+				 * to keep extensions, they should be grouped with
+				 * the image data before which they appear.
+				 */
+				readExtension();
+			} else {
+				/* The GIF is not to spec, but try to salvage it
+				 * if we read at least one image. */
+				if (images.length > 0) break;
+				SWT.error(SWT.ERROR_INVALID_IMAGE);
 			}
-			getExtensions();
-			id = readID();
+			id = readID(); // block terminator (0)
+			if (id == 0) id = readID(); // next block ID (unless we just read it)
 		}
 		return images;
 	}
@@ -140,33 +144,6 @@ public final class GIFFileFormat extends FileFormat {
 	}
 
 	/**
-	 * Read extensions until an image descriptor appears.
-	 * In the future, if we care about the extensions, they
-	 * should be properly grouped with the image data before
-	 * which they appeared. Right now, the interesting parts
-	 * of some extensions are kept, but the rest is discarded.
-	 * Throw an error if an error occurs.
-	 */
-	void getExtensions() {
-		int id = readID();
-		while (id != GIF_IMAGE_BLOCK_ID && id != GIF_TRAILER_ID && id > 0) {
-			if (id == GIF_EXTENSION_BLOCK_ID) {
-				readExtension();
-			} else {
-				SWT.error(SWT.ERROR_INVALID_IMAGE);
-			}
-			id = readID();
-		}
-		if (id == GIF_IMAGE_BLOCK_ID || id == GIF_TRAILER_ID) {
-			try {
-				inputStream.unread(new byte[] {(byte)id});
-			} catch (IOException e) {
-				SWT.error(SWT.ERROR_IO, e);
-			}
-		}
-	}
-
-	/**
 	 * Read a control extension.
 	 * Return the extension block data.
 	 */
@@ -276,8 +253,6 @@ public final class GIFFileFormat extends FileFormat {
 			} else {
 				transparentPixel = -1;
 			}
-			// Read block terminator.
-			inputStream.read();
 			return controlBlock;
 		} catch (Exception e) {
 			SWT.error(SWT.ERROR_IO, e);
diff --git a/org/eclipse/swt/internal/image/JPEGAppn.java b/org/eclipse/swt/internal/image/JPEGAppn.java
index 37160a2..1a396c8 100644
--- a/org/eclipse/swt/internal/image/JPEGAppn.java
+++ b/org/eclipse/swt/internal/image/JPEGAppn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGArithmeticConditioningTable.java b/org/eclipse/swt/internal/image/JPEGArithmeticConditioningTable.java
index b8c8392..b6b85c5 100644
--- a/org/eclipse/swt/internal/image/JPEGArithmeticConditioningTable.java
+++ b/org/eclipse/swt/internal/image/JPEGArithmeticConditioningTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGComment.java b/org/eclipse/swt/internal/image/JPEGComment.java
index 21070f1..294b091 100644
--- a/org/eclipse/swt/internal/image/JPEGComment.java
+++ b/org/eclipse/swt/internal/image/JPEGComment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGEndOfImage.java b/org/eclipse/swt/internal/image/JPEGEndOfImage.java
index faa369c..6f7888b 100644
--- a/org/eclipse/swt/internal/image/JPEGEndOfImage.java
+++ b/org/eclipse/swt/internal/image/JPEGEndOfImage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGFixedSizeSegment.java b/org/eclipse/swt/internal/image/JPEGFixedSizeSegment.java
index 28da869..d305572 100644
--- a/org/eclipse/swt/internal/image/JPEGFixedSizeSegment.java
+++ b/org/eclipse/swt/internal/image/JPEGFixedSizeSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGFrameHeader.java b/org/eclipse/swt/internal/image/JPEGFrameHeader.java
index 00d7610..68adffc 100644
--- a/org/eclipse/swt/internal/image/JPEGFrameHeader.java
+++ b/org/eclipse/swt/internal/image/JPEGFrameHeader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGHuffmanTable.java b/org/eclipse/swt/internal/image/JPEGHuffmanTable.java
index 043c615..7647ec6 100644
--- a/org/eclipse/swt/internal/image/JPEGHuffmanTable.java
+++ b/org/eclipse/swt/internal/image/JPEGHuffmanTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGQuantizationTable.java b/org/eclipse/swt/internal/image/JPEGQuantizationTable.java
index 18eab61..44def30 100644
--- a/org/eclipse/swt/internal/image/JPEGQuantizationTable.java
+++ b/org/eclipse/swt/internal/image/JPEGQuantizationTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGRestartInterval.java b/org/eclipse/swt/internal/image/JPEGRestartInterval.java
index fd6fc48..695f5ff 100644
--- a/org/eclipse/swt/internal/image/JPEGRestartInterval.java
+++ b/org/eclipse/swt/internal/image/JPEGRestartInterval.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGScanHeader.java b/org/eclipse/swt/internal/image/JPEGScanHeader.java
index ae8d25d..ccbc719 100644
--- a/org/eclipse/swt/internal/image/JPEGScanHeader.java
+++ b/org/eclipse/swt/internal/image/JPEGScanHeader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGSegment.java b/org/eclipse/swt/internal/image/JPEGSegment.java
index 0dbf42a..b9f2c1e 100644
--- a/org/eclipse/swt/internal/image/JPEGSegment.java
+++ b/org/eclipse/swt/internal/image/JPEGSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGStartOfImage.java b/org/eclipse/swt/internal/image/JPEGStartOfImage.java
index 5b80999..b90f677 100644
--- a/org/eclipse/swt/internal/image/JPEGStartOfImage.java
+++ b/org/eclipse/swt/internal/image/JPEGStartOfImage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/JPEGVariableSizeSegment.java b/org/eclipse/swt/internal/image/JPEGVariableSizeSegment.java
index a3896e6..decadda 100644
--- a/org/eclipse/swt/internal/image/JPEGVariableSizeSegment.java
+++ b/org/eclipse/swt/internal/image/JPEGVariableSizeSegment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/LEDataInputStream.java b/org/eclipse/swt/internal/image/LEDataInputStream.java
index f399989..293cb1d 100644
--- a/org/eclipse/swt/internal/image/LEDataInputStream.java
+++ b/org/eclipse/swt/internal/image/LEDataInputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/LEDataOutputStream.java b/org/eclipse/swt/internal/image/LEDataOutputStream.java
index bd8a330..1706c41 100644
--- a/org/eclipse/swt/internal/image/LEDataOutputStream.java
+++ b/org/eclipse/swt/internal/image/LEDataOutputStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/LZWCodec.java b/org/eclipse/swt/internal/image/LZWCodec.java
index 190ff01..44f51ee 100644
--- a/org/eclipse/swt/internal/image/LZWCodec.java
+++ b/org/eclipse/swt/internal/image/LZWCodec.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/LZWNode.java b/org/eclipse/swt/internal/image/LZWNode.java
index 869e532..c122ae9 100644
--- a/org/eclipse/swt/internal/image/LZWNode.java
+++ b/org/eclipse/swt/internal/image/LZWNode.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PNGFileFormat.java b/org/eclipse/swt/internal/image/PNGFileFormat.java
index 3d01237..591d7f6 100644
--- a/org/eclipse/swt/internal/image/PNGFileFormat.java
+++ b/org/eclipse/swt/internal/image/PNGFileFormat.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngChunk.java b/org/eclipse/swt/internal/image/PngChunk.java
index 74b438e..7d0b49b 100644
--- a/org/eclipse/swt/internal/image/PngChunk.java
+++ b/org/eclipse/swt/internal/image/PngChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngChunkReader.java b/org/eclipse/swt/internal/image/PngChunkReader.java
index 0997c46..6af06ad 100644
--- a/org/eclipse/swt/internal/image/PngChunkReader.java
+++ b/org/eclipse/swt/internal/image/PngChunkReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngDecodingDataStream.java b/org/eclipse/swt/internal/image/PngDecodingDataStream.java
index a05021a..ca50a7b 100644
--- a/org/eclipse/swt/internal/image/PngDecodingDataStream.java
+++ b/org/eclipse/swt/internal/image/PngDecodingDataStream.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngFileReadState.java b/org/eclipse/swt/internal/image/PngFileReadState.java
index f8f0064..148c625 100644
--- a/org/eclipse/swt/internal/image/PngFileReadState.java
+++ b/org/eclipse/swt/internal/image/PngFileReadState.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngHuffmanTable.java b/org/eclipse/swt/internal/image/PngHuffmanTable.java
index 48e0269..703c624 100644
--- a/org/eclipse/swt/internal/image/PngHuffmanTable.java
+++ b/org/eclipse/swt/internal/image/PngHuffmanTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngHuffmanTables.java b/org/eclipse/swt/internal/image/PngHuffmanTables.java
index 6ecaeb4..b67ccd7 100644
--- a/org/eclipse/swt/internal/image/PngHuffmanTables.java
+++ b/org/eclipse/swt/internal/image/PngHuffmanTables.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngIdatChunk.java b/org/eclipse/swt/internal/image/PngIdatChunk.java
index 6dfac62..b2e3f91 100644
--- a/org/eclipse/swt/internal/image/PngIdatChunk.java
+++ b/org/eclipse/swt/internal/image/PngIdatChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngIendChunk.java b/org/eclipse/swt/internal/image/PngIendChunk.java
index ed604e0..0f8c445 100644
--- a/org/eclipse/swt/internal/image/PngIendChunk.java
+++ b/org/eclipse/swt/internal/image/PngIendChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngIhdrChunk.java b/org/eclipse/swt/internal/image/PngIhdrChunk.java
index 37d5508..c836b8f 100644
--- a/org/eclipse/swt/internal/image/PngIhdrChunk.java
+++ b/org/eclipse/swt/internal/image/PngIhdrChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngLzBlockReader.java b/org/eclipse/swt/internal/image/PngLzBlockReader.java
index a2d9c1f..3aed703 100644
--- a/org/eclipse/swt/internal/image/PngLzBlockReader.java
+++ b/org/eclipse/swt/internal/image/PngLzBlockReader.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngPlteChunk.java b/org/eclipse/swt/internal/image/PngPlteChunk.java
index 421849b..995692d 100644
--- a/org/eclipse/swt/internal/image/PngPlteChunk.java
+++ b/org/eclipse/swt/internal/image/PngPlteChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/PngTrnsChunk.java b/org/eclipse/swt/internal/image/PngTrnsChunk.java
index d659a67..51be6b8 100644
--- a/org/eclipse/swt/internal/image/PngTrnsChunk.java
+++ b/org/eclipse/swt/internal/image/PngTrnsChunk.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/image/WinBMPFileFormat.java b/org/eclipse/swt/internal/image/WinBMPFileFormat.java
index 04af102..42bbbac 100644
--- a/org/eclipse/swt/internal/image/WinBMPFileFormat.java
+++ b/org/eclipse/swt/internal/image/WinBMPFileFormat.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/mozilla/XPCOM.java b/org/eclipse/swt/internal/mozilla/XPCOM.java
index 0a1e970..de19859 100644
--- a/org/eclipse/swt/internal/mozilla/XPCOM.java
+++ b/org/eclipse/swt/internal/mozilla/XPCOM.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -64,9 +64,37 @@ public class XPCOM extends C {
 	public static final nsID NS_IWEBBROWSER_CID = new nsID ("F1EAC761-87E9-11d3-AF80-00A024FFC08C"); //$NON-NLS-1$
 	public static final nsID NS_IXPCONNECT_CID = new nsID ("CB6593E0-F9B2-11d2-BDD6-000064657374"); //$NON-NLS-1$
 
+	/* IID constants */
+	public static final nsID NS_IAUTHPROMPT2_IID = new nsID ("651395eb-8612-4876-8ac0-a88d4dce9e1e"); //$NON-NLS-1$
+	public static final nsID NS_IBADCERTLISTENER2_IID = new nsID ("2c3d268c-ad82-49f3-99aa-e9ffddd7a0dc"); //$NON-NLS-1$
+	public static final nsID NS_ICONTEXTMENULISTENER_IID = new nsID ("3478b6b0-3875-11d4-94ef-0020183bf181"); //$NON-NLS-1$
+	public static final nsID NS_IDIRECTORYSERVICE_IID = new nsID ("57a66a60-d43a-11d3-8cc2-00609792278c"); //$NON-NLS-1$
+	public static final nsID NS_IDIRECTORYSERVICEPROVIDER_IID = new nsID ("bbf8cab0-d43a-11d3-8cc2-00609792278c"); //$NON-NLS-1$
+	public static final nsID NS_IDIRECTORYSERVICEPROVIDER2_IID = new nsID ("2f977d4b-5485-11d4-87e2-0010a4e75ef2"); //$NON-NLS-1$
+	public static final nsID NS_IFACTORY_IID = new nsID ("00000001-0000-0000-c000-000000000046"); //$NON-NLS-1$
+	public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_IID = new nsID ("d7ebddf0-4c84-11d4-807a-00600811a9c3"); //$NON-NLS-1$
+	public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_1_9_IID = new nsID ("f3704fdc-8ae6-4eba-a3c3-f02958ac0649"); //$NON-NLS-1$
+	public static final nsID NS_IPROMPTFACTORY_IID = new nsID ("2532b748-75db-4732-9173-78d3bf34f694"); //$NON-NLS-1$
+	public static final nsID NS_IPROMPTSERVICE2_IID = new nsID ("cf86d196-dbee-4482-9dfa-3477aa128319"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTCONTEXT_1_9_IID = new nsID ("e7b9871d-3adc-4bf7-850d-7fb9554886bf"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTCONTEXT_1_9_2_IID = new nsID ("87482b5e-e019-4df5-9bc2-b2a51b1f2d28"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTCONTEXT_10_IID = new nsID ("2e583bf4-3c1f-432d-8283-8dee7eccc88b"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTCONTEXT_17_IID = new nsID ("d012cdb3-8f1e-4440-8cbd-327f981d37b4"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTGLOBALOBJECT_1_9_2_IID = new nsID ("e9f3f2c1-2d94-4722-bbd4-2bf6fdf42f48"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTGLOBALOBJECT_10_IID = new nsID ("08f73284-26e3-4fa6-bf89-8326f92a94b3"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTGLOBALOBJECT_17_IID = new nsID ("92569431-6e6e-408a-a88c-45285c1c8573"); //$NON-NLS-1$
+	public static final nsID NS_ISCRIPTGLOBALOBJECT_1_9_IID = new nsID ("6afecd40-0b9a-4cfd-8c42-0f645cd91829"); //$NON-NLS-1$
 	public static final nsID NS_ISCRIPTOBJECTOWNER_IID = new nsID ("8f6bca7e-ce42-11d1-b724-00600891d8c9"); //$NON-NLS-1$
 	public static final nsID NS_ISECURITYCHECKEDCOMPONENT_IID = new nsID ("0dad9e8c-a12d-4dcb-9a6f-7d09839356e1"); //$NON-NLS-1$
+	public static final nsID NS_ISUPPORTSWEAKREFERENCE_IID = new nsID ("9188bc86-f92e-11d2-81ef-0060083a0bcf"); //$NON-NLS-1$
+	public static final nsID NS_ITOOLTIPLISTENER_IID = new nsID ("44b78386-1dd2-11b2-9ad2-e4eee2ca1916"); //$NON-NLS-1$
+	public static final nsID NS_IURICONTENTLISTENER_IID = new nsID ("94928ab3-8b63-11d3-989d-001083010e9b"); //$NON-NLS-1$
+	public static final nsID NS_IWEAKREFERENCE_IID = new nsID ("9188bc85-f92e-11d2-81ef-0060083a0bcf"); //$NON-NLS-1$
+	public static final nsID NS_IWEBBROWSERCHROMEFOCUS_IID = new nsID ("d2206418-1dd1-11b2-8e55-acddcd2bcfb8"); //$NON-NLS-1$
+	public static final nsID NS_IWINDOWCREATOR_IID = new nsID ("30465632-a777-44cc-90f9-8145475ef999"); //$NON-NLS-1$
+	public static final nsID NS_IWINDOWCREATOR2_IID = new nsID ("f673ec81-a4b0-11d6-964b-eb5a2bf216fc"); //$NON-NLS-1$
 
+	/* contract ID constants */
 	public static final String EXTERNAL_CONTRACTID = "@eclipse.org/external;1"; //$NON-NLS-1$
 	public static final String NS_AUTHPROMPTER_CONTRACTID = "@mozilla.org/passwordmanager/authpromptfactory;1"; //$NON-NLS-1$
 	public static final String NS_CERTOVERRIDE_CONTRACTID = "@mozilla.org/security/certoverride;1"; //$NON-NLS-1$
@@ -161,7 +189,7 @@ public class XPCOM extends C {
 public static final native int nsDynamicFunctionLoad_sizeof ();
 
 public static void memmove(int /*long*/ dest, boolean[] src) {
-	if (nsISupports.IsXULRunner10) { // TODO change this reference
+	if (nsISupports.IsXULRunner10 || nsISupports.IsXULRunner17) { // TODO change this reference
 		memmove (dest, new byte[] {src[0] ? (byte)1 : 0}, 1);
 	} else {
 		memmove (dest, new int[] {src[0] ? 1 : 0}, 4);
@@ -169,7 +197,7 @@ public static void memmove(int /*long*/ dest, boolean[] src) {
 }
 
 public static void memmove(boolean[] dest, int /*long*/ src) {
-	if (nsISupports.IsXULRunner10) { // TODO change this reference
+	if (nsISupports.IsXULRunner10 || nsISupports.IsXULRunner17) { // TODO change this reference
 		byte[] result = new byte[1];
 		memmove (result, src, 1);
 		dest[0] = result[0] != 0;
@@ -378,6 +406,19 @@ public static final int nsIScriptGlobalObject_EnsureScriptEnvironment(int /*long
 }
 /**
  * @method flags=cpp
+ * @param ptr cast=(nsIScriptGlobalObject17 *)
+ */
+public static final native int _nsIScriptGlobalObject17_EnsureScriptEnvironment(int /*long*/ ptr);
+public static final int nsIScriptGlobalObject17_EnsureScriptEnvironment(int /*long*/ ptr) {
+	lock.lock();
+	try {
+		return _nsIScriptGlobalObject17_EnsureScriptEnvironment(ptr);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=cpp
  * @param ptr cast=(nsIScriptGlobalObject *)
  */
 public static final native int /*long*/ _nsIScriptGlobalObject_GetScriptContext(int /*long*/ ptr, int lang);
@@ -391,6 +432,19 @@ public static final int /*long*/ nsIScriptGlobalObject_GetScriptContext(int /*lo
 }
 /**
  * @method flags=cpp
+ * @param ptr cast=(nsIScriptGlobalObject17 *)
+ */
+public static final native int /*long*/ _nsIScriptGlobalObject17_GetScriptContext(int /*long*/ ptr);
+public static final int /*long*/ nsIScriptGlobalObject17_GetScriptContext(int /*long*/ ptr) {
+	lock.lock();
+	try {
+		return _nsIScriptGlobalObject17_GetScriptContext(ptr);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=cpp
  * @param ptr cast=(nsIScriptContext *)
  */
 public static final native int /*long*/ _nsIScriptContext_GetNativeContext(int /*long*/ ptr);
@@ -404,6 +458,19 @@ public static final int /*long*/ nsIScriptContext_GetNativeContext(int /*long*/
 }
 /**
  * @method flags=cpp
+ * @param ptr cast=(nsIScriptContext17 *)
+ */
+public static final native int /*long*/ _nsIScriptContext17_GetNativeContext(int /*long*/ ptr);
+public static final int /*long*/ nsIScriptContext17_GetNativeContext(int /*long*/ ptr) {
+	lock.lock();
+	try {
+		return _nsIScriptContext17_GetNativeContext(ptr);
+	} finally {
+		lock.unlock();
+	}
+}
+/**
+ * @method flags=cpp
  * @param ptr cast=(nsEmbedCString *)
  */
 public static final native int /*long*/ _nsEmbedCString_get(int /*long*/ ptr);
@@ -619,8 +686,8 @@ public static final int Call(int /*long*/ ptr, int /*long*/ aLibXULDirectory, in
 
 /**
  * @param ptr cast=(SWT_XREInitEmbedding2)
- * @param aLibXULDirectory cast=(nsILocalFile *)
- * @param aAppDirectory cast=(nsILocalFile *)
+ * @param aLibXULDirectory cast=(nsIFile *)
+ * @param aAppDirectory cast=(nsIFile *)
  * @param aAppDirProvider cast=(nsIDirectoryServiceProvider *)
  */
 public static final native int _Call(int /*long*/ ptr, int /*long*/ aLibXULDirectory, int /*long*/ aAppDirectory, int /*long*/ aAppDirProvider);
@@ -643,6 +710,15 @@ static final int VtblCall(int fnNumber, int /*long*/ ppVtbl) {
 	}
 }
 
+static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte arg0);
+static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte arg0) {
+	lock.lock();
+	try {
+		return _VtblCall(fnNumber, ppVtbl, arg0);
+	} finally {
+		lock.unlock();
+	}
+}
 static final native int _VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0);
 static final int VtblCall(int fnNumber, int /*long*/ ppVtbl, byte[] arg0) {
 	lock.lock();
diff --git a/org/eclipse/swt/internal/mozilla/XPCOMObject.java b/org/eclipse/swt/internal/mozilla/XPCOMObject.java
index bc22e54..4232394 100644
--- a/org/eclipse/swt/internal/mozilla/XPCOMObject.java
+++ b/org/eclipse/swt/internal/mozilla/XPCOMObject.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2009 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/mozilla/init/GREProperty.java b/org/eclipse/swt/internal/mozilla/init/GREProperty.java
index d5935e3..b9ebcd2 100644
--- a/org/eclipse/swt/internal/mozilla/init/GREProperty.java
+++ b/org/eclipse/swt/internal/mozilla/init/GREProperty.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla.init;
diff --git a/org/eclipse/swt/internal/mozilla/init/GREVersionRange.java b/org/eclipse/swt/internal/mozilla/init/GREVersionRange.java
index 0ec838b..df75a7a 100644
--- a/org/eclipse/swt/internal/mozilla/init/GREVersionRange.java
+++ b/org/eclipse/swt/internal/mozilla/init/GREVersionRange.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla.init;
diff --git a/org/eclipse/swt/internal/mozilla/init/XPCOMInit.java b/org/eclipse/swt/internal/mozilla/init/XPCOMInit.java
index d8901f2..02acf8c 100644
--- a/org/eclipse/swt/internal/mozilla/init/XPCOMInit.java
+++ b/org/eclipse/swt/internal/mozilla/init/XPCOMInit.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla.init;
diff --git a/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java b/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java
index 1053001..d0d48dc 100644
--- a/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java
+++ b/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsEmbedString.java b/org/eclipse/swt/internal/mozilla/nsEmbedString.java
index 162a0ad..63f0a16 100644
--- a/org/eclipse/swt/internal/mozilla/nsEmbedString.java
+++ b/org/eclipse/swt/internal/mozilla/nsEmbedString.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2004 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2004, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIAppShell.java b/org/eclipse/swt/internal/mozilla/nsIAppShell.java
index 9ce7481..6360e4a 100644
--- a/org/eclipse/swt/internal/mozilla/nsIAppShell.java
+++ b/org/eclipse/swt/internal/mozilla/nsIAppShell.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -36,7 +36,7 @@ public class nsIAppShell extends nsISupports {
 
 	public static final nsID NS_IAPPSHELL_IID =
 		new nsID(NS_IAPPSHELL_IID_STR);
-
+	
 	public nsIAppShell(int /*long*/ address) {
 		super(address);
 	}
diff --git a/org/eclipse/swt/internal/mozilla/nsIAuthInformation.java b/org/eclipse/swt/internal/mozilla/nsIAuthInformation.java
index 41cb4e2..4ae7153 100644
--- a/org/eclipse/swt/internal/mozilla/nsIAuthInformation.java
+++ b/org/eclipse/swt/internal/mozilla/nsIAuthInformation.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIAuthPrompt2.java b/org/eclipse/swt/internal/mozilla/nsIAuthPrompt2.java
deleted file mode 100644
index a1b88d8..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIAuthPrompt2.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2012 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIAuthPrompt2 extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
-
-	public static final String NS_IAUTHPROMPT2_IID_STR =
-		"651395eb-8612-4876-8ac0-a88d4dce9e1e";
-
-	public static final nsID NS_IAUTHPROMPT2_IID =
-		new nsID(NS_IAUTHPROMPT2_IID_STR);
-
-	public nsIAuthPrompt2(int /*long*/ address) {
-		super(address);
-	}
-
-	public static final int LEVEL_NONE = 0;
-	public static final int LEVEL_PW_ENCRYPTED = 1;
-	public static final int LEVEL_SECURE = 2;
-
-	public int PromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int[] _retval) {
-		return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 1, getAddress(), aParent, aChannel, level, authInfo, checkboxLabel, checkValue, _retval);
-	}
-
-	public int AsyncPromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int /*long*/ aCallback, int /*long*/ aContext, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 2, getAddress(), aParent, aChannel, aCallback, aContext, level, authInfo, checkboxLabel, checkValue, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java b/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java
deleted file mode 100644
index 39c0009..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIBadCertListener2.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIBadCertListener2 extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_IBADCERTLISTENER2_IID_STR =
-		"2c3d268c-ad82-49f3-99aa-e9ffddd7a0dc";
-
-	public static final nsID NS_IBADCERTLISTENER2_IID =
-		new nsID(NS_IBADCERTLISTENER2_IID_STR);
-
-	public nsIBadCertListener2(int /*long*/ address) {
-		super(address);
-	}
-
-	public int NotifyCertProblem(int /*long*/ socketInfo, int /*long*/ status, int /*long*/ targetSite, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), socketInfo, status, targetSite, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIBaseWindow.java b/org/eclipse/swt/internal/mozilla/nsIBaseWindow.java
index 4d62dde..53b94c9 100644
--- a/org/eclipse/swt/internal/mozilla/nsIBaseWindow.java
+++ b/org/eclipse/swt/internal/mozilla/nsIBaseWindow.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIBaseWindow extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 22 : 24);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 23 : (IsXULRunner10 ? 22 : 24));
 
 	public static final String NS_IBASEWINDOW_IID_STR =
 		"046bc8a0-8015-11d3-af70-00a024ffc08c";
@@ -59,89 +59,19 @@ public class nsIBaseWindow extends nsISupports {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
 	}
 
-	public int SetPosition(int x, int y) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), x, y);
-	}
-
-	public int GetPosition(int[] x, int[] y) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), x, y);
-	}
-
-	public int SetSize(int cx, int cy, int fRepaint) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), cx, cy, fRepaint);
-	}
-
-	public int GetSize(int[] cx, int[] cy) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), cx, cy);
-	}
-
 	public int SetPositionAndSize(int x, int y, int cx, int cy, int fRepaint) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), x, y, cx, cy, fRepaint);
 	}
 
-	public int GetPositionAndSize(int[] x, int[] y, int[] cx, int[] cy) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), x, y, cx, cy);
-	}
-
-	public int Repaint(int force) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), force);
-	}
-
-	public int GetParentWidget(int /*long*/[] aParentWidget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aParentWidget);
-	}
-
-	public int SetParentWidget(int /*long*/ aParentWidget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aParentWidget);
-	}
-
 	public int GetParentNativeWindow(int /*long*/[] aParentNativeWindow) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aParentNativeWindow);
 	}
 
-	public int SetParentNativeWindow(int /*long*/ aParentNativeWindow) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aParentNativeWindow);
-	}
-
-	public int GetVisibility(int[] aVisibility) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aVisibility);
-	}
-
 	public int SetVisibility(int aVisibility) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aVisibility);
-	}
-
-	public int GetEnabled(int[] aEnabled) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aEnabled);
-	}
-
-	public int SetEnabled(int aEnabled) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aEnabled);
-	}
-
-	public int GetBlurSuppression(int[] aBlurSuppression) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aBlurSuppression);
-	}
-
-	public int SetBlurSuppression(int aBlurSuppression) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aBlurSuppression);
-	}
-
-	public int GetMainWidget(int /*long*/[] aMainWidget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 19 : 21), getAddress(), aMainWidget);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 17 : 16), getAddress(), aVisibility);
 	}
 
 	public int SetFocus() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 20 : 22), getAddress());
-	}
-
-	public int GetTitle(int /*long*/[] aTitle) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 21 : 23), getAddress(), aTitle);
-	}
-
-	public int SetTitle(char[] aTitle) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 22 : 24), getAddress(), aTitle);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 21 : (IsXULRunner10 ? 20 : 22)), getAddress());
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsICancelable.java b/org/eclipse/swt/internal/mozilla/nsICancelable.java
index e20f203..588066e 100644
--- a/org/eclipse/swt/internal/mozilla/nsICancelable.java
+++ b/org/eclipse/swt/internal/mozilla/nsICancelable.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICategoryManager.java b/org/eclipse/swt/internal/mozilla/nsICategoryManager.java
index 8417352..df9ff06 100644
--- a/org/eclipse/swt/internal/mozilla/nsICategoryManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsICategoryManager.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java b/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java
index 6da76cf..36f968f 100644
--- a/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java
+++ b/org/eclipse/swt/internal/mozilla/nsICertOverrideService.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java b/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java
index 9838c2d..238868e 100644
--- a/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java
+++ b/org/eclipse/swt/internal/mozilla/nsICertificateDialogs.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIChannel.java b/org/eclipse/swt/internal/mozilla/nsIChannel.java
index 51559cc..9eb98e1 100644
--- a/org/eclipse/swt/internal/mozilla/nsIChannel.java
+++ b/org/eclipse/swt/internal/mozilla/nsIChannel.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIChannel extends nsIRequest {
 
-	static final int LAST_METHOD_ID = nsIRequest.LAST_METHOD_ID + (IsXULRunner10 ? 19 : 16);
+	static final int LAST_METHOD_ID = nsIRequest.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 19 : 16);
 
 	public static final String NS_ICHANNEL_IID_STR =
 		"c63a055a-a676-4e71-bf3c-6cfa11082018";
@@ -112,17 +112,17 @@ public class nsIChannel extends nsIRequest {
 	}
 
 	public int GetContentDisposition(int[] aContentDisposition) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 17, getAddress(), aContentDisposition);
 	}
 
 	public int GetContentDispositionFilename(int /*long*/ aContentDispositionFilename) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 18, getAddress(), aContentDispositionFilename);
 	}
 
 	public int GetContentDispositionHeader(int /*long*/ aContentDispositionHeader) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsIRequest.LAST_METHOD_ID + 19, getAddress(), aContentDispositionHeader);
 	}
 
diff --git a/org/eclipse/swt/internal/mozilla/nsIClassInfo.java b/org/eclipse/swt/internal/mozilla/nsIClassInfo.java
index 92f9c35..06679f5 100644
--- a/org/eclipse/swt/internal/mozilla/nsIClassInfo.java
+++ b/org/eclipse/swt/internal/mozilla/nsIClassInfo.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIComponentManager.java b/org/eclipse/swt/internal/mozilla/nsIComponentManager.java
index 9da2f35..792c6c4 100644
--- a/org/eclipse/swt/internal/mozilla/nsIComponentManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsIComponentManager.java
@@ -22,33 +22,31 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIComponentManager extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 4;
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 6 : 4);
 
 	public static final String NS_ICOMPONENTMANAGER_IID_STR =
 		"a88e5a60-205a-4bb1-94e1-2628daf51eae";
 
+	public static final String NS_ICOMPONENTMANAGER_17_IID_STR =
+		"1d940426-5fe5-42c3-84ae-a300f2d9ebd5";
+
 	public static final nsID NS_ICOMPONENTMANAGER_IID =
 		new nsID(NS_ICOMPONENTMANAGER_IID_STR);
+		
+	public static final nsID NS_ICOMPONENTMANAGER_17_IID =
+		new nsID(NS_ICOMPONENTMANAGER_17_IID_STR);
 
 	public nsIComponentManager(int /*long*/ address) {
 		super(address);
 	}
 
-	public int GetClassObject(nsID aClass, nsID aIID, int /*long*/[] result) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aClass, aIID, result);
-	}
-
-	public int GetClassObjectByContractID(byte[] aContractID, nsID aIID, int /*long*/[] result) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aContractID, aIID, result);
-	}
-
 	public int CreateInstance(nsID aClass, int /*long*/ aDelegate, nsID aIID, int /*long*/[] result) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aClass, aDelegate, aIID, result);
 	}
diff --git a/org/eclipse/swt/internal/mozilla/nsIComponentRegistrar.java b/org/eclipse/swt/internal/mozilla/nsIComponentRegistrar.java
index 6ff0cff..3aecf12 100644
--- a/org/eclipse/swt/internal/mozilla/nsIComponentRegistrar.java
+++ b/org/eclipse/swt/internal/mozilla/nsIComponentRegistrar.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIContextMenuListener.java b/org/eclipse/swt/internal/mozilla/nsIContextMenuListener.java
deleted file mode 100644
index 8cbac68..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIContextMenuListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIContextMenuListener extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_ICONTEXTMENULISTENER_IID_STR =
-		"3478b6b0-3875-11d4-94ef-0020183bf181";
-
-	public static final nsID NS_ICONTEXTMENULISTENER_IID =
-		new nsID(NS_ICONTEXTMENULISTENER_IID_STR);
-
-	public nsIContextMenuListener(int /*long*/ address) {
-		super(address);
-	}
-
-	public static final int CONTEXT_NONE = 0;
-	public static final int CONTEXT_LINK = 1;
-	public static final int CONTEXT_IMAGE = 2;
-	public static final int CONTEXT_DOCUMENT = 4;
-	public static final int CONTEXT_TEXT = 8;
-	public static final int CONTEXT_INPUT = 16;
-
-	public int OnShowContextMenu(int aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aContextFlags, aEvent, aNode);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsICookie.java b/org/eclipse/swt/internal/mozilla/nsICookie.java
index 76a1d64..084da0d 100644
--- a/org/eclipse/swt/internal/mozilla/nsICookie.java
+++ b/org/eclipse/swt/internal/mozilla/nsICookie.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICookieManager.java b/org/eclipse/swt/internal/mozilla/nsICookieManager.java
index a925dd8..3f2eee5 100644
--- a/org/eclipse/swt/internal/mozilla/nsICookieManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsICookieManager.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICookieService.java b/org/eclipse/swt/internal/mozilla/nsICookieService.java
index eebe8ab..37ac5c6 100644
--- a/org/eclipse/swt/internal/mozilla/nsICookieService.java
+++ b/org/eclipse/swt/internal/mozilla/nsICookieService.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java b/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java
index afff59f..65fa01f 100644
--- a/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java
+++ b/org/eclipse/swt/internal/mozilla/nsICookieService_1_9.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsID.java b/org/eclipse/swt/internal/mozilla/nsID.java
index 9e2a28b..cf96e75 100644
--- a/org/eclipse/swt/internal/mozilla/nsID.java
+++ b/org/eclipse/swt/internal/mozilla/nsID.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2010 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java b/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java
index 36134ce..f4e1344 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMDocument.java
@@ -22,20 +22,23 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMDocument extends nsIDOMNode {
 
-	static final int LAST_METHOD_ID = nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 61 : 17);
+	static final int LAST_METHOD_ID = nsIDOMNode.LAST_METHOD_ID + (IsXULRunner17 ? 63 : (IsXULRunner10 ? 61 : 17));
 
 	public static final String NS_IDOMDOCUMENT_IID_STR =
 		"a6cf9075-15b3-11d2-932e-00805f8add32";
 
 	public static final String NS_IDOMDOCUMENT_10_IID_STR =
 		"5c3bff4d-ae7f-4c93-948c-519589672c30";
+	
+	public static final String NS_IDOMDOCUMENT_17_IID_STR =
+		"fdb92f4f-c6b4-4509-a29d-a309981e28ac";
 
 	public static final nsID NS_IDOMDOCUMENT_IID =
 		new nsID(NS_IDOMDOCUMENT_IID_STR);
@@ -43,307 +46,14 @@ public class nsIDOMDocument extends nsIDOMNode {
 	public static final nsID NS_IDOMDOCUMENT_10_IID =
 		new nsID(NS_IDOMDOCUMENT_10_IID_STR);
 
+	public static final nsID NS_IDOMDOCUMENT_17_IID =
+		new nsID(NS_IDOMDOCUMENT_17_IID_STR);
+
 	public nsIDOMDocument(int /*long*/ address) {
 		super(address);
 	}
 
-	public int GetDoctype(int /*long*/[] aDoctype) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 1, getAddress(), aDoctype);
-	}
-
-	public int GetImplementation(int /*long*/[] aImplementation) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 2, getAddress(), aImplementation);
-	}
-
 	public int GetDocumentElement(int /*long*/[] aDocumentElement) {
 		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 3, getAddress(), aDocumentElement);
 	}
-
-	public int CreateElement(int /*long*/ tagName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 4, getAddress(), tagName, _retval);
-	}
-
-	public int CreateDocumentFragment(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 5, getAddress(), _retval);
-	}
-
-	public int CreateTextNode(int /*long*/ data, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 6, getAddress(), data, _retval);
-	}
-
-	public int CreateComment(int /*long*/ data, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 7, getAddress(), data, _retval);
-	}
-
-	public int CreateCDATASection(int /*long*/ data, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 8, getAddress(), data, _retval);
-	}
-
-	public int CreateProcessingInstruction(int /*long*/ target, int /*long*/ data, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 9, getAddress(), target, data, _retval);
-	}
-
-	public int CreateAttribute(int /*long*/ name, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 10, getAddress(), name, _retval);
-	}
-
-	public int CreateEntityReference(int /*long*/ name, int /*long*/[] _retval) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 11, getAddress(), name, _retval);
-	}
-
-	public int GetElementsByTagName(int /*long*/ tagname, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 11 : 12), getAddress(), tagname, _retval);
-	}
-
-	public int ImportNode(int /*long*/ importedNode, int deep, int /*long*/[] _retval) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 13, getAddress(), importedNode, deep, _retval);
-	}
-
-	public int ImportNode(int /*long*/ importedNode, int deep, int _argc, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 12, getAddress(), importedNode, deep, _argc, _retval);
-	}
-
-	public int CreateElementNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 13 : 14), getAddress(), namespaceURI, qualifiedName, _retval);
-	}
-
-	public int CreateAttributeNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 14 : 15), getAddress(), namespaceURI, qualifiedName, _retval);
-	}
-
-	public int GetElementsByTagNameNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 15 : 16), getAddress(), namespaceURI, localName, _retval);
-	}
-
-	public int GetElementById(int /*long*/ elementId, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 16 : 17), getAddress(), elementId, _retval);
-	}
-	
-	public int GetInputEncoding(int /*long*/ aInputEncoding) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 17, getAddress(), aInputEncoding);
-	}
-
-	public int GetDocumentURI(int /*long*/ aDocumentURI) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 18, getAddress(), aDocumentURI);
-	}
-
-	public int AdoptNode(int /*long*/ source, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 19, getAddress(), source, _retval);
-	}
-
-	public int CreateRange(int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 20, getAddress(), _retval);
-	}
-
-	public int CreateNodeIterator(int /*long*/ root, int whatToShow, int /*long*/ filter, int entityReferenceExpansion, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 21, getAddress(), root, whatToShow, filter, entityReferenceExpansion, _retval);
-	}
-
-	public int CreateTreeWalker(int /*long*/ root, int whatToShow, int /*long*/ filter, int entityReferenceExpansion, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 22, getAddress(), root, whatToShow, filter, entityReferenceExpansion, _retval);
-	}
-
-	public int CreateEvent(int /*long*/ eventType, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 23, getAddress(), eventType, _retval);
-	}
-
-	public int GetDefaultView(int /*long*/[] aDefaultView) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 24, getAddress(), aDefaultView);
-	}
-
-	public int GetCharacterSet(int /*long*/ aCharacterSet) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 25, getAddress(), aCharacterSet);
-	}
-
-	public int GetDir(int /*long*/ aDir) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 26, getAddress(), aDir);
-	}
-
-	public int SetDir(int /*long*/ aDir) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 27, getAddress(), aDir);
-	}
-
-	public int GetLocation(int /*long*/[] aLocation) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 28, getAddress(), aLocation);
-	}
-
-	public int GetTitle(int /*long*/ aTitle) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 29, getAddress(), aTitle);
-	}
-
-	public int SetTitle(int /*long*/ aTitle) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 30, getAddress(), aTitle);
-	}
-
-	public int GetReadyState(int /*long*/ aReadyState) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 31, getAddress(), aReadyState);
-	}
-
-	public int GetLastModified(int /*long*/ aLastModified) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 32, getAddress(), aLastModified);
-	}
-
-	public int GetReferrer(int /*long*/ aReferrer) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 33, getAddress(), aReferrer);
-	}
-
-	public int HasFocus(int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 34, getAddress(), _retval);
-	}
-
-	public int GetActiveElement(int /*long*/[] aActiveElement) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 35, getAddress(), aActiveElement);
-	}
-
-	public int GetElementsByClassName(int /*long*/ classes, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 36, getAddress(), classes, _retval);
-	}
-
-	public int GetStyleSheets(int /*long*/[] aStyleSheets) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 37, getAddress(), aStyleSheets);
-	}
-
-	public int GetPreferredStyleSheetSet(int /*long*/ aPreferredStyleSheetSet) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 38, getAddress(), aPreferredStyleSheetSet);
-	}
-
-	public int GetSelectedStyleSheetSet(int /*long*/ aSelectedStyleSheetSet) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 39, getAddress(), aSelectedStyleSheetSet);
-	}
-
-	public int SetSelectedStyleSheetSet(int /*long*/ aSelectedStyleSheetSet) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 40, getAddress(), aSelectedStyleSheetSet);
-	}
-
-	public int GetLastStyleSheetSet(int /*long*/ aLastStyleSheetSet) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 41, getAddress(), aLastStyleSheetSet);
-	}
-
-	public int GetStyleSheetSets(int /*long*/[] aStyleSheetSets) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 42, getAddress(), aStyleSheetSets);
-	}
-
-	public int EnableStyleSheetsForSet(int /*long*/ name) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 43, getAddress(), name);
-	}
-
-	public int ElementFromPoint(float x, float y, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 44, getAddress(), x, y, _retval);
-	}
-
-	public int GetContentType(int /*long*/ aContentType) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 45, getAddress(), aContentType);
-	}
-
-	public int GetMozSyntheticDocument(int[] aMozSyntheticDocument) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 46, getAddress(), aMozSyntheticDocument);
-	}
-
-	public int GetCurrentScript(int /*long*/[] aCurrentScript) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 47, getAddress(), aCurrentScript);
-	}
-
-	public int ReleaseCapture() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 48, getAddress());
-	}
-
-	public int MozSetImageElement(int /*long*/ aImageElementId, int /*long*/ aImageElement) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 49, getAddress(), aImageElementId, aImageElement);
-	}
-
-	public int GetMozFullScreenElement(int /*long*/[] aMozFullScreenElement) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 50, getAddress(), aMozFullScreenElement);
-	}
-
-	public int MozCancelFullScreen() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 51, getAddress());
-	}
-
-	public int GetMozFullScreen(int[] aMozFullScreen) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 52, getAddress(), aMozFullScreen);
-	}
-
-	public int GetMozFullScreenEnabled(int[] aMozFullScreenEnabled) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 53, getAddress(), aMozFullScreenEnabled);
-	}
-
-	public int GetOnreadystatechange(int /*long*/ cx, int /*long*/ aOnreadystatechange) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 54, getAddress(), cx, aOnreadystatechange);
-	}
-
-	public int SetOnreadystatechange(int /*long*/ cx, int /*long*/ aOnreadystatechange) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 55, getAddress(), cx, aOnreadystatechange);
-	}
-
-	public int GetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 56, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int SetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 57, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int GetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 58, getAddress(), cx, aOnmouseleave);
-	}
-
-	public int SetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 59, getAddress(), cx, aOnmouseleave);
-	}
-
-	public int GetMozHidden(int[] aMozHidden) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 60, getAddress(), aMozHidden);
-	}
-
-	public int GetMozVisibilityState(int /*long*/ aMozVisibilityState) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 61, getAddress(), aMozVisibilityState);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMElement.java b/org/eclipse/swt/internal/mozilla/nsIDOMElement.java
deleted file mode 100644
index caaee0b..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIDOMElement.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIDOMElement extends nsIDOMNode {
-
-	static final int LAST_METHOD_ID = nsIDOMNode.LAST_METHOD_ID + (IsXULRunner10 ? 20 : 16);
-
-	public static final String NS_IDOMELEMENT_IID_STR =
-		"a6cf9078-15b3-11d2-932e-00805f8add32";
-
-	public static final String NS_IDOMELEMENT_10_IID_STR =
-		"1f249e8b-7b41-44c0-a8d5-15298c1198cd";
-
-	public static final nsID NS_IDOMELEMENT_IID =
-		new nsID(NS_IDOMELEMENT_IID_STR);
-
-	public static final nsID NS_IDOMELEMENT_10_IID =
-		new nsID(NS_IDOMELEMENT_10_IID_STR);
-
-	public nsIDOMElement(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetTagName(int /*long*/ aTagName) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 1, getAddress(), aTagName);
-	}
-
-	public int GetAttribute(int /*long*/ name, int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 2, getAddress(), name, _retval);
-	}
-
-	public int SetAttribute(int /*long*/ name, int /*long*/ value) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 3, getAddress(), name, value);
-	}
-
-	public int RemoveAttribute(int /*long*/ name) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 4, getAddress(), name);
-	}
-
-	public int GetAttributeNode(int /*long*/ name, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 5, getAddress(), name, _retval);
-	}
-
-	public int SetAttributeNode(int /*long*/ newAttr, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 6, getAddress(), newAttr, _retval);
-	}
-
-	public int RemoveAttributeNode(int /*long*/ oldAttr, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 7, getAddress(), oldAttr, _retval);
-	}
-
-	public int GetElementsByTagName(int /*long*/ name, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 8, getAddress(), name, _retval);
-	}
-
-	public int GetAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 9, getAddress(), namespaceURI, localName, _retval);
-	}
-
-	public int SetAttributeNS(int /*long*/ namespaceURI, int /*long*/ qualifiedName, int /*long*/ value) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 10, getAddress(), namespaceURI, qualifiedName, value);
-	}
-
-	public int RemoveAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 11, getAddress(), namespaceURI, localName);
-	}
-
-	public int GetAttributeNodeNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 12, getAddress(), namespaceURI, localName, _retval);
-	}
-
-	public int SetAttributeNodeNS(int /*long*/ newAttr, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 13, getAddress(), newAttr, _retval);
-	}
-
-	public int GetElementsByTagNameNS(int /*long*/ namespaceURI, int /*long*/ localName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 14, getAddress(), namespaceURI, localName, _retval);
-	}
-
-	public int HasAttribute(int /*long*/ name, int[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 15, getAddress(), name, _retval);
-	}
-
-	public int HasAttributeNS(int /*long*/ namespaceURI, int /*long*/ localName, int[] _retval) {
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 16, getAddress(), namespaceURI, localName, _retval);
-	}
-
-	public int GetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 17, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int SetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 18, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int GetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 19, getAddress(), cx, aOnmouseleave);
-	}
-
-	public int SetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMNode.LAST_METHOD_ID + 20, getAddress(), cx, aOnmouseleave);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMEvent.java b/org/eclipse/swt/internal/mozilla/nsIDOMEvent.java
index c38dc7f..3e713db 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMEvent.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMEvent.java
@@ -22,20 +22,23 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMEvent extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 12 : 10);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 25 : (IsXULRunner10 ? 12 : 10));
 
 	public static final String NS_IDOMEVENT_IID_STR =
 		"a66b7b80-ff46-bd97-0080-5f8ae38add32";
 
 	public static final String NS_IDOMEVENT_10_IID_STR =
 		"e85cff74-951f-45c1-be0c-89442ea2f500";
+	
+	public static final String NS_IDOMEVENT_17_IID_STR =
+		"270c945b-8a65-4170-bc0b-4ec1443cd39f";
 
 	public static final nsID NS_IDOMEVENT_IID =
 		new nsID(NS_IDOMEVENT_IID_STR);
@@ -43,6 +46,9 @@ public class nsIDOMEvent extends nsISupports {
 	public static final nsID NS_IDOMEVENT_10_IID =
 		new nsID(NS_IDOMEVENT_10_IID_STR);
 
+	public static final nsID NS_IDOMEVENT_17_IID =
+		new nsID(NS_IDOMEVENT_17_IID_STR);
+
 	public nsIDOMEvent(int /*long*/ address) {
 		super(address);
 	}
@@ -55,49 +61,11 @@ public class nsIDOMEvent extends nsISupports {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aType);
 	}
 
-	public int GetTarget(int /*long*/[] aTarget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aTarget);
-	}
-
 	public int GetCurrentTarget(int /*long*/[] aCurrentTarget) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aCurrentTarget);
 	}
 
-	public int GetEventPhase(short[] aEventPhase) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aEventPhase);
-	}
-
-	public int GetBubbles(int[] aBubbles) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aBubbles);
-	}
-
-	public int GetCancelable(int[] aCancelable) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aCancelable);
-	}
-
-	public int GetTimeStamp(int /*long*/ aTimeStamp) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aTimeStamp);
-	}
-
-	public int StopPropagation() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
-	}
-
 	public int PreventDefault() {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress());
 	}
-
-	public int InitEvent(int /*long*/ eventTypeArg, int canBubbleArg, int cancelableArg) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), eventTypeArg, canBubbleArg, cancelableArg);
-	}
-	
-	public int GetDefaultPrevented(int[] aDefaultPrevented) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDefaultPrevented);
-	}
-
-	public int StopImmediatePropagation() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress());
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMEventTarget.java b/org/eclipse/swt/internal/mozilla/nsIDOMEventTarget.java
index 46543bc..03ec273 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMEventTarget.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMEventTarget.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -37,31 +37,33 @@ public class nsIDOMEventTarget extends nsISupports {
 	public static final String NS_IDOMEVENTTARGET_10_IID_STR =
 		"1797d5a4-b12a-428d-9eef-a0e13839728c";
 	
+	public static final String NS_IDOMEVENTTARGET_17_IID_STR =
+		"8e375931-298d-4d0a-9cb4-5668f0cdc5a8";
+	
 	public static final nsID NS_IDOMEVENTTARGET_IID =
 		new nsID(NS_IDOMEVENTTARGET_IID_STR);
 
 	public static final nsID NS_IDOMEVENTTARGET_10_IID =
 		new nsID(NS_IDOMEVENTTARGET_10_IID_STR);
 
+	public static final nsID NS_IDOMEVENTTARGET_17_IID =
+		new nsID(NS_IDOMEVENTTARGET_17_IID_STR);
+
 	public nsIDOMEventTarget(int /*long*/ address) {
 		super(address);
 	}
 
 	public int AddEventListener(int /*long*/ type, int /*long*/ listener, int useCapture) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (IsXULRunner10 || IsXULRunner17) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), type, listener, useCapture);
 	}
 
 	public int AddEventListener(int /*long*/ type, int /*long*/ listener, int useCapture, int wantsUntrusted, int _argc) {
-		if (!IsXULRunner10) return AddEventListener(type, listener, useCapture);
+		if (!(IsXULRunner10 || IsXULRunner17)) return AddEventListener(type, listener, useCapture);
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), type, listener, useCapture, wantsUntrusted, _argc);
 	}
 
 	public int RemoveEventListener(int /*long*/ type, int /*long*/ listener, int useCapture) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), type, listener, useCapture);
-	}
-
-	public int DispatchEvent(int /*long*/ evt, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), evt, _retval);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 3 : 2), getAddress(), type, listener, useCapture);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMKeyEvent.java b/org/eclipse/swt/internal/mozilla/nsIDOMKeyEvent.java
index 5af9744..4d0ab6a 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMKeyEvent.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMKeyEvent.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMKeyEvent extends nsIDOMUIEvent {
 
-	static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + 7;
+	static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 9 : 7);
 
 	public static final String NS_IDOMKEYEVENT_IID_STR =
 		"028e0e6e-8b01-11d3-aae7-0010838a3123";
@@ -37,12 +37,18 @@ public class nsIDOMKeyEvent extends nsIDOMUIEvent {
 	public static final String NS_IDOMKEYEVENT_10_IID_STR =
 		"def974c3-b491-481b-bc67-29174af4b26a";
 	
+	public static final String NS_IDOMKEYEVENT_17_IID_STR =
+		"5d116380-8432-48cb-a717-200f04c39d2f";
+		
 	public static final nsID NS_IDOMKEYEVENT_IID =
 		new nsID(NS_IDOMKEYEVENT_IID_STR);
 
 	public static final nsID NS_IDOMKEYEVENT_10_IID =
 		new nsID(NS_IDOMKEYEVENT_10_IID_STR);
 	
+	public static final nsID NS_IDOMKEYEVENT_17_IID =
+		new nsID(NS_IDOMKEYEVENT_17_IID_STR);
+		
 	public nsIDOMKeyEvent(int /*long*/ address) {
 		super(address);
 	}
@@ -179,7 +185,6 @@ public class nsIDOMKeyEvent extends nsIDOMUIEvent {
 	public static final int DOM_VK_CONTEXT_MENU = 93;
 	public static final int DOM_VK_SLEEP = 95;
 
-
 	public int GetCharCode(int[] aCharCode) {
 		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 1, getAddress(), aCharCode);
 	}
@@ -203,8 +208,4 @@ public class nsIDOMKeyEvent extends nsIDOMUIEvent {
 	public int GetMetaKey(int[] aMetaKey) {
 		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 6, getAddress(), aMetaKey);
 	}
-
-	public int InitKeyEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int ctrlKeyArg, int altKeyArg, int shiftKeyArg, int metaKeyArg, int keyCodeArg, int charCodeArg) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 7, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, keyCodeArg, charCodeArg);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMMouseEvent.java b/org/eclipse/swt/internal/mozilla/nsIDOMMouseEvent.java
index e6f100c..daaf49b 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMMouseEvent.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMMouseEvent.java
@@ -22,26 +22,32 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMMouseEvent extends nsIDOMUIEvent {
 
-	static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner10 ? 14 : 11);
+	static final int LAST_METHOD_ID = nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 18 : (IsXULRunner10 ? 14 : 11));
 
 	public static final String NS_IDOMMOUSEEVENT_IID_STR =
 		"ff751edc-8b02-aae7-0010-8301838a3123";
 
 	public static final String NS_IDOMMOUSEEVENT_10_IID_STR =
 		"7f57aa45-6792-4d8b-ba5b-201533cf0b2f";
+	
+	public static final String NS_IDOMMOUSEEVENT_17_IID_STR =
+		"796c3436-5f89-4145-be3a-49808c09fdc6";
 
 	public static final nsID NS_IDOMMOUSEEVENT_IID =
 		new nsID(NS_IDOMMOUSEEVENT_IID_STR);
 
 	public static final nsID NS_IDOMMOUSEEVENT_10_IID =
 		new nsID(NS_IDOMMOUSEEVENT_10_IID_STR);
+	
+	public static final nsID NS_IDOMMOUSEEVENT_17_IID =
+		new nsID(NS_IDOMMOUSEEVENT_17_IID_STR);
 
 	public nsIDOMMouseEvent(int /*long*/ address) {
 		super(address);
@@ -55,40 +61,28 @@ public class nsIDOMMouseEvent extends nsIDOMUIEvent {
 		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 2, getAddress(), aScreenY);
 	}
 
-	public int GetClientX(int[] aClientX) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 3, getAddress(), aClientX);
-	}
-
-	public int GetClientY(int[] aClientY) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 4, getAddress(), aClientY);
-	}
-
 	public int GetCtrlKey(int[] aCtrlKey) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 5, getAddress(), aCtrlKey);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 7 : 5), getAddress(), aCtrlKey);
 	}
 
 	public int GetShiftKey(int[] aShiftKey) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 6, getAddress(), aShiftKey);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 8 : 6), getAddress(), aShiftKey);
 	}
 
 	public int GetAltKey(int[] aAltKey) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 7, getAddress(), aAltKey);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 9 : 7), getAddress(), aAltKey);
 	}
 
 	public int GetMetaKey(int[] aMetaKey) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 8, getAddress(), aMetaKey);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 10 : 8), getAddress(), aMetaKey);
 	}
 
 	public int GetButton(short[] aButton) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 9, getAddress(), aButton);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 11 : 9), getAddress(), aButton);
 	}
 
 	public int GetRelatedTarget(int /*long*/[] aRelatedTarget) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 10, getAddress(), aRelatedTarget);
-	}
-
-	public int InitMouseEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, int ctrlKeyArg, int altKeyArg, int shiftKeyArg, int metaKeyArg, short buttonArg, int /*long*/ relatedTargetArg) {
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 11, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg);
+		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + (IsXULRunner17 ? 13 : 10), getAddress(), aRelatedTarget);
 	}
 
 	/* the following constants are defined in Mozilla 10 */
@@ -99,20 +93,4 @@ public class nsIDOMMouseEvent extends nsIDOMUIEvent {
 	public static final int MOZ_SOURCE_CURSOR = 4;
 	public static final int MOZ_SOURCE_TOUCH = 5;
 	public static final int MOZ_SOURCE_KEYBOARD = 6;
-
-	public int GetMozPressure(float[] aMozPressure) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 12, getAddress(), aMozPressure);
-	}
-
-	public int GetMozInputSource(short[] aMozInputSource) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 13, getAddress(), aMozInputSource);
-	}
-
-	public int InitNSMouseEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int detailArg, int screenXArg, int screenYArg, int clientXArg, int clientYArg, int ctrlKeyArg, int altKeyArg, int shiftKeyArg, int metaKeyArg, short buttonArg, int /*long*/ relatedTargetArg, float pressure, short inputSourceArg) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMUIEvent.LAST_METHOD_ID + 14, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg, pressure, inputSourceArg);
-	}
-
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMNode.java b/org/eclipse/swt/internal/mozilla/nsIDOMNode.java
index 9ce83a5..ffc094e 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMNode.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMNode.java
@@ -22,20 +22,23 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMNode extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 36 : 25);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 36 : 25);
 
 	public static final String NS_IDOMNODE_IID_STR =
 		"a6cf907c-15b3-11d2-932e-00805f8add32";
 
 	public static final String NS_IDOMNODE_10_IID_STR =
 		"ce82fb71-60f2-4c38-be31-de5f2f90dada";
+	
+	public static final String NS_IDOMNODE_17_IID_STR =
+		"5e9bcec9-5928-4f77-8a9c-424ef01c20e1";
 
 	public static final nsID NS_IDOMNODE_IID =
 		new nsID(NS_IDOMNODE_IID_STR);
@@ -43,6 +46,9 @@ public class nsIDOMNode extends nsISupports {
 	public static final nsID NS_IDOMNODE_10_IID =
 		new nsID(NS_IDOMNODE_10_IID_STR);
 
+	public static final nsID NS_IDOMNODE_17_IID =
+		new nsID(NS_IDOMNODE_17_IID_STR);
+
 	public nsIDOMNode(int /*long*/ address) {
 		super(address);
 	}
@@ -60,172 +66,11 @@ public class nsIDOMNode extends nsISupports {
 	public static final int DOCUMENT_FRAGMENT_NODE = 11;
 	public static final int NOTATION_NODE = 12;
 
-	public int GetNodeName(int /*long*/ aNodeName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aNodeName);
-	}
-
-	public int GetNodeValue(int /*long*/ aNodeValue) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aNodeValue);
-	}
-
-	public int SetNodeValue(int /*long*/ aNodeValue) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aNodeValue);
-	}
-
-	public int GetNodeType(short[] aNodeType) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aNodeType);
-	}
-
-	public int GetParentNode(int /*long*/[] aParentNode) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParentNode);
-	}
-
-	public int GetParentElement(int /*long*/[] aParentElement) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParentElement);
-	}
-
-	public int GetChildNodes(int /*long*/[] aChildNodes) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 7 : 6), getAddress(), aChildNodes);
-	}
-
-	public int GetFirstChild(int /*long*/[] aFirstChild) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 8 : 7), getAddress(), aFirstChild);
-	}
-
-	public int GetLastChild(int /*long*/[] aLastChild) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 9 : 8), getAddress(), aLastChild);
-	}
-
-	public int GetPreviousSibling(int /*long*/[] aPreviousSibling) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 10 : 9), getAddress(), aPreviousSibling);
-	}
-
-	public int GetNextSibling(int /*long*/[] aNextSibling) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 11 : 10), getAddress(), aNextSibling);
-	}
-
-	public int GetAttributes(int /*long*/[] aAttributes) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 12 : 11), getAddress(), aAttributes);
-	}
-
-	public int GetOwnerDocument(int /*long*/[] aOwnerDocument) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 13 : 12), getAddress(), aOwnerDocument);
-	}
-
-	public int InsertBefore(int /*long*/ newChild, int /*long*/ refChild, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 14 : 13), getAddress(), newChild, refChild, _retval);
-	}
-
-	public int ReplaceChild(int /*long*/ newChild, int /*long*/ oldChild, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 15 : 14), getAddress(), newChild, oldChild, _retval);
-	}
-
-	public int RemoveChild(int /*long*/ oldChild, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 16 : 15), getAddress(), oldChild, _retval);
-	}
-
-	public int AppendChild(int /*long*/ newChild, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 17 : 16), getAddress(), newChild, _retval);
-	}
-
-	public int HasChildNodes(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 18 : 17), getAddress(), _retval);
-	}
-
-	public int CloneNode(int deep, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 19 : 18), getAddress(), deep, _retval);
-	}
-
-	public int Normalize() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 20 : 19), getAddress());
-	}
-
-	public int IsSupported(int /*long*/ feature, int /*long*/ version, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 21 : 20), getAddress(), feature, version, _retval);
-	}
-
-	public int GetNamespaceURI(int /*long*/ aNamespaceURI) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 22 : 21), getAddress(), aNamespaceURI);
-	}
-
-	public int GetPrefix(int /*long*/ aPrefix) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 23 : 22), getAddress(), aPrefix);
-	}
-
-	public int SetPrefix(int /*long*/ aPrefix) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aPrefix);
-	}
-
-	public int GetLocalName(int /*long*/ aLocalName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aLocalName);
-	}
-
-	public int HasAttributes(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), _retval);
-	}
-	
-	public int GetDOMBaseURI(int /*long*/ aBaseURI) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aBaseURI);
-	}
-
-	/* the following constants are defined in Mozilla 10 */
+	/* the following constants are available as of Mozilla 10 */
 	public static final int DOCUMENT_POSITION_DISCONNECTED = 1;
 	public static final int DOCUMENT_POSITION_PRECEDING = 2;
 	public static final int DOCUMENT_POSITION_FOLLOWING = 4;
 	public static final int DOCUMENT_POSITION_CONTAINS = 8;
 	public static final int DOCUMENT_POSITION_CONTAINED_BY = 16;
 	public static final int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
-
-	public int CompareDocumentPosition(int /*long*/ other, short[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), other, _retval);
-	}
-
-	public int GetTextContent(int /*long*/ aTextContent) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aTextContent);
-	}
-
-	public int SetTextContent(int /*long*/ aTextContent) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aTextContent);
-	}
-
-	public int LookupPrefix(int /*long*/ namespaceURI, int /*long*/ _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), namespaceURI, _retval);
-	}
-
-	public int IsDefaultNamespace(int /*long*/ namespaceURI, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), namespaceURI, _retval);
-	}
-
-	public int LookupNamespaceURI(int /*long*/ prefix, int /*long*/ _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), prefix, _retval);
-	}
-
-	public int IsEqualNode(int /*long*/ arg, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), arg, _retval);
-	}
-
-	public int SetUserData(int /*long*/ key, int /*long*/ data, int /*long*/ handler, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), key, data, handler, _retval);
-	}
-
-	public int GetUserData(int /*long*/ key, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), key, _retval);
-	}
-
-	public int Contains(int /*long*/ aOther, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aOther, _retval);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java b/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java
index a44ec1f..9c2c8d4 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMSerializer.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java b/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java
index 3a8ec8b..ecd7e06 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMSerializer_1_7.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMUIEvent.java b/org/eclipse/swt/internal/mozilla/nsIDOMUIEvent.java
index e8b4ca5..fcdaebb 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMUIEvent.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMUIEvent.java
@@ -22,94 +22,42 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMUIEvent extends nsIDOMEvent {
 
-	static final int LAST_METHOD_ID = nsIDOMEvent.LAST_METHOD_ID + (IsXULRunner10 ? 13 : 3);
+	static final int LAST_METHOD_ID = nsIDOMEvent.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 13 : 3);
 
 	public static final String NS_IDOMUIEVENT_IID_STR =
 		"a6cf90c3-15b3-11d2-932e-00805f8add32";
 
 	public static final String NS_IDOMUIEVENT_10_IID_STR =
 		"af3f130e-0c22-4613-a150-780a46c22e3a";
-	
+
+	public static final String NS_IDOMUIEVENT_17_IID_STR =
+		"415453e6-132a-4902-9a99-cc480f0311b6";
+
 	public static final nsID NS_IDOMUIEVENT_IID =
 		new nsID(NS_IDOMUIEVENT_IID_STR);
 
 	public static final nsID NS_IDOMUIEVENT_10_IID =
 		new nsID(NS_IDOMUIEVENT_10_IID_STR);
 
+	public static final nsID NS_IDOMUIEVENT_17_IID =
+		new nsID(NS_IDOMUIEVENT_17_IID_STR);
+
 	public nsIDOMUIEvent(int /*long*/ address) {
 		super(address);
 	}
 
-	public int GetView(int /*long*/[] aView) {
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 1, getAddress(), aView);
-	}
-
 	public int GetDetail(int[] aDetail) {
 		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 2, getAddress(), aDetail);
 	}
 
-	public int InitUIEvent(int /*long*/ typeArg, int canBubbleArg, int cancelableArg, int /*long*/ viewArg, int detailArg) {
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 3, getAddress(), typeArg, canBubbleArg, cancelableArg, viewArg, detailArg);
-	}
-	
 	/* the following constants are defined in Mozilla 10 */
 	public static final int SCROLL_PAGE_UP = -32768;
 	public static final int SCROLL_PAGE_DOWN = 32768;
-
-	public int GetLayerX(int[] aLayerX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 4, getAddress(), aLayerX);
-	}
-
-	public int GetLayerY(int[] aLayerY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 5, getAddress(), aLayerY);
-	}
-
-	public int GetPageX(int[] aPageX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 6, getAddress(), aPageX);
-	}
-
-	public int GetPageY(int[] aPageY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 7, getAddress(), aPageY);
-	}
-
-	public int GetWhich(int[] aWhich) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 8, getAddress(), aWhich);
-	}
-
-	public int GetRangeParent(int /*long*/[] aRangeParent) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 9, getAddress(), aRangeParent);
-	}
-
-	public int GetRangeOffset(int[] aRangeOffset) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 10, getAddress(), aRangeOffset);
-	}
-
-	public int GetCancelBubble(int[] aCancelBubble) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 11, getAddress(), aCancelBubble);
-	}
-
-	public int SetCancelBubble(int aCancelBubble) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 12, getAddress(), aCancelBubble);
-	}
-
-	public int GetIsChar(int[] aIsChar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIDOMEvent.LAST_METHOD_ID + 13, getAddress(), aIsChar);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMWindow.java b/org/eclipse/swt/internal/mozilla/nsIDOMWindow.java
index 6dd6bf6..219dcc1 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMWindow.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMWindow.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIDOMWindow extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 129 : 17);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 139 : (IsXULRunner10 ? 129 : 17));
 
 	public static final String NS_IDOMWINDOW_IID_STR =
 		"a6cf906b-15b3-11d2-932e-00805f8add32";
@@ -37,642 +37,37 @@ public class nsIDOMWindow extends nsISupports {
 	public static final String NS_IDOMWINDOW_10_IID_STR =
 		"8f577294-d572-4473-94b1-d2c5a74a2a74";
 
+	public static final String NS_IDOMWINDOW_17_IID_STR =
+		"a1af6cd9-c6e7-4037-99f8-dbca1b03e345";
+
 	public static final nsID NS_IDOMWINDOW_IID =
 		new nsID(NS_IDOMWINDOW_IID_STR);
 
 	public static final nsID NS_IDOMWINDOW_10_IID =
 		new nsID(NS_IDOMWINDOW_10_IID_STR);
 
+	public static final nsID NS_IDOMWINDOW_17_IID =
+		new nsID(NS_IDOMWINDOW_17_IID_STR);
+
 	public nsIDOMWindow(int /*long*/ address) {
 		super(address);
 	}
 
-	public int GetWindow(int /*long*/[] aWindow) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aWindow);
-	}
-
-	public int GetSelf(int /*long*/[] aSelf) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSelf);
-	}
-
 	public int GetDocument(int /*long*/[] aDocument) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 3 : 1), getAddress(), aDocument);
-	}
-
-	public int GetParent(int /*long*/[] aParent) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 24 : 2), getAddress(), aParent);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 3 : 1), getAddress(), aDocument);
 	}
 
 	public int GetTop(int /*long*/[] aTop) {
+		if (IsXULRunner17) return GetRealTop(aTop);
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 21 : 3), getAddress(), aTop);
 	}
-
-	public int GetScrollbars(int /*long*/[] aScrollbars) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 11 : 4), getAddress(), aScrollbars);
-	}
-
-	public int GetFrames(int /*long*/[] aFrames) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 62 : 5), getAddress(), aFrames);
-	}
-
-	public int GetName(int /*long*/ aName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 4 : 6), getAddress(), aName);
-	}
-
-	public int SetName(int /*long*/ aName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 5 : 7), getAddress(), aName);
-	}
-
-	public int GetLocation(int /*long*/[] aLocation) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLocation);
-	}
-
-	public int GetHistory(int /*long*/[] aHistory) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aHistory);
-	}
-
-	public int GetLocationbar(int /*long*/[] aLocationbar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aLocationbar);
-	}
-
-	public int GetMenubar(int /*long*/[] aMenubar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aMenubar);
-	}
-
-	public int GetPersonalbar(int /*long*/[] aPersonalbar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aPersonalbar);
-	}
-
-	public int GetTextZoom(float[] aTextZoom) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 63 : 8), getAddress(), aTextZoom);
-	}
-
-	public int SetTextZoom(float aTextZoom) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 64 : 9), getAddress(), aTextZoom);
-	}
-
-	public int GetScrollX(int[] aScrollX) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 45 : 10), getAddress(), aScrollX);
-	}
-
-	public int GetScrollY(int[] aScrollY) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 47 : 11), getAddress(), aScrollY);
-	}
-
-	public int ScrollTo(int xScroll, int yScroll) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 50 : 12), getAddress(), xScroll, yScroll);
-	}
-
-	public int ScrollBy(int xScrollDif, int yScrollDif) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 51 : 13), getAddress(), xScrollDif, yScrollDif);
-	}
-
-	public int GetSelection(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 38 : 14), getAddress(), _retval);
-	}
-
-	public int ScrollByLines(int numLines) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 65 : 15), getAddress(), numLines);
-	}
-
-	public int ScrollByPages(int numPages) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 66 : 16), getAddress(), numPages);
-	}
-
-	public int SizeToContent() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 67 : 17), getAddress());
-	}
 	
-
-	public int GetStatusbar(int /*long*/[] aStatusbar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aStatusbar);
-	}
-
-	public int GetToolbar(int /*long*/[] aToolbar) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aToolbar);
-	}
-
-	public int GetStatus(int /*long*/ aStatus) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aStatus);
-	}
-
-	public int SetStatus(int /*long*/ aStatus) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aStatus);
-	}
-
-	public int Close() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress());
-	}
-
-	public int Stop() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress());
-	}
-
-	public int Focus() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress());
-	}
-
-	public int Blur() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress());
-	}
-
-	public int GetLength(int[] aLength) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aLength);
+	public int GetRealTop(int /*long*/[] aTop) {
+		if (!IsXULRunner17) return XPCOM.NS_ERROR_NOT_IMPLEMENTED;
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aTop);
 	}
-
-	public int GetOpener(int /*long*/[] aOpener) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aOpener);
-	}
-
-	public int SetOpener(int /*long*/ aOpener) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aOpener);
-	}
-
-	public int GetFrameElement(int /*long*/[] aFrameElement) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aFrameElement);
-	}
-
-	public int GetNavigator(int /*long*/[] aNavigator) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aNavigator);
-	}
-
-	public int GetApplicationCache(int /*long*/[] aApplicationCache) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aApplicationCache);
-	}
-
-	public int Alert(int /*long*/ text) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), text);
-	}
-
-	public int Confirm(int /*long*/ text, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), text, _retval);
-	}
-
-	public int Prompt(int /*long*/ aMessage, int /*long*/ aInitial, int /*long*/ _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aMessage, aInitial, _retval);
-	}
-
-	public int Print() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress());
-	}
-
-	public int ShowModalDialog(int /*long*/ aURI, int /*long*/ aArgs, int /*long*/ aOptions, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aURI, aArgs, aOptions, _retval);
-	}
-
-	public int PostMessageMoz(int /*long*/ message, int /*long*/ targetOrigin, int /*long*/ cx) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), message, targetOrigin, cx);
-	}
-
-	public int Atob(int /*long*/ aAsciiString, int /*long*/ _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), aAsciiString, _retval);
-	}
-
-	public int Btoa(int /*long*/ aBase64Data, int /*long*/ _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), aBase64Data, _retval);
-	}
-
-	public int GetSessionStorage(int /*long*/[] aSessionStorage) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aSessionStorage);
-	}
-
-	public int GetLocalStorage(int /*long*/[] aLocalStorage) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), aLocalStorage);
-	}
-
-	public int MatchMedia(int /*long*/ media_query_list, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), media_query_list, _retval);
-	}
-
-	public int GetScreen(int /*long*/[] aScreen) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), aScreen);
-	}
-
-	public int GetInnerWidth(int[] aInnerWidth) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), aInnerWidth);
-	}
-
-	public int SetInnerWidth(int aInnerWidth) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), aInnerWidth);
-	}
-
-	public int GetInnerHeight(int[] aInnerHeight) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), aInnerHeight);
-	}
-
-	public int SetInnerHeight(int aInnerHeight) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aInnerHeight);
-	}
-
-	public int GetPageXOffset(int[] aPageXOffset) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 46, getAddress(), aPageXOffset);
-	}
-
-	public int GetPageYOffset(int[] aPageYOffset) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 48, getAddress(), aPageYOffset);
-	}
-
-	public int Scroll(int xScroll, int yScroll) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 49, getAddress(), xScroll, yScroll);
-	}
-
-	public int GetScreenX(int[] aScreenX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 52, getAddress(), aScreenX);
-	}
-
-	public int SetScreenX(int aScreenX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 53, getAddress(), aScreenX);
-	}
-
-	public int GetScreenY(int[] aScreenY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 54, getAddress(), aScreenY);
-	}
-
-	public int SetScreenY(int aScreenY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 55, getAddress(), aScreenY);
-	}
-
-	public int GetOuterWidth(int[] aOuterWidth) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 56, getAddress(), aOuterWidth);
-	}
-
-	public int SetOuterWidth(int aOuterWidth) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 57, getAddress(), aOuterWidth);
-	}
-
-	public int GetOuterHeight(int[] aOuterHeight) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 58, getAddress(), aOuterHeight);
-	}
-
-	public int SetOuterHeight(int aOuterHeight) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 59, getAddress(), aOuterHeight);
-	}
-
-	public int GetComputedStyle(int /*long*/ elt, int /*long*/ pseudoElt, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 60, getAddress(), elt, pseudoElt, _retval);
-	}
-
-	public int GetWindowRoot(int /*long*/[] aWindowRoot) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 61, getAddress(), aWindowRoot);
-	}
-
-	public int GetContent(int /*long*/[] aContent) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 68, getAddress(), aContent);
-	}
-
-	public int GetPrompter(int /*long*/[] aPrompter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 69, getAddress(), aPrompter);
-	}
-
-	public int GetClosed(int[] aClosed) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 70, getAddress(), aClosed);
-	}
-
-	public int GetCrypto(int /*long*/[] aCrypto) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 71, getAddress(), aCrypto);
-	}
-
-	public int GetPkcs11(int /*long*/[] aPkcs11) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 72, getAddress(), aPkcs11);
-	}
-
-	public int GetControllers(int /*long*/[] aControllers) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 73, getAddress(), aControllers);
-	}
-
-	public int GetDefaultStatus(int /*long*/ aDefaultStatus) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 74, getAddress(), aDefaultStatus);
-	}
-
-	public int SetDefaultStatus(int /*long*/ aDefaultStatus) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 75, getAddress(), aDefaultStatus);
-	}
-
-	public int GetMozInnerScreenX(float[] aMozInnerScreenX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 76, getAddress(), aMozInnerScreenX);
-	}
-
-	public int GetMozInnerScreenY(float[] aMozInnerScreenY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 77, getAddress(), aMozInnerScreenY);
-	}
-
-	public int GetScrollMaxX(int[] aScrollMaxX) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 78, getAddress(), aScrollMaxX);
-	}
-
-	public int GetScrollMaxY(int[] aScrollMaxY) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 79, getAddress(), aScrollMaxY);
-	}
-
-	public int GetFullScreen(int[] aFullScreen) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 80, getAddress(), aFullScreen);
-	}
-
-	public int SetFullScreen(int aFullScreen) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 81, getAddress(), aFullScreen);
-	}
-
-	public int Back() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 82, getAddress());
-	}
-
-	public int Forward() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 83, getAddress());
-	}
-
-	public int Home() {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 84, getAddress());
-	}
-
-	public int MoveTo(int xPos, int yPos) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 85, getAddress(), xPos, yPos);
-	}
-
-	public int MoveBy(int xDif, int yDif) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 86, getAddress(), xDif, yDif);
-	}
-
-	public int ResizeTo(int width, int height) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 87, getAddress(), width, height);
-	}
-
-	public int ResizeBy(int widthDif, int heightDif) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 88, getAddress(), widthDif, heightDif);
-	}
-
-	public int Open(int /*long*/ url, int /*long*/ name, int /*long*/ options, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 89, getAddress(), url, name, options, _retval);
-	}
-
-	public int OpenDialog(int /*long*/ url, int /*long*/ name, int /*long*/ options, int /*long*/ aExtraArgument, int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 90, getAddress(), url, name, options, aExtraArgument, _retval);
-	}
-
-	public int UpdateCommands(int /*long*/ action) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 91, getAddress(), action);
-	}
-
-	public int Find(int /*long*/ str, int caseSensitive, int backwards, int wrapAround, int wholeWord, int searchInFrames, int showDialog, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 92, getAddress(), str, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog, _retval);
-	}
-
-	public int GetMozPaintCount(int /*long*/ aMozPaintCount) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 93, getAddress(), aMozPaintCount);
-	}
-
-	public int MozRequestAnimationFrame(int /*long*/ aListener) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 94, getAddress(), aListener);
-	}
-
-	public int GetMozAnimationStartTime(long[] aMozAnimationStartTime) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 95, getAddress(), aMozAnimationStartTime);
-	}
-
-	public int GetURL(int /*long*/[] aURL) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 96, getAddress(), aURL);
-	}
-
-	public int GetGlobalStorage(int /*long*/[] aGlobalStorage) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 97, getAddress(), aGlobalStorage);
-	}
-
-	public int GetOnafterprint(int /*long*/ cx, int /*long*/ aOnafterprint) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 98, getAddress(), cx, aOnafterprint);
-	}
-
-	public int SetOnafterprint(int /*long*/ cx, int /*long*/ aOnafterprint) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 99, getAddress(), cx, aOnafterprint);
-	}
-
-	public int GetOnbeforeprint(int /*long*/ cx, int /*long*/ aOnbeforeprint) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 100, getAddress(), cx, aOnbeforeprint);
-	}
-
-	public int SetOnbeforeprint(int /*long*/ cx, int /*long*/ aOnbeforeprint) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 101, getAddress(), cx, aOnbeforeprint);
-	}
-
-	public int GetOnbeforeunload(int /*long*/ cx, int /*long*/ aOnbeforeunload) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 102, getAddress(), cx, aOnbeforeunload);
-	}
-
-	public int SetOnbeforeunload(int /*long*/ cx, int /*long*/ aOnbeforeunload) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 103, getAddress(), cx, aOnbeforeunload);
-	}
-
-	public int GetOnhashchange(int /*long*/ cx, int /*long*/ aOnhashchange) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 104, getAddress(), cx, aOnhashchange);
-	}
-
-	public int SetOnhashchange(int /*long*/ cx, int /*long*/ aOnhashchange) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 105, getAddress(), cx, aOnhashchange);
-	}
-
-	public int GetOnmessage(int /*long*/ cx, int /*long*/ aOnmessage) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 106, getAddress(), cx, aOnmessage);
-	}
-
-	public int SetOnmessage(int /*long*/ cx, int /*long*/ aOnmessage) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 107, getAddress(), cx, aOnmessage);
-	}
-
-	public int GetOnoffline(int /*long*/ cx, int /*long*/ aOnoffline) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 108, getAddress(), cx, aOnoffline);
-	}
-
-	public int SetOnoffline(int /*long*/ cx, int /*long*/ aOnoffline) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 109, getAddress(), cx, aOnoffline);
-	}
-
-	public int GetOnonline(int /*long*/ cx, int /*long*/ aOnonline) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 110, getAddress(), cx, aOnonline);
-	}
-
-	public int SetOnonline(int /*long*/ cx, int /*long*/ aOnonline) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 111, getAddress(), cx, aOnonline);
-	}
-
-	public int GetOnpopstate(int /*long*/ cx, int /*long*/ aOnpopstate) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 112, getAddress(), cx, aOnpopstate);
-	}
-
-	public int SetOnpopstate(int /*long*/ cx, int /*long*/ aOnpopstate) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 113, getAddress(), cx, aOnpopstate);
-	}
-
-	public int GetOnpagehide(int /*long*/ cx, int /*long*/ aOnpagehide) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 114, getAddress(), cx, aOnpagehide);
-	}
-
-	public int SetOnpagehide(int /*long*/ cx, int /*long*/ aOnpagehide) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 115, getAddress(), cx, aOnpagehide);
-	}
-
-	public int GetOnpageshow(int /*long*/ cx, int /*long*/ aOnpageshow) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 116, getAddress(), cx, aOnpageshow);
-	}
-
-	public int SetOnpageshow(int /*long*/ cx, int /*long*/ aOnpageshow) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 117, getAddress(), cx, aOnpageshow);
-	}
-
-	public int GetOnresize(int /*long*/ cx, int /*long*/ aOnresize) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 118, getAddress(), cx, aOnresize);
-	}
-
-	public int SetOnresize(int /*long*/ cx, int /*long*/ aOnresize) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 119, getAddress(), cx, aOnresize);
-	}
-
-	public int GetOnunload(int /*long*/ cx, int /*long*/ aOnunload) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 120, getAddress(), cx, aOnunload);
-	}
-
-	public int SetOnunload(int /*long*/ cx, int /*long*/ aOnunload) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 121, getAddress(), cx, aOnunload);
-	}
-
-	public int GetOndevicemotion(int /*long*/ cx, int /*long*/ aOndevicemotion) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 122, getAddress(), cx, aOndevicemotion);
-	}
-
-	public int SetOndevicemotion(int /*long*/ cx, int /*long*/ aOndevicemotion) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 123, getAddress(), cx, aOndevicemotion);
-	}
-
-	public int GetOndeviceorientation(int /*long*/ cx, int /*long*/ aOndeviceorientation) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 124, getAddress(), cx, aOndeviceorientation);
-	}
-
-	public int SetOndeviceorientation(int /*long*/ cx, int /*long*/ aOndeviceorientation) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 125, getAddress(), cx, aOndeviceorientation);
-	}
-
-	public int GetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 126, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int SetOnmouseenter(int /*long*/ cx, int /*long*/ aOnmouseenter) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 127, getAddress(), cx, aOnmouseenter);
-	}
-
-	public int GetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 128, getAddress(), cx, aOnmouseleave);
-	}
-
-	public int SetOnmouseleave(int /*long*/ cx, int /*long*/ aOnmouseleave) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 129, getAddress(), cx, aOnmouseleave);
+	
+	public int GetFrames(int /*long*/[] aFrames) {
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 65 : (IsXULRunner10 ? 62 : 5)), getAddress(), aFrames);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDOMWindowCollection.java b/org/eclipse/swt/internal/mozilla/nsIDOMWindowCollection.java
index 663688a..242df2f 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDOMWindowCollection.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDOMWindowCollection.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDataType.java b/org/eclipse/swt/internal/mozilla/nsIDataType.java
index 1b60b12..98493af 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDataType.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDataType.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDirectoryService.java b/org/eclipse/swt/internal/mozilla/nsIDirectoryService.java
deleted file mode 100644
index 58aef5f..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIDirectoryService.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIDirectoryService extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
-
-	public static final String NS_IDIRECTORYSERVICE_IID_STR =
-		"57a66a60-d43a-11d3-8cc2-00609792278c";
-
-	public static final nsID NS_IDIRECTORYSERVICE_IID =
-		new nsID(NS_IDIRECTORYSERVICE_IID_STR);
-
-	public nsIDirectoryService(int /*long*/ address) {
-		super(address);
-	}
-
-	public int Init() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
-	}
-
-	public int RegisterProvider(int /*long*/ prov) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), prov);
-	}
-
-	public int UnregisterProvider(int /*long*/ prov) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), prov);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider.java b/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider.java
deleted file mode 100644
index 8998396..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIDirectoryServiceProvider extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_IDIRECTORYSERVICEPROVIDER_IID_STR =
-		"bbf8cab0-d43a-11d3-8cc2-00609792278c";
-
-	public static final nsID NS_IDIRECTORYSERVICEPROVIDER_IID =
-		new nsID(NS_IDIRECTORYSERVICEPROVIDER_IID_STR);
-
-	public nsIDirectoryServiceProvider(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetFile(byte[] prop, int[] persistent, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), prop, persistent, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider2.java b/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider2.java
deleted file mode 100644
index b67059a..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIDirectoryServiceProvider2.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIDirectoryServiceProvider2 extends nsIDirectoryServiceProvider {
-
-	static final int LAST_METHOD_ID = nsIDirectoryServiceProvider.LAST_METHOD_ID + 1;
-
-	public static final String NS_IDIRECTORYSERVICEPROVIDER2_IID_STRING =
-		"2f977d4b-5485-11d4-87e2-0010a4e75ef2";
-
-	public static final nsID NS_IDIRECTORYSERVICEPROVIDER2_IID =
-		new nsID(NS_IDIRECTORYSERVICEPROVIDER2_IID_STRING);
-
-	public nsIDirectoryServiceProvider2(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetFiles(byte[] prop, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIDirectoryServiceProvider.LAST_METHOD_ID + 1, getAddress(), prop, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIDocShell.java b/org/eclipse/swt/internal/mozilla/nsIDocShell.java
index 160bfe3..8488ee1 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDocShell.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDocShell.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -48,228 +48,18 @@ public class nsIDocShell extends nsISupports {
 
 	public static final nsID NS_IDOCSHELL_10_IID =
 		new nsID(NS_IDOCSHELL_10_IID_STR);
+	
+	public static final String NS_IDOCSHELL_17_IID_STR =
+		"9b283337-097d-4fa8-a2da-916318eaf828";
+
+	public static final nsID NS_IDOCSHELL_17_IID =
+		new nsID(NS_IDOCSHELL_17_IID_STR);
 
 	public nsIDocShell(int /*long*/ address) {
 		super(address);
 	}
 
-	public int LoadURI(int /*long*/ uri, int /*long*/ loadInfo, int aLoadFlags, int firstParty) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uri, loadInfo, aLoadFlags, firstParty);
-	}
-
 	public int LoadStream(int /*long*/ aStream, int /*long*/ aURI, int /*long*/ aContentType, int /*long*/ aContentCharset, int /*long*/ aLoadInfo) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aStream, aURI, aContentType, aContentCharset, aLoadInfo);
 	}
-
-	public int InternalLoad(int /*long*/ aURI, int /*long*/ aReferrer, int /*long*/ aOwner, int aInheritOwner, char[] aWindowTarget, int /*long*/ aPostDataStream, int /*long*/ aHeadersStream, int aLoadFlags, int /*long*/ aSHEntry, int firstParty, int /*long*/[] aDocShell, int /*long*/[] aRequest) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aURI, aReferrer, aOwner, aInheritOwner, aWindowTarget, aPostDataStream, aHeadersStream, aLoadFlags, aSHEntry, firstParty, aDocShell, aRequest);
-	}
-
-	public int CreateLoadInfo(int /*long*/[] loadInfo) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), loadInfo);
-	}
-
-	public int PrepareForNewContentModel() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress());
-	}
-
-	public int SetCurrentURI(int /*long*/ aURI) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aURI);
-	}
-
-	public int FireUnloadNotification() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress());
-	}
-
-	public int GetPresContext(int /*long*/[] aPresContext) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aPresContext);
-	}
-
-	public int GetPresShell(int /*long*/[] aPresShell) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aPresShell);
-	}
-
-	public int GetEldestPresShell(int /*long*/[] aEldestPresShell) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aEldestPresShell);
-	}
-
-	public int GetContentViewer(int /*long*/[] aContentViewer) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aContentViewer);
-	}
-
-	public int GetChromeEventHandler(int /*long*/[] aChromeEventHandler) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aChromeEventHandler);
-	}
-
-	public int SetChromeEventHandler(int /*long*/ aChromeEventHandler) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aChromeEventHandler);
-	}
-
-	public int GetParentURIContentListener(int /*long*/[] aParentURIContentListener) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aParentURIContentListener);
-	}
-
-	public int SetParentURIContentListener(int /*long*/ aParentURIContentListener) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aParentURIContentListener);
-	}
-
-	public int GetDocumentCharsetInfo(int /*long*/[] aDocumentCharsetInfo) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aDocumentCharsetInfo);
-	}
-
-	public int SetDocumentCharsetInfo(int /*long*/ aDocumentCharsetInfo) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aDocumentCharsetInfo);
-	}
-
-	public int GetAllowPlugins(int[] aAllowPlugins) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aAllowPlugins);
-	}
-
-	public int SetAllowPlugins(int aAllowPlugins) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aAllowPlugins);
-	}
-
-	public int GetAllowJavascript(int[] aAllowJavascript) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aAllowJavascript);
-	}
-
-	public int SetAllowJavascript(int aAllowJavascript) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aAllowJavascript);
-	}
-
-	public int GetAllowMetaRedirects(int[] aAllowMetaRedirects) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aAllowMetaRedirects);
-	}
-
-	public int SetAllowMetaRedirects(int aAllowMetaRedirects) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aAllowMetaRedirects);
-	}
-
-	public int GetAllowSubframes(int[] aAllowSubframes) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aAllowSubframes);
-	}
-
-	public int SetAllowSubframes(int aAllowSubframes) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aAllowSubframes);
-	}
-
-	public int GetAllowImages(int[] aAllowImages) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aAllowImages);
-	}
-
-	public int SetAllowImages(int aAllowImages) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aAllowImages);
-	}
-
-	public static final int ENUMERATE_FORWARDS = 0;
-
-	public static final int ENUMERATE_BACKWARDS = 1;
-
-	public int GetDocShellEnumerator(int aItemType, int aDirection, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aItemType, aDirection, _retval);
-	}
-
-	public static final int APP_TYPE_UNKNOWN = 0;
-
-	public static final int APP_TYPE_MAIL = 1;
-
-	public int GetAppType(int[] aAppType) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aAppType);
-	}
-
-	public int SetAppType(int aAppType) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aAppType);
-	}
-
-	public int GetAllowAuth(int[] aAllowAuth) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), aAllowAuth);
-	}
-
-	public int SetAllowAuth(int aAllowAuth) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aAllowAuth);
-	}
-
-	public int GetZoom(float[] aZoom) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), aZoom);
-	}
-
-	public int SetZoom(float aZoom) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), aZoom);
-	}
-
-	public int GetMarginWidth(int[] aMarginWidth) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), aMarginWidth);
-	}
-
-	public int SetMarginWidth(int aMarginWidth) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), aMarginWidth);
-	}
-
-	public int GetMarginHeight(int[] aMarginHeight) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), aMarginHeight);
-	}
-
-	public int SetMarginHeight(int aMarginHeight) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), aMarginHeight);
-	}
-
-	public int GetHasFocus(int[] aHasFocus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), aHasFocus);
-	}
-
-	public int SetHasFocus(int aHasFocus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), aHasFocus);
-	}
-
-	public int GetCanvasHasFocus(int[] aCanvasHasFocus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), aCanvasHasFocus);
-	}
-
-	public int SetCanvasHasFocus(int aCanvasHasFocus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), aCanvasHasFocus);
-	}
-
-	public int TabToTreeOwner(int forward, int[] tookFocus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), forward, tookFocus);
-	}
-
-	public static final int BUSY_FLAGS_NONE = 0;
-	public static final int BUSY_FLAGS_BUSY = 1;
-	public static final int BUSY_FLAGS_BEFORE_PAGE_LOAD = 2;
-	public static final int BUSY_FLAGS_PAGE_LOADING = 4;
-	public static final int LOAD_CMD_NORMAL = 1;
-	public static final int LOAD_CMD_RELOAD = 2;
-	public static final int LOAD_CMD_HISTORY = 4;
-
-	public int GetBusyFlags(int[] aBusyFlags) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aBusyFlags);
-	}
-
-	public int GetLoadType(int[] aLoadType) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), aLoadType);
-	}
-
-	public int SetLoadType(int aLoadType) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 46, getAddress(), aLoadType);
-	}
-
-	public int IsBeingDestroyed(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 47, getAddress(), _retval);
-	}
-
-	public int GetIsExecutingOnLoadHandler(int[] aIsExecutingOnLoadHandler) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 48, getAddress(), aIsExecutingOnLoadHandler);
-	}
-
-	public int GetLayoutHistoryState(int /*long*/[] aLayoutHistoryState) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 49, getAddress(), aLayoutHistoryState);
-	}
-
-	public int SetLayoutHistoryState(int /*long*/ aLayoutHistoryState) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 50, getAddress(), aLayoutHistoryState);
-	}
-
-	public int GetShouldSaveLayoutState(int[] aShouldSaveLayoutState) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 51, getAddress(), aShouldSaveLayoutState);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIDownload.java b/org/eclipse/swt/internal/mozilla/nsIDownload.java
index ba9aaa4..4375060 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDownload.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDownload.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2004, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2004, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIDownload_1_8.java b/org/eclipse/swt/internal/mozilla/nsIDownload_1_8.java
index aeeb024..6d9ba70 100644
--- a/org/eclipse/swt/internal/mozilla/nsIDownload_1_8.java
+++ b/org/eclipse/swt/internal/mozilla/nsIDownload_1_8.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIEmbeddingSiteWindow.java b/org/eclipse/swt/internal/mozilla/nsIEmbeddingSiteWindow.java
index aaa10c3..ef68d6f 100644
--- a/org/eclipse/swt/internal/mozilla/nsIEmbeddingSiteWindow.java
+++ b/org/eclipse/swt/internal/mozilla/nsIEmbeddingSiteWindow.java
@@ -22,20 +22,26 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIEmbeddingSiteWindow extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 9 : 8);
 
 	public static final String NS_IEMBEDDINGSITEWINDOW_IID_STR =
 		"3e5432cd-9568-4bd1-8cbe-d50aba110743";
 
 	public static final nsID NS_IEMBEDDINGSITEWINDOW_IID =
 		new nsID(NS_IEMBEDDINGSITEWINDOW_IID_STR);
+	
+	public static final String NS_IEMBEDDINGSITEWINDOW_17_IID_STR =
+		"0b976267-4aaa-4f36-a2d4-27b5ca8d73bb";
+
+	public static final nsID NS_IEMBEDDINGSITEWINDOW_17_IID =
+		new nsID(NS_IEMBEDDINGSITEWINDOW_17_IID_STR);
 
 	public nsIEmbeddingSiteWindow(int /*long*/ address) {
 		super(address);
@@ -45,34 +51,6 @@ public class nsIEmbeddingSiteWindow extends nsISupports {
 	public static final int DIM_FLAGS_SIZE_INNER = 2;
 	public static final int DIM_FLAGS_SIZE_OUTER = 4;
 
-	public int SetDimensions(int flags, int x, int y, int cx, int cy) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), flags, x, y, cx, cy);
-	}
-
-	public int GetDimensions(int flags, int[] x, int[] y, int[] cx, int[] cy) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), flags, x, y, cx, cy);
-	}
-
-	public int SetFocus() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
-	}
-
-	public int GetVisibility(int[] aVisibility) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aVisibility);
-	}
-
-	public int SetVisibility(int aVisibility) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aVisibility);
-	}
-
-	public int GetTitle(int /*long*/[] aTitle) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aTitle);
-	}
-
-	public int SetTitle(char[] aTitle) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aTitle);
-	}
-
 	public int GetSiteWindow(int /*long*/[] aSiteWindow) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aSiteWindow);
 	}
diff --git a/org/eclipse/swt/internal/mozilla/nsIFactory.java b/org/eclipse/swt/internal/mozilla/nsIFactory.java
deleted file mode 100644
index cd83018..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIFactory extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
-
-	public static final String NS_IFACTORY_IID_STR =
-		"00000001-0000-0000-c000-000000000046";
-
-	public static final nsID NS_IFACTORY_IID =
-		new nsID(NS_IFACTORY_IID_STR);
-
-	public nsIFactory(int /*long*/ address) {
-		super(address);
-	}
-
-	public int CreateInstance(int /*long*/ aOuter, nsID iid, int /*long*/[] result) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aOuter, iid, result);
-	}
-
-	public int LockFactory(int lock) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), lock);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIFile.java b/org/eclipse/swt/internal/mozilla/nsIFile.java
index 073380f..87c4ada 100644
--- a/org/eclipse/swt/internal/mozilla/nsIFile.java
+++ b/org/eclipse/swt/internal/mozilla/nsIFile.java
@@ -22,21 +22,27 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIFile extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 45;
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 62 : 45);
 
 	public static final String NS_IFILE_IID_STR =
 		"c8c0a080-0868-11d3-915f-d9d889d48e3c";
+	
+	public static final String NS_IFILE_17_IID_STR =
+		"272a5020-64f5-485c-a8c4-44b2882ae0a2";
 
 	public static final nsID NS_IFILE_IID =
 		new nsID(NS_IFILE_IID_STR);
 
+	public static final nsID NS_IFILE_17_IID =
+		new nsID(NS_IFILE_17_IID_STR);
+
 	public nsIFile(int /*long*/ address) {
 		super(address);
 	}
@@ -44,18 +50,6 @@ public class nsIFile extends nsISupports {
 	public static final int NORMAL_FILE_TYPE = 0;
 	public static final int DIRECTORY_TYPE = 1;
 
-	public int Append(int /*long*/ node) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), node);
-	}
-
-	public int AppendNative(int /*long*/ node) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), node);
-	}
-
-	public int Normalize() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
-	}
-
 	public int Create(int type, int permissions) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), type, permissions);
 	}
@@ -64,163 +58,7 @@ public class nsIFile extends nsISupports {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aLeafName);
 	}
 
-	public int SetLeafName(int /*long*/ aLeafName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLeafName);
-	}
-
-	public int GetNativeLeafName(int /*long*/ aNativeLeafName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aNativeLeafName);
-	}
-
-	public int SetNativeLeafName(int /*long*/ aNativeLeafName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aNativeLeafName);
-	}
-
-	public int CopyTo(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), newParentDir, newName);
-	}
-
-	public int CopyToNative(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), newParentDir, newName);
-	}
-
-	public int CopyToFollowingLinks(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), newParentDir, newName);
-	}
-
-	public int CopyToFollowingLinksNative(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), newParentDir, newName);
-	}
-
-	public int MoveTo(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), newParentDir, newName);
-	}
-
-	public int MoveToNative(int /*long*/ newParentDir, int /*long*/ newName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), newParentDir, newName);
-	}
-
-	public int Remove(int recursive) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), recursive);
-	}
-
-	public int GetPermissions(int[] aPermissions) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aPermissions);
-	}
-
-	public int SetPermissions(int aPermissions) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aPermissions);
-	}
-
-	public int GetPermissionsOfLink(int[] aPermissionsOfLink) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aPermissionsOfLink);
-	}
-
-	public int SetPermissionsOfLink(int aPermissionsOfLink) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aPermissionsOfLink);
-	}
-
-	public int GetLastModifiedTime(long[] aLastModifiedTime) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aLastModifiedTime);
-	}
-
-	public int SetLastModifiedTime(long aLastModifiedTime) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aLastModifiedTime);
-	}
-
-	public int GetLastModifiedTimeOfLink(long[] aLastModifiedTimeOfLink) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aLastModifiedTimeOfLink);
-	}
-
-	public int SetLastModifiedTimeOfLink(long aLastModifiedTimeOfLink) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aLastModifiedTimeOfLink);
-	}
-
-	public int GetFileSize(long[] aFileSize) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aFileSize);
-	}
-
-	public int SetFileSize(long aFileSize) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aFileSize);
-	}
-
-	public int GetFileSizeOfLink(long[] aFileSizeOfLink) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aFileSizeOfLink);
-	}
-
-	public int GetTarget(int /*long*/ aTarget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aTarget);
-	}
-
-	public int GetNativeTarget(int /*long*/ aNativeTarget) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aNativeTarget);
-	}
-
 	public int GetPath(int /*long*/ aPath) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aPath);
 	}
-
-	public int GetNativePath(int /*long*/ aNativePath) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aNativePath);
-	}
-
-	public int Exists(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), _retval);
-	}
-
-	public int IsWritable(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), _retval);
-	}
-
-	public int IsReadable(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), _retval);
-	}
-
-	public int IsExecutable(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), _retval);
-	}
-
-	public int IsHidden(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), _retval);
-	}
-
-	public int IsDirectory(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), _retval);
-	}
-
-	public int IsFile(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), _retval);
-	}
-
-	public int IsSymlink(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), _retval);
-	}
-
-	public int IsSpecial(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), _retval);
-	}
-
-	public int CreateUnique(int type, int permissions) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), type, permissions);
-	}
-
-	public int Clone(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), _retval);
-	}
-
-	public int Equals(int /*long*/ inFile, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), inFile, _retval);
-	}
-
-	public int Contains(int /*long*/ inFile, int recur, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), inFile, recur, _retval);
-	}
-
-	public int GetParent(int /*long*/[] aParent) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aParent);
-	}
-
-	public int GetDirectoryEntries(int /*long*/[] aDirectoryEntries) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), aDirectoryEntries);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIFilePicker.java b/org/eclipse/swt/internal/mozilla/nsIFilePicker.java
index 916f834..d15d03a 100644
--- a/org/eclipse/swt/internal/mozilla/nsIFilePicker.java
+++ b/org/eclipse/swt/internal/mozilla/nsIFilePicker.java
@@ -22,24 +22,36 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2005 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2005, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-public class nsIFilePicker extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 15;
+public class nsIFilePicker {
 
 	public static final String NS_IFILEPICKER_IID_STR =
 		"c47de916-1dd1-11b2-8141-82507fa02b21";
 
+	public static final String NS_IFILEPICKER_1_8_IID_STR =
+		"80faf095-c807-4558-a2cc-185ed70754ea";
+
+	public static final String NS_IFILEPICKER_10_IID_STR =
+		"f2c0e216-5d07-4df4-bbcb-37683077ae7e";
+
+	public static final String NS_IFILEPICKER_17_IID_STR =
+		"60e2dfb6-3fc7-4a2c-8137-16bef44536fc";
+
 	public static final nsID NS_IFILEPICKER_IID =
 		new nsID(NS_IFILEPICKER_IID_STR);
 
-	public nsIFilePicker(int /*long*/ address) {
-		super(address);
-	}
+	public static final nsID NS_IFILEPICKER_1_8_IID =
+		new nsID(NS_IFILEPICKER_1_8_IID_STR);
+
+	public static final nsID NS_IFILEPICKER_10_IID =
+		new nsID(NS_IFILEPICKER_10_IID_STR);
+
+	public static final nsID NS_IFILEPICKER_17_IID =
+		new nsID(NS_IFILEPICKER_17_IID_STR);
 
 	public static final int modeOpen = 0;
 	public static final int modeSave = 1;
@@ -56,63 +68,10 @@ public class nsIFilePicker extends nsISupports {
 	public static final int filterXUL = 32;
 	public static final int filterApps = 64;
 
-	public int Init(int /*long*/ parent, char[] title, int mode) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
-	}
-
-	public int AppendFilters(int filterMask) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
-	}
-
-	public int AppendFilter(char[] title, char[] filter) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
-	}
-
-	public int GetDefaultString(int /*long*/[] aDefaultString) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
-	}
-
-	public int SetDefaultString(char[] aDefaultString) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
-	}
-
-	public int GetDefaultExtension(int /*long*/[] aDefaultExtension) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
-	}
-
-	public int SetDefaultExtension(char[] aDefaultExtension) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
-	}
-
-	public int GetFilterIndex(int[] aFilterIndex) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
-	}
-
-	public int SetFilterIndex(int aFilterIndex) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
-	}
-
-	public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
-	}
-
-	public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
-	}
-
-	public int GetFile(int /*long*/[] aFile) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
-	}
-
-	public int GetFileURL(int /*long*/[] aFileURL) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
-	}
-
-	public int GetFiles(int /*long*/[] aFiles) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
-	}
+	/* the following constants are available as of mozilla 10 */
+	public static final int filterAllowURLs = 128;
+	public static final int filterAudio = 256;
+	public static final int filterVideo = 512;
 
-	public int Show(int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), _retval);
-	}
+	/* outgoing functions removed because this is an implemented interface */
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java b/org/eclipse/swt/internal/mozilla/nsIFilePickerShownCallback.java
similarity index 66%
copy from org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java
copy to org/eclipse/swt/internal/mozilla/nsIFilePickerShownCallback.java
index 1053001..a58fc0b 100644
--- a/org/eclipse/swt/internal/mozilla/nsDynamicFunctionLoad.java
+++ b/org/eclipse/swt/internal/mozilla/nsIFilePickerShownCallback.java
@@ -22,14 +22,24 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2012, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-public class nsDynamicFunctionLoad {
-    /** @field cast=(const char *) */
-	public int /*long*/ functionName;
-	/** @field cast=(NSFuncPtr  *) */
-	public int /*long*/ function;
+public class nsIFilePickerShownCallback extends nsISupports {
+
+	public static final String NS_IFILEPICKER_IID_STR =
+		"0d79adad-b244-49A5-9997-2a8cad93fc44";
+
+	public static final nsID NS_IFILEPICKER_IID =
+		new nsID (NS_IFILEPICKER_IID_STR);
+
+	public nsIFilePickerShownCallback (int /*long*/ address) {
+		super (address);
+	}
+
+	public int Done (int aResult) {
+		return XPCOM.VtblCall (nsISupports.LAST_METHOD_ID + 1, getAddress(), aResult);
+	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIFilePicker_1_8.java b/org/eclipse/swt/internal/mozilla/nsIFilePicker_1_8.java
deleted file mode 100644
index 60bd674..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIFilePicker_1_8.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIFilePicker_1_8 extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 17 : 15);
-
-	public static final String NS_IFILEPICKER_IID_STR =
-		"80faf095-c807-4558-a2cc-185ed70754ea";
-
-	public static final String NS_IFILEPICKER_10_IID_STR =
-		"f2c0e216-5d07-4df4-bbcb-37683077ae7e";
-	
-	public static final nsID NS_IFILEPICKER_IID =
-		new nsID(NS_IFILEPICKER_IID_STR);
-
-	public static final nsID NS_IFILEPICKER_10_IID =
-		new nsID(NS_IFILEPICKER_10_IID_STR);
-	
-	public nsIFilePicker_1_8(int /*long*/ address) {
-		super(address);
-	}
-
-	public static final int modeOpen = 0;
-	public static final int modeSave = 1;
-	public static final int modeGetFolder = 2;
-	public static final int modeOpenMultiple = 3;
-	public static final int returnOK = 0;
-	public static final int returnCancel = 1;
-	public static final int returnReplace = 2;
-	public static final int filterAll = 1;
-	public static final int filterHTML = 2;
-	public static final int filterText = 4;
-	public static final int filterImages = 8;
-	public static final int filterXML = 16;
-	public static final int filterXUL = 32;
-	public static final int filterApps = 64;
-	
-	/* the following constants are defined in mozilla 8 */
-	public static final int filterAllowURLs = 128;
-	public static final int filterAudio = 256;
-	public static final int filterVideo = 512;
-
-	public int Init(int /*long*/ parent, int /*long*/ title, short mode) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, title, mode);
-	}
-
-	public int AppendFilters(int filterMask) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), filterMask);
-	}
-
-	public int AppendFilter(int /*long*/ title, int /*long*/ filter) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), title, filter);
-	}
-
-	public int GetDefaultString(int /*long*/ aDefaultString) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aDefaultString);
-	}
-
-	public int SetDefaultString(int /*long*/ aDefaultString) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aDefaultString);
-	}
-
-	public int GetDefaultExtension(int /*long*/ aDefaultExtension) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aDefaultExtension);
-	}
-
-	public int SetDefaultExtension(int /*long*/ aDefaultExtension) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aDefaultExtension);
-	}
-
-	public int GetFilterIndex(int[] aFilterIndex) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aFilterIndex);
-	}
-
-	public int SetFilterIndex(int aFilterIndex) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aFilterIndex);
-	}
-
-	public int GetDisplayDirectory(int /*long*/[] aDisplayDirectory) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aDisplayDirectory);
-	}
-
-	public int SetDisplayDirectory(int /*long*/ aDisplayDirectory) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aDisplayDirectory);
-	}
-
-	public int GetFile(int /*long*/[] aFile) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aFile);
-	}
-
-	public int GetFileURL(int /*long*/[] aFileURL) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aFileURL);
-	}
-
-	public int GetFiles(int /*long*/[] aFiles) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aFiles);
-	}
-
-	public int Show(int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 17 : 15), getAddress(), _retval);
-	}
-	
-	public int GetAddToRecentDocs(int[] aAddToRecentDocs) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aAddToRecentDocs);
-	}
-
-	public int SetAddToRecentDocs(int aAddToRecentDocs) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aAddToRecentDocs);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIFocusManager.java b/org/eclipse/swt/internal/mozilla/nsIFocusManager.java
index ac4d73b..576e5c0 100644
--- a/org/eclipse/swt/internal/mozilla/nsIFocusManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsIFocusManager.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIFocusManager extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 18 : 17);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 18 : 17);
 
 	public static final String NS_IFOCUSMANAGER_IID_STR =
 			"cd6040a8-243f-412a-8a16-0bf2aa1083b9";
@@ -131,7 +131,7 @@ public class nsIFocusManager extends nsISupports {
 	}
 	
 	public int FocusPlugin(int /*long*/ aPlugin) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aPlugin);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher.java b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher.java
index c003eb6..d05ee8f 100644
--- a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher.java
+++ b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog.java b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog.java
deleted file mode 100644
index 3162274..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2004, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIHelperAppLauncherDialog extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3;
-
-	public static final String NS_IHELPERAPPLAUNCHERDIALOG_IID_STR =
-		"d7ebddf0-4c84-11d4-807a-00600811a9c3";
-
-	public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_IID =
-		new nsID(NS_IHELPERAPPLAUNCHERDIALOG_IID_STR);
-
-	public nsIHelperAppLauncherDialog(int /*long*/ address) {
-		super(address);
-	}
-
-	public int Show(int /*long*/ aLauncher, int /*long*/ aContext) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aLauncher, aContext);
-	}
-
-	public int PromptForSaveToFile(int /*long*/ aWindowContext, char[] aDefaultFile, char[] aSuggestedFileExtension, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWindowContext, aDefaultFile, aSuggestedFileExtension, _retval);
-	}
-
-	public int ShowProgressDialog(int /*long*/ aLauncher, int /*long*/ aContext) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aLauncher, aContext);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog_1_9.java b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog_1_9.java
deleted file mode 100644
index aaa8ecd..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncherDialog_1_9.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIHelperAppLauncherDialog_1_9 extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
-
-	public static final String NS_IHELPERAPPLAUNCHERDIALOG_IID_STR =
-		"f3704fdc-8ae6-4eba-a3c3-f02958ac0649";
-
-	public static final nsID NS_IHELPERAPPLAUNCHERDIALOG_IID =
-		new nsID(NS_IHELPERAPPLAUNCHERDIALOG_IID_STR);
-
-	public nsIHelperAppLauncherDialog_1_9(int /*long*/ address) {
-		super(address);
-	}
-
-	public static final int REASON_CANTHANDLE = 0;
-	public static final int REASON_SERVERREQUEST = 1;
-	public static final int REASON_TYPESNIFFED = 2;
-
-	public int Show(int /*long*/ aLauncher, int /*long*/ aWindowContext, int aReason) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aLauncher, aWindowContext, aReason);
-	}
-
-	public int PromptForSaveToFile(int /*long*/ aLauncher, int /*long*/ aWindowContext, char[] aDefaultFileName, char[] aSuggestedFileExtension, int aForcePrompt, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aLauncher, aWindowContext, aDefaultFileName, aSuggestedFileExtension, aForcePrompt, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_8.java b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_8.java
index 1aca93b..20521bb 100644
--- a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_8.java
+++ b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_8.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_9.java b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_9.java
index d277e75..785fcb6 100644
--- a/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_9.java
+++ b/org/eclipse/swt/internal/mozilla/nsIHelperAppLauncher_1_9.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIHttpChannel.java b/org/eclipse/swt/internal/mozilla/nsIHttpChannel.java
index f72f1fd..04fe7cc 100644
--- a/org/eclipse/swt/internal/mozilla/nsIHttpChannel.java
+++ b/org/eclipse/swt/internal/mozilla/nsIHttpChannel.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIHttpHeaderVisitor.java b/org/eclipse/swt/internal/mozilla/nsIHttpHeaderVisitor.java
index 0f8cf30..c3ccc82 100644
--- a/org/eclipse/swt/internal/mozilla/nsIHttpHeaderVisitor.java
+++ b/org/eclipse/swt/internal/mozilla/nsIHttpHeaderVisitor.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIIOService.java b/org/eclipse/swt/internal/mozilla/nsIIOService.java
index a4b52e1..120ca1e 100644
--- a/org/eclipse/swt/internal/mozilla/nsIIOService.java
+++ b/org/eclipse/swt/internal/mozilla/nsIIOService.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIInputStream.java b/org/eclipse/swt/internal/mozilla/nsIInputStream.java
index 62959ad..73728ed 100644
--- a/org/eclipse/swt/internal/mozilla/nsIInputStream.java
+++ b/org/eclipse/swt/internal/mozilla/nsIInputStream.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -33,31 +33,31 @@ public class nsIInputStream extends nsISupports {
 
 	public static final String NS_IINPUTSTREAM_IID_STR =
 		"fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a";
+	
+	public static final String NS_IINPUTSTREAM_17_IID_STR =
+		"53cdbc97-c2d7-4e30-b2c3-45b2ee79db18";
 
 	public static final nsID NS_IINPUTSTREAM_IID =
 		new nsID(NS_IINPUTSTREAM_IID_STR);
+	
+	public static final nsID NS_IINPUTSTREAM_17_IID =
+		new nsID(NS_IINPUTSTREAM_17_IID_STR);
 
 	public nsIInputStream(int /*long*/ address) {
 		super(address);
 	}
 
-	public int Close() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
-	}
-
 	public int Available(int[] _retval) {
+		if (IsXULRunner17) return XPCOM.NS_COMFALSE;
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
+	}
+	
+	public int Available(long[] _retval) {
+		if (!IsXULRunner17) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), _retval);
 	}
 
 	public int Read(byte[] aBuf, int aCount, int[] _retval) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aBuf, aCount, _retval);
 	}
-
-	public int ReadSegments(int /*long*/ aWriter, int /*long*/ aClosure, int aCount, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aWriter, aClosure, aCount, _retval);
-	}
-
-	public int IsNonBlocking(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), _retval);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIInterfaceRequestor.java b/org/eclipse/swt/internal/mozilla/nsIInterfaceRequestor.java
index 5d62a6b..46450d1 100644
--- a/org/eclipse/swt/internal/mozilla/nsIInterfaceRequestor.java
+++ b/org/eclipse/swt/internal/mozilla/nsIInterfaceRequestor.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIJSContextStack.java b/org/eclipse/swt/internal/mozilla/nsIJSContextStack.java
index 5dbedbe..d8f39b5 100644
--- a/org/eclipse/swt/internal/mozilla/nsIJSContextStack.java
+++ b/org/eclipse/swt/internal/mozilla/nsIJSContextStack.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsILocalFile.java b/org/eclipse/swt/internal/mozilla/nsILocalFile.java
index 772bec8..5758362 100644
--- a/org/eclipse/swt/internal/mozilla/nsILocalFile.java
+++ b/org/eclipse/swt/internal/mozilla/nsILocalFile.java
@@ -22,90 +22,28 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsILocalFile extends nsIFile {
 
-	static final int LAST_METHOD_ID = nsIFile.LAST_METHOD_ID + 17;
+	static final int LAST_METHOD_ID = nsIFile.LAST_METHOD_ID + (IsXULRunner17 ? 0 : 17);
 
 	public static final String NS_ILOCALFILE_IID_STR =
 		"aa610f20-a889-11d3-8c81-000064657374";
+	
+	public static final String NS_ILOCALFILE_17_IID_STR =
+		"ce4ef184-7660-445e-9e59-6731bdc65505";
 
 	public static final nsID NS_ILOCALFILE_IID =
 		new nsID(NS_ILOCALFILE_IID_STR);
+	
+	public static final nsID NS_ILOCALFILE_17_IID =
+		new nsID(NS_ILOCALFILE_17_IID_STR);
 
 	public nsILocalFile(int /*long*/ address) {
 		super(address);
 	}
-
-	public int InitWithPath(int /*long*/ filePath) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 1, getAddress(), filePath);
-	}
-
-	public int InitWithNativePath(int /*long*/ filePath) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 2, getAddress(), filePath);
-	}
-
-	public int InitWithFile(int /*long*/ aFile) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 3, getAddress(), aFile);
-	}
-
-	public int GetFollowLinks(int[] aFollowLinks) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 4, getAddress(), aFollowLinks);
-	}
-
-	public int SetFollowLinks(int aFollowLinks) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 5, getAddress(), aFollowLinks);
-	}
-
-	public int OpenNSPRFileDesc(int flags, int mode, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 6, getAddress(), flags, mode, _retval);
-	}
-
-	public int OpenANSIFileDesc(byte[] mode, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 7, getAddress(), mode, _retval);
-	}
-
-	public int Load(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 8, getAddress(), _retval);
-	}
-
-	public int GetDiskSpaceAvailable(long[] aDiskSpaceAvailable) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 9, getAddress(), aDiskSpaceAvailable);
-	}
-
-	public int AppendRelativePath(int /*long*/ relativeFilePath) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 10, getAddress(), relativeFilePath);
-	}
-
-	public int AppendRelativeNativePath(int /*long*/ relativeFilePath) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 11, getAddress(), relativeFilePath);
-	}
-
-	public int GetPersistentDescriptor(int /*long*/ aPersistentDescriptor) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 12, getAddress(), aPersistentDescriptor);
-	}
-
-	public int SetPersistentDescriptor(int /*long*/ aPersistentDescriptor) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 13, getAddress(), aPersistentDescriptor);
-	}
-
-	public int Reveal() {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 14, getAddress());
-	}
-
-	public int Launch() {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 15, getAddress());
-	}
-
-	public int GetRelativeDescriptor(int /*long*/ fromFile, int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 16, getAddress(), fromFile, _retval);
-	}
-
-	public int SetRelativeDescriptor(int /*long*/ fromFile, int /*long*/ relativeDesc) {
-		return XPCOM.VtblCall(nsIFile.LAST_METHOD_ID + 17, getAddress(), fromFile, relativeDesc);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java b/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java
index e4bfd34..e147e47 100644
--- a/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java
+++ b/org/eclipse/swt/internal/mozilla/nsIMIMEInputStream.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIMemory.java b/org/eclipse/swt/internal/mozilla/nsIMemory.java
index 641777e..5fe0ecf 100644
--- a/org/eclipse/swt/internal/mozilla/nsIMemory.java
+++ b/org/eclipse/swt/internal/mozilla/nsIMemory.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIObserverService.java b/org/eclipse/swt/internal/mozilla/nsIObserverService.java
index 5b3775d..71014a6 100644
--- a/org/eclipse/swt/internal/mozilla/nsIObserverService.java
+++ b/org/eclipse/swt/internal/mozilla/nsIObserverService.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIPrefBranch.java b/org/eclipse/swt/internal/mozilla/nsIPrefBranch.java
index 55f9d83..1598aa8 100644
--- a/org/eclipse/swt/internal/mozilla/nsIPrefBranch.java
+++ b/org/eclipse/swt/internal/mozilla/nsIPrefBranch.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIPrefBranch extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 18;
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 20 : 18);
 
 	public static final String NS_IPREFBRANCH_IID_STR =
 		"56c35506-f14b-11d3-99d3-ddbfac2ccf65";
@@ -37,11 +37,17 @@ public class nsIPrefBranch extends nsISupports {
 	public static final String NS_IPREFBRANCH_10_IID_STR =
 		"e162bfa0-01bd-4e9f-9843-8fb2efcd6d1f";
 	
+	public static final String NS_IPREFBRANCH_17_IID_STR =
+		"7df46a54-d8b0-448e-903c-4341a1b2499c";
+	
 	public static final nsID NS_IPREFBRANCH_IID =
 		new nsID(NS_IPREFBRANCH_IID_STR);
 
 	public static final nsID NS_IPREFBRANCH_10_IID =
 		new nsID(NS_IPREFBRANCH_10_IID_STR);
+
+	public static final nsID NS_IPREFBRANCH_17_IID =
+		new nsID(NS_IPREFBRANCH_17_IID_STR);
 	
 	public nsIPrefBranch(int /*long*/ address) {
 		super(address);
@@ -52,30 +58,10 @@ public class nsIPrefBranch extends nsISupports {
 	public static final int PREF_INT = 64;
 	public static final int PREF_BOOL = 128;
 
-	public int GetRoot(int /*long*/[] aRoot) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aRoot);
-	}
-
-	public int GetPrefType(byte[] aPrefName, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aPrefName, _retval);
-	}
-
-	public int GetBoolPref(byte[] aPrefName, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aPrefName, _retval);
-	}
-
 	public int SetBoolPref(byte[] aPrefName, int aValue) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aPrefName, aValue);
 	}
 
-	public int GetCharPref(byte[] aPrefName, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aPrefName, _retval);
-	}
-
-	public int SetCharPref(byte[] aPrefName, byte[] aValue) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aPrefName, aValue);
-	}
-
 	public int GetIntPref(byte[] aPrefName, int[] _retval) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aPrefName, _retval);
 	}
@@ -95,32 +81,4 @@ public class nsIPrefBranch extends nsISupports {
 	public int ClearUserPref(byte[] aPrefName) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), aPrefName);
 	}
-
-	public int LockPref(byte[] aPrefName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), aPrefName);
-	}
-
-	public int PrefHasUserValue(byte[] aPrefName, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), aPrefName, _retval);
-	}
-
-	public int PrefIsLocked(byte[] aPrefName, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), aPrefName, _retval);
-	}
-
-	public int UnlockPref(byte[] aPrefName) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), aPrefName);
-	}
-
-	public int DeleteBranch(byte[] aStartingAt) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aStartingAt);
-	}
-
-	public int GetChildList(byte[] aStartingAt, int[] aCount, int /*long*/[] aChildArray) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aStartingAt, aCount, aChildArray);
-	}
-
-	public int ResetBranch(byte[] aStartingAt) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aStartingAt);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIPrefLocalizedString.java b/org/eclipse/swt/internal/mozilla/nsIPrefLocalizedString.java
index ba0c32a..07b32e2 100644
--- a/org/eclipse/swt/internal/mozilla/nsIPrefLocalizedString.java
+++ b/org/eclipse/swt/internal/mozilla/nsIPrefLocalizedString.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2006 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2006, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIPrefService.java b/org/eclipse/swt/internal/mozilla/nsIPrefService.java
index b3fc9fb..48e4d0a 100644
--- a/org/eclipse/swt/internal/mozilla/nsIPrefService.java
+++ b/org/eclipse/swt/internal/mozilla/nsIPrefService.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2006 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2006, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIPrincipal.java b/org/eclipse/swt/internal/mozilla/nsIPrincipal.java
index 808682b..ebee138 100644
--- a/org/eclipse/swt/internal/mozilla/nsIPrincipal.java
+++ b/org/eclipse/swt/internal/mozilla/nsIPrincipal.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIPrincipal extends nsISerializable {
 
-	static final int LAST_METHOD_ID = nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 26 : 23);
+	static final int LAST_METHOD_ID = nsISerializable.LAST_METHOD_ID + (IsXULRunner17 ? 27 : (IsXULRunner10 ? 26 : 23));
 
 	public static final String NS_IPRINCIPAL_IID_STR =
 		"b8268b9a-2403-44ed-81e3-614075c92034";
@@ -42,6 +42,12 @@ public class nsIPrincipal extends nsISerializable {
 
 	public static final nsID NS_IPRINCIPAL_10_IID =
 		new nsID(NS_IPRINCIPAL_10_IID_STR);
+	
+	public static final String NS_IPRINCIPAL_17_IID_STR =
+		"825ffce8-962d-11e1-aef3-8f2b6188709b";
+
+	public static final nsID NS_IPRINCIPAL_17_IID =
+		new nsID(NS_IPRINCIPAL_17_IID_STR);
 
 	public nsIPrincipal(int /*long*/ address) {
 		super(address);
@@ -52,110 +58,8 @@ public class nsIPrincipal extends nsISerializable {
 	public static final int ENABLE_WITH_USER_PERMISSION = 3;
 	public static final int ENABLE_GRANTED = 4;
 
-	public int GetPreferences(int /*long*/[] prefBranch, int /*long*/[] id, int /*long*/[] subjectName, int /*long*/[] grantedList, int /*long*/[] deniedList, int[] isTrusted) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + 1, getAddress(), prefBranch, id, subjectName, grantedList, deniedList, isTrusted);
-	}
-
-	public int Equals(int /*long*/ other, int[] _retval) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + 2, getAddress(), other, _retval);
-	}
-
-	public int EqualsIgnoringDomain(int /*long*/ other, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + 3, getAddress(), other, _retval);
-	}
-
-	public int GetHashValue(int[] aHashValue) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 4 : 3), getAddress(), aHashValue);
-	}
-
 	public int GetJSPrincipals(int /*long*/ cx, int /*long*/[] _retval) {
+		if (IsXULRunner17) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 5 : 4), getAddress(), cx, _retval);
 	}
-
-	public int GetSecurityPolicy(int /*long*/[] aSecurityPolicy) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 6 : 5), getAddress(), aSecurityPolicy);
-	}
-
-	public int SetSecurityPolicy(int /*long*/ aSecurityPolicy) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 7 : 6), getAddress(), aSecurityPolicy);
-	}
-
-	public int CanEnableCapability(byte[] capability, int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 8 : 7), getAddress(), capability, _retval);
-	}
-
-	public int SetCanEnableCapability(byte[] capability, short canEnable) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 9 : 8), getAddress(), capability, canEnable);
-	}
-
-	public int IsCapabilityEnabled(byte[] capability, int /*long*/ annotation, int[] _retval) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 10 : 9), getAddress(), capability, annotation, _retval);
-	}
-
-	public int EnableCapability(byte[] capability, int /*long*/[] annotation) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 11 : 10), getAddress(), capability, annotation);
-	}
-
-	public int RevertCapability(byte[] capability, int /*long*/[] annotation) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 12 : 11), getAddress(), capability, annotation);
-	}
-
-	public int DisableCapability(byte[] capability, int /*long*/[] annotation) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 13 : 12), getAddress(), capability, annotation);
-	}
-
-	public int GetURI(int /*long*/[] aURI) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 14 : 13), getAddress(), aURI);
-	}
-
-	public int GetDomain(int /*long*/[] aDomain) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 15 : 14), getAddress(), aDomain);
-	}
-
-	public int SetDomain(int /*long*/ aDomain) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 16 : 15), getAddress(), aDomain);
-	}
-
-	public int GetOrigin(int /*long*/[] aOrigin) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 17 : 16), getAddress(), aOrigin);
-	}
-
-	public int GetHasCertificate(int[] aHasCertificate) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 18 : 17), getAddress(), aHasCertificate);
-	}
-
-	public int GetFingerprint(int /*long*/ aFingerprint) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 19 : 18), getAddress(), aFingerprint);
-	}
-
-	public int GetPrettyName(int /*long*/ aPrettyName) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 20 : 19), getAddress(), aPrettyName);
-	}
-
-	public int Subsumes(int /*long*/ other, int[] _retval) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 21 : 20), getAddress(), other, _retval);
-	}
-
-	public int CheckMayLoad(int /*long*/ uri, int report) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 22 : 21), getAddress(), uri, report);
-	}
-
-	public int GetSubjectName(int /*long*/ aSubjectName) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 23 : 22), getAddress(), aSubjectName);
-	}
-
-	public int GetCertificate(int /*long*/[] aCertificate) {
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + (IsXULRunner10 ? 24 : 23), getAddress(), aCertificate);
-	}
-	
-	public int GetCsp(int /*long*/[] aCsp) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + 25, getAddress(), aCsp);
-	}
-
-	public int SetCsp(int /*long*/ aCsp) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsISerializable.LAST_METHOD_ID + 26, getAddress(), aCsp);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIProgressDialog.java b/org/eclipse/swt/internal/mozilla/nsIProgressDialog.java
index 2cc99e4..112f054 100644
--- a/org/eclipse/swt/internal/mozilla/nsIProgressDialog.java
+++ b/org/eclipse/swt/internal/mozilla/nsIProgressDialog.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIProgressDialog_1_8.java b/org/eclipse/swt/internal/mozilla/nsIProgressDialog_1_8.java
index 13c38f7..c048256 100644
--- a/org/eclipse/swt/internal/mozilla/nsIProgressDialog_1_8.java
+++ b/org/eclipse/swt/internal/mozilla/nsIProgressDialog_1_8.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIPromptFactory.java b/org/eclipse/swt/internal/mozilla/nsIPromptFactory.java
deleted file mode 100644
index 4ee0129..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIPromptFactory.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2012 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIPromptFactory extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_IPROMPTFACTORY_IID_STR =
-		"2532b748-75db-4732-9173-78d3bf34f694";
-
-	public static final nsID NS_IPROMPTFACTORY_IID =
-		new nsID(NS_IPROMPTFACTORY_IID_STR);
-
-	public nsIPromptFactory(int /*long*/ address) {
-		super(address);
-	}
-
-	public int getPrompt(int /*long*/ aParent, nsID iid, int /*long*/[] result) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aParent, iid, result);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIPromptService.java b/org/eclipse/swt/internal/mozilla/nsIPromptService.java
index 1ce5e55..fc326a4 100644
--- a/org/eclipse/swt/internal/mozilla/nsIPromptService.java
+++ b/org/eclipse/swt/internal/mozilla/nsIPromptService.java
@@ -22,14 +22,12 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
-public class nsIPromptService extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9;
+public class nsIPromptService {
 
 	public static final String NS_IPROMPTSERVICE_IID_STR =
 		"1630c61a-325e-49ca-8759-a31b16c47aa5";
@@ -37,26 +35,6 @@ public class nsIPromptService extends nsISupports {
 	public static final nsID NS_IPROMPTSERVICE_IID =
 		new nsID(NS_IPROMPTSERVICE_IID_STR);
 
-	public nsIPromptService(int /*long*/ address) {
-		super(address);
-	}
-
-	public int Alert(int /*long*/ aParent, char[] aDialogTitle, char[] aText) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aParent, aDialogTitle, aText);
-	}
-
-	public int AlertCheck(int /*long*/ aParent, char[] aDialogTitle, char[] aText, char[] aCheckMsg, int[] aCheckState) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aParent, aDialogTitle, aText, aCheckMsg, aCheckState);
-	}
-
-	public int Confirm(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aParent, aDialogTitle, aText, _retval);
-	}
-
-	public int ConfirmCheck(int /*long*/ aParent, char[] aDialogTitle, char[] aText, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval);
-	}
-
 	public static final int BUTTON_POS_0 = 1;
 	public static final int BUTTON_POS_1 = 256;
 	public static final int BUTTON_POS_2 = 65536;
@@ -74,24 +52,6 @@ public class nsIPromptService extends nsISupports {
 	public static final int BUTTON_DELAY_ENABLE = 67108864;
 	public static final int STD_OK_CANCEL_BUTTONS = 513;
 	public static final int STD_YES_NO_BUTTONS = 1027;
-	
-	public int ConfirmEx(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int aButtonFlags, char[] aButton0Title, char[] aButton1Title, char[] aButton2Title, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval);
-	}
-
-	public int Prompt(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aValue, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval);
-	}
-
-	public int PromptUsernameAndPassword(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aUsername, int /*long*/[] aPassword, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval);
-	}
-
-	public int PromptPassword(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int /*long*/[] aPassword, char[] aCheckMsg, int[] aCheckState, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval);
-	}
 
-	public int Select(int /*long*/ aParent, char[] aDialogTitle, char[] aText, int aCount, int /*long*/[] aSelectList, int[] aOutSelection, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval);
-	}
+	/* outgoing functions removed because this is an implemented interface */
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIPromptService2.java b/org/eclipse/swt/internal/mozilla/nsIPromptService2.java
deleted file mode 100644
index fec6bc5..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIPromptService2.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIPromptService2 extends nsIPromptService {
-
-	static final int LAST_METHOD_ID = nsIPromptService.LAST_METHOD_ID + 2;
-
-	public static final String NS_IPROMPTSERVICE2_IID_STR =
-		"cf86d196-dbee-4482-9dfa-3477aa128319";
-
-	public static final nsID NS_IPROMPTSERVICE2_IID =
-		new nsID(NS_IPROMPTSERVICE2_IID_STR);
-
-	public nsIPromptService2(int /*long*/ address) {
-		super(address);
-	}
-
-	public int PromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int[] _retval) {
-		return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 1, getAddress(), aParent, aChannel, level, authInfo, checkboxLabel, checkValue, _retval);
-	}
-
-	public int AsyncPromptAuth(int /*long*/ aParent, int /*long*/ aChannel, int /*long*/ aCallback, int /*long*/ aContext, int level, int /*long*/ authInfo, char[] checkboxLabel, int[] checkValue, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIPromptService.LAST_METHOD_ID + 2, getAddress(), aParent, aChannel, aCallback, aContext, level, authInfo, checkboxLabel, checkValue, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIProperties.java b/org/eclipse/swt/internal/mozilla/nsIProperties.java
index 6311098..5519840 100644
--- a/org/eclipse/swt/internal/mozilla/nsIProperties.java
+++ b/org/eclipse/swt/internal/mozilla/nsIProperties.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIRequest.java b/org/eclipse/swt/internal/mozilla/nsIRequest.java
index a0689a7..686bd7b 100644
--- a/org/eclipse/swt/internal/mozilla/nsIRequest.java
+++ b/org/eclipse/swt/internal/mozilla/nsIRequest.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsISSLStatus.java b/org/eclipse/swt/internal/mozilla/nsISSLStatus.java
index f366b1c..f876dc6 100644
--- a/org/eclipse/swt/internal/mozilla/nsISSLStatus.java
+++ b/org/eclipse/swt/internal/mozilla/nsISSLStatus.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsISSLStatus extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 8 : 7);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 8 : 7);
 
 	public static final String NS_ISSLSTATUS_IID_STR =
 		"cfede939-def1-49be-81ed-d401b3a07d1c";
@@ -76,7 +76,7 @@ public class nsISSLStatus extends nsISupports {
 	}
 	
 	public int GetIsExtendedValidation(int[] aIsExtendedValidation) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aIsExtendedValidation);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager.java b/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager.java
index 7a36f9f..8e149df 100644
--- a/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsIScriptSecurityManager.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2012, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIScriptSecurityManager extends nsIXPCSecurityManager {
 
-	static final int LAST_METHOD_ID = nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 27 : 26);
+	static final int LAST_METHOD_ID = nsIXPCSecurityManager.LAST_METHOD_ID + ((IsXULRunner17 || IsXULRunner10) ? 27 : 26);
 
 	public static final String NS_ISCRIPTSECURITYMANAGER_IID_STR =
 		"3fffd8e8-3fea-442e-a0ed-2ba81ae197d5";
@@ -48,24 +48,17 @@ public class nsIScriptSecurityManager extends nsIXPCSecurityManager {
 
 	public static final nsID NS_ISCRIPTSECURITYMANAGER_10_IID =
 		new nsID(NS_ISCRIPTSECURITYMANAGER_10_IID_STR);
+	
+	public static final String NS_ISCRIPTSECURITYMANAGER_17_IID_STR =
+		"45e12581-2c3f-4142-8e0d-4075e5a67d2d";
+
+	public static final nsID NS_ISCRIPTSECURITYMANAGER_17_IID =
+		new nsID(NS_ISCRIPTSECURITYMANAGER_17_IID_STR);
 
 	public nsIScriptSecurityManager(int /*long*/ address) {
 		super(address);
 	}
 
-//	public int CheckPropertyAccess(int /*long*/ aJSContext, int /*long*/ aJSObject, byte[] aClassName, !ERROR UNKNOWN C TYPE <jsval >! aProperty, int aAction) {
-//		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + 1, getAddress(), aJSContext, aJSObject, aClassName, aProperty, aAction);
-//	}
-
-	public int CheckConnect(int /*long*/ aJSContext, int /*long*/ aTargetURI, byte[] aClassName, byte[] aProperty) {
-		if (IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + 2, getAddress(), aJSContext, aTargetURI, aClassName, aProperty);
-	}
-
-	public int CheckLoadURIFromScript(int /*long*/ cx, int /*long*/ uri) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 2 : 3), getAddress(), cx, uri);
-	}
-
 	public static final int STANDARD = 0;
 	public static final int LOAD_IS_AUTOMATIC_DOCUMENT_REPLACEMENT = 1;
 	public static final int ALLOW_CHROME = 2;
@@ -73,105 +66,7 @@ public class nsIScriptSecurityManager extends nsIXPCSecurityManager {
 	public static final int DISALLOW_SCRIPT_OR_DATA = 4;
 	public static final int DISALLOW_SCRIPT = 8;
 
-	public int CheckLoadURIWithPrincipal(int /*long*/ aPrincipal, int /*long*/ uri, int flags) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 3 : 4), getAddress(), aPrincipal, uri, flags);
-	}
-
-	public int CheckLoadURI(int /*long*/ from, int /*long*/ uri, int flags) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 4 : 5), getAddress(), from, uri, flags);
-	}
-
-	public int CheckLoadURIStrWithPrincipal(int /*long*/ aPrincipal, int /*long*/ uri, int flags) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 5 : 6), getAddress(), aPrincipal, uri, flags);
-	}
-
-	public int CheckLoadURIStr(int /*long*/ from, int /*long*/ uri, int flags) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 6 : 7), getAddress(), from, uri, flags);
-	}
-
-	public int CheckFunctionAccess(int /*long*/ cx, int /*long*/ funObj, int /*long*/ targetObj) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 7 : 8), getAddress(), cx, funObj, targetObj);
-	}
-
-	public int CanExecuteScripts(int /*long*/ cx, int /*long*/ principal, int[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 8 : 9), getAddress(), cx, principal, _retval);
-	}
-
-	public int GetSubjectPrincipal(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 9 : 10), getAddress(), _retval);
-	}
-
 	public int GetSystemPrincipal(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 10 : 11), getAddress(), _retval);
-	}
-
-//	public int GetCertificatePrincipal(int /*long*/ aCertFingerprint, int /*long*/ aSubjectName, int /*long*/ aPrettyName, int /*long*/ aCert, int /*long*/ aURI, int /*long*/[] _retval) {
-//		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (Is8 ? 11 : 12), getAddress(), aCertFingerprint, aSubjectName, aPrettyName, aCert, aURI, _retval);
-//	}
-
-	public int GetCodebasePrincipal(int /*long*/ aURI, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 12 : 13), getAddress(), aURI, _retval);
-	}
-
-//	public int RequestCapability(int /*long*/ principal, byte[] capability, int /*long*/ _retval) {
-//		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (Is8 ? 13 : 14), getAddress(), principal, capability, _retval);
-//	}
-
-	public int IsCapabilityEnabled(byte[] capability, int[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 14 : 15), getAddress(), capability, _retval);
-	}
-	
-	public int EnableCapability(byte[] capability) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 15 : 16), getAddress(), capability);
-	}
-	
-	public int RevertCapability(byte[] capability) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 16 : 17), getAddress(), capability);
-	}
-	
-	public int DisableCapability(byte[] capability) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 17 : 18), getAddress(), capability);
-	}
-
-//	public int SetCanEnableCapability(int /*long*/ certificateFingerprint, byte[] capability, !ERROR UNKNOWN C TYPE <PRInt16 >! canEnable) {
-//		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (Is8 ? 18 : 19), getAddress(), certificateFingerprint, capability, canEnable);
-//	}
-
-	public int GetObjectPrincipal(int /*long*/ cx, int /*long*/ obj, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 19 : 20), getAddress(), cx, obj, _retval);
-	}
-	
-	public int SubjectPrincipalIsSystem(int[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 20 : 21), getAddress(), _retval);
-	}
-	
-	public int CheckSameOrigin(int /*long*/ aJSContext, int /*long*/ aTargetURI) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 21 : 22), getAddress(), aJSContext, aTargetURI);
-	}
-	
-	public int CheckSameOriginURI(int /*long*/ aSourceURI, int /*long*/ aTargetURI, int reportError) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 22 : 23), getAddress(), aSourceURI, aTargetURI, reportError);
-	}
-	
-	public int GetPrincipalFromContext(int /*long*/ cx, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 23 : 24), getAddress(), cx, _retval);
-	}
-	
-	public int GetChannelPrincipal(int /*long*/ aChannel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 24 : 25), getAddress(), aChannel, _retval);
-	}
-	
-	public int IsSystemPrincipal(int /*long*/ aPrincipal, int[] _retval) {
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner10 ? 25 : 26), getAddress(), aPrincipal, _retval);
-	}
-	
-	public int PushContextPrincipal(int /*long*/ cx, int /*long*/ fp, int /*long*/ principal) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + 26, getAddress(), cx, fp, principal);
-	}
-	
-	public int PopContextPrincipal(int /*long*/ cx) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
-		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + 27, getAddress(), cx);
+		return XPCOM.VtblCall(nsIXPCSecurityManager.LAST_METHOD_ID + (IsXULRunner17 ? 8 : (IsXULRunner10 ? 10 : 11)), getAddress(), _retval);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsISeekableStream.java b/org/eclipse/swt/internal/mozilla/nsISeekableStream.java
index 74ddd6e..3e4a736 100644
--- a/org/eclipse/swt/internal/mozilla/nsISeekableStream.java
+++ b/org/eclipse/swt/internal/mozilla/nsISeekableStream.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsISerializable.java b/org/eclipse/swt/internal/mozilla/nsISerializable.java
index 9537c36..383c485 100644
--- a/org/eclipse/swt/internal/mozilla/nsISerializable.java
+++ b/org/eclipse/swt/internal/mozilla/nsISerializable.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIServiceManager.java b/org/eclipse/swt/internal/mozilla/nsIServiceManager.java
index 2f46a69..a632bdf 100644
--- a/org/eclipse/swt/internal/mozilla/nsIServiceManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsIServiceManager.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsISimpleEnumerator.java b/org/eclipse/swt/internal/mozilla/nsISimpleEnumerator.java
index 9f29e75..0d58b0a 100644
--- a/org/eclipse/swt/internal/mozilla/nsISimpleEnumerator.java
+++ b/org/eclipse/swt/internal/mozilla/nsISimpleEnumerator.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsISupports.java b/org/eclipse/swt/internal/mozilla/nsISupports.java
index 2cd9f39..60d5b05 100644
--- a/org/eclipse/swt/internal/mozilla/nsISupports.java
+++ b/org/eclipse/swt/internal/mozilla/nsISupports.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -38,7 +38,7 @@ public class nsISupports {
 	static final int FIRST_METHOD_ID = IsSolaris ? 2 : 0;
 	static final int LAST_METHOD_ID = FIRST_METHOD_ID + 2;
 
-	public static boolean IsXULRunner10;
+	public static boolean IsXULRunner10, IsXULRunner17;
 	
 	public static final String NS_ISUPPORTS_IID_STR =
 		"00000000-0000-0000-c000-000000000046";
diff --git a/org/eclipse/swt/internal/mozilla/nsISupportsWeakReference.java b/org/eclipse/swt/internal/mozilla/nsISupportsWeakReference.java
deleted file mode 100644
index be23ec2..0000000
--- a/org/eclipse/swt/internal/mozilla/nsISupportsWeakReference.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsISupportsWeakReference extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_ISUPPORTSWEAKREFERENCE_IID_STR =
-		"9188bc86-f92e-11d2-81ef-0060083a0bcf";
-
-	public static final nsID NS_ISUPPORTSWEAKREFERENCE_IID =
-		new nsID(NS_ISUPPORTSWEAKREFERENCE_IID_STR);
-
-	public nsISupportsWeakReference(int /*long*/ address) {
-		super(address);
-	}
-
-	public int GetWeakReference(int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsITooltipListener.java b/org/eclipse/swt/internal/mozilla/nsITooltipListener.java
deleted file mode 100644
index 50126a6..0000000
--- a/org/eclipse/swt/internal/mozilla/nsITooltipListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2004, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsITooltipListener extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
-
-	public static final String NS_ITOOLTIPLISTENER_IID_STR =
-		"44b78386-1dd2-11b2-9ad2-e4eee2ca1916";
-
-	public static final nsID NS_ITOOLTIPLISTENER_IID =
-		new nsID(NS_ITOOLTIPLISTENER_IID_STR);
-
-	public nsITooltipListener(int /*long*/ address) {
-		super(address);
-	}
-
-	public int OnShowTooltip(int aXCoords, int aYCoords, char[] aTipText) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aXCoords, aYCoords, aTipText);
-	}
-
-	public int OnHideTooltip() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsITransfer.java b/org/eclipse/swt/internal/mozilla/nsITransfer.java
index c9f0ba6..b30fe4a 100644
--- a/org/eclipse/swt/internal/mozilla/nsITransfer.java
+++ b/org/eclipse/swt/internal/mozilla/nsITransfer.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIURI.java b/org/eclipse/swt/internal/mozilla/nsIURI.java
index f6b6a7c..c0549be 100644
--- a/org/eclipse/swt/internal/mozilla/nsIURI.java
+++ b/org/eclipse/swt/internal/mozilla/nsIURI.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIURI extends nsISupports {
 	
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 32 : 26);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 32 : 26);
 
 	public static final String NS_IURI_IID_STR =
 		"07a22cc0-0ce5-11d3-9331-00104ba0fd40";
@@ -152,32 +152,32 @@ public class nsIURI extends nsISupports {
 	}
 	
 	public int GetRef(int /*long*/ aRef) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aRef);
 	}
 
 	public int SetRef(int /*long*/ aRef) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aRef);
 	}
 
 	public int EqualsExceptRef(int /*long*/ other, int[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), other, _retval);
 	}
 
 	public int CloneIgnoringRef(int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), _retval);
 	}
 
 	public int GetSpecIgnoringRef(int /*long*/ aSpecIgnoringRef) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), aSpecIgnoringRef);
 	}
 
 	public int GetHasRef(int[] aHasRef) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), aHasRef);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIURIContentListener.java b/org/eclipse/swt/internal/mozilla/nsIURIContentListener.java
deleted file mode 100644
index aa6378e..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIURIContentListener.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIURIContentListener extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 8;
-
-	public static final String NS_IURICONTENTLISTENER_IID_STR =
-		"94928ab3-8b63-11d3-989d-001083010e9b";
-
-	public static final nsID NS_IURICONTENTLISTENER_IID =
-		new nsID(NS_IURICONTENTLISTENER_IID_STR);
-
-	public nsIURIContentListener(int /*long*/ address) {
-		super(address);
-	}
-
-	public int OnStartURIOpen(int /*long*/ aURI, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aURI, _retval);
-	}
-
-	public int DoContent(byte[] aContentType, int aIsContentPreferred, int /*long*/ aRequest, int /*long*/[] aContentHandler, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aContentType, aIsContentPreferred, aRequest, aContentHandler, _retval);
-	}
-
-	public int IsPreferred(byte[] aContentType, int /*long*/[] aDesiredContentType, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aContentType, aDesiredContentType, _retval);
-	}
-
-	public int CanHandleContent(byte[] aContentType, int aIsContentPreferred, int /*long*/[] aDesiredContentType, int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aContentType, aIsContentPreferred, aDesiredContentType, _retval);
-	}
-
-	public int GetLoadCookie(int /*long*/[] aLoadCookie) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aLoadCookie);
-	}
-
-	public int SetLoadCookie(int /*long*/ aLoadCookie) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLoadCookie);
-	}
-
-	public int GetParentContentListener(int /*long*/[] aParentContentListener) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aParentContentListener);
-	}
-
-	public int SetParentContentListener(int /*long*/ aParentContentListener) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aParentContentListener);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIUploadChannel.java b/org/eclipse/swt/internal/mozilla/nsIUploadChannel.java
index 9a8dc98..c19b04b 100644
--- a/org/eclipse/swt/internal/mozilla/nsIUploadChannel.java
+++ b/org/eclipse/swt/internal/mozilla/nsIUploadChannel.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2011, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIVariant.java b/org/eclipse/swt/internal/mozilla/nsIVariant.java
index 29f9bad..399f2af 100644
--- a/org/eclipse/swt/internal/mozilla/nsIVariant.java
+++ b/org/eclipse/swt/internal/mozilla/nsIVariant.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIVariant extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 27 : 26);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 27 : 26);
 
 	public static final String NS_IVARIANT_IID_STR =
 		"6c9eb060-8c6a-11d5-90f3-0010a4e73d9a";
@@ -92,6 +92,13 @@ public class nsIVariant extends nsISupports {
 	}
 
 	public int GetAsBool(int[] _retval) {
+		/* mozilla's representation of boolean changed from 4 bytes to 1 byte as of XULRunner 4.x */
+		if (nsISupports.IsXULRunner10 || nsISupports.IsXULRunner17) {
+			byte[] byteValue = new byte[1];
+			int rc = XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), byteValue);
+			_retval[0] = (int)byteValue[0];
+			return rc;
+		}
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), _retval);
 	}
 
@@ -136,23 +143,23 @@ public class nsIVariant extends nsISupports {
 	}
 
 	public int GetAsJSVal(int /*long*/[] _retval) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), _retval);
 	}
 
 	public int GetAsInterface(int /*long*/[] iid, int /*long*/[] iface) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 24 : 23), getAddress(), iid, iface);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 24 : 23), getAddress(), iid, iface);
 	}
 
 	public int GetAsArray(short[] type, int /*long*/ iid, int[] count, int /*long*/[] ptr) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 25 : 24), getAddress(), type, iid, count, ptr);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 25 : 24), getAddress(), type, iid, count, ptr);
 	}
 
 	public int GetAsStringWithSize(int[] size, int /*long*/[] str) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 26 : 25), getAddress(), size, str);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 26 : 25), getAddress(), size, str);
 	}
 
 	public int GetAsWStringWithSize(int[] size, int /*long*/[] str) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 27 : 26), getAddress(), size, str);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 27 : 26), getAddress(), size, str);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIWeakReference.java b/org/eclipse/swt/internal/mozilla/nsIWeakReference.java
deleted file mode 100644
index 8cccddc..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIWeakReference.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIWeakReference extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_IWEAKREFERENCE_IID_STR =
-		"9188bc85-f92e-11d2-81ef-0060083a0bcf";
-
-	public static final nsID NS_IWEAKREFERENCE_IID =
-		new nsID(NS_IWEAKREFERENCE_IID_STR);
-
-	public nsIWeakReference(int /*long*/ address) {
-		super(address);
-	}
-
-	public int QueryReferent(nsID uuid, int /*long*/[] result) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uuid, result);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowser.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowser.java
index ba6c3a5..42c5bfd 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowser.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebBrowser.java
@@ -22,14 +22,14 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIWebBrowser extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner10 ? 9 : 7);
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + ((IsXULRunner10 || IsXULRunner17) ? 9 : 7);
 
 	public static final String NS_IWEBBROWSER_IID_STR =
 		"69e5df00-7b8b-11d3-af61-00a024ffc08c";
@@ -76,12 +76,12 @@ public class nsIWebBrowser extends nsISupports {
 	}
 
 	public int GetIsActive(int[] aIsActive) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aIsActive);
 	}
 
 	public int SetIsActive(int aIsActive) {
-		if (!IsXULRunner10) return XPCOM.NS_COMFALSE;
+		if (!(IsXULRunner10 || IsXULRunner17)) return XPCOM.NS_COMFALSE;
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aIsActive);
 	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowserChrome.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowserChrome.java
index e97440b..da562ca 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowserChrome.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebBrowserChrome.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -36,6 +36,12 @@ public class nsIWebBrowserChrome extends nsISupports {
 
 	public static final nsID NS_IWEBBROWSERCHROME_IID =
 		new nsID(NS_IWEBBROWSERCHROME_IID_STR);
+	
+	public static final String NS_IWEBBROWSERCHROME_17_IID_STR =
+		"e8c414c4-dc38-4ba3-ab4e-ec4cbbe22907";
+
+	public static final nsID NS_IWEBBROWSERCHROME_17_IID =
+		new nsID(NS_IWEBBROWSERCHROME_17_IID_STR);
 
 	public nsIWebBrowserChrome(int /*long*/ address) {
 		super(address);
@@ -45,18 +51,10 @@ public class nsIWebBrowserChrome extends nsISupports {
 	public static final int STATUS_SCRIPT_DEFAULT = 2;
 	public static final int STATUS_LINK = 3;
 
-	public int SetStatus(int statusType, char[] status) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), statusType, status);
-	}
-
 	public int GetWebBrowser(int /*long*/[] aWebBrowser) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWebBrowser);
 	}
 
-	public int SetWebBrowser(int /*long*/ aWebBrowser) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aWebBrowser);
-	}
-
 	public static final int CHROME_DEFAULT = 1;
 	public static final int CHROME_WINDOW_BORDERS = 2;
 	public static final int CHROME_WINDOW_CLOSE = 4;
@@ -82,31 +80,7 @@ public class nsIWebBrowserChrome extends nsISupports {
 	public static final int CHROME_OPENAS_CHROME = -2147483648;
 	public static final int CHROME_ALL = 4094;
 
-	public int GetChromeFlags(int[] aChromeFlags) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aChromeFlags);
-	}
-
 	public int SetChromeFlags(int aChromeFlags) {
 		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aChromeFlags);
 	}
-
-	public int DestroyBrowserWindow() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress());
-	}
-
-	public int SizeBrowserTo(int aCX, int aCY) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aCX, aCY);
-	}
-
-	public int ShowAsModal() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress());
-	}
-
-	public int IsWindowModal(int[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), _retval);
-	}
-
-	public int ExitModalEventLoop(int aStatus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), aStatus);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowserChromeFocus.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowserChromeFocus.java
deleted file mode 100644
index 68136bd..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowserChromeFocus.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIWebBrowserChromeFocus extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 2;
-
-	public static final String NS_IWEBBROWSERCHROMEFOCUS_IID_STR =
-		"d2206418-1dd1-11b2-8e55-acddcd2bcfb8";
-
-	public static final nsID NS_IWEBBROWSERCHROMEFOCUS_IID =
-		new nsID(NS_IWEBBROWSERCHROMEFOCUS_IID_STR);
-
-	public nsIWebBrowserChromeFocus(int /*long*/ address) {
-		super(address);
-	}
-
-	public int FocusNextElement() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress());
-	}
-
-	public int FocusPrevElement() {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress());
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowserFocus.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowserFocus.java
index d128470..3c5bc80 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowserFocus.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebBrowserFocus.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowserSetup.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowserSetup.java
index 7ea0bdd..0f299b6 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowserSetup.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebBrowserSetup.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java b/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java
index a6d7c26..1b206ad 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebNavigation.java b/org/eclipse/swt/internal/mozilla/nsIWebNavigation.java
index 5dc9dda..1edeaa7 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebNavigation.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebNavigation.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebNavigationInfo.java b/org/eclipse/swt/internal/mozilla/nsIWebNavigationInfo.java
index 8b329f5..5c52ec7 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebNavigationInfo.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebNavigationInfo.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebProgress.java b/org/eclipse/swt/internal/mozilla/nsIWebProgress.java
index ba4addd..44e112c 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebProgress.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebProgress.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebProgressListener.java b/org/eclipse/swt/internal/mozilla/nsIWebProgressListener.java
index 7ce497e..936660d 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebProgressListener.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebProgressListener.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -36,6 +36,12 @@ public class nsIWebProgressListener extends nsISupports {
 
 	public static final nsID NS_IWEBPROGRESSLISTENER_IID =
 		new nsID(NS_IWEBPROGRESSLISTENER_IID_STR);
+	
+	public static final String NS_IWEBPROGRESSLISTENER_17_IID_STR =
+		"a0cda7e4-c6ca-11e0-b6a5-001320257da5";
+
+	public static final nsID NS_IWEBPROGRESSLISTENER_17_IID =
+		new nsID(NS_IWEBPROGRESSLISTENER_17_IID_STR);
 
 	public nsIWebProgressListener(int /*long*/ address) {
 		super(address);
@@ -56,24 +62,4 @@ public class nsIWebProgressListener extends nsISupports {
 	public static final int STATE_SECURE_HIGH = 262144;
 	public static final int STATE_SECURE_MED = 65536;
 	public static final int STATE_SECURE_LOW = 131072;
-
-	public int OnStateChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aStateFlags, int aStatus) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aWebProgress, aRequest, aStateFlags, aStatus);
-	}
-
-	public int OnProgressChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aCurSelfProgress, int aMaxSelfProgress, int aCurTotalProgress, int aMaxTotalProgress) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress);
-	}
-
-	public int OnLocationChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int /*long*/ location) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aWebProgress, aRequest, location);
-	}
-
-	public int OnStatusChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int aStatus, char[] aMessage) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aWebProgress, aRequest, aStatus, aMessage);
-	}
-
-	public int OnSecurityChange(int /*long*/ aWebProgress, int /*long*/ aRequest, int state) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aWebProgress, aRequest, state);
-	}
 }
diff --git a/org/eclipse/swt/internal/mozilla/nsIWebProgressListener2.java b/org/eclipse/swt/internal/mozilla/nsIWebProgressListener2.java
index d27f486..22aa429 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWebProgressListener2.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWebProgressListener2.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWindowCreator.java b/org/eclipse/swt/internal/mozilla/nsIWindowCreator.java
deleted file mode 100644
index 01646f5..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIWindowCreator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIWindowCreator extends nsISupports {
-
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 1;
-
-	public static final String NS_IWINDOWCREATOR_IID_STR =
-		"30465632-a777-44cc-90f9-8145475ef999";
-
-	public static final nsID NS_IWINDOWCREATOR_IID =
-		new nsID(NS_IWINDOWCREATOR_IID_STR);
-
-	public nsIWindowCreator(int /*long*/ address) {
-		super(address);
-	}
-
-	public int CreateChromeWindow(int /*long*/ parent, int chromeFlags, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIWindowCreator2.java b/org/eclipse/swt/internal/mozilla/nsIWindowCreator2.java
deleted file mode 100644
index 4bfec46..0000000
--- a/org/eclipse/swt/internal/mozilla/nsIWindowCreator2.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Communicator client code, released March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by Netscape are Copyright (C) 1998-1999
- * Netscape Communications Corporation.  All Rights Reserved.
- *
- * Contributor(s):
- *
- * IBM
- * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2008 IBM Corp.  All Rights Reserved.
- *
- * ***** END LICENSE BLOCK ***** */
-package org.eclipse.swt.internal.mozilla;
-
-public class nsIWindowCreator2 extends nsIWindowCreator {
-
-	static final int LAST_METHOD_ID = nsIWindowCreator.LAST_METHOD_ID + 1;
-
-	public static final String NS_IWINDOWCREATOR2_IID_STR =
-		"f673ec81-a4b0-11d6-964b-eb5a2bf216fc";
-
-	public static final nsID NS_IWINDOWCREATOR2_IID =
-		new nsID(NS_IWINDOWCREATOR2_IID_STR);
-
-	public nsIWindowCreator2(int /*long*/ address) {
-		super(address);
-	}
-
-	public static final int PARENT_IS_LOADING_OR_RUNNING_TIMEOUT = 1;
-
-	public int CreateChromeWindow2(int /*long*/ parent, int chromeFlags, int contextFlags, int /*long*/ uri, int[] cancel, int /*long*/[] _retval) {
-		return XPCOM.VtblCall(nsIWindowCreator.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, contextFlags, uri, cancel, _retval);
-	}
-}
diff --git a/org/eclipse/swt/internal/mozilla/nsIWindowWatcher.java b/org/eclipse/swt/internal/mozilla/nsIWindowWatcher.java
index bfb7471..07ddbfd 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWindowWatcher.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWindowWatcher.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java b/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java
index 76566dd..cf264fa 100644
--- a/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java
+++ b/org/eclipse/swt/internal/mozilla/nsIWritableVariant.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2009 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
@@ -90,6 +90,10 @@ public class nsIWritableVariant extends nsIVariant {
 	}
 
 	public int SetAsBool(int aValue) {
+		/* mozilla's representation of boolean changed from 4 bytes to 1 byte as of XULRunner 4.x */
+		if (IsXULRunner10 || IsXULRunner17) {
+			return XPCOM.VtblCall(nsIVariant.LAST_METHOD_ID + 13, getAddress(), (byte)aValue);
+		}
 		return XPCOM.VtblCall(nsIVariant.LAST_METHOD_ID + 13, getAddress(), aValue);
 	}
 
diff --git a/org/eclipse/swt/internal/mozilla/nsIX509Cert.java b/org/eclipse/swt/internal/mozilla/nsIX509Cert.java
index 23705a0..2b4eedb 100644
--- a/org/eclipse/swt/internal/mozilla/nsIX509Cert.java
+++ b/org/eclipse/swt/internal/mozilla/nsIX509Cert.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java b/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java
index c14d593..0815833 100644
--- a/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java
+++ b/org/eclipse/swt/internal/mozilla/nsIX509CertValidity.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIXPCSecurityManager.java b/org/eclipse/swt/internal/mozilla/nsIXPCSecurityManager.java
index c1366d7..d22d86b 100644
--- a/org/eclipse/swt/internal/mozilla/nsIXPCSecurityManager.java
+++ b/org/eclipse/swt/internal/mozilla/nsIXPCSecurityManager.java
@@ -22,7 +22,7 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2003, 2011 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2003, 2012 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
diff --git a/org/eclipse/swt/internal/mozilla/nsIXPConnect.java b/org/eclipse/swt/internal/mozilla/nsIXPConnect.java
index dc49321..91dd8aa 100644
--- a/org/eclipse/swt/internal/mozilla/nsIXPConnect.java
+++ b/org/eclipse/swt/internal/mozilla/nsIXPConnect.java
@@ -22,20 +22,26 @@
  *
  * IBM
  * -  Binding to permit interfacing between Mozilla and SWT
- * -  Copyright (C) 2012 IBM Corp.  All Rights Reserved.
+ * -  Copyright (C) 2012, 2013 IBM Corp.  All Rights Reserved.
  *
  * ***** END LICENSE BLOCK ***** */
 package org.eclipse.swt.internal.mozilla;
 
 public class nsIXPConnect extends nsISupports {
 
-	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 27;
+	static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 48 : 27);
 
 	public static final String NS_IXPCONNECT_IID_STR =
 		"a995b541-d514-43f1-ac0e-f49746c0b063";
 
 	public static final nsID NS_IXPCONNECT_IID =
 		new nsID(NS_IXPCONNECT_IID_STR);
+	
+	public static final String NS_IXPCONNECT_17_IID_STR =
+		"bd300b18-1c34-4589-8285-23a12cc580ea";
+
+	public static final nsID NS_IXPCONNECT_17_IID =
+		new nsID(NS_IXPCONNECT_17_IID_STR);
 
 	public nsIXPConnect(int /*long*/ address) {
 		super(address);
@@ -46,6 +52,6 @@ public class nsIXPConnect extends nsISupports {
 	}
 
 	public int VariantToJS(int /*long*/ ctx, int /*long*/ scope, int /*long*/ value, int /*long*/ _retval) {
-		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), ctx, scope, value, _retval);
+		return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + (IsXULRunner17 ? 31 : 33), getAddress(), ctx, scope, value, _retval);
 	}
 }
diff --git a/org/eclipse/swt/internal/opengl/glx/GLX.java b/org/eclipse/swt/internal/opengl/glx/GLX.java
index 4f1d979..227f526 100644
--- a/org/eclipse/swt/internal/opengl/glx/GLX.java
+++ b/org/eclipse/swt/internal/opengl/glx/GLX.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java b/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java
index 8faa6cf..cc67927 100644
--- a/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java
+++ b/org/eclipse/swt/internal/opengl/glx/XVisualInfo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/internal/theme/ButtonDrawData.java b/org/eclipse/swt/internal/theme/ButtonDrawData.java
index eff7bef..3ae78b3 100644
--- a/org/eclipse/swt/internal/theme/ButtonDrawData.java
+++ b/org/eclipse/swt/internal/theme/ButtonDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class ButtonDrawData extends DrawData {
@@ -60,7 +61,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 			prelight_y = bounds.y + border_width;
 			prelight_width = bounds.width - (2 * border_width);
 			prelight_height = bounds.height - (2 * border_width);
-			OS.gtk_paint_flat_box(gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_ETCHED_OUT, null, radioButtonHandle, detail, prelight_x, prelight_y, prelight_width, prelight_height);
+			gtk_render_frame (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_ETCHED_OUT, null, radioButtonHandle, detail, prelight_x, prelight_y, prelight_width, prelight_height);
 		}
 		int state_type = getStateType(DrawData.WIDGET_WHOLE);
 		OS.gtk_paint_option(gtkStyle, drawable, state_type, shadow_type, null, radioButtonHandle, detail, x, y, indicator_size, indicator_size);
@@ -107,10 +108,10 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 			prelight_y = bounds.y + border_width;
 			prelight_width = bounds.width - (2 * border_width);
 			prelight_height = bounds.height - (2 * border_width);
-			OS.gtk_paint_flat_box(gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_ETCHED_OUT, null, checkButtonHandle, detail, prelight_x, prelight_y, prelight_width, prelight_height);
+			gtk_render_frame (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_ETCHED_OUT, null, checkButtonHandle, detail, prelight_x, prelight_y, prelight_width, prelight_height);
 		}
 		int state_type = getStateType(DrawData.WIDGET_WHOLE);
-		OS.gtk_paint_check(gtkStyle, drawable, state_type, shadow_type, null, checkButtonHandle, detail, x, y, indicator_size, indicator_size);
+		gtk_render_check (gtkStyle, drawable, state_type, shadow_type, checkButtonHandle, detail, x, y, indicator_size, indicator_size);
 		if (clientArea != null) {
 			clientArea.x = bounds.x + 2 * indicator_spacing + border_width + indicator_size;
 			clientArea.y = bounds.y + border_width;
@@ -155,7 +156,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		int relief = OS.gtk_button_get_relief(buttonHandle);
 		byte[] detail = Converter.wcsToMbcs(null, (state & DrawData.DEFAULTED) != 0 ? "buttondefault" : "button", true);
 		if ((state & DrawData.DEFAULTED) != 0 && relief == OS.GTK_RELIEF_NORMAL) {
-            OS.gtk_paint_box(gtkStyle, drawable, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_IN, null, buttonHandle, detail, x, y, width, height);
+			gtk_render_box (gtkStyle, drawable, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_IN, null, buttonHandle, detail, x, y, width, height);
             x += default_border.left;
             y += default_border.top;
             width -= default_border.left + default_border.right;
@@ -172,16 +173,13 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		int state_type = getStateType(DrawData.WIDGET_WHOLE);
 
 		if (relief != OS.GTK_RELIEF_NONE || ((state & (DrawData.PRESSED | DrawData.HOT)) != 0)) {
-			OS.gtk_paint_box(gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, x, y, width, height);
+			gtk_render_box (gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, x, y, width, height);
 		}
 		
 	    if ((state & DrawData.FOCUSED) != 0) {
 	    	int child_displacement_y = theme.getWidgetProperty(buttonHandle, "child-displacement-y");
 	    	int child_displacement_x = theme.getWidgetProperty(buttonHandle, "child-displacement-x");
-	    	int displace_focus = 0;
-	    	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-	    		displace_focus = theme.getWidgetProperty(buttonHandle, "displace-focus");		    	
-	    	}
+	    	int displace_focus = theme.getWidgetProperty(buttonHandle, "displace-focus");		    	
 	    	int interior_focus = theme.getWidgetProperty(buttonHandle, "interior-focus");
 	    	
 	    	if (interior_focus != 0) {
@@ -203,7 +201,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	              y += child_displacement_y;
 	    	}
 	    	
-	        OS.gtk_paint_focus(gtkStyle, drawable, state_type, null, buttonHandle, detail, x, y, width, height);
+	    	gtk_render_focus (gtkStyle, drawable, state_type, null, buttonHandle, detail, x, y, width, height);
 	    }
 		if (clientArea != null) {
 			clientArea.x = bounds.x + border_width;
@@ -219,4 +217,26 @@ int hit(Theme theme, Point position, Rectangle bounds) {
 	return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
 }
 
+void gtk_render_option (int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_option (context, cairo, x, y, width, height);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_option (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+	}
+}
+
+void gtk_render_check(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type,  int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_check (context, cairo, x, y, width, height);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_check (style, window, state_type, shadow_type, null, widget, detail, x, y, width, height);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/internal/theme/ComboDrawData.java b/org/eclipse/swt/internal/theme/ComboDrawData.java
index dbf3b0d..73bed62 100644
--- a/org/eclipse/swt/internal/theme/ComboDrawData.java
+++ b/org/eclipse/swt/internal/theme/ComboDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.swt.internal.theme;
 
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class ComboDrawData extends DrawData {
@@ -58,18 +59,18 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	int arrow_y = y + (height - arrow_height) / 2 + 1;
 	if (relief != OS.GTK_RELIEF_NONE || ((state[DrawData.COMBO_ARROW] & (DrawData.PRESSED | DrawData.HOT)) != 0)) {
 		byte[] detail = Converter.wcsToMbcs(null, "button", true);
-		OS.gtk_paint_box(gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, arrow_button_x, y, arrow_button_width, height);
+		gtk_render_box (gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, arrow_button_x, y, arrow_button_width, height);
 	}		
 	byte[] arrow_detail = Converter.wcsToMbcs(null, "arrow", true);
 	int /*long*/ arrowHandle = theme.arrowHandle;
-	OS.gtk_paint_arrow(gtkStyle, drawable, state_type, OS.GTK_SHADOW_OUT, null, arrowHandle, arrow_detail, OS.GTK_ARROW_DOWN, true, arrow_x, arrow_y, arrow_width, arrow_height);
+	gtk_render_arrow (gtkStyle, drawable, state_type, OS.GTK_SHADOW_OUT, null, arrowHandle, arrow_detail, OS.GTK_ARROW_DOWN, true, arrow_x, arrow_y, arrow_width, arrow_height);
 	
 	int /*long*/ entryHandle = theme.entryHandle;
 	gtkStyle = OS.gtk_widget_get_style(entryHandle);
 	theme.transferClipping(gc, gtkStyle);
 	state_type = getStateType(DrawData.WIDGET_WHOLE);
 	byte[] detail = Converter.wcsToMbcs(null, "entry", true);
-	OS.gtk_paint_shadow(gtkStyle, drawable, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_IN, null, entryHandle, detail, x, y, width - arrow_button_width, height);
+	gtk_render_shadow (gtkStyle, drawable, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_IN, null, entryHandle, detail, x, y, width - arrow_button_width, height);
 	xthickness = OS.gtk_style_get_xthickness(gtkStyle);
 	ythickness = OS.gtk_style_get_xthickness(gtkStyle);
 	x += xthickness;
@@ -77,7 +78,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	width -= 2 * xthickness;
 	height -= 2 * ythickness;
 	detail = Converter.wcsToMbcs(null, "entry_bg", true);
-	OS.gtk_paint_flat_box(gtkStyle, drawable, state_type, OS.GTK_SHADOW_NONE, null, entryHandle, detail, x, y, width - arrow_button_width, height);
+	gtk_render_frame (gtkStyle, drawable, state_type, OS.GTK_SHADOW_NONE, null, entryHandle, detail, x, y, width - arrow_button_width, height);
 		
 	if (clientArea != null) {
 		clientArea.x = x;
@@ -122,4 +123,16 @@ int hit(Theme theme, Point position, Rectangle bounds) {
 	return DrawData.WIDGET_WHOLE;
 }
 
+void gtk_render_shadow(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_style_context_save(context);
+		OS.gtk_style_context_set_state (style, state_type);
+		OS.gtk_render_frame (context, cairo, x, y, width, height);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_shadow(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+	}
+}
 }
diff --git a/org/eclipse/swt/internal/theme/DrawData.java b/org/eclipse/swt/internal/theme/DrawData.java
index 9785073..e35daae 100644
--- a/org/eclipse/swt/internal/theme/DrawData.java
+++ b/org/eclipse/swt/internal/theme/DrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.swt.internal.theme;
 
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class DrawData {
@@ -97,7 +98,15 @@ void drawImage(Theme theme, Image image, GC gc, Rectangle bounds) {
 			OS.g_object_unref(pixbuf);
 			//TODO - stretching
 			if (rendered != 0) {
-				OS.gdk_draw_pixbuf(drawable, gc.handle, rendered, 0, 0, bounds.x, bounds.y, bounds.width, bounds.height, OS.GDK_RGB_DITHER_NORMAL, 0, 0);
+				if (OS.USE_CAIRO) {
+					int /*long*/ cairo = OS.gdk_cairo_create (drawable);
+					OS.gdk_cairo_set_source_pixbuf (cairo, gc.handle, 0, 0);
+					Cairo.cairo_rectangle (cairo,bounds.x,bounds.y,bounds.width,bounds.height);
+					Cairo.cairo_fill(cairo);
+					Cairo.cairo_destroy(cairo);
+				} else {
+					OS.gdk_draw_pixbuf(drawable, gc.handle, rendered, 0, 0, bounds.x, bounds.y, bounds.width, bounds.height, OS.GDK_RGB_DITHER_NORMAL, 0, 0);
+				}
 				OS.g_object_unref(rendered);
 			}
 			OS.gtk_icon_source_free(source);
@@ -113,7 +122,7 @@ void drawText(Theme theme, String text, int flags, GC gc, Rectangle bounds) {
 	byte[] buffer = Converter.wcsToMbcs(null, text, true);
 	int /*long*/ layout = OS.gtk_widget_create_pango_layout(widget, buffer);
 	int[] width = new int[1], height = new int[1];
-	OS.pango_layout_get_size(layout, width, height);
+	OS.pango_layout_get_pixel_size(layout, width, height);
 	OS.pango_layout_set_width(layout, bounds.width * OS.PANGO_SCALE);
 	int x = bounds.x;
 	int y = bounds.y;
@@ -127,14 +136,14 @@ void drawText(Theme theme, String text, int flags, GC gc, Rectangle bounds) {
 		OS.pango_layout_set_alignment(layout, OS.PANGO_ALIGN_RIGHT);
 	}
 	if ((flags & DrawData.DRAW_VCENTER) != 0) {
-		y += (bounds.height - OS.PANGO_PIXELS(height[0])) / 2;
+		y += (bounds.height - height[0]) / 2;
 	}
 	if ((flags & DrawData.DRAW_BOTTOM) != 0) {
-		y += bounds.height - OS.PANGO_PIXELS(height[0]);
+		y += bounds.height - height[0];
 	}
 	int state_type = getStateType(DrawData.WIDGET_WHOLE);
 	byte[] detail = Converter.wcsToMbcs(null, "label", true);
-	OS.gtk_paint_layout(gtkStyle, drawable, state_type, false, null, widget, detail, x, y, layout);
+	gtk_render_layout(gtkStyle, drawable, state_type, false, null, widget, detail, x, y, layout);
 	OS.g_object_unref(layout);
 }
 
@@ -183,9 +192,95 @@ Rectangle measureText(Theme theme, String text, int flags, GC gc, Rectangle boun
 		OS.pango_layout_set_alignment(layout, OS.PANGO_ALIGN_RIGHT);
 	}
 	int[] width = new int[1], height = new int[1];
-	OS.pango_layout_get_size(layout, width, height);
+	OS.pango_layout_get_pixel_size(layout, width, height);
 	OS.g_object_unref(layout);
-	return new Rectangle(0, 0, OS.PANGO_PIXELS(width[0]), OS.PANGO_PIXELS(height[0]));
+	return new Rectangle(0, 0, width[0], height[0]);
+}
+
+void gtk_render_frame (int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_frame (context, cairo, x, y, width, height);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_flat_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+	}
+}
+
+void gtk_render_box (int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_frame (context, cairo, x, y, width, height);
+		OS.gtk_render_background (context, cairo, x, y, width, height);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+	}
+}
+
+
+void gtk_render_layout (int /*long*/ style, int /*long*/ window, int state_type, boolean use_text, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int /*long*/ layout) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_layout (context, cairo, x, y, layout);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_layout (style, window, state_type, use_text, area, widget, detail, x , y, layout);
+	}
+}
+
+void gtk_render_focus (int /*long*/ style, int /*long*/ window, int state_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/  context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_style_context_save (context);
+		OS.gtk_style_context_set_state (context, OS.gtk_widget_get_state_flags (widget));
+		Cairo.cairo_save (cairo);
+		OS.gtk_render_focus(context, cairo, x, y, width, height);
+		Cairo.cairo_restore (cairo);
+		OS.gtk_style_context_restore (context);
+		Cairo.cairo_destroy (cairo);
+		
+	} else {
+		OS.gtk_paint_focus (style, window, state_type, area, widget, detail, x, y, width, height);
+	}
+}
+
+void gtk_render_arrow(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int arrow_type, boolean fill, int x, int y, int width, int height) {
+	if (OS.GTK3) {
+		double angle = 0;
+		double size = 0;
+		switch (arrow_type) {
+			case OS.GTK_ARROW_UP:
+				angle = 0;
+				size = width;
+				break;
+			case OS.GTK_ARROW_RIGHT:
+				angle = Math.PI/2;
+				size = height;
+				break;
+			case OS.GTK_ARROW_DOWN:
+				angle = Math.PI;
+				size = width;
+				break;
+			case OS.GTK_ARROW_LEFT:
+				angle = (3 * Math.PI)/2;
+				size = height;
+				break;
+		}
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/  context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_style_context_set_state(context, state_type);
+		OS.gtk_render_background(context, cairo, x, y, width, height);
+		OS.gtk_render_frame (context, cairo, x, y, width, height);
+		OS.gtk_render_arrow(context, cairo, angle, x, y, size);
+		Cairo.cairo_destroy(cairo);
+	} else {
+		OS.gtk_paint_arrow(style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
+	}
 }
 
 }
diff --git a/org/eclipse/swt/internal/theme/ExpanderDrawData.java b/org/eclipse/swt/internal/theme/ExpanderDrawData.java
index 7553116..a69d19f 100644
--- a/org/eclipse/swt/internal/theme/ExpanderDrawData.java
+++ b/org/eclipse/swt/internal/theme/ExpanderDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class ExpanderDrawData extends DrawData {
@@ -33,7 +34,14 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	int expander_size = theme.getWidgetProperty(treeHandle, "expander-size");
 	int x = bounds.x + expander_size / 2;
 	int y = bounds.y + expander_size / 2;
-	OS.gtk_paint_expander(gtkStyle, drawable, state_type, null, treeHandle, detail, x, y, expander_style);
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (drawable);
+		int /*long*/ context = OS.gtk_widget_get_style_context (gtkStyle);
+		OS.gtk_render_expander (context, cairo, bounds.x, bounds.y, expander_size, expander_size);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_expander(gtkStyle, drawable, state_type, null, treeHandle, detail, x, y, expander_style);	
+	}
 }
 
 int hit(Theme theme, Point position, Rectangle bounds) {
diff --git a/org/eclipse/swt/internal/theme/GroupDrawData.java b/org/eclipse/swt/internal/theme/GroupDrawData.java
index bd18278..f58c73d 100644
--- a/org/eclipse/swt/internal/theme/GroupDrawData.java
+++ b/org/eclipse/swt/internal/theme/GroupDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.swt.internal.theme;
 
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class GroupDrawData extends DrawData {
@@ -39,7 +40,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	byte[] detail = Converter.wcsToMbcs(null, "frame", true);
 	int gap_x = xthickness + GROUP_X, gap_width = headerWidth + GROUP_PAD * 2, gap_side = OS.GTK_POS_TOP;
 	int state_type = getStateType(DrawData.WIDGET_WHOLE);
-	OS.gtk_paint_shadow_gap(gtkStyle, drawable, state_type, OS.GTK_SHADOW_ETCHED_IN, null, frameHandle, detail, x, y, width, height, gap_side, gap_x, gap_width);
+	gtk_render_shadow_gap (gtkStyle, drawable, state_type, OS.GTK_SHADOW_ETCHED_IN, null, frameHandle, detail, x, y, width, height, gap_side, gap_x, gap_width);
 	if (headerArea != null) {
 		headerArea.x = bounds.x + gap_x + GROUP_PAD;
 		headerArea.y = bounds.y;
@@ -65,4 +66,16 @@ int hit(Theme theme, Point position, Rectangle bounds) {
    	return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
 }
 
+void gtk_render_shadow_gap (int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height, int gap_side, int gap_x, int gap_width) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_style_context_save (context);
+		OS.gtk_style_context_set_state (context, state_type);
+		OS.gtk_render_frame_gap (context, cairo, context, y, gap_width, height, gap_side, gap_x, gap_x + gap_width);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_shadow_gap (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
+	}
+}
 }
diff --git a/org/eclipse/swt/internal/theme/ProgressBarDrawData.java b/org/eclipse/swt/internal/theme/ProgressBarDrawData.java
index 04d3ea9..0bac7c1 100644
--- a/org/eclipse/swt/internal/theme/ProgressBarDrawData.java
+++ b/org/eclipse/swt/internal/theme/ProgressBarDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -28,18 +28,18 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	theme.transferClipping(gc, gtkStyle);
 	byte[] detail = Converter.wcsToMbcs(null, "trough", true);
 	int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height;
-	OS.gtk_paint_box(gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_IN, null, progressHandle, detail, x, y, width, height);
+	gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_IN, null, progressHandle, detail, x, y, width, height);
 	int xthichness = OS.gtk_style_get_xthickness(gtkStyle);
 	int ythichness = OS.gtk_style_get_ythickness(gtkStyle);
 	if ((style & SWT.VERTICAL) != 0) {
-		OS.gtk_progress_bar_set_orientation(progressHandle, OS.GTK_PROGRESS_BOTTOM_TO_TOP);
+		gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_BOTTOM_TO_TOP);
 		x += xthichness;
 		width -= xthichness * 2;
 		height -= ythichness * 2;
 		height *= selection / (float)Math.max(1, (maximum - minimum));
 		y += bounds.height - ythichness - height;
 	} else {
-		OS.gtk_progress_bar_set_orientation(progressHandle, OS.GTK_PROGRESS_LEFT_TO_RIGHT);
+		gtk_orientable_set_orientation (progressHandle, OS.GTK_PROGRESS_LEFT_TO_RIGHT);
 		x += xthichness;
 		y += ythichness;
 		width -= xthichness * 2;
@@ -47,7 +47,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		width *= selection / (float)Math.max(1, maximum - minimum);
 	}
 	detail = Converter.wcsToMbcs(null, "bar", true);
-	OS.gtk_paint_box(gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_OUT, null, progressHandle, detail, x, y, width, height);
+	gtk_render_box (gtkStyle, drawable, OS.GTK_STATE_PRELIGHT, OS.GTK_SHADOW_OUT, null, progressHandle, detail, x, y, width, height);
 }
 
 int getStateType(int part) {
@@ -58,4 +58,21 @@ int hit(Theme theme, Point position, Rectangle bounds) {
 	return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
 }
 
+void gtk_orientable_set_orientation (int /*long*/ pbar, int orientation) {
+	if (OS.GTK3) {
+		switch (orientation) {
+			case OS.GTK_PROGRESS_BOTTOM_TO_TOP:
+				OS.gtk_orientable_set_orientation(pbar, OS.GTK_ORIENTATION_VERTICAL);
+				OS.gtk_progress_bar_set_inverted(pbar, true);
+				break;
+			case OS.GTK_PROGRESS_LEFT_TO_RIGHT:
+				OS.gtk_orientable_set_orientation(pbar, OS.GTK_ORIENTATION_HORIZONTAL);
+				OS.gtk_progress_bar_set_inverted(pbar, false);
+				break;
+		}
+	} else {
+		OS.gtk_progress_bar_set_orientation(pbar, orientation);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/internal/theme/TabFolderDrawData.java b/org/eclipse/swt/internal/theme/TabFolderDrawData.java
index a261ec4..d1583bf 100644
--- a/org/eclipse/swt/internal/theme/TabFolderDrawData.java
+++ b/org/eclipse/swt/internal/theme/TabFolderDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class TabFolderDrawData extends DrawData {
@@ -44,7 +45,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		y += tabsHeight;
 	}
 	byte[] detail = Converter.wcsToMbcs(null, "notebook", true);
-	OS.gtk_paint_box_gap(gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width);
+	gtk_render_frame_gap (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side, gap_x, gap_width);
 	if (tabsArea != null) {
 		tabsArea.x = bounds.x;
 		tabsArea.y = bounds.y;
@@ -64,4 +65,15 @@ int hit(Theme theme, Point position, Rectangle bounds) {
 	return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
 }
 
+void gtk_render_frame_gap (int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height, int gap_side, int gap_x, int gap_width) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_frame_gap (context, cairo, context, y, gap_width, height, gap_side, gap_x, gap_x + gap_width);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_box_gap (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/internal/theme/TabItemDrawData.java b/org/eclipse/swt/internal/theme/TabItemDrawData.java
index 00b05e2..9e8436f 100644
--- a/org/eclipse/swt/internal/theme/TabItemDrawData.java
+++ b/org/eclipse/swt/internal/theme/TabItemDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class TabItemDrawData extends DrawData {
@@ -29,14 +30,8 @@ public TabItemDrawData() {
 Rectangle computeTrim(Theme theme, GC gc) {
 	int /*long*/ notebookHandle = theme.notebookHandle;
 	int /*long*/ gtkStyle = OS.gtk_widget_get_style(notebookHandle);
-	int hborder, vborder;
-	if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) {
-		hborder = theme.getWidgetProperty(notebookHandle, "tab-hborder");
-		vborder = theme.getWidgetProperty(notebookHandle, "tab-vborder");
-	} else {
-		hborder = 2;
-		vborder = 2;
-	}
+	int	hborder = theme.getWidgetProperty(notebookHandle, "tab-hborder");
+	int	vborder = theme.getWidgetProperty(notebookHandle, "tab-vborder");
 	int focus_width = theme.getWidgetProperty(notebookHandle, "focus-line-width");
 	int xthickness = OS.gtk_style_get_xthickness(gtkStyle);
 	int ythickness = OS.gtk_style_get_ythickness(gtkStyle);
@@ -67,16 +62,10 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	}
 	int state_type = getStateType(DrawData.WIDGET_WHOLE);
 	byte[] detail = Converter.wcsToMbcs(null, "tab", true);
-	OS.gtk_paint_extension(gtkStyle, drawable, state_type, OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side);
+	gtk_render_extension (gtkStyle, drawable, state_type, OS.GTK_SHADOW_OUT, null, notebookHandle, detail, x, y, width, height, gap_side);
 	if (clientArea != null) {
-		int hborder, vborder;
-		if (OS.GTK_VERSION >= OS.VERSION(2, 4, 0)) {
-			hborder = theme.getWidgetProperty(notebookHandle, "tab-hborder");
-			vborder = theme.getWidgetProperty(notebookHandle, "tab-vborder");
-		} else {
-			hborder = 2;
-			vborder = 2;
-		}
+		int	hborder = theme.getWidgetProperty(notebookHandle, "tab-hborder");
+		int	vborder = theme.getWidgetProperty(notebookHandle, "tab-vborder");
 		int focus_line_width = theme.getWidgetProperty(notebookHandle, "focus-line-width");
 		int xthickness = OS.gtk_style_get_xthickness(gtkStyle);
 		int ythickness = OS.gtk_style_get_ythickness(gtkStyle);
@@ -100,4 +89,14 @@ int hit(Theme theme, Point position, Rectangle bounds) {
 	return bounds.contains(position) ? DrawData.WIDGET_WHOLE : DrawData.WIDGET_NOWHERE;
 }
 
+void gtk_render_extension(int /*long*/ style, int /*long*/ window, int state_type, int shadow_type, GdkRectangle area, int /*long*/ widget, byte[] detail, int x , int y, int width, int height, int gap_side) {
+	if (OS.GTK3) {
+		int /*long*/ cairo = OS.gdk_cairo_create (window);
+		int /*long*/ context = OS.gtk_widget_get_style_context (style);
+		OS.gtk_render_extension(context, cairo, x, y, width, height, gap_side);
+		Cairo.cairo_destroy (cairo);
+	} else {
+		OS.gtk_paint_extension (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
+	}
+}
 }
diff --git a/org/eclipse/swt/internal/theme/Theme.java b/org/eclipse/swt/internal/theme/Theme.java
index 1357fb9..def1137 100644
--- a/org/eclipse/swt/internal/theme/Theme.java
+++ b/org/eclipse/swt/internal/theme/Theme.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -37,7 +37,11 @@ public Theme(Device device) {
 	progressHandle = OS.gtk_progress_bar_new();
 	toolbarHandle = OS.gtk_toolbar_new();
 	treeHandle = OS.gtk_tree_view_new_with_model(0);
-	separatorHandle = OS.gtk_vseparator_new();
+	if (OS.GTK3) {
+		separatorHandle = OS.gtk_separator_new (OS.GTK_ORIENTATION_VERTICAL);
+	} else {
+		separatorHandle = OS.gtk_vseparator_new();
+	}
 	labelHandle = OS.gtk_label_new(null);
 	OS.gtk_container_add (fixedHandle, labelHandle);
 	OS.gtk_container_add (fixedHandle, frameHandle);
@@ -184,35 +188,38 @@ void transferClipping(GC gc, int /*long*/ style) {
 	if (damageRgn != 0) {
 		if (clipping != 0) {
 			clipping = OS.gdk_region_new();
-			OS.gdk_region_union(clipping, clipRgn);
-			OS.gdk_region_intersect(clipping, damageRgn);
+			OS.gdk_region_union (clipping, clipRgn);
+			OS.gdk_region_intersect (clipping, damageRgn);
 		} else {
 			clipping = damageRgn;
 		}
 	}
-	int /*long*/ [] curGC = new int /*long*/ [1];
-	for (int i = 0; i < 5; i++) {
-		OS.gtk_style_get_fg_gc (style, i, curGC);
-		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_bg_gc (style, i, curGC);
-		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_light_gc (style, i, curGC);
-		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_dark_gc (style, i, curGC);
-		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_mid_gc (style, i, curGC);
-		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_text_gc (style, i, curGC);
+	//TODO implement for GTK3
+	if (!OS.GTK3) {
+		int /*long*/ [] curGC = new int /*long*/ [1];
+		for (int i = 0; i < 5; i++) {
+			OS.gtk_style_get_fg_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_bg_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_light_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_dark_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_mid_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_text_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+			OS.gtk_style_get_text_aa_gc (style, i, curGC);
+			if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
+		}
+		OS.gtk_style_get_black_gc (style, curGC);
 		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-		OS.gtk_style_get_text_aa_gc (style, i, curGC);
+		OS.gtk_style_get_white_gc (style, curGC);
 		if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
 	}
-	OS.gtk_style_get_black_gc (style, curGC);
-	if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
-	OS.gtk_style_get_white_gc (style, curGC);
-	if (curGC[0] != 0) OS.gdk_gc_set_clip_region (curGC[0], clipping);
 	if (clipping != clipRgn && clipping != damageRgn) {
-		OS.gdk_region_destroy(clipping);
+			OS.gdk_region_destroy (clipping);
 	}
 }
 }
diff --git a/org/eclipse/swt/internal/theme/ToolBarDrawData.java b/org/eclipse/swt/internal/theme/ToolBarDrawData.java
index 4c99b12..f221dec 100644
--- a/org/eclipse/swt/internal/theme/ToolBarDrawData.java
+++ b/org/eclipse/swt/internal/theme/ToolBarDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	theme.transferClipping(gc, gtkStyle);
 	int x = bounds.x, y = bounds.y, width = bounds.width, height = bounds.height;
 	byte[] detail = Converter.wcsToMbcs(null, "toolbar", true);
-	OS.gtk_paint_box(gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_NONE, null, toolbarHandle, detail, x, y, width, height);
+	gtk_render_box (gtkStyle, drawable, getStateType(DrawData.WIDGET_WHOLE), OS.GTK_SHADOW_NONE, null, toolbarHandle, detail, x, y, width, height);
 	if (clientArea != null) {
 		clientArea.x = bounds.x;
 		clientArea.y = bounds.y;
diff --git a/org/eclipse/swt/internal/theme/ToolItemDrawData.java b/org/eclipse/swt/internal/theme/ToolItemDrawData.java
index 67cc405..95625d7 100644
--- a/org/eclipse/swt/internal/theme/ToolItemDrawData.java
+++ b/org/eclipse/swt/internal/theme/ToolItemDrawData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.internal.theme;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 
 public class ToolItemDrawData extends DrawData {
@@ -56,9 +57,23 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		int /*long*/ gtkStyle = OS.gtk_widget_get_style (separatorHandle);
 		theme.transferClipping(gc, gtkStyle);
 		if ((parent.style & SWT.VERTICAL) != 0) {
-			OS.gtk_paint_hline(gtkStyle, drawable, state_type, null, separatorHandle, detail, bounds.x, bounds.x + bounds.width, bounds.y + bounds.height / 2);
+			if (OS.GTK3) {
+				int /*long*/ cairo = OS.gdk_cairo_create (drawable);
+				int /*long*/ context = OS.gtk_widget_get_style_context (separatorHandle);
+				OS.gtk_render_line (context, cairo, bounds.x, bounds.y + bounds.height / 2, bounds.x + bounds.width, bounds.y + bounds.height / 2);
+				Cairo.cairo_destroy(cairo);
+			} else {
+				OS.gtk_paint_hline(gtkStyle, drawable, state_type, null, separatorHandle, detail, bounds.x, bounds.x + bounds.width, bounds.y + bounds.height / 2);
+			}	
 		} else {
-			OS.gtk_paint_vline(gtkStyle, drawable, state_type, null, separatorHandle, detail, bounds.y, bounds.y + bounds.height, bounds.x + bounds.width / 2);
+			if (OS.GTK3) {
+				int /*long*/ cairo = OS.gdk_cairo_create (drawable);
+				int /*long*/ context = OS.gtk_widget_get_style_context (separatorHandle);
+				OS.gtk_render_line (context, cairo, bounds.x + bounds.width / 2, bounds.y, bounds.x + bounds.width / 2, bounds.y + bounds.height);
+				Cairo.cairo_destroy (cairo);
+			} else {
+				OS.gtk_paint_vline(gtkStyle, drawable, state_type, null, separatorHandle, detail, bounds.y, bounds.y + bounds.height, bounds.x + bounds.width / 2);
+			}
 		}
 		return;
 	}
@@ -91,7 +106,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 	int state_type = getStateType(DrawData.WIDGET_WHOLE);
 		
 	if (relief[0] != OS.GTK_RELIEF_NONE || ((state & (DrawData.PRESSED | DrawData.HOT | DrawData.SELECTED)) != 0)) {
-		OS.gtk_paint_box(gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, x, y, width, height);
+		gtk_render_box(gtkStyle, drawable, state_type, shadow_type, null, buttonHandle, detail, x, y, width, height);
 	}
 
 	if (clientArea != null) {
@@ -110,7 +125,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
 		if (interior_focus == 0) arrow_x -= focus_line_width;
 		int arrow_y = y + (height - arrow_height) / 2;
 		byte[] arrow_detail = Converter.wcsToMbcs(null, "arrow", true);
-		OS.gtk_paint_arrow(gtkStyle, drawable, state_type, OS.GTK_SHADOW_NONE, null, theme.arrowHandle, arrow_detail, OS.GTK_ARROW_DOWN, true, arrow_x, arrow_y, arrow_width, arrow_height);
+		gtk_render_arrow (gtkStyle, drawable, state_type, OS.GTK_SHADOW_NONE, null, theme.arrowHandle, arrow_detail, OS.GTK_ARROW_DOWN, true, arrow_x, arrow_y, arrow_width, arrow_height);
 		if (clientArea != null) {
 			clientArea.width -= bounds.x + bounds.width - arrow_x;
 		}
@@ -119,10 +134,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
     if ((state & DrawData.FOCUSED) != 0) {
     	int child_displacement_y = theme.getWidgetProperty(buttonHandle, "child-displacement-y");
     	int child_displacement_x = theme.getWidgetProperty(buttonHandle, "child-displacement-x");
-    	int displace_focus = 0;
-    	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-    		displace_focus = theme.getWidgetProperty(buttonHandle, "displace-focus");
-    	}
+    	int displace_focus = theme.getWidgetProperty(buttonHandle, "displace-focus");
     	
     	if (interior_focus != 0) {
     		int ythickness = OS.gtk_style_get_ythickness(gtkStyle);
@@ -142,7 +154,7 @@ void draw(Theme theme, GC gc, Rectangle bounds) {
               y += child_displacement_y;
     	}
     	
-        OS.gtk_paint_focus(gtkStyle, drawable, state_type, null, buttonHandle, detail, x, y, width, height);
+    	gtk_render_focus (gtkStyle, drawable, state_type, null, buttonHandle, detail, x, y, width, height);
     }
 }
 
diff --git a/org/eclipse/swt/internal/webkit/JSClassDefinition.java b/org/eclipse/swt/internal/webkit/JSClassDefinition.java
index 8c75e69..10d7607 100644
--- a/org/eclipse/swt/internal/webkit/JSClassDefinition.java
+++ b/org/eclipse/swt/internal/webkit/JSClassDefinition.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2010, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
diff --git a/org/eclipse/swt/layout/FillLayout.java b/org/eclipse/swt/layout/FillLayout.java
index b235472..4646e21 100644
--- a/org/eclipse/swt/layout/FillLayout.java
+++ b/org/eclipse/swt/layout/FillLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/layout/GridData.java b/org/eclipse/swt/layout/GridData.java
index 690e58c..7863534 100644
--- a/org/eclipse/swt/layout/GridData.java
+++ b/org/eclipse/swt/layout/GridData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/layout/GridLayout.java b/org/eclipse/swt/layout/GridLayout.java
index af3b97c..f2a331b 100644
--- a/org/eclipse/swt/layout/GridLayout.java
+++ b/org/eclipse/swt/layout/GridLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/layout/RowData.java b/org/eclipse/swt/layout/RowData.java
index c0a9e03..2a2aec2 100644
--- a/org/eclipse/swt/layout/RowData.java
+++ b/org/eclipse/swt/layout/RowData.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/layout/RowLayout.java b/org/eclipse/swt/layout/RowLayout.java
index 2d8b574..2998834 100644
--- a/org/eclipse/swt/layout/RowLayout.java
+++ b/org/eclipse/swt/layout/RowLayout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -182,7 +182,7 @@ public final class RowLayout extends Layout {
 	public int marginBottom = 3;
 
 /**
- * Constructs a new instance of this class.
+ * Constructs a new instance of this class with type HORIZONTAL.
  */
 public RowLayout () {
 }
diff --git a/org/eclipse/swt/opengl/GLCanvas.java b/org/eclipse/swt/opengl/GLCanvas.java
index af4b7a6..b080394 100644
--- a/org/eclipse/swt/opengl/GLCanvas.java
+++ b/org/eclipse/swt/opengl/GLCanvas.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -104,7 +104,12 @@ public GLCanvas (Composite parent, int style, GLData data) {
 	}
 	glxAttrib [pos++] = 0;
 	OS.gtk_widget_realize (handle);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
+	int /*long*/ window;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+		window = OS.gtk_widget_get_window (handle);
+	} else {
+		window = OS.GTK_WIDGET_WINDOW (handle);
+	}
 	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
 	int /*long*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib);
 	if (infoPtr == 0) {
@@ -133,7 +138,11 @@ public GLCanvas (Composite parent, int style, GLData data) {
 	glWindow = OS.gdk_window_new (window, attrs, OS.GDK_WA_VISUAL);
 	OS.gdk_window_set_user_data (glWindow, handle);
 	if ((style & SWT.NO_BACKGROUND) != 0) OS.gdk_window_set_back_pixmap (window, 0, false);
-	xWindow = OS.gdk_x11_drawable_get_xid (glWindow);
+	if (OS.GTK3) {
+		xWindow = OS.gdk_x11_window_get_xid (glWindow);
+	} else {
+		xWindow = OS.gdk_x11_drawable_get_xid (glWindow);
+	}
 	OS.gdk_window_show (glWindow);
 
 	Listener listener = new Listener () {
@@ -156,8 +165,13 @@ public GLCanvas (Composite parent, int style, GLData data) {
 				OS.gdk_window_resize (glWindow, clientArea.width, clientArea.height);
 				break;
 			case SWT.Dispose:
-				int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-				int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+				int /*long*/ window;
+				if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+					window = OS.gtk_widget_get_window (handle);
+				} else {
+					window = OS.GTK_WIDGET_WINDOW (handle);
+				}
+				int /*long*/ xDisplay = gdk_x11_display_get_xdisplay (window);
 				if (context != 0) {
 					if (GLX.glXGetCurrentContext () == context) {
 						GLX.glXMakeCurrent (xDisplay, 0, 0);
@@ -189,8 +203,13 @@ public GLCanvas (Composite parent, int style, GLData data) {
  */
 public GLData getGLData () {
 	checkWidget ();
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+	int /*long*/ window;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+		window = OS.gtk_widget_get_window (handle);
+	} else {
+		window = OS.GTK_WIDGET_WINDOW (handle);
+	}
+	int /*long*/ xDisplay = gdk_x11_display_get_xdisplay (window);
 	GLData data = new GLData ();
 	int [] value = new int [1];
 	GLX.glXGetConfig (xDisplay, vinfo, GLX.GLX_DOUBLEBUFFER, value);
@@ -253,7 +272,7 @@ public void setCurrent () {
 	checkWidget ();
 	if (GLX.glXGetCurrentContext () == context) return;
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+	int /*long*/ xDisplay = gdk_x11_display_get_xdisplay (window);
 	GLX.glXMakeCurrent (xDisplay, xWindow, context);
 }
 
@@ -268,7 +287,17 @@ public void setCurrent () {
 public void swapBuffers () {
 	checkWidget ();
 	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-	int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+	int /*long*/ xDisplay = gdk_x11_display_get_xdisplay (window);
 	GLX.glXSwapBuffers (xDisplay, xWindow);
 }
+
+private int /*long*/ gdk_x11_display_get_xdisplay(int /*long*/ window) {
+	int /*long*/ xdisplay;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+		xdisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window));
+	} else {
+		xdisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+	}
+	return xdisplay;
+}
 }
diff --git a/org/eclipse/swt/printing/PrintDialog.java b/org/eclipse/swt/printing/PrintDialog.java
index a317822..e62868c 100644
--- a/org/eclipse/swt/printing/PrintDialog.java
+++ b/org/eclipse/swt/printing/PrintDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/printing/Printer.java b/org/eclipse/swt/printing/Printer.java
index d1b17cf..116209c 100644
--- a/org/eclipse/swt/printing/Printer.java
+++ b/org/eclipse/swt/printing/Printer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,7 +59,6 @@ public final class Printer extends Device {
 	 * whether or not a GC was created for this printer
 	 */
 	boolean isGCCreated = false;
-	Font systemFont;
 
 	static byte [] settingsData;
 	static int start, end;
@@ -70,8 +69,10 @@ public final class Printer extends Device {
 	static boolean disablePrinting = System.getProperty("org.eclipse.swt.internal.gtk.disablePrinting") != null; //$NON-NLS-1$
 	
 static void gtk_init() {
-	if (!OS.g_thread_supported ()) {
-		OS.g_thread_init (0);
+	if (OS.GLIB_VERSION < OS.VERSION(2, 32, 0)) {
+		if (!OS.g_thread_supported()) {
+			OS.g_thread_init(0);
+		}
 	}
 	if (OS.GTK_VERSION < OS.VERSION(2, 24, 0)) {
 	    OS.gtk_set_locale();
@@ -386,38 +387,6 @@ static byte [] restoreBytes(String key, boolean nullTerminate) {
 	return valueBuffer;
 }
 
-/**
- * Returns a reasonable font for applications to use.
- * On some platforms, this will match the "default font"
- * or "system font" if such can be found.  This font
- * should not be free'd because it was allocated by the
- * system, not the application.
- * <p>
- * Typically, applications which want the default look
- * should simply not set the font on the widgets they
- * create. Widgets are always created with the correct
- * default font for the class of user-interface component
- * they represent.
- * </p>
- *
- * @return a font
- *
- * @exception SWTException <ul>
- *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
- * </ul>
- */
-public Font getSystemFont () {
-	checkDevice ();
-	if (systemFont != null) return systemFont;
-	int /*long*/ style = OS.gtk_widget_get_default_style();	
-	int /*long*/ defaultFont = OS.pango_font_description_copy (OS.gtk_style_get_font_desc (style));
-	int size = OS.pango_font_description_get_size(defaultFont);
-	Point dpi = getDPI(), screenDPI = super.getDPI();
-	OS.pango_font_description_set_size(defaultFont, size * dpi.y / screenDPI.y);
-	return systemFont = Font.gtk_new (this, defaultFont);
-}
-
 /**	 
  * Invokes platform specific functionality to allocate a new GC handle.
  * <p>
@@ -506,10 +475,6 @@ public void internal_dispose_GC(int /*long*/ hDC, GCData data) {
  */
 protected void release () {
 	super.release();
-	
-	/* Dispose the default font */
-	if (systemFont != null) systemFont.dispose ();
-	systemFont = null;
 }
 
 /**
diff --git a/org/eclipse/swt/program/Program.java b/org/eclipse/swt/program/Program.java
index 82f46fd..5f7bd80 100644
--- a/org/eclipse/swt/program/Program.java
+++ b/org/eclipse/swt/program/Program.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -31,7 +31,7 @@ import java.util.*;
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public final class Program {
-	String name;
+	String name = ""; //$NON-NLS-1$
 	String command;
 	String iconPath;
 	Display display;
@@ -55,9 +55,8 @@ public final class Program {
 	static final String PREFIX_HTTPS = "https://"; //$NON-NLS-1$
 	static final int DESKTOP_UNKNOWN = 0;
 	static final int DESKTOP_GNOME = 1;
-	static final int DESKTOP_GNOME_24 = 2;
-	static final int DESKTOP_GIO = 3;
-	static final int DESKTOP_CDE = 4;
+	static final int DESKTOP_GIO = 2;
+	static final int DESKTOP_CDE = 3;
 	static final int PREFERRED_ICON_SIZE = 16;
 	
 /**
@@ -122,7 +121,7 @@ static int getDesktop(final Display display) {
 				OS.dlclose(libgio);
 			}
 			
-			if (desktop == DESKTOP_UNKNOWN && (OS.GTK_VERSION >= OS.VERSION (2, 2, 0)) && gnome_init()) {
+			if (desktop == DESKTOP_UNKNOWN && gnome_init()) {
 				desktop = DESKTOP_GNOME;
 				int /*long*/ icon_theme = GNOME.gnome_icon_theme_new();
 				display.setData(ICON_THEME_DATA, new LONG(icon_theme));
@@ -138,17 +137,6 @@ static int getDesktop(final Display display) {
 						if (gnomeIconTheme.value != 0) OS.g_object_unref(gnomeIconTheme.value);
 					}
 				});
-				/* Check for libgnomevfs-2 version 2.4 */
-				buffer = Converter.wcsToMbcs(null, "libgnomevfs-2.so.0", true);
-				int /*long*/ libgnomevfs = OS.dlopen(buffer, OS.RTLD_LAZY);
-				if (libgnomevfs != 0) {
-					buffer = Converter.wcsToMbcs(null, "gnome_vfs_url_show", true);
-					int /*long*/ gnome_vfs_url_show = OS.dlsym(libgnomevfs, buffer);
-					if (gnome_vfs_url_show != 0) {
-						desktop = DESKTOP_GNOME_24;
-					}
-					OS.dlclose(libgnomevfs);
-				}
 			}
 		}
 	}
@@ -289,10 +277,13 @@ static String cde_getMimeType(String extension) {
 }
 
 static Program cde_getProgram(Display display, String mimeType) {
+	String command = cde_getAction(mimeType);
+	if (command == null) return null;
+
 	Program program = new Program();
 	program.display = display;
 	program.name = mimeType;
-	program.command = cde_getAction(mimeType);
+	program.command = command;
 	program.iconPath = cde_getAttribute(program.name, CDE.DtDTS_DA_ICON);
 	return program;
 }
@@ -376,80 +367,31 @@ static String[] parseCommand(String cmd) {
 /**
  * GNOME 2.4 - Execute the program for the given file. 
  */
-boolean gnome_24_execute(String fileName) {
+boolean gnome_execute(String fileName) {
 	byte[] mimeTypeBuffer = Converter.wcsToMbcs(null, name, true);
 	int /*long*/ ptr = GNOME.gnome_vfs_mime_get_default_application(mimeTypeBuffer);
 	byte[] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
 	int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input_with_dirs(fileNameBuffer, GNOME.GNOME_VFS_MAKE_URI_DIR_CURRENT);
-	int /*long*/ list = GNOME.g_list_append(0, uri);
+	int /*long*/ list = OS.g_list_append(0, uri);
 	int result = GNOME.gnome_vfs_mime_application_launch(ptr, list);
 	GNOME.gnome_vfs_mime_application_free(ptr);
-	GNOME.g_free(uri);
-	GNOME.g_list_free(list);
+	OS.g_free(uri);
+	OS.g_list_free(list);
 	return result == GNOME.GNOME_VFS_OK;
 }
 
 /**
  * GNOME 2.4 - Launch the default program for the given file. 
  */
-static boolean gnome_24_launch(String fileName) {
+static boolean gnome_launch(String fileName) {
 	byte[] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
 	int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input_with_dirs(fileNameBuffer, GNOME.GNOME_VFS_MAKE_URI_DIR_CURRENT);
 	int result = GNOME.gnome_vfs_url_show(uri);
-	GNOME.g_free(uri);
+	OS.g_free(uri);
 	return (result == GNOME.GNOME_VFS_OK);
 }
 
 /**
- * GNOME 2.2 - Execute the program for the given file. 
- */
-boolean gnome_execute(String fileName) {
-	if (gnomeExpectUri) {
-		/* Convert the given path into a URL */
-		byte[] fileNameBuffer = Converter.wcsToMbcs(null, fileName, true);
-		int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input(fileNameBuffer);
-		if (uri != 0) {
-			int length = OS.strlen(uri);
-			if (length > 0) {
-				byte[] buffer = new byte[length];
-				OS.memmove(buffer, uri, length);
-				fileName = new String(Converter.mbcsToWcs(null, buffer));
-			}
-			GNOME.g_free(uri);
-		}
-	}
-
-	/* Parse the command into its individual arguments. */
-	String[] args = parseCommand(command);
-	int fileArg = -1;
-	int index;
-	for (index = 0; index < args.length; index++) {
-		int j = args[index].indexOf("%f");
-		if (j != -1) {
-			String value = args[index];
-			fileArg = index;
-			args[index] = value.substring(0, j) + fileName + value.substring(j + 2);
-		}
-	}
-
-	/* If a file name was given but the command did not have "%f" */
-	if ((fileName.length() > 0) && (fileArg < 0)) {
-		String[] newArgs = new String[args.length + 1];
-		for (index = 0; index < args.length; index++) newArgs[index] = args[index];
-		newArgs[args.length] = fileName;
-		args = newArgs;
-	}
-
-	/* Execute the command. */
-	try {
-		Compatibility.exec(args);
-	} catch (IOException e) {
-		return false;
-	}
-	return true;
-}
-
-/**
  * GNOME - Get Image Data
  * 
  */ 
@@ -461,50 +403,6 @@ ImageData gnome_getImageData() {
 	return null;
 }
 
-/**
- * GNOME - Get mime types
- * 
- * Obtain the registered mime type information and
- * return it in a map. The key of each entry
- * in the map is the mime type name. The value is
- * a vector of the associated file extensions.
- */
-static Hashtable gnome_getMimeInfo() {
-	Hashtable mimeInfo = new Hashtable();
-	int /*long*/[] mimeData = new int /*long*/[1];
-	int /*long*/[] extensionData = new int /*long*/[1];
-	int /*long*/ mimeList = GNOME.gnome_vfs_get_registered_mime_types();
-	int /*long*/ mimeElement = mimeList;
-	while (mimeElement != 0) {
-		OS.memmove (mimeData, mimeElement, OS.PTR_SIZEOF);
-		int /*long*/ mimePtr = mimeData[0];
-		int mimeLength = OS.strlen(mimePtr);
-		byte[] mimeTypeBuffer = new byte[mimeLength];
-		OS.memmove(mimeTypeBuffer, mimePtr, mimeLength);
-		String mimeType = new String(Converter.mbcsToWcs(null, mimeTypeBuffer));
-		int /*long*/ extensionList = GNOME.gnome_vfs_mime_get_extensions_list(mimePtr);
-		if (extensionList != 0) {
-			Vector extensions = new Vector();
-			int /*long*/ extensionElement = extensionList;
-			while (extensionElement != 0) {
-				OS.memmove(extensionData, extensionElement, OS.PTR_SIZEOF);
-				int /*long*/ extensionPtr = extensionData[0];
-				int extensionLength = OS.strlen(extensionPtr);
-				byte[] extensionBuffer = new byte[extensionLength];
-				OS.memmove(extensionBuffer, extensionPtr, extensionLength);
-				String extension = new String(Converter.mbcsToWcs(null, extensionBuffer));
-				extension = '.' + extension;
-				extensions.addElement(extension);
-				extensionElement = GNOME.g_list_next(extensionElement); 
-			}
-			GNOME.gnome_vfs_mime_extensions_list_free(extensionList);
-			if (extensions.size() > 0) mimeInfo.put(mimeType, extensions);
-		}
-		mimeElement = GNOME.g_list_next(mimeElement);
-	}
-	if (mimeList != 0) GNOME.gnome_vfs_mime_registered_mime_type_list_free(mimeList);
-	return mimeInfo;
-}
 
 static String gnome_getMimeType(String extension) {
 	String mimeType = null;
@@ -532,14 +430,18 @@ static Program gnome_getProgram(Display display, String mimeType) {
 		program.name = mimeType;
 		GnomeVFSMimeApplication application = new GnomeVFSMimeApplication();
 		GNOME.memmove(application, ptr, GnomeVFSMimeApplication.sizeof);
-		int length = OS.strlen(application.command);
-		byte[] buffer = new byte[length];
-		OS.memmove(buffer, application.command, length);		
-		program.command = new String(Converter.mbcsToWcs(null, buffer));
+		if (application.command != 0) {
+			int length = OS.strlen(application.command);
+			if (length > 0) {
+				byte[] buffer = new byte[length];
+				OS.memmove(buffer, application.command, length);		
+				program.command = new String(Converter.mbcsToWcs(null, buffer));
+			}
+		}
 		program.gnomeExpectUri = application.expects_uris == GNOME.GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS;
 		
-		length = OS.strlen(application.id);
-		buffer = new byte[length + 1];
+		int length = OS.strlen(application.id);
+		byte[] buffer = new byte[length + 1];
 		OS.memmove(buffer, application.id, length);
 		LONG gnomeIconTheme = (LONG)display.getData(ICON_THEME_DATA);
 		int /*long*/ icon_name = GNOME.gnome_icon_lookup(gnomeIconTheme.value, 0, null, buffer, 0, mimeTypeBuffer, 
@@ -553,12 +455,13 @@ static Program gnome_getProgram(Display display, String mimeType) {
 				OS.memmove(buffer, path, length);
 				program.iconPath = new String(Converter.mbcsToWcs(null, buffer));
 			}
-			GNOME.g_free(path);
+			OS.g_free(path);
 		}
-		if (icon_name != 0) GNOME.g_free(icon_name);
+		if (icon_name != 0) OS.g_free(icon_name);
 		GNOME.gnome_vfs_mime_application_free(ptr);
 	}
-	return program;
+	
+	return program != null && program.command != null ? program : null;
 }
 
 static boolean gnome_init() {
@@ -577,7 +480,7 @@ static boolean gnome_isExecutable(String fileName) {
 	/* check if the mime type is executable */
 	int /*long*/ uri = GNOME.gnome_vfs_make_uri_from_input(fileNameBuffer);
 	int /*long*/ mimeType = GNOME.gnome_vfs_get_mime_type(uri);
-	GNOME.g_free(uri);
+	OS.g_free(uri);
 	
 	byte[] exeType = Converter.wcsToMbcs (null, "application/x-executable", true); //$NON-NLS-1$
 	boolean result = GNOME.gnome_vfs_mime_type_get_equivalence(mimeType, exeType) != GNOME.GNOME_VFS_MIME_UNRELATED;
@@ -617,7 +520,6 @@ static Program findProgram(Display display, String extension) {
 	String mimeType = null;
 	switch (desktop) {
 		case DESKTOP_GIO: mimeType = gio_getMimeType(extension); break;
-		case DESKTOP_GNOME_24:
 		case DESKTOP_GNOME: mimeType = gnome_getMimeType(extension); break;
 		case DESKTOP_CDE: mimeType = cde_getMimeType(extension); break;
 	}
@@ -625,7 +527,6 @@ static Program findProgram(Display display, String extension) {
 	Program program = null;
 	switch (desktop) {
 		case DESKTOP_GIO: program = gio_getProgram(display, mimeType); break;
-		case DESKTOP_GNOME_24: 
 		case DESKTOP_GNOME: program = gnome_getProgram(display, mimeType); break;
 		case DESKTOP_CDE: program = cde_getProgram(display, mimeType); break;
 	}
@@ -652,8 +553,7 @@ static String[] getExtensions(Display display) {
 	Hashtable mimeInfo = null;
 	switch (desktop) {
 		case DESKTOP_GIO: return gio_getExtensions();
-		case DESKTOP_GNOME_24: break;
-		case DESKTOP_GNOME: mimeInfo = gnome_getMimeInfo(); break;
+		case DESKTOP_GNOME: break;
 		case DESKTOP_CDE: mimeInfo = cde_getDataTypeInfo(); break;
 	}
 	if (mimeInfo == null) return new String[0];
@@ -699,8 +599,7 @@ static Program[] getPrograms(Display display) {
 	Hashtable mimeInfo = null;
 	switch (desktop) {
 		case DESKTOP_GIO: return gio_getPrograms(display);
-		case DESKTOP_GNOME_24: break;
-		case DESKTOP_GNOME: mimeInfo = gnome_getMimeInfo(); break;
+		case DESKTOP_GNOME: break;
 		case DESKTOP_CDE: mimeInfo = cde_getDataTypeInfo(); break;
 	}
 	if (mimeInfo == null) return new Program[0];
@@ -710,7 +609,6 @@ static Program[] getPrograms(Display display) {
 		String mimeType = (String)keys.nextElement();
 		Program program = null;
 		switch (desktop) {
-			case DESKTOP_GNOME: program = gnome_getProgram(display, mimeType); break;
 			case DESKTOP_CDE: program = cde_getProgram(display, mimeType); break;
 		}
 		if (program != null) programs.addElement(program);
@@ -792,13 +690,13 @@ static Hashtable gio_getMimeInfo() {
 				mimeTable = new Hashtable();
 				modTime = modTimestamp[0];
 				int /*long*/ reader = OS.g_data_input_stream_new (fileInputStream);
-				int[] length = new int[1];
+				int /*long*/ [] length = new int /*long*/ [1];
 				
 				if (reader != 0) {
 					int /*long*/ linePtr = OS.g_data_input_stream_read_line (reader, length, 0, 0);
 					while (linePtr != 0) {
-						byte[] lineBytes = new byte[length[0]];
-						OS.memmove(lineBytes, linePtr, length[0]);
+						byte[] lineBytes = new byte[(int) length[0]];
+						OS.memmove(lineBytes, linePtr, (int) length[0]);
 						String line = new String (Converter.mbcsToWcs (null, lineBytes));
 			
 						int separatorIndex = line.indexOf (':');
@@ -895,7 +793,7 @@ static Program gio_getProgram (Display display, int /*long*/ application) {
 		}
 		OS.g_object_unref(icon);
 	}
-	return program;
+	return program.command != null ? program : null;
 }
 
 static Program[] gio_getPrograms(Display display) {
@@ -1018,7 +916,6 @@ static String[] gio_getExtensions() {
 static boolean isExecutable(Display display, String fileName) {
 	switch(getDesktop(display)) {
 		case DESKTOP_GIO: return gio_isExecutable(fileName);
-		case DESKTOP_GNOME_24:
 		case DESKTOP_GNOME: return gnome_isExecutable(fileName);
 		case DESKTOP_CDE: return false; //cde_isExecutable()
 	}
@@ -1082,8 +979,8 @@ static boolean launch (Display display, String fileName, String workingDir) {
 	switch (getDesktop (display)) {
 		case DESKTOP_GIO:
 			if (gio_launch (fileName)) return true;
-		case DESKTOP_GNOME_24:
-			if (gnome_24_launch (fileName)) return true;
+		case DESKTOP_GNOME:
+			if (gnome_launch (fileName)) return true;
 		default:
 			int index = fileName.lastIndexOf ('.');
 			if (index != -1) {
@@ -1145,7 +1042,6 @@ public boolean execute(String fileName) {
 	int desktop = getDesktop(display);
 	switch (desktop) {
 		case DESKTOP_GIO: return gio_execute(fileName);
-		case DESKTOP_GNOME_24: return gnome_24_execute(fileName);
 		case DESKTOP_GNOME: return gnome_execute(fileName);
 		case DESKTOP_CDE: return cde_execute(fileName);
 	}
@@ -1162,7 +1058,6 @@ public boolean execute(String fileName) {
 public ImageData getImageData() {
 	switch (getDesktop(display)) {
 		case DESKTOP_GIO: return gio_getImageData();
-		case DESKTOP_GNOME_24:
 		case DESKTOP_GNOME: return gnome_getImageData();
 		case DESKTOP_CDE: return cde_getImageData();
 	}
diff --git a/org/eclipse/swt/widgets/Button.java b/org/eclipse/swt/widgets/Button.java
index 77d5d6b..94fade5 100644
--- a/org/eclipse/swt/widgets/Button.java
+++ b/org/eclipse/swt/widgets/Button.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -184,7 +184,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 		OS.gtk_widget_set_size_request (boxHandle, -1, -1);
 	}
 	Point size;
-	boolean wrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && (OS.GTK_WIDGET_FLAGS (labelHandle) & OS.GTK_VISIBLE) != 0;
+	boolean wrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && gtk_widget_get_visible (labelHandle);
 	if (wrap) {
 		int borderWidth = OS.gtk_container_get_border_width (handle);
 		int[] focusWidth = new int[1];
@@ -201,22 +201,22 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 			indicatorHeight = indicatorSize [0] + 2 * indicatorSpacing [0];
 			trimWidth += indicatorHeight + indicatorSpacing [0];
 		} else {
-			int /*long*/ style = OS.gtk_widget_get_style (handle);
-			trimWidth += OS.gtk_style_get_xthickness (style) * 2;
-			trimHeight += OS.gtk_style_get_ythickness (style) * 2;
+			Point thickness = getThickness (handle);
+			trimWidth += thickness.x * 2;
+			trimHeight += thickness.y * 2;
 			GtkBorder innerBorder = getBorder (OS.inner_border, handle, INNER_BORDER);
 			trimWidth += innerBorder.left + innerBorder.right;
 			trimHeight += innerBorder.top + innerBorder.bottom;
-			if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_CAN_DEFAULT) != 0) {
+			if (gtk_widget_get_can_default (handle)) {
 				GtkBorder defaultBorder = getBorder (OS.default_border, handle, DEFAULT_BORDER);
 				trimWidth += defaultBorder.left + defaultBorder.right;
 				trimHeight += defaultBorder.top + defaultBorder.bottom;
 			}
 		}
 		int imageWidth = 0, imageHeight = 0;
-		if (OS.GTK_WIDGET_VISIBLE (imageHandle)) {
+		if (gtk_widget_get_visible (imageHandle)) {
 			GtkRequisition requisition = new GtkRequisition ();
-			OS.gtk_widget_size_request (imageHandle, requisition);
+			gtk_widget_get_preferred_size (imageHandle, requisition);
 			imageWidth = requisition.width;
 			imageHeight = requisition.height;
 			int [] spacing = new int [1];
@@ -231,11 +231,11 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 			OS.pango_layout_set_width (labelLayout, -1);
 		}
 		int [] w = new int [1], h = new int [1];
-		OS.pango_layout_get_size (labelLayout, w, h);
+		OS.pango_layout_get_pixel_size (labelLayout, w, h);
 		OS.pango_layout_set_width (labelLayout, pangoWidth);
 		size = new Point(0, 0);
-		size.x += wHint == SWT.DEFAULT ? OS.PANGO_PIXELS(w [0]) + imageWidth + trimWidth : wHint;
-		size.y += hHint == SWT.DEFAULT ? Math.max(Math.max(imageHeight, indicatorHeight), OS.PANGO_PIXELS(h [0])) + trimHeight : hHint;
+		size.x += wHint == SWT.DEFAULT ? w [0] + imageWidth + trimWidth : wHint;
+		size.y += hHint == SWT.DEFAULT ? Math.max(Math.max(imageHeight, indicatorHeight), h [0]) + trimHeight : hHint;
 	} else {
 		size = computeNativeSize (handle, wHint, hHint, changed);
 	}
@@ -243,7 +243,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 		OS.gtk_widget_set_size_request (boxHandle, reqWidth [0], reqHeight [0]);
 	}
 	if (wHint != SWT.DEFAULT || hHint != SWT.DEFAULT) {
-		if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_CAN_DEFAULT) != 0) {
+		if (gtk_widget_get_can_default (handle)) {
 			GtkBorder border = getBorder (OS.default_border, handle, DEFAULT_BORDER);
 			if (wHint != SWT.DEFAULT) size.x += border.left + border.right;
 			if (hHint != SWT.DEFAULT) size.y += border.top + border.bottom;
@@ -258,7 +258,7 @@ void createHandle (int index) {
 	int bits = SWT.ARROW | SWT.TOGGLE | SWT.CHECK | SWT.RADIO | SWT.PUSH;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	switch (style & bits) {
 		case SWT.ARROW:
 			int arrow_type = OS.GTK_ARROW_UP;
@@ -294,7 +294,7 @@ void createHandle (int index) {
 			groupHandle = OS.gtk_radio_button_new (0);
 			if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
 			OS.g_object_ref (groupHandle);
-			OS.gtk_object_sink (groupHandle);
+			g_object_ref_sink (groupHandle);
 			handle = OS.gtk_radio_button_new (OS.gtk_radio_button_get_group (groupHandle));
 			if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 			break;
@@ -302,13 +302,13 @@ void createHandle (int index) {
 		default:
 			handle = OS.gtk_button_new ();
 			if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-			OS.GTK_WIDGET_SET_FLAGS(handle, OS.GTK_CAN_DEFAULT);
+			gtk_widget_set_can_default (handle, true);
 			break;
 	}
 	if ((style & SWT.ARROW) != 0) {
 		OS.gtk_container_add (handle, arrowHandle);
 	} else {
-		boxHandle = OS.gtk_hbox_new (false, 4);
+		boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 4);
 		if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
 		labelHandle = OS.gtk_label_new_with_mnemonic (null);
 		if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -492,10 +492,17 @@ int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) {
 	int /*long*/ result = super.gtk_focus_in_event (widget, event);
 	// widget could be disposed at this point
 	if (handle == 0) return 0;
-	if ((style & SWT.PUSH) != 0 && OS.GTK_WIDGET_HAS_DEFAULT (handle)) {
-		Decorations menuShell = menuShell ();
-		menuShell.defaultButton = this;
-	}
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { 
+		if ((style & SWT.PUSH) != 0 && OS.gtk_widget_has_default (handle)) {
+			Decorations menuShell = menuShell ();
+			menuShell.defaultButton = this;
+		}
+	} else {
+		if ((style & SWT.PUSH) != 0 && OS.GTK_WIDGET_HAS_DEFAULT (handle)) {
+			Decorations menuShell = menuShell ();
+			menuShell.defaultButton = this;
+		}
+	}	
 	return result;
 }
 
@@ -599,8 +606,10 @@ void resizeHandle (int width, int height) {
 	* alignment to fail. The fix is to set the child size to the size
 	* of the button.
 	*/
-	if ((style & (SWT.CHECK | SWT.RADIO)) != 0) {
-		OS.gtk_widget_set_size_request (boxHandle, width, -1);
+	if (!OS.GTK3) {
+		if ((style & (SWT.CHECK | SWT.RADIO)) != 0) {
+			OS.gtk_widget_set_size_request (boxHandle, width, -1);
+		}
 	}
 }
 
@@ -670,7 +679,7 @@ void _setAlignment (int alignment) {
 	style &= ~(SWT.LEFT | SWT.RIGHT | SWT.CENTER);
 	style |= alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER);
 	/* Alignment not honoured when image and text are visible */
-	boolean bothVisible = OS.GTK_WIDGET_VISIBLE (labelHandle) && OS.GTK_WIDGET_VISIBLE (imageHandle);
+	boolean bothVisible = gtk_widget_get_visible (labelHandle) && gtk_widget_get_visible (imageHandle);
 	if (bothVisible) {
 		if ((style & (SWT.RADIO | SWT.CHECK)) != 0) alignment = SWT.LEFT;
 		if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0) alignment = SWT.CENTER;
@@ -679,6 +688,11 @@ void _setAlignment (int alignment) {
 		if (bothVisible) {
 			OS.gtk_box_set_child_packing (boxHandle, labelHandle, false, false, 0, OS.GTK_PACK_START);
 			OS.gtk_box_set_child_packing (boxHandle, imageHandle, false, false, 0, OS.GTK_PACK_START);
+		} else {
+			if (OS.GTK3) {
+				OS.gtk_box_set_child_packing (boxHandle, labelHandle, true, true, 0, OS.GTK_PACK_END);
+				OS.gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, OS.GTK_PACK_START);
+			}
 		}
 		OS.gtk_misc_set_alignment (labelHandle, 0.0f, 0.5f);
 		OS.gtk_label_set_justify (labelHandle, OS.GTK_JUSTIFY_LEFT);
@@ -692,6 +706,10 @@ void _setAlignment (int alignment) {
 			OS.gtk_misc_set_alignment (labelHandle, 0f, 0.5f);
 			OS.gtk_misc_set_alignment (imageHandle, 1f, 0.5f);
 		} else {
+			if (OS.GTK3) {
+				OS.gtk_box_set_child_packing (boxHandle, labelHandle, true, true, 0, OS.GTK_PACK_END);
+				OS.gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, OS.GTK_PACK_START);
+			}
 			OS.gtk_misc_set_alignment (labelHandle, 0.5f, 0.5f);
 			OS.gtk_label_set_justify (labelHandle, OS.GTK_JUSTIFY_CENTER);
 			OS.gtk_misc_set_alignment (imageHandle, 0.5f, 0.5f);
@@ -702,6 +720,11 @@ void _setAlignment (int alignment) {
 		if (bothVisible) {
 			OS.gtk_box_set_child_packing (boxHandle, labelHandle, false, false, 0, OS.GTK_PACK_END);
 			OS.gtk_box_set_child_packing (boxHandle, imageHandle, false, false, 0, OS.GTK_PACK_END);
+		} else {
+			if (OS.GTK3) {
+				OS.gtk_box_set_child_packing (boxHandle, labelHandle, true, true, 0, OS.GTK_PACK_END);
+				OS.gtk_box_set_child_packing (boxHandle, imageHandle, true, true, 0, OS.GTK_PACK_START);
+			}
 		}
 		OS.gtk_misc_set_alignment (labelHandle, 1.0f, 0.5f);
 		OS.gtk_label_set_justify (labelHandle, OS.GTK_JUSTIFY_RIGHT);
@@ -730,7 +753,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* resized to the preferred size but it still
 	* won't draw properly.
 	*/
-	boolean wrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && (OS.GTK_WIDGET_FLAGS (labelHandle) & OS.GTK_VISIBLE) != 0;
+	boolean wrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && gtk_widget_get_visible (labelHandle);
 	if (wrap) OS.gtk_widget_set_size_request (boxHandle, -1, -1);
 	int result = super.setBounds (x, y, width, height, move, resize);
 	/*
@@ -745,33 +768,32 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* resized so that it will draw wrapped.
 	*/
 	if (wrap) {
-		int boxWidth = OS.GTK_WIDGET_WIDTH (boxHandle);
-		int boxHeight = OS.GTK_WIDGET_HEIGHT (boxHandle);
+		GtkAllocation allocation = new GtkAllocation();
+		gtk_widget_get_allocation (boxHandle, allocation);
+		int boxWidth = allocation.width;
+		int boxHeight = allocation.height;
 		int /*long*/ labelLayout = OS.gtk_label_get_layout (labelHandle);
 		int pangoWidth = OS.pango_layout_get_width (labelLayout);
 		OS.pango_layout_set_width (labelLayout, -1);
 		int [] w = new int [1], h = new int [1];
-		OS.pango_layout_get_size (labelLayout, w, h);
+		OS.pango_layout_get_pixel_size (labelLayout, w, h);
 		OS.pango_layout_set_width (labelLayout, pangoWidth);
 		int imageWidth = 0;
-		if (OS.GTK_WIDGET_VISIBLE (imageHandle)) {
+		if (gtk_widget_get_visible (imageHandle)) {
 			GtkRequisition requisition = new GtkRequisition ();
-			OS.gtk_widget_size_request (imageHandle, requisition);
+			gtk_widget_get_preferred_size (imageHandle, requisition);
 			imageWidth = requisition.width;
 			int [] spacing = new int [1];
 			OS.g_object_get (boxHandle, OS.spacing, spacing, 0);
 			imageWidth += spacing [0];
 		}
-		OS.gtk_widget_set_size_request (labelHandle, Math.min(OS.PANGO_PIXELS(w [0]), boxWidth - imageWidth), -1);
+		OS.gtk_widget_set_size_request (labelHandle, Math.min(w [0], boxWidth - imageWidth), -1);
 		/*
 		* Bug in GTK.  Setting the size request should invalidate the label's
 		* layout, but it does not.  The fix is to resize the label directly. 
 		*/
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (boxHandle, requisition);
-		GtkAllocation allocation = new GtkAllocation ();
-		allocation.x = OS.GTK_WIDGET_X (boxHandle);
-		allocation.y = OS.GTK_WIDGET_Y (boxHandle);
+		gtk_widget_get_preferred_size (boxHandle, requisition);
 		allocation.width = boxWidth;
 		allocation.height = boxHeight;
 		OS.gtk_widget_size_allocate (boxHandle, allocation);
@@ -781,8 +803,8 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 
 void setFontDescription (int /*long*/ font) {
 	super.setFontDescription (font);
-	if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font);
-	if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font);
+	if (labelHandle != 0) setFontDescription (labelHandle, font);
+	if (imageHandle != 0) setFontDescription (imageHandle, font);
 }
 
 boolean setRadioSelection (boolean value) {
@@ -855,11 +877,11 @@ public void setImage (Image image) {
 		imageList = new ImageList ();
 		int imageIndex = imageList.add (image);
 		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf(imageHandle, pixbuf);
 		if (text.length () == 0) OS.gtk_widget_hide (labelHandle);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_show (labelHandle);
 		OS.gtk_widget_hide (imageHandle);
 	}
diff --git a/org/eclipse/swt/widgets/Canvas.java b/org/eclipse/swt/widgets/Canvas.java
index 9ebbe8e..d617ec2 100644
--- a/org/eclipse/swt/widgets/Canvas.java
+++ b/org/eclipse/swt/widgets/Canvas.java
@@ -12,6 +12,7 @@ package org.eclipse.swt.widgets;
 
 
 import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.*;
 
@@ -67,7 +68,6 @@ Canvas () {}
  * </ul>
  *
  * @see SWT
- * @see Widget#checkSubclass
  * @see Widget#getStyle
  */
 public Canvas (Composite parent, int style) {
@@ -160,6 +160,15 @@ int /*long*/ gtk_commit (int /*long*/ imcontext, int /*long*/ text) {
 	return super.gtk_commit (imcontext, text);
 }
 
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	boolean isFocus = caret != null && caret.isFocusCaret ();
+	if (isFocus) caret.killFocus ();
+	int /*long*/ result = super.gtk_draw (widget, cairo);
+	if (isFocus) caret.setFocus ();
+	return result;
+}
+
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
 	if ((state & OBSCURED) != 0) return 0;
 	boolean isFocus = caret != null && caret.isFocusCaret ();
@@ -250,7 +259,12 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
 	boolean isFocus = caret != null && caret.isFocusCaret ();
 	if (isFocus) caret.killFocus ();
 	int /*long*/ window = paintWindow ();
-	int /*long*/ visibleRegion = OS.gdk_drawable_get_visible_region (window);
+	int /*long*/ visibleRegion;
+	if (OS.GTK3) {
+		visibleRegion = OS.gdk_window_get_visible_region (window);
+	} else {
+		visibleRegion = OS.gdk_drawable_get_visible_region (window);
+	}
 	GdkRectangle srcRect = new GdkRectangle ();
 	srcRect.x = x;
 	srcRect.y = y;
@@ -272,14 +286,28 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
 		redrawWidget (x, y, width, height, false, false, false);
 		redrawWidget (destX, destY, width, height, false, false, false);
 	} else {
-//		GC gc = new GC (this);
-//		gc.copyArea (x, y, width, height, destX, destY);
-//		gc.dispose ();
-		//TODO: Use Cairo
-		int /*long*/ gdkGC = OS.gdk_gc_new (window);
-		OS.gdk_gc_set_exposures (gdkGC, true);
-		OS.gdk_draw_drawable (window, gdkGC, window, copyRect.x, copyRect.y, copyRect.x + deltaX, copyRect.y + deltaY, copyRect.width, copyRect.height);
-		OS.g_object_unref (gdkGC);
+		if (OS.GTK3) {
+			int /*long*/ cairo = OS.gdk_cairo_create(window);
+			if (Cairo.cairo_version() < Cairo.CAIRO_VERSION_ENCODE(1, 12, 0)) {
+				OS.gdk_cairo_set_source_window(cairo, window, 0, 0);
+			} else {
+				Cairo.cairo_push_group(cairo);
+				OS.gdk_cairo_set_source_window(cairo, window, 0, 0);
+				Cairo.cairo_paint(cairo);
+				Cairo.cairo_pop_group_to_source(cairo);
+			}
+			double[] matrix = {1, 0, 0, 1, -deltaX, -deltaY};
+			Cairo.cairo_pattern_set_matrix(Cairo.cairo_get_source(cairo), matrix);
+			Cairo.cairo_rectangle(cairo, copyRect.x + deltaX, copyRect.y + deltaY, copyRect.width, copyRect.height);
+			Cairo.cairo_clip(cairo);
+			Cairo.cairo_paint(cairo);
+			Cairo.cairo_destroy(cairo);
+		} else {
+			int /*long*/ gdkGC = OS.gdk_gc_new (window);
+			OS.gdk_gc_set_exposures (gdkGC, true);
+			OS.gdk_draw_drawable (window, gdkGC, window, copyRect.x, copyRect.y, copyRect.x + deltaX, copyRect.y + deltaY, copyRect.width, copyRect.height);
+			OS.g_object_unref (gdkGC);
+		}
 		boolean disjoint = (destX + width < x) || (x + width < destX) || (destY + height < y) || (y + height < destY);
 		if (disjoint) {
 			GdkRectangle rect = new GdkRectangle ();
@@ -310,10 +338,10 @@ public void scroll (int destX, int destY, int x, int y, int width, int height, b
 			}
 		}	
 		OS.gdk_window_invalidate_region(window, invalidateRegion, all);
-		OS.gdk_region_destroy (visibleRegion);
-		OS.gdk_region_destroy (copyRegion);
-		OS.gdk_region_destroy (invalidateRegion);
 	}
+	OS.gdk_region_destroy (visibleRegion);
+	OS.gdk_region_destroy (copyRegion);
+	OS.gdk_region_destroy (invalidateRegion);
 	if (all) {
 		Control [] children = _getChildren ();
 		for (int i=0; i<children.length; i++) {
diff --git a/org/eclipse/swt/widgets/Caret.java b/org/eclipse/swt/widgets/Caret.java
index 800ef44..8292ab7 100644
--- a/org/eclipse/swt/widgets/Caret.java
+++ b/org/eclipse/swt/widgets/Caret.java
@@ -141,7 +141,7 @@ boolean drawCaret () {
 	OS.gdk_gc_set_function (gc, OS.GDK_XOR);
 	if (image != null && !image.isDisposed() && image.mask == 0) {
 		int[] width = new int[1]; int[] height = new int[1];
-	 	OS.gdk_drawable_get_size(image.pixmap, width, height);
+		gdk_pixmap_get_size (image.pixmap, width, height);
 	 	int nX = x;
 		if ((parent.style & SWT.MIRRORED) != 0) nX = parent.getClientWidth () - width[0] - nX;
 	 	OS.gdk_draw_drawable(window, gc, image.pixmap, 0, 0, nX, y, width[0], height[0]);
diff --git a/org/eclipse/swt/widgets/ColorDialog.java b/org/eclipse/swt/widgets/ColorDialog.java
index aab3285..95cfb06 100644
--- a/org/eclipse/swt/widgets/ColorDialog.java
+++ b/org/eclipse/swt/widgets/ColorDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -126,32 +126,56 @@ public RGB[] getRGBs() {
  */
 public RGB open () {
 	byte [] buffer = Converter.wcsToMbcs (null, title, true);
-	int /*long*/ handle = OS.gtk_color_selection_dialog_new (buffer);
+	int /*long*/ handle = 0;
+	if (OS.GTK_VERSION >= OS.VERSION (3, 4, 0)) {
+		handle = OS.gtk_color_chooser_dialog_new (buffer, parent.topHandle ());
+	} else {
+		handle = OS.gtk_color_selection_dialog_new (buffer);
+	}
 	Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
-	if (parent != null) {
-		int /*long*/ shellHandle = parent.topHandle ();
-		OS.gtk_window_set_transient_for (handle, shellHandle);
-		int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
-		if (pixbufs != 0) {
-			OS.gtk_window_set_icon_list (handle, pixbufs);
-			OS.g_list_free (pixbufs);
+	int /*long*/ colorsel = 0;
+	GdkColor color = new GdkColor ();
+	GdkRGBA rgba = new GdkRGBA ();
+	if (OS.GTK_VERSION <= OS.VERSION (3, 4, 0)) {
+		if (parent != null) {
+			int /*long*/ shellHandle = parent.topHandle ();
+			OS.gtk_window_set_transient_for (handle, shellHandle);
+			int /*long*/ pixbufs = OS.gtk_window_get_icon_list (shellHandle);
+			if (pixbufs != 0) {
+				OS.gtk_window_set_icon_list (handle, pixbufs);
+				OS.g_list_free (pixbufs);
+			}
 		}
+		if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+			int /*long*/ group = OS.gtk_window_get_group (0);
+			OS.gtk_window_group_add_window (group, handle);
+		}
+		OS.gtk_window_set_modal (handle, true);
+
+		if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+			colorsel = OS.gtk_color_selection_dialog_get_color_selection (handle);
+		} else {
+			GtkColorSelectionDialog dialog = new GtkColorSelectionDialog ();
+			OS.memmove (dialog, handle);
+			colorsel = dialog.colorsel;
+		}
+		if (rgb != null) {
+			color.red = (short)((rgb.red & 0xFF) | ((rgb.red & 0xFF) << 8));
+			color.green = (short)((rgb.green & 0xFF) | ((rgb.green & 0xFF) << 8));
+			color.blue = (short)((rgb.blue & 0xFF) | ((rgb.blue & 0xFF) << 8));
+			OS.gtk_color_selection_set_current_color (colorsel, color);
+		}
+		OS.gtk_color_selection_set_has_palette (colorsel, true);
+	} else {
+		if (rgb != null) {
+			rgba.red = (double) rgb.red / 255;
+			rgba.green = (double) rgb.green / 255;
+			rgba.blue = (double) rgb.blue / 255;
+		}
+		OS.gtk_color_chooser_set_use_alpha (handle, false);
+		OS.gtk_color_chooser_set_rgba (handle, rgba);
 	}
-	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
-		int /*long*/ group = OS.gtk_window_get_group(0);
-		OS.gtk_window_group_add_window (group, handle);
-	}
-	OS.gtk_window_set_modal (handle, true);
-	GtkColorSelectionDialog dialog = new GtkColorSelectionDialog ();
-	OS.memmove (dialog, handle);
-	GdkColor color = new GdkColor();
-	if (rgb != null) {
-		color.red = (short)((rgb.red & 0xFF) | ((rgb.red & 0xFF) << 8));
-		color.green = (short)((rgb.green & 0xFF) | ((rgb.green & 0xFF) << 8));
-		color.blue = (short)((rgb.blue & 0xFF) | ((rgb.blue & 0xFF) << 8));
-		OS.gtk_color_selection_set_current_color (dialog.colorsel, color);
-	}
-	OS.gtk_color_selection_set_has_palette (dialog.colorsel, true);
+	
 	if (rgbs != null) {
 		int /*long*/ colors = OS.g_malloc(GdkColor.sizeof * rgbs.length);
 		for (int i=0; i<rgbs.length; i++) {
@@ -203,10 +227,20 @@ public RGB open () {
 	}
 	boolean success = response == OS.GTK_RESPONSE_OK; 
 	if (success) {
-		OS.gtk_color_selection_get_current_color (dialog.colorsel, color);
-		int red = (color.red >> 8) & 0xFF;
-		int green = (color.green >> 8) & 0xFF;
-		int blue = (color.blue >> 8) & 0xFF;
+		int red = 0;
+		int green = 0;
+		int blue = 0;
+		if (OS.GTK_VERSION >= OS.VERSION (3, 4, 0)) {
+			OS.gtk_color_chooser_get_rgba (handle, rgba);
+			red =  (int) (rgba.red * 255);
+			green = (int) (rgba.green * 255);
+			blue =  (int) (rgba.blue *  255);
+		} else {
+			OS.gtk_color_selection_get_current_color (colorsel, color);
+			red = (color.red >> 8) & 0xFF;
+			green = (color.green >> 8) & 0xFF;
+			blue = (color.blue >> 8) & 0xFF;
+		}
 		rgb = new RGB (red, green, blue);
 	}
 	int /*long*/ settings = OS.gtk_settings_get_default ();
diff --git a/org/eclipse/swt/widgets/Combo.java b/org/eclipse/swt/widgets/Combo.java
index 5adc42c..f684a19 100644
--- a/org/eclipse/swt/widgets/Combo.java
+++ b/org/eclipse/swt/widgets/Combo.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -59,6 +59,7 @@ import org.eclipse.swt.events.*;
 public class Combo extends Composite {
 	int /*long*/ buttonHandle, entryHandle, textRenderer, cellHandle, popupHandle, menuHandle;
 	int lastEventTime, visibleCount = 10;
+	int /*long*/ imContext;
 	int /*long*/ gdkEventKey = 0;
 	int fixStart = -1, fixEnd = -1;
 	String [] items = new String [0];
@@ -169,7 +170,11 @@ public void add (String string, int index) {
 	System.arraycopy (items, index, newItems, index + 1, items.length - index);
 	items = newItems;
 	byte [] buffer = Converter.wcsToMbcs (null, string, true);
-	OS.gtk_combo_box_insert_text (handle, index, buffer);
+	if (OS.GTK3) {
+		OS.gtk_combo_box_text_insert (handle, index, null, buffer);
+	} else {
+		OS.gtk_combo_box_insert_text (handle, index, buffer);
+	}
 	if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
 		OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL);    
 	}
@@ -341,7 +346,37 @@ void clearText () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget ();
-	return computeNativeSize (handle, wHint, hHint, changed);
+	if ((style & SWT.READ_ONLY) != 0 || OS.GTK3) {
+		return computeNativeSize (handle, wHint, hHint, changed);
+	}
+	if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
+	if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
+	int[] w = new int [1], h = new int [1];
+	OS.gtk_widget_realize (entryHandle);
+	int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle);
+	OS.pango_layout_get_pixel_size (layout, w, h);
+	int xborder = Display.INNER_BORDER, yborder = Display.INNER_BORDER;
+	Point thickness = getThickness (entryHandle);
+	xborder += thickness.x;
+	yborder += thickness.y;
+	int [] property = new int [1];
+	OS.gtk_widget_style_get (entryHandle, OS.interior_focus, property, 0);
+	if (property [0] == 0) {
+		OS.gtk_widget_style_get (entryHandle, OS.focus_line_width, property, 0);
+		xborder += property [0];
+		yborder += property [0];
+	}
+	int width = w [0] + xborder * 2;
+	int height = h [0] + yborder * 2;
+	GtkRequisition arrowRequesition = new GtkRequisition ();
+	gtk_widget_get_preferred_size (buttonHandle, arrowRequesition);
+	GtkRequisition listRequesition = new GtkRequisition ();
+	int /*long*/ listParent = OS.gtk_bin_get_child(popupHandle);
+	gtk_widget_get_preferred_size (listParent, listRequesition);
+	width = Math.max (listRequesition.width, width) + arrowRequesition.width;
+	width = wHint == SWT.DEFAULT ? width : wHint;
+	height = hHint == SWT.DEFAULT ? height : hHint;
+	return new Point (width, height);
 }
 
 /**
@@ -366,18 +401,29 @@ void createHandle (int index) {
 	state |= HANDLE | MENU;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	int /*long*/ oldList = OS.gtk_window_list_toplevels ();  
 	if ((style & SWT.READ_ONLY) != 0) {
-		handle = OS.gtk_combo_box_new_text ();
+		if (OS.GTK3) {
+			handle = OS.gtk_combo_box_text_new ();
+		} else {
+			handle = OS.gtk_combo_box_new_text ();
+		}
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 		cellHandle = OS.gtk_bin_get_child (handle);
 		if (cellHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	} else {
-		handle = OS.gtk_combo_box_entry_new_text ();
+		if (OS.GTK3) {
+			handle = OS.gtk_combo_box_text_new_with_entry();
+		} else {
+			handle = OS.gtk_combo_box_entry_new_text ();
+		}
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 		entryHandle = OS.gtk_bin_get_child (handle);
 		if (entryHandle == 0) error (SWT.ERROR_NO_HANDLES);
+		if (OS.GTK3) {
+			imContext = OS.imContextLast();
+		}
 	}
 	popupHandle = findPopupHandle (oldList);    
 	OS.gtk_container_add (fixedHandle, handle);
@@ -390,7 +436,6 @@ void createHandle (int index) {
 	* fix is to set the pad to 1.
 	*/
 	int pad = 0;
-	if (OS.GTK_VERSION < OS.VERSION(2, 6, 0)) pad = 1;
 	OS.g_object_set (textRenderer, OS.ypad, pad, 0);
 	/*
 	* Feature in GTK.  In version 2.4.9 of GTK, a warning is issued
@@ -409,10 +454,12 @@ void createHandle (int index) {
 	* for those versions of GTK that defer the creation. 
 	*/
 	if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) {
-		OS.gtk_widget_size_request(handle, new GtkRequisition());
+		gtk_widget_get_preferred_size (handle, new GtkRequisition());
 	}
-	if (popupHandle != 0) findMenuHandle ();
-	findButtonHandle ();
+	menuHandle = findMenuHandle ();
+	if (menuHandle != 0) OS.g_object_ref (menuHandle);
+	buttonHandle = findButtonHandle ();
+	if (buttonHandle != 0) OS.g_object_ref (buttonHandle);
 	/*
 	* Feature in GTK. By default, read only combo boxes 
 	* process the RETURN key rather than allowing the 
@@ -420,7 +467,7 @@ void createHandle (int index) {
 	* clear the GTK_RECEIVES_DEFAULT flag.
 	*/
 	if ((style & SWT.READ_ONLY) != 0 && buttonHandle != 0) {
-		OS.GTK_WIDGET_UNSET_FLAGS (buttonHandle, OS.GTK_RECEIVES_DEFAULT);
+		gtk_widget_set_receives_default (buttonHandle, false);
 	}
 }
 
@@ -495,8 +542,7 @@ int /*long*/ findPopupHandle (int /*long*/ oldList) {
 	return result;
 }
 
-
-void findButtonHandle() {
+int /*long*/ findButtonHandle() {
 	/*
 	* Feature in GTK.  There is no API to query the button
 	* handle from a combo box although it is possible to get the
@@ -504,37 +550,41 @@ void findButtonHandle() {
 	* fix is to walk the combo tree and find the first child that is 
 	* an instance of button.
 	*/
+	int /*long*/ result = 0;
 	OS.gtk_container_forall (handle, display.allChildrenProc, 0);
 	if (display.allChildren != 0) {
 		int /*long*/ list = display.allChildren;
 		while (list != 0) {
 			int /*long*/ widget = OS.g_list_data (list);
 			if (OS.GTK_IS_BUTTON (widget)) {
-				buttonHandle = widget;
+				result = widget;
 				break;
 			}
-			list = OS.g_list_next (list);
 		}
 		OS.g_list_free (display.allChildren);
 		display.allChildren = 0;
 	}
+	return result;
 }
 
-void findMenuHandle() {
+int /*long*/ findMenuHandle() {
+	if (popupHandle == 0) return 0;
+	int /*long*/ result = 0;
 	OS.gtk_container_forall (popupHandle, display.allChildrenProc, 0);
 	if (display.allChildren != 0) {
 	    int /*long*/ list = display.allChildren;
 		while (list != 0) {
-		int /*long*/ widget = OS.g_list_data (list);
-		if (OS.G_OBJECT_TYPE (widget) == OS.GTK_TYPE_MENU ()) {
-			menuHandle = widget;
-			break;
+			int /*long*/ widget = OS.g_list_data (list);
+			if (OS.G_OBJECT_TYPE (widget) == OS.GTK_TYPE_MENU ()) {
+				result = widget;
+				break;
+			}
+			list = OS.g_list_next (list);
 		}
-		list = OS.g_list_next (list);
-	}
 	    OS.g_list_free (display.allChildren);
 	    display.allChildren = 0;
 	}
+	return result;
 }
 	
 void fixModal (int /*long*/ group, int /*long*/ modalGroup) {
@@ -575,14 +625,13 @@ int /*long*/ fontHandle () {
 }
 
 int /*long*/ focusHandle () {
-	if ((style & SWT.READ_ONLY) != 0 && buttonHandle != 0) return buttonHandle;
 	if (entryHandle != 0) return entryHandle;
 	return super.focusHandle ();
 }
 
 boolean hasFocus () {
 	if (super.hasFocus ()) return true;
-	if (entryHandle != 0 && OS.GTK_WIDGET_HAS_FOCUS (entryHandle)) return true;
+	if (entryHandle != 0 && gtk_widget_has_focus (entryHandle)) return true;
 	return false;
 }
 
@@ -597,9 +646,20 @@ void hookEvents () {
 		OS.g_signal_connect_closure (entryHandle, OS.activate, display.closures [ACTIVATE], false);
 		OS.g_signal_connect_closure (entryHandle, OS.populate_popup, display.closures [POPULATE_POPUP], false);
 	}
-	int eventMask =	OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | 
-		OS.GDK_BUTTON_RELEASE_MASK;
- 	int /*long*/ [] handles = new int /*long*/ [] {buttonHandle, entryHandle, menuHandle};
+
+	hookEvents(new int /*long*/ [] {buttonHandle, entryHandle, menuHandle});
+
+	int /*long*/ imContext = imContext ();
+	if (imContext != 0) {
+		OS.g_signal_connect_closure (imContext, OS.commit, display.closures [COMMIT], false);
+		int id = OS.g_signal_lookup (OS.commit, OS.gtk_im_context_get_type ());
+		int blockMask =  OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
+		OS.g_signal_handlers_block_matched (imContext, blockMask, id, 0, 0, 0, entryHandle);
+	}
+}
+
+void hookEvents(int /*long*/ [] handles) {
+	int eventMask =	OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK;
 	for (int i=0; i<handles.length; i++) {
 		int /*long*/ eventHandle = handles [i];
 		if (eventHandle != 0) {
@@ -623,20 +683,15 @@ void hookEvents () {
 			if (eventHandle != focusHandle ()) {
 				OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [EVENT_AFTER], 0, display.closures [EVENT_AFTER], false);
 			}
+			if (OS.G_OBJECT_TYPE (eventHandle) == OS.GTK_TYPE_MENU ()) {
+				OS.g_signal_connect_closure(eventHandle, OS.selection_done, display.closures[SELECTION_DONE], true);
+			}
 		}
 	}
-	int /*long*/ imContext = imContext ();
-	if (imContext != 0) {
-		OS.g_signal_connect_closure (imContext, OS.commit, display.closures [COMMIT], false);
-		int id = OS.g_signal_lookup (OS.commit, OS.gtk_im_context_get_type ());
-		int blockMask =  OS.G_SIGNAL_MATCH_DATA | OS.G_SIGNAL_MATCH_ID;
-		OS.g_signal_handlers_block_matched (imContext, blockMask, id, 0, 0, 0, entryHandle);
-	}
-	
-	if (menuHandle != 0) OS.g_signal_connect_closure(menuHandle, OS.selection_done, display.closures[SELECTION_DONE], true);
 }
 
 int /*long*/ imContext () {
+	if (imContext != 0) return imContext; 
 	return entryHandle != 0 ? OS.GTK_ENTRY_IM_CONTEXT (entryHandle) : 0;
 }
 
@@ -732,9 +787,7 @@ public Point getCaretLocation () {
 		return new Point (0, 0);
 	}
 	int index = OS.gtk_editable_get_position (entryHandle);
-	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-		index = OS.gtk_entry_text_index_to_layout_index (entryHandle, index);
-	}
+	index = OS.gtk_entry_text_index_to_layout_index (entryHandle, index);
 	int [] offset_x = new int [1], offset_y = new int [1];
 	OS.gtk_entry_get_layout_offsets (entryHandle, offset_x, offset_y);
 	int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle);
@@ -872,7 +925,7 @@ public String [] getItems () {
  */
 public boolean getListVisible () {
 	checkWidget ();
-	return popupHandle != 0 && OS.GTK_WIDGET_VISIBLE (popupHandle); 
+	return popupHandle != 0 && gtk_widget_get_visible (popupHandle); 
 }
 
 String getNameText () {
@@ -999,7 +1052,11 @@ public int getTextHeight () {
 	checkWidget();
 	GtkRequisition requisition = new GtkRequisition ();
 	gtk_widget_size_request (handle, requisition);
-	return OS.GTK_WIDGET_REQUISITION_HEIGHT (handle);
+	if (OS.GTK3) {
+		return requisition.height;
+	} else {
+		return OS.GTK_WIDGET_REQUISITION_HEIGHT (handle);
+	}
 }
 
 /**
@@ -1194,43 +1251,26 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent)  {
 	OS.memmove (event, gdkEvent, GdkEvent.sizeof);
 	switch (event.type) {
 		case OS.GDK_BUTTON_PRESS: {
-			if (OS.GTK_VERSION < OS.VERSION (2, 8, 0) && !selectionAdded) {
-				int /*long*/ grabHandle = OS.gtk_grab_get_current ();
-				if (grabHandle != 0) {
-					if (OS.G_OBJECT_TYPE (grabHandle) == OS.GTK_TYPE_MENU ()) {
-						menuHandle = grabHandle;
-						OS.g_signal_connect_closure_by_id (menuHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT], false);
-						OS.g_signal_connect_closure_by_id (menuHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT_INVERSE], true);
-						OS.g_signal_connect_closure (menuHandle, OS.selection_done, display.closures [SELECTION_DONE], false);
-						display.addWidget (menuHandle, this);
-						selectionAdded = true;
-					}
-				}
-			}
 			GdkEventButton gdkEventButton = new GdkEventButton ();
 			OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof);
 			if (gdkEventButton.button == 1) {
 				if (!sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
 					return 1;
 				}
-				if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-					if ((style & SWT.READ_ONLY) == 0 && widget == buttonHandle) {
-						OS.gtk_widget_grab_focus (entryHandle);
-					}
+				if ((style & SWT.READ_ONLY) == 0 && widget == buttonHandle) {
+					OS.gtk_widget_grab_focus (entryHandle);
 				}
 			}
 			break;
 		}
 		case OS.GDK_FOCUS_CHANGE: {
-			if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-				if ((style & SWT.READ_ONLY) == 0) {
-					GdkEventFocus gdkEventFocus = new GdkEventFocus ();
-					OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
-					if (gdkEventFocus.in != 0) {
-						OS.gtk_combo_box_set_focus_on_click (handle, false);
-					} else {
-						OS.gtk_combo_box_set_focus_on_click (handle, true);
-					}
+			if ((style & SWT.READ_ONLY) == 0) {
+				GdkEventFocus gdkEventFocus = new GdkEventFocus ();
+				OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
+				if (gdkEventFocus.in != 0) {
+					OS.gtk_combo_box_set_focus_on_click (handle, false);
+				} else {
+					OS.gtk_combo_box_set_focus_on_click (handle, true);
 				}
 			}
 			break;
@@ -1353,6 +1393,13 @@ int /*long*/ gtk_selection_done(int /*long*/ menushell) {
 	}
 	return 0;
 }
+
+int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) {
+	setButtonHandle (findButtonHandle ());
+	setMenuHandle (findMenuHandle ());
+	return super.gtk_style_set (widget, previousStyle);
+}
+
 /**
  * Searches the receiver's list starting at the first item
  * (index 0) until an item is found that is equal to the 
@@ -1404,7 +1451,7 @@ public int indexOf (String string, int start) {
 	return -1;
 }
 
-boolean isFocusHandle(int widget) {
+boolean isFocusHandle(int /*long*/ widget) {
 	if (buttonHandle != 0 && widget == buttonHandle) return true;
 	if (entryHandle != 0 && widget == entryHandle) return true;
 	return super.isFocusHandle (widget);
@@ -1413,7 +1460,7 @@ boolean isFocusHandle(int widget) {
 int /*long*/ paintWindow () {
 	int /*long*/ childHandle =  entryHandle != 0 ? entryHandle : handle;	
 	OS.gtk_widget_realize (childHandle);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (childHandle);
+	int /*long*/ window = gtk_widget_get_window (childHandle);
 	if ((style & SWT.READ_ONLY) != 0) return window;
 	int /*long*/ children = OS.gdk_window_get_children (window);
 	if (children != 0) window = OS.g_list_data (children);
@@ -1456,7 +1503,13 @@ void register () {
 
 void releaseHandle () {
 	super.releaseHandle ();
-	buttonHandle = entryHandle = 0;
+	if (menuHandle != 0) {
+		OS.g_object_unref (menuHandle);
+	}
+	if (buttonHandle != 0) {
+		OS.g_object_unref (buttonHandle);
+	}
+	menuHandle = buttonHandle = entryHandle = 0;
 }
 
 void releaseWidget () {
@@ -1490,7 +1543,11 @@ public void remove (int index) {
 	System.arraycopy (oldItems, index + 1, newItems, index, oldItems.length - index - 1);
 	items = newItems;
 	if (OS.gtk_combo_box_get_active (handle) == index) clearText ();
-	OS.gtk_combo_box_remove_text (handle, index);
+	if (OS.GTK3) {
+		OS.gtk_combo_box_text_remove(handle, index);
+	} else {
+		OS.gtk_combo_box_remove_text (handle, index);
+	}
 }
 
 /**
@@ -1523,7 +1580,11 @@ public void remove (int start, int end) {
 	int index = OS.gtk_combo_box_get_active (handle);
 	if (start <= index && index <= end) clearText();
 	for (int i = end; i >= start; i--) {
-		OS.gtk_combo_box_remove_text (handle, i);
+		if (OS.GTK3) {
+			OS.gtk_combo_box_text_remove(handle, index);
+		} else {
+			OS.gtk_combo_box_remove_text (handle, i);
+		}
 	}
 }
 
@@ -1565,8 +1626,12 @@ public void removeAll () {
 	int count = items.length;
 	items = new String[0];
 	clearText ();
-	for (int i = count - 1; i >= 0; i--) {
-		OS.gtk_combo_box_remove_text (handle, i);
+	if (OS.GTK3) {
+		OS.gtk_combo_box_text_remove_all(handle);
+	} else {
+		for (int i = count - 1; i >= 0; i--) {
+			OS.gtk_combo_box_remove_text (handle, i);
+		}
 	}
 }
 
@@ -1674,11 +1739,21 @@ public void select (int index) {
 	}
 }
 
+void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
+	if (entryHandle == 0 || (style & SWT.READ_ONLY) != 0) {
+		super.setBackgroundColor (context, handle, rgba);
+		return;
+	}
+	setBackgroundColorGradient (OS.gtk_widget_get_style_context (entryHandle), handle, rgba);
+}
+
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	if (entryHandle != 0) OS.gtk_widget_modify_base (entryHandle, 0, color);
-	if (cellHandle != 0) OS.g_object_set (cellHandle, OS.background_gdk, color, 0);
-	OS.g_object_set (textRenderer, OS.background_gdk, color, 0);
+	if (!OS.GTK3) {
+		if (entryHandle != 0) OS.gtk_widget_modify_base (entryHandle, 0, color);
+		if (cellHandle != 0) OS.g_object_set (cellHandle, OS.background_gdk, color, 0);
+		OS.g_object_set (textRenderer, OS.background_gdk, color, 0);
+	}
 }
 
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
@@ -1687,9 +1762,37 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	return super.setBounds (x, y, width, newHeight, move, resize);
 }
 
+void setButtonHandle (int /*long*/ widget) {
+	if (buttonHandle == widget) return;
+	if (buttonHandle != 0) {
+		display.removeWidget (buttonHandle);
+		OS.g_object_unref (buttonHandle);
+	}
+	buttonHandle = widget;
+	if (buttonHandle != 0) {
+		OS.g_object_ref (buttonHandle);
+		display.addWidget (buttonHandle, this);
+		hookEvents (new int /*long*/[]{buttonHandle});
+	}
+}
+
+void setMenuHandle (int /*long*/ widget) {
+	if (menuHandle == widget) return;
+	if (menuHandle != 0) {
+		display.removeWidget (menuHandle);
+		OS.g_object_unref (menuHandle);
+	}
+	menuHandle = widget;
+	if (menuHandle != 0) {
+		OS.g_object_ref (menuHandle);
+		display.addWidget (menuHandle, this);
+		hookEvents (new int /*long*/[]{menuHandle});
+	}
+}
+
 void setFontDescription (int /*long*/ font) {
 	super.setFontDescription (font);
-	if (entryHandle != 0) OS.gtk_widget_modify_font (entryHandle, font);
+	if (entryHandle != 0) setFontDescription (entryHandle, font);
 	OS.g_object_set (textRenderer, OS.font_desc, font, 0);
 	if ((style & SWT.READ_ONLY) != 0) {
 		/*
@@ -1706,8 +1809,8 @@ void setFontDescription (int /*long*/ font) {
 }
 
 void setForegroundColor (GdkColor color) {
-	super.setForegroundColor (color);
-	if (entryHandle != 0) setForegroundColor (entryHandle, color);
+	super.setForegroundColor (handle, color, false);
+	if (entryHandle != 0) setForegroundColor (entryHandle, color, false);
 	OS.g_object_set (textRenderer, OS.foreground_gdk, color, 0);
 }
 
@@ -1735,8 +1838,13 @@ public void setItem (int index, String string) {
 	}
 	items [index] = string;
 	byte [] buffer = Converter.wcsToMbcs (null, string, true);
-	OS.gtk_combo_box_remove_text (handle, index);
-	OS.gtk_combo_box_insert_text (handle, index, buffer);
+	if (OS.GTK3) {
+		OS.gtk_combo_box_text_remove (handle, index);
+		OS.gtk_combo_box_text_insert (handle, index, null, buffer);
+	} else {
+		OS.gtk_combo_box_remove_text (handle, index);
+		OS.gtk_combo_box_insert_text (handle, index, buffer);
+	}
 	if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
 		OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL);    
 	}
@@ -1766,13 +1874,21 @@ public void setItems (String [] items) {
 	this.items = new String [items.length];
 	System.arraycopy (items, 0, this.items, 0, items.length);
 	clearText ();
-	for (int i = count - 1; i >= 0; i--) {
-		OS.gtk_combo_box_remove_text (handle, i);
+	if (OS.GTK3) {
+		OS.gtk_combo_box_text_remove_all(handle);
+	} else {
+		for (int i = count - 1; i >= 0; i--) {
+			OS.gtk_combo_box_remove_text (handle, i);
+		}
 	}
 	for (int i = 0; i < items.length; i++) {
 		String string = items [i];
 		byte [] buffer = Converter.wcsToMbcs (null, string, true);
-		OS.gtk_combo_box_insert_text (handle, i, buffer);
+		if (OS.GTK3) {
+			OS.gtk_combo_box_text_insert (handle, i, null, buffer);
+		} else {
+			OS.gtk_combo_box_insert_text (handle, i, buffer);
+		}
 		if ((style & SWT.RIGHT_TO_LEFT) != 0 && popupHandle != 0) {
 			OS.gtk_container_forall (popupHandle, display.setDirectionProc, OS.GTK_TEXT_DIR_RTL);    
 		}
diff --git a/org/eclipse/swt/widgets/Composite.java b/org/eclipse/swt/widgets/Composite.java
index 81445e9..b8063f1 100644
--- a/org/eclipse/swt/widgets/Composite.java
+++ b/org/eclipse/swt/widgets/Composite.java
@@ -47,6 +47,18 @@ import org.eclipse.swt.graphics.*;
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
  */
 public class Composite extends Scrollable {
+	/**
+	 * the handle to the OS resource 
+	 * (Warning: This field is platform dependent)
+	 * <p>
+	 * <b>IMPORTANT:</b> This field is <em>not</em> part of the SWT
+	 * public API. It is marked public only so that it can be shared
+	 * within the packages provided by SWT. It is not available on all
+	 * platforms and should never be accessed from application code.
+	 * </p>
+	 * 
+	 * @noreference This field is not intended to be referenced by clients.
+	 */
 	public int /*long*/  embeddedHandle;
 	int /*long*/ imHandle, socketHandle;
 	Layout layout;
@@ -96,6 +108,9 @@ public Composite (Composite parent, int style) {
 }
 
 static int checkStyle (int style) {
+	if (OS.INIT_CAIRO) {
+		style &= ~SWT.NO_BACKGROUND;
+	}
 	style &= ~SWT.TRANSPARENT;
 	return style;
 }
@@ -262,7 +277,7 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
 		if (fixed) {
 			fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 			if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-			OS.gtk_fixed_set_has_window (fixedHandle, true);
+			gtk_widget_set_has_window (fixedHandle, true);
 		}
 		int /*long*/ vadj = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
 		if (vadj == 0) error (SWT.ERROR_NO_HANDLES);
@@ -273,8 +288,8 @@ void createHandle (int index, boolean fixed, boolean scrolled) {
 	}
 	handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (handle, true);
-	OS.GTK_WIDGET_SET_FLAGS(handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_has_window (handle, true);
+	gtk_widget_set_can_focus (handle, true);
 	if ((style & SWT.EMBEDDED) == 0) {
 		if ((state & CANVAS) != 0) {
 			/* Prevent an input method context from being created for the Browser widget */
@@ -379,7 +394,7 @@ public void drawBackground (GC gc, int x, int y, int width, int height, int offs
 					int /*long*/ drawable = control.backgroundImage.pixmap;
 					int /*long*/ xDrawable = OS.GDK_PIXMAP_XID (drawable);				
 					int [] w = new int [1], h = new int [1];
-					OS.gdk_drawable_get_size (drawable, w, h);
+					gdk_pixmap_get_size (drawable, w, h);
 					surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]);
 					if (surface == 0) error (SWT.ERROR_NO_HANDLES);
 				} else {
@@ -501,7 +516,7 @@ void fixTabList (Control control) {
 void fixZOrder () {
 	if ((state & CANVAS) != 0) return;
 	int /*long*/ parentHandle = parentingHandle ();
-	int /*long*/ parentWindow = OS.GTK_WIDGET_WINDOW (parentHandle);
+	int /*long*/ parentWindow = gtk_widget_get_window (parentHandle);
 	if (parentWindow == 0) return;
 	int /*long*/ [] userData = new int /*long*/ [1];
 	int /*long*/ windowList = OS.gdk_window_get_children (parentWindow);
@@ -527,9 +542,9 @@ int /*long*/ focusHandle () {
 }
 
 boolean forceFocus (int /*long*/ focusHandle) {
-	if (socketHandle != 0) OS.GTK_WIDGET_SET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
+	if (socketHandle != 0) gtk_widget_set_can_focus (focusHandle, true);
 	boolean result = super.forceFocus (focusHandle);
-	if (socketHandle != 0) OS.GTK_WIDGET_UNSET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
+	if (socketHandle != 0) gtk_widget_set_can_focus (focusHandle, false);
 	return result;
 }
 
@@ -538,7 +553,7 @@ boolean forceFocus (int /*long*/ focusHandle) {
  * will be one of the following constants defined in class
  * <code>SWT</code>:
  * <code>INHERIT_NONE</code>, <code>INHERIT_DEFAULT</code>,
- * <code>INHERTIT_FORCE</code>.
+ * <code>INHERIT_FORCE</code>.
  *
  * @return the background mode
  *
@@ -602,15 +617,20 @@ public Rectangle getClientArea () {
 		}
 		forceResize ();
 		int /*long*/ clientHandle = clientHandle ();
-		int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle);
-		int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (clientHandle);
+		GtkAllocation allocation = new GtkAllocation();
+		gtk_widget_get_allocation (clientHandle, allocation);
+		int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+		int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 		return new Rectangle (0, 0, width, height);
 	}
 	return super.getClientArea();
 }
 
 int getClientWidth() {
-	return (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle ());
+	if ((state & ZERO_WIDTH) != 0) return 0;
+	GtkAllocation allocation = new GtkAllocation();
+	gtk_widget_get_allocation(clientHandle (), allocation);
+	return allocation.width;
 }
 
 /**
@@ -705,7 +725,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	if ((style & SWT.NO_MERGE_PAINTS) == 0) {
 		return super.gtk_expose_event (widget, eventPtr);
 	}
-	if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return 0;
+	if (!hooksPaint ()) return 0;
 	GdkEventExpose gdkEvent = new GdkEventExpose ();
 	OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof);
 	int /*long*/ [] rectangles = new int /*long*/ [1];
@@ -729,7 +749,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		gc.dispose ();
 		OS.gdk_region_destroy (damageRgn);
 		event.gc = null;
-	}
+	}	
 	OS.g_free (rectangles [0]);
 	return 0;
 }
@@ -778,7 +798,7 @@ int /*long*/ gtk_map (int /*long*/ widget) {
 int /*long*/ gtk_realize (int /*long*/ widget) {
 	int /*long*/ result = super.gtk_realize (widget);
 	if ((style & SWT.NO_BACKGROUND) != 0) {
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
+		int /*long*/ window = gtk_widget_get_window (paintHandle ());
 		if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, false);
 	}
 	if (socketHandle != 0) {
@@ -796,7 +816,7 @@ int /*long*/ gtk_scroll_child (int /*long*/ widget, int /*long*/ scrollType, int
 int /*long*/ gtk_style_set (int /*long*/ widget, int /*long*/ previousStyle) {
 	int /*long*/ result = super.gtk_style_set (widget, previousStyle);
 	if ((style & SWT.NO_BACKGROUND) != 0) {
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
+		int /*long*/ window = gtk_widget_get_window (paintHandle ());
 		if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, false);
 	}
 	return result;
@@ -1118,6 +1138,10 @@ void markLayout (boolean changed, boolean all) {
 void moveAbove (int /*long*/ child, int /*long*/ sibling) {
 	if (child == sibling) return;
 	int /*long*/ parentHandle = parentingHandle ();
+	if (OS.GTK3) {
+		OS.swt_fixed_restack (parentHandle, child, sibling, true);
+		return;
+	}
 	GtkFixed fixed = new GtkFixed ();
 	OS.memmove (fixed, parentHandle);
 	int /*long*/ children = fixed.children;
@@ -1159,6 +1183,10 @@ void moveBelow (int /*long*/ child, int /*long*/ sibling) {
 		moveAbove (child, scrolledHandle != 0  ? scrolledHandle : handle);
 		return;
 	}
+	if (OS.GTK3) {
+		OS.swt_fixed_restack (parentHandle, child, sibling, false);
+		return;
+	}
 	GtkFixed fixed = new GtkFixed ();
 	OS.memmove (fixed, parentHandle);
 	int /*long*/ children = fixed.children;
@@ -1198,9 +1226,11 @@ void moveChildren(int oldWidth) {
 	for (int i = 0; i < children.length; i++) {
 		Control child = children[i];
 		int /*long*/ topHandle = child.topHandle ();
-		int x = OS.GTK_WIDGET_X (topHandle);
-		int y = OS.GTK_WIDGET_Y (topHandle);
-		int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
+		GtkAllocation allocation = new GtkAllocation();
+		gtk_widget_get_allocation (topHandle, allocation);
+		int x = allocation.x;
+		int y = allocation.y;
+		int controlWidth = (child.state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
 		if (oldWidth > 0) x = oldWidth - controlWidth - x; 
 		int clientWidth = getClientWidth ();
 		x = clientWidth - controlWidth - x;
@@ -1215,11 +1245,8 @@ void moveChildren(int oldWidth) {
 		*/
 		GtkRequisition requisition = new GtkRequisition ();
 		gtk_widget_size_request (topHandle, requisition);
-		GtkAllocation allocation = new GtkAllocation ();
 		allocation.x = x;
 		allocation.y = y;
-		allocation.width = OS.GTK_WIDGET_WIDTH (topHandle);
-		allocation.height = OS.GTK_WIDGET_HEIGHT (topHandle);
 		OS.gtk_widget_size_allocate (topHandle, allocation);
 		Control control = child.findBackgroundControl ();
 		if (control != null && control.backgroundImage != null) {
@@ -1329,7 +1356,13 @@ void reskinChildren (int flags) {
 
 void resizeHandle (int width, int height) {
 	super.resizeHandle (width, height);
-	if (socketHandle != 0) OS.gtk_widget_set_size_request (socketHandle, width, height);
+	if (socketHandle != 0) {
+		if (OS.GTK3) {
+			OS.swt_fixed_resize (handle, socketHandle, width, height);
+		} else {
+			OS.gtk_widget_set_size_request (socketHandle, width, height);
+		}
+	}
 }
 
 /**
diff --git a/org/eclipse/swt/widgets/Control.java b/org/eclipse/swt/widgets/Control.java
index 7404d61..60786cb 100644
--- a/org/eclipse/swt/widgets/Control.java
+++ b/org/eclipse/swt/widgets/Control.java
@@ -25,7 +25,7 @@ import org.eclipse.swt.internal.gtk.*;
  * <dl>
  * <dt><b>Styles:</b>
  * <dd>BORDER</dd>
- * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT</dd>
+ * <dd>LEFT_TO_RIGHT, RIGHT_TO_LEFT, FLIP_TEXT_DIRECTION</dd>
  * <dt><b>Events:</b>
  * <dd>DragDetect, FocusIn, FocusOut, Help, KeyDown, KeyUp, MenuDetect, MouseDoubleClick, MouseDown, MouseEnter,
  *     MouseExit, MouseHover, MouseUp, MouseMove, MouseWheel, MouseHorizontalWheel, MouseVerticalWheel, Move,
@@ -45,7 +45,7 @@ import org.eclipse.swt.internal.gtk.*;
  */
 public abstract class Control extends Widget implements Drawable {
 	int /*long*/ fixedHandle;
-	int /*long*/ redrawWindow, enableWindow;
+	int /*long*/ redrawWindow, enableWindow, provider;
 	int drawCount;
 	Composite parent;
 	Cursor cursor;
@@ -109,8 +109,12 @@ void deregister () {
 }
 
 void drawBackground (Control control, int /*long*/ window, int /*long*/ region, int x, int y, int width, int height) {
+	drawBackground(control, window, 0, region, x, y, width, height);
+}
+
+void drawBackground (Control control, int /*long*/ window, int /*long*/ cr, int /*long*/ region, int x, int y, int width, int height) {
 	if (OS.USE_CAIRO) {
-		int /*long*/ cairo = OS.gdk_cairo_create(window);
+		int /*long*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window);
 		if (cairo == 0) error (SWT.ERROR_NO_HANDLES);
 		if (region != 0) {
 			OS.gdk_cairo_region(cairo, region);
@@ -136,7 +140,7 @@ void drawBackground (Control control, int /*long*/ window, int /*long*/ region,
 		}
 		Cairo.cairo_rectangle (cairo, x, y, width, height);
 		Cairo.cairo_fill (cairo);
-		Cairo.cairo_destroy(cairo);
+		if (cairo != cr) Cairo.cairo_destroy(cairo);
 		return;
 	}
 	int /*long*/ gdkGC = OS.gdk_gc_new (window);
@@ -155,16 +159,28 @@ void drawBackground (Control control, int /*long*/ window, int /*long*/ region,
 	OS.g_object_unref (gdkGC);
 }
 
-boolean drawGripper (int x, int y, int width, int height, boolean vertical) {
+boolean drawGripper (GC gc, int x, int y, int width, int height, boolean vertical) {
 	int /*long*/ paintHandle = paintHandle ();
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle);
+	int /*long*/ window = gtk_widget_get_window (paintHandle);
 	if (window == 0) return false;
 	int orientation = vertical ? OS.GTK_ORIENTATION_HORIZONTAL : OS.GTK_ORIENTATION_VERTICAL;
 	if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - width - x;
-	OS.gtk_paint_handle (OS.gtk_widget_get_style (paintHandle), window, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_OUT, null, paintHandle, new byte [1], x, y, width, height, orientation);
+	if (OS.GTK3) {
+		int /*long*/ context = OS.gtk_widget_get_style_context (paintHandle);
+		OS.gtk_style_context_save (context);
+		OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_PANE_SEPARATOR);
+		OS.gtk_style_context_set_state (context, OS.GTK_STATE_FLAG_NORMAL);
+		OS.gtk_render_handle (context, gc.handle, x, y, width, height);
+		OS.gtk_style_context_restore (context);
+	} else {
+		OS.gtk_paint_handle (OS.gtk_widget_get_style (paintHandle), window, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_OUT, null, paintHandle, new byte [1], x, y, width, height, orientation);
+	}
 	return true;
 }
 
+void drawWidget (GC gc) {
+}
+
 void enableWidget (boolean enabled) {
 	OS.gtk_widget_set_sensitive (handle, enabled);
 }
@@ -180,7 +196,7 @@ int /*long*/ eventHandle () {
 int /*long*/ eventWindow () {
 	int /*long*/ eventHandle = eventHandle ();
 	OS.gtk_widget_realize (eventHandle);
-	return OS.GTK_WIDGET_WINDOW (eventHandle);
+	return gtk_widget_get_window (eventHandle);
 }
 
 void fixFocus (Control focusControl) {
@@ -191,11 +207,11 @@ void fixFocus (Control focusControl) {
 	}
 	shell.setSavedFocus (focusControl);
 	int /*long*/ focusHandle = shell.vboxHandle;
-	OS.GTK_WIDGET_SET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (focusHandle, true);
 	OS.gtk_widget_grab_focus (focusHandle);
 	// widget could be disposed at this point
 	if (isDisposed ()) return;
-	OS.GTK_WIDGET_UNSET_FLAGS (focusHandle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (focusHandle, false);
 }
 
 void fixStyle () {
@@ -216,11 +232,13 @@ void fixStyle (int /*long*/ handle) {
 	*/
 	if ((state & BACKGROUND) != 0) return;
 	if ((state & THEME_BACKGROUND) == 0) return;
-	int /*long*/ childStyle = parent.childStyle ();
-	if (childStyle != 0) {
-		GdkColor color = new GdkColor();
-		OS.gtk_style_get_bg (childStyle, 0, color);
-		setBackgroundColor (color);
+	if (!OS.GTK3) {
+		int /*long*/ childStyle = parent.childStyle ();
+		if (childStyle != 0) {
+			GdkColor color = new GdkColor();
+			OS.gtk_style_get_bg (childStyle, 0, color);
+			setBackgroundColor (color);
+		}
 	}
 }
 
@@ -250,6 +268,25 @@ public int getOrientation () {
 	return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
 }
 
+/**
+ * Returns the text direction of the receiver, which will be one of the
+ * constants <code>SWT.LEFT_TO_RIGHT</code> or <code>SWT.RIGHT_TO_LEFT</code>.
+ *
+ * @return the text direction style
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @since 3.102
+ */
+public int getTextDirection() {
+	checkWidget ();
+	/* return the widget orientation */
+	return style & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
+}
+
 boolean hasFocus () {
 	return this == display.getFocusControl();
 }
@@ -269,7 +306,7 @@ void hookEvents () {
 
 	/* Connect the mouse signals */
 	int /*long*/ eventHandle = eventHandle ();
-	int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK;
+	int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_SCROLL_MASK | OS.GDK_SMOOTH_SCROLL_MASK;
 	OS.gtk_widget_add_events (eventHandle, eventMask);
 	OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT], false);
 	OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.closures [BUTTON_RELEASE_EVENT], false);
@@ -308,7 +345,9 @@ void hookEvents () {
 	int /*long*/ paintHandle = paintHandle ();
 	int paintMask = OS.GDK_EXPOSURE_MASK | OS.GDK_VISIBILITY_NOTIFY_MASK;
 	OS.gtk_widget_add_events (paintHandle, paintMask);
+
 	OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [EXPOSE_EVENT], 0, display.closures [EXPOSE_EVENT_INVERSE], false);
+
 	/*
 	* As of GTK 2.17.11, obscured controls no longer send expose 
 	* events. It is no longer necessary to track visiblity notify
@@ -334,9 +373,13 @@ void hookEvents () {
 	OS.g_signal_connect_closure_by_id (topHandle, display.signalIds [MAP], 0, display.closures [MAP], true);
 }
 
+boolean hooksPaint () {
+	return hooks (SWT.Paint) || filters (SWT.Paint);
+}
+
 int /*long*/ hoverProc (int /*long*/ widget) {
 	int [] x = new int [1], y = new int [1], mask = new int [1];
-	OS.gdk_window_get_pointer (0, x, y, mask);
+	gdk_window_get_device_position (0, x, y, mask);
 	sendMouseEvent (SWT.MouseHover, 0, /*time*/0, x [0], y [0], false, mask [0]);
 	/* Always return zero in order to cancel the hover timer */
 	return 0;
@@ -351,7 +394,7 @@ int /*long*/ paintHandle () {
 	int /*long*/ topHandle = topHandle ();
 	int /*long*/ paintHandle = handle;
 	while (paintHandle != topHandle) {
-		if ((OS.GTK_WIDGET_FLAGS (paintHandle) & OS.GTK_NO_WINDOW) == 0) break;
+		if (gtk_widget_get_has_window (paintHandle)) break;
 		paintHandle = OS.gtk_widget_get_parent (paintHandle);
 	}
 	return paintHandle;
@@ -360,7 +403,7 @@ int /*long*/ paintHandle () {
 int /*long*/ paintWindow () {
 	int /*long*/ paintHandle = paintHandle ();
 	OS.gtk_widget_realize (paintHandle);
-	return OS.GTK_WIDGET_WINDOW (paintHandle);
+	return gtk_widget_get_window (paintHandle);
 }
 
 /**
@@ -386,7 +429,11 @@ public boolean print (GC gc) {
 	if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
 	int /*long*/ topHandle = topHandle ();
 	OS.gtk_widget_realize (topHandle);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (topHandle);
+	if (OS.GTK3) {
+		OS.gtk_widget_draw(topHandle, gc.handle);
+		return true;
+	}
+	int /*long*/ window = gtk_widget_get_window (topHandle);
 	GCData data = gc.getGCData ();
 	OS.gdk_window_process_updates (window, true);
 	int /*long*/ drawable = data.drawable;
@@ -399,7 +446,7 @@ void printWidget (GC gc, int /*long*/ drawable, int depth, int x, int y) {
 	boolean obscured = (state & OBSCURED) != 0;
 	state &= ~OBSCURED;
 	int /*long*/ topHandle = topHandle ();
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (topHandle);
+	int /*long*/ window = gtk_widget_get_window (topHandle);
 	printWindow (true, this, gc, drawable, depth, window, x, y);
 	if (obscured) state |= OBSCURED;
 }
@@ -408,7 +455,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
 	if (OS.gdk_drawable_get_depth (window) != depth) return;
 	GdkRectangle rect = new GdkRectangle ();
 	int [] width = new int [1], height = new int [1];
-	OS.gdk_drawable_get_size (window, width, height);
+	gdk_window_get_size (window, width, height);
 	rect.width = width [0];
 	rect.height = height [0];
 	OS.gdk_window_begin_paint_rect (window, rect);
@@ -436,7 +483,7 @@ void printWindow (boolean first, Control control, GC gc, int /*long*/ drawable,
 		OS.gdk_window_get_position (window, cX, cY);
 		int /*long*/ parentWindow = OS.gdk_window_get_parent (window);
 		int [] pW = new int [1], pH = new int [1];
-		OS.gdk_drawable_get_size (parentWindow, pW, pH);
+		gdk_window_get_size (parentWindow, pW, pH);
 		srcX = x_offset [0] - cX [0];
 		srcY = y_offset [0] - cY [0];
 		destX = x - cX [0];
@@ -584,6 +631,17 @@ void checkBackground () {
 	} while (true);
 }
 
+void checkForeground () {
+	/*
+	* Feature in GTK 3. The widget foreground is inherited from the immediate
+	* parent. This is not the expected behavior for SWT. The fix is to avoid
+	* the inheritance by explicitly setting the default foreground on the widget.
+	*/
+	if (OS.GTK3) {
+		setForegroundColor (topHandle (), display.COLOR_WIDGET_FOREGROUND);
+	}
+}
+
 void checkBorder () {
 	if (getBorderWidth () == 0) style &= ~SWT.BORDER;
 }
@@ -601,6 +659,7 @@ void createWidget (int index) {
 	checkOrientation (parent);
 	super.createWidget (index);
 	checkBackground ();
+	checkForeground ();
 	if ((state & PARENT_BACKGROUND) != 0) setParentBackground ();
 	checkBuffered ();
 	showWidget ();
@@ -654,6 +713,24 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 
 Point computeNativeSize (int /*long*/ h, int wHint, int hHint, boolean changed) {
 	int width = wHint, height = hHint;
+	if (OS.GTK3){
+		if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) {
+			GtkRequisition requisition = new GtkRequisition ();
+			OS.gtk_widget_get_preferred_size (h, requisition, null);
+			width = requisition.width;
+			height = requisition.height;
+		} else if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {
+			int [] minimum_size = new int [1];
+			if (wHint == SWT.DEFAULT) {
+				OS.gtk_widget_get_preferred_width_for_height (h, height, minimum_size, null);
+				width = minimum_size [0];
+			} else {
+				OS.gtk_widget_get_preferred_height_for_width (h, width, minimum_size, null);
+				height = minimum_size [0];
+			}
+		}
+		return new Point(width, height);
+	}
 	if (wHint == SWT.DEFAULT && hHint == SWT.DEFAULT) {
 		GtkRequisition requisition = new GtkRequisition ();
 		gtk_widget_size_request (h, requisition);
@@ -682,10 +759,7 @@ void forceResize () {
 	GtkRequisition requisition = new GtkRequisition ();
 	gtk_widget_size_request (topHandle, requisition);
 	GtkAllocation allocation = new GtkAllocation ();
-	allocation.x = OS.GTK_WIDGET_X (topHandle);
-	allocation.y = OS.GTK_WIDGET_Y (topHandle);
-	allocation.width = OS.GTK_WIDGET_WIDTH (topHandle);
-	allocation.height = OS.GTK_WIDGET_HEIGHT (topHandle);
+	gtk_widget_get_allocation(topHandle, allocation);
 	OS.gtk_widget_size_allocate (topHandle, allocation);
 }
 
@@ -737,10 +811,12 @@ Accessible _getAccessible () {
 public Rectangle getBounds () {
 	checkWidget();
 	int /*long*/ topHandle = topHandle ();
-	int x = OS.GTK_WIDGET_X (topHandle);
-	int y = OS.GTK_WIDGET_Y (topHandle);
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (topHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 :allocation.height;
 	if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
 	return new Rectangle (x, y, width, height);
 }
@@ -808,54 +884,67 @@ void modifyStyle (int /*long*/ handle, int /*long*/ style) {
 	* has had a region set on it, the region is lost.  The 
 	* fix is to set the region again.
 	*/
-	if (region != null) OS.gdk_window_shape_combine_region (OS.GTK_WIDGET_WINDOW (topHandle ()), region.handle, 0, 0);
+	if (region != null) OS.gdk_window_shape_combine_region (gtk_widget_get_window (topHandle ()), region.handle, 0, 0);
 }
 
 void moveHandle (int x, int y) {
 	int /*long*/ topHandle = topHandle ();
 	int /*long*/ parentHandle = parent.parentingHandle ();
-	/*
-	* Feature in GTK.  Calling gtk_fixed_move() to move a child causes
-	* the whole parent to redraw.  This is a performance problem. The
-	* fix is temporarily make the parent not visible during the move.
-	* 
-	* NOTE: Because every widget in SWT has an X window, the new and
-	* old bounds of the child are correctly redrawn.
-	*/
-	int flags = OS.GTK_WIDGET_FLAGS (parentHandle);
-	OS.GTK_WIDGET_UNSET_FLAGS (parentHandle, OS.GTK_VISIBLE);
-	OS.gtk_fixed_move (parentHandle, topHandle, x, y);
-	if ((flags & OS.GTK_VISIBLE) != 0) {
-		OS.GTK_WIDGET_SET_FLAGS (parentHandle, OS.GTK_VISIBLE);	
+	if (OS.GTK3) {
+		OS.swt_fixed_move (parentHandle, topHandle, x, y);
+	} else {
+		/*
+		* Feature in GTK.  Calling gtk_fixed_move() to move a child causes
+		* the whole parent to redraw.  This is a performance problem. The
+		* fix is temporarily mark the parent not visible during the move.
+		* 
+		* NOTE: Because every widget in SWT has an X window, the new and
+		* old bounds of the child are correctly redrawn.
+		* 
+		* NOTE: There is no API in GTK 3 to only set the GTK_VISIBLE bit.
+		*/
+		boolean reset = gtk_widget_get_visible (parentHandle);
+		gtk_widget_set_visible (parentHandle, false);
+		OS.gtk_fixed_move (parentHandle, topHandle, x, y);
+		gtk_widget_set_visible (parentHandle, reset);
 	}
 }
 
 void resizeHandle (int width, int height) {
 	int /*long*/ topHandle = topHandle ();
-	OS.gtk_widget_set_size_request (topHandle, width, height);
-	if (topHandle != handle) OS.gtk_widget_set_size_request (handle, width, height);
+	if (OS.GTK3) {
+		OS.swt_fixed_resize (OS.gtk_widget_get_parent (topHandle), topHandle, width, height);
+		if (topHandle != handle) {
+			OS.swt_fixed_resize (OS.gtk_widget_get_parent (handle), handle, width, height);
+		}
+	} else {
+		OS.gtk_widget_set_size_request (topHandle, width, height);
+		if (topHandle != handle) OS.gtk_widget_set_size_request (handle, width, height);
+	}
 }
 
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
 	int /*long*/ topHandle = topHandle ();
 	boolean sendMove = move;
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
 	if ((parent.style & SWT.MIRRORED) != 0) {
 		int clientWidth = parent.getClientWidth ();
-		int oldWidth = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-		int oldX = clientWidth - oldWidth - OS.GTK_WIDGET_X (topHandle);
+		int oldWidth = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+		int oldX = clientWidth - oldWidth - allocation.x;
 		if (move) {
 			sendMove &= x != oldX;
 			x = clientWidth - (resize ? width : oldWidth) - x;
 		} else {
 			move = true;
 			x = clientWidth - (resize ? width : oldWidth) - oldX;
-			y = OS.GTK_WIDGET_Y (topHandle);
+			y = allocation.y;
 		}
 	}
 	boolean sameOrigin = true, sameExtent = true;
 	if (move) {
-		int oldX = OS.GTK_WIDGET_X (topHandle);
-		int oldY = OS.GTK_WIDGET_Y (topHandle);
+		int oldX = allocation.x;
+		int oldY = allocation.y;
 		sameOrigin = x == oldX && y == oldY;
 		if (!sameOrigin) {
 			if (enableWindow != 0) {
@@ -866,8 +955,8 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	}
 	int clientWidth = 0;
 	if (resize) {
-		int oldWidth = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-		int oldHeight = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (topHandle);
+		int oldWidth = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+		int oldHeight = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 		sameExtent = width == oldWidth && height == oldHeight;
 		if (!sameExtent && (style & SWT.MIRRORED) != 0) clientWidth = getClientWidth ();
 		if (!sameExtent && !(width == 0 && height == 0)) {
@@ -890,20 +979,13 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 		*/
 		GtkRequisition requisition = new GtkRequisition ();
 		gtk_widget_size_request (topHandle, requisition);
-		GtkAllocation allocation = new GtkAllocation ();
 		if (move) {
 			allocation.x = x;
 			allocation.y = y;
-		} else {
-			allocation.x = OS.GTK_WIDGET_X (topHandle);
-			allocation.y = OS.GTK_WIDGET_Y (topHandle);
 		}
 		if (resize) {
 			allocation.width = width;
 			allocation.height = height;
-		} else {
-			allocation.width = OS.GTK_WIDGET_WIDTH (topHandle);
-			allocation.height = OS.GTK_WIDGET_HEIGHT (topHandle);
 		}
 		OS.gtk_widget_size_allocate (topHandle, allocation);
 	}
@@ -962,10 +1044,12 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 public Point getLocation () {
 	checkWidget();
 	int /*long*/ topHandle = topHandle ();
-	int x = OS.GTK_WIDGET_X (topHandle);
-	int y = OS.GTK_WIDGET_Y (topHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
 	if ((parent.style & SWT.MIRRORED) != 0) {
-		int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
+		int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
 		x = parent.getClientWidth () - width - x;
 	}
 	return new Point (x, y);
@@ -1027,8 +1111,10 @@ public void setLocation(int x, int y) {
 public Point getSize () {
 	checkWidget();
 	int /*long*/ topHandle = topHandle ();
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (topHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	return new Point (width, height);
 }
 
@@ -1076,7 +1162,7 @@ public void setSize (Point size) {
 public void setRegion (Region region) {
 	checkWidget ();
 	if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (topHandle ());
+	int /*long*/ window = gtk_widget_get_window (topHandle ());
 	int /*long*/ shape_region = (region == null) ? 0 : region.handle;
 	OS.gdk_window_shape_combine_region (window, shape_region, 0, 0);
 	this.region = region;
@@ -2250,7 +2336,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean
 					quit = true;
 				}
 				int [] newX = new int [1], newY = new int [1];
-				OS.gdk_window_get_pointer (gdkMotionEvent.window, newX, newY, null);
+				gdk_window_get_device_position (gdkMotionEvent.window, newX, newY, null);
 				break;
 			}
 			case OS.GDK_KEY_PRESS:
@@ -2300,21 +2386,21 @@ void fixChildren (Shell newShell, Shell oldShell, Decorations newDecorations, De
 }
 
 int /*long*/ fixedMapProc (int /*long*/ widget) {
-	OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_MAPPED);
+	gtk_widget_set_mapped (widget, true);
 	int /*long*/ widgetList = OS.gtk_container_get_children (widget);
 	if (widgetList != 0) {
 		int /*long*/ widgets = widgetList;
 		while (widgets != 0) {
 			int /*long*/ child = OS.g_list_data (widgets);
-			if (OS.GTK_WIDGET_VISIBLE (child) && OS.gtk_widget_get_child_visible (child) && !OS.GTK_WIDGET_MAPPED (child)) {
+			if (gtk_widget_get_visible (child) && OS.gtk_widget_get_child_visible (child) && !gtk_widget_get_mapped (child)) {
 				OS.gtk_widget_map (child);
 			}
 			widgets = OS.g_list_next (widgets);
 		}
 		OS.g_list_free (widgetList);
 	}
-	if ((OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_NO_WINDOW) == 0) {
-		OS.gdk_window_show_unraised (OS.GTK_WIDGET_WINDOW (widget));
+	if (gtk_widget_get_has_window (widget)) {
+		OS.gdk_window_show_unraised (gtk_widget_get_window (widget));
 	}
 	return 0;
 }
@@ -2346,7 +2432,7 @@ public boolean forceFocus () {
 }
 
 boolean forceFocus (int /*long*/ focusHandle) {
-	if (OS.GTK_WIDGET_HAS_FOCUS (focusHandle)) return true;
+	if (gtk_widget_has_focus (focusHandle)) return true;
 	/* When the control is zero sized it must be realized */
 	OS.gtk_widget_realize (focusHandle);
 	OS.gtk_widget_grab_focus (focusHandle);
@@ -2414,7 +2500,37 @@ public Image getBackgroundImage () {
 	return control.backgroundImage;
 }
 
+GdkColor getContextBackground () {
+	int /*long*/ fontHandle = fontHandle ();
+	int /*long*/ context = OS.gtk_widget_get_style_context (fontHandle);
+	GdkRGBA rgba = new GdkRGBA ();
+	OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+	if (rgba.alpha == 0) {
+		return display.COLOR_WIDGET_BACKGROUND;
+	}
+	GdkColor color = new GdkColor ();
+	color.red = (short)(rgba.red * 0xFFFF);
+	color.green = (short)(rgba.green * 0xFFFF);
+	color.blue = (short)(rgba.blue * 0xFFFF);
+	return color;
+}
+
+GdkColor getContextColor () {
+	int /*long*/ fontHandle = fontHandle ();
+	int /*long*/ context = OS.gtk_widget_get_style_context (fontHandle);
+	GdkRGBA rgba = new GdkRGBA ();
+	OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+	GdkColor color = new GdkColor ();
+	color.red = (short)(rgba.red * 0xFFFF);
+	color.green = (short)(rgba.green * 0xFFFF);
+	color.blue = (short)(rgba.blue * 0xFFFF);
+	return color;
+}
+
 GdkColor getBgColor () {
+	if (OS.GTK3) {
+		return getContextBackground ();
+	}
 	int /*long*/ fontHandle = fontHandle ();
 	OS.gtk_widget_realize (fontHandle);
 	GdkColor color = new GdkColor ();
@@ -2423,6 +2539,9 @@ GdkColor getBgColor () {
 }
 
 GdkColor getBaseColor () {
+	if (OS.GTK3) {
+		return getContextBackground ();
+	}
 	int /*long*/ fontHandle = fontHandle ();
 	OS.gtk_widget_realize (fontHandle);
 	GdkColor color = new GdkColor ();
@@ -2525,6 +2644,10 @@ public Font getFont () {
 	
 int /*long*/ getFontDescription () {
 	int /*long*/ fontHandle = fontHandle ();
+	if (OS.GTK3) {
+		int /*long*/ context = OS.gtk_widget_get_style_context (fontHandle);	
+		return OS.gtk_style_context_get_font(context, OS.GTK_STATE_FLAG_NORMAL);
+	}
 	OS.gtk_widget_realize (fontHandle);
 	return OS.gtk_style_get_font_desc (OS.gtk_widget_get_style (fontHandle));
 }
@@ -2549,6 +2672,9 @@ GdkColor getForegroundColor () {
 }
 
 GdkColor getFgColor () {
+	if (OS.GTK3) {
+		return getContextColor ();
+	}
 	int /*long*/ fontHandle = fontHandle ();
 	OS.gtk_widget_realize (fontHandle);
 	GdkColor color = new GdkColor ();
@@ -2561,6 +2687,9 @@ Point getIMCaretPos () {
 }
 
 GdkColor getTextColor () {
+	if (OS.GTK3) {
+		return getContextColor ();
+	}
 	int /*long*/ fontHandle = fontHandle ();
 	OS.gtk_widget_realize (fontHandle);
 	GdkColor color = new GdkColor ();
@@ -2787,6 +2916,26 @@ public boolean getVisible () {
 	return (state & HIDDEN) == 0;
 }
 
+Point getThickness (int /*long*/ widget) {
+	if (OS.GTK3) {
+		int xthickness = 0, ythickness = 0;
+		GtkBorder tmp = new GtkBorder();
+		int /*long*/ context = OS.gtk_widget_get_style_context (widget);
+		OS.gtk_style_context_save (context);
+		OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_FRAME);
+		OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+		xthickness += tmp.left;
+		ythickness += tmp.top;
+		OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+		xthickness += tmp.left;
+		ythickness += tmp.top;
+		OS.gtk_style_context_restore (context);
+		return new Point (xthickness, ythickness);
+	}
+	int /*long*/ style = OS.gtk_widget_get_style (widget);
+	return new Point (OS.gtk_style_get_xthickness (style), OS.gtk_style_get_ythickness (style));
+}
+
 int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	return gtk_button_press_event (widget, event, true);
 }
@@ -2852,7 +3001,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event, bo
 		result = sendMouseEvent (SWT.MouseDoubleClick, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 		if (isDisposed ()) return 1;
 	}
-	if (!shell.isDisposed ()) shell.setActiveControl (this);
+	if (!shell.isDisposed ()) shell.setActiveControl (this, SWT.MouseDown);
 	return result;
 }
 
@@ -2974,9 +3123,32 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 	return 0;
 }
 
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	if (!hooksPaint ()) return 0;
+	GdkRectangle rect = new GdkRectangle ();
+	OS.gdk_cairo_get_clip_rectangle (cairo, rect);
+	Event event = new Event ();
+	event.count = 1;
+	event.x = rect.x;
+	event.y = rect.y;
+	event.width = rect.width;
+	event.height = rect.height;
+	if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth () - event.width - event.x;
+	GCData data = new GCData ();
+//	data.damageRgn = gdkEvent.region;
+	data.cairo = cairo;
+	GC gc = event.gc = GC.gtk_new (this, data);
+	drawWidget (gc);
+	sendEvent (SWT.Paint, event);
+	gc.dispose ();
+	event.gc = null;
+	return 0;
+}
+
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	if ((state & OBSCURED) != 0) return 0;
-	if (!hooks (SWT.Paint) && !filters (SWT.Paint)) return 0;
+	if (!hooksPaint ()) return 0;
 	GdkEventExpose gdkEvent = new GdkEventExpose ();
 	OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof);
 	Event event = new Event ();
@@ -2989,6 +3161,7 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	GCData data = new GCData ();
 	data.damageRgn = gdkEvent.region;
 	GC gc = event.gc = GC.gtk_new (this, data);
+	drawWidget (gc);
 	sendEvent (SWT.Paint, event);
 	gc.dispose ();
 	event.gc = null;
@@ -3032,7 +3205,20 @@ int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
 }
 
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
-	if (!hasFocus ()) return 0;
+	if (!hasFocus ()) {
+		/*
+		* Feature in GTK.  On AIX, the IME window deactivates the current shell and even
+		* though the widget receiving the key event is not in focus, it should filter the input in
+		* order to get it committed.  The fix is to detect that the widget shell is not active
+		* and call filterKey() only.
+		*/
+		if (display.getActiveShell () == null) {
+			GdkEventKey gdkEvent = new GdkEventKey ();
+			OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
+			if (filterKey (gdkEvent.keyval, event)) return 1;
+		}
+		return 0;
+	}
 	GdkEventKey gdkEvent = new GdkEventKey ();
 	OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
 	
@@ -3043,7 +3229,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
 	if (filterKey (gdkEvent.keyval, event)) return 1;
 	// widget could be disposed at this point
 	if (isDisposed ()) return 0;	
-	
+
 	if (translateTraversal (gdkEvent)) return 1;
 	// widget could be disposed at this point
 	if (isDisposed ()) return 0;
@@ -3106,11 +3292,21 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
 	if (gdkEvent.is_hint != 0) {
 		int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1];
 		int /*long*/ window = eventWindow ();
-		OS.gdk_window_get_pointer (window, pointer_x, pointer_y, mask);
+		gdk_window_get_device_position (window, pointer_x, pointer_y, mask);
 		x = pointer_x [0];
 		y = pointer_y [0];
 		state = mask [0];
 	}
+	if (OS.GTK3 && this != display.currentControl) {
+		if (display.currentControl != null && !display.currentControl.isDisposed ()) {
+			display.removeMouseHoverTimeout (display.currentControl.handle);
+			display.currentControl.sendMouseEvent (SWT.MouseExit,  0, gdkEvent.time, x, y, false, state);
+		}
+		if (!isDisposed ()) {
+			display.currentControl = this;
+			sendMouseEvent (SWT.MouseEnter, 0, gdkEvent.time, x, y, false, state);
+		}
+	}
 	int result = sendMouseEvent (SWT.MouseMove, 0, gdkEvent.time, x, y, gdkEvent.is_hint != 0, state) ? 0 : 1;
 	return result;
 }
@@ -3118,7 +3314,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
 int /*long*/ gtk_popup_menu (int /*long*/ widget) {
 	if (!hasFocus()) return 0;
 	int [] x = new int [1], y = new int [1];
-	OS.gdk_window_get_pointer (0, x, y, null);
+	gdk_window_get_device_position (0, x, y, null);
 	return showMenu (x [0], y [0], SWT.MENU_KEYBOARD) ? 1 : 0;
 }
 
@@ -3130,7 +3326,7 @@ int /*long*/ gtk_preedit_changed (int /*long*/ imcontext) {
 int /*long*/ gtk_realize (int /*long*/ widget) {
 	int /*long*/ imHandle = imHandle ();
 	if (imHandle != 0) {
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
+		int /*long*/ window = gtk_widget_get_window (paintHandle ());
 		OS.gtk_im_context_set_client_window (imHandle, window);
 	}
 	if (backgroundImage != null) {
@@ -3151,6 +3347,18 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			return sendMouseEvent (SWT.MouseHorizontalWheel, 0, 3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
 		case OS.GDK_SCROLL_RIGHT:
 			return sendMouseEvent (SWT.MouseHorizontalWheel, 0, -3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1;
+		case OS.GDK_SCROLL_SMOOTH:
+			int /*long*/ result = 0;
+			double[] delta_x = new double[1], delta_y = new double [1];
+			if (OS.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) {
+				if (delta_x [0] != 0) {
+					result = (sendMouseEvent (SWT.MouseHorizontalWheel, 0, (int)(3 * delta_x [0]), 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1);
+				}
+				if (delta_y [0] != 0) {
+					result = (sendMouseEvent (SWT.MouseWheel, 0, (int)(3 * delta_y [0]), SWT.SCROLL_LINE, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1);
+				}
+			}
+			return result;
 	}
 	return 0;
 }
@@ -3190,7 +3398,7 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even
 		} else {
 			if ((state & OBSCURED) != 0) {		
 				int [] width = new int [1], height = new int [1];
-				OS.gdk_drawable_get_size (window, width, height);
+				gdk_window_get_size (window, width, height);
 				GdkRectangle rect = new GdkRectangle ();
 				rect.width = width [0];
 				rect.height = height [0];
@@ -3202,8 +3410,16 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even
 	return 0;
 }
 
+void gtk_widget_set_has_window (int /*long*/ fixedHandle, boolean value) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		OS.gtk_widget_set_has_window (fixedHandle, value);
+	} else {
+		OS.gtk_fixed_set_has_window (fixedHandle, value);
+	}
+}
+
 void gtk_widget_size_request (int /*long*/ widget, GtkRequisition requisition) {
-	OS.gtk_widget_size_request (widget, requisition);	
+	gtk_widget_get_preferred_size (widget, requisition);
 }
 
 /**	 
@@ -3225,11 +3441,15 @@ public int /*long*/ internal_new_GC (GCData data) {
 	checkWidget ();
 	int /*long*/ window = paintWindow ();
 	if (window == 0) error (SWT.ERROR_NO_HANDLES);
-	int /*long*/ gc;
-	if (OS.USE_CAIRO) {
-		gc = OS.gdk_cairo_create (window);
+	int /*long*/ gc = data.cairo;
+	if (gc != 0) {
+		Cairo.cairo_reference (gc);
 	} else {
-		gc = OS.gdk_gc_new (window);
+		if (OS.USE_CAIRO) {
+			gc = OS.gdk_cairo_create (window);
+		} else {
+			gc = OS.gdk_gc_new (window);
+		}
 	}
 	if (gc == 0) error (SWT.ERROR_NO_HANDLES);	
 	if (data != null) {
@@ -3446,7 +3666,7 @@ public void redraw () {
 
 void redraw (boolean all) {
 //	checkWidget();
-	if (!OS.GTK_WIDGET_VISIBLE (topHandle ())) return;
+	if (!gtk_widget_get_visible (topHandle ())) return;
 	redrawWidget (0, 0, 0, 0, true, all, false);
 }
 
@@ -3482,7 +3702,7 @@ void redraw (boolean all) {
  */
 public void redraw (int x, int y, int width, int height, boolean all) {
 	checkWidget();
-	if (!OS.GTK_WIDGET_VISIBLE (topHandle ())) return;
+	if (!gtk_widget_get_visible (topHandle ())) return;
 	if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - width - x;
 	redrawWidget (x, y, width, height, false, all, false);
 }
@@ -3491,12 +3711,12 @@ void redrawChildren () {
 }
 
 void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
-	if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return;
+	if (!gtk_widget_get_realized(handle)) return;
 	int /*long*/ window = paintWindow ();
 	GdkRectangle rect = new GdkRectangle ();
 	if (redrawAll) {
 		int [] w = new int [1], h = new int [1];
-		OS.gdk_drawable_get_size (window, w, h);
+		gdk_window_get_size (window, w, h);
 		rect.width = w [0];
 		rect.height = h [0];
 	} else {
@@ -3725,12 +3945,16 @@ public void setBackground (Color color) {
 		gdkColor = color.handle;
 	}
 	boolean set = false;
-	if (gdkColor == null) {
-		int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
-		set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_BG) != 0;
+	if (OS.GTK3) {
+		set = !getBackground().equals(color);
 	} else {
-		GdkColor oldColor = getBackgroundColor ();
-		set = oldColor.pixel != gdkColor.pixel;
+		if (gdkColor == null) {
+			int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
+			set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_BG) != 0;
+		} else {
+			GdkColor oldColor = getBackgroundColor ();
+			set = oldColor.pixel != gdkColor.pixel;
+		}
 	}
 	if (set) {
 		if (color == null) {
@@ -3743,7 +3967,49 @@ public void setBackground (Color color) {
 	}
 }
 
+void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
+	OS.gtk_widget_override_background_color (handle, OS.GTK_STATE_FLAG_NORMAL, rgba);
+}
+
+void setBackgroundColorGradient (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
+	String css ="* {\n";
+	if (rgba != null) {
+		String color = "rgba(" + (int)(rgba.red * 255) + "," + (int)(rgba.green * 255) + "," + (int)(rgba.blue * 255) + "," + (int)(rgba.alpha * 255) + ")";
+		css += "background-image: -gtk-gradient (linear, 0 0, 0 1, color-stop(0, " + color + "), color-stop(1, " + color + "));\n";
+	}
+	css += "}\n";
+	if (provider == 0) {
+		provider = OS.gtk_css_provider_new ();
+		OS.gtk_style_context_add_provider (context, provider, OS.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+		OS.g_object_unref (provider);
+	}
+	OS.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (null, css, true), -1, null);
+}
+
 void setBackgroundColor (int /*long*/ handle, GdkColor color) {
+	if (OS.GTK3) {
+		GdkRGBA rgba = null;
+		double alpha = 1;
+		if (color == null) {
+			if ((state & PARENT_BACKGROUND) != 0) {
+				alpha = 0;
+				Control control = findBackgroundControl();
+				if (control == null) control = this;
+				color = control.getBackgroundColor();
+			}
+		}
+		if (color != null) {
+			rgba = new GdkRGBA ();
+			rgba.alpha = alpha;
+			rgba.red = (color.red & 0xFFFF) / (float)0xFFFF;
+			rgba.green = (color.green & 0xFFFF) / (float)0xFFFF;
+			rgba.blue = (color.blue & 0xFFFF) / (float)0xFFFF;
+		}
+		int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+		setBackgroundColor (context, handle, rgba);
+		OS.gtk_style_context_invalidate (context);
+		return;
+	}
 	int index = OS.GTK_STATE_NORMAL;
 	int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
 	int /*long*/ ptr = OS.gtk_rc_style_get_bg_pixmap_name (style, index);
@@ -3814,11 +4080,18 @@ public void setBackgroundImage (Image image) {
 }
 
 void setBackgroundPixmap (Image image) {
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (paintHandle ());
+	int /*long*/ window = gtk_widget_get_window (paintHandle ());
 	if (window != 0) {
 		if (image.pixmap != 0) {
 			OS.gdk_window_set_back_pixmap (window, image.pixmap, false);
 		} else if (image.surface != 0) {
+			if (OS.GTK3) {
+				int /*long*/ pattern = Cairo.cairo_pattern_create_for_surface(image.surface);
+				if (pattern == 0) SWT.error(SWT.ERROR_NO_HANDLES);
+				Cairo.cairo_pattern_set_extend(pattern, Cairo.CAIRO_EXTEND_REPEAT);
+				OS.gdk_window_set_background_pattern(window, pattern);
+				Cairo.cairo_pattern_destroy(pattern);
+			}
 			/*
 			* TODO This code code is commented because it does not work since the pixmap
 			* created with gdk_pixmap_foreign_new() does not have colormap. Another option
@@ -3968,10 +4241,12 @@ public void setEnabled (boolean enabled) {
 		int /*long*/ window = parent.eventWindow ();
 		int /*long*/ topHandle = topHandle ();
 		GdkWindowAttr attributes = new GdkWindowAttr ();
-		attributes.x = OS.GTK_WIDGET_X (topHandle);
-		attributes.y = OS.GTK_WIDGET_Y (topHandle);
-		attributes.width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-		attributes.height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (topHandle);
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (topHandle, allocation);
+		attributes.x = allocation.x;
+		attributes.y = allocation.y;
+		attributes.width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+		attributes.height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 		attributes.event_mask = (0xFFFFFFFF & ~OS.ExposureMask);
 		attributes.wclass = OS.GDK_INPUT_ONLY;
 		attributes.window_type = OS.GDK_WINDOW_CHILD;
@@ -3981,9 +4256,9 @@ public void setEnabled (boolean enabled) {
 			if (!OS.GDK_WINDOWING_X11 ()) {
 				OS.gdk_window_raise (enableWindow);
 			} else {
-				restackWindow (enableWindow, OS.GTK_WIDGET_WINDOW (topHandle), true);
+				restackWindow (enableWindow, gtk_widget_get_window (topHandle), true);
 			}
-			if (OS.GTK_WIDGET_VISIBLE (topHandle)) OS.gdk_window_show_unraised (enableWindow);
+			if (gtk_widget_get_visible (topHandle)) OS.gdk_window_show_unraised (enableWindow);
 		}
 	}
 	if (fixFocus) fixFocus (control);
@@ -4044,7 +4319,7 @@ public void setFont (Font font) {
 }
 	
 void setFontDescription (int /*long*/ font) {
-	OS.gtk_widget_modify_font (handle, font);
+	setFontDescription (handle, font);
 }
 
 /**
@@ -4073,12 +4348,16 @@ public void setForeground (Color color) {
 		gdkColor = color.handle;
 	}
 	boolean set = false;
-	if (gdkColor == null) {
-		int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
-		set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_FG) != 0;
+	if (OS.GTK3) {
+		set = !getForeground().equals(color);
 	} else {
-		GdkColor oldColor = getForegroundColor ();
-		set = oldColor.pixel != gdkColor.pixel;
+		if (gdkColor == null) {
+			int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
+			set = (OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL) & OS.GTK_RC_FG) != 0;
+		} else {
+			GdkColor oldColor = getForegroundColor ();
+			set = oldColor.pixel != gdkColor.pixel;
+		}
 	}
 	if (set) {
 		if (color == null) {
@@ -4103,12 +4382,29 @@ void setInitialBounds () {
 		* expected by SWT.
 		*/
 		int /*long*/ topHandle = topHandle ();
+		GtkAllocation allocation = new GtkAllocation();
 		if ((parent.style & SWT.MIRRORED) != 0) {
-			OS.GTK_WIDGET_SET_X (topHandle, parent.getClientWidth ());
+			if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+				allocation.x = parent.getClientWidth ();
+			} else {
+				OS.GTK_WIDGET_SET_X (topHandle, parent.getClientWidth ());
+			}
+		} else {
+			if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+				allocation.x = 0;
+			} else {
+				OS.GTK_WIDGET_SET_X (topHandle, 0);
+			}
+		}
+		if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+			allocation.y = 0;
+			if (OS.GTK3) {
+				OS.gtk_widget_set_visible(topHandle, true);
+			}
+			OS.gtk_widget_set_allocation(topHandle, allocation);
 		} else {
-			OS.GTK_WIDGET_SET_X (topHandle, 0);
+			OS.GTK_WIDGET_SET_Y (topHandle, 0);
 		}
-		OS.GTK_WIDGET_SET_Y (topHandle, 0);
 	} else {
 		resizeHandle (1, 1);
 		forceResize ();
@@ -4177,7 +4473,6 @@ void setOrientation (boolean create) {
  */
 public void setOrientation (int orientation) {
 	checkWidget ();
-	if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return;
 	int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
 	if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
 	style &= ~flags;
@@ -4212,16 +4507,18 @@ public boolean setParent (Composite parent) {
 	if (!isReparentable ()) return false;
 	OS.gtk_widget_realize (parent.handle);
 	int /*long*/ topHandle = topHandle ();
-	int x = OS.GTK_WIDGET_X (topHandle);
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (topHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (topHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	if ((this.parent.style & SWT.MIRRORED) != 0) {
 		x =  this.parent.getClientWidth () - width - x;
 	}
 	if ((parent.style & SWT.MIRRORED) != 0) {
 		x = parent.getClientWidth () - width - x;
 	}
-	int y = OS.GTK_WIDGET_Y (topHandle);
 	releaseParent ();
 	Shell newShell = parent.getShell (), oldShell = getShell ();
 	Decorations newDecorations = parent.menuShell (), oldDecorations = menuShell ();
@@ -4232,8 +4529,12 @@ public boolean setParent (Composite parent) {
 		oldDecorations.fixAccelGroup ();
 	}
 	int /*long*/ newParent = parent.parentingHandle();
-	OS.gtk_widget_reparent (topHandle, newParent);
-	OS.gtk_fixed_move (newParent, topHandle, x, y);
+	OS.gtk_widget_reparent(topHandle, newParent);
+	if (OS.GTK3) {
+		OS.swt_fixed_move (newParent, topHandle, x, y);
+	} else {
+		OS.gtk_fixed_move (newParent, topHandle, x, y);
+	}
 	/*
 	* Restore the original widget size since GTK does not keep it.
 	*/
@@ -4245,7 +4546,6 @@ public boolean setParent (Composite parent) {
 	*/
 	GtkRequisition requisition = new GtkRequisition ();
 	gtk_widget_size_request (topHandle, requisition);
-	GtkAllocation allocation = new GtkAllocation ();
 	allocation.x = x;
 	allocation.y = y;
 	allocation.width = width;
@@ -4307,7 +4607,7 @@ public void setRedraw (boolean redraw) {
 		}
 	} else {
 		if (drawCount++ == 0) {
-			if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) != 0) {
+			if (gtk_widget_get_realized (handle)) {
 				int /*long*/ window = paintWindow ();
 				Rectangle rect = getBounds ();
 				GdkWindowAttr attributes = new GdkWindowAttr ();
@@ -4337,6 +4637,34 @@ boolean setTabItemFocus (boolean next) {
 }
 
 /**
+ * Sets the base text direction (a.k.a. "paragraph direction") of the receiver,
+ * which must be one of the constants <code>SWT.LEFT_TO_RIGHT</code> or
+ * <code>SWT.RIGHT_TO_LEFT</code>.
+ * <p>
+ * <code>setOrientation</code> would override this value with the text direction
+ * that is consistent with the new orientation.
+ * </p>
+ * <p>
+ * <b>Warning</b>: This API is currently only implemented on Windows.
+ * It doesn't set the base text direction on GTK and Cocoa.
+ * </p>
+ *
+ * @param textDirection the base text direction style
+ * 
+ * @exception SWTException <ul>
+ *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ * 
+ * @see SWT#FLIP_TEXT_DIRECTION
+ * 
+ * @since 3.102
+ */
+public void setTextDirection(int textDirection) {
+	checkWidget ();
+}
+
+/**
  * Sets the receiver's tool tip text to the argument, which
  * may be null indicating that the default tool tip for the 
  * control will be shown. For a control that has a default
@@ -4455,10 +4783,18 @@ public void setVisible (boolean visible) {
 		}
 		state |= HIDDEN;
 		if (fixFocus) {
-			OS.GTK_WIDGET_UNSET_FLAGS (topHandle, OS.GTK_VISIBLE);
+			if (OS.GTK3) {
+				gtk_widget_set_can_focus (topHandle, false);
+			} else {
+				gtk_widget_set_visible (topHandle, false);
+			}
 			fixFocus (control);
 			if (isDisposed ()) return;
-			OS.GTK_WIDGET_SET_FLAGS (topHandle, OS.GTK_VISIBLE);
+			if (OS.GTK3) {
+				gtk_widget_set_can_focus (topHandle, true);
+			} else {
+				gtk_widget_set_visible (topHandle, true);
+			}
 		}
 		OS.gtk_widget_hide (topHandle);
 		if (isDisposed ()) return;
@@ -4506,7 +4842,7 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi
 
 	int /*long*/ topHandle = topHandle ();
 	int /*long*/ siblingHandle = sibling != null ? sibling.topHandle () : 0;
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (topHandle);
+	int /*long*/ window = gtk_widget_get_window (topHandle);
 	if (window != 0) {
 		int /*long*/ siblingWindow = 0;
 		if (sibling != null) {
@@ -5056,8 +5392,8 @@ public void update () {
 
 void update (boolean all, boolean flush) {
 //	checkWidget();
-	if (!OS.GTK_WIDGET_VISIBLE (topHandle ())) return; 
-	if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return;
+	if (!gtk_widget_get_visible (topHandle ())) return; 
+	if (!gtk_widget_get_realized (handle)) return;
 	int /*long*/ window = paintWindow ();
 	if (flush) display.flushExposes (window, all);
 	OS.gdk_window_process_updates (window, all);
@@ -5082,13 +5418,28 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us
 			if ((state & OBSCURED) != 0) break;
 			if (OS.USE_CAIRO) {
 				Control control = findBackgroundControl ();
-				if (control != null && control.backgroundImage != null) {
-					GdkEventExpose gdkEvent = new GdkEventExpose ();
-					OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
-					int /*long*/ paintWindow = paintWindow();
-					int /*long*/ window = gdkEvent.window;
-					if (window != paintWindow) break;
-					drawBackground(control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
+				boolean draw = control != null && control.backgroundImage != null;
+				if (OS.GTK3 && !draw && (state & CANVAS) != 0) {
+					GdkRGBA rgba = new GdkRGBA();
+					int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+					OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+					draw = rgba.alpha == 0;
+				}
+				if (draw) {
+					if (OS.GTK3) {
+						int /*long*/ cairo = arg0;
+						GdkRectangle rect = new GdkRectangle ();
+						OS.gdk_cairo_get_clip_rectangle (cairo, rect);
+						if (control == null) control = this;
+						drawBackground (control, 0, cairo, 0, rect.x, rect.y, rect.width, rect.height);
+					} else {
+						GdkEventExpose gdkEvent = new GdkEventExpose ();
+						OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
+						int /*long*/ paintWindow = paintWindow();
+						int /*long*/ window = gdkEvent.window;
+						if (window != paintWindow) break;
+						drawBackground(control, window, gdkEvent.region, gdkEvent.area_x, gdkEvent.area_y, gdkEvent.area_width, gdkEvent.area_height);
+					}
 				}
 			}
 			if (OS.GTK_VERSION <  OS.VERSION (2, 8, 0)) {
diff --git a/org/eclipse/swt/widgets/CoolBar.java b/org/eclipse/swt/widgets/CoolBar.java
index a427a10..10f1b6b 100644
--- a/org/eclipse/swt/widgets/CoolBar.java
+++ b/org/eclipse/swt/widgets/CoolBar.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -711,7 +711,7 @@ void onPaint(Event event) {
 			/* Draw gripper. */
 			if (!isLocked) {
 				rect = fixRectangle(bounds.x, bounds.y, CoolItem.MINIMUM_WIDTH, bounds.height);
-				if (!flat) 	nativeGripper = drawGripper(rect.x, rect.y, rect.width, rect.height, vertical);
+				if (!flat) 	nativeGripper = drawGripper(gc, rect.x, rect.y, rect.width, rect.height, vertical);
 				if (!nativeGripper) {
 					int grabberTrim = 2; 
 					int grabberHeight = bounds.height - (2 * grabberTrim) - 1;
diff --git a/org/eclipse/swt/widgets/DateTime.java b/org/eclipse/swt/widgets/DateTime.java
index b83a946..26f762b 100644
--- a/org/eclipse/swt/widgets/DateTime.java
+++ b/org/eclipse/swt/widgets/DateTime.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -163,10 +163,10 @@ void createText(boolean dropDown) {
 		createPopupShell(-1, -1, -1);
 	} else {
 		up = new Button(this, SWT.ARROW | SWT.UP);
-		OS.GTK_WIDGET_UNSET_FLAGS(up.handle, OS.GTK_CAN_FOCUS);
+		gtk_widget_set_can_focus (up.handle, false);
 		//up.setToolTipText(SWT.getMessage ("SWT_Up")); //$NON-NLS-1$
 		down = new Button(this, SWT.ARROW | SWT.DOWN);
-		OS.GTK_WIDGET_UNSET_FLAGS(down.handle, OS.GTK_CAN_FOCUS);
+		gtk_widget_set_can_focus (down.handle, false);
 		//down.setToolTipText(SWT.getMessage ("SWT_Down")); //$NON-NLS-1$
 		up.addListener(SWT.Selection, new Listener() {
 			public void handleEvent(Event event) {
@@ -185,7 +185,7 @@ void createText(boolean dropDown) {
 
 void createDropDownButton() {
 	down = new Button(this, SWT.ARROW  | SWT.DOWN);
-	OS.GTK_WIDGET_UNSET_FLAGS(down.handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (down.handle, false);
 	down.addListener(SWT.Selection, new Listener() {
 		public void handleEvent(Event event) {
 			boolean dropped = isDropped();
@@ -339,7 +339,7 @@ void createHandle (int index) {
 		state |= HANDLE;
 		fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 		if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-		OS.gtk_fixed_set_has_window (fixedHandle, true);
+		gtk_widget_set_has_window (fixedHandle, true);
 		handle = OS.gtk_calendar_new ();
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 		OS.gtk_container_add (fixedHandle, handle);
@@ -1065,8 +1065,10 @@ void sendSelectionEvent () {
 
 public void setBackground(Color color) {
 	super.setBackground(color);
-	if (((style & SWT.CALENDAR) != 0) && color == null) {
-		OS.gtk_widget_modify_base(handle, 0, null);
+	if (!OS.GTK3) {
+		if (((style & SWT.CALENDAR) != 0) && color == null) {
+			OS.gtk_widget_modify_base(handle, 0, null);
+		}
 	}
 	bg = color;
 	if (text != null) text.setBackground(color);
@@ -1074,7 +1076,7 @@ public void setBackground(Color color) {
 }
 
 void setBackgroundColor (GdkColor color) {
-	if ((style & SWT.CALENDAR) != 0) {
+	if ((style & SWT.CALENDAR) != 0 && !OS.GTK3) {
 		OS.gtk_widget_modify_base(handle, 0, color);
 	} else {
 		super.setBackgroundColor (color);
@@ -1098,6 +1100,10 @@ public void setFont(Font font) {
 	redraw();
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 public void setForeground(Color color) {
 	super.setForeground(color);
 	fg = color;
diff --git a/org/eclipse/swt/widgets/Dialog.java b/org/eclipse/swt/widgets/Dialog.java
index 95de81f..34182e6 100644
--- a/org/eclipse/swt/widgets/Dialog.java
+++ b/org/eclipse/swt/widgets/Dialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/DirectoryDialog.java b/org/eclipse/swt/widgets/DirectoryDialog.java
index b6979e1..3cd958d 100644
--- a/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -159,7 +159,13 @@ String openChooserDialog () {
 	}
 	if (message.length () > 0) {
 		byte [] buffer = Converter.wcsToMbcs (null, message, true);
-		int /*long*/ box = OS.gtk_hbox_new (false, 0);
+		int /*long*/ box = 0;
+		if (OS.GTK3) {
+			box = OS.gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, 0);
+			OS.gtk_box_set_homogeneous (box, false);
+		} else {
+			box = OS.gtk_hbox_new (false, 0);
+		}
 		if (box == 0) error (SWT.ERROR_NO_HANDLES);
 		int /*long*/ label = OS.gtk_label_new (buffer);
 		if (label == 0) error (SWT.ERROR_NO_HANDLES);
@@ -200,7 +206,8 @@ String openChooserDialog () {
 		int /*long*/ path = OS.gtk_file_chooser_get_filename (handle);
 		if (path != 0) {
 			int /*long*/ utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null);
-			OS.g_free (path);
+			if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path);
+			if (path != utf8Ptr) OS.g_free (path);
 			if (utf8Ptr != 0) {
 				int /*long*/ [] items_written = new int /*long*/ [1];
 				int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
diff --git a/org/eclipse/swt/widgets/Display.java b/org/eclipse/swt/widgets/Display.java
index 4631d4d..ae93ed8 100644
--- a/org/eclipse/swt/widgets/Display.java
+++ b/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -151,6 +151,8 @@ public class Display extends Device {
 	boolean activePending;
 	boolean ignoreActivate, ignoreFocus;
 	
+	Tracker tracker;
+
 	/* Input method resources */
 	Control imControl;
 	int /*long*/ preeditWindow, preeditLabel;
@@ -258,7 +260,6 @@ public class Display extends Device {
 	int /*long*/ [] flushData = new int /*long*/ [1];
 
 	/* System Resources */
-	Font systemFont;
 	Image errorImage, infoImage, questionImage, warningImage;
 	Cursor [] cursors = new Cursor [SWT.CURSOR_HAND + 1];
 	Resource [] resources;
@@ -268,7 +269,8 @@ public class Display extends Device {
 	GdkColor COLOR_WIDGET_DARK_SHADOW, COLOR_WIDGET_NORMAL_SHADOW, COLOR_WIDGET_LIGHT_SHADOW;
 	GdkColor COLOR_WIDGET_HIGHLIGHT_SHADOW, COLOR_WIDGET_BACKGROUND, COLOR_WIDGET_FOREGROUND, COLOR_WIDGET_BORDER;
 	GdkColor COLOR_LIST_FOREGROUND, COLOR_LIST_BACKGROUND, COLOR_LIST_SELECTION, COLOR_LIST_SELECTION_TEXT;
-	GdkColor COLOR_INFO_BACKGROUND, COLOR_INFO_FOREGROUND;
+	GdkColor COLOR_LIST_SELECTION_INACTIVE, COLOR_LIST_SELECTION_TEXT_INACTIVE;
+	GdkColor COLOR_INFO_BACKGROUND, COLOR_INFO_FOREGROUND, COLOR_LINK_FOREGROUND;
 	GdkColor COLOR_TITLE_FOREGROUND, COLOR_TITLE_BACKGROUND, COLOR_TITLE_BACKGROUND_GRADIENT;
 	GdkColor COLOR_TITLE_INACTIVE_FOREGROUND, COLOR_TITLE_INACTIVE_BACKGROUND, COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT;
 
@@ -287,6 +289,9 @@ public class Display extends Device {
 	/* Pango layout constructor */
 	int /*long*/ pangoLayoutNewProc;
 	
+	/* IM Context constructor */
+	int /*long*/ imContextNewProc;
+	
 	/* Custom Resize */
 	double resizeLocationX, resizeLocationY;
 	int resizeBoundsX, resizeBoundsY, resizeBoundsWidth, resizeBoundsHeight;
@@ -302,7 +307,9 @@ public class Display extends Device {
 	static int /*long*/ text_renderer_type, pixbuf_renderer_type, toggle_renderer_type;
 	static int /*long*/ text_renderer_info_ptr, pixbuf_renderer_info_ptr, toggle_renderer_info_ptr;
 	static Callback rendererClassInitCallback, rendererRenderCallback, rendererGetSizeCallback;
+	static Callback rendererGetPreferredWidthCallback;
 	static int /*long*/ rendererClassInitProc, rendererRenderProc, rendererGetSizeProc;
+	static int /*long*/ rendererGetPreferredWidthProc;
 
 	/* Key Mappings */
 	static final int [] [] KeyTable = {
@@ -421,9 +428,12 @@ public class Display extends Device {
 //	}
 
 	/* GTK Version */
-	static final int MAJOR = 2;
-	static final int MINOR = 2;
-	static final int MICRO = 0;
+	static final int GTK3_MAJOR = 3;
+	static final int GTK3_MINOR = 0;
+	static final int GTK3_MICRO = 0;
+	static final int GTK2_MAJOR = 2;
+	static final int GTK2_MINOR = 6;
+	static final int GTK2_MICRO = 0;
 
 	/* Display Data */
 	Object data;
@@ -902,9 +912,11 @@ protected void create (DeviceData data) {
 }
 
 void createDisplay (DeviceData data) {
-	/* Required for g_main_context_wakeup */
-	if (!OS.g_thread_supported ()) {
-		OS.g_thread_init (0);
+	if (OS.GLIB_VERSION < OS.VERSION(2, 32, 0)) {
+		/* Required for g_main_context_wakeup */
+		if (!OS.g_thread_supported()) {
+			OS.g_thread_init(0);
+		}
 	}
 	if (OS.GTK_VERSION < OS.VERSION(2, 24, 0)) {
 	    OS.gtk_set_locale();
@@ -912,17 +924,26 @@ void createDisplay (DeviceData data) {
 	if (!OS.gtk_init_check (new int /*long*/ [] {0}, null)) {
 		SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$
 	}
-	if (OS.GDK_WINDOWING_X11 ()) xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default());
-	int /*long*/ ptr = OS.gtk_check_version (MAJOR, MINOR, MICRO);
+	if (OS.GDK_WINDOWING_X11 ()) xDisplay = OS.gdk_x11_get_default_xdisplay();
+	int major = OS.gtk_major_version ();
+	int /*long*/ ptr;
+	if (major == GTK3_MAJOR) {
+		ptr = OS.gtk_check_version (GTK3_MAJOR, GTK3_MINOR, GTK3_MICRO);
+	} else {
+		ptr = OS.gtk_check_version (GTK2_MAJOR, GTK2_MINOR, GTK2_MICRO);
+	}
 	if (ptr != 0) {
 		int length = OS.strlen (ptr);
 		byte [] buffer = new byte [length];
 		OS.memmove (buffer, ptr, length);
 		System.out.println ("***WARNING: " + new String (Converter.mbcsToWcs (null, buffer))); //$NON-NLS-1$
-		System.out.println ("***WARNING: SWT requires GTK " + MAJOR+ "." + MINOR + "." + MICRO); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-		int major = OS.gtk_major_version (), minor = OS.gtk_minor_version (), micro = OS.gtk_micro_version ();
+		System.out.println ("***WARNING: SWT requires GTK " + GTK2_MAJOR+ "." + GTK2_MINOR + "." + GTK2_MICRO); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		int minor = OS.gtk_minor_version (), micro = OS.gtk_micro_version ();
 		System.out.println ("***WARNING: Detected: " + major + "." + minor + "." + micro); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 	}
+	if (OS.GTK3) {
+		fixed_type = OS.swt_fixed_get_type();
+	}
 	if (fixed_type == 0) {
 		byte [] type_name = Converter.wcsToMbcs (null, "SwtFixed", true); //$NON-NLS-1$
 		fixedClassInitCallback = new Callback (getClass (), "fixedClassInitProc", 2); //$NON-NLS-1$
@@ -934,10 +955,15 @@ void createDisplay (DeviceData data) {
 		fixedSizeAllocateCallback = new Callback (getClass (), "fixedSizeAllocateProc", 2); //$NON-NLS-1$
 		fixedSizeAllocateProc = fixedSizeAllocateCallback.getAddress ();
 		if (fixedSizeAllocateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		int /*long*/ queryPtr = OS.g_malloc (GTypeQuery.sizeof);
+		OS.g_type_query (OS.GTK_TYPE_FIXED(), queryPtr);
+		GTypeQuery query = new GTypeQuery ();
+		OS.memmove (query, queryPtr, GTypeQuery.sizeof);
+		OS.g_free (queryPtr);
 		GTypeInfo fixed_info = new GTypeInfo ();
-		fixed_info.class_size = (short) OS.GtkFixedClass_sizeof ();
+		fixed_info.class_size = (short) query.class_size;
 		fixed_info.class_init = fixedClassInitProc;
-		fixed_info.instance_size = (short) OS.GtkFixed_sizeof ();
+		fixed_info.instance_size = (short) query.instance_size;
 		fixed_info_ptr = OS.g_malloc (GTypeInfo.sizeof);
 		OS.memmove (fixed_info_ptr, fixed_info, GTypeInfo.sizeof);
 		fixed_type = OS.g_type_register_static (OS.GTK_TYPE_FIXED (), type_name, fixed_info_ptr, 0);
@@ -948,14 +974,22 @@ void createDisplay (DeviceData data) {
 		if (rendererClassInitProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
 	}
 	if (rendererRenderProc == 0) {
-		rendererRenderCallback = new Callback (getClass (), "rendererRenderProc", 7); //$NON-NLS-1$
+		rendererRenderCallback = new Callback (getClass (), "rendererRenderProc", OS.GTK3 ? 6 : 7); //$NON-NLS-1$
 		rendererRenderProc = rendererRenderCallback.getAddress ();
 		if (rendererRenderProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
 	}
-	if (rendererGetSizeProc == 0) {
-		rendererGetSizeCallback = new Callback (getClass (), "rendererGetSizeProc", 7); //$NON-NLS-1$
-		rendererGetSizeProc = rendererGetSizeCallback.getAddress ();
-		if (rendererGetSizeProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+	if (OS.GTK3) {
+		if (rendererGetPreferredWidthProc == 0) {
+			rendererGetPreferredWidthCallback = new Callback (getClass (), "rendererGetPreferredWidthProc", 4); //$NON-NLS-1$
+			rendererGetPreferredWidthProc = rendererGetPreferredWidthCallback.getAddress ();
+			if (rendererGetPreferredWidthProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		}
+	} else {
+		if (rendererGetSizeProc == 0) {
+			rendererGetSizeCallback = new Callback (getClass (), "rendererGetSizeProc", 7); //$NON-NLS-1$
+			rendererGetSizeProc = rendererGetSizeCallback.getAddress ();
+			if (rendererGetSizeProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
+		}
 	}
 	if (text_renderer_type == 0) {
 		GTypeInfo renderer_info = new GTypeInfo ();
@@ -992,8 +1026,10 @@ void createDisplay (DeviceData data) {
 	byte [] buffer = Converter.wcsToMbcs (null, APP_NAME, true);
 	OS.g_set_prgname (buffer);
 	OS.gdk_set_program_class (buffer);
-	byte [] flatStyle = Converter.wcsToMbcs (null, "style \"swt-flat\" { GtkToolbar::shadow-type = none } widget \"*.swt-toolbar-flat\" style : highest \"swt-flat\"", true); //$NON-NLS-1$
-	OS.gtk_rc_parse_string (flatStyle);
+	if (!OS.GTK3) {
+		byte [] flatStyle = Converter.wcsToMbcs (null, "style \"swt-flat\" { GtkToolbar::shadow-type = none } widget \"*.swt-toolbar-flat\" style : highest \"swt-flat\"", true); //$NON-NLS-1$
+		OS.gtk_rc_parse_string (flatStyle);
+	}
 
 	/* Initialize the hidden shell */
 	shellHandle = OS.gtk_window_new (OS.GTK_WINDOW_TOPLEVEL);
@@ -1011,7 +1047,14 @@ void createDisplay (DeviceData data) {
 	OS.gdk_window_add_filter  (0, filterProc, 0);
 
 	if (OS.GDK_WINDOWING_X11 ()) {
-		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW (shellHandle));
+		int /*long*/ xWindow;
+		if (OS.GTK3) {
+			xWindow = OS.gdk_x11_window_get_xid (OS.gtk_widget_get_window (shellHandle));
+		} else if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+			xWindow = OS.gdk_x11_drawable_get_xid (OS.gtk_widget_get_window	(shellHandle));
+		} else {
+			xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW (shellHandle));
+		}
 		byte[] atomName = Converter.wcsToMbcs (null, "SWT_Window_" + APP_NAME, true); //$NON-NLS-1$
 		int /*long*/ atom = OS.XInternAtom (xDisplay, atomName, false);
 		OS.XSetSelectionOwner (xDisplay, atom, xWindow, OS.CurrentTime);
@@ -1026,11 +1069,15 @@ void createDisplay (DeviceData data) {
 }
 
 Image createImage (String name) {
-	int /*long*/ style = OS.gtk_widget_get_default_style ();
 	byte[] buffer = Converter.wcsToMbcs (null, name, true);
-	int /*long*/ pixbuf = OS.gtk_icon_set_render_icon (
-		OS.gtk_icon_factory_lookup_default (buffer), style,
-		OS.GTK_TEXT_DIR_NONE, OS.GTK_STATE_NORMAL, OS.GTK_ICON_SIZE_DIALOG, 0, 0);
+	int /*long*/ pixbuf, icon_set = OS.gtk_icon_factory_lookup_default (buffer);
+	if (OS.GTK3) {
+		pixbuf = OS.gtk_icon_set_render_icon_pixbuf(icon_set, OS.gtk_widget_get_style_context(shellHandle), OS.GTK_ICON_SIZE_DIALOG);
+	} else {
+		int /*long*/ style = OS.gtk_widget_get_default_style ();
+		pixbuf = OS.gtk_icon_set_render_icon (icon_set, style,
+			OS.GTK_TEXT_DIR_NONE, OS.GTK_STATE_NORMAL, OS.GTK_ICON_SIZE_DIALOG, 0, 0);
+	}
 	if (pixbuf == 0) return null;
 	int width = OS.gdk_pixbuf_get_width (pixbuf);
 	int height = OS.gdk_pixbuf_get_height (pixbuf);
@@ -1189,7 +1236,11 @@ int /*long*/ eventProc (int /*long*/ event, int /*long*/ data) {
 		addGdkEvent (OS.gdk_event_copy (event));
 		return 0;
 	}
-	OS.gtk_main_do_event (event);
+	dispatch = true;
+	if (tracker != null) {
+		dispatch = tracker.processEvent (event);
+	}
+	if (dispatch) OS.gtk_main_do_event (event);
 	if (dispatchEvents == null) putGdkEvents ();
 	return 0;
 }
@@ -1263,6 +1314,8 @@ public Widget findWidget (int /*long*/ handle, int /*long*/ id) {
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  * 
+ * @noreference This method is not intended to be referenced by clients.
+ * 
  * @since 3.3
  */
 public Widget findWidget (Widget widget, int /*long*/ id) {
@@ -1298,11 +1351,22 @@ static int /*long*/ rendererClassInitProc (int /*long*/ g_class, int /*long*/ cl
 	GtkCellRendererClass klass = new GtkCellRendererClass ();
 	OS.memmove (klass, g_class);
 	klass.render = rendererRenderProc;
-	klass.get_size = rendererGetSizeProc;
+	if (OS.GTK3) {
+		klass.get_preferred_width = rendererGetPreferredWidthProc;
+	} else {
+		klass.get_size = rendererGetSizeProc;
+	}
 	OS.memmove (g_class, klass);
 	return 0;
 }
 
+static int /*long*/ rendererGetPreferredWidthProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ minimun_size, int /*long*/ natural_size) {
+	Display display = getCurrent ();
+	Widget widget = display.getWidget (handle);
+	if (widget != null) return widget.rendererGetPreferredWidthProc (cell, handle, minimun_size, natural_size);
+	return 0;
+}
+
 static int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
 	Display display = getCurrent ();
 	Widget widget = display.getWidget (handle);
@@ -1310,6 +1374,13 @@ static int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ handle,
 	return 0;
 }
 
+static int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ cr, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ flags) {
+	Display display = getCurrent ();
+	Widget widget = display.getWidget (handle);
+	if (widget != null) return widget.rendererRenderProc (cell, cr, handle, background_area, cell_area, flags);
+	return 0;
+}
+
 static int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
 	Display display = getCurrent ();
 	Widget widget = display.getWidget (handle);
@@ -1409,7 +1480,7 @@ public Control getCursorControl () {
 	int[] x = new int[1], y = new int[1];
 	int /*long*/ handle = 0;
 	int /*long*/ [] user_data = new int /*long*/ [1];
-	int /*long*/ window = OS.gdk_window_at_pointer (x,y);
+	int /*long*/ window = gdk_device_get_window_at_position (x,y);
 	if (window != 0) {
 		OS.gdk_window_get_user_data (window, user_data);
 		handle = user_data [0];
@@ -1509,7 +1580,7 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
 public Point getCursorLocation () {
 	checkDevice ();
 	int [] x = new int [1], y = new int [1];
-	OS.gdk_window_get_pointer (0, x, y, null);
+	gdk_window_get_device_position (0, x, y, null);
 	return new Point (x [0], y [0]);
 }
 
@@ -1678,10 +1749,8 @@ public Menu getMenuBar () {
 public int getDismissalAlignment () {
 	checkDevice ();
 	int [] buffer = new int [1];
-	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-		int /*long*/ settings = OS.gtk_settings_get_default ();
-		OS.g_object_get (settings, OS.gtk_alternative_button_order, buffer, 0);
-	}
+	int /*long*/ settings = OS.gtk_settings_get_default ();
+	OS.g_object_get (settings, OS.gtk_alternative_button_order, buffer, 0);
 	return buffer [0] == 1 ? SWT.LEFT : SWT.RIGHT;
 }
 
@@ -1761,9 +1830,13 @@ public boolean getHighContrast () {
 
 public int getDepth () {
 	checkDevice ();
-	GdkVisual visual = new GdkVisual ();
-	OS.memmove (visual, OS.gdk_visual_get_system());
-	return visual.depth;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 22, 0)) {
+		return OS.gdk_visual_get_depth(OS.gdk_visual_get_system());
+	} else {
+		GdkVisual visual = new GdkVisual ();
+		OS.memmove (visual, OS.gdk_visual_get_system());
+		return visual.depth;
+	}
 }
 
 /**
@@ -2025,6 +2098,7 @@ public Color getSystemColor (int id) {
 	checkDevice ();
 	GdkColor gdkColor = null;
 	switch (id) {
+		case SWT.COLOR_LINK_FOREGROUND: 					gdkColor = COLOR_LINK_FOREGROUND; break;
 		case SWT.COLOR_INFO_FOREGROUND: 					gdkColor = COLOR_INFO_FOREGROUND; break;
 		case SWT.COLOR_INFO_BACKGROUND: 					gdkColor = COLOR_INFO_BACKGROUND; break;
 		case SWT.COLOR_TITLE_FOREGROUND:					gdkColor = COLOR_TITLE_FOREGROUND; break;
@@ -2174,15 +2248,140 @@ public Menu getSystemMenu () {
 	return null;
 }
 
+GdkColor toGdkColor (GdkRGBA rgba) {
+	GdkColor gdkColor = new GdkColor();
+	gdkColor.red = (short)(rgba.red * 0xFFFF);
+	gdkColor.green = (short)(rgba.green * 0xFFFF);
+	gdkColor.blue = (short)(rgba.blue * 0xFFFF);
+	return gdkColor;
+}
+
+GdkColor toGdkColor (GdkRGBA rgba, double m) {
+	double[] h = new double[1];
+	double[] s = new double[1];
+	double[] v = new double[1];
+	OS.gtk_rgb_to_hsv(rgba.red, rgba.green, rgba.blue, h, s, v);
+	double L = (2 - s[0]) * v[0];
+	double S = s[0] * v[0];
+	S /= (L <= 1) ? L : 2 - L;
+	L /= 2;
+	S = Math.max(0f, Math.min(1f, S * m));
+	L = Math.max(0f, Math.min(1f, L * m));
+	L *= 2;
+	S *= L <= 1 ? L : 2 - L;
+	v[0] = (L + S) / 2;
+	s[0] = (2 * S) / (L + S);
+	OS.gtk_hsv_to_rgb(h[0], s[0], v[0], h, s, v);
+	GdkColor gdkColor = new GdkColor();
+	gdkColor.red = (short)(h[0] * 0xFFFF);
+	gdkColor.green = (short)(s[0] * 0xFFFF);
+	gdkColor.blue = (short)(v[0] * 0xFFFF);
+	return gdkColor;
+}
+
+void getBackgroundColor (int /*long*/ context, int state, GdkRGBA rgba) {
+	/*
+	* Draw the context background to an offset screen surface and get the color
+	* in the middle of the surface. 
+	*/
+	OS.gtk_style_context_save (context);
+	OS.gtk_style_context_set_state (context, state);
+	int /*long*/ surface = Cairo.cairo_image_surface_create (Cairo.CAIRO_FORMAT_RGB24, 1, 1);
+	int /*long*/ cairo = Cairo.cairo_create (surface);
+	OS.gtk_render_background (context, cairo, -50, -50, 100, 100);
+	Cairo.cairo_fill (cairo);
+	Cairo.cairo_surface_flush (surface);
+	byte[] buffer = new byte[3];
+	OS.memmove (buffer, Cairo.cairo_image_surface_get_data(surface), buffer.length);
+	rgba.red = buffer[2] / 255f;
+	rgba.green = buffer[1] / 255f;
+	rgba.blue = buffer[0] / 255f;
+	rgba.alpha = 1;
+	Cairo.cairo_surface_destroy (surface);
+	Cairo.cairo_destroy (cairo);
+	OS.gtk_style_context_restore (context);
+}
+
 void initializeSystemColors () {
-	GdkColor gdkColor;
-	
-	/* Get Tooltip resources */
 	int /*long*/ tooltipShellHandle = OS.gtk_window_new (OS.GTK_WINDOW_POPUP);
 	if (tooltipShellHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	byte[] gtk_tooltips = Converter.wcsToMbcs (null, "gtk-tooltips", true); //$NON-NLS-1$
-	OS.gtk_widget_set_name (tooltipShellHandle, gtk_tooltips);
+	byte[] gtk_tooltip = Converter.wcsToMbcs (null, OS.GTK3 ? "gtk-tooltip" : "gtk-tooltips", true); //$NON-NLS-1$
+	OS.gtk_widget_set_name (tooltipShellHandle, gtk_tooltip);
 	OS.gtk_widget_realize (tooltipShellHandle);
+	
+	/* Initialize link foreground */
+	int /*long*/ linkWidget = OS.gtk_label_new (new byte[1]);
+	if (linkWidget == 0) error (SWT.ERROR_NO_HANDLES);
+	OS.gtk_container_add (tooltipShellHandle, linkWidget);
+	int /*long*/ [] linkColor = new int /*long*/ [1];
+	OS.gtk_widget_style_get (linkWidget, OS.link_color, linkColor, 0);
+	GdkColor gdkColor = new GdkColor();
+	if (linkColor [0] != 0) {
+		OS.memmove (gdkColor, linkColor[0], GdkColor.sizeof);
+		OS.gdk_color_free (linkColor [0]);
+	} else {
+		gdkColor.blue = (short)0xeeee;
+	}
+	int /*long*/ colormap = OS.gdk_colormap_get_system();
+	OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true);
+	COLOR_LINK_FOREGROUND = gdkColor;
+
+	if (OS.GTK3) {
+		int /*long*/ context = OS.gtk_widget_get_style_context (tooltipShellHandle);
+		OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_TOOLTIP);
+		OS.gtk_style_context_invalidate(context);
+		GdkRGBA rgba = new GdkRGBA();
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_INFO_FOREGROUND = toGdkColor (rgba);
+		getBackgroundColor (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_INFO_BACKGROUND = toGdkColor (rgba);
+		OS.gtk_widget_destroy (tooltipShellHandle);	
+
+		context = OS.gtk_widget_get_style_context (shellHandle);
+		
+		COLOR_WIDGET_DARK_SHADOW = toGdkColor (new GdkRGBA());
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_WIDGET_LIGHT_SHADOW = toGdkColor (rgba);
+		COLOR_WIDGET_NORMAL_SHADOW = toGdkColor (rgba, 0.7);
+		COLOR_WIDGET_HIGHLIGHT_SHADOW = toGdkColor (rgba, 1.3);
+		
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_WIDGET_FOREGROUND = toGdkColor (rgba);
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_WIDGET_BACKGROUND = toGdkColor (rgba);
+		
+		OS.gtk_style_context_save (context);
+		OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_VIEW);
+		OS.gtk_style_context_add_class(context, OS.GTK_STYLE_CLASS_CELL);
+		OS.gtk_style_context_invalidate(context);
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_LIST_FOREGROUND = toGdkColor (rgba);
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		COLOR_LIST_BACKGROUND = toGdkColor (rgba);
+		OS.gtk_style_context_restore (context);
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba);
+		COLOR_LIST_SELECTION_TEXT = toGdkColor (rgba);
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba);
+		COLOR_LIST_SELECTION = toGdkColor (rgba);
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba);
+		COLOR_LIST_SELECTION_TEXT_INACTIVE = toGdkColor (rgba);
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_ACTIVE, rgba);
+		COLOR_LIST_SELECTION_INACTIVE = toGdkColor (rgba);
+		
+		COLOR_TITLE_FOREGROUND = COLOR_LIST_SELECTION_TEXT;
+		COLOR_TITLE_BACKGROUND = COLOR_LIST_SELECTION;
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_SELECTED, rgba);
+		COLOR_TITLE_BACKGROUND_GRADIENT = toGdkColor (rgba, 1.3);
+		
+		OS.gtk_style_context_get_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba);
+		COLOR_TITLE_INACTIVE_FOREGROUND = toGdkColor (rgba);
+		OS.gtk_style_context_get_background_color (context, OS.GTK_STATE_FLAG_INSENSITIVE, rgba);
+		COLOR_TITLE_INACTIVE_BACKGROUND = toGdkColor (rgba);
+		COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = toGdkColor (rgba, 1.3);
+		return;
+	}
+
+	/* Get Tooltip resources */
 	int /*long*/ tooltipStyle = OS.gtk_widget_get_style (tooltipShellHandle);
 	gdkColor = new GdkColor();
 	OS.gtk_style_get_fg (tooltipStyle, OS.GTK_STATE_NORMAL, gdkColor);
@@ -2231,6 +2430,12 @@ void initializeSystemColors () {
 	OS.gtk_style_get_base (style, OS.GTK_STATE_SELECTED, gdkColor);
 	COLOR_LIST_SELECTION = gdkColor;
 	gdkColor = new GdkColor();
+	OS.gtk_style_get_text (style, OS.GTK_STATE_ACTIVE, gdkColor);
+	COLOR_LIST_SELECTION_TEXT_INACTIVE = gdkColor;
+	gdkColor = new GdkColor();
+	OS.gtk_style_get_base (style, OS.GTK_STATE_ACTIVE, gdkColor);
+	COLOR_LIST_SELECTION_INACTIVE = gdkColor;
+	gdkColor = new GdkColor();
 	OS.gtk_style_get_bg (style, OS.GTK_STATE_SELECTED, gdkColor);
 	COLOR_TITLE_BACKGROUND = gdkColor;
 	gdkColor = new GdkColor();
@@ -2251,35 +2456,6 @@ void initializeSystemColors () {
 }
 
 /**
- * Returns a reasonable font for applications to use.
- * On some platforms, this will match the "default font"
- * or "system font" if such can be found.  This font
- * should not be free'd because it was allocated by the
- * system, not the application.
- * <p>
- * Typically, applications which want the default look
- * should simply not set the font on the widgets they
- * create. Widgets are always created with the correct
- * default font for the class of user-interface component
- * they represent.
- * </p>
- *
- * @return a font
- *
- * @exception SWTException <ul>
- *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
- *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
- * </ul>
- */
-public Font getSystemFont () {
-	checkDevice ();
-	if (systemFont != null) return systemFont;
-	int /*long*/ style = OS.gtk_widget_get_style (shellHandle);	
-	int /*long*/ defaultFont = OS.pango_font_description_copy (OS.gtk_style_get_font_desc (style));
-	return systemFont = Font.gtk_new (this, defaultFont);
-}
-
-/**
  * Returns the single instance of the system taskBar or null
  * when there is no system taskBar available for the platform.
  *
@@ -2400,7 +2576,7 @@ void initializeCallbacks () {
 	signalIds [Widget.ENTER_NOTIFY_EVENT] = OS.g_signal_lookup (OS.enter_notify_event, OS.GTK_TYPE_WIDGET ());
 	signalIds [Widget.EVENT] = OS.g_signal_lookup (OS.event, OS.GTK_TYPE_WIDGET ());
 	signalIds [Widget.EVENT_AFTER] = OS.g_signal_lookup (OS.event_after, OS.GTK_TYPE_WIDGET ());
-	signalIds [Widget.EXPOSE_EVENT] = OS.g_signal_lookup (OS.expose_event, OS.GTK_TYPE_WIDGET ());
+	signalIds [Widget.EXPOSE_EVENT] = OS.g_signal_lookup (OS.GTK3 ? OS.draw : OS.expose_event, OS.GTK_TYPE_WIDGET ());
 	signalIds [Widget.FOCUS] = OS.g_signal_lookup (OS.focus, OS.GTK_TYPE_WIDGET ());
 	signalIds [Widget.FOCUS_IN_EVENT] = OS.g_signal_lookup (OS.focus_in_event, OS.GTK_TYPE_WIDGET ());
 	signalIds [Widget.FOCUS_OUT_EVENT] = OS.g_signal_lookup (OS.focus_out_event, OS.GTK_TYPE_WIDGET ());
@@ -2599,6 +2775,14 @@ void initializeSubclasses () {
 	pangoLayoutNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (pangoLayoutClass);
 	OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, OS.pangoLayoutNewProc_CALLBACK(pangoLayoutNewProc));
 	OS.g_type_class_unref (pangoLayoutClass);
+
+	if (OS.GTK3) {
+		int /*long*/ imContextType = OS.GTK_TYPE_IM_MULTICONTEXT ();
+		int /*long*/ imContextClass = OS.g_type_class_ref (imContextType);
+		imContextNewProc = OS.G_OBJECT_CLASS_CONSTRUCTOR (imContextClass);
+		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (imContextClass, OS.imContextNewProc_CALLBACK(imContextNewProc));
+		OS.g_type_class_unref (imContextClass);
+	}
 }
 
 void initializeSystemSettings () {
@@ -3336,10 +3520,6 @@ void releaseDisplay () {
 	mouseHoverCallback.dispose ();
 	mouseHoverCallback = null;
 	
-	/* Dispose the default font */
-	if (systemFont != null) systemFont.dispose ();
-	systemFont = null;
-	
 	/* Dispose the System Images */
 	if (errorImage != null) errorImage.dispose();
 	if (infoImage != null) infoImage.dispose();
@@ -3365,9 +3545,10 @@ void releaseDisplay () {
 	COLOR_WIDGET_DARK_SHADOW = COLOR_WIDGET_NORMAL_SHADOW = COLOR_WIDGET_LIGHT_SHADOW =
 	COLOR_WIDGET_HIGHLIGHT_SHADOW = COLOR_WIDGET_BACKGROUND = COLOR_WIDGET_BORDER =
 	COLOR_LIST_FOREGROUND = COLOR_LIST_BACKGROUND = COLOR_LIST_SELECTION = COLOR_LIST_SELECTION_TEXT =
+	COLOR_LIST_SELECTION_INACTIVE = COLOR_LIST_SELECTION_TEXT_INACTIVE =
 	COLOR_WIDGET_FOREGROUND = COLOR_TITLE_FOREGROUND = COLOR_TITLE_BACKGROUND = COLOR_TITLE_BACKGROUND_GRADIENT =
 	COLOR_TITLE_INACTIVE_FOREGROUND = COLOR_TITLE_INACTIVE_BACKGROUND = COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT =
-	COLOR_INFO_BACKGROUND = COLOR_INFO_FOREGROUND = null;
+	COLOR_INFO_BACKGROUND = COLOR_INFO_FOREGROUND = COLOR_LINK_FOREGROUND = null;
 
 	/* Dispose the event callback */
 	OS.gdk_event_handler_set (0, 0, 0);
@@ -3387,6 +3568,13 @@ void releaseDisplay () {
 	OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (pangoLayoutClass, pangoLayoutNewProc);
 	OS.g_type_class_unref (pangoLayoutClass);
 	pangoLayoutNewProc = 0;
+	if (OS.GTK3) {
+		int /*long*/ imContextType = OS.GTK_TYPE_IM_MULTICONTEXT ();
+		int /*long*/ imContextClass = OS.g_type_class_ref (imContextType);
+		OS.G_OBJECT_CLASS_SET_CONSTRUCTOR (imContextClass, imContextNewProc);
+		OS.g_type_class_unref (imContextClass);
+		imContextNewProc = 0;
+	}
 	
 	/* Release the sleep resources */
 	max_priority = timeout = null;
@@ -3957,15 +4145,24 @@ void showIMWindow (Control control) {
 	if (preeditString [0] != 0 && OS.strlen (preeditString [0]) > 0) {
 		Control widget = control.findBackgroundControl ();
 		if (widget == null) widget = control;
-		OS.gtk_widget_modify_bg (preeditWindow,  OS.GTK_STATE_NORMAL, widget.getBackgroundColor ());
+		GdkColor color = widget.getBackgroundColor ();
+		if (OS.GTK3) {
+			widget.setBackgroundColor (preeditWindow, color);
+		} else {
+			OS.gtk_widget_modify_bg (preeditWindow,  OS.GTK_STATE_NORMAL, color);
+		}
 		widget.setForegroundColor (preeditLabel, control.getForegroundColor());
-		OS.gtk_widget_modify_font (preeditLabel, control.getFontDescription ());
+		widget.setFontDescription (preeditLabel, control.getFontDescription ());
 		if (pangoAttrs [0] != 0) OS.gtk_label_set_attributes (preeditLabel, pangoAttrs[0]);
 		OS.gtk_label_set_text (preeditLabel, preeditString [0]);
 		Point point = control.toDisplay (control.getIMCaretPos ());
 		OS.gtk_window_move (preeditWindow, point.x, point.y);		
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (preeditLabel, requisition);
+		if (OS.GTK3) {
+			OS.gtk_widget_get_preferred_size (preeditLabel, requisition, null);
+		} else {
+			OS.gtk_widget_size_request (preeditLabel, requisition);
+		}
 		OS.gtk_window_resize (preeditWindow, requisition.width, requisition.height);
 		OS.gtk_widget_show (preeditWindow);
 	} else {
@@ -4160,10 +4357,6 @@ void saveResources () {
 		System.arraycopy (resources, 0, newResources, 0, resourceCount);
 		resources = newResources;
 	}
-	if (systemFont != null) {
-		resources [resourceCount++] = systemFont;
-		systemFont = null;
-	}
 	if (errorImage != null) resources [resourceCount++] = errorImage;
 	if (infoImage != null) resources [resourceCount++] = infoImage;
 	if (questionImage != null) resources [resourceCount++] = questionImage;
@@ -4220,7 +4413,14 @@ int /*long*/ signalProc (int /*long*/ gobject, int /*long*/ arg1, int /*long*/ u
 				byte[] name = Converter.wcsToMbcs (null, "org.eclipse.swt.filePath.message", true); //$NON-NLS-1$
 				int /*long*/ atom = OS.gdk_x11_atom_to_xatom (OS.gdk_atom_intern (name, true));
 				if (atom == OS.gdk_x11_atom_to_xatom (gdkEvent.atom)) {
-					int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW( shellHandle));
+					int /*long*/ xWindow; 
+					if (OS.GTK3) {
+						xWindow = OS.gdk_x11_window_get_xid (OS.gtk_widget_get_window (shellHandle));
+					} else if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+						xWindow = OS.gdk_x11_drawable_get_xid (OS.gtk_widget_get_window( shellHandle));
+					} else {
+						xWindow = OS.gdk_x11_drawable_get_xid (OS.GTK_WIDGET_WINDOW( shellHandle));
+					}
 					int /*long*/ [] type = new int /*long*/ [1];
 					int [] format = new int [1];
 					int [] nitems = new int [1];
@@ -4387,4 +4587,32 @@ int /*long*/ windowTimerProc (int /*long*/ handle) {
 	return widget.timerProc (handle);
 }
 
+int /*long*/ gdk_window_get_device_position (int /*long*/ window, int[] x, int[] y, int[] mask) {
+	if (OS.GTK3) {
+		int /*long*/ display = 0;
+		if( window != 0) {
+			display = OS.gdk_window_get_display (window);
+		} else {
+			window = OS.gdk_get_default_root_window ();
+			display = OS.gdk_window_get_display (window);
+		}
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (display);
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager);
+		return OS.gdk_window_get_device_position(window, pointer, x, y, mask);
+	} else {
+		return OS.gdk_window_get_pointer (window, x, y, mask);
+	}
+}
+
+int /*long*/ gdk_device_get_window_at_position (int[] win_x, int[] win_y) {
+	if (OS.GTK3) {
+		int /*long*/ display = OS.gdk_display_get_default ();
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (display);
+		int /*long*/ device = OS.gdk_device_manager_get_client_pointer (device_manager);
+		return OS.gdk_device_get_window_at_position (device, win_x, win_y);
+	} else {
+		return OS.gdk_window_at_pointer (win_x, win_y);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/widgets/EventTable.java b/org/eclipse/swt/widgets/EventTable.java
index a9cda7b..b391c56 100644
--- a/org/eclipse/swt/widgets/EventTable.java
+++ b/org/eclipse/swt/widgets/EventTable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/ExpandBar.java b/org/eclipse/swt/widgets/ExpandBar.java
index cd9e405..ff0316a 100644
--- a/org/eclipse/swt/widgets/ExpandBar.java
+++ b/org/eclipse/swt/widgets/ExpandBar.java
@@ -129,8 +129,8 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
-	handle = OS.gtk_vbox_new (false, 0);
+	gtk_widget_set_has_window (fixedHandle, true);
+	handle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	if ((style & SWT.V_SCROLL) != 0) {
 		scrolledHandle = OS.gtk_scrolled_window_new (0, 0);
@@ -437,7 +437,7 @@ void setScrollbar () {
 	if (item.expanded) maxHeight += item.height;
 	int /*long*/ adjustmentHandle = OS.gtk_scrolled_window_get_vadjustment (scrolledHandle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
+	gtk_adjustment_get (adjustmentHandle, adjustment);
 	yCurrentScroll = (int)adjustment.value;
 
 	//claim bottom free space
@@ -449,15 +449,21 @@ void setScrollbar () {
 	adjustment.value = Math.min (yCurrentScroll, maxHeight);
 	adjustment.upper = maxHeight;
 	adjustment.page_size = height;
-	OS.memmove (adjustmentHandle, adjustment);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	gtk_adjustment_configure (adjustmentHandle, adjustment);
 	int policy = maxHeight > height ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;
 	OS.gtk_scrolled_window_set_policy (scrolledHandle, OS.GTK_POLICY_NEVER, policy);
-	int width = OS.GTK_WIDGET_WIDTH (fixedHandle) - spacing * 2;
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (fixedHandle, allocation);
+	int width = allocation.width - spacing * 2;
 	if (policy == OS.GTK_POLICY_ALWAYS) {
-		int /*long*/ vHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
+		int /*long*/ vHandle = 0;
+		if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
+			vHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
+		} else {
+			vHandle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
+		}
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (vHandle, requisition);
+		gtk_widget_get_preferred_size (vHandle, requisition);
 		width -= requisition.width;
 	}
 	width = Math.max (0,  width);
diff --git a/org/eclipse/swt/widgets/ExpandItem.java b/org/eclipse/swt/widgets/ExpandItem.java
index 5bd8366..f2a49b3 100644
--- a/org/eclipse/swt/widgets/ExpandItem.java
+++ b/org/eclipse/swt/widgets/ExpandItem.java
@@ -127,7 +127,7 @@ void createHandle (int index) {
 	clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (handle, clientHandle);	
-	boxHandle = OS.gtk_hbox_new (false, 4);
+	boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 4);
 	if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	labelHandle = OS.gtk_label_new (null);
 	if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -136,7 +136,7 @@ void createHandle (int index) {
 	OS.gtk_container_add (boxHandle, imageHandle);
 	OS.gtk_container_add (boxHandle, labelHandle);
 	OS.gtk_expander_set_label_widget (handle, boxHandle);
-	OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (handle, true);
 }
 
 void createWidget (int index) {
@@ -265,7 +265,9 @@ public boolean getExpanded () {
  */
 public int getHeaderHeight () {
 	checkWidget ();
-	return OS.GTK_WIDGET_HEIGHT (handle) - (expanded ? height : 0);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	return allocation.height - (expanded ? height : 0);
 }
 
 /**
@@ -323,7 +325,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 }
 
 int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
-	OS.GTK_WIDGET_UNSET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (handle, false);
 	parent.lastFocus = this;
 	return 0;
 }
@@ -339,7 +341,7 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) {
 }
 
 boolean hasFocus () {
-	return OS.GTK_WIDGET_HAS_FOCUS (handle);
+	return gtk_widget_has_focus (handle);
 }
 
 void hookEvents () {
@@ -381,11 +383,13 @@ void resizeControl (int yScroll) {
 	if (control != null && !control.isDisposed ()) {
 		boolean visible = OS.gtk_expander_get_expanded (handle);
 		if (visible) {
-			int x = OS.GTK_WIDGET_X (clientHandle);
-			int y = OS.GTK_WIDGET_Y (clientHandle);
+			GtkAllocation allocation = new GtkAllocation ();
+			gtk_widget_get_allocation (clientHandle, allocation);
+			int x = allocation.x;
+			int y = allocation.y;
 			if (x != -1 && y != -1) {
-				int width = OS.GTK_WIDGET_WIDTH (clientHandle);
-				int height = OS.GTK_WIDGET_HEIGHT (clientHandle);
+				int width = allocation.width;
+				int height = allocation.height;	
 				int [] property = new int [1];
 				OS.gtk_widget_style_get (handle, OS.focus_line_width, property, 0);				
 				y += property [0] * 2;
@@ -401,8 +405,9 @@ void resizeControl (int yScroll) {
 				*/
 				ScrollBar vBar = parent.verticalBar;
 				if (vBar != null) {
-					if (OS.GTK_WIDGET_VISIBLE (vBar.handle)) {
-						width = OS.GTK_WIDGET_WIDTH (parent.scrolledHandle) - parent.vScrollBarWidth () - 2 * parent.spacing;
+					if (gtk_widget_get_visible (vBar.handle)) {
+						gtk_widget_get_allocation (parent.scrolledHandle, allocation);
+						width = allocation.width - parent.vScrollBarWidth () - 2 * parent.spacing;	
 					}
 				}
 				control.setBounds (x, y - yScroll, width, Math.max (0, height), true, true);
@@ -481,19 +486,19 @@ public void setExpanded (boolean expanded) {
 
 boolean setFocus () {
 	if (!OS.gtk_widget_get_child_visible (handle)) return false;
-	OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_can_focus (handle, true);
 	OS.gtk_widget_grab_focus (handle);
 	// widget could be disposed at this point
 	if (isDisposed ()) return false;
 	boolean result = OS.gtk_widget_is_focus (handle);
-	if (!result) OS.GTK_WIDGET_UNSET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	if (!result) gtk_widget_set_can_focus (handle, false);
 	return result;
 }
 
 void setFontDescription (int /*long*/ font) {
-	OS.gtk_widget_modify_font (handle, font);
-	if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font);
-	if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font);
+	setFontDescription (handle, font);
+	if (labelHandle != 0) setFontDescription (labelHandle, font);
+	if (imageHandle != 0) setFontDescription (imageHandle, font);
 }
 
 void setForegroundColor (GdkColor color) {
@@ -530,11 +535,11 @@ public void setImage (Image image) {
 		imageList = new ImageList ();
 		int imageIndex = imageList.add (image);
 		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf (imageHandle, pixbuf);
 		if (text.length () == 0) OS.gtk_widget_hide (labelHandle);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_show (labelHandle);
 		OS.gtk_widget_hide (imageHandle);
 	}
diff --git a/org/eclipse/swt/widgets/FileDialog.java b/org/eclipse/swt/widgets/FileDialog.java
index 0a0c755..ff96539 100644
--- a/org/eclipse/swt/widgets/FileDialog.java
+++ b/org/eclipse/swt/widgets/FileDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -119,8 +119,9 @@ String computeResultChooserDialog () {
 				utf8Ptr = name;
 			} else {
 				utf8Ptr = OS.g_filename_to_utf8 (name, -1, null, null, null);
-				OS.g_free (name);
+				if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (name);
 			}
+			if (name != utf8Ptr) OS.g_free (name);
 			if (utf8Ptr != 0) {
 				int /*long*/ [] items_written = new int /*long*/ [1];
 				int /*long*/ utf16Ptr = OS.g_utf8_to_utf16 (utf8Ptr, -1, null, items_written, null);
@@ -150,7 +151,8 @@ String computeResultChooserDialog () {
 			int /*long*/ path = OS.gtk_file_chooser_get_filename (handle);
 			if (path != 0) {
 				utf8Ptr = OS.g_filename_to_utf8 (path, -1, null, null, null);
-				OS.g_free (path);
+				if (utf8Ptr == 0) utf8Ptr = OS.g_filename_display_name (path);
+				if (path != utf8Ptr) OS.g_free (path);
 			}
 		}
 		if (utf8Ptr != 0) {
diff --git a/org/eclipse/swt/widgets/FontDialog.java b/org/eclipse/swt/widgets/FontDialog.java
index 81e2e1d..5bde1b1 100644
--- a/org/eclipse/swt/widgets/FontDialog.java
+++ b/org/eclipse/swt/widgets/FontDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -155,7 +155,7 @@ public FontData open () {
 	byte [] titleBytes;
 	titleBytes = Converter.wcsToMbcs (null, title, true);
 	Display display = parent != null ? parent.getDisplay (): Display.getCurrent ();
-	handle = OS.gtk_font_selection_dialog_new (titleBytes);
+	handle = gtk_font_chooser_dialog_new (titleBytes);
 	if (parent!=null) {
 		int /*long*/ shellHandle = parent.topHandle ();
 		OS.gtk_window_set_transient_for(handle, shellHandle);
@@ -178,7 +178,7 @@ public FontData open () {
 		OS.memmove (buffer, fontName, length);
 		font.dispose();
 		OS.g_free (fontName);
-		OS.gtk_font_selection_dialog_set_font_name (handle, buffer);
+		gtk_font_chooser_set_font (handle, buffer);
 	}
 	display.addIdleProc ();
 	Dialog oldModal = null;
@@ -208,7 +208,7 @@ public FontData open () {
 	}
 	boolean success = response == OS.GTK_RESPONSE_OK; 
 	if (success) {
-		int /*long*/ fontName = OS.gtk_font_selection_dialog_get_font_name (handle);
+		int /*long*/ fontName = gtk_font_chooser_get_font (handle);
 		int length = OS.strlen (fontName);
 		byte [] buffer = new byte [length + 1];
 		OS.memmove (buffer, fontName, length);
@@ -284,4 +284,30 @@ public void setFontList (FontData [] fontData) {
 public void setRGB (RGB rgb) {
 	this.rgb = rgb;
 }
+
+int /*long*/ gtk_font_chooser_get_font(int /*long*/ fontchooser) {
+	if (OS.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
+		return OS.gtk_font_chooser_get_font(fontchooser);
+	} else {
+		return OS.gtk_font_selection_dialog_get_font_name(fontchooser);
+	}
+}
+
+int /*long*/ gtk_font_chooser_dialog_new (byte[] title) {
+	if (OS.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
+		return OS.gtk_font_chooser_dialog_new (title, 0);
+	} else {
+		return OS.gtk_font_selection_dialog_new (title);
+	}
+}
+
+
+void gtk_font_chooser_set_font(int /*long*/ fsd, byte[] fontname) {
+	if (OS.GTK_VERSION >= OS.VERSION(3, 2, 0)) {
+		OS.gtk_font_chooser_set_font(fsd, fontname);
+	} else {
+		OS.gtk_font_selection_dialog_set_font_name(fsd, fontname);
+	}
+}
+
 }
diff --git a/org/eclipse/swt/widgets/Group.java b/org/eclipse/swt/widgets/Group.java
index 40e6c20..a928c68 100644
--- a/org/eclipse/swt/widgets/Group.java
+++ b/org/eclipse/swt/widgets/Group.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -109,8 +109,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget();
 	forceResize ();
-	int clientX = OS.GTK_WIDGET_X (clientHandle);
-	int clientY = OS.GTK_WIDGET_Y (clientHandle);
+	GtkAllocation allocation = new GtkAllocation();
+	gtk_widget_get_allocation (clientHandle, allocation);
+	int clientX = allocation.x;
+	int clientY = allocation.y;
 	x -= clientX;
 	y -= clientY;
 	width += clientX + clientX;
@@ -122,15 +124,21 @@ void createHandle(int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	handle = OS.gtk_frame_new (null);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	labelHandle = OS.gtk_label_new (null);
 	if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.g_object_ref (labelHandle);
-	OS.gtk_object_sink (labelHandle);
+	g_object_ref_sink (labelHandle);
 	clientHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (clientHandle == 0) error (SWT.ERROR_NO_HANDLES);
+	if (OS.GTK3) {
+		OS.gtk_widget_override_background_color (clientHandle, OS.GTK_STATE_FLAG_NORMAL, new GdkRGBA ());
+		int /*long*/ region = OS.gdk_region_new ();
+		OS.gtk_widget_input_shape_combine_region (clientHandle, region);
+		OS.gdk_region_destroy (region);
+	}
 	OS.gtk_container_add (fixedHandle, handle);
 	OS.gtk_container_add (handle, clientHandle);
 	if ((style & SWT.SHADOW_IN) != 0) {
@@ -229,7 +237,7 @@ void setBackgroundColor (GdkColor color) {
 
 void setFontDescription (int /*long*/ font) {
 	super.setFontDescription (font);
-	OS.gtk_widget_modify_font (labelHandle, font);
+	setFontDescription (labelHandle, font);
 }
 
 void setForegroundColor (GdkColor color) {
diff --git a/org/eclipse/swt/widgets/IME.java b/org/eclipse/swt/widgets/IME.java
index 4a4e2c0..eecbc71 100644
--- a/org/eclipse/swt/widgets/IME.java
+++ b/org/eclipse/swt/widgets/IME.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/Item.java b/org/eclipse/swt/widgets/Item.java
index 282bff2..0d2c269 100644
--- a/org/eclipse/swt/widgets/Item.java
+++ b/org/eclipse/swt/widgets/Item.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -183,4 +183,13 @@ public void setText (String string) {
 	text = string;
 }
 
+boolean updateTextDirection(int textDirection) {
+	if (((style  & SWT.FLIP_TEXT_DIRECTION) ^ textDirection) != 0) {
+		style ^= SWT.FLIP_TEXT_DIRECTION;
+		return true;
+	}
+	return false;
+}
+
+
 }
diff --git a/org/eclipse/swt/widgets/Label.java b/org/eclipse/swt/widgets/Label.java
index 3bceccd..7d91a26 100644
--- a/org/eclipse/swt/widgets/Label.java
+++ b/org/eclipse/swt/widgets/Label.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -129,7 +129,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	* The fix is to use pango layout directly instead of the label size request 
 	* to calculate its preferred size.
 	*/
-	boolean fixWrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && (OS.GTK_WIDGET_FLAGS (labelHandle) & OS.GTK_VISIBLE) != 0;
+	boolean fixWrap = labelHandle != 0 && (style & SWT.WRAP) != 0 && gtk_widget_get_visible (labelHandle);
 	if (fixWrap || frameHandle != 0) forceResize ();
 	if (fixWrap) {
 		int /*long*/ labelLayout = OS.gtk_label_get_layout (labelHandle);
@@ -140,7 +140,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 			OS.pango_layout_set_width (labelLayout, -1);
 		}
 		int [] w = new int [1], h = new int [1];
-		OS.pango_layout_get_size (labelLayout, w, h);
+		OS.pango_layout_get_pixel_size (labelLayout, w, h);
 		OS.pango_layout_set_width (labelLayout, pangoWidth);
 		if (frameHandle != 0) {
 			int [] labelWidth = new int [1], labelHeight = new int [1];
@@ -153,8 +153,8 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 		} else { 
 			size = new Point (0,0);
 		}
-		size.x += wHint == SWT.DEFAULT ? OS.PANGO_PIXELS(w [0]) : wHint;
-		size.y += hHint == SWT.DEFAULT ? OS.PANGO_PIXELS(h [0]) : hHint;
+		size.x += wHint == SWT.DEFAULT ? w [0] : wHint;
+		size.y += hHint == SWT.DEFAULT ? h [0] : hHint;
 	} else {
 		if (frameHandle != 0) {
 			int [] reqWidth = new int [1], reqHeight = new int [1];
@@ -189,8 +189,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 		OS.g_object_get (labelHandle, OS.ypad, buffer, 0);
 		fontHeight += 2 * buffer [0];
 		if (frameHandle != 0) {
-			int /*long*/ style = OS.gtk_widget_get_style (frameHandle);
-			fontHeight += 2 * OS.gtk_style_get_ythickness (style);
+			fontHeight += 2 * getThickness (frameHandle).y;
 			fontHeight += 2 * OS.gtk_container_get_border_width (frameHandle);
 		}
 		size.y = Math.max (size.y, fontHeight);
@@ -202,16 +201,16 @@ void createHandle (int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	if ((style & SWT.SEPARATOR) != 0) {
 		if ((style & SWT.HORIZONTAL)!= 0) {
-			handle = OS.gtk_hseparator_new ();
+			handle = gtk_separator_new (OS.GTK_ORIENTATION_HORIZONTAL);
 		} else {
-			handle = OS.gtk_vseparator_new ();
+			handle = gtk_separator_new (OS.GTK_ORIENTATION_VERTICAL);
 		}
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	} else {
-		handle = OS.gtk_hbox_new (false, 0);
+		handle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 		labelHandle = OS.gtk_label_new_with_mnemonic (null);
 		if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -219,6 +218,8 @@ void createHandle (int index) {
 		if (imageHandle == 0) error (SWT.ERROR_NO_HANDLES);
 		OS.gtk_container_add (handle, labelHandle);
 		OS.gtk_container_add (handle, imageHandle);
+		OS.gtk_box_set_child_packing(handle, labelHandle, true, true, 0, OS.GTK_PACK_START);
+		OS.gtk_box_set_child_packing(handle, imageHandle, true, true, 0, OS.GTK_PACK_START);
 	}
 	if ((style & SWT.BORDER) != 0) {
 		frameHandle = OS.gtk_frame_new (null);
@@ -281,7 +282,7 @@ public int getAlignment () {
 public int getBorderWidth () {
 	checkWidget();
 	if (frameHandle != 0) {
-		return OS.gtk_style_get_xthickness (OS.gtk_widget_get_style (frameHandle));
+		return getThickness (frameHandle).x;
 	}
 	return 0;
 }
@@ -383,8 +384,14 @@ void releaseWidget () {
 }
 
 void resizeHandle (int width, int height) {
-	OS.gtk_widget_set_size_request (fixedHandle, width, height);
-	OS.gtk_widget_set_size_request (frameHandle != 0 ? frameHandle : handle, width, height);
+	if (OS.GTK3) {
+		OS.swt_fixed_resize (OS.gtk_widget_get_parent (fixedHandle), fixedHandle, width, height);
+		int /*long*/ child = frameHandle != 0 ? frameHandle : handle;
+		OS.swt_fixed_resize (OS.gtk_widget_get_parent (child), child, width, height);
+	} else {
+		OS.gtk_widget_set_size_request (fixedHandle, width, height);
+		OS.gtk_widget_set_size_request (frameHandle != 0 ? frameHandle : handle, width, height);
+	}
 }
 
 /**
@@ -465,18 +472,18 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* resized so that it will draw wrapped.
 	*/
 	if (fixWrap) {
-		int labelWidth = OS.GTK_WIDGET_WIDTH (handle);
-		int labelHeight = OS.GTK_WIDGET_HEIGHT (handle);
+		GtkAllocation allocation = new GtkAllocation();
+		gtk_widget_get_allocation (handle, allocation);
+		int labelWidth = allocation.width;
+		int labelHeight = allocation.height;
 		OS.gtk_widget_set_size_request (labelHandle, labelWidth, labelHeight);
 		/*
 		* Bug in GTK.  Setting the size request should invalidate the label's
 		* layout, but it does not.  The fix is to resize the label directly. 
 		*/
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (labelHandle, requisition);
-		GtkAllocation allocation = new GtkAllocation ();
-		allocation.x = OS.GTK_WIDGET_X (labelHandle);
-		allocation.y = OS.GTK_WIDGET_Y (labelHandle);
+		gtk_widget_get_preferred_size (labelHandle, requisition);
+		gtk_widget_get_allocation(labelHandle, allocation);
 		allocation.width = labelWidth;
 		allocation.height = labelHeight;
 		OS.gtk_widget_size_allocate (labelHandle, allocation);
@@ -486,8 +493,8 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 
 void setFontDescription (int /*long*/ font) {
 	super.setFontDescription (font);
-	if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font);
-	if (imageHandle != 0) OS.gtk_widget_modify_font (imageHandle, font);
+	if (labelHandle != 0) setFontDescription (labelHandle, font);
+	if (imageHandle != 0) setFontDescription (imageHandle, font);
 }
 
 void setForegroundColor (GdkColor color) {
@@ -530,11 +537,11 @@ public void setImage (Image image) {
 		imageList = new ImageList ();
 		int imageIndex = imageList.add (image);
 		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf (imageHandle, pixbuf);
 		OS.gtk_widget_hide (labelHandle);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_show (labelHandle);
 		OS.gtk_widget_hide (imageHandle);
 	}
@@ -584,4 +591,18 @@ void showWidget () {
 	if (frameHandle != 0) OS.gtk_widget_show (frameHandle);
 	if (labelHandle != 0) OS.gtk_widget_show (labelHandle);
 }
+
+int /*long*/ gtk_separator_new (int orientation) {
+	int /*long*/ separator = 0;
+	if (OS.GTK3) {
+		separator = OS.gtk_separator_new (orientation);
+	} else {
+		if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) {
+			separator = OS.gtk_hseparator_new ();
+		} else {
+			separator = OS.gtk_vseparator_new ();
+		}
+	}
+	return separator;
+}
 }
diff --git a/org/eclipse/swt/widgets/Layout.java b/org/eclipse/swt/widgets/Layout.java
index 5c8f3c2..fc2cd54 100644
--- a/org/eclipse/swt/widgets/Layout.java
+++ b/org/eclipse/swt/widgets/Layout.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/Link.java b/org/eclipse/swt/widgets/Link.java
index 8fee01a..47b0102 100644
--- a/org/eclipse/swt/widgets/Link.java
+++ b/org/eclipse/swt/widgets/Link.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -48,7 +48,6 @@ public class Link extends Control {
 	int [] mnemonics;
 	int focusIndex;
 	
-	static final RGB LINK_FOREGROUND = new RGB (0, 51, 153);
 	static final RGB LINK_DISABLED_FOREGROUND = new RGB (172, 168, 153);
 	
 /**
@@ -145,10 +144,10 @@ void createHandle(int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (handle, true);
-	OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_has_window (handle, true);
+	gtk_widget_set_can_focus (handle, true);
 	layout = new TextLayout (display);
-	linkColor = new Color (display, LINK_FOREGROUND);
+	linkColor = display.getSystemColor(SWT.COLOR_LINK_FOREGROUND);
 	disabledColor = new Color (display, LINK_DISABLED_FOREGROUND);
 	offsets = new Point [0];
 	ids = new String [0];
@@ -164,6 +163,26 @@ void createWidget (int index) {
 	initAccessible ();
 }
 
+void drawWidget(GC gc) {
+	int selStart = selection.x;
+	int selEnd = selection.y;
+	if (selStart > selEnd) {
+		selStart = selection.y;
+		selEnd = selection.x;
+	}
+	// temporary code to disable text selection
+	selStart = selEnd = -1;
+	if ((state & DISABLED) != 0) gc.setForeground (disabledColor);
+	layout.draw (gc, 0, 0, selStart, selEnd, null, null);
+	if (hasFocus () && focusIndex != -1) {
+		Rectangle [] rects = getRectangles (focusIndex);
+		for (int i = 0; i < rects.length; i++) {
+			Rectangle rect = rects [i];
+			gc.drawFocus (rect.x, rect.y, rect.width, rect.height);					
+		}
+	}
+}
+
 void enableWidget (boolean enabled) {
 	super.enableWidget (enabled);
 	if (isDisposed ()) return;
@@ -262,7 +281,10 @@ Rectangle [] getRectangles (int linkIndex) {
 }
 
 int getClientWidth () {
-	return (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);
+	if ((state & ZERO_WIDTH) != 0) return 0;
+	GtkAllocation allocation = new GtkAllocation();
+	gtk_widget_get_allocation (handle, allocation);
+	return allocation.width;
 }
 
 /**
@@ -356,46 +378,6 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 	return result;
 }
 
-int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
-	if ((state & OBSCURED) != 0) return 0;
-	GdkEventExpose gdkEvent = new GdkEventExpose ();
-	OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
-	GCData data = new GCData ();
-	data.damageRgn = gdkEvent.region;
-	GC gc = GC.gtk_new (this, data);
-	int selStart = selection.x;
-	int selEnd = selection.y;
-	if (selStart > selEnd) {
-		selStart = selection.y;
-		selEnd = selection.x;
-	}
-	// temporary code to disable text selection
-	selStart = selEnd = -1;
-	if ((state & DISABLED) != 0) gc.setForeground (disabledColor);
-	layout.draw (gc, 0, 0, selStart, selEnd, null, null);
-	if (hasFocus () && focusIndex != -1) {
-		Rectangle [] rects = getRectangles (focusIndex);
-		for (int i = 0; i < rects.length; i++) {
-			Rectangle rect = rects [i];
-			gc.drawFocus (rect.x, rect.y, rect.width, rect.height);					
-		}
-	}
-	if (hooks (SWT.Paint) || filters (SWT.Paint)) {
-		Event event = new Event ();
-		event.count = gdkEvent.count;
-		event.x = gdkEvent.area_x;
-		event.y = gdkEvent.area_y;
-		event.width = gdkEvent.area_width;
-		event.height = gdkEvent.area_height;
-		if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth () - event.width - event.x;
-		event.gc = gc;
-		sendEvent (SWT.Paint, event);
-		event.gc = null;
-	}
-	gc.dispose ();
-	return 0;
-}
-
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	int /*long*/ result = super.gtk_key_press_event (widget, eventPtr);
 	if (result != 0) return result;
@@ -463,6 +445,10 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
 	return result;
 }
 
+boolean hooksPaint () {
+	return true;
+}
+
 boolean mnemonicHit (char key) {
 	char uckey = Character.toUpperCase (key);
 	String parsedText = layout.getText();
@@ -499,7 +485,6 @@ void releaseWidget () {
 	super.releaseWidget ();
 	if (layout != null)	layout.dispose ();
 	layout = null;
-	if (linkColor != null)	linkColor.dispose ();
 	linkColor = null;
 	if (disabledColor != null) disabledColor.dispose ();
 	disabledColor = null;
diff --git a/org/eclipse/swt/widgets/List.java b/org/eclipse/swt/widgets/List.java
index 9ee8e08..62f86ac 100644
--- a/org/eclipse/swt/widgets/List.java
+++ b/org/eclipse/swt/widgets/List.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -189,7 +189,7 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	scrolledHandle = OS.gtk_scrolled_window_new (0, 0);
 	if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	/*
@@ -491,7 +491,13 @@ public int getItemHeight () {
 	if (itemCount == 0) {
 		int [] w = new int [1], h = new int [1];
 		OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
-		return h [0];
+		int height = h [0];
+		if (OS.GTK3) {
+			int /*long*/ textRenderer = getTextRenderer (column);
+			OS.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
+			height += h [0];
+		}
+		return height;
 	} else {
 		int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
 		OS.gtk_tree_model_get_iter_first (modelHandle, iter);
@@ -662,6 +668,29 @@ public int [] getSelectionIndices () {
 	return new int [0];
 }
 
+int /*long*/ getTextRenderer (int /*long*/ column) {
+	int /*long*/ list = 0;
+	if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
+		list = OS.gtk_cell_layout_get_cells(column);
+	} else {
+		list = OS.gtk_tree_view_column_get_cell_renderers (column);
+	}
+	if (list == 0) return 0;
+	int count = OS.g_list_length (list);
+	int /*long*/ textRenderer = 0;
+	int i = 0;
+	while (i < count) {
+		int /*long*/ renderer = OS.g_list_nth_data (list, i);
+		 if (OS.GTK_IS_CELL_RENDERER_TEXT (renderer)) {
+			textRenderer = renderer;
+			break;
+		}
+		i++;
+	}
+	OS.g_list_free (list);
+	return textRenderer;
+}
+
 /**
  * Returns the zero-relative index of the item which is currently
  * at the top of the receiver. This index can change when items are
@@ -761,7 +790,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	* it finishes processing a button press.  The fix is to give
 	* focus to the widget before it starts processing the event.
 	*/
-	if (!OS.GTK_WIDGET_HAS_FOCUS (handle)) {
+	if (!gtk_widget_has_focus (handle)) {
 		OS.gtk_widget_grab_focus (handle);
 	}
 	return result;
@@ -1225,7 +1254,9 @@ void selectFocusIndex (int index) {
 
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	OS.gtk_widget_modify_base (handle, 0, color);
+	if (!OS.GTK3) {
+		OS.gtk_widget_modify_base (handle, 0, color);
+	}
 }
 
 int setBounds (int x, int y, int width, int height, boolean move, boolean resize) {
@@ -1239,14 +1270,6 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* after it has been resized.
 	*/
 	OS.gtk_widget_realize (handle);
-	/*
-	* Bug in GTK.  An empty GtkTreeView fails to repaint the focus rectangle
-	* correctly when resized on versions before 2.6.0.  The fix is to force
-	* the widget to redraw.
-	*/
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0) && OS.gtk_tree_model_iter_n_children (modelHandle, 0) == 0) {
-		redraw (false);
-	}
 	return result;
 }
 
@@ -1314,10 +1337,15 @@ public void setItems (String [] items) {
 	OS.g_free (iter);
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 /**
  * Selects the item at the given zero-relative index in the receiver. 
  * If the item at the index was already selected, it remains selected.
- * The current selection is first cleared, then the new item is selected.
+ * The current selection is first cleared, then the new item is selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * Indices that are out of range are ignored.
  *
  * @param index the index of the item to select
@@ -1339,7 +1367,8 @@ public void setSelection (int index) {
 /**
  * Selects the items in the range specified by the given zero-relative
  * indices in the receiver. The range of indices is inclusive.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Indices that are out of range are ignored and no items will be selected
  * if start is greater than end.
@@ -1374,7 +1403,8 @@ public void setSelection (int start, int end) {
 
 /**
  * Selects the items at the given zero-relative indices in the receiver.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Indices that are out of range and duplicate indices are ignored.
  * If the receiver is single-select and multiple indices are specified,
@@ -1408,7 +1438,8 @@ public void setSelection(int[] indices) {
 
 /**
  * Sets the receiver's selection to be the given array of items.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Items that are not in the receiver are ignored.
  * If the receiver is single-select and multiple items are specified,
@@ -1533,7 +1564,7 @@ public void showSelection () {
 	OS.gtk_tree_view_get_cell_area (handle, path, 0, cellRect);
 	int[] tx = new int[1], ty = new int[1];
 	if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
-		OS.gtk_tree_view_convert_widget_to_bin_window_coords(handle, cellRect.x, cellRect.y, tx, ty);
+		OS.gtk_tree_view_convert_bin_window_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 	} else {
 		OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 	}
diff --git a/org/eclipse/swt/widgets/Listener.java b/org/eclipse/swt/widgets/Listener.java
index b02efa2..6d37dab 100644
--- a/org/eclipse/swt/widgets/Listener.java
+++ b/org/eclipse/swt/widgets/Listener.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/Menu.java b/org/eclipse/swt/widgets/Menu.java
index 8bd1039..6109249 100644
--- a/org/eclipse/swt/widgets/Menu.java
+++ b/org/eclipse/swt/widgets/Menu.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -193,7 +193,7 @@ static int checkStyle (int style) {
 }
 
 void _setVisible (boolean visible) {
-	if (visible == OS.GTK_WIDGET_MAPPED (handle)) return;
+	if (visible == gtk_widget_get_mapped (handle)) return;
 	if (visible) {
 		sendEvent (SWT.Show);
 		if (getItemCount () != 0) {
@@ -372,16 +372,18 @@ void fixMenus (Decorations newParent) {
 
 /*public*/ Rectangle getBounds () {
 	checkWidget();
-	if (!OS.GTK_WIDGET_MAPPED (handle)) {
+	if (!gtk_widget_get_mapped (handle)) {
 		return new Rectangle (0, 0, 0, 0);
 	}
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
+	int /*long*/ window = gtk_widget_get_window (handle);
 	int [] origin_x = new int [1], origin_y = new int [1];
 	OS.gdk_window_get_origin (window, origin_x, origin_y);
-	int x = origin_x [0] + OS.GTK_WIDGET_X (handle);
-	int y = origin_y [0] + OS.GTK_WIDGET_Y (handle);
-	int width = OS.GTK_WIDGET_WIDTH (handle);
-	int height = OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	int x = origin_x [0] + allocation.x;
+	int y = origin_y [0] + allocation.y;
+	int width = allocation.width;
+	int height = allocation.height;
 	return new Rectangle (x, y, width, height);
 }
 
@@ -419,7 +421,7 @@ public MenuItem getDefaultItem () {
  */
 public boolean getEnabled () {
 	checkWidget();
-	return OS.GTK_WIDGET_SENSITIVE (handle);     
+	return gtk_widget_get_sensitive (handle);
 }
 
 /**
@@ -639,25 +641,14 @@ public boolean getVisible () {
 			}
 		}
 	}
-	return OS.GTK_WIDGET_MAPPED (handle);
+	return gtk_widget_get_mapped (handle);
 }
 
 int /*long*/ gtk_hide (int /*long*/ widget) {
 	if ((style & SWT.POP_UP) != 0) {
 		if (display.activeShell != null) display.activeShell = getShell ();
 	}
-	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-		sendEvent (SWT.Hide);
-	} else {
-		/*
-		* Bug in GTK.  In GTK 2.4 and earlier
-		* a crash could occur if a menu item 
-		* was disposed within gtk_hide.  The
-		* workaroud is to post the event instead
-		* of send it on these platforms  
-		*/
-		postEvent (SWT.Hide);
-	}
+	sendEvent (SWT.Hide);
 	if (OS.ubuntu_menu_proxy_get() != 0) {
 		MenuItem[] items = getItems();
 		for (int i=0; i<items.length; i++) {
@@ -781,7 +772,7 @@ int /*long*/ menuPositionProc (int /*long*/ menu, int /*long*/ x, int /*long*/ y
 	* NOTE: This code doesn't work for multiple monitors.
 	*/
     GtkRequisition requisition = new GtkRequisition ();
-    OS.gtk_widget_size_request (menu, requisition);
+    gtk_widget_get_preferred_size (menu, requisition);
     int screenHeight = OS.gdk_screen_height ();
 	int reqy = this.y;
 	if (reqy + requisition.height > screenHeight) {
@@ -946,11 +937,7 @@ public void setDefaultItem (MenuItem item) {
  */
 public void setEnabled (boolean enabled) {
 	checkWidget();
-	if (enabled) {
-		OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_SENSITIVE);
-	} else {
-		OS.GTK_WIDGET_UNSET_FLAGS (handle, OS.GTK_SENSITIVE);
-	}
+	OS.gtk_widget_set_sensitive (handle, enabled);
 }
 
 /**
@@ -1032,7 +1019,6 @@ public void setOrientation (int orientation) {
 }
 
 void _setOrientation (int orientation) {
-    if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return;
     int flags = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
     if ((orientation & flags) == 0 || (orientation & flags) == flags) return;
     style &= ~flags;
diff --git a/org/eclipse/swt/widgets/MenuItem.java b/org/eclipse/swt/widgets/MenuItem.java
index 69f6ae0..ecb0385 100644
--- a/org/eclipse/swt/widgets/MenuItem.java
+++ b/org/eclipse/swt/widgets/MenuItem.java
@@ -257,7 +257,7 @@ void createHandle (int index) {
 			groupHandle = OS.gtk_radio_menu_item_new (0);
 			if (groupHandle == 0) error (SWT.ERROR_NO_HANDLES);
 			OS.g_object_ref (groupHandle);
-			OS.gtk_object_sink (groupHandle);
+			g_object_ref_sink (groupHandle);
 			int /*long*/ group = OS.gtk_radio_menu_item_get_group (groupHandle);
 			handle = OS.gtk_radio_menu_item_new_with_label (group, buffer);
 			break;
@@ -275,10 +275,10 @@ void createHandle (int index) {
 		OS.gtk_accel_label_set_accel_widget (label, 0);
 	}
 	int /*long*/ parentHandle = parent.handle;
-	boolean enabled = OS.GTK_WIDGET_SENSITIVE (parentHandle);     
-	if (!enabled) OS.GTK_WIDGET_SET_FLAGS (parentHandle, OS.GTK_SENSITIVE);
+	boolean enabled = gtk_widget_get_sensitive (parentHandle);
+	if (!enabled) OS.gtk_widget_set_sensitive (parentHandle, true);
 	OS.gtk_menu_shell_insert (parentHandle, handle, index);
-	if (!enabled) OS.GTK_WIDGET_UNSET_FLAGS (parentHandle, OS.GTK_SENSITIVE);
+	if (!enabled) OS.gtk_widget_set_sensitive (parentHandle, false);
 	OS.gtk_widget_show (handle);
 }
 
@@ -319,13 +319,15 @@ int /*long*/ getAccelGroup () {
 
 /*public*/ Rectangle getBounds () {
 	checkWidget();
-	if (!OS.GTK_WIDGET_MAPPED (handle)) {
+	if (!gtk_widget_get_mapped (handle)) {
 		return new Rectangle (0, 0, 0, 0);
 	}
-	int x = OS.GTK_WIDGET_X (handle);
-	int y = OS.GTK_WIDGET_Y (handle);
-	int width = OS.GTK_WIDGET_WIDTH (handle);
-	int height = OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = allocation.width;
+	int height = allocation.height;
 	return new Rectangle (x, y, width, height);
 }
 
@@ -346,7 +348,7 @@ int /*long*/ getAccelGroup () {
  */
 public boolean getEnabled () {
 	checkWidget();
-	return OS.GTK_WIDGET_SENSITIVE (handle);
+	return gtk_widget_get_sensitive (handle);
 }
 
 /**
@@ -654,7 +656,7 @@ public void setAccelerator (int accelerator) {
  */
 public void setEnabled (boolean enabled) {
 	checkWidget();
-	if (OS.GTK_WIDGET_SENSITIVE (handle) == enabled) return;
+	if (gtk_widget_get_sensitive (handle) == enabled) return;
 	int /*long*/ accelGroup = getAccelGroup ();
 	if (accelGroup != 0) removeAccelerator (accelGroup);
 	OS.gtk_widget_set_sensitive (handle, enabled);
@@ -882,13 +884,15 @@ public void setText (String string) {
 	int /*long*/ label = OS.gtk_bin_get_child (handle);
 	if (label != 0 && OS.GTK_IS_LABEL(label)) {
 		OS.gtk_label_set_text_with_mnemonic (label, buffer);
-		buffer = Converter.wcsToMbcs (null, accelString, true);
-		int /*long*/ ptr = OS.g_malloc (buffer.length);
-		OS.memmove (ptr, buffer, buffer.length);
-		if (OS.GTK_IS_ACCEL_LABEL(label)) {
-			int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label);
-			OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr);
-			if (oldPtr != 0) OS.g_free (oldPtr);
+		if (!OS.GTK3) {
+			if (OS.GTK_IS_ACCEL_LABEL(label)) {
+				buffer = Converter.wcsToMbcs (null, accelString, true);
+				int /*long*/ ptr = OS.g_malloc (buffer.length);
+				OS.memmove (ptr, buffer, buffer.length);
+				int /*long*/ oldPtr = OS.GTK_ACCEL_LABEL_GET_ACCEL_STRING (label);
+				OS.GTK_ACCEL_LABEL_SET_ACCEL_STRING (label, ptr);
+				if (oldPtr != 0) OS.g_free (oldPtr);
+			}
 		}
 	}
 }
diff --git a/org/eclipse/swt/widgets/Monitor.java b/org/eclipse/swt/widgets/Monitor.java
index f22948a..295ced3 100644
--- a/org/eclipse/swt/widgets/Monitor.java
+++ b/org/eclipse/swt/widgets/Monitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/ProgressBar.java b/org/eclipse/swt/widgets/ProgressBar.java
index ad416a4..043029e 100644
--- a/org/eclipse/swt/widgets/ProgressBar.java
+++ b/org/eclipse/swt/widgets/ProgressBar.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -83,17 +83,21 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	handle = OS.gtk_progress_bar_new ();
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (fixedHandle, handle);
 	int orientation = (style & SWT.VERTICAL) != 0 ? OS.GTK_PROGRESS_BOTTOM_TO_TOP : OS.GTK_PROGRESS_LEFT_TO_RIGHT;
-	OS.gtk_progress_bar_set_orientation (handle, orientation);
+	gtk_orientable_set_orientation (handle, orientation);
 	if ((style & SWT.INDETERMINATE) != 0) {
 		timerId = OS.g_timeout_add (DELAY, display.windowTimerProc, handle);
 	}
 }
 
+int /*long*/ eventHandle () {
+	return OS.GTK3 ? fixedHandle : super.eventHandle ();
+}
+
 /**
  * Returns the maximum value which the receiver will allow.
  *
@@ -287,7 +291,7 @@ void updateBar (int selection, int minimum, int maximum) {
 	* fix is to update the progress bar state only when realized and restore
 	* the state when the progress bar becomes realized.
 	*/
-	if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return;
+	if (!gtk_widget_get_realized (handle)) return;
 
 	double fraction = minimum == maximum ? 1 : (double)(selection - minimum) / (maximum - minimum);
 	OS.gtk_progress_bar_set_fraction (handle, fraction);
@@ -302,4 +306,21 @@ void updateBar (int selection, int minimum, int maximum) {
 	OS.gdk_window_process_updates (window, false);
 	OS.gdk_flush ();
 }
+
+void gtk_orientable_set_orientation (int /*long*/ pbar, int orientation) {
+	if (OS.GTK3) {
+		switch (orientation) {
+			case OS.GTK_PROGRESS_BOTTOM_TO_TOP:
+				OS.gtk_orientable_set_orientation(pbar, OS.GTK_ORIENTATION_VERTICAL);
+				OS.gtk_progress_bar_set_inverted(pbar, true);
+				break;
+			case OS.GTK_PROGRESS_LEFT_TO_RIGHT:
+				OS.gtk_orientable_set_orientation(pbar, OS.GTK_ORIENTATION_HORIZONTAL);
+				OS.gtk_progress_bar_set_inverted(pbar, false);
+				break;
+		}
+	} else {
+		OS.gtk_progress_bar_set_orientation(pbar, orientation);
+	}
+}
 }
diff --git a/org/eclipse/swt/widgets/RunnableLock.java b/org/eclipse/swt/widgets/RunnableLock.java
index 40a0e6b..8586e7e 100644
--- a/org/eclipse/swt/widgets/RunnableLock.java
+++ b/org/eclipse/swt/widgets/RunnableLock.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/Sash.java b/org/eclipse/swt/widgets/Sash.java
index 34f8213..02832c8 100644
--- a/org/eclipse/swt/widgets/Sash.java
+++ b/org/eclipse/swt/widgets/Sash.java
@@ -113,6 +113,9 @@ public void addSelectionListener (SelectionListener listener) {
 }
 
 static int checkStyle (int style) {
+	if (OS.USE_CAIRO) {
+		style |= SWT.SMOOTH;
+	}
 	return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);
 }
 
@@ -136,16 +139,15 @@ void createHandle (int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	handle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (handle, true);
-	OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+	gtk_widget_set_has_window (handle, true);
+	gtk_widget_set_can_focus (handle, true);
 	int type = (style & SWT.VERTICAL) != 0 ? OS.GDK_SB_H_DOUBLE_ARROW : OS.GDK_SB_V_DOUBLE_ARROW;
 	defaultCursor = OS.gdk_cursor_new (type);
 }
 
 void drawBand (int x, int y, int width, int height) {
 	if ((style & SWT.SMOOTH) != 0) return;
-	//TODO: Use Cairo
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
+	int /*long*/ window = gtk_widget_get_window (parent.paintHandle());
 	if (window == 0) return;
 	byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85};
 	int /*long*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8);
@@ -172,15 +174,17 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr)
 	if (button != 1) return 0;
 	if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) return 0;
 	if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0;
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (widget);
+	int /*long*/ window = gtk_widget_get_window (widget);
 	int [] origin_x = new int [1], origin_y = new int [1];
 	OS.gdk_window_get_origin (window, origin_x, origin_y);
 	startX = (int) (gdkEvent.x_root - origin_x [0]);
 	startY = (int) (gdkEvent.y_root - origin_y [0]);
-	int x = OS.GTK_WIDGET_X (handle);
-	int y = OS.GTK_WIDGET_Y (handle);
-	int width = OS.GTK_WIDGET_WIDTH (handle);
-	int height = OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation(handle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = allocation.width;
+	int height = allocation.height;
 	lastX = x; 
 	lastY = y;
 	Event event = new Event ();
@@ -219,8 +223,10 @@ int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ eventPt
 	if (button != 1) return 0;
 	if (!dragging) return 0;
 	dragging = false;
-	int width = OS.GTK_WIDGET_WIDTH (handle);
-	int height = OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
 	Event event = new Event ();
 	event.time = gdkEvent.time;
 	event.x = lastX;
@@ -245,8 +251,10 @@ int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) {
 	if (result != 0) return result;
 	// widget could be disposed at this point
 	if (handle != 0) {
-			lastX = OS.GTK_WIDGET_X (handle);
-			lastY = OS.GTK_WIDGET_Y (handle);
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (handle, allocation);
+		lastX = allocation.x;
+		lastY = allocation.y;	
 	}
 	return 0;
 }
@@ -272,12 +280,14 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 				if (keyval == OS.GDK_Left ||keyval == OS.GDK_Right) break;
 				yChange = keyval == OS.GDK_Up ? -stepSize : stepSize;
 			}
-			
-			int width = OS.GTK_WIDGET_WIDTH (handle);
-			int height = OS.GTK_WIDGET_HEIGHT (handle);
 			int parentBorder = 0;
-			int parentWidth = OS.GTK_WIDGET_WIDTH (parent.handle);
-			int parentHeight = OS.GTK_WIDGET_HEIGHT (parent.handle);
+			GtkAllocation allocation = new GtkAllocation ();
+			gtk_widget_get_allocation (handle, allocation);
+			int width = allocation.width;
+			int height = allocation.height;
+			gtk_widget_get_allocation (parent.handle, allocation);
+			int parentWidth = allocation.width;
+			int parentHeight = allocation.height;
 			int newX = lastX, newY = lastY;
 			if ((style & SWT.VERTICAL) != 0) {
 				newX = Math.min (Math.max (0, lastX + xChange - parentBorder - startX), parentWidth - width);
@@ -287,10 +297,10 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			if (newX == lastX && newY == lastY) return result;
 			
 			/* Ensure that the pointer image does not change */
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
+			int /*long*/ window = gtk_widget_get_window (handle);
 			int grabMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK;
 			int /*long*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor;
-			int ptrGrabResult = OS.gdk_pointer_grab (window, false, grabMask, window, gdkCursor, OS.GDK_CURRENT_TIME);
+			int ptrGrabResult = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, grabMask, window, gdkCursor, OS.GDK_CURRENT_TIME);
 
 			/* The event must be sent because its doit flag is used. */
 			Event event = new Event ();
@@ -301,7 +311,7 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 			event.height = height;
 			if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - width  - event.x;
 			sendSelectionEvent (SWT.Selection, event, true);
-			if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME);
+			if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) gdk_pointer_ungrab (window, OS.GDK_CURRENT_TIME);
 			if (isDisposed ()) break;
 			
 			if (event.doit) {
@@ -335,7 +345,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
 	int eventX, eventY, eventState;
 	if (gdkEvent.is_hint != 0) {
 		int [] pointer_x = new int [1], pointer_y = new int [1], mask = new int [1];
-		OS.gdk_window_get_pointer (gdkEvent.window, pointer_x, pointer_y, mask);
+		gdk_window_get_device_position (gdkEvent.window, pointer_x, pointer_y, mask);
 		eventX = pointer_x [0];
 		eventY = pointer_y [0];
 		eventState = mask [0];
@@ -347,13 +357,16 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
 		eventState = gdkEvent.state;
 	}
 	if ((eventState & OS.GDK_BUTTON1_MASK) == 0) return 0;
-	int x = OS.GTK_WIDGET_X (handle);
-	int y = OS.GTK_WIDGET_Y (handle);
-	int width = OS.GTK_WIDGET_WIDTH (handle);
-	int height = OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = allocation.width;
+	int height = allocation.height;
 	int parentBorder = 0;
-	int parentWidth = OS.GTK_WIDGET_WIDTH (parent.handle);
-	int parentHeight = OS.GTK_WIDGET_HEIGHT (parent.handle);
+	gtk_widget_get_allocation (parent.handle, allocation);
+	int parentWidth = allocation.width;
+	int parentHeight = allocation.height;
 	int newX = lastX, newY = lastY;
 	if ((style & SWT.VERTICAL) != 0) {
 		newX = Math.min (Math.max (0, eventX + x - startX - parentBorder), parentWidth - width);
@@ -401,7 +414,7 @@ void hookEvents () {
 
 void releaseWidget () {
 	super.releaseWidget ();
-	if (defaultCursor != 0) OS.gdk_cursor_unref (defaultCursor);
+	if (defaultCursor != 0) gdk_cursor_unref (defaultCursor);
 	defaultCursor = 0;
 }
 
diff --git a/org/eclipse/swt/widgets/Scale.java b/org/eclipse/swt/widgets/Scale.java
index 55e9f89..ab3e1c8 100644
--- a/org/eclipse/swt/widgets/Scale.java
+++ b/org/eclipse/swt/widgets/Scale.java
@@ -125,13 +125,13 @@ void createHandle (int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
 	if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);	
 	if ((style & SWT.HORIZONTAL) != 0) {
-		handle = OS.gtk_hscale_new (hAdjustment);
+		handle = gtk_scale_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
 	} else {
-		handle = OS.gtk_vscale_new (hAdjustment);
+		handle = gtk_scale_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
 	}
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (fixedHandle, handle);
@@ -159,9 +159,7 @@ void hookEvents () {
 public int getIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.step_increment;
+	return (int) gtk_adjustment_get_step_increment (hAdjustment);
 }
 
 /**
@@ -177,9 +175,7 @@ public int getIncrement () {
 public int getMaximum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.upper;
+	return (int) gtk_adjustment_get_upper (hAdjustment);
 }
 
 /**
@@ -195,9 +191,7 @@ public int getMaximum () {
 public int getMinimum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.lower;
+	return (int) gtk_adjustment_get_lower (hAdjustment);
 }
 
 /**
@@ -215,9 +209,7 @@ public int getMinimum () {
 public int getPageIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.page_increment;
+	return (int) gtk_adjustment_get_page_increment (hAdjustment);
 }
 
 /**
@@ -233,9 +225,7 @@ public int getPageIncrement () {
 public int getSelection () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.value;
+	return (int) gtk_adjustment_get_value (hAdjustment);
 }
 
 int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
@@ -373,4 +363,17 @@ public void setSelection (int value) {
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
+int /*long*/ gtk_scale_new (int orientation, int /*long*/ adjustment) {
+	int /*long*/ scale = 0;
+	if (OS.GTK3)	{
+		scale = OS.gtk_scale_new (orientation, adjustment);
+	} else {
+		if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) {
+			scale = OS.gtk_hscale_new (adjustment);
+		} else {
+			scale = OS.gtk_vscale_new (adjustment);
+		}
+	}
+	return scale;
+}
 }
diff --git a/org/eclipse/swt/widgets/ScrollBar.java b/org/eclipse/swt/widgets/ScrollBar.java
index 77cc837..833f0a5 100644
--- a/org/eclipse/swt/widgets/ScrollBar.java
+++ b/org/eclipse/swt/widgets/ScrollBar.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -176,7 +176,7 @@ void destroyWidget () {
  */
 public boolean getEnabled () {
 	checkWidget ();
-	if (handle != 0) return OS.GTK_WIDGET_SENSITIVE (handle);
+	if (handle != 0) return gtk_widget_get_sensitive (handle);
 	return true;
 }
 
@@ -194,9 +194,7 @@ public boolean getEnabled () {
  */
 public int getIncrement () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.step_increment;
+	return (int) gtk_adjustment_get_step_increment (adjustmentHandle);
 }
 
 /**
@@ -211,9 +209,7 @@ public int getIncrement () {
  */
 public int getMaximum () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.upper;
+	return (int) gtk_adjustment_get_upper (adjustmentHandle);
 }
 
 /**
@@ -228,9 +224,7 @@ public int getMaximum () {
  */
 public int getMinimum () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.lower;
+	return (int) gtk_adjustment_get_lower (adjustmentHandle);
 }
 
 /**
@@ -247,9 +241,7 @@ public int getMinimum () {
  */
 public int getPageIncrement () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.page_increment;
+	return (int) gtk_adjustment_get_page_increment (adjustmentHandle);
 }
 
 /**
@@ -279,9 +271,7 @@ public Scrollable getParent () {
  */
 public int getSelection () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.value;
+	return (int) gtk_adjustment_get_value (adjustmentHandle);
 }
 
 /**
@@ -301,7 +291,7 @@ public Point getSize () {
 	checkWidget ();
 	if (handle == 0) return new Point (0,0);
 	GtkRequisition requisition = new GtkRequisition ();
-	OS.gtk_widget_size_request (handle, requisition);
+	gtk_widget_get_preferred_size (handle, requisition);
 	return new Point (requisition.width, requisition.height);
 }
 
@@ -319,9 +309,7 @@ public Point getSize () {
  */
 public int getThumb () {
 	checkWidget ();
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	return (int) adjustment.page_size;
+	return (int) gtk_adjustment_get_page_size (adjustmentHandle);
 }
 
 /**
@@ -339,27 +327,29 @@ public int getThumb () {
  */
 public Rectangle getThumbBounds () {
 	checkWidget();
-	int slider_start = OS.GTK_RANGE_SLIDER_START (handle);
-	int slider_end = OS.GTK_RANGE_SLIDER_END (handle);
+	int [] slider_start = new int [1], slider_end = new int [1];
+	gtk_range_get_slider_range (handle, slider_start, slider_end);
 	int x, y, width, height;
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
 	if ((style & SWT.VERTICAL) != 0) {
-		x = OS.GTK_WIDGET_X (handle);
-		y = slider_start;
-		width = OS.GTK_WIDGET_WIDTH (handle);
-		height = slider_end - slider_start;
+		x = allocation.x;
+		y = slider_start [0];
+		width = allocation.width;
+		height = slider_end [0] - slider_start [0];
 	} else {
-		x = slider_start;
-		y = OS.GTK_WIDGET_Y (handle);
-		width = slider_end - slider_start;
-		height = OS.GTK_WIDGET_HEIGHT (handle);
+		x = slider_start [0];
+		y = allocation.y;
+		width = slider_end [0] - slider_start [0];
+		height = allocation.height;
 	}
 	Rectangle rect = new Rectangle(x, y, width, height);
 	int [] origin_x = new int [1], origin_y = new int [1];
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.scrolledHandle);
+	int /*long*/ window = gtk_widget_get_window (parent.scrolledHandle);
 	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
 	rect.x += origin_x [0];
 	rect.y += origin_y [0];
-	window = OS.GTK_WIDGET_WINDOW (parent.handle);
+	window = gtk_widget_get_window (parent.handle);
 	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
 	rect.x -= origin_x [0];
 	rect.y -= origin_y [0];
@@ -383,44 +373,55 @@ public Rectangle getThumbBounds () {
 public Rectangle getThumbTrackBounds () {
 	checkWidget();
 	int x = 0, y = 0, width, height;
-	boolean hasA = OS.GTK_RANGE_HAS_STEPPER_A (handle);
-	boolean hasB = OS.GTK_RANGE_HAS_STEPPER_B (handle);
-	boolean hasC = OS.GTK_RANGE_HAS_STEPPER_C (handle);
-	boolean hasD = OS.GTK_RANGE_HAS_STEPPER_D (handle);
+	int[] has_stepper = new int[1];
+	OS.gtk_widget_style_get (handle, OS.has_backward_stepper, has_stepper, 0);
+	boolean hasA = has_stepper[0] != 0;
+	OS.gtk_widget_style_get (handle, OS.has_secondary_backward_stepper, has_stepper, 0);
+	boolean hasB = has_stepper[0] != 0;
+	OS.gtk_widget_style_get (handle, OS.has_forward_stepper, has_stepper, 0);
+	boolean hasC = has_stepper[0] != 0;
+	OS.gtk_widget_style_get (handle, OS.has_secondary_forward_stepper, has_stepper, 0);
+	boolean hasD = has_stepper[0] != 0;
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
 	if ((style & SWT.VERTICAL) != 0) {
-		int stepperSize = OS.GTK_WIDGET_WIDTH (handle);
-		x = OS.GTK_WIDGET_X (handle);
+		int stepperSize = allocation.width;
+		x = allocation.x;
 		if (hasA) y += stepperSize;
 		if (hasB) y += stepperSize;
-		width = OS.GTK_WIDGET_WIDTH (handle);
-		height = OS.GTK_WIDGET_HEIGHT (handle) - y;
+		width = allocation.width;
+		height = allocation.height - y;	
 		if (hasC) height -= stepperSize;
 		if (hasD) height -= stepperSize;
 		if (height < 0) {
-			y = OS.GTK_RANGE_SLIDER_START (handle);
+			int [] slider_start = new int [1], slider_end = new int [1];
+			gtk_range_get_slider_range (handle, slider_start, slider_end);
+			y = slider_start [0];
 			height = 0;
 		}
 	} else {
-		int stepperSize = OS.GTK_WIDGET_HEIGHT (handle);
+		int stepperSize = allocation.height;
 		if (hasA) x += stepperSize;
 		if (hasB) x += stepperSize;
-		y = OS.GTK_WIDGET_Y (handle);
-		width = OS.GTK_WIDGET_WIDTH (handle) - x;
+		y = allocation.y;
+		width = allocation.width -x;
 		if (hasC) width -= stepperSize;
 		if (hasD) width -= stepperSize;
-		height = OS.GTK_WIDGET_HEIGHT (handle);
+		height = allocation.height;
 		if (width < 0) {
-			x = OS.GTK_RANGE_SLIDER_START (handle);
+			int [] slider_start = new int [1], slider_end = new int [1];
+			gtk_range_get_slider_range (handle, slider_start, slider_end);
+			x = slider_start [0];
 			width = 0;
 		}
 	}
 	Rectangle rect = new Rectangle(x, y, width, height);
 	int [] origin_x = new int [1], origin_y = new int [1];
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (parent.scrolledHandle);
+	int /*long*/ window = gtk_widget_get_window (parent.scrolledHandle);
 	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
 	rect.x += origin_x [0];
 	rect.y += origin_y [0];
-	window = OS.GTK_WIDGET_WINDOW (parent.handle);
+	window = gtk_widget_get_window (parent.handle);
 	if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y);
 	rect.x -= origin_x [0];
 	rect.y -= origin_y [0];
@@ -450,9 +451,9 @@ public boolean getVisible () {
 	int [] hsp = new int [1], vsp = new int [1];
 	OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp);
 	if ((style & SWT.HORIZONTAL) != 0) {
-		return hsp [0] != OS.GTK_POLICY_NEVER && OS.GTK_WIDGET_VISIBLE(handle);
+		return hsp [0] != OS.GTK_POLICY_NEVER && gtk_widget_get_visible (handle);
 	} else {
-		return vsp [0] != OS.GTK_POLICY_NEVER && OS.GTK_WIDGET_VISIBLE(handle);
+		return vsp [0] != OS.GTK_POLICY_NEVER && gtk_widget_get_visible (handle);
 	}
 }
 
@@ -469,6 +470,15 @@ int /*long*/ gtk_change_value (int /*long*/ widget, int /*long*/ scroll, int /*l
 	return 0;
 }
 
+void gtk_range_get_slider_range (int /*long*/ widget, int [] slider_start, int [] slider_end) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
+		OS.gtk_range_get_slider_range (widget, slider_start, slider_end);
+	} else {
+		slider_start [0] = OS.GTK_RANGE_SLIDER_START (widget);
+		slider_end [0] = OS.GTK_RANGE_SLIDER_END (widget);
+	}
+}
+
 int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
 	Event event = new Event ();
 	dragSent = detail == OS.GTK_SCROLL_JUMP;
@@ -521,9 +531,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 
 void hookEvents () {
 	super.hookEvents ();
-	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-		OS.g_signal_connect_closure (handle, OS.change_value, display.closures [CHANGE_VALUE], false);
-	}
+	OS.g_signal_connect_closure (handle, OS.change_value, display.closures [CHANGE_VALUE], false);
 	OS.g_signal_connect_closure (adjustmentHandle, OS.value_changed, display.closures [VALUE_CHANGED], false);
 	OS.g_signal_connect_closure_by_id (handle, display.signalIds [EVENT_AFTER], 0, display.closures [EVENT_AFTER], false);
 	OS.g_signal_connect_closure_by_id (handle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.closures [BUTTON_PRESS_EVENT], false);	
@@ -648,12 +656,16 @@ public void setEnabled (boolean enabled) {
 public void setIncrement (int value) {
 	checkWidget ();
 	if (value < 1) return;
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	adjustment.step_increment = (float) value;
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		OS.gtk_adjustment_set_step_increment (adjustmentHandle, value);
+	} else {
+		GtkAdjustment adjustment = new GtkAdjustment ();
+		OS.memmove (adjustment, adjustmentHandle);
+		adjustment.step_increment = (float) value;
+		OS.memmove (adjustmentHandle, adjustment);
+		OS.gtk_adjustment_changed (adjustmentHandle);
+	}
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -673,15 +685,14 @@ public void setIncrement (int value) {
 public void setMaximum (int value) {
 	checkWidget ();
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
+	gtk_adjustment_get (adjustmentHandle, adjustment);
 	int minimum = (int) adjustment.lower;
 	if (value <= minimum) return;
 	adjustment.upper = value;
 	adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
 	adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	gtk_adjustment_configure (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 	
@@ -702,15 +713,14 @@ public void setMinimum (int value) {
 	checkWidget ();
 	if (value < 0) return;
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
+	gtk_adjustment_get (adjustmentHandle, adjustment);
 	int maximum = (int) adjustment.upper;
 	if (value >= maximum) return;
 	adjustment.lower = value;
 	adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
 	adjustment.value = Math.max ((int)adjustment.value, value);
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	gtk_adjustment_configure (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -741,12 +751,16 @@ void setOrientation (boolean create) {
 public void setPageIncrement (int value) {
 	checkWidget ();
 	if (value < 1) return;
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
-	adjustment.page_increment = (float) value;
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		OS.gtk_adjustment_set_page_increment (adjustmentHandle, value);
+	} else {
+		GtkAdjustment adjustment = new GtkAdjustment ();
+		OS.memmove (adjustment, adjustmentHandle);
+		adjustment.page_increment = (float) value;
+		OS.memmove (adjustmentHandle, adjustment);
+		OS.gtk_adjustment_changed (adjustmentHandle);
+	}
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -791,13 +805,12 @@ public void setThumb (int value) {
 	checkWidget ();
 	if (value < 1) return;
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
+	gtk_adjustment_get (adjustmentHandle, adjustment);
 	value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower)); 
 	adjustment.page_size = (double) value;
 	adjustment.value = Math.min ((int)adjustment.value, (int)(adjustment.upper - value));
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	gtk_adjustment_configure (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -831,16 +844,14 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
 	if (pageIncrement < 1) return;
 	thumb = Math.min (thumb, maximum - minimum);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, adjustmentHandle);
 	adjustment.lower = minimum;
 	adjustment.upper = maximum;
 	adjustment.step_increment = increment;
 	adjustment.page_increment = pageIncrement;
 	adjustment.page_size = thumb;
 	adjustment.value = Math.min (Math.max (selection, minimum), maximum - thumb);
-	OS.memmove (adjustmentHandle, adjustment);
 	OS.g_signal_handlers_block_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (adjustmentHandle);
+	gtk_adjustment_configure (adjustmentHandle, adjustment);
 	OS.gtk_adjustment_value_changed (adjustmentHandle);
 	OS.g_signal_handlers_unblock_matched (adjustmentHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
diff --git a/org/eclipse/swt/widgets/Scrollable.java b/org/eclipse/swt/widgets/Scrollable.java
index 6d20f58..cf3be5f 100644
--- a/org/eclipse/swt/widgets/Scrollable.java
+++ b/org/eclipse/swt/widgets/Scrollable.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -116,9 +116,9 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	trimWidth  += vScrollBarWidth ();
 	if (scrolledHandle != 0) {
 		if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) {
-			int /*long*/ style = OS.gtk_widget_get_style (scrolledHandle);
-			int xthickness = OS.gtk_style_get_xthickness (style);
-			int ythickness = OS.gtk_style_get_ythickness (style);
+			Point thickness = getThickness (scrolledHandle);
+			int xthickness = thickness.x;
+			int ythickness = thickness.y;
 			trimX -= xthickness;
 			trimY -= ythickness;
 			trimWidth += xthickness * 2;
@@ -136,10 +136,18 @@ ScrollBar createScrollBar (int style) {
 	bar.display = display;
 	bar.state |= HANDLE;
 	if ((style & SWT.H_SCROLL) != 0) {
-		bar.handle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle);
+		if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
+			bar.handle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle);
+		} else {
+			bar.handle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
+		}
 		bar.adjustmentHandle = OS.gtk_scrolled_window_get_hadjustment (scrolledHandle);
 	} else {
-		bar.handle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
+		if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
+			bar.handle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
+		} else {
+			bar.handle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
+		}
 		bar.adjustmentHandle = OS.gtk_scrolled_window_get_vadjustment (scrolledHandle);
 	}
 	bar.setOrientation (true);
@@ -172,7 +180,7 @@ public int getBorderWidth () {
 	if (scrolledHandle != 0) {
 		border += OS.gtk_container_get_border_width (scrolledHandle);
 		if (OS.gtk_scrolled_window_get_shadow_type (scrolledHandle) != OS.GTK_SHADOW_NONE) {
-			border += OS.gtk_style_get_xthickness (OS.gtk_widget_get_style (scrolledHandle));
+			border += getThickness (scrolledHandle).x;
 		}
 	}
 	return border;
@@ -196,10 +204,12 @@ public Rectangle getClientArea () {
 	checkWidget ();
 	forceResize ();
 	int /*long*/ clientHandle = clientHandle ();
-	int x = OS.GTK_WIDGET_X (clientHandle);
-	int y = OS.GTK_WIDGET_Y (clientHandle);
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (clientHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (clientHandle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	return new Rectangle (x, y, width, height);
 }
 /**
@@ -270,22 +280,52 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		ScrollBar scrollBar;
 		GdkEventScroll gdkEvent = new GdkEventScroll ();
 		OS.memmove (gdkEvent, eventPtr, GdkEventScroll.sizeof);
-		if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_DOWN) {
-			scrollBar = verticalBar;
+		if (gdkEvent.direction == OS.GDK_SCROLL_SMOOTH) {
+			double[] delta_x = new double[1], delta_y = new double [1];
+			if (OS.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) {
+				if (delta_x [0] != 0) {
+					scrollBar = horizontalBar;
+					if (scrollBar != null && !gtk_widget_get_visible (scrollBar.handle) && scrollBar.getEnabled()) {
+						GtkAdjustment adjustment = new GtkAdjustment ();
+						gtk_adjustment_get (scrollBar.adjustmentHandle, adjustment);
+						double delta = Math.pow(adjustment.page_size, 2.0 / 3.0) * delta_x [0];
+						int value = (int) Math.max(adjustment.lower,
+								Math.min(adjustment.upper - adjustment.page_size, adjustment.value + delta));
+						OS.gtk_adjustment_set_value (scrollBar.adjustmentHandle, value);
+						result = 1;
+					}
+				}
+				if (delta_y [0] != 0) {
+					scrollBar = verticalBar;
+					if (scrollBar != null && !gtk_widget_get_visible (scrollBar.handle) && scrollBar.getEnabled()) {
+						GtkAdjustment adjustment = new GtkAdjustment ();
+						gtk_adjustment_get (scrollBar.adjustmentHandle, adjustment);
+						double delta = Math.pow(adjustment.page_size, 2.0 / 3.0) * delta_y [0];
+						int value = (int) Math.max(adjustment.lower,
+								Math.min(adjustment.upper - adjustment.page_size, adjustment.value + delta));
+						OS.gtk_adjustment_set_value (scrollBar.adjustmentHandle, value);
+						result = 1;
+					}
+				}
+			}
 		} else {
-			scrollBar = horizontalBar;
-		}
-		if (scrollBar != null && !OS.GTK_WIDGET_VISIBLE (scrollBar.handle) && scrollBar.getEnabled()) {
-			GtkAdjustment adjustment = new GtkAdjustment ();
-			OS.memmove (adjustment, scrollBar.adjustmentHandle);
-			/* Calculate wheel delta to match GTK+ 2.4 and higher */
-			int wheel_delta = (int) Math.pow(adjustment.page_size, 2.0 / 3.0);
-			if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_LEFT)
-				wheel_delta = -wheel_delta;
-			int value = (int) Math.max(adjustment.lower,
-					Math.min(adjustment.upper - adjustment.page_size, adjustment.value + wheel_delta));
-			OS.gtk_adjustment_set_value (scrollBar.adjustmentHandle, value);
-			return 1;
+			if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_DOWN) {
+				scrollBar = verticalBar;
+			} else {
+				scrollBar = horizontalBar;
+			}
+			if (scrollBar != null && !gtk_widget_get_visible (scrollBar.handle) && scrollBar.getEnabled()) {
+				GtkAdjustment adjustment = new GtkAdjustment ();
+				gtk_adjustment_get (scrollBar.adjustmentHandle, adjustment);
+				/* Calculate wheel delta to match GTK+ 2.4 and higher */
+				int wheel_delta = (int) Math.pow(adjustment.page_size, 2.0 / 3.0);
+				if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_LEFT)
+					wheel_delta = -wheel_delta;
+				int value = (int) Math.max(adjustment.lower,
+						Math.min(adjustment.upper - adjustment.page_size, adjustment.value + wheel_delta));
+				OS.gtk_adjustment_set_value (scrollBar.adjustmentHandle, value);
+				return 1;
+			}
 		}
 	}
 	return result;
@@ -293,10 +333,15 @@ int /*long*/ gtk_scroll_event (int /*long*/ widget, int /*long*/ eventPtr) {
 
 int hScrollBarWidth() {
 	if (horizontalBar==null) return 0;
-	int /*long*/ hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR(scrolledHandle);
+	int /*long*/ hBarHandle = 0;
+	if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
+		hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle);
+	} else {
+		hBarHandle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
+	}
 	if (hBarHandle==0) return 0;
 	GtkRequisition requisition = new GtkRequisition();
-	OS.gtk_widget_size_request(hBarHandle, requisition);
+	gtk_widget_get_preferred_size (hBarHandle, requisition);
 	int spacing = OS.GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(scrolledHandle);
 	return requisition.height + spacing;
 }
@@ -344,15 +389,17 @@ void redrawBackgroundImage () {
 
 void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean all, boolean trim) {
 	super.redrawWidget (x, y, width, height, redrawAll, all, trim);
-	if ((OS.GTK_WIDGET_FLAGS (handle) & OS.GTK_REALIZED) == 0) return;
+	if (!gtk_widget_get_realized (handle)) return;
 	if (!trim) return;
 	int /*long*/ topHandle = topHandle (), paintHandle = paintHandle ();
 	if (topHandle == paintHandle) return;
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (topHandle);
+	int /*long*/ window = gtk_widget_get_window (topHandle);
 	GdkRectangle rect = new GdkRectangle ();
 	if (redrawAll) {
-		rect.width = OS.GTK_WIDGET_WIDTH (topHandle);
-		rect.height = OS.GTK_WIDGET_HEIGHT (topHandle);
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (topHandle, allocation);
+		rect.width = allocation.width;
+		rect.height = allocation.height;
 	} else {
 		int [] destX = new int [1], destY = new int [1];
 		OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY);
@@ -387,8 +434,16 @@ void releaseChildren (boolean destroy) {
 }
 
 void resizeHandle (int width, int height) {
-	if (fixedHandle != 0) OS.gtk_widget_set_size_request (fixedHandle, width, height);
-	OS.gtk_widget_set_size_request (scrolledHandle != 0 ? scrolledHandle : handle, width, height);
+	if (OS.GTK3) {
+		if (fixedHandle != 0) {
+			OS.swt_fixed_resize (OS.gtk_widget_get_parent(fixedHandle), fixedHandle, width, height);
+		}
+		int /*long*/ child = scrolledHandle != 0 ? scrolledHandle : handle;
+		OS.swt_fixed_resize (OS.gtk_widget_get_parent(child), child, width, height);
+	} else {
+		if (fixedHandle != 0) OS.gtk_widget_set_size_request (fixedHandle, width, height);
+		OS.gtk_widget_set_size_request (scrolledHandle != 0 ? scrolledHandle : handle, width, height);
+	}
 }
 
 void showWidget () {
@@ -408,10 +463,15 @@ void updateScrollBarValue (ScrollBar bar) {
 
 int vScrollBarWidth() {
 	if (verticalBar == null) return 0;
-	int /*long*/ vBarHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR(scrolledHandle);
+	int /*long*/ vBarHandle = 0;
+	if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
+		vBarHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
+	} else {
+		vBarHandle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
+	}
 	if (vBarHandle == 0) return 0;
 	GtkRequisition requisition = new GtkRequisition();
-	OS.gtk_widget_size_request (vBarHandle, requisition);
+	gtk_widget_get_preferred_size (vBarHandle, requisition);
 	int spacing = OS.GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(scrolledHandle);
 	return requisition.width + spacing;
 }
diff --git a/org/eclipse/swt/widgets/Shell.java b/org/eclipse/swt/widgets/Shell.java
index deed81c..408278c 100644
--- a/org/eclipse/swt/widgets/Shell.java
+++ b/org/eclipse/swt/widgets/Shell.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -359,6 +359,23 @@ public Shell (Shell parent, int style) {
 	this (parent != null ? parent.display : null, parent, style, 0, false);
 }
 
+/**	 
+ * Invokes platform specific functionality to allocate a new shell
+ * that is embedded.
+ * <p>
+ * <b>IMPORTANT:</b> This method is <em>not</em> part of the public
+ * API for <code>Shell</code>. It is marked public only so that it
+ * can be shared within the packages provided by SWT. It is not
+ * available on all platforms, and should never be called from
+ * application code.
+ * </p>
+ *
+ * @param display the display for the shell
+ * @param handle the handle for the shell
+ * @return a new shell object containing the specified display and handle
+ * 
+ * @noreference This method is not intended to be referenced by clients.
+ */
 public static Shell gtk_new (Display display, int /*long*/ handle) {
 	return new Shell (display, null, SWT.NO_TRIM, handle, true);
 }
@@ -451,9 +468,11 @@ void addToolTip (ToolTip toolTip) {
 
 void adjustTrim () {
 	if (display.ignoreTrim) return;
-	int width = OS.GTK_WIDGET_WIDTH (shellHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (shellHandle);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (shellHandle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
+	int /*long*/ window = gtk_widget_get_window (shellHandle);
 	GdkRectangle rect = new GdkRectangle ();
 	OS.gdk_window_get_frame_extents (window, rect);
 	int trimWidth = Math.max (0, rect.width - width);
@@ -501,7 +520,7 @@ void adjustTrim () {
 }
 
 void bringToTop (boolean force) {
-	if (!OS.GTK_WIDGET_VISIBLE (shellHandle)) return;
+	if (!gtk_widget_get_visible (shellHandle)) return;
 	Display display = this.display;
 	Shell activeShell = display.activeShell;
 	if (activeShell == this) return;
@@ -509,7 +528,7 @@ void bringToTop (boolean force) {
 		if (activeShell == null) return;
 		if (!display.activePending) {
 			int /*long*/ focusHandle = OS.gtk_window_get_focus (activeShell.shellHandle);
-			if (focusHandle != 0 && !OS.GTK_WIDGET_HAS_FOCUS (focusHandle)) return;
+			if (focusHandle != 0 && !gtk_widget_has_focus (focusHandle)) return;
 		}
 	}
 	/*
@@ -536,10 +555,20 @@ void bringToTop (boolean force) {
 	* window.  The fix is to use XSetInputFocus() to force
 	* the focus.
 	*/
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+	int /*long*/ window = gtk_widget_get_window (shellHandle);
 	if ((xFocus || (style & SWT.ON_TOP) != 0) && OS.GDK_WINDOWING_X11 ()) {
-		int /*long*/ xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
-		int /*long*/ xWindow = OS.gdk_x11_drawable_get_xid (window);
+		int /*long*/ xDisplay;
+		if (OS.GTK_VERSION >= OS.VERSION(2, 24, 0)) {
+			xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window));
+		} else {
+			xDisplay = OS.gdk_x11_drawable_get_xdisplay (window);
+		}
+		int /*long*/ xWindow;
+		if (OS.GTK3) {
+			xWindow = OS.gdk_x11_window_get_xid (window);
+		} else {
+			xWindow = OS.gdk_x11_drawable_get_xid (window);
+		}
 		OS.gdk_error_trap_push ();
 		/* Use CurrentTime instead of the last event time to ensure that the shell becomes active */
 		OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime);
@@ -635,7 +664,9 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	trim.height += trimHeight + border * 2;
 	if (menuBar != null) {
 		forceResize ();
-		int menuBarHeight = OS.GTK_WIDGET_HEIGHT (menuBar.handle);
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (menuBar.handle, allocation);
+		int menuBarHeight = allocation.height;
 		trim.y -= menuBarHeight;
 		trim.height += menuBarHeight;
 	}
@@ -673,33 +704,26 @@ void createHandle (int index) {
 		} else {
 			OS.gtk_window_set_resizable (shellHandle, false);
 		}
-		vboxHandle = OS.gtk_vbox_new (false, 0);
-		if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES);
-		createHandle (index, false, true);
-		OS.gtk_container_add (vboxHandle, scrolledHandle);
-		OS.gtk_box_set_child_packing (vboxHandle, scrolledHandle, true, true, 0, OS.GTK_PACK_END);
 		OS.gtk_window_set_title (shellHandle, new byte [1]);
 		if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
 			OS.gtk_container_set_border_width (shellHandle, 1);
-			GdkColor color = new GdkColor ();
-			OS.gtk_style_get_black (OS.gtk_widget_get_style (shellHandle), color);
-			OS.gtk_widget_modify_bg (shellHandle,  OS.GTK_STATE_NORMAL, color);
+			if (OS.GTK3) {
+				OS.gtk_widget_override_background_color (shellHandle, OS.GTK_STATE_FLAG_NORMAL, new GdkRGBA());
+			} else {
+				GdkColor color = new GdkColor ();
+				OS.gtk_style_get_black (OS.gtk_widget_get_style (shellHandle), color);
+				OS.gtk_widget_modify_bg (shellHandle, OS.GTK_STATE_NORMAL, color);
+			}
 		}
 		if (isCustomResize ()) {
 			OS.gtk_container_set_border_width (shellHandle, BORDER);
 		} 
-	} else {
-		vboxHandle = OS.gtk_bin_get_child (shellHandle);
-		if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES);
-		int /*long*/ children = OS.gtk_container_get_children (vboxHandle);
-		if (OS.g_list_length (children) > 0) {
-			scrolledHandle = OS.g_list_data (children);
-		}
-		OS.g_list_free (children);
-		if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
-		handle = OS.gtk_bin_get_child (scrolledHandle);
-		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	}
+	vboxHandle = gtk_box_new (OS.GTK_ORIENTATION_VERTICAL, false, 0);
+	if (vboxHandle == 0) error (SWT.ERROR_NO_HANDLES);
+	createHandle (index, false, true);
+	OS.gtk_container_add (vboxHandle, scrolledHandle);
+	OS.gtk_box_set_child_packing (vboxHandle, scrolledHandle, true, true, 0, OS.GTK_PACK_END);
 	group = OS.gtk_window_group_new ();
 	if (group == 0) error (SWT.ERROR_NO_HANDLES);
 	/*
@@ -731,7 +755,7 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
 						sendEvent (SWT.Activate);
 						if (isDisposed ()) return 0;
 						if (isCustomResize ()) {
-							OS.gdk_window_invalidate_rect (OS.GTK_WIDGET_WINDOW (shellHandle), null, false);
+							OS.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false);
 						}
 						break;
 				}
@@ -754,8 +778,8 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
 							display.activePending = false;
 						}
 						if (isDisposed ()) return 0;
-						if (isCustomResize ()) {
-							OS.gdk_window_invalidate_rect (OS.GTK_WIDGET_WINDOW (shellHandle), null, false);
+						if (isCustomResize ()) {				
+							OS.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false);
 						}
 						break;
 				}
@@ -808,8 +832,13 @@ void hookEvents () {
 	OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [MAP_EVENT], 0, display.shellMapProcClosure, false);
 	OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.closures [ENTER_NOTIFY_EVENT], false);
 	OS.g_signal_connect_closure (shellHandle, OS.move_focus, display.closures [MOVE_FOCUS], false);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
-	OS.gdk_window_add_filter  (window, display.filterProc, shellHandle);
+	if (!OS.GTK3) {
+		int /*long*/ window = gtk_widget_get_window (shellHandle);
+		OS.gdk_window_add_filter  (window, display.filterProc, shellHandle);
+	} else {
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [FOCUS_IN_EVENT], 0, display.closures [FOCUS_IN_EVENT], false);
+		OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [FOCUS_OUT_EVENT], 0, display.closures [FOCUS_OUT_EVENT], false);
+	}
 	if (isCustomResize ()) {
 		int mask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_BUTTON_PRESS_MASK |  OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK;
 		OS.gtk_widget_add_events (shellHandle, mask);
@@ -892,12 +921,14 @@ void fixStyle (int /*long*/ handle) {
 }
 
 void forceResize () {
-	forceResize (OS.GTK_WIDGET_WIDTH (vboxHandle), OS.GTK_WIDGET_HEIGHT (vboxHandle));
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (vboxHandle, allocation);
+	forceResize (allocation.width, allocation.height);
 }
 
 void forceResize (int width, int height) {
 	GtkRequisition requisition = new GtkRequisition ();
-	OS.gtk_widget_size_request (vboxHandle, requisition);
+	gtk_widget_get_preferred_size (vboxHandle, requisition);
 	GtkAllocation allocation = new GtkAllocation ();
 	int border = OS.gtk_container_get_border_width (shellHandle);
 	allocation.x = border;
@@ -931,8 +962,10 @@ public int getAlpha () {
 }
 
 int getResizeMode (double x, double y) {
-	int width = OS.GTK_WIDGET_WIDTH (shellHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (shellHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (shellHandle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
 	int border = OS.gtk_container_get_border_width (shellHandle);
 	int mode = 0;
 	if (y >= height - border) {
@@ -1055,8 +1088,10 @@ public boolean getModified () {
 
 public Point getSize () {
 	checkWidget ();
-	int width = OS.GTK_WIDGET_WIDTH (vboxHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (vboxHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (vboxHandle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
 	int border = 0;
 	if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
 		border = OS.gtk_container_get_border_width (shellHandle);
@@ -1066,7 +1101,7 @@ public Point getSize () {
 
 public boolean getVisible () {
 	checkWidget();
-	return OS.GTK_WIDGET_VISIBLE (shellHandle); 
+	return gtk_widget_get_visible (shellHandle); 
 }
 
 /** 
@@ -1165,8 +1200,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 				OS.gtk_window_get_position (shellHandle, x, y);
 				display.resizeBoundsX = x [0];
 				display.resizeBoundsY = y [0];
-				display.resizeBoundsWidth = OS.GTK_WIDGET_WIDTH (shellHandle);
-				display.resizeBoundsHeight = OS.GTK_WIDGET_HEIGHT (shellHandle);
+				GtkAllocation allocation = new GtkAllocation ();
+				gtk_widget_get_allocation (shellHandle, allocation);
+				display.resizeBoundsWidth = allocation.width;
+				display.resizeBoundsHeight = allocation.height;
 			}
 		}
 		return 0;
@@ -1199,16 +1236,40 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
 
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if (widget == shellHandle) {
+		if (isCustomResize ()) {
+			int [] width = new int [1];
+			int [] height = new int [1];
+			int /*long*/ window = gtk_widget_get_window (widget);
+			gdk_window_get_size (window, width, height);
+			int border = OS.gtk_container_get_border_width (widget);
+			int /*long*/ context = OS.gtk_widget_get_style_context (shellHandle);
+			//TODO draw shell frame on GTK3
+			OS.gtk_style_context_save (context);
+			OS.gtk_render_frame (context, cairo, 0, 0, width [0], border);
+			OS.gtk_render_frame (context, cairo, 0, height [0] - border, width [0], border);
+			OS.gtk_render_frame (context, cairo, 0, border, border, height [0] - border - border);
+			OS.gtk_render_frame (context, cairo, width [0] - border, border, border, height [0] - border - border);
+			OS.gtk_render_frame (context, cairo, 0 + 10, 0 + 10, width [0] - 20, height [0] - 20);
+			OS.gtk_style_context_restore (context);
+			return 1;
+		}
+		return 0;
+	}
+	return super.gtk_draw (widget, cairo);
+}
+
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
 	if (widget == shellHandle) {
 		if (isCustomResize ()) {
 			GdkEventExpose gdkEventExpose = new GdkEventExpose ();
 			OS.memmove (gdkEventExpose, event, GdkEventExpose.sizeof);
 			int /*long*/ style = OS.gtk_widget_get_style (widget);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (widget);
+			int /*long*/ window = gtk_widget_get_window (widget);
 			int [] width = new int [1];
 			int [] height = new int [1];
-			OS.gdk_drawable_get_size (window, width, height);
+			gdk_window_get_size (window, width, height);
 			GdkRectangle area = new GdkRectangle ();
 			area.x = gdkEventExpose.area_x;
 			area.y = gdkEventExpose.area_y;
@@ -1246,13 +1307,37 @@ int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) {
 	return super.gtk_focus (widget, directionType);
 }
 
+int /*long*/ gtk_focus_in_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget != shellHandle) {
+		return super.gtk_focus_in_event (widget, event);
+	}
+	display.activeShell = this;
+	display.activePending = false;
+	sendEvent (SWT.Activate);
+	return 0;
+}
+
+int /*long*/ gtk_focus_out_event (int /*long*/ widget, int /*long*/ event) {
+	if (widget != shellHandle) {
+		return super.gtk_focus_out_event (widget, event);
+	}
+	Display display = this.display;
+	sendEvent (SWT.Deactivate);
+	setActiveControl (null);
+	if (display.activeShell == this) {
+		display.activeShell = null;
+		display.activePending = false;
+	}
+	return 0;
+}
+
 int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) {
 	if (widget == shellHandle) {
 		if (isCustomResize ()) {
 			GdkEventCrossing gdkEvent = new GdkEventCrossing ();
 			OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof);
 			if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) == 0) {
-				int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+				int /*long*/ window = gtk_widget_get_window (shellHandle);
 				OS.gdk_window_set_cursor (window, 0);
 				display.resizeMode = 0;
 			}
@@ -1324,17 +1409,17 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ event) {
 						break;
 				}
 				if (x != display.resizeBoundsX || y != display.resizeBoundsY) {
-					OS.gdk_window_move_resize (OS.GTK_WIDGET_WINDOW (shellHandle), x, y, width, height);
+					OS.gdk_window_move_resize (gtk_widget_get_window (shellHandle), x, y, width, height);
 				} else {
 					OS.gtk_window_resize (shellHandle, width, height);
 				}
 			} else {
 				int mode = getResizeMode (gdkEvent.x, gdkEvent.y);
 				if (mode != display.resizeMode) {
-					int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+					int /*long*/ window = gtk_widget_get_window (shellHandle);
 					int /*long*/ cursor = OS.gdk_cursor_new (mode);
 					OS.gdk_window_set_cursor (window, cursor);
-					OS.gdk_cursor_unref (cursor);
+					gdk_cursor_unref (cursor);
 					display.resizeMode = mode;
 				}
 			}
@@ -1377,8 +1462,10 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
 }
 
 int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
-	int width = OS.GTK_WIDGET_WIDTH (shellHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (shellHandle);
+	GtkAllocation widgetAllocation = new GtkAllocation ();
+	gtk_widget_get_allocation (shellHandle, widgetAllocation);
+	int width = widgetAllocation.width;
+	int height = widgetAllocation.height;
 	if (!resized || oldWidth != width || oldHeight != height) {
 		oldWidth = width;
 		oldHeight = height;
@@ -1389,7 +1476,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 
 int /*long*/ gtk_realize (int /*long*/ widget) {
 	int /*long*/ result = super.gtk_realize (widget);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
+	int /*long*/ window = gtk_widget_get_window (shellHandle);
 	if ((style & SWT.SHELL_TRIM) != SWT.SHELL_TRIM) {
 		int decorations = 0;
 		if ((style & SWT.NO_TRIM) == 0) {
@@ -1548,6 +1635,10 @@ public void setActive () {
 }
 
 void setActiveControl (Control control) {
+	setActiveControl (control, SWT.None);
+}
+
+void setActiveControl (Control control, int type) {
 	if (control != null && control.isDisposed ()) control = null;
 	if (lastActive != null && lastActive.isDisposed ()) lastActive = null;
 	if (lastActive == control) return;
@@ -1579,7 +1670,9 @@ void setActiveControl (Control control) {
 	}
 	for (int i=activate.length-1; i>=index; --i) {
 		if (!activate [i].isDisposed ()) {
-			activate [i].sendEvent (SWT.Activate);
+			Event event = new Event ();
+			event.detail = type;
+			activate [i].sendEvent (SWT.Activate, event);
 		}
 	}
 }
@@ -1621,7 +1714,9 @@ void resizeBounds (int width, int height, boolean notify) {
 	int border = OS.gtk_container_get_border_width (shellHandle);
 	int boxWidth = width - 2*border;
 	int boxHeight = height - 2*border;
-	OS.gtk_widget_set_size_request (vboxHandle, boxWidth, boxHeight);
+	if (!OS.GTK3 || (style & SWT.RESIZE) == 0) {
+		OS.gtk_widget_set_size_request (vboxHandle, boxWidth, boxHeight);
+	}
 	forceResize (boxWidth, boxHeight);
 	if (notify) {
 		resized = true;
@@ -1724,7 +1819,7 @@ public void setEnabled (boolean enabled) {
 	} else {
 		int /*long*/ parentHandle = shellHandle;
 		OS.gtk_widget_realize (parentHandle);
-		int /*long*/ window = OS.GTK_WIDGET_WINDOW (parentHandle);
+		int /*long*/ window = gtk_widget_get_window (parentHandle);
 		Rectangle rect = getBounds ();
 		GdkWindowAttr attributes = new GdkWindowAttr ();
 		attributes.width = rect.width;
@@ -1810,21 +1905,28 @@ public void setImeInputMode (int mode) {
 }
 
 void setInitialBounds () {
-	if ((state & FOREIGN_HANDLE) != 0) return;
-	int width = OS.gdk_screen_width () * 5 / 8;
-	int height = OS.gdk_screen_height () * 5 / 8;
-	int /*long*/ screen = OS.gdk_screen_get_default ();
-	if (screen != 0) {
-		if (OS.gdk_screen_get_n_monitors (screen) > 1) {
-			int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ());
-			GdkRectangle dest = new GdkRectangle ();
-			OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
-			width = dest.width * 5 / 8;
-			height = dest.height * 5 / 8;
+	int width, height;
+	if ((state & FOREIGN_HANDLE) != 0) {
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (shellHandle, allocation);
+		width = allocation.width;
+		height = allocation.height;
+	} else {
+		width = OS.gdk_screen_width () * 5 / 8;
+		height = OS.gdk_screen_height () * 5 / 8;
+		int /*long*/ screen = OS.gdk_screen_get_default ();
+		if (screen != 0) {
+			if (OS.gdk_screen_get_n_monitors (screen) > 1) {
+				int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ());
+				GdkRectangle dest = new GdkRectangle ();
+				OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
+				width = dest.width * 5 / 8;
+				height = dest.height * 5 / 8;
+			}
+		}
+		if ((style & SWT.RESIZE) != 0) {
+			OS.gtk_window_resize (shellHandle, width, height);
 		}
-	}
-	if ((style & SWT.RESIZE) != 0) {
-		OS.gtk_window_resize (shellHandle, width, height);
 	}
 	resizeBounds (width, height, false);
 }
@@ -1859,8 +1961,10 @@ public void setMenuBar (Menu menu) {
 		createAccelGroup ();
 		menuBar.addAccelerators (accelGroup);
 	}
-	int width = OS.GTK_WIDGET_WIDTH (vboxHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (vboxHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (vboxHandle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
 	resizeBounds (width, height, !both);
 }
 
@@ -2005,7 +2109,7 @@ public void setVisible (boolean visible) {
 		updateModal ();
 	}
 	showWithParent = visible;
-	if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return;
+	if (gtk_widget_get_mapped (shellHandle) == visible) return;
 	if (visible) {
 		if (center && !moved) {
 			center ();
@@ -2067,7 +2171,7 @@ public void setVisible (boolean visible) {
 		mapped = true;
 
 		if ((style & mask) != 0) {
-			OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME);
+			gdk_pointer_ungrab (OS.gtk_widget_get_window (shellHandle), OS.GDK_CURRENT_TIME);
 		}
 		opened = true;
 		if (!moved) {
@@ -2126,7 +2230,12 @@ void showWidget () {
 			display.activeShell = this;
 			display.activePending = true;
 		}
-		return;
+		int /*long*/ children = OS.gtk_container_get_children (shellHandle), list = children;
+		while (list != 0) {
+			OS.gtk_container_remove (shellHandle, OS.g_list_data (list));
+			list = OS.g_list_next(list);
+		}
+		OS.g_list_free (list);
 	}
 	OS.gtk_container_add (shellHandle, vboxHandle);
 	if (scrolledHandle != 0) OS.gtk_widget_show (scrolledHandle);
@@ -2137,15 +2246,17 @@ void showWidget () {
 int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
 	int offset = 16;
 	int [] x = new int [1], y = new int [1];
-	OS.gdk_window_get_pointer (0, x, y, null);
+	gdk_window_get_device_position (0, x, y, null);
 	y [0] += offset;
 	int /*long*/ screen = OS.gdk_screen_get_default ();
 	if (screen != 0) {
 		int monitorNumber = OS.gdk_screen_get_monitor_at_point (screen, x[0], y[0]);
 		GdkRectangle dest = new GdkRectangle ();
 		OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
-		int width = OS.GTK_WIDGET_WIDTH (handle);
-		int height = OS.GTK_WIDGET_HEIGHT (handle);
+		GtkAllocation allocation = new GtkAllocation ();
+		gtk_widget_get_allocation (handle, allocation);
+		int width = allocation.width;
+		int height = allocation.height;
 		if (x[0] + width > dest.x + dest.width) {
 			x [0] = (dest.x + dest.width) - width;
 		}
@@ -2337,8 +2448,10 @@ public Rectangle getBounds () {
 	checkWidget ();
 	int [] x = new int [1], y = new int [1];
 	OS.gtk_window_get_position (shellHandle, x, y);
-	int width = OS.GTK_WIDGET_WIDTH (vboxHandle);
-	int height = OS.GTK_WIDGET_HEIGHT (vboxHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (vboxHandle, allocation);
+	int width = allocation.width;
+	int height = allocation.height;
 	int border = 0;
 	if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.SHELL_TRIM)) == 0) {
 		border = OS.gtk_container_get_border_width (shellHandle);
@@ -2380,8 +2493,10 @@ void releaseWidget () {
 	tooltipsHandle = 0;
 	if (group != 0) OS.g_object_unref (group);
 	group = modalGroup = 0;
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (shellHandle);
-	OS.gdk_window_remove_filter(window, display.filterProc, shellHandle);
+	if (!OS.GTK3) {
+		int /*long*/ window = gtk_widget_get_window (shellHandle);
+		OS.gdk_window_remove_filter(window, display.filterProc, shellHandle);
+	}
 	lastActive = null;
 }
 
@@ -2405,34 +2520,37 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
 		}
 		if (oldTooltip != 0) OS.g_free(oldTooltip);
 		if (same) return;
-		OS.gtk_widget_set_tooltip_text (rootWidget, null);
-		/*
-		* Bug in GTK. In GTK 2.12, due to a miscalculation of window
-		* coordinates, using gtk_tooltip_trigger_tooltip_query ()
-		* to update an existing a tooltip will result in the tooltip 
-		* being displayed at a wrong position. The fix is to send out 
-		* 2 fake GDK_MOTION_NOTIFY events (to mimic the GTK call) which 
-		* contain the proper x and y coordinates.
-		*/
+		
 		int /*long*/ eventPtr = 0;
-		int /*long*/ tipWindow = OS.GTK_WIDGET_WINDOW (rootWidget);
-		if (tipWindow != 0) {
-			int [] x = new int [1], y = new int [1];
-			int /*long*/ window = OS.gdk_window_at_pointer (x, y);
-			int /*long*/ [] user_data = new int /*long*/ [1];
-			if (window != 0) OS.gdk_window_get_user_data (window, user_data);
-			if (tipWidget == user_data [0]) {
-				eventPtr = OS.gdk_event_new (OS.GDK_MOTION_NOTIFY);
-				GdkEventMotion event = new GdkEventMotion ();
-				event.type = OS.GDK_MOTION_NOTIFY;
-				event.window = OS.g_object_ref (tipWindow);
-				event.x = x [0];
-				event.y = y [0];
-				OS.gdk_window_get_origin (window, x, y);
-				event.x_root = event.x + x [0];
-				event.y_root = event.y + y [0];
-				OS.memmove (eventPtr, event, GdkEventMotion.sizeof);
-				OS.gtk_main_do_event (eventPtr);
+		if (OS.GTK_VERSION < OS.VERSION (2, 18, 0)) {
+			OS.gtk_widget_set_tooltip_text (rootWidget, null);
+			/*
+			 * Bug in GTK. In GTK 2.12, due to a miscalculation of window
+			 * coordinates, using gtk_tooltip_trigger_tooltip_query ()
+			 * to update an existing a toboltip will result in the tooltip 
+			 * being displayed at a wrong position. The fix is to send out 
+			 * 2 fake GDK_MOTION_NOTIFY events (to mimic the GTK call) which 
+			 * contain the proper x and y coordinates.
+			 */
+			int /*long*/ tipWindow = gtk_widget_get_window (rootWidget);
+			if (tipWindow != 0) {
+				int [] x = new int [1], y = new int [1];
+				int /*long*/ window = OS.gdk_window_at_pointer (x, y);
+				int /*long*/ [] user_data = new int /*long*/ [1];
+				if (window != 0) OS.gdk_window_get_user_data (window, user_data);
+				if (tipWidget == user_data [0]) {
+					eventPtr = OS.gdk_event_new (OS.GDK_MOTION_NOTIFY);
+					GdkEventMotion event = new GdkEventMotion ();
+					event.type = OS.GDK_MOTION_NOTIFY;
+					event.window = OS.g_object_ref (tipWindow);
+					event.x = x [0];
+					event.y = y [0];
+					OS.gdk_window_get_origin (window, x, y);
+					event.x_root = event.x + x [0];
+					event.y_root = event.y + y [0];
+					OS.memmove (eventPtr, event, GdkEventMotion.sizeof);
+					OS.gtk_main_do_event (eventPtr);
+				}
 			}
 		}
 		OS.gtk_widget_set_tooltip_text (rootWidget, buffer);
@@ -2461,7 +2579,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
 			tooltipsHandle = OS.gtk_tooltips_new ();
 			if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);
 			OS.g_object_ref (tooltipsHandle);
-			OS.gtk_object_sink (tooltipsHandle);
+			g_object_ref_sink (tooltipsHandle);
 		}
 	
 		/*
@@ -2490,7 +2608,7 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
 		*/
 		boolean set = true;
 		if (tipWindow != 0) {
-			if ((OS.GTK_WIDGET_FLAGS (tipWidget) & (OS.GTK_REALIZED | OS.GTK_VISIBLE)) != 0) {
+			if (gtk_widget_get_visible (tipWidget) || gtk_widget_get_realized (tipWidget)) {
 				int [] x = new int [1], y = new int [1];
 				int /*long*/ window = OS.gdk_window_at_pointer (x, y);
 				if (window != 0) {
@@ -2520,4 +2638,5 @@ void setToolTipText (int /*long*/ rootWidget, int /*long*/ tipWidget, String str
 	}
 		
 }
+
 }
diff --git a/org/eclipse/swt/widgets/Slider.java b/org/eclipse/swt/widgets/Slider.java
index 8b20f25..dc2895f 100644
--- a/org/eclipse/swt/widgets/Slider.java
+++ b/org/eclipse/swt/widgets/Slider.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -152,13 +152,13 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	int /*long*/ hAdjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 10);
 	if (hAdjustment == 0) error (SWT.ERROR_NO_HANDLES);
 	if ((style & SWT.HORIZONTAL) != 0) {
-		handle = OS.gtk_hscrollbar_new (hAdjustment);
+		handle = gtk_scrollbar_new (OS.GTK_ORIENTATION_HORIZONTAL, hAdjustment);
 	} else {
-		handle = OS.gtk_vscrollbar_new (hAdjustment);
+		handle = gtk_scrollbar_new (OS.GTK_ORIENTATION_VERTICAL, hAdjustment);
 	}
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	/*
@@ -170,7 +170,7 @@ void createHandle (int index) {
 	* (http://bugzilla.gnome.org/show_bug.cgi?id=475909) 
 	*/
 	if (OS.GTK_VERSION < OS.VERSION (2, 10, 0) || (style & SWT.VERTICAL) != 0) {
-		OS.GTK_WIDGET_SET_FLAGS (handle, OS.GTK_CAN_FOCUS);
+		gtk_widget_set_can_focus (handle, true);
 	}
 	OS.gtk_container_add (fixedHandle, handle);
 }
@@ -239,9 +239,7 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 
 void hookEvents () {
 	super.hookEvents ();
-	if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-		OS.g_signal_connect_closure (handle, OS.change_value, display.closures [CHANGE_VALUE], false);
-	}
+	OS.g_signal_connect_closure (handle, OS.change_value, display.closures [CHANGE_VALUE], false);
 	OS.g_signal_connect_closure (handle, OS.value_changed, display.closures [VALUE_CHANGED], false);
 }
 
@@ -259,6 +257,7 @@ void deregister () {
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
 	checkWidget();
+	OS.gtk_widget_realize(handle);
 	if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
 	if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
 	Point size = computeNativeSize(handle, wHint, hHint, changed);
@@ -285,9 +284,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 public int getIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.step_increment;
+	return (int) gtk_adjustment_get_step_increment (hAdjustment);
 }
 
 /**
@@ -303,9 +300,7 @@ public int getIncrement () {
 public int getMaximum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.upper;
+	return (int) gtk_adjustment_get_upper (hAdjustment);
 }
 
 /**
@@ -321,9 +316,7 @@ public int getMaximum () {
 public int getMinimum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.lower;
+	return (int) gtk_adjustment_get_lower (hAdjustment);
 }
 
 /**
@@ -341,9 +334,7 @@ public int getMinimum () {
 public int getPageIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.page_increment;
+	return (int) gtk_adjustment_get_page_increment (hAdjustment);
 }
 
 /**
@@ -359,9 +350,7 @@ public int getPageIncrement () {
 public int getSelection () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.value;
+	return (int) gtk_adjustment_get_value (hAdjustment);
 }
 
 /**
@@ -377,9 +366,7 @@ public int getSelection () {
 public int getThumb () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
-	return (int) adjustment.page_size;
+	return (int) gtk_adjustment_get_page_size (hAdjustment);
 }
 
 /**
@@ -445,15 +432,14 @@ public void setMaximum (int value) {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	gtk_adjustment_get (hAdjustment, adjustment);
 	int minimum = (int) adjustment.lower;
 	if (value <= minimum) return;
 	adjustment.upper = value;
 	adjustment.page_size = Math.min ((int)adjustment.page_size, value - minimum);
 	adjustment.value = Math.min ((int)adjustment.value, (int)(value - adjustment.page_size));
-	OS.memmove (hAdjustment, adjustment);
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (hAdjustment);
+	gtk_adjustment_configure (hAdjustment, adjustment);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -475,15 +461,14 @@ public void setMinimum (int value) {
 	if (value < 0) return;
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	gtk_adjustment_get (hAdjustment, adjustment);
 	int maximum = (int) adjustment.upper;
 	if (value >= maximum) return;
 	adjustment.lower = value;
 	adjustment.page_size = Math.min ((int)adjustment.page_size, maximum - value);
 	adjustment.value = Math.max ((int)adjustment.value, value);
-	OS.memmove (hAdjustment, adjustment);
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (hAdjustment);
+	gtk_adjustment_configure (hAdjustment, adjustment);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -558,13 +543,12 @@ public void setThumb (int value) {
 	if (value < 1) return;
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	gtk_adjustment_get (hAdjustment, adjustment);
 	value = (int) Math.min (value, (int)(adjustment.upper - adjustment.lower));
 	adjustment.page_size = (double) value;
 	adjustment.value = Math.min ((int)adjustment.value, (int)(adjustment.upper - value));
-	OS.memmove (hAdjustment, adjustment);
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (hAdjustment);
+	gtk_adjustment_configure (hAdjustment, adjustment);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -599,18 +583,30 @@ public void setValues (int selection, int minimum, int maximum, int thumb, int i
 	thumb = Math.min (thumb, maximum - minimum);
 	int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	adjustment.value = Math.min (Math.max (selection, minimum), maximum - thumb);
 	adjustment.lower = (double) minimum;
 	adjustment.upper = (double) maximum;
 	adjustment.page_size = (double) thumb;
 	adjustment.step_increment = (double) increment;
 	adjustment.page_increment = (double) pageIncrement;
-	OS.memmove (hAdjustment, adjustment);
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_adjustment_changed (hAdjustment);
+	gtk_adjustment_configure (hAdjustment, adjustment);
 	OS.gtk_adjustment_value_changed (hAdjustment);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
+int /*long*/ gtk_scrollbar_new (int orientation, int /*long*/ adjustment) {
+	int /*long*/ scrollbar = 0;
+	if (OS.GTK3) {
+		scrollbar = OS.gtk_scrollbar_new (orientation, adjustment);
+	} else {
+		if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) {
+			scrollbar = OS.gtk_hscrollbar_new (adjustment);
+		} else {
+			scrollbar = OS.gtk_vscrollbar_new (adjustment);
+		}
+	}
+	return scrollbar;
+}
+
 }
diff --git a/org/eclipse/swt/widgets/Spinner.java b/org/eclipse/swt/widgets/Spinner.java
index 2fecb00..8778822 100644
--- a/org/eclipse/swt/widgets/Spinner.java
+++ b/org/eclipse/swt/widgets/Spinner.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -45,6 +45,7 @@ import org.eclipse.swt.events.*;
 public class Spinner extends Composite {
 	static final int MIN_ARROW_WIDTH = 6;
 	int lastEventTime = 0;
+	int /*long*/ imContext;
 	int /*long*/ gdkEventKey = 0;
 	int fixStart = -1, fixEnd = -1;
 	double climbRate = 1;
@@ -205,11 +206,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	OS.gtk_widget_realize (handle);
 	int /*long*/ layout = OS.gtk_entry_get_layout (handle);
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	double upper = gtk_adjustment_get_upper (hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	for (int i = 0; i < digits; i++) adjustment.upper *= 10; 
-	String string = String.valueOf ((int) adjustment.upper);
+	for (int i = 0; i < digits; i++) upper *= 10; 
+	String string = String.valueOf ((int) upper);
 	if (digits > 0) {
 		StringBuffer buffer = new StringBuffer ();
 		buffer.append (string);
@@ -227,12 +227,20 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	byte [] buffer2 = new byte [length];
 	OS.memmove (buffer2, ptr, length);	
 	OS.pango_layout_set_text (layout, buffer1, buffer1.length);
-	OS.pango_layout_get_size (layout, w, h);
 	OS.pango_layout_set_text (layout, buffer2, buffer2.length);
-	int width = OS.PANGO_PIXELS (w [0]);
-	int height = OS.PANGO_PIXELS (h [0]);
-	width = wHint == SWT.DEFAULT ? width : wHint;
-	height = hHint == SWT.DEFAULT ? height : hHint;
+	int width, height = 0 ;
+	OS.gtk_widget_realize (handle);
+	if (OS.GTK3) {
+		OS.gtk_widget_set_size_request (handle, wHint, hHint);
+		GtkRequisition requisition = new GtkRequisition ();
+		OS.gtk_widget_get_preferred_size (handle, requisition, null);
+		width = wHint == SWT.DEFAULT ? requisition.width : wHint;
+		height = hHint == SWT.DEFAULT ? requisition.height : hHint;	
+	} else {
+		OS.pango_layout_get_pixel_size (layout, w, h);
+		width = wHint == SWT.DEFAULT ? w [0] : wHint;
+		height = hHint == SWT.DEFAULT ? h [0] : hHint;
+	}
 	Rectangle trim = computeTrim (0, 0, width, height);
 	return new Point (trim.width, trim.height);
 }
@@ -240,10 +248,29 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget ();
 	int xborder = 0, yborder = 0;
-	int /*long*/ style = OS.gtk_widget_get_style (handle);
-	if ((this.style & SWT.BORDER) != 0) {
-		xborder += OS.gtk_style_get_xthickness (style);
-		yborder += OS.gtk_style_get_ythickness (style);
+	Rectangle trim = super.computeTrim (x, y, width, height);
+	if (OS.GTK3) {
+		GtkBorder tmp = new GtkBorder();
+		int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+		OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+		if ((style & SWT.BORDER) != 0) {
+			OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+			trim.x -= tmp.left;
+			trim.y -= tmp.top;
+			trim.width += tmp.left + tmp.right;
+			trim.height += tmp.top + tmp.bottom;
+		}
+	}else {
+		Point thickness = getThickness (handle);
+		if ((this.style & SWT.BORDER) != 0) {
+			xborder += thickness.x;
+			yborder += thickness.y;
+		}
+		int /*long*/ fontDesc = getFontDescription ();
+		int fontSize = OS.pango_font_description_get_size (fontDesc);
+		int arrowSize = Math.max (OS.PANGO_PIXELS (fontSize), MIN_ARROW_WIDTH);
+		arrowSize = arrowSize - arrowSize % 2;		
+		trim.width += arrowSize + (2 * thickness.x);
 	}
 	int [] property = new int [1];
 	OS.gtk_widget_style_get (handle, OS.interior_focus, property, 0);
@@ -252,16 +279,10 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 		xborder += property [0];
 		yborder += property [0];
 	}
-	int /*long*/ fontDesc = OS.gtk_style_get_font_desc (style);
-	int fontSize = OS.pango_font_description_get_size (fontDesc);
-	int arrowSize = Math.max (OS.PANGO_PIXELS (fontSize), MIN_ARROW_WIDTH);
-	arrowSize = arrowSize - arrowSize % 2;	
-	Rectangle trim = super.computeTrim (x, y, width, height);
 	trim.x -= xborder;
 	trim.y -= yborder;
 	trim.width += 2 * xborder;
 	trim.height += 2 * yborder;
-	trim.width += arrowSize + (2 * OS.gtk_style_get_xthickness (style));
 	GtkBorder innerBorder = Display.getEntryInnerBorder (handle);
 	trim.x -= innerBorder.left;
 	trim.y -= innerBorder.top;
@@ -290,7 +311,7 @@ void createHandle (int index) {
 	state |= HANDLE | MENU;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	int /*long*/ adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0);
 	if (adjustment == 0) error (SWT.ERROR_NO_HANDLES);
 	handle = OS.gtk_spin_button_new (adjustment, climbRate, 0);
@@ -299,6 +320,9 @@ void createHandle (int index) {
 	OS.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0);
 	OS.gtk_entry_set_has_frame (handle, (style & SWT.BORDER) != 0);
 	OS.gtk_spin_button_set_wrap (handle, (style & SWT.WRAP) != 0);
+	if (OS.GTK3) {
+		imContext = OS.imContextLast();
+	}
 }
 
 /**
@@ -371,9 +395,8 @@ GdkColor getBackgroundColor () {
 
 public int getBorderWidth () {
 	checkWidget();
-	int /*long*/ style = OS.gtk_widget_get_style (handle);
 	if ((this.style & SWT.BORDER) != 0) {
-		 return OS.gtk_style_get_xthickness (style);
+		return getThickness (handle).x;
 	}
 	return 0;
 }
@@ -396,10 +419,8 @@ GdkColor getForegroundColor () {
 public int getIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	double value = adjustment.step_increment;
+	double value = gtk_adjustment_get_step_increment (hAdjustment);
 	for (int i = 0; i < digits; i++) value *= 10;
 	return (int) (value > 0 ? value + 0.5 : value - 0.5);
 }
@@ -417,10 +438,8 @@ public int getIncrement () {
 public int getMaximum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	double value = adjustment.upper;
+	double value = gtk_adjustment_get_upper (hAdjustment);
 	for (int i = 0; i < digits; i++) value *= 10;
 	return (int) (value > 0 ? value + 0.5 : value - 0.5);
 }
@@ -438,10 +457,8 @@ public int getMaximum () {
 public int getMinimum () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	double value = adjustment.lower;
+	double value = gtk_adjustment_get_lower (hAdjustment);
 	for (int i = 0; i < digits; i++) value *= 10;
 	return (int) (value > 0 ? value + 0.5 : value - 0.5);
 }
@@ -460,10 +477,8 @@ public int getMinimum () {
 public int getPageIncrement () {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	double value = adjustment.page_increment;
+	double value = gtk_adjustment_get_page_increment (hAdjustment);
 	for (int i = 0; i < digits; i++) value *= 10;
 	return (int) (value > 0 ? value + 0.5 : value - 0.5);
 }
@@ -481,10 +496,8 @@ public int getPageIncrement () {
 public int getSelection () {
 	checkWidget ();	
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
 	int digits = OS.gtk_spin_button_get_digits (handle);
-	double value = adjustment.value;
+	double value = gtk_adjustment_get_value(hAdjustment);
 	for (int i = 0; i < digits; i++) value *= 10;
 	return (int) (value > 0 ? value + 0.5 : value - 0.5);
 }
@@ -573,7 +586,7 @@ int /*long*/ gtk_changed (int /*long*/ widget) {
 		if (endptr [0] == str + length) {
 			int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
 			GtkAdjustment adjustment = new GtkAdjustment ();
-			OS.memmove (adjustment, hAdjustment);
+			gtk_adjustment_get (hAdjustment, adjustment);
 			if (value != adjustment.value && adjustment.lower <= value && value <= adjustment.upper) {
 				OS.gtk_spin_button_update (handle);
 			}
@@ -759,6 +772,7 @@ void hookEvents () {
 }
 
 int /*long*/ imContext () {
+	if (imContext != 0) return imContext; 
 	return OS.GTK_ENTRY_IM_CONTEXT (handle);
 }
 
@@ -871,22 +885,32 @@ void removeVerifyListener (VerifyListener listener) {
 	eventTable.unhook (SWT.Verify, listener);	
 }
 
+void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
+	setBackgroundColorGradient (context, handle, rgba);
+}
+
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	OS.gtk_widget_modify_base (handle, 0, color);
+	if (!OS.GTK3) {
+		OS.gtk_widget_modify_base (handle, 0, color);
+	}
 }
 
 void setCursor (int /*long*/ cursor) {
 	int /*long*/ defaultCursor = 0;
 	if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM);
 	super.setCursor (cursor != 0 ? cursor : defaultCursor);
-	if (cursor == 0) OS.gdk_cursor_unref (defaultCursor);
+	if (cursor == 0) gdk_cursor_unref (defaultCursor);
 }
 
 void setFontDescription (int /*long*/ font) {
 	super.setFontDescription (font);
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 /**
  * Sets the amount that the receiver's value will be
  * modified by when the up/down arrows are pressed to
@@ -903,13 +927,12 @@ public void setIncrement (int value) {
 	checkWidget ();
 	if (value < 1) return;
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	double page_increment = gtk_adjustment_get_page_increment (hAdjustment);
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_spin_button_set_increments (handle, newValue, adjustment.page_increment);
+	OS.gtk_spin_button_set_increments (handle, newValue, page_increment);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -929,14 +952,13 @@ public void setIncrement (int value) {
 public void setMaximum (int value) {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	double lower = gtk_adjustment_get_lower (hAdjustment);
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
-	if (newValue < adjustment.lower) return;
+	if (newValue < lower) return;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_spin_button_set_range (handle, adjustment.lower, newValue);
+	OS.gtk_spin_button_set_range (handle, lower, newValue);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -956,14 +978,13 @@ public void setMaximum (int value) {
 public void setMinimum (int value) {
 	checkWidget ();
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	double upper = gtk_adjustment_get_upper (hAdjustment);
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
-	if (newValue > adjustment.upper) return;
+	if (newValue > upper) return;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_spin_button_set_range (handle, newValue, adjustment.upper);
+	OS.gtk_spin_button_set_range (handle, newValue, upper);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -983,13 +1004,12 @@ public void setPageIncrement (int value) {
 	checkWidget ();
 	if (value < 1) return;
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	double step_increment = gtk_adjustment_get_step_increment(hAdjustment);
 	double newValue = value;
 	int digits = OS.gtk_spin_button_get_digits (handle);
 	for (int i = 0; i < digits; i++) newValue /= 10;
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
-	OS.gtk_spin_button_set_increments (handle, adjustment.step_increment, newValue);
+	OS.gtk_spin_button_set_increments (handle, step_increment, newValue);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 }
 
@@ -1071,7 +1091,7 @@ public void setDigits (int value) {
 	if (value == digits) return;
 	int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
 	GtkAdjustment adjustment = new GtkAdjustment ();
-	OS.memmove (adjustment, hAdjustment);
+	gtk_adjustment_get (hAdjustment, adjustment);
 	int diff = Math.abs (value - digits);
 	int factor = 1;
 	for (int i = 0; i < diff; i++) factor *= 10;
@@ -1090,7 +1110,7 @@ public void setDigits (int value) {
 		adjustment.page_increment /= factor;
 		climbRate /= factor;
 	}
-	OS.memmove (hAdjustment, adjustment);
+	gtk_adjustment_configure (hAdjustment, adjustment);
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
 	OS.gtk_spin_button_configure (handle, hAdjustment, climbRate, value);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, VALUE_CHANGED);
@@ -1196,9 +1216,8 @@ String verifyText (String string, int start, int end) {
 	}
 	if (string.length () > 0) {
 		int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
-		GtkAdjustment adjustment = new GtkAdjustment ();
-		OS.memmove (adjustment, hAdjustment);
-		if (adjustment.lower < 0 && string.charAt (0) == '-') index++;
+		double lower = gtk_adjustment_get_lower (hAdjustment);
+		if (lower < 0 && string.charAt (0) == '-') index++;
 	}
 	while (index < string.length ()) {
 		if (!Character.isDigit (string.charAt (index))) break;
diff --git a/org/eclipse/swt/widgets/TabFolder.java b/org/eclipse/swt/widgets/TabFolder.java
index 3dc637f..0cdc95d 100644
--- a/org/eclipse/swt/widgets/TabFolder.java
+++ b/org/eclipse/swt/widgets/TabFolder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -166,14 +166,17 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	checkWidget();
 	forceResize ();
 	int /*long*/ clientHandle = clientHandle ();
-	int clientX = OS.GTK_WIDGET_X (clientHandle);
-	int clientY = OS.GTK_WIDGET_Y (clientHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (clientHandle, allocation);
+	int clientX = allocation.x;
+	int clientY = allocation.y;
 	x -= clientX;
 	y -= clientY;
 	width +=  clientX + clientX;
 	if ((style & SWT.BOTTOM) != 0) {
-		int parentHeight = OS.GTK_WIDGET_HEIGHT (handle);
-		int clientHeight = OS.GTK_WIDGET_HEIGHT (clientHandle);
+		int clientHeight = allocation.height;
+		gtk_widget_get_allocation (handle, allocation);
+		int parentHeight = allocation.height;
 		height += parentHeight - clientHeight;
 	} else {
 		height +=  clientX + clientY;
@@ -185,7 +188,7 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	handle = OS.gtk_notebook_new ();
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (fixedHandle, handle);
@@ -214,7 +217,7 @@ void createItem (TabItem item, int index) {
 		System.arraycopy (items, 0, newItems, 0, items.length);
 		items = newItems;
 	}
-	int /*long*/ boxHandle = OS.gtk_hbox_new (false, 0);
+	int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 0);
 	if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
 	if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -224,6 +227,12 @@ void createItem (TabItem item, int index) {
 	OS.gtk_container_add (boxHandle, labelHandle);
 	int /*long*/ pageHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (pageHandle == 0) error (SWT.ERROR_NO_HANDLES);
+	if (OS.GTK3) {
+		OS.gtk_widget_override_background_color (pageHandle, OS.GTK_STATE_FLAG_NORMAL, new GdkRGBA ());
+		int /*long*/ region = OS.gdk_region_new ();
+		OS.gtk_widget_input_shape_combine_region (pageHandle, region);
+		OS.gdk_region_destroy (region);
+	}
 	OS.g_signal_handlers_block_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
 	OS.gtk_notebook_insert_page (handle, pageHandle, boxHandle, index);
 	OS.g_signal_handlers_unblock_matched (handle, OS.G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, SWITCH_PAGE);
diff --git a/org/eclipse/swt/widgets/TabItem.java b/org/eclipse/swt/widgets/TabItem.java
index 59aea1b..bb06823 100644
--- a/org/eclipse/swt/widgets/TabItem.java
+++ b/org/eclipse/swt/widgets/TabItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,10 +150,12 @@ void destroyWidget () {
  */
 public Rectangle getBounds () {
 	checkWidget();
-	int x = OS.GTK_WIDGET_X (handle);
-	int y = OS.GTK_WIDGET_Y (handle);
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
 	return new Rectangle (x, y, width, height);
 }
@@ -282,14 +284,14 @@ public void setControl (Control control) {
 }
 
 void setFontDescription (int /*long*/ font) {
-	OS.gtk_widget_modify_font (labelHandle, font);
-	OS.gtk_widget_modify_font (imageHandle, font);
+	setFontDescription (labelHandle, font);
+	setFontDescription (imageHandle, font);
 }
 
 void setForegroundColor (GdkColor color) {
 	/* Don't set the color in vbox handle (it doesn't draw) */
-	setForegroundColor (labelHandle, color);
-	setForegroundColor (imageHandle, color);
+	setForegroundColor (labelHandle, color, false);
+	setForegroundColor (imageHandle, color, false);
 }
 
 public void setImage (Image image) {
@@ -305,10 +307,10 @@ public void setImage (Image image) {
 			imageList.put (imageIndex, image);
 		}
 		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf (imageHandle, pixbuf);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_hide (imageHandle);
 	}
 }
diff --git a/org/eclipse/swt/widgets/Table.java b/org/eclipse/swt/widgets/Table.java
index 158e3c1..e1d6e43 100644
--- a/org/eclipse/swt/widgets/Table.java
+++ b/org/eclipse/swt/widgets/Table.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -13,6 +13,7 @@ package org.eclipse.swt.widgets;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.*;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.events.*;
@@ -179,7 +180,11 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo
 	OS.gtk_tree_path_free (path);
 	if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle);
 	boolean isPixbuf = OS.GTK_IS_CELL_RENDERER_PIXBUF (cell);
-	if (!(isPixbuf || OS.GTK_IS_CELL_RENDERER_TEXT (cell))) return 0;
+	boolean isText = OS.GTK_IS_CELL_RENDERER_TEXT (cell);
+	if (isText && OS.GTK3) {
+		OS.gtk_cell_renderer_set_fixed_size (cell, -1, -1);
+	}
+	if (!(isPixbuf || isText)) return 0;
 	int modelIndex = -1;
 	boolean customDraw = false;
 	if (columnCount == 0) {
@@ -205,7 +210,7 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo
 		ptr [0] = 0;
 		if (isPixbuf) {
 			OS.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_PIXBUF, ptr, -1);
-			OS.g_object_set (cell, OS.pixbuf, ptr [0], 0);
+			OS.g_object_set (cell, OS.GTK3 ? OS.gicon : OS.pixbuf, ptr [0], 0);
 			if (ptr [0] != 0) OS.g_object_unref (ptr [0]);
 		} else {
 			OS.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_TEXT, ptr, -1); 
@@ -334,7 +339,7 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter) {
 	while (temp != 0) {
 		int /*long*/ renderer = OS.g_list_data (temp);
 		if (renderer != 0) {
-			OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, w, null);
+			gtk_cell_renderer_get_preferred_size (renderer, handle, w, null);
 			width += w [0];
 		}
 		temp = OS.g_list_next (temp);
@@ -511,6 +516,7 @@ void createColumn (TableColumn column, int index) {
 			int /*long*/ newModel = OS.gtk_list_store_newv (types.length, types);
 			if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
 			int /*long*/ [] ptr = new int /*long*/ [1];
+			int [] ptr1 = new int [1];
 			for (int i=0; i<itemCount; i++) {
 				int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ());
 				if (newItem == 0) error (SWT.ERROR_NO_HANDLES);
@@ -518,13 +524,18 @@ void createColumn (TableColumn column, int index) {
 				TableItem item = items [i];
 				if (item != null) {
 					int /*long*/ oldItem = item.handle;
-					for (int j=0; j<modelLength; j++) {
+					/* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+					for (int j=0; j<FOREGROUND_COLUMN; j++) {
+						OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
+						OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
+					}
+					for (int j=FOREGROUND_COLUMN; j<modelLength; j++) {
 						OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
 						OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
-						if (types [j] == OS.G_TYPE_STRING ()) {
-							OS.g_free ((ptr [0]));
-						} else if (ptr [0] != 0) {
-							if (types [j] == OS.GDK_TYPE_COLOR()) {
+						if (ptr [0] != 0) {
+							if (types [j] == OS.G_TYPE_STRING ()) {
+								OS.g_free ((ptr [0]));
+							} else if (types [j] == OS.GDK_TYPE_COLOR()) {
 								OS.gdk_color_free (ptr [0]);
 							} else if (types [j] == OS.GDK_TYPE_PIXBUF()) {
 								OS.g_object_unref (ptr [0]);
@@ -541,8 +552,7 @@ void createColumn (TableColumn column, int index) {
 				}
 			}
 			OS.gtk_tree_view_set_model (handle, newModel);
-			OS.g_object_unref (oldModel);
-			modelHandle = newModel;
+			setModel (newModel);
 		}
 	}
 	int /*long*/ columnHandle = OS.gtk_tree_view_column_new ();
@@ -556,12 +566,17 @@ void createColumn (TableColumn column, int index) {
 		OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);
 	} else {
 		OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_FIXED);
-		if (columnCount != 0) OS.gtk_tree_view_column_set_visible (columnHandle, false);
 	}
 	OS.gtk_tree_view_column_set_resizable (columnHandle, true);
 	OS.gtk_tree_view_column_set_clickable (columnHandle, true);
 	OS.gtk_tree_view_column_set_min_width (columnHandle, 0);
 	OS.gtk_tree_view_insert_column (handle, columnHandle, index);
+	/*
+	* Bug in GTK3.  The column header has the wrong CSS styling if it is hidden
+	* when inserting to the tree widget.  The fix is to hide the column only 
+	* after it is inserted.
+	*/
+	if (columnCount != 0) OS.gtk_tree_view_column_set_visible (columnHandle, false);
 	if (column != null) {
 		column.handle = columnHandle;
 		column.modelIndex = modelIndex;
@@ -593,7 +608,7 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	scrolledHandle = OS.gtk_scrolled_window_new (0, 0);
 	if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	int /*long*/ [] types = getColumnTypes (1);
@@ -653,7 +668,7 @@ void createItem (TableColumn column, int index) {
 	} else {
 		createColumn (column, index);
 	}
-	int /*long*/ boxHandle = OS.gtk_hbox_new (false, 3);
+	int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
 	if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
 	if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -666,13 +681,17 @@ void createItem (TableColumn column, int index) {
 	column.labelHandle = labelHandle;
 	column.imageHandle = imageHandle;	
 	OS.gtk_tree_view_column_set_widget (column.handle, boxHandle);
-	int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle);
-	while (widget != handle) {
-		if (OS.GTK_IS_BUTTON (widget)) {
-			column.buttonHandle = widget;
-			break;
+	if (OS.GTK3) {
+		column.buttonHandle = OS.gtk_tree_view_column_get_button(column.handle);
+	} else {
+		int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle);
+		while (widget != handle) {
+			if (OS.GTK_IS_BUTTON (widget)) {
+				column.buttonHandle = widget;
+				break;
+			}
+			widget = OS.gtk_widget_get_parent (widget);
 		}
-		widget = OS.gtk_widget_get_parent (widget);
 	}
 	if (columnCount == columns.length) {
 		TableColumn [] newColumns = new TableColumn [columns.length + 4];
@@ -782,7 +801,7 @@ void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check,
 	}
 
 	/* Add attributes */
-	OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.pixbuf, modelIndex + CELL_PIXBUF);
+	OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.GTK3 ? OS.gicon : OS.pixbuf, modelIndex + CELL_PIXBUF);
 	if (!ownerDraw) {
 		OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.cell_background_gdk, BACKGROUND_COLUMN);
 		OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.cell_background_gdk, BACKGROUND_COLUMN);
@@ -949,6 +968,7 @@ void destroyItem (TableColumn column) {
 		int /*long*/ newModel = OS.gtk_list_store_newv (types.length, types);
 		if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
 		int /*long*/ [] ptr = new int /*long*/ [1];
+		int [] ptr1 = new int [1];
 		for (int i=0; i<itemCount; i++) {
 			int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ());
 			if (newItem == 0) error (SWT.ERROR_NO_HANDLES);
@@ -956,7 +976,12 @@ void destroyItem (TableColumn column) {
 			TableItem item = items [i];
 			if (item != null) {
 				int /*long*/ oldItem = item.handle;
-				for (int j=0; j<FIRST_COLUMN; j++) {
+				/* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+				for (int j=0; j<FOREGROUND_COLUMN; j++) {
+					OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
+					OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
+				}
+				for (int j=FOREGROUND_COLUMN; j<FIRST_COLUMN; j++) {
 					OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
 					OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
 					if (ptr [0] != 0) {
@@ -990,8 +1015,7 @@ void destroyItem (TableColumn column) {
 			}
 		}
 		OS.gtk_tree_view_set_model (handle, newModel);
-		OS.g_object_unref (oldModel);
-		modelHandle = newModel;
+		setModel (newModel);
 		createColumn (null, 0);
 	} else {
 		for (int i=0; i<itemCount; i++) {
@@ -999,11 +1023,11 @@ void destroyItem (TableColumn column) {
 			if (item != null) {
 				int /*long*/ iter = item.handle;
 				int modelIndex = column.modelIndex;
-				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1);
-				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1);
-				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1);
-				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1);
-				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1);
+				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1);
+				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1);
+				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1);
+				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1);
+				OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1);
 				
 				Font [] cellFont = item.cellFont;
 				if (cellFont != null) {
@@ -1119,22 +1143,24 @@ public Rectangle getClientArea () {
 	checkWidget ();
 	forceResize ();
 	OS.gtk_widget_realize (handle);
-	int /*long*/ fixedWindow = OS.GTK_WIDGET_WINDOW (fixedHandle);
+	int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
 	int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
 	int [] binX = new int [1], binY = new int [1];
 	OS.gdk_window_get_origin (binWindow, binX, binY);
 	int [] fixedX = new int [1], fixedY = new int [1];
 	OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
 	int /*long*/ clientHandle = clientHandle ();
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (clientHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (clientHandle, allocation);
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	return new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
 }
 
 int getClientWidth () {
 	int [] w = new int [1], h = new int [1];
 	OS.gtk_widget_realize (handle);
-	OS.gdk_drawable_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
+	gdk_window_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
 	return w[0];
 }
 
@@ -1350,14 +1376,14 @@ public int getHeaderHeight () {
 		for (int i=0; i<columnCount; i++) {
 			int /*long*/ buttonHandle = columns [i].buttonHandle;
 			if (buttonHandle != 0) {
-				OS.gtk_widget_size_request (buttonHandle, requisition);
+				gtk_widget_get_preferred_size (buttonHandle, requisition);
 				height = Math.max (height, requisition.height);
 			}
 		}
 		return height;
 	}
 	OS.gtk_widget_realize (handle);
-	int /*long*/ fixedWindow = OS.GTK_WIDGET_WINDOW (fixedHandle);
+	int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
 	int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
 	int [] binY = new int [1];
 	OS.gdk_window_get_origin (binWindow, null, binY);
@@ -1483,8 +1509,14 @@ public int getItemHeight () {
 		int [] w = new int [1], h = new int [1];
 		ignoreSize = true;
 		OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
+		int height = h [0];
+		if (OS.GTK3) {
+			int /*long*/ textRenderer = getTextRenderer (column);
+			OS.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
+			height += h [0];
+		}
 		ignoreSize = false;
-		return h [0];
+		return height;
 	} else {
 		int height = 0;
 		int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
@@ -1858,7 +1890,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	* it finishes processing a button press.  The fix is to give
 	* focus to the widget before it starts processing the event.
 	*/
-	if (!OS.GTK_WIDGET_HAS_FOCUS (handle)) {
+	if (!gtk_widget_has_focus (handle)) {
 		OS.gtk_widget_grab_focus (handle);
 	}
 	return result;
@@ -1899,34 +1931,47 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 	return super.gtk_event_after (widget, gdkEvent);
 }
 
-int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
-	if ((state & OBSCURED) != 0) return 0;
+void drawInheritedBackground (int /*long*/ eventPtr, int /*long*/ cairo) {
 	if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
 		Control control = findBackgroundControl ();
 		if (control != null) {
-			GdkEventExpose gdkEvent = new GdkEventExpose ();
-			OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
 			int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
-			if (window == gdkEvent.window) {
-				int [] width = new int [1], height = new int [1];
-				OS.gdk_drawable_get_size (window, width, height);
-				int bottom = 0;
-				if (itemCount != 0) {
-					int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
-					OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, itemCount - 1);
-					int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
-					GdkRectangle rect = new GdkRectangle ();
-					OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
-					bottom = rect.y + rect.height;
-					OS.gtk_tree_path_free (path);
-					OS.g_free (iter);
-				}
-				if (height [0] > bottom) {
-					drawBackground (control, window, gdkEvent.region, 0, bottom, width [0], height [0] - bottom);
-				}
+			int /*long*/ rgn = 0;
+			if (eventPtr != 0) {
+				GdkEventExpose gdkEvent = new GdkEventExpose ();
+				OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
+				if (window != gdkEvent.window) return;
+				rgn = gdkEvent.region;
+			}
+			int [] width = new int [1], height = new int [1];
+			gdk_window_get_size (window, width, height);
+			int bottom = 0;
+			if (itemCount != 0) {
+				int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
+				OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, itemCount - 1);
+				int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
+				GdkRectangle rect = new GdkRectangle ();
+				OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
+				bottom = rect.y + rect.height;
+				OS.gtk_tree_path_free (path);
+				OS.g_free (iter);
+			}
+			if (height [0] > bottom) {
+				drawBackground (control, window, cairo, rgn, 0, bottom, width [0], height [0] - bottom);
 			}
 		}
 	}
+}
+
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawInheritedBackground (0, cairo);
+	return super.gtk_draw (widget, cairo);
+}
+
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawInheritedBackground (eventPtr, 0);
 	return super.gtk_expose_event (widget, eventPtr);
 }
 
@@ -1964,14 +2009,14 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long
 	return 0;
 }
 
-int gtk_row_deleted (int model, int path) {
+int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) {
 	if (ignoreAccessibility) {
 		OS.g_signal_stop_emission_by_name (model, OS.row_deleted);
 	}
 	return 0;
 }
 
-int gtk_row_inserted (int model, int path, int iter) {
+int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) {
 	if (ignoreAccessibility) {
 		OS.g_signal_stop_emission_by_name (model, OS.row_inserted);
 	}
@@ -2462,12 +2507,8 @@ public void removeSelectionListener(SelectionListener listener) {
 	eventTable.unhook (SWT.DefaultSelection,listener);	
 }
 
-int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
-	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
-	GtkCellRendererClass klass = new GtkCellRendererClass ();
-	OS.memmove (klass, g_class);
-	int /*long*/ result = OS.call (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height);
-	if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
+void sendMeasureEvent (int /*long*/ cell, int /*long*/ width, int /*long*/ height) {
+	if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell) && hooks (SWT.MeasureItem)) {
 		int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2);
 		TableItem item = null;
 		boolean isSelected = false;
@@ -2492,39 +2533,71 @@ int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*
 					}				
 				}
 			}
-			if (hooks (SWT.MeasureItem)) {
-				int [] contentWidth = new int [1], contentHeight = new int  [1];
-				if (width != 0) OS.memmove (contentWidth, width, 4);
-				if (height != 0) OS.memmove (contentHeight, height, 4);
-				Image image = item.getImage (columnIndex);
-				int imageWidth = 0;
-				if (image != null) {
-					Rectangle bounds = image.getBounds ();
-					imageWidth = bounds.width;
-				}
-				contentWidth [0] += imageWidth;
-				GC gc = new GC (this);
-				gc.setFont (item.getFont (columnIndex));
-				Event event = new Event ();
-				event.item = item;
-				event.index = columnIndex;
-				event.gc = gc;
-				event.width = contentWidth [0];
-				event.height = contentHeight [0];
-				if (isSelected) event.detail = SWT.SELECTED;
-				sendEvent (SWT.MeasureItem, event);
-				gc.dispose ();
-				contentWidth [0] = event.width - imageWidth;
-				if (contentHeight [0] < event.height) contentHeight [0] = event.height;
-				if (width != 0) OS.memmove (width, contentWidth, 4);
-				if (height != 0) OS.memmove (height, contentHeight, 4);
+			int [] contentWidth = new int [1], contentHeight = new int  [1];
+			if (width != 0) OS.memmove (contentWidth, width, 4);
+			if (height != 0) OS.memmove (contentHeight, height, 4);
+			if (OS.GTK3) {
+				OS.gtk_cell_renderer_get_preferred_height_for_width (cell, handle, contentWidth[0], contentHeight, null);
+			}
+			Image image = item.getImage (columnIndex);
+			int imageWidth = 0;
+			if (image != null) {
+				Rectangle bounds = image.getBounds ();
+				imageWidth = bounds.width;
+			}
+			contentWidth [0] += imageWidth;
+			GC gc = new GC (this);
+			gc.setFont (item.getFont (columnIndex));
+			Event event = new Event ();
+			event.item = item;
+			event.index = columnIndex;
+			event.gc = gc;
+			event.width = contentWidth [0];
+			event.height = contentHeight [0];
+			if (isSelected) event.detail = SWT.SELECTED;
+			sendEvent (SWT.MeasureItem, event);
+			gc.dispose ();
+			contentWidth [0] = event.width - imageWidth;
+			if (contentHeight [0] < event.height) contentHeight [0] = event.height;
+			if (width != 0) OS.memmove (width, contentWidth, 4);
+			if (height != 0) OS.memmove (height, contentHeight, 4);
+			if (OS.GTK3) { 
+				OS.gtk_cell_renderer_set_fixed_size (cell, contentWidth [0], contentHeight [0]);
 			}
 		}
 	}
-	return result;
+}
+
+int /*long*/ rendererGetPreferredWidthProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ minimun_size, int /*long*/ natural_size) {
+	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
+	GtkCellRendererClass klass = new GtkCellRendererClass ();
+	OS.memmove (klass, g_class);
+	OS.call (klass.get_preferred_width, cell, handle, minimun_size, natural_size);
+	sendMeasureEvent (cell, minimun_size, 0);
+	return 0;
+}
+
+int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
+	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
+	GtkCellRendererClass klass = new GtkCellRendererClass ();
+	OS.memmove (klass, g_class);
+	OS.call_get_size (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height);
+	sendMeasureEvent (cell, width, height);
+	return 0;
+}
+
+
+int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ cr, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ flags) {
+	rendererRender (cell, cr, 0, widget, background_area, cell_area, 0, flags);
+	return 0;
 }
 
 int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
+	rendererRender (cell, 0, window, widget, background_area, cell_area, expose_area, flags);
+	return 0;
+}
+
+void rendererRender (int /*long*/ cell, int /*long*/ cr, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
 	TableItem item = null;
 	int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2);
 	if (iter != 0) {
@@ -2560,7 +2633,9 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				OS.gdk_color_free (ptr [0]);
 			}
 			if ((flags & OS.GTK_CELL_RENDERER_SELECTED) != 0) drawState |= SWT.SELECTED;
-			if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;			
+			if (!OS.GTK3 || (flags & OS.GTK_CELL_RENDERER_SELECTED) == 0) {
+				if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;
+			}
 			
 			GdkRectangle rect = new GdkRectangle ();
 			int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
@@ -2571,14 +2646,21 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
 					Control control = findBackgroundControl ();
 					if (control != null) {
-						drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+						if (cr != 0) {
+							Cairo.cairo_save (cr);
+							Cairo.cairo_reset_clip (cr);
+						}
+						drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
+						if (cr != 0) {
+							Cairo.cairo_restore (cr);
+						}
 					}
 				}
 			}
 
 			//send out measure before erase
 			int /*long*/ textRenderer =  getTextRenderer (columnHandle);
-			if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null);
+			if (textRenderer != 0) gtk_cell_renderer_get_preferred_size (textRenderer, handle, null, null);
 			
 
 			if (hooks (SWT.EraseItem)) {
@@ -2586,7 +2668,14 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				if (wasSelected) {
 					Control control = findBackgroundControl ();
 					if (control == null) control = this;
-					drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+					if (cr != 0) {
+						Cairo.cairo_save (cr);
+						Cairo.cairo_reset_clip (cr);
+					}
+					drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
+					if (cr != 0) {
+						Cairo.cairo_restore (cr);
+					}
 				}
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
@@ -2615,10 +2704,22 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED;
 				if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED;
 				if ((drawState & SWT.SELECTED) != 0) {
-					int /*long*/ style = OS.gtk_widget_get_style (widget);					
-					//TODO - parity and sorted
-					byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
-					OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+					if (OS.GTK3) {
+						Cairo.cairo_save (cr);
+						Cairo.cairo_reset_clip (cr);
+						int /*long*/ context = OS.gtk_widget_get_style_context (widget);
+						OS.gtk_style_context_save (context);
+						OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_CELL);
+						OS.gtk_style_context_set_state (context, OS.GTK_STATE_FLAG_SELECTED);
+						OS.gtk_render_background(context, cr, rect.x, rect.y, rect.width, rect.height);
+						OS.gtk_style_context_restore (context);
+						Cairo.cairo_restore (cr);
+					} else {
+						int /*long*/ style = OS.gtk_widget_get_style (widget);					
+						//TODO - parity and sorted
+						byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
+						OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+					}
 				} else {
 					if (wasSelected) drawForeground = gc.getForeground ().handle;
 				}
@@ -2626,7 +2727,6 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			}
 		}
 	}
-	int /*long*/ result = 0;
 	if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) {
 		GC gc = new GC (this);
 		gc.setBackground (item.getBackground (columnIndex));
@@ -2642,7 +2742,11 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 		if (drawForeground != null && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
 			OS.g_object_set (cell, OS.foreground_gdk, drawForeground, 0);
 		}
-		result = OS.call (klass.render, cell, window, handle, background_area, cell_area, expose_area, drawFlags);
+		if (OS.GTK3) {
+			OS.call (klass.render, cell, cr, widget, background_area, cell_area, drawFlags);
+		} else {
+			OS.call (klass.render, cell, window, widget, background_area, cell_area, expose_area, drawFlags);
+		}
 	}
 	if (item != null) {
 		if (OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
@@ -2652,8 +2756,8 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				OS.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
 				OS.gtk_tree_path_free (path);
 				ignoreSize = true;
-				int [] contentX = new int [1], contentWidth = new int [1];
-				OS.gtk_cell_renderer_get_size (cell, handle, null, null, null, contentWidth, null);
+				int [] contentX = new int [1], contentWidth = new int [1];	
+				gtk_cell_renderer_get_preferred_size (cell, handle, contentWidth, null);
 				OS.gtk_tree_view_column_cell_get_position (columnHandle, cell, contentX, null);
 				ignoreSize = false;
 				Image image = item.getImage (columnIndex);
@@ -2666,8 +2770,21 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				contentWidth [0] += imageWidth;
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
-					gc.setBackground (display.getSystemColor (SWT.COLOR_LIST_SELECTION));
-					gc.setForeground (display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT));
+					Color background, foreground;
+					if (gtk_widget_has_focus (handle) || OS.GTK3) {
+						background = display.getSystemColor (SWT.COLOR_LIST_SELECTION);
+						foreground = display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT);
+					} else {
+						/*
+						 * Feature in GTK. When the widget doesn't have focus, then
+						 * gtk_paint_flat_box () changes the background color state_type
+						 * to GTK_STATE_ACTIVE. The fix is to use the same values in the GC.
+						 */
+						background = Color.gtk_new (display, display.COLOR_LIST_SELECTION_INACTIVE);
+						foreground = Color.gtk_new (display, display.COLOR_LIST_SELECTION_TEXT_INACTIVE);
+					}
+					gc.setBackground (background);
+					gc.setForeground (foreground);
 				} else {
 					gc.setBackground (item.getBackground (columnIndex));
 					Color foreground = drawForeground != null ? Color.gtk_new (display, drawForeground) : item.getForeground (columnIndex);
@@ -2690,7 +2807,6 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			}
 		}
 	}
-	return result;
 }
 
 void resetCustomDraw () {
@@ -2727,13 +2843,6 @@ void reskinChildren (int flags) {
 boolean searchEnabled () {
 	/* Disable searching when using VIRTUAL */
 	if ((style & SWT.VIRTUAL) != 0) return false;
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
-		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
-		Shell shell = getShell();
-		if ((shell.style & mask) != 0) {
-			return false;
-		}
-	}
 	return true;
 }
 
@@ -2907,7 +3016,9 @@ void selectFocusIndex (int index) {
 
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	OS.gtk_widget_modify_base (handle, 0, color);
+	if (!OS.GTK3) {
+		OS.gtk_widget_modify_base (handle, 0, color);
+	}
 }
 
 void setBackgroundPixmap (Image image) {
@@ -2926,12 +3037,6 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* after it has been resized.
 	*/
 	OS.gtk_widget_realize (handle);
-	/*
-	* Bug in GTK.  An empty GtkTreeView fails to repaint the focus rectangle
-	* correctly when resized on versions before 2.6.0.  The fix is to force
-	* the widget to redraw.
-	*/
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0) && itemCount == 0) redraw (false);
 	return result;
 }
 
@@ -2991,6 +3096,10 @@ void setFontDescription (int /*long*/ font) {
 	}
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 /**
  * Marks the receiver's header as visible if the argument is <code>true</code>,
  * and marks it invisible otherwise. 
@@ -3083,6 +3192,17 @@ public void setLinesVisible (boolean show) {
 	}
 }
 
+void setModel (int /*long*/ newModel) {
+	display.removeWidget (modelHandle);
+	OS.g_object_unref (modelHandle);
+	modelHandle = newModel;
+	display.addWidget (modelHandle, this);
+	if (fixAccessibility ()) {
+		OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.closures [ROW_INSERTED], true);
+		OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.closures [ROW_DELETED], true);
+	}
+}
+
 void setOrientation (boolean create) {
 	super.setOrientation (create);
 	for (int i=0; i<itemCount; i++) {
@@ -3184,7 +3304,8 @@ public void setSortDirection  (int direction) {
 
 /**
  * Selects the item at the given zero-relative index in the receiver. 
- * The current selection is first cleared, then the new item is selected.
+ * The current selection is first cleared, then the new item is selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  *
  * @param index the index of the item to select
  *
@@ -3208,7 +3329,8 @@ public void setSelection (int index) {
 /**
  * Selects the items in the range specified by the given zero-relative
  * indices in the receiver. The range of indices is inclusive.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Indices that are out of range are ignored and no items will be selected
  * if start is greater than end.
@@ -3245,7 +3367,8 @@ public void setSelection (int start, int end) {
 
 /**
  * Selects the items at the given zero-relative indices in the receiver.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Indices that are out of range and duplicate indices are ignored.
  * If the receiver is single-select and multiple indices are specified,
@@ -3282,7 +3405,8 @@ public void setSelection (int [] indices) {
 
 /**
  * Sets the receiver's selection to the given item.
- * The current selection is cleared before the new item is selected.
+ * The current selection is cleared before the new item is selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * If the item is not in the receiver, then it is ignored.
  * </p>
@@ -3308,7 +3432,8 @@ public void setSelection (TableItem item) {
 
 /**
  * Sets the receiver's selection to be the given array of items.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Items that are not in the receiver are ignored.
  * If the receiver is single-select and multiple items are specified,
@@ -3497,7 +3622,7 @@ void showItem (int /*long*/ iter) {
 	OS.gtk_tree_view_get_cell_area (handle, path, 0, cellRect);
 	int[] tx = new int[1], ty = new int[1];
 	if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
-		OS.gtk_tree_view_convert_widget_to_bin_window_coords(handle, cellRect.x, cellRect.y, tx, ty);
+		OS.gtk_tree_view_convert_bin_window_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 	} else {
 		OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 	}
diff --git a/org/eclipse/swt/widgets/TableColumn.java b/org/eclipse/swt/widgets/TableColumn.java
index e1a78e1..e0e76c1 100644
--- a/org/eclipse/swt/widgets/TableColumn.java
+++ b/org/eclipse/swt/widgets/TableColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -350,16 +350,6 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 				lastButton = eventButton;
 				break;
 			}
-			case OS.GDK_MOTION_NOTIFY: {
-				/*
-				* Bug in GTK.  Dragging a column in a GtkTreeView causes a clicked 
-				* signal to be emitted even though the mouse button was never released.
-				* The fix to ignore the signal if the current GDK event is a motion notify.
-				* The GTK bug was fixed in version 2.6
-				*/
-				if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) postEvent = false;
-				break;
-			}
 		}
 	}
 	if (postEvent) sendSelectionEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
@@ -388,8 +378,10 @@ int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) {
 
 int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 	useFixedWidth = false;
-	int x = OS.GTK_WIDGET_X (widget);
-	int width = OS.GTK_WIDGET_WIDTH (widget);
+	GtkAllocation widgetAllocation = new GtkAllocation ();
+	gtk_widget_get_allocation (widget, widgetAllocation);
+	int x = widgetAllocation.x;
+	int width = widgetAllocation.width;
 	if (x != lastX) {
 		lastX = x;
 		sendEvent (SWT.Move);
@@ -427,7 +419,7 @@ public void pack () {
 	int width = 0;
 	if (buttonHandle != 0) {
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (buttonHandle, requisition);
+		gtk_widget_get_preferred_size (buttonHandle, requisition);
 		width = requisition.width;
 	}
 	if ((parent.style & SWT.VIRTUAL) != 0) {
@@ -546,8 +538,8 @@ public void setAlignment (int alignment) {
 }
 
 void setFontDescription (int /*long*/ font) {
-	OS.gtk_widget_modify_font (labelHandle, font);
-	OS.gtk_widget_modify_font (imageHandle, font);
+	setFontDescription (labelHandle, font);
+	setFontDescription (imageHandle, font);
 }
 
 public void setImage (Image image) {
@@ -561,10 +553,10 @@ public void setImage (Image image) {
 		int imageIndex = headerImageList.indexOf (image);
 		if (imageIndex == -1) imageIndex = headerImageList.add (image);
 		int /*long*/ pixbuf = headerImageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf (imageHandle, pixbuf);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_hide (imageHandle);
 	}
 }
diff --git a/org/eclipse/swt/widgets/TableItem.java b/org/eclipse/swt/widgets/TableItem.java
index 9042ad2..a5db4a0 100644
--- a/org/eclipse/swt/widgets/TableItem.java
+++ b/org/eclipse/swt/widgets/TableItem.java
@@ -150,7 +150,7 @@ Color _getBackground (int index) {
 }
 
 boolean _getChecked () {
-	int /*long*/ [] ptr = new int /*long*/ [1];
+	int [] ptr = new int [1];
 	OS.gtk_tree_model_get (parent.modelHandle, handle, Table.CHECKED_COLUMN, ptr, -1);
 	return ptr [0] != 0;
 }
@@ -214,9 +214,13 @@ void clear () {
 	if (parent.currentItem == this) return;
 	if (cached || (parent.style & SWT.VIRTUAL) == 0) {
 		int columnCount = OS.gtk_tree_model_get_n_columns (parent.modelHandle);
-		for (int i=0; i<columnCount; i++) {
+		/* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+		for (int i=Table.CHECKED_COLUMN; i<Table.FOREGROUND_COLUMN; i++) {
 			OS.gtk_list_store_set (parent.modelHandle, handle, i, 0, -1);
 		}
+		for (int i=Table.FOREGROUND_COLUMN; i<columnCount; i++) {
+			OS.gtk_list_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1);
+		}
 		/*
 		* Bug in GTK.  When using fixed-height-mode,
 		* row changes do not cause the row to be repainted.  The fix is to
@@ -296,7 +300,7 @@ public Rectangle getBounds () {
 
 	int [] x = new int [1], w = new int [1];
 	parent.ignoreSize = true;
-	OS.gtk_cell_renderer_get_size (textRenderer, parentHandle, null, null, null, w, null);
+	gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
 	parent.ignoreSize = false;
 	rect.width = w [0];
 	int [] buffer = new int [1];
@@ -674,7 +678,7 @@ public Rectangle getTextBounds (int index) {
 
 	int [] x = new int [1], w = new int [1];
 	parent.ignoreSize = true;
-	OS.gtk_cell_renderer_get_size (textRenderer, parentHandle, null, null, null, w, null);
+	gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
 	parent.ignoreSize = false;
 	int [] buffer = new int [1];
 	if (OS.gtk_tree_view_get_expander_column (parentHandle) == column) {
@@ -697,7 +701,7 @@ public Rectangle getTextBounds (int index) {
 }
 
 void redraw () {
-	if ((OS.GTK_WIDGET_FLAGS (parent.handle) & OS.GTK_REALIZED) != 0) {
+	if (gtk_widget_get_realized (parent.handle)) {
 		int /*long*/ parentHandle = parent.handle;
 		int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle);
 		GdkRectangle rect = new GdkRectangle ();
@@ -706,7 +710,7 @@ void redraw () {
 		int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle);
 		rect.x = 0;
 		int [] w = new int [1], h = new int [1];
-		OS.gdk_drawable_get_size (window, w, h);
+		gdk_window_get_size (window, w, h);
 		rect.width = w [0];
 		OS.gdk_window_invalidate_rect (window, rect, false);
 	}
@@ -1097,7 +1101,7 @@ public void setGrayed (boolean grayed) {
 	* GTK+'s "inconsistent" state does not match SWT's concept of grayed.
 	* Render checked+grayed as "inconsistent", unchecked+grayed as blank.
 	*/
-	int /*long*/ [] ptr = new int /*long*/ [1];
+	int [] ptr = new int [1];
 	OS.gtk_tree_model_get (parent.modelHandle, handle, Table.CHECKED_COLUMN, ptr, -1);
 	OS.gtk_list_store_set (parent.modelHandle, handle, Table.GRAYED_COLUMN, ptr [0] == 0 ? false : grayed, -1);
 	cached = true;
@@ -1165,8 +1169,10 @@ public void setImage (int index, Image image) {
 				* are relying on the fact that it is done as part of modifying
 				* the style.
 				*/
-				int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle);
-				parent.modifyStyle (parentHandle, style);
+				if (!OS.GTK3) {
+					int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle);
+					parent.modifyStyle (parentHandle, style);
+				}
 			}
 		} 
 	}
diff --git a/org/eclipse/swt/widgets/Text.java b/org/eclipse/swt/widgets/Text.java
index 2e018ab..2feeedb 100644
--- a/org/eclipse/swt/widgets/Text.java
+++ b/org/eclipse/swt/widgets/Text.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -58,6 +58,7 @@ import org.eclipse.swt.events.*;
  */
 public class Text extends Scrollable {
 	int /*long*/ bufferHandle;
+	int /*long*/ imContext;
 	int tabs = 8, lastEventTime = 0;
 	int /*long*/ gdkEventKey = 0;
 	int fixStart = -1, fixEnd = -1;
@@ -193,7 +194,7 @@ void createHandle (int index) {
 	}
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	if ((style & SWT.SINGLE) != 0) {
 		handle = OS.gtk_entry_new ();
 		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -217,7 +218,7 @@ void createHandle (int index) {
 		OS.gtk_container_add (fixedHandle, scrolledHandle);
 		OS.gtk_container_add (scrolledHandle, handle);
 		OS.gtk_text_view_set_editable (handle, (style & SWT.READ_ONLY) == 0);
-		if ((style & SWT.WRAP) != 0) OS.gtk_text_view_set_wrap_mode (handle, OS.GTK_VERSION < OS.VERSION (2, 4, 0) ? OS.GTK_WRAP_WORD : OS.GTK_WRAP_WORD_CHAR);
+		if ((style & SWT.WRAP) != 0) OS.gtk_text_view_set_wrap_mode (handle, OS.GTK_WRAP_WORD_CHAR);
 		int hsp = (style & SWT.H_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;
 		int vsp = (style & SWT.V_SCROLL) != 0 ? OS.GTK_POLICY_ALWAYS : OS.GTK_POLICY_NEVER;
 		OS.gtk_scrolled_window_set_policy (scrolledHandle, hsp, vsp);
@@ -229,6 +230,12 @@ void createHandle (int index) {
 		if ((style & SWT.RIGHT) != 0) just = OS.GTK_JUSTIFY_RIGHT;
 		OS.gtk_text_view_set_justification (handle, just);
 	}
+	if (OS.GTK3) {
+		imContext = OS.imContextLast();
+		if ((style & SWT.SINGLE) != 0) {
+			OS.gtk_entry_set_width_chars(handle, 6);
+		}
+	}
 }
 
 void createWidget (int index) {
@@ -265,17 +272,19 @@ public void addModifyListener (ModifyListener listener) {
 /**
  * Adds a segment listener.
  * <p>
- * A <code>SegmentEvent</code> is sent whenever text content is being modified. The user can 
- * customize appearance of text by indicating certain characters to be inserted
+ * A <code>SegmentEvent</code> is sent whenever text content is being modified or
+ * a segment listener is added or removed. You can 
+ * customize the appearance of text by indicating certain characters to be inserted
  * at certain text offsets. This may be used for bidi purposes, e.g. when
  * adjacent segments of right-to-left text should not be reordered relative to
  * each other. 
- * E.g., Multiple Java string literals in a right-to-left language
+ * E.g., multiple Java string literals in a right-to-left language
  * should generally remain in logical order to each other, that is, the
  * way they are stored.
- * <br>
- * After SegmentListener is added, user may call <code>setText(String)</code>
- * for segments to take effect.
+ * </p>
+ * <p>
+ * <b>Warning</b>: This API is currently only implemented on Windows and GTK.
+ * <code>SegmentEvent</code>s won't be sent on Cocoa.
  * </p>
  *
  * @param listener the listener which should be notified
@@ -298,6 +307,8 @@ public void addSegmentListener (SegmentListener listener) {
 	checkWidget ();
 	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
 	addListener (SWT.Segments, new TypedListener (listener));
+	clearSegments (true);
+	applySegments ();
 }
 
 /**
@@ -528,7 +539,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 	if ((style & SWT.SINGLE) != 0) {
 		OS.gtk_widget_realize (handle);
 		int /*long*/ layout = OS.gtk_entry_get_layout (handle);
-		OS.pango_layout_get_size (layout, w, h);
+		OS.pango_layout_get_pixel_size (layout, w, h);
 	} else {
 		byte [] start =  new byte [ITER_SIZEOF], end  =  new byte [ITER_SIZEOF];
 		OS.gtk_text_buffer_get_bounds (bufferHandle, start, end);
@@ -536,17 +547,17 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
 		int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, text);
 		OS.g_free (text);
 		OS.pango_layout_set_width (layout, wHint * OS.PANGO_SCALE);
-		OS.pango_layout_get_size (layout, w, h);
+		OS.pango_layout_get_pixel_size (layout, w, h);
 		OS.g_object_unref (layout);
 	}
-	int width = OS.PANGO_PIXELS (w [0]);
-	int height = OS.PANGO_PIXELS (h [0]);
+	int width = w [0];
+	int height = h [0];
 	if ((style & SWT.SINGLE) != 0 && message.length () > 0) {
 		byte [] buffer = Converter.wcsToMbcs (null, message, true);
 		int /*long*/ layout = OS.gtk_widget_create_pango_layout (handle, buffer);
-		OS.pango_layout_get_size (layout, w, h);
+		OS.pango_layout_get_pixel_size (layout, w, h);
 		OS.g_object_unref (layout);
-		width = Math.max (width, OS.PANGO_PIXELS (w [0]));
+		width = Math.max (width, w [0]);
 	}
 	if (width == 0) width = DEFAULT_WIDTH;
 	if (height == 0) height = DEFAULT_HEIGHT;
@@ -561,16 +572,39 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
 	Rectangle trim = super.computeTrim (x, y, width, height);
 	int xborder = 0, yborder = 0;
 	if ((style & SWT.SINGLE) != 0) {
-		if ((style & SWT.BORDER) != 0) {
-			int /*long*/ style = OS.gtk_widget_get_style (handle);
-			xborder += OS.gtk_style_get_xthickness (style);
-			yborder += OS.gtk_style_get_ythickness (style);
+		if (OS.GTK3) {
+			GtkBorder tmp = new GtkBorder();
+			int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+			OS.gtk_style_context_get_padding (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+			trim.x -= tmp.left;
+			trim.y -= tmp.top;
+			trim.width += tmp.left + tmp.right;
+			trim.height += tmp.top + tmp.bottom;
+			if ((style & SWT.BORDER) != 0) {
+				OS.gtk_style_context_get_border (context, OS.GTK_STATE_FLAG_NORMAL, tmp);
+				trim.x -= tmp.left;
+				trim.y -= tmp.top;
+				trim.width += tmp.left + tmp.right;
+				trim.height += tmp.top + tmp.bottom;
+			}
+			GdkRectangle icon_area = new GdkRectangle();
+			OS.gtk_entry_get_icon_area(handle, OS.GTK_ENTRY_ICON_PRIMARY, icon_area);
+			trim.x -= icon_area.width;
+			trim.width += icon_area.width;
+			OS.gtk_entry_get_icon_area(handle, OS.GTK_ENTRY_ICON_SECONDARY, icon_area);
+			trim.width += icon_area.width;
+		} else {
+			if ((style & SWT.BORDER) != 0) {
+				Point thickness = getThickness (handle);
+				xborder += thickness.x;
+				yborder += thickness.y;
+			}
+			GtkBorder innerBorder = Display.getEntryInnerBorder (handle);
+			trim.x -= innerBorder.left;
+			trim.y -= innerBorder.top;
+			trim.width += innerBorder.left + innerBorder.right;
+			trim.height += innerBorder.top + innerBorder.bottom;
 		}
-		GtkBorder innerBorder = Display.getEntryInnerBorder (handle);
-		trim.x -= innerBorder.left;
-		trim.y -= innerBorder.top;
-		trim.width += innerBorder.left + innerBorder.right;
-		trim.height += innerBorder.top + innerBorder.bottom;
 	} else {
 		int borderWidth = OS.gtk_container_get_border_width (handle);  
 		xborder += borderWidth;
@@ -763,9 +797,8 @@ GdkColor getBackgroundColor () {
 public int getBorderWidth () {
 	checkWidget();
 	if ((style & SWT.MULTI) != 0) return super.getBorderWidth ();
-	int /*long*/ style = OS.gtk_widget_get_style (handle);
 	if ((this.style & SWT.BORDER) != 0) {
-		 return OS.gtk_style_get_xthickness (style);
+		 return getThickness (handle).x;
 	}
 	return 0;
 }
@@ -807,9 +840,7 @@ public Point getCaretLocation () {
 	checkWidget ();
 	if ((style & SWT.SINGLE) != 0) {
 		int index = OS.gtk_editable_get_position (handle);
-		if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-			index = OS.gtk_entry_text_index_to_layout_index (handle, index);
-		}
+		index = OS.gtk_entry_text_index_to_layout_index (handle, index);
 		int [] offset_x = new int [1], offset_y = new int [1];
 		OS.gtk_entry_get_layout_offsets (handle, offset_x, offset_y);
 		int /*long*/ layout = OS.gtk_entry_get_layout (handle);
@@ -1233,6 +1264,11 @@ public String getText (int start, int end) {
  * The text for a text widget is the characters in the widget, or
  * a zero-length array if this has never been set.
  * </p>
+ * <p>
+ * Note: Use the API to protect the text, for example, when widget is used as
+ * a password field. However, the text can't be protected if Segment listener
+ * is added to the widget.
+ * </p>
  *
  * @return a character array that contains the widget's text
  *
@@ -1541,17 +1577,14 @@ int /*long*/ gtk_event_after (int /*long*/ widget, int /*long*/ gdkEvent) {
 	return super.gtk_event_after (widget, gdkEvent);
 }
 
-int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
-	if ((state & OBSCURED) != 0) return 0;
-	int /*long*/ result = super.gtk_expose_event (widget, event);
+void drawMessage (int /*long*/ cr) {
+	if (OS.GTK_VERSION >= OS.VERSION (3, 2, 0)) return;
 	if ((style & SWT.SINGLE) != 0 && message.length () > 0) {
 		int /*long*/ str = OS.gtk_entry_get_text (handle);
-		if (!OS.GTK_WIDGET_HAS_FOCUS (handle) && OS.strlen (str) == 0) {
-			GdkEventExpose gdkEvent = new GdkEventExpose ();
-			OS.memmove (gdkEvent, event, GdkEventExpose.sizeof);
+		if (!gtk_widget_has_focus (handle) && OS.strlen (str) == 0) {
 			int /*long*/ window = paintWindow ();
 			int [] w = new int [1], h = new int [1];
-			OS.gdk_drawable_get_size (window, w, h);
+			gdk_window_get_size (window, w, h);
 			GtkBorder innerBorder = Display.getEntryInnerBorder (handle);
 			int width = w [0] - innerBorder.left - innerBorder.right;
 			int height = h [0] - innerBorder.top - innerBorder.bottom;
@@ -1586,17 +1619,29 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
 				case SWT.CENTER: x = (width - rect.width) / 2; break;
 				case SWT.RIGHT: x = rtl ? innerBorder.left : width - rect.width; break;
 			}
-			int /*long*/ style = OS.gtk_widget_get_style (handle);	
 			GdkColor textColor = new GdkColor ();
-			OS.gtk_style_get_text (style, OS.GTK_STATE_INSENSITIVE, textColor);
 			GdkColor baseColor = new GdkColor ();
-			OS.gtk_style_get_base (style, OS.GTK_STATE_NORMAL, baseColor);
+			if (OS.GTK3) {
+				int /*long*/ styleContext = OS.gtk_widget_get_style_context (handle);
+				GdkRGBA rgba = new GdkRGBA ();
+				OS.gtk_style_context_get_color (styleContext, OS.GTK_STATE_FLAG_INSENSITIVE, rgba);
+				textColor.red = (short)(rgba.red * 0xFFFF);
+				textColor.green = (short)(rgba.green * 0xFFFF);
+				textColor.blue = (short)(rgba.blue * 0xFFFF);
+				Point thickness = getThickness (handle);
+				x += thickness.x;
+				y += thickness.y;
+			} else {
+				int /*long*/ style = OS.gtk_widget_get_style (handle);	
+				OS.gtk_style_get_text (style, OS.GTK_STATE_INSENSITIVE, textColor);
+				OS.gtk_style_get_base (style, OS.GTK_STATE_NORMAL, baseColor);
+			}
 			if (OS.USE_CAIRO) {
-				int /*long*/ cairo = OS.gdk_cairo_create(window);
+				int /*long*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window);
 				Cairo.cairo_set_source_rgba(cairo, (textColor.red & 0xFFFF) / (float)0xFFFF, (textColor.green & 0xFFFF) / (float)0xFFFF, (textColor.blue & 0xFFFF) / (float)0xFFFF, 1);
 				Cairo.cairo_move_to(cairo, x, y);
 				OS.pango_cairo_show_layout(cairo, layout);
-				Cairo.cairo_destroy(cairo);
+				if (cr != cairo) Cairo.cairo_destroy(cairo);
 			} else {
 				int /*long*/ gc = OS.gdk_gc_new	(window);
 				OS.gdk_draw_layout_with_colors (window, gc, x, y, layout, textColor, baseColor);
@@ -1605,6 +1650,19 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
 			OS.g_object_unref (layout);
 		}
 	}
+}
+
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	int /*long*/ result = super.gtk_draw (widget, cairo);
+	drawMessage (cairo);
+	return result;
+}
+
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
+	if ((state & OBSCURED) != 0) return 0;
+	int /*long*/ result = super.gtk_expose_event (widget, event);
+	drawMessage (0);
 	return result;
 }
 
@@ -1796,6 +1854,7 @@ void hookEvents () {
 }
 
 int /*long*/ imContext () {
+	if (imContext != 0) return imContext; 
 	if ((style & SWT.SINGLE) != 0) {
 		return OS.gtk_editable_get_editable (handle) ? OS.GTK_ENTRY_IM_CONTEXT (handle) : 0;
 	} 
@@ -1899,18 +1958,6 @@ void register () {
 void releaseWidget () {
 	super.releaseWidget ();
 	fixIM ();	
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {		 
-		/*
-		* Bug in GTK.  Any text copied into the clipboard will be lost when
-		* the GtkTextView is destroyed.  The fix is to paste the contents as
-		* the widget is being destroyed to reference the text buffer, keeping
-		* it around until ownership of the clipboard is lost.
-		*/
-		if ((style & SWT.MULTI) != 0) {
-			int /*long*/ clipboard = OS.gtk_clipboard_get (OS.GDK_NONE);
-			OS.gtk_text_buffer_paste_clipboard (bufferHandle, clipboard, null, OS.gtk_text_view_get_editable (handle));
-		}
-	}
 	message = null;
 }
 
@@ -1941,10 +1988,6 @@ public void removeModifyListener (ModifyListener listener) {
 /**
  * Removes the listener from the collection of listeners who will
  * be notified when the receiver's text is modified.
- * <p>
- * After SegmentListener is removed, user may call <code>setText(String)</code>
- * for segments to take effect.
- * </p>
  *
  * @param listener the listener which should no longer be notified
  *
@@ -1966,6 +2009,8 @@ public void removeSegmentListener (SegmentListener listener) {
 	checkWidget ();
 	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
 	eventTable.unhook (SWT.Segments, listener);
+	clearSegments (true);
+	applySegments ();
 }
 
 /**
@@ -2043,14 +2088,24 @@ public void selectAll () {
 
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	OS.gtk_widget_modify_base (handle, 0, color);
+	if (!OS.GTK3) {
+		OS.gtk_widget_modify_base (handle, 0, color);
+	}
+}
+
+void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
+	if ((style & SWT.MULTI) != 0) {
+		super.setBackgroundColor (context, handle, rgba);
+		return;
+	}
+	setBackgroundColorGradient (context, handle, rgba);
 }
 
 void setCursor (int /*long*/ cursor) {
 	int /*long*/ defaultCursor = 0;
 	if (cursor == 0) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM);
 	super.setCursor (cursor != 0 ? cursor : defaultCursor);
-	if (cursor == 0) OS.gdk_cursor_unref (defaultCursor);
+	if (cursor == 0) gdk_cursor_unref (defaultCursor);
 }
 
 /**
@@ -2131,6 +2186,10 @@ void setFontDescription (int /*long*/ font) {
 	setTabStops (tabs);
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 /**
  * Sets the widget message. The message text is displayed
  * as a hint for the user, indicating the purpose of the field.
@@ -2154,6 +2213,13 @@ public void setMessage (String message) {
 	checkWidget ();
 	if (message == null) error (SWT.ERROR_NULL_ARGUMENT);
 	this.message = message;
+	if (OS.GTK_VERSION >= OS.VERSION (3, 2, 0)) {
+		if ((style & SWT.SINGLE) != 0) {
+			byte [] buffer = Converter.wcsToMbcs (null, message, true);
+			OS.gtk_entry_set_placeholder_text (handle, buffer);
+			return;
+		}
+	}
 	redraw (false);
 }
 
@@ -2376,7 +2442,12 @@ public void setText (String string) {
  * Sets the contents of the receiver to the characters in the array. If the receiver
  * has style <code>SWT.SINGLE</code> and the argument contains multiple lines of text
  * then the result of this operation is undefined and may vary between platforms.
- *
+ * <p>
+ * Note: Use the API to protect the text, for example, when widget is used as
+ * a password field. However, the text can't be protected if Verify or
+ * Segment listener is added to the widget.
+ * </p>
+ * 
  * @param text a character array that contains the new text
  *
  * @exception IllegalArgumentException <ul>
diff --git a/org/eclipse/swt/widgets/ToolBar.java b/org/eclipse/swt/widgets/ToolBar.java
index a4d939d..17db649 100644
--- a/org/eclipse/swt/widgets/ToolBar.java
+++ b/org/eclipse/swt/widgets/ToolBar.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -130,7 +130,7 @@ void createHandle (int index) {
 	state |= HANDLE | THEME_BACKGROUND;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	handle = OS.gtk_toolbar_new ();
 	if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 	OS.gtk_container_add (fixedHandle, handle);
@@ -138,6 +138,29 @@ void createHandle (int index) {
 		byte [] swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true);
 		OS.gtk_widget_set_name (handle, swt_toolbar_flat);
 	}
+
+	/*
+	* Bug in GTK. For some reason, the toolbar style context does not read
+	* the CSS style sheet until the window containing the toolbar is shown.
+	* The fix is to call gtk_style_context_invalidate() which it seems to
+	* force the style sheet to be read. 
+	*/
+	if (OS.GTK3) { 
+		int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+		OS.gtk_style_context_invalidate (context);
+	}
+	
+	/*
+	* Bug in GTK.  GTK will segment fault if gtk_widget_reparent() is called
+	* on a tool bar or on a widget hierarchy containing a tool bar when the icon
+	* size is not GTK_ICON_SIZE_LARGE_TOOLBAR.  The fix is to set the icon
+	* size to GTK_ICON_SIZE_LARGE_TOOLBAR.
+	* 
+	* Note that the segmentation fault does not happen on GTK 3, but the 
+	* tool bar preferred size is too big with GTK_ICON_SIZE_LARGE_TOOLBAR
+	* when the tool bar item has no image or text.
+	*/
+	OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR);
 }
 
 public Point computeSize (int wHint, int hHint, boolean changed) {
@@ -379,28 +402,7 @@ ToolItem [] _getTabItemList () {
 int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 	if (!hasFocus ()) return 0;
 	int /*long*/ result = super.gtk_key_press_event (widget, eventPtr);
-	if (result != 0) return result;
-	GdkEventKey gdkEvent = new GdkEventKey ();
-	OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof);
-	switch (gdkEvent.keyval) {
-		case OS.GDK_Down: {
-			if (OS.GTK_VERSION < OS.VERSION (2, 6, 0) && (currentFocusItem != null) && (currentFocusItem.style & SWT.DROP_DOWN) != 0) {
-				Event event = new Event ();
-				event.detail = SWT.ARROW;
-				int /*long*/ topHandle = currentFocusItem.topHandle ();
-				event.x = OS.GTK_WIDGET_X (topHandle);
-				event.y = OS.GTK_WIDGET_Y (topHandle) + OS.GTK_WIDGET_HEIGHT (topHandle);
-				if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth() - OS.GTK_WIDGET_WIDTH(topHandle) - event.x;
-				currentFocusItem.sendSelectionEvent  (SWT.Selection, event, false);
-				/*
-				 * Stop GTK from processing the event further as key_down binding
-				 * will move the focus to the next item.
-				 */
-				return 1;
-			}
-		}
-		default: return result;
-	}
+	return result;
 }
 
 int /*long*/ gtk_focus (int /*long*/ widget, int /*long*/ directionType) {
@@ -461,9 +463,11 @@ int /*long*/ menuItemSelected (int /*long*/ widget, ToolItem item) {
 			 * as Arrow click, in order to popup the drop-down. 
 			 */
 			event.detail = SWT.ARROW;
-			event.x = OS.GTK_WIDGET_X (widget);
-			if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth () - OS.GTK_WIDGET_WIDTH (widget) - event.x;
-			event.y = OS.GTK_WIDGET_Y (widget) + OS.GTK_WIDGET_HEIGHT (widget);
+			GtkAllocation allocation = new GtkAllocation ();
+			gtk_widget_get_allocation (widget, allocation);
+			event.x = allocation.x;
+			if ((style & SWT.MIRRORED) != 0) event.x = getClientWidth () - allocation.width - event.x;
+			event.y = allocation.y + allocation.height;
 			break;
 		case SWT.RADIO :
 			if ((style & SWT.NO_RADIO_GROUP) == 0)	item.selectRadio ();
diff --git a/org/eclipse/swt/widgets/ToolItem.java b/org/eclipse/swt/widgets/ToolItem.java
index 8be8ddb..671b844 100644
--- a/org/eclipse/swt/widgets/ToolItem.java
+++ b/org/eclipse/swt/widgets/ToolItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ import org.eclipse.swt.events.*;
  * @noextend This class is not intended to be subclassed by clients.
  */
 public class ToolItem extends Item {
-	int /*long*/ arrowHandle, arrowBoxHandle, labelHandle, imageHandle;
+	int /*long*/ arrowHandle, labelHandle, imageHandle;
 	int /*long*/ eventHandle, proxyMenuItem;
 	ToolBar parent;
 	Control control;
@@ -195,41 +195,18 @@ void createHandle (int index) {
 			OS.gtk_separator_tool_item_set_draw (handle, true);
 			break;
 		case SWT.DROP_DOWN:
-			if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
-				handle = OS.gtk_menu_tool_button_new (0, null);
-				if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-				/*
-				 * Feature in GTK. The arrow button of DropDown tool-item is 
-				 * disabled when it does not contain menu. The fix is to
-				 * find the arrow button handle and enable it.
-				 */
-				int /*long*/ child = OS.gtk_bin_get_child (handle);
-				int /*long*/ list = OS.gtk_container_get_children (child);
-				arrowHandle = OS.g_list_nth_data (list, 1);
-				OS.gtk_widget_set_sensitive (arrowHandle, true);
-				OS.gtk_widget_set_size_request(OS.gtk_bin_get_child(arrowHandle), 8, 6);
-			} else {
-				/*
-				 * GTK does not support GtkMenuToolButton until 2.6.
-				 * So, we try to emulate it on the un-supported version.
-				 */
-				handle = OS.gtk_tool_button_new (0, null);
-				if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-				arrowBoxHandle = OS.gtk_hbox_new (false, 0);
-				if (arrowBoxHandle == 0) error(SWT.ERROR_NO_HANDLES);
-				arrowHandle = OS.gtk_arrow_new (OS.GTK_ARROW_DOWN, OS.GTK_SHADOW_NONE);
-				if (arrowHandle == 0) error (SWT.ERROR_NO_HANDLES);
-				OS.gtk_widget_set_size_request (arrowHandle, 8, 6);
-				OS.gtk_container_add (arrowBoxHandle, labelHandle);	
-				OS.gtk_container_add (arrowBoxHandle, arrowHandle);
-				/*
-				 * As we are try to emulate GtkMenuToolButton and in order
-				 * to display both the label and image, it is required
-				 * the set the toolitem as important. This will entitle
-				 * to display the label all the times.    
-				 */
-				OS.gtk_tool_item_set_is_important (handle, true);
-			}
+			handle = OS.gtk_menu_tool_button_new (0, null);
+			if (handle == 0) error (SWT.ERROR_NO_HANDLES);
+			/*
+			 * Feature in GTK. The arrow button of DropDown tool-item is 
+			 * disabled when it does not contain menu. The fix is to
+			 * find the arrow button handle and enable it.
+			 */
+			int /*long*/ child = OS.gtk_bin_get_child (handle);
+			int /*long*/ list = OS.gtk_container_get_children (child);
+			arrowHandle = OS.g_list_nth_data (list, 1);
+			OS.gtk_widget_set_sensitive (arrowHandle, true);
+			OS.gtk_widget_set_size_request(OS.gtk_bin_get_child(arrowHandle), 8, 6);
 			break;
 		case SWT.RADIO:
 			/*
@@ -316,11 +293,12 @@ public Rectangle getBounds () {
 	checkWidget();
 	parent.forceResize ();
 	int /*long*/ topHandle = topHandle ();
-	int x, y, width, height;
-	x = OS.GTK_WIDGET_X (topHandle);
-	y = OS.GTK_WIDGET_Y (topHandle);
-	width = OS.GTK_WIDGET_WIDTH (topHandle);
-	height = OS.GTK_WIDGET_HEIGHT (topHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (topHandle, allocation);
+	int x = allocation.x;
+	int y = allocation.y;
+	int width = allocation.width;
+	int height = allocation.height;
 	if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
 	if ((style & SWT.SEPARATOR) != 0 && control != null) height = Math.max (height, 23);
 	return new Rectangle (x, y, width, height);
@@ -379,7 +357,7 @@ public Image getDisabledImage () {
 public boolean getEnabled () {
 	checkWidget();
 	int /*long*/ topHandle = topHandle ();
-	return OS.GTK_WIDGET_SENSITIVE (topHandle);
+	return gtk_widget_get_sensitive (topHandle);
 }
 
 /**
@@ -469,16 +447,18 @@ public int getWidth () {
 	checkWidget();
 	parent.forceResize ();
 	int /*long*/ topHandle = topHandle ();
-	return OS.GTK_WIDGET_WIDTH (topHandle);
+	GtkAllocation allocation = new GtkAllocation();
+	gtk_widget_get_allocation (topHandle, allocation);
+	return allocation.width;
 }
 
 int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	GdkEventButton gdkEvent = new GdkEventButton ();
 	OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
-	double x = gdkEvent.x;
-	gdkEvent.x += OS.GTK_WIDGET_X (handle);
-	double y = gdkEvent.y;
-	gdkEvent.y += OS.GTK_WIDGET_Y (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	double x = gdkEvent.x + allocation.x;
+	double y = gdkEvent.y + allocation.y;
 	OS.memmove (event, gdkEvent, GdkEventButton.sizeof);
 	int /*long*/ result = parent.gtk_button_press_event (widget, event);
 	gdkEvent.x = x;
@@ -490,10 +470,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 int /*long*/ gtk_button_release_event (int /*long*/ widget, int /*long*/ event) {
 	GdkEventButton gdkEvent = new GdkEventButton ();
 	OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
-	double x = gdkEvent.x;
-	gdkEvent.x += OS.GTK_WIDGET_X (handle);
-	double y = gdkEvent.y;
-	gdkEvent.y += OS.GTK_WIDGET_Y (handle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	double x = gdkEvent.x + allocation.x;
+	double y = gdkEvent.y + allocation.y;
 	OS.memmove (event, gdkEvent, GdkEventButton.sizeof);
 	int /*long*/ result = parent.gtk_button_release_event (widget, event);
 	gdkEvent.x = x;
@@ -516,17 +496,7 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 				case OS.GDK_2BUTTON_PRESS: 
 				case OS.GDK_BUTTON_RELEASE: {
 					boolean isArrow = false;
-					if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
-						double [] x_win = new double [1];
-						double [] y_win = new double [1];
-						OS.gdk_event_get_coords (eventPtr, x_win, y_win);
-						int x = OS.GTK_WIDGET_X (arrowHandle) - OS.GTK_WIDGET_X (handle);
-						int width = OS.GTK_WIDGET_WIDTH (arrowHandle);
-						if ((((parent.style & SWT.RIGHT_TO_LEFT) == 0) && x <= (int)x_win [0])
-								|| (((parent.style & SWT.RIGHT_TO_LEFT) != 0) && (int)x_win [0] <= x + width)) {
-							isArrow = true;
-						}
-					} else if (widget == arrowHandle) {
+					if (widget == arrowHandle) {
 						isArrow = true;
 						topHandle = widget;
 						/*
@@ -539,9 +509,11 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 					}
 					if (isArrow) {
 						event.detail = SWT.ARROW;
-						event.x = OS.GTK_WIDGET_X (topHandle);
-						if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - OS.GTK_WIDGET_WIDTH (topHandle) - event.x;
-						event.y = OS.GTK_WIDGET_Y (topHandle) + OS.GTK_WIDGET_HEIGHT (topHandle);
+						GtkAllocation allocation = new GtkAllocation ();
+						gtk_widget_get_allocation (topHandle, allocation);
+						event.x = allocation.x;
+						if ((parent.style & SWT.MIRRORED) != 0) event.x = parent.getClientWidth () - allocation.width - event.x;
+						event.y = allocation.y + allocation.height;
 					}
 					break;
 				}
@@ -636,7 +608,7 @@ int /*long*/ gtk_enter_notify_event (int /*long*/ widget, int /*long*/ event) {
 			int index = imageList.indexOf (hotImage);
 			if (index != -1 && imageHandle != 0) {
 				int /*long*/ pixbuf = imageList.getPixbuf (index);
-				OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+				gtk_image_set_from_pixbuf(imageHandle, pixbuf);
 			}
 		}
 	}
@@ -680,7 +652,7 @@ int /*long*/ gtk_leave_notify_event (int /*long*/ widget, int /*long*/ event) {
 				int index = imageList.indexOf (image);
 				if (index != -1 && imageHandle != 0) {
 					int /*long*/ pixbuf = imageList.getPixbuf (index);
-					OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+					gtk_image_set_from_pixbuf(imageHandle, pixbuf);
 				}
 			}
 		}	
@@ -707,7 +679,7 @@ void hookEvents () {
 	 * the listener to child (GtkButton) of the tool-item.
 	 */
 	eventHandle = OS.gtk_bin_get_child(handle);
-	if ((style & SWT.DROP_DOWN) != 0 && OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
+	if ((style & SWT.DROP_DOWN) != 0) {
 		int /*long*/ list = OS.gtk_container_get_children(eventHandle);
 		eventHandle = OS.g_list_nth_data(list, 0);
 		if (arrowHandle != 0) OS.g_signal_connect_closure (arrowHandle, OS.clicked, display.closures [CLICKED], false);
@@ -832,7 +804,7 @@ void resizeControl () {
 		*/
 		Rectangle itemRect = getBounds ();
 		control.setSize (itemRect.width, itemRect.height);
-		OS.gtk_widget_set_size_request (handle, itemRect.width, itemRect.height);
+		resizeHandle(itemRect.width, itemRect.height);
 		Rectangle rect = control.getBounds ();
 		rect.x = itemRect.x + (itemRect.width - rect.width) / 2;
 		rect.y = itemRect.y + (itemRect.height - rect.height) / 2;
@@ -840,6 +812,22 @@ void resizeControl () {
 	}
 }
 
+void resizeHandle(int width, int height) {
+	OS.gtk_widget_set_size_request (handle, width, height);
+	/*
+	* Cause a size allocation this widget's topHandle.  Note that
+	* all calls to gtk_widget_size_allocate() must be preceded by
+	* a call to gtk_widget_size_request().
+	*/
+	GtkRequisition requisition = new GtkRequisition ();
+	parent.gtk_widget_size_request (handle, requisition);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (handle, allocation);
+	allocation.width = width;
+	allocation.height = height;
+	OS.gtk_widget_size_allocate (handle, allocation);
+}
+
 void selectRadio () {
 	int index = 0;
 	ToolItem [] items = parent.getItems ();
@@ -920,7 +908,7 @@ public void setDisabledImage (Image image) {
 public void setEnabled (boolean enabled) {
 	checkWidget();
 	int /*long*/ topHandle = topHandle ();
-	if (OS.GTK_WIDGET_SENSITIVE (topHandle) == enabled) return;
+	if (gtk_widget_get_sensitive (topHandle) == enabled) return;
 	OS.gtk_widget_set_sensitive (topHandle, enabled);
 	if (enabled) {
 		/*
@@ -930,7 +918,7 @@ public void setEnabled (boolean enabled) {
 		* button if the pointer is within its bounds.
 		*/
 		int [] x = new int [1], y = new int [1];
-		OS.gdk_window_get_pointer (parent.paintWindow (), x, y, null);
+		gdk_window_get_device_position (parent.paintWindow (), x, y, null);
 		if (getBounds ().contains (x [0], y [0])) {
 			OS.gtk_widget_hide (handle);
 			OS.gtk_widget_show (handle);
@@ -942,8 +930,10 @@ public void setEnabled (boolean enabled) {
 		* whether the pointer is currently in the button is never updated.
 		* As a result, when it is re-enabled it automatically enters
 		* a PRELIGHT state. The fix is to set a NORMAL state.
+		* 
+		* Note that on GTK 3 this code causes the item to be re-enabled.
 		*/
-		if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0) && !OS.GTK3) {
 			OS.gtk_widget_set_state (topHandle, OS.GTK_STATE_NORMAL);
 		}
 	}
@@ -954,7 +944,7 @@ boolean setFocus () {
 }
 
 void setFontDescription (int /*long*/ font) {
-	if (labelHandle != 0) OS.gtk_widget_modify_font (labelHandle, font);
+	if (labelHandle != 0) setFontDescription (labelHandle, font);
 }
 
 void setForegroundColor (GdkColor color) {
@@ -1008,9 +998,9 @@ public void setImage (Image image) {
 			imageList.put (imageIndex, image);
 		}
 		int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf(imageHandle, pixbuf);
 	} else {
-		OS.gtk_image_set_from_pixbuf(imageHandle, 0);
+		gtk_image_set_from_pixbuf(imageHandle, 0);
 	}
 	/*
 	* If Text/Image of a tool-item changes, then it is 
@@ -1103,13 +1093,6 @@ public void setText (String string) {
 	char [] chars = fixMnemonic (string);
 	byte [] buffer = Converter.wcsToMbcs (null, chars, true);
 	OS.gtk_label_set_text_with_mnemonic (labelHandle, buffer);
-	if ((style & SWT.DROP_DOWN) != 0 && OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
-		if (string.length () != 0) {
-			OS.gtk_widget_show (labelHandle);
-		} else {
-			OS.gtk_widget_hide (labelHandle);
-		}
-	}
 	/*
 	* If Text/Image of a tool-item changes, then it is 
 	* required to reset the proxy menu. Otherwise, the 
@@ -1145,6 +1128,7 @@ public void setText (String string) {
  */
 public void setToolTipText (String string) {
 	checkWidget();
+	if (toolTipText == string || (toolTipText != null && toolTipText.equals(string))) return;
 	if (parent.toolTipText == null) {
 		Shell shell = parent._getShell ();
 		setToolTipText (shell, string);
@@ -1165,7 +1149,13 @@ public void setToolTipText (String string) {
 }
 
 void setToolTipText (Shell shell, String newString) {
-	shell.setToolTipText (handle, newString);
+	int /*long*/ child = OS.gtk_bin_get_child (handle);
+	if ((style & SWT.DROP_DOWN) != 0) {
+		int /*long*/ list = OS.gtk_container_get_children (child);
+		child = OS.g_list_nth_data (list, 0);
+		if (arrowHandle != 0) shell.setToolTipText (arrowHandle, newString);
+	}
+	shell.setToolTipText (child != 0 ? child : handle, newString);
 }
 
 /**
@@ -1189,8 +1179,7 @@ public void setWidth (int width) {
 	checkWidget();
 	if ((style & SWT.SEPARATOR) == 0) return;
 	if (width < 0) return;
-	boolean isVertical = (parent.style & SWT.VERTICAL) != 0;
-	OS.gtk_widget_set_size_request (handle, width, isVertical ? 6 : 15);
+	resizeHandle(width, (parent.style & SWT.VERTICAL) != 0 ? 6 : 15);
 	parent.relayout ();
 }
 
@@ -1198,10 +1187,6 @@ void showWidget (int index) {
 	if (handle != 0) OS.gtk_widget_show (handle);
 	if (labelHandle != 0) OS.gtk_widget_show (labelHandle);
 	if (imageHandle != 0) OS.gtk_widget_show (imageHandle);
-	if ((style & SWT.DROP_DOWN) != 0 && OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
-		if (arrowBoxHandle != 0) OS.gtk_widget_show (arrowBoxHandle);
-		if (arrowHandle != 0) OS.gtk_widget_show (arrowHandle);
-	}
 	OS.gtk_toolbar_insert(parent.handle, handle, index);
 }
 }
diff --git a/org/eclipse/swt/widgets/ToolTip.java b/org/eclipse/swt/widgets/ToolTip.java
index 94dbc00..f9d06b9 100644
--- a/org/eclipse/swt/widgets/ToolTip.java
+++ b/org/eclipse/swt/widgets/ToolTip.java
@@ -16,6 +16,7 @@ import org.eclipse.swt.internal.*;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.events.*;
+import org.eclipse.swt.internal.cairo.Cairo;
 
 /**
  * Instances of this class represent popup windows that are used
@@ -136,7 +137,7 @@ public void addSelectionListener (SelectionListener listener) {
 void configure () {
 	int /*long*/ screen = OS.gdk_screen_get_default ();
 	OS.gtk_widget_realize (handle);
-	int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, OS.GTK_WIDGET_WINDOW (handle));
+	int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (handle));
 	GdkRectangle dest = new GdkRectangle ();
 	OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
 	Point point = getSize (dest.width / 4);
@@ -248,36 +249,45 @@ void configure () {
 			OS.gtk_window_move (handle, Math.min(dest.width - w, x - w + 17), y - h - TIP_HEIGHT);
 		}
 	}
-	int /*long*/ rgn = OS.gdk_region_polygon (polyline, polyline.length / 2, OS.GDK_EVEN_ODD_RULE);
-	OS.gtk_widget_realize (handle);
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-	OS.gdk_window_shape_combine_region (window, rgn, 0, 0);
-	OS.gdk_region_destroy (rgn);
+	OS.gtk_widget_realize(handle);
+	Region region = new Region (display);
+	region.add(polyline);
+	if (OS.GTK3) {
+		OS.gtk_widget_shape_combine_region (handle, region.handle);
+	} else {
+		int /*long*/ window = gtk_widget_get_window (handle);
+		OS.gdk_window_shape_combine_region (window, region.handle, 0, 0);
+	 }
+	region.dispose ();
 }
 
 void createHandle (int index) {
-	state |= HANDLE;
 	if ((style & SWT.BALLOON) != 0) {
+		state |= HANDLE;
 		handle = OS.gtk_window_new (OS.GTK_WINDOW_POPUP);
 		Color background = display.getSystemColor (SWT.COLOR_INFO_BACKGROUND);
-		OS.gtk_widget_modify_bg (handle, OS.GTK_STATE_NORMAL, background.handle);
+		if (OS.GTK3) {
+			GdkColor color = background.handle;
+			GdkRGBA rgba = new GdkRGBA();
+			rgba.alpha = 1;
+			rgba.red = (color.red & 0xFFFF) / (float)0xFFFF;
+			rgba.green = (color.green & 0xFFFF) / (float)0xFFFF;
+			rgba.blue = (color.blue & 0xFFFF) / (float)0xFFFF;
+			OS.gtk_widget_override_background_color (handle, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		} else {
+			OS.gtk_widget_modify_bg (handle, OS.GTK_STATE_NORMAL, background.handle);
+		}
 		OS.gtk_widget_set_app_paintable (handle, true);
 		OS.gtk_window_set_type_hint (handle, OS.GDK_WINDOW_TYPE_HINT_TOOLTIP);
 	} else {
-		handle = OS.gtk_tooltips_new ();
-		if (handle == 0) error (SWT.ERROR_NO_HANDLES);
-		/*
-		* Bug in Solaris-GTK.  Invoking gtk_tooltips_force_window()
-		* can cause a crash in older versions of GTK.  The fix is
-		* to avoid this call if the GTK version is older than 2.2.x.
-		* The call is to be avoided on GTK versions newer than 2.12.0
-		* where it's deprecated.
-		*/
-		if (OS.GTK_VERSION >= OS.VERSION (2, 2, 1)) { 
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			state |= HANDLE;
+			handle = OS.gtk_tooltips_new ();
+			if (handle == 0) error (SWT.ERROR_NO_HANDLES);
 			OS.gtk_tooltips_force_window (handle);
+			OS.g_object_ref (handle);
+			g_object_ref_sink (handle);
 		}
-		OS.g_object_ref (handle);
-		OS.gtk_object_sink (handle);
 	}
 }
 
@@ -292,8 +302,10 @@ void createWidget (int index) {
 void deregister () {
 	super.deregister ();
 	if ((style & SWT.BALLOON) == 0) {
-		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-		if (tipWindow != 0) display.removeWidget (tipWindow);
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+			if (tipWindow != 0) display.removeWidget (tipWindow);
+		}
 	}
 }
 
@@ -332,23 +344,25 @@ Point getLocation () {
 	int y = this.y;
 	if (item != null) {
 		int /*long*/ itemHandle = item.handle; 
-		if(OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
+		if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
 			GdkRectangle area = new GdkRectangle ();
 			OS.gtk_status_icon_get_geometry (itemHandle, 0, area, 0);
 			x = area.x + area.width / 2;
 			y = area.y + area.height / 2;
 		} else {
 			OS.gtk_widget_realize (itemHandle);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (itemHandle);
+			int /*long*/ window = gtk_widget_get_window (itemHandle);
 			int [] px = new int [1], py = new int [1];
 			OS.gdk_window_get_origin (window, px, py);
-			x = px [0] + OS.GTK_WIDGET_WIDTH (itemHandle) / 2;
-			y = py [0] + OS.GTK_WIDGET_HEIGHT (itemHandle) / 2;
+			GtkAllocation allocation = new GtkAllocation ();
+			gtk_widget_get_allocation (itemHandle, allocation);
+			x = px [0] + allocation.width / 2;
+			y = py [0] + allocation.height / 2;
 		}
 	}
 	if (x == -1 || y == -1) {
 		int [] px = new int [1], py = new int [1];
-		OS.gdk_window_get_pointer (0, px, py, null);
+		gdk_window_get_device_position (0, px, py, null);
 		x = px [0];
 		y = py [0];
 	}
@@ -395,13 +409,13 @@ Point getSize (int maxWidth) {
 	int [] w = new int [1], h = new int [1];
 	if (layoutText != 0) {
 		OS.pango_layout_set_width (layoutText, -1);
-		OS.pango_layout_get_size (layoutText, w, h);
-		textWidth = OS.PANGO_PIXELS (w [0]);
+		OS.pango_layout_get_pixel_size (layoutText, w, h);
+		textWidth = w [0];
 	}
 	if (layoutMessage != 0) {
 		OS.pango_layout_set_width (layoutMessage, -1);
-		OS.pango_layout_get_size (layoutMessage, w, h);
-		messageWidth = OS.PANGO_PIXELS (w [0]);
+		OS.pango_layout_get_pixel_size (layoutMessage, w, h);
+		messageWidth = w [0];
 	}
 	int messageTrim = 2 * INSET + 2 * BORDER + 2 * PADDING;
 	boolean hasImage = layoutText != 0 && (style & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING)) != 0;
@@ -410,13 +424,13 @@ Point getSize (int maxWidth) {
 	int textHeight = 0, messageHeight = 0;
 	if (layoutText != 0) {
 		OS.pango_layout_set_width (layoutText, (maxWidth - textTrim) * OS.PANGO_SCALE);
-		OS.pango_layout_get_size (layoutText, w, h);
-		textHeight = OS.PANGO_PIXELS (h [0]);
+		OS.pango_layout_get_pixel_size (layoutText, w, h);
+		textHeight = h [0];
 	}
 	if (layoutMessage != 0) {
 		OS.pango_layout_set_width (layoutMessage, (maxWidth - messageTrim) * OS.PANGO_SCALE);
-		OS.pango_layout_get_size (layoutMessage, w, h);
-		messageHeight = OS.PANGO_PIXELS (h [0]);
+		OS.pango_layout_get_pixel_size (layoutMessage, w, h);
+		messageHeight = h [0];
 	}
 	int height = 2 * BORDER + 2 * PADDING + messageHeight;
 	if (layoutText != 0) height += Math.max (IMAGE_SIZE, textHeight) + 2 * PADDING;
@@ -458,9 +472,12 @@ public String getText () {
  */
 public boolean getVisible () {
 	checkWidget ();
-	if ((style & SWT.BALLOON) != 0) return OS.GTK_WIDGET_VISIBLE (handle);
-	int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-	return OS.GTK_WIDGET_VISIBLE (tipWindow);
+	if ((style & SWT.BALLOON) != 0) return gtk_widget_get_visible (handle);
+	if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+		return OS.GTK_WIDGET_VISIBLE (tipWindow);
+	}
+	return false;
 }
 
 int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
@@ -469,14 +486,66 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
 
-int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
-	if ((state & OBSCURED) != 0) return 0;
-	int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
-	//TODO: Use Cairo
-	int /*long*/ gdkGC = OS.gdk_gc_new (window);
-	OS.gdk_draw_polygon (window, gdkGC, 0, borderPolygon, borderPolygon.length / 2);
+void drawTooltip (int /*long*/ cr) {
+	int /*long*/ window = gtk_widget_get_window (handle);
 	int x = BORDER + PADDING;
 	int y = BORDER + PADDING;
+	if (OS.USE_CAIRO) {
+		int /*long*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window);
+		if (cairo == 0) error (SWT.ERROR_NO_HANDLES);
+		int count = borderPolygon.length / 2;
+		if (count != 0) {
+			Cairo.cairo_set_line_width(cairo, 1);
+			Cairo.cairo_move_to(cairo, borderPolygon[0], borderPolygon[1]);
+			for (int i=1,j=2; i<count; i++,j+=2) {
+				Cairo.cairo_line_to(cairo, borderPolygon[j]+0.5, borderPolygon[j+1]+0.5);
+			}
+			Cairo.cairo_close_path(cairo);
+			Cairo.cairo_stroke(cairo);
+		}
+		if (spikeAbove) y += TIP_HEIGHT;
+		if (layoutText != 0) {
+			byte[] buffer = null;
+			int id = style & (SWT.ICON_ERROR | SWT.ICON_INFORMATION | SWT.ICON_WARNING);
+			switch (id) {
+				case SWT.ICON_ERROR: buffer = Converter.wcsToMbcs (null, "gtk-dialog-error", true); break; 
+				case SWT.ICON_INFORMATION: buffer = Converter.wcsToMbcs (null, "gtk-dialog-info", true); break;
+				case SWT.ICON_WARNING: buffer = Converter.wcsToMbcs (null, "gtk-dialog-warning", true); break;
+			}
+			if (buffer != null) {
+				int /*long*/ pixbuf, icon_set = OS.gtk_icon_factory_lookup_default (buffer);
+				if (OS.GTK3) {
+					pixbuf = OS.gtk_icon_set_render_icon_pixbuf(icon_set, OS.gtk_widget_get_style_context(handle), OS.GTK_ICON_SIZE_MENU);
+				} else {
+					int /*long*/ style = OS.gtk_widget_get_default_style ();
+					pixbuf = OS.gtk_icon_set_render_icon (icon_set, style, OS.GTK_TEXT_DIR_NONE, OS.GTK_STATE_NORMAL, OS.GTK_ICON_SIZE_MENU, 0, 0);
+				}
+ 				OS.gdk_cairo_set_source_pixbuf(cairo, pixbuf, x, y);
+ 				Cairo.cairo_paint (cairo);
+				OS.g_object_unref (pixbuf);
+				x += IMAGE_SIZE;
+			}
+			x += INSET;
+			int [] w = new int [1], h = new int [1];
+			Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
+			OS.gdk_cairo_set_source_color(cairo,foreground.handle);
+			Cairo.cairo_move_to(cairo, x,y );
+			OS.pango_cairo_show_layout(cairo, layoutText);
+			OS.pango_layout_get_pixel_size (layoutText, w, h);
+			y += 2 * PADDING + Math.max (IMAGE_SIZE, h [0]);
+		}
+		if (layoutMessage != 0) {
+			x = BORDER + PADDING + INSET;
+			Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND);
+			OS.gdk_cairo_set_source_color(cairo,foreground.handle);
+			Cairo.cairo_move_to(cairo, x, y);
+			OS.pango_cairo_show_layout(cairo, layoutMessage);
+		}
+		if (cairo != cr) Cairo.cairo_destroy(cairo);
+		return;
+	}
+	int /*long*/ gdkGC = OS.gdk_gc_new (window);
+	OS.gdk_draw_polygon (window, gdkGC, 0, borderPolygon, borderPolygon.length / 2);
 	if (spikeAbove) y += TIP_HEIGHT;
 	if (layoutText != 0) {
 		byte[] buffer = null;
@@ -505,8 +574,8 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		OS.gdk_gc_set_foreground (gdkGC, foreground.handle);
 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutText);
 		int [] w = new int [1], h = new int [1];
-		OS.pango_layout_get_size (layoutText, w, h);
-		y += 2 * PADDING + Math.max (IMAGE_SIZE, OS.PANGO_PIXELS (h [0]));
+		OS.pango_layout_get_pixel_size (layoutText, w, h);
+		y += 2 * PADDING + Math.max (IMAGE_SIZE, h [0]);
 	}
 	if (layoutMessage != 0) {
 		x = BORDER + PADDING + INSET;
@@ -515,6 +584,17 @@ int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
 		OS.gdk_draw_layout (window, gdkGC, x, y, layoutMessage);
 	}
 	OS.g_object_unref (gdkGC);
+}
+
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawTooltip (cairo);
+	return 0;
+}
+
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawTooltip (0);
 	return 0;
 }
 
@@ -524,11 +604,13 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 	int y = point.y;
 	int /*long*/ screen = OS.gdk_screen_get_default ();
 	OS.gtk_widget_realize (widget);
-	int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, OS.GTK_WIDGET_WINDOW (widget));
+	int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (widget));
 	GdkRectangle dest = new GdkRectangle ();
 	OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest);
-	int w = OS.GTK_WIDGET_WIDTH (widget);
-	int h = OS.GTK_WIDGET_HEIGHT (widget);
+	GtkAllocation widgetAllocation = new GtkAllocation ();
+	gtk_widget_get_allocation (widget, widgetAllocation);
+	int w = widgetAllocation.width;
+	int h = widgetAllocation.height;
 	if (dest.height < y + h) y -= h;
 	if (dest.width < x + w) x -= w;
 	OS.gtk_window_move (widget, x, y);
@@ -537,15 +619,17 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 
 void hookEvents () {
 	if ((style & SWT.BALLOON) != 0) {
-		OS.g_signal_connect_closure (handle, OS.expose_event, display.closures [EXPOSE_EVENT], false);
+		OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT], 0, display.closures [EXPOSE_EVENT], true);
 		OS.gtk_widget_add_events (handle, OS.GDK_BUTTON_PRESS_MASK);
 		OS.g_signal_connect_closure (handle, OS.button_press_event, display.closures [BUTTON_PRESS_EVENT], false);
 	} else {
-		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-		if (tipWindow != 0) {
-			OS.g_signal_connect_closure (tipWindow, OS.size_allocate, display.closures [SIZE_ALLOCATE], false);
-			OS.gtk_widget_add_events (tipWindow, OS.GDK_BUTTON_PRESS_MASK);
-			OS.g_signal_connect_closure (tipWindow, OS.button_press_event, display.closures [BUTTON_PRESS_EVENT], false);
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+			if (tipWindow != 0) {
+				OS.g_signal_connect_closure (tipWindow, OS.size_allocate, display.closures [SIZE_ALLOCATE], false);
+				OS.gtk_widget_add_events (tipWindow, OS.GDK_BUTTON_PRESS_MASK);
+				OS.g_signal_connect_closure (tipWindow, OS.button_press_event, display.closures [BUTTON_PRESS_EVENT], false);
+			}
 		}
 	}
 }
@@ -572,8 +656,10 @@ public boolean isVisible () {
 void register () {
 	super.register ();
 	if ((style & SWT.BALLOON) == 0) {
-		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-		if (tipWindow != 0) display.addWidget (tipWindow, this);
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+			if (tipWindow != 0) display.addWidget (tipWindow, this);
+		}
 	}
 }
 
@@ -658,11 +744,13 @@ public void setLocation (int x, int y) {
 	this.x = x;
 	this.y = y;
 	if ((style & SWT.BALLOON) != 0) {
-		if (OS.GTK_WIDGET_VISIBLE (handle)) configure ();
+		if (gtk_widget_get_visible (handle)) configure ();
 	} else {
-		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-		if (OS.GTK_WIDGET_VISIBLE (tipWindow)) {
-			OS.gtk_window_move (tipWindow, x, y);
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+			if (gtk_widget_get_visible (tipWindow)) {
+				OS.gtk_window_move (tipWindow, x, y);
+			}
 		}
 	}
 }
@@ -718,12 +806,10 @@ public void setMessage (String string) {
 	if (message.length () != 0) {
 		byte [] buffer = Converter.wcsToMbcs (null, message, true);
 		layoutMessage = OS.gtk_widget_create_pango_layout (handle, buffer);
-		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
-			OS.pango_layout_set_auto_dir (layoutMessage, false);
-		}
+		OS.pango_layout_set_auto_dir (layoutMessage, false);
 		OS.pango_layout_set_wrap (layoutMessage, OS.PANGO_WRAP_WORD_CHAR);
 	}
-	if (OS.GTK_WIDGET_VISIBLE (handle)) configure ();
+	if (gtk_widget_get_visible (handle)) configure ();
 }
 
 /**
@@ -749,9 +835,7 @@ public void setText (String string) {
 	if (text.length () != 0) {
 		byte [] buffer = Converter.wcsToMbcs (null, text, true);
 		layoutText = OS.gtk_widget_create_pango_layout (handle, buffer);
-		if (OS.GTK_VERSION >= OS.VERSION (2, 4, 0)) {
-			OS.pango_layout_set_auto_dir (layoutText, false);
-		}
+		OS.pango_layout_set_auto_dir (layoutText, false);
 		int /*long*/ boldAttr = OS.pango_attr_weight_new (OS.PANGO_WEIGHT_BOLD);
 		PangoAttribute attribute = new PangoAttribute ();
 		OS.memmove (attribute, boldAttr, PangoAttribute.sizeof);
@@ -764,7 +848,7 @@ public void setText (String string) {
 		OS.pango_attr_list_unref (attrList);
 		OS.pango_layout_set_wrap (layoutText, OS.PANGO_WRAP_WORD_CHAR);
 	}
-	if (OS.GTK_WIDGET_VISIBLE (handle)) configure ();
+	if (gtk_widget_get_visible (handle)) configure ();
 }
 
 /**
@@ -826,8 +910,10 @@ int /*long*/ timerProc (int /*long*/ widget) {
 	if ((style & SWT.BALLOON) != 0) {
 		OS.gtk_widget_hide (handle);
 	} else {
-		int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
-		OS.gtk_widget_hide (tipWindow);
+		if (OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+			int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
+			OS.gtk_widget_hide (tipWindow);
+		}
 	}
 	return 0;
 }
diff --git a/org/eclipse/swt/widgets/TouchSource.java b/org/eclipse/swt/widgets/TouchSource.java
index 7caf92a..6861075 100644
--- a/org/eclipse/swt/widgets/TouchSource.java
+++ b/org/eclipse/swt/widgets/TouchSource.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/org/eclipse/swt/widgets/Tracker.java b/org/eclipse/swt/widgets/Tracker.java
index 812ce78..775299c 100644
--- a/org/eclipse/swt/widgets/Tracker.java
+++ b/org/eclipse/swt/widgets/Tracker.java
@@ -42,7 +42,7 @@ import org.eclipse.swt.events.*;
 public class Tracker extends Widget {
 	Composite parent;
 	Cursor cursor;
-	int /*long*/ lastCursor, window;
+	int /*long*/ lastCursor, window, overlay;
 	boolean tracking, cancelled, grabbed, stippled;
 	Rectangle [] rectangles = new Rectangle [0], proportions = rectangles;
 	Rectangle bounds;
@@ -203,7 +203,7 @@ Point adjustMoveCursor () {
 	 * actual location of the pointer after it has been moved.
 	 */
 	int [] actualX = new int [1], actualY = new int [1], state = new int [1];
-	OS.gdk_window_get_pointer (window, actualX, actualY, state);
+	gdk_window_get_device_position (window, actualX, actualY, state);
 	return new Point (actualX [0], actualY [0]);
 }
 
@@ -236,7 +236,7 @@ Point adjustResizeCursor () {
 	 * actual location of the pointer after it has been moved.
 	 */
 	int [] actualX = new int [1], actualY = new int [1], state = new int [1];
-	OS.gdk_window_get_pointer (window, actualX, actualY, state);
+	gdk_window_get_device_position (window, actualX, actualY, state);
 	return new Point (actualX [0], actualY [0]);
 }
 
@@ -308,10 +308,39 @@ Rectangle [] computeProportions (Rectangle [] rects) {
 void drawRectangles (Rectangle [] rects) {
 	int /*long*/ window = OS.gdk_get_default_root_window();
 	if (parent != null) {
-		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
+		window = gtk_widget_get_window (parent.paintHandle());
 	} 
 	if (window == 0) return;
-	//TODO: Use Cairo
+	if (OS.GTK3) {
+		if (overlay == 0) return;
+		OS.gtk_widget_shape_combine_region (overlay, 0);
+		int /*long*/ region = OS.gdk_region_new ();
+		GdkRectangle rect = new GdkRectangle();
+		for (int i = 0; i < rects.length; i++) {
+			Rectangle r = parent != null ? display.map(parent, null, rects[i]) : rects[i];
+			rect.x = r.x;
+			rect.y = r.y;
+			rect.width = r.width + 1;
+			rect.height = 1;
+			OS.gdk_region_union_with_rect(region, rect);
+			rect.width = 1;
+			rect.height = r.height + 1;
+			OS.gdk_region_union_with_rect(region, rect);
+			rect.x = r.x + r.width;
+			OS.gdk_region_union_with_rect(region, rect);
+			rect.x = r.x;
+			rect.y = r.y + r.height;
+			rect.width = r.width + 1;
+			rect.height = 1;
+			OS.gdk_region_union_with_rect(region, rect);
+		}
+		OS.gtk_widget_shape_combine_region (overlay, region);
+		OS.gdk_region_destroy (region);
+		int /*long*/ overlayWindow = OS.gtk_widget_get_window (overlay);
+		OS.gdk_window_hide (overlayWindow);
+		OS.gdk_window_show (overlayWindow);
+		return;
+	}
 	int /*long*/ gc = OS.gdk_gc_new (window);
 	if (gc == 0) return;
 	int /*long*/ colormap = OS.gdk_colormap_get_system ();
@@ -368,7 +397,7 @@ public boolean getStippled () {
 
 boolean grab () {
 	int /*long*/ cursor = this.cursor != null ? this.cursor.handle : 0;
-	int result = OS.gdk_pointer_grab (window, false, OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK, window, cursor, OS.GDK_CURRENT_TIME);
+	int result = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK, window, cursor, OS.GDK_CURRENT_TIME);
 	return result == OS.GDK_GRAB_SUCCESS;
 }
 
@@ -452,8 +481,10 @@ int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ eventPtr) {
 				draw = true;
 			}
 			if (draw) {
-				drawRectangles (rectsToErase);
-				update ();
+				if (!OS.GTK3) {
+					drawRectangles (rectsToErase);
+					update ();
+				}
 				drawRectangles (rectangles);
 			}
 			Point cursorPos = adjustResizeCursor ();
@@ -523,7 +554,7 @@ int /*long*/ gtk_motion_notify_event (int /*long*/ widget, int /*long*/ eventPtr
 
 int /*long*/ gtk_mouse (int eventType, int /*long*/ widget, int /*long*/ eventPtr) {
 	int [] newX = new int [1], newY = new int [1];
-	OS.gdk_window_get_pointer (window, newX, newY, null);
+	gdk_window_get_device_position (window, newX, newY, null);
 	if (oldX != newX [0] || oldY != newY [0]) {
 		Rectangle [] oldRectangles = rectangles;
 		Rectangle [] rectsToErase = new Rectangle [rectangles.length];
@@ -576,8 +607,10 @@ int /*long*/ gtk_mouse (int eventType, int /*long*/ widget, int /*long*/ eventPt
 				draw = true;
 			}
 			if (draw) {
-				drawRectangles (rectsToErase);
-				update ();
+				if (!OS.GTK3) {
+					drawRectangles (rectsToErase);
+					update ();
+				}
 				drawRectangles (rectangles);
 			}
 			Point cursorPos = adjustResizeCursor ();
@@ -621,8 +654,10 @@ int /*long*/ gtk_mouse (int eventType, int /*long*/ widget, int /*long*/ eventPt
 				draw = true;
 			}
 			if (draw) {
-				drawRectangles (rectsToErase);
-				update ();
+				if (!OS.GTK3) {
+					drawRectangles (rectsToErase);
+					update ();
+				}
 				drawRectangles (rectangles);
 			}
 		}
@@ -664,15 +699,17 @@ public boolean open () {
 	checkWidget();
 	window = OS.gdk_get_default_root_window();
 	if (parent != null) {
-		window = OS.GTK_WIDGET_WINDOW (parent.paintHandle());
+		window = gtk_widget_get_window (parent.paintHandle());
 	} 
 	if (window == 0) return false;
 	cancelled = false;
 	tracking = true;
-	update ();
-	drawRectangles (rectangles);
+	if (!OS.GTK3) {
+		update ();
+		drawRectangles (rectangles);
+	}
 	int [] oldX = new int [1], oldY = new int [1], state = new int [1];
-	OS.gdk_window_get_pointer (window, oldX, oldY, state);
+	gdk_window_get_device_position (window, oldX, oldY, state);
 
 	/*
 	* if exactly one of UP/DOWN is specified as a style then set the cursor
@@ -706,54 +743,90 @@ public boolean open () {
 	
 	grabbed = grab ();
 	lastCursor = this.cursor != null ? this.cursor.handle : 0;
+	
+	if (OS.GTK3) {
+		overlay = OS.gtk_window_new (OS.GTK_WINDOW_POPUP);
+		OS.gtk_window_set_skip_taskbar_hint (overlay, true);
+		OS.gtk_window_set_title (overlay, new byte [1]);
+		OS.gtk_widget_realize (overlay);
+		int /*long*/ overlayWindow = OS.gtk_widget_get_window (overlay);
+		OS.gdk_window_set_override_redirect (overlayWindow, true);
+		OS.gtk_widget_override_background_color (overlay, OS.GTK_STATE_FLAG_NORMAL, new GdkRGBA());
+		int /*long*/ region = OS.gdk_region_new ();
+		OS.gtk_widget_shape_combine_region (overlay, region);
+		OS.gtk_widget_input_shape_combine_region (overlay, region);
+		OS.gdk_region_destroy (region);
+		Rectangle bounds = display.getBounds();
+		OS.gtk_window_move (overlay, bounds.x, bounds.y);
+		OS.gtk_window_resize (overlay, bounds.width, bounds.height);
+		OS.gtk_widget_show (overlay);
+	}
 
 	/* Tracker behaves like a Dialog with its own OS event loop. */
-	GdkEvent gdkEvent = new GdkEvent();
-	while (tracking) {
-		if (parent != null && parent.isDisposed ()) break;
-		int /*long*/ eventPtr;
-		while (true) {
-			eventPtr = OS.gdk_event_get ();
-			if (eventPtr != 0) {
-				break;
-			} else {
-				try { Thread.sleep(50); } catch (Exception ex) {}
-			}
-		}
-		OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof);
-		int /*long*/ widget = OS.gtk_get_event_widget (eventPtr);
-		switch (gdkEvent.type) {
-			case OS.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break;
-			case OS.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break;
-			case OS.GDK_KEY_PRESS: gtk_key_press_event (widget, eventPtr); break;
-			case OS.GDK_KEY_RELEASE: gtk_key_release_event (widget, eventPtr); break;
-			case OS.GDK_BUTTON_PRESS:
-			case OS.GDK_2BUTTON_PRESS:
-			case OS.GDK_3BUTTON_PRESS:
-			case OS.GDK_ENTER_NOTIFY:
-			case OS.GDK_LEAVE_NOTIFY:
-				/* Do not dispatch these */
-				break;
-			case OS.GDK_EXPOSE:
-				update ();
-				drawRectangles (rectangles);
-				OS.gtk_main_do_event (eventPtr);
-				drawRectangles (rectangles);
-				break;
-			default:
-				OS.gtk_main_do_event (eventPtr);
+	Display display = this.display;
+	Tracker oldTracker = display.tracker;
+	display.tracker = this;
+	try {
+		while (tracking) {
+			if (parent != null && parent.isDisposed ()) break;
+			display.runSkin ();
+			display.runDeferredLayouts ();
+			/*
+			* This call to gdk_threads_leave() is a temporary work around
+			* to avoid deadlocks when gdk_threads_init() is called by native
+			* code outside of SWT (i.e AWT, etc). It ensures that the current
+			* thread leaves the GTK lock before calling the function below. 
+			*/
+			OS.gdk_threads_leave();
+			OS.g_main_context_iteration (0, true);
+			display.runAsyncMessages (false);
 		}
-		OS.gdk_event_free (eventPtr);
+	} finally {
+		display.tracker = oldTracker;
 	}
 	if (!isDisposed ()) {
-		update ();
-		drawRectangles (rectangles);
+		if (!OS.GTK3) {
+			update ();
+			drawRectangles (rectangles);
+		}
 	}
 	ungrab ();
+	if (overlay != 0) {
+		OS.gtk_widget_destroy (overlay);
+		overlay = 0;
+	}
 	window = 0;
 	return !cancelled;
 }
 
+boolean processEvent (int /*long*/ eventPtr) {
+	GdkEvent gdkEvent = new GdkEvent();
+	OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof);
+	int /*long*/ widget = OS.gtk_get_event_widget (eventPtr);
+	switch (gdkEvent.type) {
+		case OS.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break;
+		case OS.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break;
+		case OS.GDK_KEY_PRESS: gtk_key_press_event (widget, eventPtr); break;
+		case OS.GDK_KEY_RELEASE: gtk_key_release_event (widget, eventPtr); break;
+		case OS.GDK_BUTTON_PRESS:
+		case OS.GDK_2BUTTON_PRESS:
+		case OS.GDK_3BUTTON_PRESS:
+		case OS.GDK_ENTER_NOTIFY:
+		case OS.GDK_LEAVE_NOTIFY:
+			/* Do not dispatch these */
+			break;
+		case OS.GDK_EXPOSE:
+			update ();
+			if (!OS.GTK3) drawRectangles (rectangles);
+			OS.gtk_main_do_event (eventPtr);
+			if (!OS.GTK3) drawRectangles (rectangles);
+			break;
+		default:
+			return true;
+	}
+	return false;
+}
+
 void releaseWidget () {
 	super.releaseWidget ();
 	parent = null;
@@ -983,7 +1056,7 @@ public void setStippled (boolean stippled) {
 }
 
 void ungrab () {
-	if (grabbed) OS.gdk_pointer_ungrab (OS.GDK_CURRENT_TIME);
+	if (grabbed) gdk_pointer_ungrab (window, OS.GDK_CURRENT_TIME);
 }
 
 void update () {
diff --git a/org/eclipse/swt/widgets/TrayItem.java b/org/eclipse/swt/widgets/TrayItem.java
index 2a82fb8..ada8c1d 100644
--- a/org/eclipse/swt/widgets/TrayItem.java
+++ b/org/eclipse/swt/widgets/TrayItem.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -317,8 +317,10 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ eventPtr)
 int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 	if (image != null && image.mask != 0) {
 		if (OS.gdk_drawable_get_depth (image.mask) == 1) {
-			int xoffset = (int) Math.floor (OS.GTK_WIDGET_X (widget) + ((OS.GTK_WIDGET_WIDTH (widget) - OS.GTK_WIDGET_REQUISITION_WIDTH (widget)) * 0.5) + 0.5);
-			int yoffset = (int) Math.floor (OS.GTK_WIDGET_Y (widget) + ((OS.GTK_WIDGET_HEIGHT (widget) - OS.GTK_WIDGET_REQUISITION_HEIGHT (widget)) * 0.5) + 0.5);
+			GtkAllocation widgetAllocation = new GtkAllocation ();
+			gtk_widget_get_allocation (widget, widgetAllocation);
+			int xoffset = (int) Math.floor (widgetAllocation.x + ((widgetAllocation.width -OS.GTK_WIDGET_REQUISITION_WIDTH (widget)) * 0.5) + 0.5);
+			int yoffset = (int) Math.floor (widgetAllocation.y + ((widgetAllocation.height - OS.GTK_WIDGET_REQUISITION_HEIGHT (widget)) * 0.5) + 0.5);
 			Rectangle b = image.getBounds();
 			int /*long*/ gdkImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height);
 			if (gdkImagePtr == 0) error(SWT.ERROR_NO_HANDLES);
@@ -339,7 +341,7 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 				}
 			}
 			OS.gtk_widget_realize (handle);
-			int /*long*/ window = OS.GTK_WIDGET_WINDOW (handle);
+			int /*long*/ window = gtk_widget_get_window (handle);
 			OS.gdk_window_shape_combine_region (window, region.handle, 0, 0);
 			region.dispose ();
 		}
@@ -388,7 +390,7 @@ public boolean getVisible () {
 	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
 		return OS.gtk_status_icon_get_visible (handle);
 	}
-	return OS.GTK_WIDGET_VISIBLE (handle);
+	return gtk_widget_get_visible (handle);
 }
 
 void register () {
@@ -587,16 +589,17 @@ public void setToolTipText (String string) {
 	if (string != null && string.length () > 0) {
 		buffer = Converter.wcsToMbcs (null, string, true);
 	}
-	if (tooltipsHandle == 0) {
-		tooltipsHandle = OS.gtk_tooltips_new ();
-		if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);
-		OS.g_object_ref (tooltipsHandle);
-		OS.gtk_object_sink (tooltipsHandle);
-	}
 	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
 		OS.gtk_status_icon_set_tooltip (handle, buffer);
-	} else
+	} else {
+		if (tooltipsHandle == 0) {
+			tooltipsHandle = OS.gtk_tooltips_new ();
+			if (tooltipsHandle == 0) error (SWT.ERROR_NO_HANDLES);
+			OS.g_object_ref (tooltipsHandle);
+			g_object_ref_sink (tooltipsHandle);
+		}
 		OS.gtk_tooltips_set_tip (tooltipsHandle, handle, buffer, null);
+	}
 }
 
 /**
@@ -615,7 +618,7 @@ public void setVisible (boolean visible) {
 	if (OS.GTK_VERSION >= OS.VERSION (2, 10, 0)) {
 		if(OS.gtk_status_icon_get_visible (handle) == visible) return;	
 	} else {
-		if (OS.GTK_WIDGET_VISIBLE (handle) == visible) return;
+		if (gtk_widget_get_visible (handle) == visible) return;
 	}
 	if (visible) {
 		/*
diff --git a/org/eclipse/swt/widgets/Tree.java b/org/eclipse/swt/widgets/Tree.java
index 467fe70..6efa3fd 100644
--- a/org/eclipse/swt/widgets/Tree.java
+++ b/org/eclipse/swt/widgets/Tree.java
@@ -13,6 +13,7 @@ package org.eclipse.swt.widgets;
 
 import org.eclipse.swt.*;
 import org.eclipse.swt.internal.*;
+import org.eclipse.swt.internal.cairo.*;
 import org.eclipse.swt.internal.gtk.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.events.*;
@@ -224,7 +225,11 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo
 	TreeItem item = _getItem (iter);
 	if (item != null) OS.g_object_set_qdata (cell, Display.SWT_OBJECT_INDEX2, item.handle);
 	boolean isPixbuf = OS.GTK_IS_CELL_RENDERER_PIXBUF (cell);
-	if (!(isPixbuf || OS.GTK_IS_CELL_RENDERER_TEXT (cell))) return 0;
+	boolean isText = OS.GTK_IS_CELL_RENDERER_TEXT (cell);
+	if (isText && OS.GTK3) {
+		OS.gtk_cell_renderer_set_fixed_size (cell, -1, -1);
+	}
+	if (!(isPixbuf || isText)) return 0;
 	int modelIndex = -1;
 	boolean customDraw = false;
 	if (columnCount == 0) {
@@ -250,7 +255,7 @@ int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*lo
 		if (isPixbuf) {
 			ptr [0] = 0;
 			OS.gtk_tree_model_get (tree_model, iter, modelIndex + CELL_PIXBUF, ptr, -1);
-			OS.g_object_set (cell, OS.pixbuf, ptr[0], 0);
+			OS.g_object_set (cell, OS.GTK3 ? OS.gicon : OS.pixbuf, ptr [0], 0);
 			if (ptr [0] != 0) OS.g_object_unref (ptr [0]);
 		} else {
 			ptr [0] = 0;
@@ -421,7 +426,7 @@ int calculateWidth (int /*long*/ column, int /*long*/ iter, boolean recurse) {
 	while (temp != 0) {
 		int /*long*/ renderer = OS.g_list_data (temp);
 		if (renderer != 0) {
-			OS.gtk_cell_renderer_get_size (renderer, handle, null, null, null, w, null);
+			gtk_cell_renderer_get_preferred_size (renderer, handle, w, null);
 			width += w [0];
 		}
 		temp = OS.g_list_next (temp);
@@ -550,26 +555,32 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int
 	if (OS.gtk_tree_model_iter_children (oldModel, iter, oldParent))  {
 		int /*long*/ [] oldItems = new int /*long*/ [OS.gtk_tree_model_iter_n_children (oldModel, oldParent)];
 		int oldIndex = 0;
+		int /*long*/ [] ptr = new int /*long*/ [1];
+		int [] ptr1 = new int [1];
 		do {
 			int /*long*/ newItem = OS.g_malloc (OS.GtkTreeIter_sizeof ());
 			if (newItem == 0) error (SWT.ERROR_NO_HANDLES);	
 			OS.gtk_tree_store_append (newModel, newItem, newParent);
-			int [] index = new int [1];
-			OS.gtk_tree_model_get (oldModel, iter, ID_COLUMN, index, -1);
+			OS.gtk_tree_model_get (oldModel, iter, ID_COLUMN, ptr1, -1);
+			int index = ptr1[0];
 			TreeItem item = null;
-			if (index [0] != -1) {
-				item = items [index [0]];
+			if (index != -1) {
+				item = items [index];
 				if (item != null) {
 					int /*long*/ oldItem = item.handle;
 					oldItems[oldIndex++] = oldItem;
-					int /*long*/ [] ptr = new int /*long*/ [1];
-					for (int j = 0; j < FIRST_COLUMN; j++) {
+					/* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+					for (int j = 0; j < FOREGROUND_COLUMN; j++) {
+						OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
+						OS.gtk_tree_store_set (newModel, newItem, j, ptr1 [0], -1);
+					}
+					for (int j = FOREGROUND_COLUMN; j < FIRST_COLUMN; j++) {
 						OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
 						OS.gtk_tree_store_set (newModel, newItem, j, ptr [0], -1);
-						if (types [j] == OS.G_TYPE_STRING ()) {
-							OS.g_free ((ptr [0]));
-						} else if (ptr[0] != 0) {
-							if (types[j] == OS.GDK_TYPE_COLOR()) {
+						if (ptr [0] != 0) {
+							if (types [j] == OS.G_TYPE_STRING ()) {
+								OS.g_free ((ptr [0]));
+							} else if (types[j] == OS.GDK_TYPE_COLOR()) {
 								OS.gdk_color_free(ptr[0]);
 							} else if (types[j] == OS.GDK_TYPE_PIXBUF()) {
 								OS.g_object_unref(ptr[0]);
@@ -579,16 +590,17 @@ void copyModel (int /*long*/ oldModel, int oldStart, int /*long*/ newModel, int
 						}
 					}
 					for (int j= 0; j<modelLength - FIRST_COLUMN; j++) {
+						int newIndex = newStart + j;
 						OS.gtk_tree_model_get (oldModel, oldItem, oldStart + j, ptr, -1);
-						OS.gtk_tree_store_set (newModel, newItem, newStart + j, ptr [0], -1);
-						if (types [j] == OS.G_TYPE_STRING ()) {
-							OS.g_free ((ptr [0]));
-						} else if (ptr[0] != 0) {
-							if (types[j] == OS.GDK_TYPE_COLOR()) {
+						OS.gtk_tree_store_set (newModel, newItem, newIndex, ptr [0], -1);
+						if (ptr[0] != 0) {
+							if (types [newIndex] == OS.G_TYPE_STRING ()) {
+								OS.g_free ((ptr [0]));
+							} else if (types[newIndex] == OS.GDK_TYPE_COLOR()) {
 								OS.gdk_color_free(ptr[0]);
-							} else if (types[j] == OS.GDK_TYPE_PIXBUF()) {
+							} else if (types[newIndex] == OS.GDK_TYPE_PIXBUF()) {
 								OS.g_object_unref(ptr[0]);
-							} else if (types[j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) {
+							} else if (types[newIndex] == OS.PANGO_TYPE_FONT_DESCRIPTION()) {
 								OS.pango_font_description_free(ptr[0]);
 							}
 						}
@@ -646,8 +658,7 @@ void createColumn (TreeColumn column, int index) {
 			if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
 			copyModel (oldModel, FIRST_COLUMN, newModel, FIRST_COLUMN, types, (int /*long*/)0, (int /*long*/)0, modelLength);
 			OS.gtk_tree_view_set_model (handle, newModel);
-			OS.g_object_unref (oldModel);
-			modelHandle = newModel;
+			setModel (newModel);
 		}
 	}
 	int /*long*/ columnHandle = OS.gtk_tree_view_column_new ();
@@ -661,12 +672,17 @@ void createColumn (TreeColumn column, int index) {
 		OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_GROW_ONLY);
 	} else {
 		OS.gtk_tree_view_column_set_sizing (columnHandle, OS.GTK_TREE_VIEW_COLUMN_FIXED);
-		if (columnCount != 0) OS.gtk_tree_view_column_set_visible (columnHandle, false);
 	}
 	OS.gtk_tree_view_column_set_resizable (columnHandle, true);
 	OS.gtk_tree_view_column_set_clickable (columnHandle, true);
 	OS.gtk_tree_view_column_set_min_width (columnHandle, 0);
 	OS.gtk_tree_view_insert_column (handle, columnHandle, index);
+	/*
+	* Bug in GTK3.  The column header has the wrong CSS styling if it is hidden
+	* when inserting to the tree widget.  The fix is to hide the column only 
+	* after it is inserted.
+	*/
+	if (columnCount != 0) OS.gtk_tree_view_column_set_visible (columnHandle, false);
 	if (column != null) {
 		column.handle = columnHandle;
 		column.modelIndex = modelIndex;
@@ -698,7 +714,7 @@ void createHandle (int index) {
 	state |= HANDLE;
 	fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0);
 	if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES);
-	OS.gtk_fixed_set_has_window (fixedHandle, true);
+	gtk_widget_set_has_window (fixedHandle, true);
 	scrolledHandle = OS.gtk_scrolled_window_new (0, 0);
 	if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	int /*long*/ [] types = getColumnTypes (1);
@@ -763,7 +779,7 @@ void createItem (TreeColumn column, int index) {
 	} else {
 		createColumn (column, index);
 	}
-	int /*long*/ boxHandle = OS.gtk_hbox_new (false, 3);
+	int /*long*/ boxHandle = gtk_box_new (OS.GTK_ORIENTATION_HORIZONTAL, false, 3);
 	if (boxHandle == 0) error (SWT.ERROR_NO_HANDLES);
 	int /*long*/ labelHandle = OS.gtk_label_new_with_mnemonic (null);
 	if (labelHandle == 0) error (SWT.ERROR_NO_HANDLES);
@@ -776,13 +792,17 @@ void createItem (TreeColumn column, int index) {
 	column.labelHandle = labelHandle;
 	column.imageHandle = imageHandle;	
 	OS.gtk_tree_view_column_set_widget (column.handle, boxHandle);
-	int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle);
-	while (widget != handle) {
-		if (OS.GTK_IS_BUTTON (widget)) {
-			column.buttonHandle = widget;
-			break;
+	if (OS.GTK3) {
+		column.buttonHandle = OS.gtk_tree_view_column_get_button(column.handle);
+	} else {
+		int /*long*/ widget = OS.gtk_widget_get_parent (boxHandle);
+		while (widget != handle) {
+			if (OS.GTK_IS_BUTTON (widget)) {
+				column.buttonHandle = widget;
+				break;
+			}
+			widget = OS.gtk_widget_get_parent (widget);
 		}
-		widget = OS.gtk_widget_get_parent (widget);
 	}
 	if (columnCount == columns.length) {
 		TreeColumn [] newColumns = new TreeColumn [columns.length + 4];
@@ -880,7 +900,7 @@ void createRenderers (int /*long*/ columnHandle, int modelIndex, boolean check,
 	}
 
 	/* Add attributes */
-	OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.pixbuf, modelIndex + CELL_PIXBUF);
+	OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.GTK3 ? OS.gicon : OS.pixbuf, modelIndex + CELL_PIXBUF);
 	if (!ownerDraw) {
 		OS.gtk_tree_view_column_add_attribute (columnHandle, pixbufRenderer, OS.cell_background_gdk, BACKGROUND_COLUMN);
 		OS.gtk_tree_view_column_add_attribute (columnHandle, textRenderer, OS.cell_background_gdk, BACKGROUND_COLUMN);
@@ -994,21 +1014,19 @@ void destroyItem (TreeColumn column) {
 		if (newModel == 0) error (SWT.ERROR_NO_HANDLES);
 		copyModel(oldModel, column.modelIndex, newModel, FIRST_COLUMN, types, (int /*long*/)0, (int /*long*/)0, FIRST_COLUMN + CELL_TYPES);
 		OS.gtk_tree_view_set_model (handle, newModel);
-		OS.g_object_unref (oldModel);
-		modelHandle = newModel;
+		setModel (newModel);
 		createColumn (null, 0);
-		
 	} else {
 		for (int i=0; i<items.length; i++) {
 			TreeItem item = items [i];
 			if (item != null) {
 				int /*long*/ iter = item.handle;
 				int modelIndex = column.modelIndex;
-				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1);
-				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1);
-				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1);
-				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1);
-				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1);
+				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1);
+				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1);
+				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1);
+				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1);
+				OS.gtk_tree_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1);
 				
 				Font [] cellFont = item.cellFont;
 				if (cellFont != null) {
@@ -1120,22 +1138,24 @@ public Rectangle getClientArea () {
 	checkWidget ();
 	forceResize ();
 	OS.gtk_widget_realize (handle);
-	int /*long*/ fixedWindow = OS.GTK_WIDGET_WINDOW (fixedHandle);
+	int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
 	int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
 	int [] binX = new int [1], binY = new int [1];
 	OS.gdk_window_get_origin (binWindow, binX, binY);
 	int [] fixedX = new int [1], fixedY = new int [1];
 	OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
 	int /*long*/ clientHandle = clientHandle ();
-	int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (clientHandle);
-	int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (clientHandle);
+	GtkAllocation allocation = new GtkAllocation ();
+	gtk_widget_get_allocation (clientHandle, allocation);
+	int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+	int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
 	return new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
 }
 
 int getClientWidth () {
 	int [] w = new int [1], h = new int [1];
 	OS.gtk_widget_realize (handle);
-	OS.gdk_drawable_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
+	gdk_window_get_size(OS.gtk_tree_view_get_bin_window(handle), w, h);
 	return w[0];
 }
 
@@ -1361,14 +1381,14 @@ public int getHeaderHeight () {
 		for (int i=0; i<columnCount; i++) {
 			int /*long*/ buttonHandle = columns [i].buttonHandle;
 			if (buttonHandle != 0) {
-				OS.gtk_widget_size_request (buttonHandle, requisition);
+				gtk_widget_get_preferred_size (buttonHandle, requisition);
 				height = Math.max (height, requisition.height);
 			}
 		}
 		return height;
 	}
 	OS.gtk_widget_realize (handle);
-	int /*long*/ fixedWindow = OS.GTK_WIDGET_WINDOW (fixedHandle);
+	int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
 	int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
 	int [] binY = new int [1];
 	OS.gdk_window_get_origin (binWindow, null, binY);
@@ -1525,8 +1545,14 @@ public int getItemHeight () {
 		int [] w = new int [1], h = new int [1];
 		ignoreSize = true;
 		OS.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h);
+		int height = h [0];
+		if (OS.GTK3) {
+			int /*long*/ textRenderer = getTextRenderer (column);
+			OS.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null);
+			height += h [0];
+		}
 		ignoreSize = false;
-		return h [0];
+		return height;
 	} else {
 		int height = 0;
 		int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
@@ -1861,7 +1887,7 @@ int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	* it finishes processing a button press.  The fix is to give
 	* focus to the widget before it starts processing the event.
 	*/
-	if (!OS.GTK_WIDGET_HAS_FOCUS (handle)) {
+	if (!gtk_widget_has_focus (handle)) {
 		OS.gtk_widget_grab_focus (handle);
 	}
 	return result;
@@ -1908,39 +1934,52 @@ int /*long*/ gtk_expand_collapse_cursor_row (int /*long*/ widget, int /*long*/ l
 	return 0;
 }
 
-int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
-	if ((state & OBSCURED) != 0) return 0;
+void drawInheritedBackground (int /*long*/ eventPtr, int /*long*/ cairo) {
 	if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
 		Control control = findBackgroundControl ();
 		if (control != null) {
-			GdkEventExpose gdkEvent = new GdkEventExpose ();
-			OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
 			int /*long*/ window = OS.gtk_tree_view_get_bin_window (handle);
-			if (window == gdkEvent.window) {
-				int [] width = new int [1], height = new int [1];
-				OS.gdk_drawable_get_size (window, width, height);
-				int /*long*/ parent = 0;
-				int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parent);
-				GdkRectangle rect = new GdkRectangle ();
-				boolean expanded = true;
-				while (itemCount != 0 && expanded && height [0] > (rect.y + rect.height)) {
-					int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
-					OS.gtk_tree_model_iter_nth_child (modelHandle, iter, parent, itemCount - 1);
-					itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, iter);
-					int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
-					OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
-					expanded = OS.gtk_tree_view_row_expanded (handle, path); 
-					OS.gtk_tree_path_free (path);
-					if (parent != 0) OS.g_free (parent);
-					parent = iter;
-				}
+			int /*long*/ rgn = 0;
+			if (eventPtr != 0) {
+				GdkEventExpose gdkEvent = new GdkEventExpose ();
+				OS.memmove (gdkEvent, eventPtr, GdkEventExpose.sizeof);
+				if (window != gdkEvent.window) return;
+				rgn = gdkEvent.region;
+			}
+			int [] width = new int [1], height = new int [1];
+			gdk_window_get_size (window, width, height);
+			int /*long*/ parent = 0;
+			int itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, parent);
+			GdkRectangle rect = new GdkRectangle ();
+			boolean expanded = true;
+			while (itemCount != 0 && expanded && height [0] > (rect.y + rect.height)) {
+				int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
+				OS.gtk_tree_model_iter_nth_child (modelHandle, iter, parent, itemCount - 1);
+				itemCount = OS.gtk_tree_model_iter_n_children (modelHandle, iter);
+				int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
+				OS.gtk_tree_view_get_cell_area (handle, path, 0, rect);
+				expanded = OS.gtk_tree_view_row_expanded (handle, path); 
+				OS.gtk_tree_path_free (path);
 				if (parent != 0) OS.g_free (parent);
-				if (height [0] > (rect.y + rect.height)) {
-					drawBackground (control, window, gdkEvent.region, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
-				}
+				parent = iter;
+			}
+			if (parent != 0) OS.g_free (parent);
+			if (height [0] > (rect.y + rect.height)) {
+				drawBackground (control, window, cairo, rgn, 0, rect.y + rect.height, width [0], height [0] - (rect.y + rect.height));
 			}
 		}
 	}
+}
+
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawInheritedBackground	(0, cairo);
+	return super.gtk_draw (widget, cairo);
+}
+
+int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ eventPtr) {
+	if ((state & OBSCURED) != 0) return 0;
+	drawInheritedBackground	(eventPtr, 0);
 	return super.gtk_expose_event (widget, eventPtr);
 }
 
@@ -1980,14 +2019,14 @@ int /*long*/ gtk_row_activated (int /*long*/ tree, int /*long*/ path, int /*long
 	return 0;
 }
 
-int gtk_row_deleted (int model, int path) {
+int /*long*/ gtk_row_deleted (int /*long*/ model, int /*long*/ path) {
 	if (ignoreAccessibility) {
 		OS.g_signal_stop_emission_by_name (model, OS.row_deleted);
 	}
 	return 0;
 }
 
-int gtk_row_inserted (int model, int path, int iter) {
+int /*long*/ gtk_row_inserted (int /*long*/ model, int /*long*/ path, int /*long*/ iter) {
 	if (ignoreAccessibility) {
 		OS.g_signal_stop_emission_by_name (model, OS.row_inserted);
 	}
@@ -2471,12 +2510,8 @@ public void removeTreeListener(TreeListener listener) {
 	eventTable.unhook (SWT.Collapse, listener);
 }
 
-int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
-	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
-	GtkCellRendererClass klass = new GtkCellRendererClass ();
-	OS.memmove (klass, g_class);
-	int /*long*/ result = OS.call (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height);
-	if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
+void sendMeasureEvent (int /*long*/ cell, int /*long*/ width, int /*long*/ height) {
+	if (!ignoreSize && OS.GTK_IS_CELL_RENDERER_TEXT (cell) && hooks (SWT.MeasureItem)) {
 		int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2);
 		TreeItem item = null;
 		if (iter != 0) item = _getItem (iter);
@@ -2491,44 +2526,75 @@ int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*
 					}				
 				}
 			}
-			if (hooks (SWT.MeasureItem)) {
-				int [] contentWidth = new int [1], contentHeight = new int  [1];
-				if (width != 0) OS.memmove (contentWidth, width, 4);
-				if (height != 0) OS.memmove (contentHeight, height, 4);
-				Image image = item.getImage (columnIndex);
-				int imageWidth = 0;
-				if (image != null) {
-					Rectangle bounds = image.getBounds ();
-					imageWidth = bounds.width;
-				}
-				contentWidth [0] += imageWidth;
-				GC gc = new GC (this);
-				gc.setFont (item.getFont (columnIndex));
-				Event event = new Event ();
-				event.item = item;
-				event.index = columnIndex;
-				event.gc = gc;
-				event.width = contentWidth [0];
-				event.height = contentHeight [0];
-				int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
-				int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
-				if (OS.gtk_tree_selection_path_is_selected (selection, path)) {
-					event.detail = SWT.SELECTED;
-				}
-				OS.gtk_tree_path_free (path);
-				sendEvent (SWT.MeasureItem, event);
-				gc.dispose ();
-				contentWidth [0] = event.width - imageWidth;
-				if (contentHeight [0] < event.height) contentHeight [0] = event.height;
-				if (width != 0) OS.memmove (width, contentWidth, 4);
-				if (height != 0) OS.memmove (height, contentHeight, 4);
+			int [] contentWidth = new int [1], contentHeight = new int  [1];
+			if (width != 0) OS.memmove (contentWidth, width, 4);
+			if (height != 0) OS.memmove (contentHeight, height, 4);
+			if (OS.GTK3) {
+				OS.gtk_cell_renderer_get_preferred_height_for_width (cell, handle, contentWidth[0], contentHeight, null);
+			}
+			Image image = item.getImage (columnIndex);
+			int imageWidth = 0;
+			if (image != null) {
+				Rectangle bounds = image.getBounds ();
+				imageWidth = bounds.width;
+			}
+			contentWidth [0] += imageWidth;
+			GC gc = new GC (this);
+			gc.setFont (item.getFont (columnIndex));
+			Event event = new Event ();
+			event.item = item;
+			event.index = columnIndex;
+			event.gc = gc;
+			event.width = contentWidth [0];
+			event.height = contentHeight [0];
+			int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
+			int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
+			if (OS.gtk_tree_selection_path_is_selected (selection, path)) {
+				event.detail = SWT.SELECTED;
+			}
+			OS.gtk_tree_path_free (path);
+			sendEvent (SWT.MeasureItem, event);
+			gc.dispose ();
+			contentWidth [0] = event.width - imageWidth;
+			if (contentHeight [0] < event.height) contentHeight [0] = event.height;
+			if (width != 0) OS.memmove (width, contentWidth, 4);
+			if (height != 0) OS.memmove (height, contentHeight, 4);
+			if (OS.GTK3) { 
+				OS.gtk_cell_renderer_set_fixed_size (cell, contentWidth [0], contentHeight [0]);
 			}
 		}
 	}
-	return result;
+}
+
+int /*long*/ rendererGetPreferredWidthProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ minimun_size, int /*long*/ natural_size) {
+	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
+	GtkCellRendererClass klass = new GtkCellRendererClass ();
+	OS.memmove (klass, g_class);
+	OS.call (klass.get_preferred_width, cell, handle, minimun_size, natural_size);
+	sendMeasureEvent (cell, minimun_size, 0);
+	return 0;
+}
+
+int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ widget, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
+	int /*long*/ g_class = OS.g_type_class_peek_parent (OS.G_OBJECT_GET_CLASS (cell));
+	GtkCellRendererClass klass = new GtkCellRendererClass ();
+	OS.memmove (klass, g_class);
+	OS.call_get_size (klass.get_size, cell, handle, cell_area, x_offset, y_offset, width, height);
+	sendMeasureEvent (cell, width, height);
+	return 0;
+}
+
+int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ cr, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ flags) {
+	rendererRender (cell, cr, 0, widget, background_area, cell_area, 0, flags);
+	return 0;
 }
 
 int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
+	rendererRender (cell, 0, window, widget, background_area, cell_area, expose_area, flags);
+	return 0;
+}
+
+void rendererRender (int /*long*/ cell, int /*long*/ cr, int /*long*/ window, int /*long*/ widget, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
 	TreeItem item = null;
 	int /*long*/ iter = OS.g_object_get_qdata (cell, Display.SWT_OBJECT_INDEX2);
 	if (iter != 0) item = _getItem (iter);
@@ -2557,7 +2623,9 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				OS.gdk_color_free(ptr[0]);
 			}
 			if ((flags & OS.GTK_CELL_RENDERER_SELECTED) != 0) drawState |= SWT.SELECTED;
-			if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;			
+			if (!OS.GTK3 || (flags & OS.GTK_CELL_RENDERER_SELECTED) == 0) {
+				if ((flags & OS.GTK_CELL_RENDERER_FOCUSED) != 0) drawState |= SWT.FOCUSED;
+			}
 			
 			GdkRectangle rect = new GdkRectangle ();
 			int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
@@ -2568,21 +2636,35 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				if ((state & PARENT_BACKGROUND) != 0 || backgroundImage != null) {
 					Control control = findBackgroundControl ();
 					if (control != null) {
-						drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+						if (cr != 0) {
+							Cairo.cairo_save (cr);
+							Cairo.cairo_reset_clip (cr);
+						}
+						drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
+						if (cr != 0) {
+							Cairo.cairo_restore (cr);
+						}
 					}
 				}
 			}
 
 			//send out measure before erase
 			int /*long*/ textRenderer =  getTextRenderer (columnHandle);
-			if (textRenderer != 0) OS.gtk_cell_renderer_get_size (textRenderer, handle, null, null, null, null, null);
+			if (textRenderer != 0) gtk_cell_renderer_get_preferred_size (textRenderer, handle, null, null);
 			
 			if (hooks (SWT.EraseItem)) {
 				boolean wasSelected = (drawState & SWT.SELECTED) != 0;
 				if (wasSelected) {
 					Control control = findBackgroundControl ();
 					if (control == null) control = this;
-					drawBackground (control, window, 0, rect.x, rect.y, rect.width, rect.height);
+					if (cr != 0) {
+						Cairo.cairo_save (cr);
+						Cairo.cairo_reset_clip (cr);
+					}
+					drawBackground (control, window, cr, 0, rect.x, rect.y, rect.width, rect.height);
+					if (cr != 0) {
+						Cairo.cairo_restore (cr);
+					}
 				}
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
@@ -2611,10 +2693,22 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED;
 				if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED;
 				if ((drawState & SWT.SELECTED) != 0) {
-					int /*long*/ style = OS.gtk_widget_get_style (widget);					
-					//TODO - parity and sorted
-					byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
-					OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+					if (OS.GTK3) {
+						Cairo.cairo_save (cr);
+						Cairo.cairo_reset_clip (cr);
+						int /*long*/ context = OS.gtk_widget_get_style_context (widget);
+						OS.gtk_style_context_save (context);
+						OS.gtk_style_context_add_class (context, OS.GTK_STYLE_CLASS_CELL);
+						OS.gtk_style_context_set_state (context, OS.GTK_STATE_FLAG_SELECTED);
+						OS.gtk_render_background(context, cr, rect.x, rect.y, rect.width, rect.height);
+						OS.gtk_style_context_restore (context);
+						Cairo.cairo_restore (cr);
+					} else {
+						int /*long*/ style = OS.gtk_widget_get_style (widget);					
+						//TODO - parity and sorted
+						byte[] detail = Converter.wcsToMbcs (null, "cell_odd", true);
+						OS.gtk_paint_flat_box (style, window, OS.GTK_STATE_SELECTED, OS.GTK_SHADOW_NONE, rect, widget, detail, rect.x, rect.y, rect.width, rect.height);
+					}
 				} else {
 					if (wasSelected) drawForeground = gc.getForeground ().handle;
 				}
@@ -2622,7 +2716,6 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			}
 		}
 	}
-	int /*long*/ result = 0;
 	if ((drawState & SWT.BACKGROUND) != 0 && (drawState & SWT.SELECTED) == 0) {
 		GC gc = new GC (this);
 		gc.setBackground (item.getBackground (columnIndex));
@@ -2638,7 +2731,11 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 		if (drawForeground != null && OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
 			OS.g_object_set (cell, OS.foreground_gdk, drawForeground, 0);
 		}
-		result = OS.call (klass.render, cell, window, handle, background_area, cell_area, expose_area, drawFlags);
+		if (OS.GTK3) {
+			OS.call (klass.render, cell, cr, widget, background_area, cell_area, drawFlags);
+		} else {
+			OS.call (klass.render, cell, window, widget, background_area, cell_area, expose_area, drawFlags);
+		}
 	}
 	if (item != null) {
 		if (OS.GTK_IS_CELL_RENDERER_TEXT (cell)) {
@@ -2660,7 +2757,7 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				}
 				ignoreSize = true;
 				int [] contentX = new int [1], contentWidth = new int [1];
-				OS.gtk_cell_renderer_get_size (cell, handle, null, null, null, contentWidth, null);
+				gtk_cell_renderer_get_preferred_size (cell, handle, contentWidth, null);
 				OS.gtk_tree_view_column_cell_get_position (columnHandle, cell, contentX, null);
 				ignoreSize = false;
 				Image image = item.getImage (columnIndex);
@@ -2673,8 +2770,21 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 				contentWidth [0] += imageWidth;
 				GC gc = new GC (this);
 				if ((drawState & SWT.SELECTED) != 0) {
-					gc.setBackground (display.getSystemColor (SWT.COLOR_LIST_SELECTION));
-					gc.setForeground (display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT));
+					Color background, foreground;
+					if (gtk_widget_has_focus (handle) || OS.GTK3) {
+						background = display.getSystemColor (SWT.COLOR_LIST_SELECTION);
+						foreground = display.getSystemColor (SWT.COLOR_LIST_SELECTION_TEXT);
+					} else {
+						/*
+						 * Feature in GTK. When the widget doesn't have focus, then
+						 * gtk_paint_flat_box () changes the background color state_type
+						 * to GTK_STATE_ACTIVE. The fix is to use the same values in the GC.
+						 */
+						background = Color.gtk_new (display, display.COLOR_LIST_SELECTION_INACTIVE);
+						foreground = Color.gtk_new (display, display.COLOR_LIST_SELECTION_TEXT_INACTIVE);
+					}
+					gc.setBackground (background);
+					gc.setForeground (foreground);
 				} else {
 					gc.setBackground (item.getBackground (columnIndex));
 					Color foreground = drawForeground != null ? Color.gtk_new (display, drawForeground) : item.getForeground (columnIndex);
@@ -2700,7 +2810,6 @@ int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*l
 			}
 		}
 	}
-	return result;
 }
 
 void resetCustomDraw () {
@@ -2736,13 +2845,6 @@ void reskinChildren (int flags) {
 boolean searchEnabled () {
 	/* Disable searching when using VIRTUAL */
 	if ((style & SWT.VIRTUAL) != 0) return false;
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) {
-		int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
-		Shell shell = getShell();
-		if ((shell.style & mask) != 0) {
-			return false;
-		}
-	}
 	return true;
 }
 /**
@@ -2881,7 +2983,9 @@ public void selectAll () {
 
 void setBackgroundColor (GdkColor color) {
 	super.setBackgroundColor (color);
-	OS.gtk_widget_modify_base (handle, 0, color);
+	if (!OS.GTK3) {
+		OS.gtk_widget_modify_base (handle, 0, color);
+	}
 }
 
 void setBackgroundPixmap (Image image) {
@@ -2900,14 +3004,6 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
 	* after it has been resized.
 	*/
 	OS.gtk_widget_realize (handle);
-	/*
-	* Bug in GTK.  An empty GtkTreeView fails to repaint the focus rectangle
-	* correctly when resized on versions before 2.6.0.  The fix is to force
-	* the widget to redraw.
-	*/
-	if (OS.GTK_VERSION < OS.VERSION (2, 6, 0) && OS.gtk_tree_model_iter_n_children (modelHandle, 0) == 0) {
-		redraw (false);
-	}
 	return result;
 }
 
@@ -2968,6 +3064,10 @@ void setFontDescription (int /*long*/ font) {
 	}
 }
 
+void setForegroundColor (GdkColor color) {
+	setForegroundColor (handle, color, false);
+}
+
 /**
  * Marks the receiver's header as visible if the argument is <code>true</code>,
  * and marks it invisible otherwise. 
@@ -3018,6 +3118,17 @@ public void setLinesVisible (boolean show) {
 	}
 }
 
+void setModel (int /*long*/ newModel) {
+	display.removeWidget (modelHandle);
+	OS.g_object_unref (modelHandle);
+	modelHandle = newModel;
+	display.addWidget (modelHandle, this);
+	if (fixAccessibility ()) {
+		OS.g_signal_connect_closure (modelHandle, OS.row_inserted, display.closures [ROW_INSERTED], true);
+		OS.g_signal_connect_closure (modelHandle, OS.row_deleted, display.closures [ROW_DELETED], true);
+	}
+}
+
 void setOrientation (boolean create) {
 	super.setOrientation (create);
 	if (items != null) {
@@ -3053,7 +3164,8 @@ void setScrollWidth (int /*long*/ column, TreeItem item) {
 
 /**
  * Sets the receiver's selection to the given item.
- * The current selection is cleared before the new item is selected.
+ * The current selection is cleared before the new item is selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * If the item is not in the receiver, then it is ignored.
  * </p>
@@ -3079,7 +3191,8 @@ public void setSelection (TreeItem item) {
 
 /**
  * Sets the receiver's selection to be the given array of items.
- * The current selection is cleared before the new items are selected.
+ * The current selection is cleared before the new items are selected,
+ * and if necessary the receiver is scrolled to make the new selection visible.
  * <p>
  * Items that are not in the receiver are ignored.
  * If the receiver is single-select and multiple items are specified,
@@ -3328,7 +3441,7 @@ void showItem (int /*long*/ path, boolean scroll) {
 		boolean isHidden = cellRect.y == 0 && cellRect.height == 0;
 		int [] tx = new int [1], ty = new int [1];
 		if (OS.GTK_VERSION >= OS.VERSION(2, 12, 0)) {
-			OS.gtk_tree_view_convert_widget_to_bin_window_coords(handle, cellRect.x, cellRect.y, tx, ty);
+			OS.gtk_tree_view_convert_bin_window_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 		} else {
 			OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty);
 		}
diff --git a/org/eclipse/swt/widgets/TreeColumn.java b/org/eclipse/swt/widgets/TreeColumn.java
index 8e835e8..ad1399c 100644
--- a/org/eclipse/swt/widgets/TreeColumn.java
+++ b/org/eclipse/swt/widgets/TreeColumn.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -352,16 +352,6 @@ int /*long*/ gtk_clicked (int /*long*/ widget) {
 				lastButton = eventButton;
 				break;
 			}
-			case OS.GDK_MOTION_NOTIFY: {
-				/*
-				* Bug in GTK.  Dragging a column in a GtkTreeView causes a clicked 
-				* signal to be emitted even though the mouse button was never released.
-				* The fix to ignore the signal if the current GDK event is a motion notify.
-				* The GTK bug was fixed in version 2.6
-				*/
-				if (OS.GTK_VERSION < OS.VERSION (2, 6, 0)) postEvent = false;
-				break;
-			}
 		}
 	}
 	if (postEvent) sendSelectionEvent (doubleClick ? SWT.DefaultSelection : SWT.Selection);
@@ -390,8 +380,10 @@ int /*long*/ gtk_mnemonic_activate (int /*long*/ widget, int /*long*/ arg1) {
 
 int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) {
 	useFixedWidth = false;
-	int x = OS.GTK_WIDGET_X (widget);
-	int width = OS.GTK_WIDGET_WIDTH (widget);
+	GtkAllocation widgetAllocation = new GtkAllocation();
+	gtk_widget_get_allocation (widget, widgetAllocation);
+	int x = widgetAllocation.x;
+	int width = widgetAllocation.width;
 	if (x != lastX) {
 		lastX = x;
 		sendEvent (SWT.Move);
@@ -429,7 +421,7 @@ public void pack () {
 	int width = 0;
 	if (buttonHandle != 0) {
 		GtkRequisition requisition = new GtkRequisition ();
-		OS.gtk_widget_size_request (buttonHandle, requisition);
+		gtk_widget_get_preferred_size (buttonHandle, requisition);
 		width = requisition.width;
 	}
 	if ((parent.style & SWT.VIRTUAL) != 0) {
@@ -543,8 +535,8 @@ public void setAlignment (int alignment) {
 }
 
 void setFontDescription (int /*long*/ font) {
-	OS.gtk_widget_modify_font (labelHandle, font);
-	OS.gtk_widget_modify_font (imageHandle, font);
+	setFontDescription (labelHandle, font);
+	setFontDescription (imageHandle, font);
 }
 
 public void setImage (Image image) {
@@ -558,10 +550,10 @@ public void setImage (Image image) {
 		int imageIndex = headerImageList.indexOf (image);
 		if (imageIndex == -1) imageIndex = headerImageList.add (image);
 		int /*long*/ pixbuf = headerImageList.getPixbuf (imageIndex);
-		OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
+		gtk_image_set_from_pixbuf (imageHandle, pixbuf);
 		OS.gtk_widget_show (imageHandle);
 	} else {
-		OS.gtk_image_set_from_pixbuf (imageHandle, 0);
+		gtk_image_set_from_pixbuf (imageHandle, 0);
 		OS.gtk_widget_hide (imageHandle);
 	}
 }
diff --git a/org/eclipse/swt/widgets/TreeItem.java b/org/eclipse/swt/widgets/TreeItem.java
index 43277b1..8bf09ab 100644
--- a/org/eclipse/swt/widgets/TreeItem.java
+++ b/org/eclipse/swt/widgets/TreeItem.java
@@ -235,7 +235,7 @@ Color _getBackground (int index) {
 }
 
 boolean _getChecked () {
-	int /*long*/ [] ptr = new int /*long*/ [1];
+	int [] ptr = new int [1];
 	OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.CHECKED_COLUMN, ptr, -1);
 	return ptr [0] != 0;
 }
@@ -295,9 +295,13 @@ void clear () {
 	if (parent.currentItem == this) return;
 	if (cached || (parent.style & SWT.VIRTUAL) == 0) {
 		int columnCount = OS.gtk_tree_model_get_n_columns (parent.modelHandle);
-		for (int i=Tree.CHECKED_COLUMN; i<columnCount; i++) {
+		/* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+		for (int i=Tree.CHECKED_COLUMN; i<Tree.FOREGROUND_COLUMN; i++) {
 			OS.gtk_tree_store_set (parent.modelHandle, handle, i, 0, -1);
 		}
+		for (int i=Tree.FOREGROUND_COLUMN; i<columnCount; i++) {
+			OS.gtk_tree_store_set (parent.modelHandle, handle, i, (int /*long*/)0, -1);
+		}
 		/*
 		* Bug in GTK.  When using fixed-height-mode,
 		* row changes do not cause the row to be repainted.  The fix is to
@@ -511,7 +515,7 @@ public Rectangle getBounds () {
 
 	int [] x = new int [1], w = new int [1];
 	parent.ignoreSize = true;
-	OS.gtk_cell_renderer_get_size (textRenderer, parentHandle, null, null, null, w, null);
+	gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
 	parent.ignoreSize = false;
 	rect.width = w [0];
 	int [] buffer = new int [1];
@@ -968,7 +972,7 @@ public Rectangle getTextBounds (int index) {
 
 	int [] x = new int [1], w = new int [1];
 	parent.ignoreSize = true;
-	OS.gtk_cell_renderer_get_size (textRenderer, parentHandle, null, null, null, w, null);
+	gtk_cell_renderer_get_preferred_size (textRenderer, parentHandle, w, null);
 	parent.ignoreSize = false;
 	int [] buffer = new int [1];
 	if (OS.GTK_VERSION < OS.VERSION (2, 8, 18) && OS.gtk_tree_view_get_expander_column (parentHandle) == column) {
@@ -1052,7 +1056,7 @@ public int indexOf (TreeItem item) {
 
 void redraw () {
 	int /*long*/ parentHandle = parent.handle;
-	if ((OS.GTK_WIDGET_FLAGS (parentHandle) & OS.GTK_REALIZED) != 0) {
+	if (gtk_widget_get_realized (parentHandle)) {
 		int /*long*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle);
 		GdkRectangle rect = new GdkRectangle ();
 		OS.gtk_tree_view_get_cell_area (parentHandle, path, 0, rect);
@@ -1060,7 +1064,7 @@ void redraw () {
 		int /*long*/ window = OS.gtk_tree_view_get_bin_window (parentHandle);
 		rect.x = 0;
 		int [] w = new int [1], h = new int [1];
-		OS.gdk_drawable_get_size (window, w, h);
+		gdk_window_get_size (window, w, h);
 		rect.width = w [0];
 		OS.gdk_window_invalidate_rect (window, rect, false);
 	}
@@ -1532,7 +1536,7 @@ public void setGrayed (boolean grayed) {
 	* GTK+'s "inconsistent" state does not match SWT's concept of grayed.
 	* Render checked+grayed as "inconsistent", unchecked+grayed as blank.
 	*/
-	int /*long*/ [] ptr = new int /*long*/ [1];
+	int [] ptr = new int [1];
 	OS.gtk_tree_model_get (parent.modelHandle, handle, Tree.CHECKED_COLUMN, ptr, -1);
 	OS.gtk_tree_store_set (parent.modelHandle, handle, Tree.GRAYED_COLUMN, ptr [0] == 0 ? false : grayed, -1);
 	cached = true;
@@ -1604,8 +1608,10 @@ public void setImage (int index, Image image) {
 				 * are relying on the fact that it is done as part of modifying
 				 * the style.
 				 */
-				int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle);
-				parent.modifyStyle (parentHandle, style);
+				if (!OS.GTK3) {
+					int /*long*/ style = OS.gtk_widget_get_modifier_style (parentHandle);
+					parent.modifyStyle (parentHandle, style);
+				}
 			}
 		} 
 	}
diff --git a/org/eclipse/swt/widgets/Widget.java b/org/eclipse/swt/widgets/Widget.java
index eb3bbcd..c3340ce 100644
--- a/org/eclipse/swt/widgets/Widget.java
+++ b/org/eclipse/swt/widgets/Widget.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -125,6 +125,7 @@ public abstract class Widget {
 	static final int EVENT_AFTER = 16;
 	static final int EXPAND_COLLAPSE_CURSOR_ROW = 17;
 	static final int EXPOSE_EVENT = 18;
+	static final int DRAW = EXPOSE_EVENT;
 	static final int EXPOSE_EVENT_INVERSE = 19;
 	static final int FOCUS = 20;
 	static final int FOCUS_IN_EVENT = 21;
@@ -638,6 +639,82 @@ int /*long*/ gtk_activate (int /*long*/ widget) {
 	return 0;
 }
 
+void gtk_adjustment_get (int /*long*/ hAdjustment, GtkAdjustment adjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		adjustment.lower = OS.gtk_adjustment_get_lower (hAdjustment);
+		adjustment.upper = OS.gtk_adjustment_get_upper (hAdjustment);
+		adjustment.page_increment = OS.gtk_adjustment_get_page_increment (hAdjustment);
+		adjustment.step_increment = OS.gtk_adjustment_get_step_increment (hAdjustment);
+		adjustment.page_size = OS.gtk_adjustment_get_page_size (hAdjustment);
+		adjustment.value = OS.gtk_adjustment_get_value (hAdjustment);
+	} else {
+		OS.memmove(adjustment, hAdjustment);
+	}
+}
+
+double gtk_adjustment_get_step_increment (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_step_increment (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.step_increment;
+}
+
+double gtk_adjustment_get_page_increment (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_page_increment (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.page_increment;
+}
+
+double gtk_adjustment_get_lower (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_lower (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.lower;
+}
+
+double gtk_adjustment_get_upper (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_upper (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.upper;
+}
+
+double gtk_adjustment_get_page_size (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_page_size (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.page_size;
+}
+
+double gtk_adjustment_get_value (int /*long*/ hAdjustment) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		return (int) OS.gtk_adjustment_get_value (hAdjustment);
+	}
+	GtkAdjustment adjustment = new GtkAdjustment ();
+	OS.memmove (adjustment, hAdjustment);
+	return (int) adjustment.value;
+}
+
+void gtk_adjustment_configure (int /*long*/ hAdjustment, GtkAdjustment a) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 14, 0)) {
+		OS.gtk_adjustment_configure(hAdjustment, a.value, a.lower, a.upper, a.step_increment, a.page_increment, a.page_size);
+	} else {
+		OS.memmove (hAdjustment, a);
+		OS.gtk_adjustment_changed (hAdjustment);
+	}
+}
+
 int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
@@ -706,6 +783,10 @@ int /*long*/ gtk_expand_collapse_cursor_row (int /*long*/ widget, int /*long*/ l
 	return 0;
 }
 
+int /*long*/ gtk_draw (int /*long*/ widget, int /*long*/ cairo) {
+	return 0;
+}
+
 int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
@@ -898,6 +979,33 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even
 	return 0;
 }
 
+void gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		OS.gtk_widget_get_allocation (widget, allocation);
+	} else {
+		allocation.x = OS.GTK_WIDGET_X (widget);
+		allocation.y = OS.GTK_WIDGET_Y (widget);
+		allocation.width = OS.GTK_WIDGET_WIDTH (widget);
+		allocation.height = OS.GTK_WIDGET_HEIGHT (widget);
+	}
+}
+
+boolean gtk_widget_get_mapped (int /*long*/ widget) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
+		return OS.gtk_widget_get_mapped (widget);
+	} else {
+		return OS.GTK_WIDGET_MAPPED (widget);
+	}
+}
+
+boolean gtk_widget_has_focus (int /*long*/ widget) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		return OS.gtk_widget_has_focus (widget);
+	} else {
+		return OS.GTK_WIDGET_HAS_FOCUS (widget);
+	}
+}
+
 int /*long*/ gtk_window_state_event (int /*long*/ widget, int /*long*/ event) {
 	return 0;
 }
@@ -1194,10 +1302,18 @@ protected void removeListener (int eventType, SWTEventListener handler) {
 	eventTable.unhook (eventType, handler);
 }
 
+int /*long*/ rendererGetPreferredWidthProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ minimun_size, int /*long*/ natural_size) {
+	return 0;
+}
+
 int /*long*/ rendererGetSizeProc (int /*long*/ cell, int /*long*/ handle, int /*long*/ cell_area, int /*long*/ x_offset, int /*long*/ y_offset, int /*long*/ width, int /*long*/ height) {
 	return 0;
 }
 
+int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ cr, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ flags) {
+	return 0;
+}
+
 int /*long*/ rendererRenderProc (int /*long*/ cell, int /*long*/ window, int /*long*/ handle, int /*long*/ background_area, int /*long*/ cell_area, int /*long*/ expose_area, int /*long*/ flags) {
 	return 0;
 }
@@ -1527,23 +1643,61 @@ public void setData (String key, Object value) {
 	if (key.equals(SWT.SKIN_CLASS) || key.equals(SWT.SKIN_ID)) this.reskin(SWT.ALL);
 }
 
+void setFontDescription (int /*long*/ widget, int /*long*/ font) {
+	if (OS.GTK3) {
+		OS.gtk_widget_override_font (widget, font);
+		int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+		OS.gtk_style_context_invalidate (context);
+	} else {
+		OS.gtk_widget_modify_font (widget, font);
+	}
+}
+
 void setForegroundColor (int /*long*/ handle, GdkColor color) {
+	setForegroundColor (handle, color, true);
+}
+
+void setForegroundColor (int /*long*/ handle, GdkColor color, boolean setStateActive) {
+	if (OS.GTK3) {
+		GdkRGBA rgba = null;
+		if (color != null) {
+			rgba = new GdkRGBA();
+			rgba.alpha = 1;
+			rgba.red = (color.red & 0xFFFF) / (float)0xFFFF;
+			rgba.green = (color.green & 0xFFFF) / (float)0xFFFF;
+			rgba.blue = (color.blue & 0xFFFF) / (float)0xFFFF;
+		}
+		OS.gtk_widget_override_color (handle, OS.GTK_STATE_FLAG_NORMAL, rgba);
+		int /*long*/ context = OS.gtk_widget_get_style_context (handle);
+		OS.gtk_style_context_invalidate (context);
+		return;
+	}
+	
+	/*
+	 * Feature in GTK. When the widget doesn't have focus, then
+	 * gtk_default_draw_flat_box () changes the background color state_type
+	 * to GTK_STATE_ACTIVE. Widgets whose background is drawn using
+	 * gtk_paint_flat_box or gtk_default_draw_flat_box have to pass false for
+	 * setStateActive.
+	 */
 	int /*long*/ style = OS.gtk_widget_get_modifier_style (handle);
 	OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_NORMAL, color);
-	OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_ACTIVE, color);
+	if (setStateActive) OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_ACTIVE, color);
 	OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_PRELIGHT, color);
 	int flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL);
 	flags = (color == null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG;
 	OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_NORMAL, flags);
-	flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE);
-	flags = (color == null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG;
-	OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags);
+	if (setStateActive) {
+		flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE);
+		flags = (color == null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG;
+		OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags);
+	}
 	flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT);
 	flags = (color == null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG;
 	OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags);
 
 	OS.gtk_rc_style_set_text (style, OS.GTK_STATE_NORMAL, color);
-	OS.gtk_rc_style_set_text (style, OS.GTK_STATE_ACTIVE, color);
+	if (setStateActive) OS.gtk_rc_style_set_text (style, OS.GTK_STATE_ACTIVE, color);
 	OS.gtk_rc_style_set_text (style, OS.GTK_STATE_PRELIGHT, color);
 	flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL);
 	flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT;
@@ -1551,9 +1705,11 @@ void setForegroundColor (int /*long*/ handle, GdkColor color) {
 	flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT);	
 	flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT;
 	OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags);	
-	flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE);
-	flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT;
-	OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags);
+	if (setStateActive) {
+		flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE);
+		flags = (color == null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT;
+		OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags);
+	}
 	modifyStyle (handle, style);	
 }
 
@@ -1673,6 +1829,182 @@ int /*long*/ sizeAllocateProc (int /*long*/ handle, int /*long*/ arg0, int /*lon
 int /*long*/ sizeRequestProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ user_data) {
 	return 0;
 }
+int /*long*/ g_object_ref_sink (int /*long*/ object) {
+	if (OS.GLIB_VERSION >= OS.VERSION (2, 10, 0)) { 
+		return OS.g_object_ref_sink (object);
+	} else {
+		OS.gtk_object_sink (object);
+	}
+	return 0;
+}
+
+boolean gtk_widget_get_sensitive (int /*long*/ widget) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		return OS.gtk_widget_get_sensitive (widget);
+	} else {
+		return OS.GTK_WIDGET_SENSITIVE (widget);
+	}
+}
+
+boolean gtk_widget_get_visible (int /*long*/ widget) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		return OS.gtk_widget_get_visible (widget);
+	} else {
+		return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_VISIBLE) != 0;
+	}
+}
+
+boolean gtk_widget_get_realized (int /*long*/ widget) {
+	 if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
+		 return OS.gtk_widget_get_realized (widget);
+	 } else {
+		 return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_REALIZED) != 0;
+	 }
+}
+
+boolean gtk_widget_get_can_default (int /*long*/ widget){
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		return OS.gtk_widget_get_can_default (widget);
+	} else {
+		return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_CAN_DEFAULT) != 0;
+	}
+}
+
+boolean gtk_widget_get_has_window (int /*long*/ widget) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		return OS.gtk_widget_get_has_window (widget);
+	} else {
+		return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_NO_WINDOW) == 0;
+	}
+}
+
+int /*long*/ gtk_widget_get_window (int /*long*/ widget){
+	if (OS.GTK_VERSION >= OS.VERSION(2, 14, 0)){
+		return OS.gtk_widget_get_window (widget);
+	} else {
+		return OS.GTK_WIDGET_WINDOW (widget);
+	}
+}
+
+void gtk_widget_set_can_default (int /*long*/ widget, boolean can_default) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		OS.gtk_widget_set_can_default (widget, can_default);
+	} else {
+		if (can_default) {
+			OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_CAN_DEFAULT);
+		} else {
+			OS.GTK_WIDGET_UNSET_FLAGS (widget, OS.GTK_CAN_DEFAULT);
+		}
+	}
+}
+
+void gtk_widget_set_can_focus (int /*long*/ widget, boolean can_focus) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		OS.gtk_widget_set_can_focus (widget, can_focus);
+	} else {
+		if (can_focus) {
+			OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_CAN_FOCUS);
+		} else {
+			OS.GTK_WIDGET_UNSET_FLAGS (widget, OS.GTK_CAN_FOCUS);
+		}
+	}
+}
+
+void gtk_widget_set_mapped (int /*long*/ widget, boolean mapped) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
+		OS.gtk_widget_set_mapped (widget, mapped);
+	} else {
+		if (mapped) {
+			OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_MAPPED);
+		} else {
+			OS.GTK_WIDGET_UNSET_FLAGS (widget, OS.GTK_MAPPED);
+		}
+	}
+}
+
+void gtk_widget_set_visible (int /*long*/ widget, boolean visible) {
+	if (OS.GTK3) {
+		OS.gtk_widget_set_visible (widget,visible);
+	} else {
+		if (visible) {
+			OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_VISIBLE);
+		} else {
+			OS.GTK_WIDGET_UNSET_FLAGS (widget, OS.GTK_VISIBLE);
+		}
+	}
+}
+
+void gtk_widget_set_receives_default (int /*long*/ widget, boolean receives_default) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+		OS.gtk_widget_set_receives_default (widget, receives_default);	
+	} else {
+		if (receives_default) {
+			OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_RECEIVES_DEFAULT);
+		} else {
+			OS.GTK_WIDGET_UNSET_FLAGS (widget, OS.GTK_RECEIVES_DEFAULT);
+		}
+	}
+}
+
+void gdk_pixmap_get_size (int /*long*/ pixmap, int[] width, int[] height) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) {
+		OS.gdk_pixmap_get_size (pixmap, width, height);
+	} else {
+		OS.gdk_drawable_get_size (pixmap, width, height);
+	}
+}
+
+void gdk_window_get_size (int /*long*/ drawable, int[] width, int[] height) {
+	if (OS.GTK_VERSION >= OS.VERSION (2, 24, 0)) {
+		width[0] = OS.gdk_window_get_width (drawable);
+		height[0] = OS.gdk_window_get_height (drawable);
+	} else {
+		OS.gdk_drawable_get_size (drawable, width, height);
+	}
+}
+
+int /*long*/ gtk_box_new (int orientation, boolean homogeneous, int spacing) {
+	int /*long*/ box = 0;
+	if (OS.GTK3) {
+		box = OS.gtk_box_new (orientation, spacing);
+		OS.gtk_box_set_homogeneous (box, homogeneous);
+	} else {
+		if (orientation == OS.GTK_ORIENTATION_HORIZONTAL) {
+			box = OS.gtk_hbox_new (homogeneous, spacing);
+		} else {
+			box = OS.gtk_vbox_new (homogeneous, spacing);
+		}
+	}
+	return box;
+}
+
+int gdk_pointer_grab (int /*long*/ window, int grab_ownership, boolean owner_events, int event_mask, int /*long*/ confine_to, int /*long*/ cursor, int time_) {
+	if (OS.GTK3) {
+		int /*long*/ display = 0;
+		if( window != 0) {
+			display = OS.gdk_window_get_display (window);
+		} else {
+			window = OS.gdk_get_default_root_window ();
+			display = OS.gdk_window_get_display (window);
+		}
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (display);
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager);
+		return OS.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_);
+	} else {
+		return OS.gdk_pointer_grab (window, owner_events, event_mask, confine_to, cursor, time_);
+	}
+}
+
+void gdk_pointer_ungrab (int /*long*/ window, int time_) {
+	if (OS.GTK3) {
+		int /*long*/ display = OS.gdk_window_get_display (window);
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (display);
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager);
+		OS.gdk_device_ungrab (pointer, time_);
+	} else {
+		OS.gdk_pointer_ungrab (time_);
+	}
+}
 
 /**
  * Returns a string containing a concise, human-readable
@@ -1751,7 +2083,13 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ us
 		case ENTER_NOTIFY_EVENT: return gtk_enter_notify_event (handle, arg0);
 		case EVENT: return gtk_event (handle, arg0);
 		case EVENT_AFTER: return gtk_event_after (handle, arg0);
-		case EXPOSE_EVENT: return gtk_expose_event (handle, arg0);
+		case EXPOSE_EVENT: {
+			if (OS.GTK3) {
+				return gtk_draw (handle, arg0);
+			} else {
+				return gtk_expose_event (handle, arg0);
+			}
+		}
 		case FOCUS: return gtk_focus (handle, arg0);
 		case FOCUS_IN_EVENT: return gtk_focus_in_event (handle, arg0);
 		case FOCUS_OUT_EVENT: return gtk_focus_out_event (handle, arg0);
@@ -1803,4 +2141,56 @@ int /*long*/ windowProc (int /*long*/ handle, int /*long*/ arg0, int /*long*/ ar
 	}
 }
 
+void gdk_cursor_unref (int /*long*/ cursor) {
+	if (OS.GTK3) {
+		OS.g_object_unref (cursor);
+	} else {
+		OS.gdk_cursor_unref(cursor);
+	}
+}
+
+int /*long*/ gdk_window_get_device_position (int /*long*/ window, int[] x, int[] y, int[] mask) {
+	if (OS.GTK3) {
+		int /*long*/ display = 0;
+		if( window != 0) {
+			display = OS.gdk_window_get_display (window);
+		} else {
+			window = OS.gdk_get_default_root_window ();
+			display = OS.gdk_window_get_display (window);
+		}
+		int /*long*/ device_manager = OS.gdk_display_get_device_manager (display);
+		int /*long*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager);
+		return OS.gdk_window_get_device_position(window, pointer, x, y, mask);
+	} else {
+		return OS.gdk_window_get_pointer (window, x, y, mask);
+	}
+}
+
+void gtk_cell_renderer_get_preferred_size (int /*long*/ cell, int /*long*/ widget,  int[] width, int[] height) {
+	if (OS.GTK3) {
+		GtkRequisition minimum_size = new GtkRequisition ();
+		OS.gtk_cell_renderer_get_preferred_size (cell, widget, minimum_size, null);
+		if (width != null) width [0] = minimum_size.width;
+		if (height != null) height[0] = minimum_size.height;
+	} else {
+		OS.gtk_cell_renderer_get_size (cell, widget, null, null, null, width, height);
+	}
+}
+
+void gtk_widget_get_preferred_size (int /*long*/ widget, GtkRequisition requisition){
+	if (OS.GTK3) {
+		OS.gtk_widget_get_preferred_size (widget, requisition, null);
+	} else {
+		OS.gtk_widget_size_request (widget, requisition);
+	}
+}
+
+void gtk_image_set_from_pixbuf (int /*long*/ imageHandle, int /*long*/ pixbuf){
+	if (OS.GTK3) {
+		OS.gtk_image_set_from_gicon(imageHandle, pixbuf, OS.GTK_ICON_SIZE_SMALL_TOOLBAR);
+	} else {
+		OS.gtk_image_set_from_pixbuf(imageHandle, pixbuf);
+	}
+}
+
 }
diff --git a/os.c b/os.c
index 1c8c5a5..8392189 100644
--- a/os.c
+++ b/os.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -149,54 +149,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1ENTRY_1IM_1CONTEXT)
 }
 #endif
 
-#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1A
-JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1A)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC);
-	rc = (jboolean)GTK_RANGE_HAS_STEPPER_A((GtkRange *)arg0);
-	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1A_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1B
-JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1B)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC);
-	rc = (jboolean)GTK_RANGE_HAS_STEPPER_B((GtkRange *)arg0);
-	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1B_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1C
-JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1C)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC);
-	rc = (jboolean)GTK_RANGE_HAS_STEPPER_C((GtkRange *)arg0);
-	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1C_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO_GTK_1RANGE_1HAS_1STEPPER_1D
-JNIEXPORT jboolean JNICALL OS_NATIVE(GTK_1RANGE_1HAS_1STEPPER_1D)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC);
-	rc = (jboolean)GTK_RANGE_HAS_STEPPER_D((GtkRange *)arg0);
-	OS_NATIVE_EXIT(env, that, GTK_1RANGE_1HAS_1STEPPER_1D_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO_GTK_1RANGE_1SLIDER_1END
 JNIEXPORT jint JNICALL OS_NATIVE(GTK_1RANGE_1SLIDER_1END)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -303,6 +255,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1TOOLTIPS_1TIP_1WINDOW)
 }
 #endif
 
+#ifndef NO_GTK_1TYPE_1ACCESSIBLE
+JNIEXPORT jintLong JNICALL OS_NATIVE(GTK_1TYPE_1ACCESSIBLE)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
+	rc = (jintLong)GTK_TYPE_ACCESSIBLE;
+	OS_NATIVE_EXIT(env, that, GTK_1TYPE_1ACCESSIBLE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_GTK_1WIDGET_1HEIGHT
 JNIEXPORT jint JNICALL OS_NATIVE(GTK_1WIDGET_1HEIGHT)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -339,26 +303,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GTK_1WIDGET_1REQUISITION_1WIDTH)
 }
 #endif
 
-#ifndef NO_GTK_1WIDGET_1SET_1HEIGHT
-JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1HEIGHT)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
-	OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1HEIGHT_FUNC);
-	GTK_WIDGET_SET_HEIGHT((GtkWidget *)arg0, arg1);
-	OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1HEIGHT_FUNC);
-}
-#endif
-
-#ifndef NO_GTK_1WIDGET_1SET_1WIDTH
-JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1WIDTH)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
-	OS_NATIVE_ENTER(env, that, GTK_1WIDGET_1SET_1WIDTH_FUNC);
-	GTK_WIDGET_SET_WIDTH((GtkWidget *)arg0, arg1);
-	OS_NATIVE_EXIT(env, that, GTK_1WIDGET_1SET_1WIDTH_FUNC);
-}
-#endif
-
 #ifndef NO_GTK_1WIDGET_1SET_1X
 JNIEXPORT void JNICALL OS_NATIVE(GTK_1WIDGET_1SET_1X)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -713,18 +657,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GdkEvent_1sizeof)
 }
 #endif
 
-#ifndef NO_GdkGCValues_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GdkGCValues_1sizeof)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GdkGCValues_1sizeof_FUNC);
-	rc = (jint)GdkGCValues_sizeof();
-	OS_NATIVE_EXIT(env, that, GdkGCValues_1sizeof_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO_GdkGeometry_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GdkGeometry_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -737,14 +669,14 @@ JNIEXPORT jint JNICALL OS_NATIVE(GdkGeometry_1sizeof)
 }
 #endif
 
-#ifndef NO_GdkImage_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GdkImage_1sizeof)
+#ifndef NO_GdkRGBA_1sizeof
+JNIEXPORT jint JNICALL OS_NATIVE(GdkRGBA_1sizeof)
 	(JNIEnv *env, jclass that)
 {
 	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GdkImage_1sizeof_FUNC);
-	rc = (jint)GdkImage_sizeof();
-	OS_NATIVE_EXIT(env, that, GdkImage_1sizeof_FUNC);
+	OS_NATIVE_ENTER(env, that, GdkRGBA_1sizeof_FUNC);
+	rc = (jint)GdkRGBA_sizeof();
+	OS_NATIVE_EXIT(env, that, GdkRGBA_1sizeof_FUNC);
 	return rc;
 }
 #endif
@@ -761,18 +693,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GdkRectangle_1sizeof)
 }
 #endif
 
-#ifndef NO_GdkVisual_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GdkVisual_1sizeof)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GdkVisual_1sizeof_FUNC);
-	rc = (jint)GdkVisual_sizeof();
-	OS_NATIVE_EXIT(env, that, GdkVisual_1sizeof_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO_GdkWindowAttr_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GdkWindowAttr_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -905,30 +825,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GtkColorSelectionDialog_1sizeof)
 }
 #endif
 
-#ifndef NO_GtkFixedClass_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GtkFixedClass_1sizeof)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GtkFixedClass_1sizeof_FUNC);
-	rc = (jint)GtkFixedClass_sizeof();
-	OS_NATIVE_EXIT(env, that, GtkFixedClass_1sizeof_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO_GtkFixed_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GtkFixed_1sizeof)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GtkFixed_1sizeof_FUNC);
-	rc = (jint)GtkFixed_sizeof();
-	OS_NATIVE_EXIT(env, that, GtkFixed_1sizeof_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO_GtkRequisition_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GtkRequisition_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -965,18 +861,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(GtkTargetEntry_1sizeof)
 }
 #endif
 
-#ifndef NO_GtkTargetPair_1sizeof
-JNIEXPORT jint JNICALL OS_NATIVE(GtkTargetPair_1sizeof)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, GtkTargetPair_1sizeof_FUNC);
-	rc = (jint)GtkTargetPair_sizeof();
-	OS_NATIVE_EXIT(env, that, GtkTargetPair_1sizeof_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO_GtkTextIter_1sizeof
 JNIEXPORT jint JNICALL OS_NATIVE(GtkTextIter_1sizeof)
 	(JNIEnv *env, jclass that)
@@ -1361,6 +1245,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1GString_1str)
 }
 #endif
 
+#ifndef NO__1GTK_1ACCESSIBLE
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1GTK_1ACCESSIBLE)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1GTK_1ACCESSIBLE_FUNC);
+	rc = (jintLong)GTK_ACCESSIBLE(arg0);
+	OS_NATIVE_EXIT(env, that, _1GTK_1ACCESSIBLE_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1GTK_1IS_1ACCEL_1LABEL
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1GTK_1IS_1ACCEL_1LABEL)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -1589,6 +1485,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1GTK_1TYPE_1FIXED)
 }
 #endif
 
+#ifndef NO__1GTK_1TYPE_1IM_1MULTICONTEXT
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1GTK_1TYPE_1IM_1MULTICONTEXT)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
+	rc = (jintLong)GTK_TYPE_IM_MULTICONTEXT;
+	OS_NATIVE_EXIT(env, that, _1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1GTK_1TYPE_1MENU
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1GTK_1TYPE_1MENU)
 	(JNIEnv *env, jclass that)
@@ -1683,18 +1591,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1GTK_1WIDGET_1SET_1FLAGS)
 }
 #endif
 
-#ifndef NO__1GTK_1WIDGET_1STATE
-JNIEXPORT jint JNICALL OS_NATIVE(_1GTK_1WIDGET_1STATE)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1GTK_1WIDGET_1STATE_FUNC);
-	rc = (jint)GTK_WIDGET_STATE(arg0);
-	OS_NATIVE_EXIT(env, that, _1GTK_1WIDGET_1STATE_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1GTK_1WIDGET_1UNSET_1FLAGS
 JNIEXPORT void JNICALL OS_NATIVE(_1GTK_1WIDGET_1UNSET_1FLAGS)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -1837,30 +1733,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1XCheckIfEvent)
 }
 #endif
 
-#ifndef NO__1XCheckMaskEvent
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1XCheckMaskEvent)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1XCheckMaskEvent_FUNC);
-	rc = (jboolean)XCheckMaskEvent((Display *)arg0, (long)arg1, (XEvent *)arg2);
-	OS_NATIVE_EXIT(env, that, _1XCheckMaskEvent_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1XCheckWindowEvent
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1XCheckWindowEvent)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1XCheckWindowEvent_FUNC);
-	rc = (jboolean)XCheckWindowEvent((Display *)arg0, (Window)arg1, (long)arg2, (XEvent *)arg3);
-	OS_NATIVE_EXIT(env, that, _1XCheckWindowEvent_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1XDefaultRootWindow
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1XDefaultRootWindow)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -2023,31 +1895,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1XQueryTree
-JNIEXPORT jint JNICALL OS_NATIVE(_1XQueryTree)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3, jintLongArray arg4, jintArray arg5)
-{
-	jintLong *lparg2=NULL;
-	jintLong *lparg3=NULL;
-	jintLong *lparg4=NULL;
-	jint *lparg5=NULL;
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1XQueryTree_FUNC);
-	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
-	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	rc = (jint)XQueryTree((Display *)arg0, (Window)arg1, (Window *)lparg2, (Window *)lparg3, (Window **)lparg4, (unsigned int *)lparg5);
-fail:
-	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
-	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
-	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
-	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-	OS_NATIVE_EXIT(env, that, _1XQueryTree_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1XReconfigureWMWindow
 JNIEXPORT jint JNICALL OS_NATIVE(_1XReconfigureWMWindow)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4)
@@ -2442,14 +2289,71 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1atk_1object_1remove_1relationship)
 }
 #endif
 
-#ifndef NO__1call
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1call)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+#if (!defined(NO__1call__IIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__JJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4)
+#endif
+{
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, _1call__IIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, _1call__JJJJJ_FUNC);
+#endif
+	rc = (jintLong)((jintLong (*)())arg0)(arg1, arg2, arg3, arg4);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, _1call__IIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, _1call__JJJJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO__1call__IIIIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__IIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__JJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6)
+#endif
+{
+	jintLong rc = 0;
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, _1call__IIIIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, _1call__JJJJJJJ_FUNC);
+#endif
+	rc = (jintLong)((jintLong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, _1call__IIIIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, _1call__JJJJJJJ_FUNC);
+#endif
+	return rc;
+}
+#endif
+
+#if (!defined(NO__1call__IIIIIIII) && !defined(JNI64)) || (!defined(NO__1call__JJJJJJJJ) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__IIIIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+#else
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1call__JJJJJJJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+#endif
 {
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1call_FUNC);
+#ifndef JNI64
+	OS_NATIVE_ENTER(env, that, _1call__IIIIIIII_FUNC);
+#else
+	OS_NATIVE_ENTER(env, that, _1call__JJJJJJJJ_FUNC);
+#endif
 	rc = (jintLong)((jintLong (*)())arg0)(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-	OS_NATIVE_EXIT(env, that, _1call_FUNC);
+#ifndef JNI64
+	OS_NATIVE_EXIT(env, that, _1call__IIIIIIII_FUNC);
+#else
+	OS_NATIVE_EXIT(env, that, _1call__JJJJJJJJ_FUNC);
+#endif
 	return rc;
 }
 #endif
@@ -2609,26 +2513,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1icon)
 }
 #endif
 
-#ifndef NO__1g_1app_1info_1get_1id
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1id)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1app_1info_1get_1id_FUNC);
-/*
-	rc = (jintLong)g_app_info_get_id(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_app_info_get_id)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1g_1app_1info_1get_1id_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1app_1info_1get_1name
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1app_1info_1get_1name)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -2787,30 +2671,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1g_1content_1type_1get_1mime_1type
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1content_1type_1get_1mime_1type)
-	(JNIEnv *env, jclass that, jbyteArray arg0)
-{
-	jbyte *lparg0=NULL;
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1content_1type_1get_1mime_1type_FUNC);
-	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-/*
-	rc = (jintLong)g_content_type_get_mime_type(lparg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_content_type_get_mime_type)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
-		}
-	}
-fail:
-	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
-	OS_NATIVE_EXIT(env, that, _1g_1content_1type_1get_1mime_1type_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1content_1type_1is_1a
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1content_1type_1is_1a)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -2835,26 +2695,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1g_1content_1types_1get_1registered
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1content_1types_1get_1registered)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1content_1types_1get_1registered_FUNC);
-/*
-	rc = (jintLong)g_content_types_get_registered();
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_content_types_get_registered)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1g_1content_1types_1get_1registered_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1data_1input_1stream_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1new)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -2877,139 +2717,75 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1new)
 
 #ifndef NO__1g_1data_1input_1stream_1read_1line
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1data_1input_1stream_1read_1line)
-	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintLong arg2, jintLong arg3)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLong arg2, jintLong arg3)
 {
-	jint *lparg1=NULL;
+	jintLong *lparg1=NULL;
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
 /*
 	rc = (jintLong)g_data_input_stream_read_line(arg0, lparg1, arg2, arg3);
 */
 	{
 		OS_LOAD_FUNCTION(fp, g_data_input_stream_read_line)
 		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint *, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3);
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong *, jintLong, jintLong))fp)(arg0, lparg1, arg2, arg3);
 		}
 	}
 fail:
-	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
 	OS_NATIVE_EXIT(env, that, _1g_1data_1input_1stream_1read_1line_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1g_1desktop_1app_1info_1new_1from_1filename
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1desktop_1app_1info_1new_1from_1filename)
-	(JNIEnv *env, jclass that, jbyteArray arg0)
+#ifndef NO__1g_1file_1get_1uri
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1get_1uri)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	jbyte *lparg0=NULL;
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1desktop_1app_1info_1new_1from_1filename_FUNC);
-	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1get_1uri_FUNC);
 /*
-	rc = (jintLong)g_desktop_app_info_new_from_filename(lparg0);
+	rc = (jintLong)g_file_get_uri(arg0);
 */
 	{
-		OS_LOAD_FUNCTION(fp, g_desktop_app_info_new_from_filename)
+		OS_LOAD_FUNCTION(fp, g_file_get_uri)
 		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0);
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
 		}
 	}
-fail:
-	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
-	OS_NATIVE_EXIT(env, that, _1g_1desktop_1app_1info_1new_1from_1filename_FUNC);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1get_1uri_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1g_1file_1get_1path
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1get_1path)
+#ifndef NO__1g_1file_1info_1get_1content_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1info_1get_1content_1type)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1file_1get_1path_FUNC);
+	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
 /*
-	rc = (jintLong)g_file_get_path(arg0);
+	rc = (jintLong)g_file_info_get_content_type(arg0);
 */
 	{
-		OS_LOAD_FUNCTION(fp, g_file_get_path)
+		OS_LOAD_FUNCTION(fp, g_file_info_get_content_type)
 		if (fp) {
 			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
 		}
 	}
-	OS_NATIVE_EXIT(env, that, _1g_1file_1get_1path_FUNC);
+	OS_NATIVE_EXIT(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1g_1file_1get_1uri
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1get_1uri)
-	(JNIEnv *env, jclass that, jintLong arg0)
+#ifndef NO__1g_1file_1info_1get_1modification_1time
+JNIEXPORT void JNICALL OS_NATIVE(_1g_1file_1info_1get_1modification_1time)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1file_1get_1uri_FUNC);
-/*
-	rc = (jintLong)g_file_get_uri(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_file_get_uri)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1g_1file_1get_1uri_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1file_1icon_1get_1file
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1icon_1get_1file)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1file_1icon_1get_1file_FUNC);
-/*
-	rc = (jintLong)g_file_icon_get_file(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_file_icon_get_file)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1g_1file_1icon_1get_1file_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1file_1info_1get_1content_1type
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1info_1get_1content_1type)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
-/*
-	rc = (jintLong)g_file_info_get_content_type(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, g_file_info_get_content_type)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1g_1file_1info_1get_1content_1type_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1file_1info_1get_1modification_1time
-JNIEXPORT void JNICALL OS_NATIVE(_1g_1file_1info_1get_1modification_1time)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
-{
-	jintLong *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1modification_1time_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	jintLong *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1g_1file_1info_1get_1modification_1time_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
 /*
 	g_file_info_get_modification_time(arg0, lparg1);
 */
@@ -3165,6 +2941,26 @@ fail:
 }
 #endif
 
+#ifndef NO__1g_1filename_1display_1name
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1filename_1display_1name)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1filename_1display_1name_FUNC);
+/*
+	rc = (jintLong)g_filename_display_name(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, g_filename_display_name)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1filename_1display_1name_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1g_1filename_1from_1uri
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1filename_1from_1uri)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2)
@@ -3453,18 +3249,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1list_1remove_1link)
 }
 #endif
 
-#ifndef NO__1g_1list_1reverse
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1list_1reverse)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1list_1reverse_FUNC);
-	rc = (jintLong)g_list_reverse((GList *)arg0);
-	OS_NATIVE_EXIT(env, that, _1g_1list_1reverse_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1list_1set_1next
 JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1set_1next)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -3485,50 +3269,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1list_1set_1previous)
 }
 #endif
 
-#ifndef NO__1g_1locale_1from_1utf8
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1locale_1from_1utf8)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3, jintLongArray arg4)
-{
-	jintLong *lparg2=NULL;
-	jintLong *lparg3=NULL;
-	jintLong *lparg4=NULL;
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1locale_1from_1utf8_FUNC);
-	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
-	rc = (jintLong)g_locale_from_utf8((const gchar *)arg0, (gssize)arg1, (gsize *)lparg2, (gsize *)lparg3, (GError **)lparg4);
-fail:
-	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
-	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
-	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-	OS_NATIVE_EXIT(env, that, _1g_1locale_1from_1utf8_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1g_1locale_1to_1utf8
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1locale_1to_1utf8)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLongArray arg2, jintLongArray arg3, jintLongArray arg4)
-{
-	jintLong *lparg2=NULL;
-	jintLong *lparg3=NULL;
-	jintLong *lparg4=NULL;
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1locale_1to_1utf8_FUNC);
-	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
-	rc = (jintLong)g_locale_to_utf8((const gchar *)arg0, (gssize)arg1, (gsize *)lparg2, (gsize *)lparg3, (GError **)lparg4);
-fail:
-	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
-	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
-	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-	OS_NATIVE_EXIT(env, that, _1g_1locale_1to_1utf8_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1log_1default_1handler
 JNIEXPORT void JNICALL OS_NATIVE(_1g_1log_1default_1handler)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintLong arg2, jintLong arg3)
@@ -3629,18 +3369,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1iteration)
 }
 #endif
 
-#ifndef NO__1g_1main_1context_1pending
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1pending)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1main_1context_1pending_FUNC);
-	rc = (jboolean)g_main_context_pending((GMainContext *)arg0);
-	OS_NATIVE_EXIT(env, that, _1g_1main_1context_1pending_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1main_1context_1prepare
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1main_1context_1prepare)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
@@ -3817,6 +3545,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1object_1ref)
 }
 #endif
 
+#ifndef NO__1g_1object_1ref_1sink
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1object_1ref_1sink)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1g_1object_1ref_1sink_FUNC);
+/*
+	rc = (jintLong)g_object_ref_sink(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, g_object_ref_sink)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1g_1object_1ref_1sink_FUNC);
+	return rc;
+}
+#endif
+
 #if (!defined(NO__1g_1object_1set__I_3BFI) && !defined(JNI64)) || (!defined(NO__1g_1object_1set__J_3BFJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(_1g_1object_1set__I_3BFI)(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jfloat arg2, jintLong arg3)
@@ -4051,22 +3799,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1g_1signal_1connect_1after
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1connect_1after)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jintLong arg3)
-{
-	jbyte *lparg1=NULL;
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1signal_1connect_1after_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	rc = (jint)g_signal_connect_after((gpointer)arg0, (const gchar *)lparg1, (GCallback)arg2, (gpointer)arg3);
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, JNI_ABORT);
-	OS_NATIVE_EXIT(env, that, _1g_1signal_1connect_1after_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1signal_1connect_1closure
 JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1connect_1closure)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jboolean arg3)
@@ -4260,18 +3992,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1block_1matched)
 }
 #endif
 
-#ifndef NO__1g_1signal_1handlers_1disconnect_1matched
-JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1disconnect_1matched)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintLong arg4, jintLong arg5, jintLong arg6)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1signal_1handlers_1disconnect_1matched_FUNC);
-	rc = (jint)g_signal_handlers_disconnect_matched((gpointer)arg0, (GSignalMatchType)arg1, (guint)arg2, (GQuark)arg3, (GClosure *)arg4, (gpointer)arg5, (gpointer)arg6);
-	OS_NATIVE_EXIT(env, that, _1g_1signal_1handlers_1disconnect_1matched_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1signal_1handlers_1unblock_1matched
 JNIEXPORT jint JNICALL OS_NATIVE(_1g_1signal_1handlers_1unblock_1matched)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintLong arg4, jintLong arg5, jintLong arg6)
@@ -4425,7 +4145,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1thread_1init)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	OS_NATIVE_ENTER(env, that, _1g_1thread_1init_FUNC);
-	g_thread_init((GThreadFunctions *)arg0);
+/*
+	g_thread_init(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, g_thread_init)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1g_1thread_1init_FUNC);
 }
 #endif
@@ -4693,18 +4421,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1g_1utf8_1offset_1to_1pointer
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1utf8_1offset_1to_1pointer)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1g_1utf8_1offset_1to_1pointer_FUNC);
-	rc = (jintLong)g_utf8_offset_to_pointer((const gchar *)arg0, arg1);
-	OS_NATIVE_EXIT(env, that, _1g_1utf8_1offset_1to_1pointer_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1g_1utf8_1offset_1to_1utf16_1offset
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1utf8_1offset_1to_1utf16_1offset)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -4927,7 +4643,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1bitmap_1create_1from_1data)
 	{
 		if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	}
+/*
 	rc = (jintLong)gdk_bitmap_create_from_data((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_bitmap_create_from_data)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, const gchar *, gint, gint))fp)((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3);
+		}
+	}
 fail:
 #ifdef JNI_VERSION_1_2
 	if (IS_JNI_1_2) {
@@ -4962,6 +4686,30 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cairo_1create)
 }
 #endif
 
+#ifndef NO__1gdk_1cairo_1get_1clip_1rectangle
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1cairo_1get_1clip_1rectangle)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	GdkRectangle _arg1, *lparg1=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC);
+	if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	rc = (jboolean)gdk_cairo_get_clip_rectangle(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_cairo_get_clip_rectangle)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkRectangle *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1cairo_1region
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1region)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -4980,6 +4728,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1region)
 }
 #endif
 
+#ifndef NO__1gdk_1cairo_1region_1create_1from_1surface
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cairo_1region_1create_1from_1surface)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC);
+/*
+	rc = (jintLong)gdk_cairo_region_create_from_surface(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_cairo_region_create_from_surface)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1cairo_1reset_1clip
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1reset_1clip)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -5020,6 +4788,24 @@ fail:
 }
 #endif
 
+#ifndef NO__1gdk_1cairo_1set_1source_1pixbuf
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1pixbuf)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3)
+{
+	OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC);
+/*
+	gdk_cairo_set_source_pixbuf(arg0, (const GdkPixbuf *)arg1, arg2, arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixbuf)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, const GdkPixbuf *, jdouble, jdouble))fp)(arg0, (const GdkPixbuf *)arg1, arg2, arg3);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC);
+}
+#endif
+
 #ifndef NO__1gdk_1cairo_1set_1source_1window
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1window)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
@@ -5075,7 +4861,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1color_1white)
 	jboolean rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1color_1white_FUNC);
 	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
-	rc = (jboolean)gdk_color_white((GdkColormap *)arg0, (GdkColor *)lparg1);
+/*
+	rc = (jboolean)gdk_color_white(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_color_white)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+		}
+	}
 fail:
 	if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1);
 	OS_NATIVE_EXIT(env, that, _1gdk_1color_1white_FUNC);
@@ -5091,7 +4885,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1colormap_1alloc_1color)
 	jboolean rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1alloc_1color_FUNC);
 	if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
-	rc = (jboolean)gdk_colormap_alloc_color((GdkColormap *)arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3);
+/*
+	rc = (jboolean)gdk_colormap_alloc_color(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_colormap_alloc_color)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *, gboolean, gboolean))fp)(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3);
+		}
+	}
 fail:
 	if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1);
 	OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1alloc_1color_FUNC);
@@ -5106,7 +4908,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1colormap_1free_1colors)
 	GdkColor _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1free_1colors_FUNC);
 	if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
-	gdk_colormap_free_colors((GdkColormap *)arg0, (GdkColor *)lparg1, (gint)arg2);
+/*
+	gdk_colormap_free_colors(arg0, (GdkColor *)lparg1, (gint)arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_colormap_free_colors)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkColor *, gint))fp)(arg0, (GdkColor *)lparg1, (gint)arg2);
+		}
+	}
 fail:
 	OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1free_1colors_FUNC);
 }
@@ -5118,26 +4928,20 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1colormap_1get_1system)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1get_1system_FUNC);
+/*
 	rc = (jintLong)gdk_colormap_get_system();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_colormap_get_system)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1get_1system_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1gdk_1colormap_1query_1color
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1colormap_1query_1color)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2)
-{
-	GdkColor _arg2, *lparg2=NULL;
-	OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1query_1color_FUNC);
-	if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
-	gdk_colormap_query_color((GdkColormap *)arg0, (gulong)arg1, (GdkColor *)lparg2);
-fail:
-	if (arg2 && lparg2) setGdkColorFields(env, arg2, lparg2);
-	OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1query_1color_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1cursor_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -5180,7 +4984,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new_1from_1pixmap)
 	OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC);
 	if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
 	if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail;
-	rc = (jintLong)gdk_cursor_new_from_pixmap((GdkPixmap *)arg0, (GdkPixmap *)arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5);
+/*
+	rc = (jintLong)gdk_cursor_new_from_pixmap(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_cursor_new_from_pixmap)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, GdkColor *, GdkColor *, gint, gint))fp)(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5);
+		}
+	}
 fail:
 	OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC);
 	return rc;
@@ -5192,11 +5004,124 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cursor_1unref)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1unref_FUNC);
-	gdk_cursor_unref((GdkCursor *)arg0);
+/*
+	gdk_cursor_unref(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_cursor_unref)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1unref_FUNC);
 }
 #endif
 
+#ifndef NO__1gdk_1device_1get_1associated_1device
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1get_1associated_1device)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1device_1get_1associated_1device_FUNC);
+/*
+	rc = (jintLong)gdk_device_get_associated_device((GdkDevice *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_device_get_associated_device)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDevice *))fp)((GdkDevice *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1device_1get_1associated_1device_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1device_1get_1window_1at_1position
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1get_1window_1at_1position)
+	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
+{
+	jint *lparg1=NULL;
+	jint *lparg2=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gdk_device_get_window_at_position(arg0, (gint *)lparg1, (gint *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_device_get_window_at_position)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1device_1grab
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1device_1grab)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4, jintLong arg5, jint arg6)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1device_1grab_FUNC);
+/*
+	rc = (jint)gdk_device_grab((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_device_grab)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkDevice *, GdkWindow *, jint, gboolean, GdkEventMask, GdkCursor *, guint32))fp)((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1device_1grab_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1device_1manager_1get_1client_1pointer
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1manager_1get_1client_1pointer)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC);
+/*
+	rc = (jintLong)gdk_device_manager_get_client_pointer(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_device_manager_get_client_pointer)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1device_1ungrab
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1device_1ungrab)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gdk_1device_1ungrab_FUNC);
+/*
+	gdk_device_ungrab((GdkDevice *)arg0, (guint32)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_device_ungrab)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkDevice *, guint32))fp)((GdkDevice *)arg0, (guint32)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1device_1ungrab_FUNC);
+}
+#endif
+
 #ifndef NO__1gdk_1display_1get_1default
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default)
 	(JNIEnv *env, jclass that)
@@ -5217,6 +5142,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default)
 }
 #endif
 
+#ifndef NO__1gdk_1display_1get_1device_1manager
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1device_1manager)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1device_1manager_FUNC);
+/*
+	rc = (jintLong)gdk_display_get_device_manager((GdkDisplay *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_display_get_device_manager)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1device_1manager_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1display_1supports_1cursor_1color
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1display_1supports_1cursor_1color)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -5237,6 +5182,86 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1display_1supports_1cursor_1color)
 }
 #endif
 
+#ifndef NO__1gdk_1drag_1context_1get_1actions
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1actions)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1actions_FUNC);
+/*
+	rc = (jint)gdk_drag_context_get_actions((GdkDragContext *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drag_context_get_actions)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1actions_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1drag_1context_1get_1dest_1window
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1dest_1window)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC);
+/*
+	rc = (jintLong)gdk_drag_context_get_dest_window((GdkDragContext *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drag_context_get_dest_window)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1drag_1context_1get_1selected_1action
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1selected_1action)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC);
+/*
+	rc = (jint)gdk_drag_context_get_selected_action((GdkDragContext *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drag_context_get_selected_action)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1drag_1context_1list_1targets
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drag_1context_1list_1targets)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1list_1targets_FUNC);
+/*
+	rc = (jintLong)gdk_drag_context_list_targets((GdkDragContext *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drag_context_list_targets)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1list_1targets_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1drag_1status
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drag_1status)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
@@ -5270,7 +5295,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1drawable)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1draw_1drawable_FUNC);
-	gdk_draw_drawable((GdkDrawable *)arg0, (GdkGC *)arg1, (GdkDrawable *)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8);
+/*
+	gdk_draw_drawable(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_draw_drawable)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, gint, gint, gint, gint, gint, gint))fp)(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1draw_1drawable_FUNC);
 }
 #endif
@@ -5280,7 +5313,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1image)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1draw_1image_FUNC);
-	gdk_draw_image((GdkDrawable *)arg0, (GdkGC *)arg1, (GdkImage *)arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+/*
+	gdk_draw_image(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_draw_image)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1draw_1image_FUNC);
 }
 #endif
@@ -5290,7 +5331,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1layout)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1draw_1layout_FUNC);
-	gdk_draw_layout((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (gint)arg3, (PangoLayout *)arg4);
+/*
+	gdk_draw_layout(arg0, arg1, arg2, arg3, arg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_draw_layout)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint, jintLong))fp)(arg0, arg1, arg2, arg3, arg4);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1draw_1layout_FUNC);
 }
 #endif
@@ -5378,12 +5427,12 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1pixbuf)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1draw_1pixbuf_FUNC);
 /*
-	gdk_draw_pixbuf((GdkDrawable *)arg0, (GdkGC *)arg1, (GdkPixbuf *)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, (GdkRgbDither)arg9, (gint)arg10, (gint)arg11);
+	gdk_draw_pixbuf(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11);
 */
 	{
 		OS_LOAD_FUNCTION(fp, gdk_draw_pixbuf)
 		if (fp) {
-			((void (CALLING_CONVENTION*)(GdkDrawable *, GdkGC *, GdkPixbuf *, gint, gint, gint, gint, gint, gint, GdkRgbDither, gint, gint))fp)((GdkDrawable *)arg0, (GdkGC *)arg1, (GdkPixbuf *)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, (GdkRgbDither)arg9, (gint)arg10, (gint)arg11);
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, gint, gint, gint, gint, gint, gint, jint, gint, gint))fp)(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11);
 		}
 	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1draw_1pixbuf_FUNC);
@@ -5422,7 +5471,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1polygon)
 	{
 		if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	}
-	gdk_draw_polygon((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (GdkPoint *)lparg3, (gint)arg4);
+/*
+	gdk_draw_polygon(arg0, arg1, arg2, lparg3, arg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_draw_polygon)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint *, jint))fp)(arg0, arg1, arg2, lparg3, arg4);
+		}
+	}
 fail:
 #ifdef JNI_VERSION_1_2
 	if (IS_JNI_1_2) {
@@ -5441,7 +5498,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1rectangle)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1draw_1rectangle_FUNC);
-	gdk_draw_rectangle((GdkDrawable *)arg0, (GdkGC *)arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6);
+/*
+	gdk_draw_rectangle(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_draw_rectangle)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1draw_1rectangle_FUNC);
 }
 #endif
@@ -5452,7 +5517,15 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drawable_1get_1depth)
 {
 	jint rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1depth_FUNC);
-	rc = (jint)gdk_drawable_get_depth((GdkDrawable *)arg0);
+/*
+	rc = (jint)gdk_drawable_get_depth(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drawable_get_depth)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1depth_FUNC);
 	return rc;
 }
@@ -5464,7 +5537,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drawable_1get_1image)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1image_FUNC);
-	rc = (jintLong)gdk_drawable_get_image((GdkDrawable *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+/*
+	rc = (jintLong)gdk_drawable_get_image(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drawable_get_image)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint, gint, gint, gint))fp)(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1image_FUNC);
 	return rc;
 }
@@ -5487,7 +5568,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drawable_1get_1size)
 		if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
 		if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
 	}
-	gdk_drawable_get_size((GdkDrawable *)arg0, (gint *)lparg1, (gint *)lparg2);
+/*
+	gdk_drawable_get_size(arg0, (gint *)lparg1, (gint *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drawable_get_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2);
+		}
+	}
 fail:
 #ifdef JNI_VERSION_1_2
 	if (IS_JNI_1_2) {
@@ -5509,7 +5598,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drawable_1get_1visible_1region)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC);
-	rc = (jintLong)gdk_drawable_get_visible_region((GdkDrawable *)arg0);
+/*
+	rc = (jintLong)gdk_drawable_get_visible_region(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_drawable_get_visible_region)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC);
 	return rc;
 }
@@ -5590,21 +5687,29 @@ fail:
 }
 #endif
 
-#ifndef NO__1gdk_1event_1get_1root_1coords
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1root_1coords)
+#ifndef NO__1gdk_1event_1get_1scroll_1deltas
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1scroll_1deltas)
 	(JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jdoubleArray arg2)
 {
 	jdouble *lparg1=NULL;
 	jdouble *lparg2=NULL;
 	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1root_1coords_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC);
 	if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	rc = (jboolean)gdk_event_get_root_coords((GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2);
+/*
+	rc = (jboolean)gdk_event_get_scroll_deltas((GdkEvent *)arg0, lparg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_event_get_scroll_deltas)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkEvent *, jdouble *, jdouble *))fp)((GdkEvent *)arg0, lparg1, lparg2);
+		}
+	}
 fail:
 	if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0);
 	if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1root_1coords_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC);
 	return rc;
 }
 #endif
@@ -5698,7 +5803,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1get_1values)
 	GdkGCValues _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1get_1values_FUNC);
 	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
-	gdk_gc_get_values((GdkGC *)arg0, (GdkGCValues *)lparg1);
+/*
+	gdk_gc_get_values(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_get_values)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkGCValues *))fp)(arg0, lparg1);
+		}
+	}
 fail:
 	if (arg1 && lparg1) setGdkGCValuesFields(env, arg1, lparg1);
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1get_1values_FUNC);
@@ -5711,7 +5824,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1gc_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1new_FUNC);
-	rc = (jintLong)gdk_gc_new((GdkDrawable *)arg0);
+/*
+	rc = (jintLong)gdk_gc_new(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1new_FUNC);
 	return rc;
 }
@@ -5779,7 +5900,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1clip_1region)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1clip_1region_FUNC);
-	gdk_gc_set_clip_region((GdkGC *)arg0, (GdkRegion *)arg1);
+/*
+	gdk_gc_set_clip_region(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_clip_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1clip_1region_FUNC);
 }
 #endif
@@ -5825,7 +5954,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1exposures)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1exposures_FUNC);
-	gdk_gc_set_exposures((GdkGC *)arg0, (gboolean)arg1);
+/*
+	gdk_gc_set_exposures(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_exposures)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1exposures_FUNC);
 }
 #endif
@@ -5835,7 +5972,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1fill)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1fill_FUNC);
-	gdk_gc_set_fill((GdkGC *)arg0, (GdkFill)arg1);
+/*
+	gdk_gc_set_fill(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_fill)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1fill_FUNC);
 }
 #endif
@@ -5847,7 +5992,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1foreground)
 	GdkColor _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1foreground_FUNC);
 	if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
-	gdk_gc_set_foreground((GdkGC *)arg0, (GdkColor *)lparg1);
+/*
+	gdk_gc_set_foreground(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_foreground)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+		}
+	}
 fail:
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1foreground_FUNC);
 }
@@ -5858,7 +6011,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1function)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1function_FUNC);
-	gdk_gc_set_function((GdkGC *)arg0, (GdkFunction)arg1);
+/*
+	gdk_gc_set_function(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_function)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1function_FUNC);
 }
 #endif
@@ -5886,7 +6047,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1stipple)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1stipple_FUNC);
-	gdk_gc_set_stipple((GdkGC *)arg0, (GdkPixmap *)arg1);
+/*
+	gdk_gc_set_stipple(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_stipple)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1stipple_FUNC);
 }
 #endif
@@ -5896,11 +6065,19 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1subwindow)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1subwindow_FUNC);
-	gdk_gc_set_subwindow((GdkGC *)arg0, (GdkSubwindowMode)arg1);
-	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1subwindow_FUNC);
-}
-#endif
-
+/*
+	gdk_gc_set_subwindow(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_subwindow)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1subwindow_FUNC);
+}
+#endif
+
 #ifndef NO__1gdk_1gc_1set_1tile
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1tile)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -5944,7 +6121,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1values)
 	GdkGCValues _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1values_FUNC);
 	if (arg1) if ((lparg1 = getGdkGCValuesFields(env, arg1, &_arg1)) == NULL) goto fail;
-	gdk_gc_set_values((GdkGC *)arg0, (GdkGCValues *)lparg1, (GdkGCValuesMask)arg2);
+/*
+	gdk_gc_set_values(arg0, lparg1, arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_gc_set_values)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkGCValues *, jint))fp)(arg0, lparg1, arg2);
+		}
+	}
 fail:
 	OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1values_FUNC);
 }
@@ -5967,7 +6152,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1keyboard_1ungrab)
 	(JNIEnv *env, jclass that, jint arg0)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1keyboard_1ungrab_FUNC);
+/*
 	gdk_keyboard_ungrab(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_keyboard_ungrab)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jint))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1keyboard_1ungrab_FUNC);
 }
 #endif
@@ -6033,18 +6226,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1keyval_1to_1unicode)
 }
 #endif
 
-#ifndef NO__1gdk_1pango_1attr_1embossed_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1attr_1embossed_1new)
-	(JNIEnv *env, jclass that, jboolean arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1pango_1attr_1embossed_1new_FUNC);
-	rc = (jintLong)gdk_pango_attr_embossed_new(arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1pango_1attr_1embossed_1new_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gdk_1pango_1context_1get
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1context_1get)
 	(JNIEnv *env, jclass that)
@@ -6057,24 +6238,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1context_1get)
 }
 #endif
 
-#ifndef NO__1gdk_1pango_1context_1set_1colormap
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pango_1context_1set_1colormap)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1set_1colormap_FUNC);
-/*
-	gdk_pango_context_set_colormap((PangoContext *)arg0, (GdkColormap *)arg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gdk_pango_context_set_colormap)
-		if (fp) {
-			((void (CALLING_CONVENTION*)(PangoContext *, GdkColormap *))fp)((PangoContext *)arg0, (GdkColormap *)arg1);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1set_1colormap_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1pango_1layout_1get_1clip_1region
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1layout_1get_1clip_1region)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3, jint arg4)
@@ -6107,12 +6270,40 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1from_1drawable)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC);
-	rc = (jintLong)gdk_pixbuf_get_from_drawable((GdkPixbuf *)arg0, (GdkDrawable *)arg1, (GdkColormap *)arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+/*
+	rc = (jintLong)gdk_pixbuf_get_from_drawable((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_drawable)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkPixbuf *, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC);
 	return rc;
 }
 #endif
 
+#ifndef NO__1gdk_1pixbuf_1get_1from_1window
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1from_1window)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC);
+/*
+	rc = (jintLong)gdk_pixbuf_get_from_window((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_window)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1pixbuf_1get_1has_1alpha
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1has_1alpha)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -6269,7 +6460,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1render_1pixmap_1and_1mask)
 	OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1render_1pixmap_1and_1mask_FUNC);
 	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	gdk_pixbuf_render_pixmap_and_mask((GdkPixbuf *)arg0, (GdkDrawable **)lparg1, (GdkBitmap **)lparg2, arg3);
+/*
+	gdk_pixbuf_render_pixmap_and_mask(arg0, lparg1, lparg2, arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixbuf_render_pixmap_and_mask)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong *, jintLong *, jint))fp)(arg0, lparg1, lparg2, arg3);
+		}
+	}
 fail:
 	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
 	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
@@ -6282,7 +6481,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1render_1to_1drawable)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1render_1to_1drawable_FUNC);
-	gdk_pixbuf_render_to_drawable((GdkPixbuf *)arg0, (GdkDrawable *)arg1, (GdkGC *)arg2, arg3, arg4, arg5, arg6, arg7, arg8, (GdkRgbDither)arg9, arg10, arg11);
+/*
+	gdk_pixbuf_render_to_drawable(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixbuf_render_to_drawable)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jint, jint, jint, jint, jint, jint, jint, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1render_1to_1drawable_FUNC);
 }
 #endif
@@ -6326,16 +6533,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gdk_1pixbuf_1scale
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1scale)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jdouble arg6, jdouble arg7, jdouble arg8, jdouble arg9, jint arg10)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1scale_FUNC);
-	gdk_pixbuf_scale((const GdkPixbuf *)arg0, (GdkPixbuf *)arg1, arg2, arg3, arg4, arg5, (double)arg6, (double)arg7, (double)arg8, (double)arg9, arg10);
-	OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1scale_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1pixbuf_1scale_1simple
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1scale_1simple)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3)
@@ -6348,15 +6545,44 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1scale_1simple)
 }
 #endif
 
-#ifndef NO__1gdk_1pixmap_1foreign_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixmap_1foreign_1new)
-	(JNIEnv *env, jclass that, jintLong arg0)
+#ifndef NO__1gdk_1pixmap_1get_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixmap_1get_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1foreign_1new_FUNC);
-	rc = (jintLong)gdk_pixmap_foreign_new(arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1foreign_1new_FUNC);
-	return rc;
+	jint *lparg1=NULL;
+	jint *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1get_1size_FUNC);
+#ifdef JNI_VERSION_1_2
+	if (IS_JNI_1_2) {
+		if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
+		if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail;
+	} else
+#endif
+	{
+		if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+		if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	}
+/*
+	gdk_pixmap_get_size(arg0, (gint *)lparg1, (gint *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixmap_get_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2);
+		}
+	}
+fail:
+#ifdef JNI_VERSION_1_2
+	if (IS_JNI_1_2) {
+		if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0);
+		if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0);
+	} else
+#endif
+	{
+		if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+		if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1get_1size_FUNC);
 }
 #endif
 
@@ -6366,7 +6592,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixmap_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1new_FUNC);
+/*
 	rc = (jintLong)gdk_pixmap_new((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pixmap_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1new_FUNC);
 	return rc;
 }
@@ -6378,30 +6612,34 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pointer_1grab)
 {
 	jint rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1pointer_1grab_FUNC);
+/*
 	rc = (jint)gdk_pointer_grab((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pointer_grab)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *, gboolean, GdkEventMask, GdkWindow *, GdkCursor *, guint32))fp)((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1pointer_1grab_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1gdk_1pointer_1is_1grabbed
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pointer_1is_1grabbed)
-	(JNIEnv *env, jclass that)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1pointer_1is_1grabbed_FUNC);
-	rc = (jboolean)gdk_pointer_is_grabbed();
-	OS_NATIVE_EXIT(env, that, _1gdk_1pointer_1is_1grabbed_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gdk_1pointer_1ungrab
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pointer_1ungrab)
 	(JNIEnv *env, jclass that, jint arg0)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1pointer_1ungrab_FUNC);
+/*
 	gdk_pointer_ungrab((guint32)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_pointer_ungrab)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(guint32))fp)((guint32)arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1pointer_1ungrab_FUNC);
 }
 #endif
@@ -6476,7 +6714,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1get_1rectangles)
 	OS_NATIVE_ENTER(env, that, _1gdk_1region_1get_1rectangles_FUNC);
 	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	gdk_region_get_rectangles((GdkRegion *)arg0, (GdkRectangle **)lparg1, (gint *)lparg2);
+/*
+	gdk_region_get_rectangles(arg0, lparg1, (gint *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_region_get_rectangles)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong *, gint *))fp)(arg0, lparg1, (gint *)lparg2);
+		}
+	}
 fail:
 	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
 	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
@@ -6536,7 +6782,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1region_1polygon)
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1region_1polygon_FUNC);
 	if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
-	rc = (jintLong)gdk_region_polygon((GdkPoint *)lparg0, arg1, (GdkFillRule)arg2);
+/*
+	rc = (jintLong)gdk_region_polygon(lparg0, arg1, arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_region_polygon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jint *, jint, jint))fp)(lparg0, arg1, arg2);
+		}
+	}
 fail:
 	if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
 	OS_NATIVE_EXIT(env, that, _1gdk_1region_1polygon_FUNC);
@@ -6823,7 +7077,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1utf8_1to_1compound_1text)
 	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
 	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
-	rc = (jboolean)gdk_utf8_to_compound_text((const gchar *)lparg0, (GdkAtom *)lparg1, (gint *)lparg2, (guchar **)lparg3, (gint *)lparg4);
+/*
+	rc = (jboolean)gdk_utf8_to_compound_text(lparg0, lparg1, lparg2, lparg3, lparg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_utf8_to_compound_text)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jbyte *, jintLong *, jint *, jintLong *, jint *))fp)(lparg0, lparg1, lparg2, lparg3, lparg4);
+		}
+	}
 fail:
 	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
 	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
@@ -6851,6 +7113,26 @@ fail:
 }
 #endif
 
+#ifndef NO__1gdk_1visual_1get_1depth
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1visual_1get_1depth)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1depth_FUNC);
+/*
+	rc = (jint)gdk_visual_get_depth((GdkVisual *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_visual_get_depth)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkVisual *))fp)((GdkVisual *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1depth_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1visual_1get_1system
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1visual_1get_1system)
 	(JNIEnv *env, jclass that)
@@ -6883,7 +7165,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1at_1pointer)
 	OS_NATIVE_ENTER(env, that, _1gdk_1window_1at_1pointer_FUNC);
 	if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail;
 	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
 	rc = (jintLong)gdk_window_at_pointer((gint *)lparg0, (gint *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_at_pointer)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gint *, gint *))fp)((gint *)lparg0, (gint *)lparg1);
+		}
+	}
 fail:
 	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
 	if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0);
@@ -6905,13 +7195,21 @@ fail:
 }
 #endif
 
-#ifndef NO__1gdk_1window_1clear_1area
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1clear_1area)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+#ifndef NO__1gdk_1window_1begin_1paint_1region
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1begin_1paint_1region)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1clear_1area_FUNC);
-	gdk_window_clear_area((GdkWindow *)arg0, arg1, arg2, arg3, arg4);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1clear_1area_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1begin_1paint_1region_FUNC);
+/*
+	gdk_window_begin_paint_region((GdkWindow *)arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_begin_paint_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkWindow *, jintLong))fp)((GdkWindow *)arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1begin_1paint_1region_FUNC);
 }
 #endif
 
@@ -6965,16 +7263,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1focus)
 }
 #endif
 
-#ifndef NO__1gdk_1window_1freeze_1updates
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1freeze_1updates)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1freeze_1updates_FUNC);
-	gdk_window_freeze_updates((GdkWindow *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1freeze_1updates_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1window_1get_1children
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1children)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -6987,6 +7275,56 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1children)
 }
 #endif
 
+#ifndef NO__1gdk_1window_1get_1device_1position
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1device_1position)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jintArray arg3, jintArray arg4)
+{
+	jint *lparg2=NULL;
+	jint *lparg3=NULL;
+	jint *lparg4=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1device_1position_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gdk_window_get_device_position((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_device_position)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, GdkDevice *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4);
+		}
+	}
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1device_1position_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1window_1get_1display
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1display)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1display_FUNC);
+/*
+	rc = (jintLong)gdk_window_get_display((GdkWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_display)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1display_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1window_1get_1events
 JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1events)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7013,6 +7351,26 @@ fail:
 }
 #endif
 
+#ifndef NO__1gdk_1window_1get_1height
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1height)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1height_FUNC);
+/*
+	rc = (jint)gdk_window_get_height((GdkWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_height)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1height_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1window_1get_1internal_1paint_1info
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1internal_1paint_1info)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2, jintArray arg3)
@@ -7024,7 +7382,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1internal_1paint_1info)
 	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
 	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	gdk_window_get_internal_paint_info((GdkWindow *)arg0, (GdkDrawable **)lparg1, (gint *)lparg2, (gint *)lparg3);
+/*
+	gdk_window_get_internal_paint_info((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_internal_paint_info)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkWindow *, jintLong *, gint *, gint *))fp)((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3);
+		}
+	}
 fail:
 	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
 	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
@@ -7076,7 +7442,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1pointer)
 	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
 	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
 	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
 	rc = (jintLong)gdk_window_get_pointer((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_pointer)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3);
+		}
+	}
 fail:
 	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
 	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
@@ -7117,20 +7491,60 @@ fail:
 }
 #endif
 
-#ifndef NO__1gdk_1window_1hide
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1hide)
+#ifndef NO__1gdk_1window_1get_1visible_1region
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1visible_1region)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1hide_FUNC);
-	gdk_window_hide((GdkWindow *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1hide_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1window_1invalidate_1rect
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1invalidate_1rect)
-	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2)
-{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1visible_1region_FUNC);
+/*
+	rc = (jintLong)gdk_window_get_visible_region((GdkWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_visible_region)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1visible_1region_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1window_1get_1width
+JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1width)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1width_FUNC);
+/*
+	rc = (jint)gdk_window_get_width((GdkWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_get_width)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1width_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gdk_1window_1hide
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1hide)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1hide_FUNC);
+	gdk_window_hide((GdkWindow *)arg0);
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1hide_FUNC);
+}
+#endif
+
+#ifndef NO__1gdk_1window_1invalidate_1rect
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1invalidate_1rect)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2)
+{
 	GdkRectangle _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1rect_FUNC);
 	if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail;
@@ -7145,23 +7559,19 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1invalidate_1region)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1region_FUNC);
-	gdk_window_invalidate_region((GdkWindow *)arg0, (GdkRegion *)arg1, (gboolean)arg2);
+/*
+	gdk_window_invalidate_region((GdkWindow *)arg0, arg1, (gboolean)arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_invalidate_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1region_FUNC);
 }
 #endif
 
-#ifndef NO__1gdk_1window_1is_1viewable
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1window_1is_1viewable)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1is_1viewable_FUNC);
-	rc = (jboolean)gdk_window_is_viewable((GdkWindow *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1is_1viewable_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gdk_1window_1is_1visible
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1window_1is_1visible)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7317,31 +7727,39 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1scroll)
 }
 #endif
 
-#ifndef NO__1gdk_1window_1set_1accept_1focus
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1accept_1focus)
-	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+#ifndef NO__1gdk_1window_1set_1back_1pixmap
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1back_1pixmap)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
 {
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1accept_1focus_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC);
 /*
-	gdk_window_set_accept_focus((GdkWindow *)arg0, (gboolean)arg1);
+	gdk_window_set_back_pixmap((GdkWindow *)arg0, arg1, (gboolean)arg2);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gdk_window_set_accept_focus)
+		OS_LOAD_FUNCTION(fp, gdk_window_set_back_pixmap)
 		if (fp) {
-			((void (CALLING_CONVENTION*)(GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (gboolean)arg1);
+			((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2);
 		}
 	}
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1accept_1focus_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC);
 }
 #endif
 
-#ifndef NO__1gdk_1window_1set_1back_1pixmap
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1back_1pixmap)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2)
+#ifndef NO__1gdk_1window_1set_1background_1pattern
+JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1background_1pattern)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC);
-	gdk_window_set_back_pixmap((GdkWindow *)arg0, (GdkPixmap *)arg1, (gboolean)arg2);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1background_1pattern_FUNC);
+/*
+	gdk_window_set_background_pattern(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_set_background_pattern)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1background_1pattern_FUNC);
 }
 #endif
 
@@ -7385,44 +7803,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1events)
 }
 #endif
 
-#ifndef NO__1gdk_1window_1set_1icon
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1icon)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1icon_FUNC);
-	gdk_window_set_icon((GdkWindow *)arg0, (GdkWindow *)arg1, (GdkPixmap *)arg2, (GdkBitmap *)arg3);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1icon_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1window_1set_1icon_1list
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1icon_1list)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1icon_1list_FUNC);
-	gdk_window_set_icon_list((GdkWindow *)arg0, (GList *)arg1);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1icon_1list_FUNC);
-}
-#endif
-
-#ifndef NO__1gdk_1window_1set_1keep_1above
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1keep_1above)
-	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1keep_1above_FUNC);
-/*
-	gdk_window_set_keep_above((GdkWindow *)arg0, (gboolean)arg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gdk_window_set_keep_above)
-		if (fp) {
-			((void (CALLING_CONVENTION*)(GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (gboolean)arg1);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1keep_1above_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1window_1set_1override_1redirect
 JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1override_1redirect)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -7448,7 +7828,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1shape_1combine_1region)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
 {
 	OS_NATIVE_ENTER(env, that, _1gdk_1window_1shape_1combine_1region_FUNC);
-	gdk_window_shape_combine_region((GdkWindow *)arg0, (GdkRegion *)arg1, arg2, arg3);
+/*
+	gdk_window_shape_combine_region((GdkWindow *)arg0, arg1, arg2, arg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_window_shape_combine_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1window_1shape_1combine_1region_FUNC);
 }
 #endif
@@ -7473,16 +7861,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1show_1unraised)
 }
 #endif
 
-#ifndef NO__1gdk_1window_1thaw_1updates
-JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1thaw_1updates)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gdk_1window_1thaw_1updates_FUNC);
-	gdk_window_thaw_updates((GdkWindow *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1window_1thaw_1updates_FUNC);
-}
-#endif
-
 #ifndef NO__1gdk_1x11_1atom_1to_1xatom
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1atom_1to_1xatom)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7495,18 +7873,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1atom_1to_1xatom)
 }
 #endif
 
-#ifndef NO__1gdk_1x11_1colormap_1get_1xcolormap
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1colormap_1get_1xcolormap)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1colormap_1get_1xcolormap_FUNC);
-	rc = (jintLong)gdk_x11_colormap_get_xcolormap((GdkColormap *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1colormap_1get_1xcolormap_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gdk_1x11_1display_1get_1xdisplay
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1display_1get_1xdisplay)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7519,13 +7885,57 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1display_1get_1xdisplay)
 }
 #endif
 
+#ifndef NO__1gdk_1x11_1display_1utf8_1to_1compound_1text
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1x11_1display_1utf8_1to_1compound_1text)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLongArray arg2, jintArray arg3, jintLongArray arg4, jintArray arg5)
+{
+	jbyte *lparg1=NULL;
+	jintLong *lparg2=NULL;
+	jint *lparg3=NULL;
+	jintLong *lparg4=NULL;
+	jint *lparg5=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
+/*
+	rc = (jboolean)gdk_x11_display_utf8_to_compound_text((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_x11_display_utf8_to_compound_text)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *, jbyte *, jintLong *, jint *, jintLong *, jint *))fp)((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5);
+		}
+	}
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
+	if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1x11_1drawable_1get_1xdisplay
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1drawable_1get_1xdisplay)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1drawable_1get_1xdisplay_FUNC);
-	rc = (jintLong)gdk_x11_drawable_get_xdisplay((GdkDrawable *)arg0);
+/*
+	rc = (jintLong)gdk_x11_drawable_get_xdisplay(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_x11_drawable_get_xdisplay)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1drawable_1get_1xdisplay_FUNC);
 	return rc;
 }
@@ -7537,12 +7947,32 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1drawable_1get_1xid)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC);
-	rc = (jintLong)gdk_x11_drawable_get_xid((GdkDrawable *)arg0);
+/*
+	rc = (jintLong)gdk_x11_drawable_get_xid(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_x11_drawable_get_xid)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC);
 	return rc;
 }
 #endif
 
+#ifndef NO__1gdk_1x11_1get_1default_1xdisplay
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1get_1default_1xdisplay)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC);
+	rc = (jintLong)gdk_x11_get_default_xdisplay();
+	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1x11_1screen_1get_1window_1manager_1name
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1screen_1get_1window_1manager_1name)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7595,6 +8025,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1visual_1get_1xvisual)
 }
 #endif
 
+#ifndef NO__1gdk_1x11_1window_1get_1xid
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1window_1get_1xid)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1get_1xid_FUNC);
+/*
+	rc = (jintLong)gdk_x11_window_get_xid((GdkWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gdk_x11_window_get_xid)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1get_1xid_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gdk_1x11_1window_1lookup_1for_1display
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1window_1lookup_1for_1display)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -7615,6 +8065,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1window_1lookup_1for_1display)
 }
 #endif
 
+#ifndef NO__1glib_1major_1version
+JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1major_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1glib_1major_1version_FUNC);
+	rc = (jint)glib_major_version;
+	OS_NATIVE_EXIT(env, that, _1glib_1major_1version_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1glib_1micro_1version
+JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1micro_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1glib_1micro_1version_FUNC);
+	rc = (jint)glib_micro_version;
+	OS_NATIVE_EXIT(env, that, _1glib_1micro_1version_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1glib_1minor_1version
+JNIEXPORT jint JNICALL OS_NATIVE(_1glib_1minor_1version)
+	(JNIEnv *env, jclass that)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1glib_1minor_1version_FUNC);
+	rc = (jint)glib_minor_version;
+	OS_NATIVE_EXIT(env, that, _1glib_1minor_1version_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1accel_1group_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1accel_1group_1new)
 	(JNIEnv *env, jclass that)
@@ -7627,18 +8113,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1accel_1group_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1accel_1groups_1activate
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1accel_1groups_1activate)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1accel_1groups_1activate_FUNC);
-	rc = (jboolean)gtk_accel_groups_activate((GObject *)arg0, (guint)arg1, (GdkModifierType)arg2);
-	OS_NATIVE_EXIT(env, that, _1gtk_1accel_1groups_1activate_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1accel_1label_1set_1accel_1widget
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1accel_1label_1set_1accel_1widget)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -7678,6 +8152,26 @@ fail:
 }
 #endif
 
+#ifndef NO__1gtk_1accessible_1get_1widget
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1accessible_1get_1widget)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1accessible_1get_1widget_FUNC);
+/*
+	rc = (jintLong)gtk_accessible_get_widget((GtkAccessible *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_accessible_get_widget)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAccessible *))fp)((GtkAccessible *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1accessible_1get_1widget_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1adjustment_1changed
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1changed)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -7688,40 +8182,214 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1changed)
 }
 #endif
 
-#ifndef NO__1gtk_1adjustment_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1adjustment_1new)
-	(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+#ifndef NO__1gtk_1adjustment_1configure
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1configure)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jdouble arg6)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1new_FUNC);
-	rc = (jintLong)gtk_adjustment_new((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, arg5);
-	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1new_FUNC);
-	return rc;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1configure_FUNC);
+/*
+	gtk_adjustment_configure((GtkAdjustment *)arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_configure)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkAdjustment *, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble))fp)((GtkAdjustment *)arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1configure_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1adjustment_1set_1value
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1set_1value)
-	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+#ifndef NO__1gtk_1adjustment_1get_1lower
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1lower)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1value_FUNC);
-	gtk_adjustment_set_value((GtkAdjustment *)arg0, (gdouble)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1value_FUNC);
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1lower_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_lower((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_lower)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1lower_FUNC);
+	return rc;
 }
 #endif
 
-#ifndef NO__1gtk_1adjustment_1value_1changed
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1value_1changed)
+#ifndef NO__1gtk_1adjustment_1get_1page_1increment
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1page_1increment)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
-	gtk_adjustment_value_changed((GtkAdjustment *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1page_1increment_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_page_increment((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_page_increment)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1page_1increment_FUNC);
+	return rc;
 }
 #endif
 
-#ifndef NO__1gtk_1arrow_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1arrow_1new)
+#ifndef NO__1gtk_1adjustment_1get_1page_1size
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1page_1size)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1page_1size_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_page_size((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_page_size)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1page_1size_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1get_1step_1increment
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1step_1increment)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1step_1increment_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_step_increment((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_step_increment)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1step_1increment_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1get_1upper
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1upper)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1upper_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_upper((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_upper)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1upper_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1get_1value
+JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1adjustment_1get_1value)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jdouble rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1get_1value_FUNC);
+/*
+	rc = (jdouble)gtk_adjustment_get_value((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_get_value)
+		if (fp) {
+			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1get_1value_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1adjustment_1new)
+	(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1new_FUNC);
+	rc = (jintLong)gtk_adjustment_new((gdouble)arg0, (gdouble)arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, arg5);
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1set_1page_1increment
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1set_1page_1increment)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1page_1increment_FUNC);
+/*
+	gtk_adjustment_set_page_increment((GtkAdjustment *)arg0, (gdouble)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_set_page_increment)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkAdjustment *, gdouble))fp)((GtkAdjustment *)arg0, (gdouble)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1page_1increment_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1set_1step_1increment
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1set_1step_1increment)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1step_1increment_FUNC);
+/*
+	gtk_adjustment_set_step_increment((GtkAdjustment *)arg0, (gdouble)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_adjustment_set_step_increment)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkAdjustment *, gdouble))fp)((GtkAdjustment *)arg0, (gdouble)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1step_1increment_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1set_1value
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1set_1value)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1set_1value_FUNC);
+	gtk_adjustment_set_value((GtkAdjustment *)arg0, (gdouble)arg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1set_1value_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1adjustment_1value_1changed
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1adjustment_1value_1changed)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
+	gtk_adjustment_value_changed((GtkAdjustment *)arg0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1adjustment_1value_1changed_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1arrow_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1arrow_1new)
 	(JNIEnv *env, jclass that, jint arg0, jint arg1)
 {
 	jintLong rc = 0;
@@ -7764,6 +8432,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1border_1free)
 }
 #endif
 
+#ifndef NO__1gtk_1box_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1box_1new)
+	(JNIEnv *env, jclass that, jint arg0, jint arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1box_1new_FUNC);
+/*
+	rc = (jintLong)gtk_box_new((GtkOrientation)arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_box_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, jint))fp)((GtkOrientation)arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1box_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1box_1set_1child_1packing
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1child_1packing)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2, jboolean arg3, jint arg4, jint arg5)
@@ -7774,6 +8462,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1child_1packing)
 }
 #endif
 
+#ifndef NO__1gtk_1box_1set_1homogeneous
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1homogeneous)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1box_1set_1homogeneous_FUNC);
+/*
+	gtk_box_set_homogeneous((GtkBox *)arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_box_set_homogeneous)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkBox *, jboolean))fp)((GtkBox *)arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1box_1set_1homogeneous_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1box_1set_1spacing
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1box_1set_1spacing)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -8024,6 +8730,56 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1layout_1pack_1start)
 }
 #endif
 
+#ifndef NO__1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jintArray arg4)
+{
+	jint *lparg3=NULL;
+	jint *lparg4=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
+/*
+	gtk_cell_renderer_get_preferred_height_for_width((GtkCellRenderer *)arg0, arg1, arg2, lparg3, lparg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_cell_renderer_get_preferred_height_for_width)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkCellRenderer *, jintLong, jint, jint *, jint *))fp)((GtkCellRenderer *)arg0, arg1, arg2, lparg3, lparg4);
+		}
+	}
+fail:
+	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1cell_1renderer_1get_1preferred_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1get_1preferred_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3)
+{
+	GtkRequisition _arg2, *lparg2=NULL;
+	GtkRequisition _arg3, *lparg3=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
+	if (arg2) if ((lparg2 = getGtkRequisitionFields(env, arg2, &_arg2)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = getGtkRequisitionFields(env, arg3, &_arg3)) == NULL) goto fail;
+/*
+	gtk_cell_renderer_get_preferred_size((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (GtkRequisition *)lparg2, (GtkRequisition *)lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_cell_renderer_get_preferred_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkCellRenderer *, GtkWidget *, GtkRequisition *, GtkRequisition *))fp)((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (GtkRequisition *)lparg2, (GtkRequisition *)lparg3);
+		}
+	}
+fail:
+	if (arg3 && lparg3) setGtkRequisitionFields(env, arg3, lparg3);
+	if (arg2 && lparg2) setGtkRequisitionFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1get_1preferred_1size_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1cell_1renderer_1get_1size
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1get_1size)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jintArray arg3, jintArray arg4, jintArray arg5, jintArray arg6)
@@ -8039,7 +8795,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1get_1size)
 	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
 	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetIntArrayElements(env, arg6, NULL)) == NULL) goto fail;
+/*
 	gtk_cell_renderer_get_size((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (GdkRectangle *)lparg2, (gint *)lparg3, (gint *)lparg4, (gint *)lparg5, (gint *)lparg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_cell_renderer_get_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkCellRenderer *, GtkWidget *, GdkRectangle *, gint *, gint *, gint *, gint *))fp)((GtkCellRenderer *)arg0, (GtkWidget *)arg1, (GdkRectangle *)lparg2, (gint *)lparg3, (gint *)lparg4, (gint *)lparg5, (gint *)lparg6);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseIntArrayElements(env, arg6, lparg6, 0);
 	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
@@ -8062,6 +8826,24 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1pixbuf_1new)
 }
 #endif
 
+#ifndef NO__1gtk_1cell_1renderer_1set_1fixed_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1set_1fixed_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
+/*
+	gtk_cell_renderer_set_fixed_size((GtkCellRenderer *)arg0, arg1, arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_cell_renderer_set_fixed_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkCellRenderer *, jint, jint))fp)((GtkCellRenderer *)arg0, arg1, arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1cell_1renderer_1set_1fixed_1size_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1cell_1renderer_1text_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1cell_1renderer_1text_1new)
 	(JNIEnv *env, jclass that)
@@ -8188,18 +8970,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1clipboard_1set_1can_1store)
 }
 #endif
 
-#ifndef NO__1gtk_1clipboard_1set_1with_1data
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1clipboard_1set_1with_1data)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jintLong arg5)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1clipboard_1set_1with_1data_FUNC);
-	rc = (jboolean)gtk_clipboard_set_with_data((GtkClipboard *)arg0, (const GtkTargetEntry *)arg1, (guint)arg2, (GtkClipboardGetFunc)arg3, (GtkClipboardClearFunc)arg4, (GObject *)arg5);
-	OS_NATIVE_EXIT(env, that, _1gtk_1clipboard_1set_1with_1data_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1clipboard_1set_1with_1owner
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1clipboard_1set_1with_1owner)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jintLong arg4, jintLong arg5)
@@ -8242,75 +9012,196 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1clipboard_1wait_1for_1contents)
 }
 #endif
 
-#ifndef NO__1gtk_1color_1selection_1dialog_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1dialog_1new)
-	(JNIEnv *env, jclass that, jbyteArray arg0)
+#ifndef NO__1gtk_1color_1chooser_1dialog_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1chooser_1dialog_1new)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1)
 {
 	jbyte *lparg0=NULL;
 	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1dialog_1new_FUNC);
 	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-	rc = (jintLong)gtk_color_selection_dialog_new((const gchar *)lparg0);
+/*
+	rc = (jintLong)gtk_color_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_chooser_dialog_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *, GtkWindow *))fp)((const gchar *)lparg0, (GtkWindow *)arg1);
+		}
+	}
 fail:
 	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1dialog_1new_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1gtk_1color_1selection_1get_1current_1color
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1get_1current_1color)
+#ifndef NO__1gtk_1color_1chooser_1get_1rgba
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1chooser_1get_1rgba)
 	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
 {
-	GdkColor _arg1, *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
-	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
-	gtk_color_selection_get_current_color((GtkColorSelection *)arg0, (GdkColor *)lparg1);
+	GdkRGBA _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1get_1rgba_FUNC);
+	if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	gtk_color_chooser_get_rgba(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_chooser_get_rgba)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkRGBA *))fp)(arg0, lparg1);
+		}
+	}
 fail:
-	if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
+	if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1get_1rgba_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1color_1selection_1palette_1from_1string
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1palette_1from_1string)
-	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jintArray arg2)
+#ifndef NO__1gtk_1color_1chooser_1set_1rgba
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1chooser_1set_1rgba)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
 {
-	jbyte *lparg0=NULL;
-	jint *lparg2=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1palette_1from_1string_FUNC);
-	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
-	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	gtk_color_selection_palette_from_string((const gchar *)lparg0, (GdkColor **)arg1, (gint *)lparg2);
+	GdkRGBA _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1set_1rgba_FUNC);
+	if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	gtk_color_chooser_set_rgba(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_chooser_set_rgba)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkRGBA *))fp)(arg0, lparg1);
+		}
+	}
 fail:
-	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1palette_1from_1string_FUNC);
+	if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1set_1rgba_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1color_1selection_1palette_1to_1string
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1palette_1to_1string)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+#ifndef NO__1gtk_1color_1chooser_1set_1use_1alpha
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1chooser_1set_1use_1alpha)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
-	rc = (jintLong)gtk_color_selection_palette_to_string((GdkColor *)arg0, (gint)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
-	return rc;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1chooser_1set_1use_1alpha_FUNC);
+/*
+	gtk_color_chooser_set_use_alpha(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_chooser_set_use_alpha)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1chooser_1set_1use_1alpha_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1color_1selection_1set_1current_1color
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1set_1current_1color)
-	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+#ifndef NO__1gtk_1color_1selection_1dialog_1get_1color_1selection
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1dialog_1get_1color_1selection)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	GdkColor _arg1, *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
-	if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
-	gtk_color_selection_set_current_color((GtkColorSelection *)arg0, (GdkColor *)lparg1);
-fail:
-	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC);
+/*
+	rc = (jintLong)gtk_color_selection_dialog_get_color_selection((GtkColorSelectionDialog *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_dialog_get_color_selection)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkColorSelectionDialog *))fp)((GtkColorSelectionDialog *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1color_1selection_1dialog_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1dialog_1new)
+	(JNIEnv *env, jclass that, jbyteArray arg0)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gtk_color_selection_dialog_new((const gchar *)lparg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_dialog_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1dialog_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1color_1selection_1get_1current_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1get_1current_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	GdkColor _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
+	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+/*
+	gtk_color_selection_get_current_color(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_get_current_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1get_1current_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1color_1selection_1palette_1to_1string
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1color_1selection_1palette_1to_1string)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
+/*
+	rc = (jintLong)gtk_color_selection_palette_to_string(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_palette_to_string)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1palette_1to_1string_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1color_1selection_1set_1current_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1set_1current_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	GdkColor _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
+	if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	gtk_color_selection_set_current_color(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_set_current_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1current_1color_FUNC);
 }
 #endif
 
@@ -8319,7 +9210,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1color_1selection_1set_1has_1palette)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gtk_1color_1selection_1set_1has_1palette_FUNC);
-	gtk_color_selection_set_has_palette((GtkColorSelection *)arg0, arg1);
+/*
+	gtk_color_selection_set_has_palette(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_color_selection_set_has_palette)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1color_1selection_1set_1has_1palette_FUNC);
 }
 #endif
@@ -8516,6 +9415,107 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1combo_1box_1set_1focus_1on_1click)
 }
 #endif
 
+#ifndef NO__1gtk_1combo_1box_1text_1insert
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1combo_1box_1text_1insert)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jbyteArray arg2, jbyteArray arg3)
+{
+	jbyte *lparg2=NULL;
+	jbyte *lparg3=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1insert_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
+	gtk_combo_box_text_insert(arg0, arg1, lparg2, lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_combo_box_text_insert)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jbyte *, jbyte *))fp)(arg0, arg1, lparg2, lparg3);
+		}
+	}
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1insert_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1combo_1box_1text_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1combo_1box_1text_1new)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1new_FUNC);
+/*
+	rc = (jintLong)gtk_combo_box_text_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_combo_box_text_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1combo_1box_1text_1new_1with_1entry
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1combo_1box_1text_1new_1with_1entry)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
+/*
+	rc = (jintLong)gtk_combo_box_text_new_with_entry();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_combo_box_text_new_with_entry)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1new_1with_1entry_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1combo_1box_1text_1remove
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1combo_1box_1text_1remove)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1remove_FUNC);
+/*
+	gtk_combo_box_text_remove(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_combo_box_text_remove)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1remove_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1combo_1box_1text_1remove_1all
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1combo_1box_1text_1remove_1all)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1combo_1box_1text_1remove_1all_FUNC);
+/*
+	gtk_combo_box_text_remove_all(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_combo_box_text_remove_all)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1combo_1box_1text_1remove_1all_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1container_1add
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1container_1add)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -8590,6 +9590,53 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1container_1set_1border_1width)
 }
 #endif
 
+#ifndef NO__1gtk_1css_1provider_1load_1from_1data
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1css_1provider_1load_1from_1data)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLong arg2, jintLongArray arg3)
+{
+	jbyte *lparg1=NULL;
+	jintLong *lparg3=NULL;
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1load_1from_1data_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
+	rc = (jboolean)gtk_css_provider_load_from_data(arg0, (const gchar *)lparg1, (gssize)arg2, (GError **)lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_css_provider_load_from_data)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, const gchar *, gssize, GError **))fp)(arg0, (const gchar *)lparg1, (gssize)arg2, (GError **)lparg3);
+		}
+	}
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0);
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1load_1from_1data_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1css_1provider_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1css_1provider_1new)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1css_1provider_1new_FUNC);
+/*
+	rc = (jintLong)gtk_css_provider_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_css_provider_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1css_1provider_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1dialog_1add_1button
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1dialog_1add_1button)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2)
@@ -8704,15 +9751,21 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1drag_1set_1icon_1pixbuf)
 }
 #endif
 
-#ifndef NO__1gtk_1drawing_1area_1new
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1drawing_1area_1new)
-	(JNIEnv *env, jclass that)
+#ifndef NO__1gtk_1drag_1set_1icon_1surface
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1drag_1set_1icon_1surface)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1drawing_1area_1new_FUNC);
-	rc = (jintLong)gtk_drawing_area_new();
-	OS_NATIVE_EXIT(env, that, _1gtk_1drawing_1area_1new_FUNC);
-	return rc;
+	OS_NATIVE_ENTER(env, that, _1gtk_1drag_1set_1icon_1surface_FUNC);
+/*
+	gtk_drag_set_icon_surface(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_drag_set_icon_surface)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1drag_1set_1icon_1surface_FUNC);
 }
 #endif
 
@@ -8756,18 +9809,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1editable_1delete_1text)
 }
 #endif
 
-#ifndef NO__1gtk_1editable_1get_1chars
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1editable_1get_1chars)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1editable_1get_1chars_FUNC);
-	rc = (jintLong)gtk_editable_get_chars((GtkEditable *)arg0, (gint)arg1, (gint)arg2);
-	OS_NATIVE_EXIT(env, that, _1gtk_1editable_1get_1chars_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1editable_1get_1editable
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1editable_1get_1editable)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -8868,6 +9909,30 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1editable_1set_1position)
 }
 #endif
 
+#ifndef NO__1gtk_1entry_1get_1icon_1area
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1entry_1get_1icon_1area)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GdkRectangle _arg2, *lparg2=NULL;
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1get_1icon_1area_FUNC);
+	if (arg2) if ((lparg2 = getGdkRectangleFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	rc = (jint)gtk_entry_get_icon_area((GtkEntry *)arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_entry_get_icon_area)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GtkEntry *, jint, GdkRectangle *))fp)((GtkEntry *)arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1get_1icon_1area_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1entry_1get_1inner_1border
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1entry_1get_1inner_1border)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -8977,16 +10042,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1entry_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1entry_1set_1activates_1default
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1activates_1default)
-	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1activates_1default_FUNC);
-	gtk_entry_set_activates_default((GtkEntry *)arg0, (gboolean)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1activates_1default_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1entry_1set_1alignment
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1alignment)
 	(JNIEnv *env, jclass that, jintLong arg0, jfloat arg1)
@@ -9075,6 +10130,28 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1max_1length)
 }
 #endif
 
+#ifndef NO__1gtk_1entry_1set_1placeholder_1text
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1placeholder_1text)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1placeholder_1text_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	gtk_entry_set_placeholder_text((GtkEntry *)arg0, (const gchar *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_entry_set_placeholder_text)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkEntry *, const gchar *))fp)((GtkEntry *)arg0, (const gchar *)lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1placeholder_1text_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1entry_1set_1text
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1text)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -9099,6 +10176,16 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1visibility)
 }
 #endif
 
+#ifndef NO__1gtk_1entry_1set_1width_1chars
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1entry_1set_1width_1chars)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1entry_1set_1width_1chars_FUNC);
+	gtk_entry_set_width_chars((GtkEntry *)arg0, (gint)arg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1entry_1set_1width_1chars_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1entry_1text_1index_1to_1layout_1index
 JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1entry_1text_1index_1to_1layout_1index)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -9137,18 +10224,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1enumerate_1printers)
 }
 #endif
 
-#ifndef NO__1gtk_1events_1pending
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1events_1pending)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1events_1pending_FUNC);
-	rc = (jint)gtk_events_pending();
-	OS_NATIVE_EXIT(env, that, _1gtk_1events_1pending_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1expander_1get_1expanded
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1expander_1get_1expanded)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -9169,26 +10244,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1expander_1get_1expanded)
 }
 #endif
 
-#ifndef NO__1gtk_1expander_1get_1label_1widget
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1expander_1get_1label_1widget)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1expander_1get_1label_1widget_FUNC);
-/*
-	rc = (jintLong)gtk_expander_get_label_widget(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_expander_get_label_widget)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1expander_1get_1label_1widget_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1expander_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1expander_1new)
 	(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -9231,28 +10286,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1expander_1set_1expanded)
 }
 #endif
 
-#ifndef NO__1gtk_1expander_1set_1label
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1expander_1set_1label)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
-{
-	jbyte *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1expander_1set_1label_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-/*
-	gtk_expander_set_label(arg0, (const gchar *)lparg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_expander_set_label)
-		if (fp) {
-			((void (CALLING_CONVENTION*)(jintLong, const gchar *))fp)(arg0, (const gchar *)lparg1);
-		}
-	}
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1expander_1set_1label_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1expander_1set_1label_1widget
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1expander_1set_1label_1widget)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -9289,26 +10322,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1file_1chooser_1add_1filter)
 }
 #endif
 
-#ifndef NO__1gtk_1file_1chooser_1get_1current_1folder
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1get_1current_1folder)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1file_1chooser_1get_1current_1folder_FUNC);
-/*
-	rc = (jintLong)gtk_file_chooser_get_current_folder(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_file_chooser_get_current_folder)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1file_1chooser_1get_1current_1folder_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1file_1chooser_1get_1filename
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1file_1chooser_1get_1filename)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -9712,18 +10725,100 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1fixed_1set_1has_1window)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gtk_1fixed_1set_1has_1window_FUNC);
-	gtk_fixed_set_has_window((GtkFixed *)arg0, (gboolean)arg1);
+/*
+	gtk_fixed_set_has_window(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_fixed_set_has_window)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1fixed_1set_1has_1window_FUNC);
 }
 #endif
 
+#ifndef NO__1gtk_1font_1chooser_1dialog_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1font_1chooser_1dialog_1new)
+	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1)
+{
+	jbyte *lparg0=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1dialog_1new_FUNC);
+	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gtk_font_chooser_dialog_new((const gchar *)lparg0, (GtkWindow *)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_chooser_dialog_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *, GtkWindow *))fp)((const gchar *)lparg0, (GtkWindow *)arg1);
+		}
+	}
+fail:
+	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1dialog_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1font_1chooser_1get_1font
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1font_1chooser_1get_1font)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1get_1font_FUNC);
+/*
+	rc = (jintLong)gtk_font_chooser_get_font(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_chooser_get_font)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1get_1font_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1font_1chooser_1set_1font
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1font_1chooser_1set_1font)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1font_1chooser_1set_1font_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	gtk_font_chooser_set_font(arg0, (const gchar *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_chooser_set_font)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, const gchar *))fp)(arg0, (const gchar *)lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1font_1chooser_1set_1font_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1font_1selection_1dialog_1get_1font_1name
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1font_1selection_1dialog_1get_1font_1name)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC);
-	rc = (jintLong)gtk_font_selection_dialog_get_font_name((GtkFontSelectionDialog *)arg0);
+/*
+	rc = (jintLong)gtk_font_selection_dialog_get_font_name(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_selection_dialog_get_font_name)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC);
 	return rc;
 }
@@ -9737,7 +10832,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1font_1selection_1dialog_1new)
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1new_FUNC);
 	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
 	rc = (jintLong)gtk_font_selection_dialog_new((const gchar *)lparg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_selection_dialog_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+		}
+	}
 fail:
 	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1new_FUNC);
@@ -9753,7 +10856,15 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1font_1selection_1dialog_1set_1font_1
 	jboolean rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC);
 	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	rc = (jboolean)gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)arg0, (const gchar *)lparg1);
+/*
+	rc = (jboolean)gtk_font_selection_dialog_set_font_name(arg0, (const gchar *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_font_selection_dialog_set_font_name)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, const gchar *))fp)(arg0, (const gchar *)lparg1);
+		}
+	}
 fail:
 	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC);
@@ -9789,20 +10900,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1frame_1set_1label
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1frame_1set_1label)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
-{
-	jbyte *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1frame_1set_1label_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	gtk_frame_set_label((GtkFrame *)arg0, (const gchar *)lparg1);
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1frame_1set_1label_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1frame_1set_1label_1widget
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1frame_1set_1label_1widget)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -9851,18 +10948,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1get_1current_1event_1time
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1get_1current_1event_1time)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1get_1current_1event_1time_FUNC);
-	rc = (jint)gtk_get_current_event_time();
-	OS_NATIVE_EXIT(env, that, _1gtk_1get_1current_1event_1time_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1get_1default_1language
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1get_1default_1language)
 	(JNIEnv *env, jclass that)
@@ -9887,16 +10972,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1get_1event_1widget)
 }
 #endif
 
-#ifndef NO__1gtk_1grab_1add
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1grab_1add)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1grab_1add_FUNC);
-	gtk_grab_add((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1grab_1add_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1grab_1get_1current
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1grab_1get_1current)
 	(JNIEnv *env, jclass that)
@@ -9909,23 +10984,21 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1grab_1get_1current)
 }
 #endif
 
-#ifndef NO__1gtk_1grab_1remove
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1grab_1remove)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1grab_1remove_FUNC);
-	gtk_grab_remove((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1grab_1remove_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1hbox_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hbox_1new)
 	(JNIEnv *env, jclass that, jboolean arg0, jint arg1)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1hbox_1new_FUNC);
+/*
 	rc = (jintLong)gtk_hbox_new((gboolean)arg0, (gint)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_hbox_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1hbox_1new_FUNC);
 	return rc;
 }
@@ -9937,7 +11010,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hscale_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1hscale_1new_FUNC);
+/*
 	rc = (jintLong)gtk_hscale_new((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_hscale_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1hscale_1new_FUNC);
 	return rc;
 }
@@ -9949,7 +11030,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hscrollbar_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1hscrollbar_1new_FUNC);
+/*
 	rc = (jintLong)gtk_hscrollbar_new((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_hscrollbar_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1hscrollbar_1new_FUNC);
 	return rc;
 }
@@ -9961,12 +11050,50 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hseparator_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1hseparator_1new_FUNC);
+/*
 	rc = (jintLong)gtk_hseparator_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_hseparator_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1hseparator_1new_FUNC);
 	return rc;
 }
 #endif
 
+#ifndef NO__1gtk_1hsv_1to_1rgb
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1hsv_1to_1rgb)
+	(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
+{
+	jdouble *lparg3=NULL;
+	jdouble *lparg4=NULL;
+	jdouble *lparg5=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1hsv_1to_1rgb_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gtk_hsv_to_rgb(arg0, arg1, arg2, lparg3, lparg4, lparg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_hsv_to_rgb)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jdouble, jdouble, jdouble, jdouble *, jdouble *, jdouble *))fp)(arg0, arg1, arg2, lparg3, lparg4, lparg5);
+		}
+	}
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
+	if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1hsv_1to_1rgb_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1icon_1factory_1lookup_1default
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1factory_1lookup_1default)
 	(JNIEnv *env, jclass that, jbyteArray arg0)
@@ -10031,12 +11158,40 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1set_1render_1icon)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1set_1render_1icon_FUNC);
+/*
 	rc = (jintLong)gtk_icon_set_render_icon((GtkIconSet *)arg0, (GtkStyle *)arg1, (GtkTextDirection)arg2, (GtkStateType)arg3, (GtkIconSize)arg4, (GtkWidget *)arg5, (const char *)arg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_icon_set_render_icon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkIconSet *, GtkStyle *, GtkTextDirection, GtkStateType, GtkIconSize, GtkWidget *, const char *))fp)((GtkIconSet *)arg0, (GtkStyle *)arg1, (GtkTextDirection)arg2, (GtkStateType)arg3, (GtkIconSize)arg4, (GtkWidget *)arg5, (const char *)arg6);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1set_1render_1icon_FUNC);
 	return rc;
 }
 #endif
 
+#ifndef NO__1gtk_1icon_1set_1render_1icon_1pixbuf
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1icon_1set_1render_1icon_1pixbuf)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1icon_1set_1render_1icon_1pixbuf_FUNC);
+/*
+	rc = (jintLong)gtk_icon_set_render_icon_pixbuf(arg0, arg1, arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_icon_set_render_icon_pixbuf)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint))fp)(arg0, arg1, arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1icon_1set_1render_1icon_1pixbuf_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1icon_1source_1free
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1icon_1source_1free)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -10278,15 +11433,21 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1image_1new_1from_1pixbuf)
 }
 #endif
 
-#ifndef NO__1gtk_1image_1new_1from_1pixmap
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1image_1new_1from_1pixmap)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+#ifndef NO__1gtk_1image_1set_1from_1gicon
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1image_1set_1from_1gicon)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1image_1new_1from_1pixmap_FUNC);
-	rc = (jintLong)gtk_image_new_from_pixmap((GdkPixmap *)arg0, (GdkBitmap *)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1image_1new_1from_1pixmap_FUNC);
-	return rc;
+	OS_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1gicon_FUNC);
+/*
+	gtk_image_set_from_gicon((GtkImage *)arg0, arg1, (GtkIconSize)arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_image_set_from_gicon)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkImage *, jintLong, GtkIconSize))fp)((GtkImage *)arg0, arg1, (GtkIconSize)arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1gicon_FUNC);
 }
 #endif
 
@@ -10300,16 +11461,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1image_1set_1from_1pixbuf)
 }
 #endif
 
-#ifndef NO__1gtk_1image_1set_1from_1pixmap
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1image_1set_1from_1pixmap)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1image_1set_1from_1pixmap_FUNC);
-	gtk_image_set_from_pixmap((GtkImage *)arg0, (GdkBitmap *)arg1, (GdkBitmap *)arg2);
-	OS_NATIVE_EXIT(env, that, _1gtk_1image_1set_1from_1pixmap_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1init_1check
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1init_1check)
 	(JNIEnv *env, jclass that, jintLongArray arg0, jintLongArray arg1)
@@ -10549,60 +11700,60 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1remove)
 }
 #endif
 
-#if (!defined(NO__1gtk_1list_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIIJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1list_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIII) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIII_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIIJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIII_FUNC);
 #endif
 	gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIII_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIIJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIII_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1list_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIJJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1list_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIJI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIJI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIJJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC);
 #endif
 	gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIJI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIJJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIJI_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J) && defined(JNI64))
+#if (!defined(NO__1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
 #endif
 {
 	GdkColor _arg3, *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #endif
 	if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail;
 	gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -10610,44 +11761,44 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1list_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIZJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1list_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJIZI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__IIIZI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIZJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC);
 #endif
 	gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__IIIZI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIZJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJIZI_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1list_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJI_3BJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1list_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1list_1store_1set__JJI_3BI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJI_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1list_1store_1set__JJI_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4)
 #endif
 {
 	jbyte *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__III_3BI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJI_3BJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC);
 #endif
 	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	gtk_list_store_set((GtkListStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -10656,7 +11807,7 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__III_3BI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJI_3BJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1list_1store_1set__JJI_3BI_FUNC);
 #endif
 }
 #endif
@@ -10681,18 +11832,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1main_1do_1event)
 }
 #endif
 
-#ifndef NO__1gtk_1main_1iteration
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1main_1iteration)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1main_1iteration_FUNC);
-	rc = (jint)gtk_main_iteration();
-	OS_NATIVE_EXIT(env, that, _1gtk_1main_1iteration_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1major_1version
 JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1major_1version)
 	(JNIEnv *env, jclass that)
@@ -10717,18 +11856,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1menu_1bar_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1menu_1get_1attach_1widget
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1menu_1get_1attach_1widget)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1menu_1get_1attach_1widget_FUNC);
-	rc = (jintLong)gtk_menu_get_attach_widget((GtkMenu *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1menu_1get_1attach_1widget_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1menu_1item_1get_1submenu
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1menu_1item_1get_1submenu)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -10821,16 +11948,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1menu_1shell_1insert)
 }
 #endif
 
-#ifndef NO__1gtk_1menu_1shell_1select_1item
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1menu_1shell_1select_1item)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1menu_1shell_1select_1item_FUNC);
-	gtk_menu_shell_select_item((GtkMenuShell *)arg0, (GtkWidget *)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1menu_1shell_1select_1item_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1menu_1shell_1set_1take_1focus
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1menu_1shell_1set_1take_1focus)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -11044,7 +12161,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1object_1sink)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	OS_NATIVE_ENTER(env, that, _1gtk_1object_1sink_FUNC);
-	gtk_object_sink((GtkObject *)arg0);
+/*
+	gtk_object_sink(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_object_sink)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1object_1sink_FUNC);
 }
 #endif
@@ -11404,7 +12529,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1arrow)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1arrow_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_arrow((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12);
+/*
+	gtk_paint_arrow(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_arrow)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jboolean, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11421,7 +12554,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1box)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1box_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_box((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+	gtk_paint_box(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_box)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11438,8 +12579,16 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1box_1gap)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1box_1gap_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_box_gap((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
-fail:
+/*
+	gtk_paint_box_gap(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_box_gap)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, gchar *, jint, jint, jint, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
+		}
+	}
+fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
 	OS_NATIVE_EXIT(env, that, _1gtk_1paint_1box_1gap_FUNC);
@@ -11455,7 +12604,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1check)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1check_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_check((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+	gtk_paint_check(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_check)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11472,7 +12629,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1expander)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1expander_FUNC);
 	if (arg3) if ((lparg3 = getGdkRectangleFields(env, arg3, &_arg3)) == NULL) goto fail;
 	if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	gtk_paint_expander((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+/*
+	gtk_paint_expander(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_expander)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+		}
+	}
 fail:
 	if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
 	if (arg3 && lparg3) setGdkRectangleFields(env, arg3, lparg3);
@@ -11489,7 +12654,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1extension)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1extension_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_extension((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+/*
+	gtk_paint_extension(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_extension)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, gchar *, jint, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11506,7 +12679,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1flat_1box)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1flat_1box_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_flat_box((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+	gtk_paint_flat_box(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_flat_box)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11523,7 +12704,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1focus)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1focus_FUNC);
 	if (arg3) if ((lparg3 = getGdkRectangleFields(env, arg3, &_arg3)) == NULL) goto fail;
 	if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	gtk_paint_focus((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8, arg9);
+/*
+	gtk_paint_focus(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8, arg9);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_focus)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8, arg9);
+		}
+	}
 fail:
 	if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1paint_1focus_FUNC);
@@ -11539,7 +12728,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1handle)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1handle_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_handle((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+/*
+	gtk_paint_handle(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_handle)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1paint_1handle_FUNC);
@@ -11555,7 +12752,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1hline)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1hline_FUNC);
 	if (arg3) if ((lparg3 = getGdkRectangleFields(env, arg3, &_arg3)) == NULL) goto fail;
 	if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	gtk_paint_hline((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+/*
+	gtk_paint_hline(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_hline)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+		}
+	}
 fail:
 	if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
 	if (arg3 && lparg3) setGdkRectangleFields(env, arg3, lparg3);
@@ -11572,7 +12777,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1layout)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1layout_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_layout((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, (PangoLayout *)arg9);
+/*
+	gtk_paint_layout(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, (PangoLayout *)arg9);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_layout)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jboolean, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, PangoLayout *))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, (PangoLayout *)arg9);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11589,7 +12802,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1option)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1option_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_option((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+	gtk_paint_option(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_option)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11606,7 +12827,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1shadow)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1shadow_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_shadow((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10);
+/*
+	gtk_paint_shadow(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_shadow)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, gchar *, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11623,7 +12852,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1shadow_1gap)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1shadow_1gap_FUNC);
 	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_shadow_gap((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
+/*
+	gtk_paint_shadow_gap(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_shadow_gap)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint, GdkRectangle *, GtkWidget *, gchar *, jint, jint, jint, jint, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (gchar *)lparg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
@@ -11631,40 +12868,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1paint_1slider
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1slider)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jintLong arg5, jbyteArray arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11)
-{
-	GdkRectangle _arg4, *lparg4=NULL;
-	jbyte *lparg6=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1slider_FUNC);
-	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
-	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_slider((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10, arg11);
-fail:
-	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
-	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
-	OS_NATIVE_EXIT(env, that, _1gtk_1paint_1slider_FUNC);
-}
-#endif
-
-#ifndef NO__1gtk_1paint_1tab
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1tab)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jobject arg4, jintLong arg5, jbyteArray arg6, jint arg7, jint arg8, jint arg9, jint arg10)
-{
-	GdkRectangle _arg4, *lparg4=NULL;
-	jbyte *lparg6=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1tab_FUNC);
-	if (arg4) if ((lparg4 = getGdkRectangleFields(env, arg4, &_arg4)) == NULL) goto fail;
-	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	gtk_paint_tab((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, arg3, lparg4, (GtkWidget *)arg5, (const gchar *)lparg6, arg7, arg8, arg9, arg10);
-fail:
-	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
-	if (arg4 && lparg4) setGdkRectangleFields(env, arg4, lparg4);
-	OS_NATIVE_EXIT(env, that, _1gtk_1paint_1tab_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1paint_1vline
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1vline)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4, jbyteArray arg5, jint arg6, jint arg7, jint arg8)
@@ -11674,7 +12877,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1paint_1vline)
 	OS_NATIVE_ENTER(env, that, _1gtk_1paint_1vline_FUNC);
 	if (arg3) if ((lparg3 = getGdkRectangleFields(env, arg3, &_arg3)) == NULL) goto fail;
 	if (arg5) if ((lparg5 = (*env)->GetByteArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	gtk_paint_vline((GtkStyle *)arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+/*
+	gtk_paint_vline(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_paint_vline)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, GdkRectangle *, GtkWidget *, const gchar *, jint, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, lparg3, (GtkWidget *)arg4, (const gchar *)lparg5, arg6, arg7, arg8);
+		}
+	}
 fail:
 	if (arg5 && lparg5) (*env)->ReleaseByteArrayElements(env, arg5, lparg5, 0);
 	if (arg3 && lparg3) setGdkRectangleFields(env, arg3, lparg3);
@@ -11922,66 +13133,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1plug_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1print_1job_1get_1printer
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1job_1get_1printer)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1job_1get_1printer_FUNC);
-/*
-	rc = (jintLong)gtk_print_job_get_printer(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_job_get_printer)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1job_1get_1printer_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1print_1job_1get_1settings
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1job_1get_1settings)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1job_1get_1settings_FUNC);
-/*
-	rc = (jintLong)gtk_print_job_get_settings(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_job_get_settings)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1job_1get_1settings_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1print_1job_1get_1status
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1job_1get_1status)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1job_1get_1status_FUNC);
-/*
-	rc = (jint)gtk_print_job_get_status(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_job_get_status)
-		if (fp) {
-			rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1job_1get_1status_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1job_1get_1surface
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1job_1get_1surface)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
@@ -12006,26 +13157,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1print_1job_1get_1title
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1job_1get_1title)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1job_1get_1title_FUNC);
-/*
-	rc = (jintLong)gtk_print_job_get_title(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_job_get_title)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1job_1get_1title_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1job_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1job_1new)
 	(JNIEnv *env, jclass that, jbyteArray arg0, jintLong arg1, jintLong arg2, jintLong arg3)
@@ -12068,33 +13199,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1job_1send)
 }
 #endif
 
-#ifndef NO__1gtk_1print_1job_1set_1source_1file
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1print_1job_1set_1source_1file)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLongArray arg2)
-{
-	jbyte *lparg1=NULL;
-	jintLong *lparg2=NULL;
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1job_1set_1source_1file_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail;
-/*
-	rc = (jboolean)gtk_print_job_set_source_file(arg0, (const gchar *)lparg1, (GError **)lparg2);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_job_set_source_file)
-		if (fp) {
-			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, const gchar *, GError **))fp)(arg0, (const gchar *)lparg1, (GError **)lparg2);
-		}
-	}
-fail:
-	if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0);
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1job_1set_1source_1file_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1settings_1foreach
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1print_1settings_1foreach)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -12197,26 +13301,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1n_1copies)
 }
 #endif
 
-#ifndef NO__1gtk_1print_1settings_1get_1orientation
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1orientation)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1orientation_FUNC);
-/*
-	rc = (jint)gtk_print_settings_get_orientation(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_settings_get_orientation)
-		if (fp) {
-			rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1orientation_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1settings_1get_1page_1ranges
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1page_1ranges)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1)
@@ -12241,46 +13325,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1print_1settings_1get_1paper_1height
-JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1paper_1height)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
-	jdouble rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1paper_1height_FUNC);
-/*
-	rc = (jdouble)gtk_print_settings_get_paper_height(arg0, arg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_settings_get_paper_height)
-		if (fp) {
-			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1paper_1height_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1print_1settings_1get_1paper_1width
-JNIEXPORT jdouble JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1paper_1width)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
-	jdouble rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1paper_1width_FUNC);
-/*
-	rc = (jdouble)gtk_print_settings_get_paper_width(arg0, arg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_settings_get_paper_width)
-		if (fp) {
-			rc = (jdouble)((jdouble (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1paper_1width_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1settings_1get_1print_1pages
 JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1print_1pages)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -12301,26 +13345,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1print_1pages)
 }
 #endif
 
-#ifndef NO__1gtk_1print_1settings_1get_1printer
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1printer)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1print_1settings_1get_1printer_FUNC);
-/*
-	rc = (jintLong)gtk_print_settings_get_printer(arg0);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_print_settings_get_printer)
-		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1print_1settings_1get_1printer_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1print_1settings_1get_1resolution
 JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1print_1settings_1get_1resolution)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -12806,12 +13830,38 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1progress_1bar_1set_1fraction)
 }
 #endif
 
+#ifndef NO__1gtk_1progress_1bar_1set_1inverted
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1progress_1bar_1set_1inverted)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1set_1inverted_FUNC);
+/*
+	gtk_progress_bar_set_inverted((GtkProgressBar *)arg0, (gboolean)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_progress_bar_set_inverted)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkProgressBar *, gboolean))fp)((GtkProgressBar *)arg0, (gboolean)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1set_1inverted_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1progress_1bar_1set_1orientation
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1progress_1bar_1set_1orientation)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
 {
 	OS_NATIVE_ENTER(env, that, _1gtk_1progress_1bar_1set_1orientation_FUNC);
-	gtk_progress_bar_set_orientation((GtkProgressBar *)arg0, (GtkProgressBarOrientation)arg1);
+/*
+	gtk_progress_bar_set_orientation((GtkProgressBar *)arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_progress_bar_set_orientation)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkProgressBar *, jint))fp)((GtkProgressBar *)arg0, arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1progress_1bar_1set_1orientation_FUNC);
 }
 #endif
@@ -12892,11 +13942,36 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1range_1get_1adjustment)
 }
 #endif
 
-#ifndef NO__1gtk_1range_1set_1increments
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1range_1set_1increments)
-	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jdouble arg2)
+#ifndef NO__1gtk_1range_1get_1slider_1range
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1range_1get_1slider_1range)
+	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1range_1set_1increments_FUNC);
+	jint *lparg1=NULL;
+	jint *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1range_1get_1slider_1range_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+/*
+	gtk_range_get_slider_range((GtkRange *)arg0, (gint *)lparg1, (gint *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_range_get_slider_range)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkRange *, gint *, gint *))fp)((GtkRange *)arg0, (gint *)lparg1, (gint *)lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1range_1get_1slider_1range_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1range_1set_1increments
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1range_1set_1increments)
+	(JNIEnv *env, jclass that, jintLong arg0, jdouble arg1, jdouble arg2)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1range_1set_1increments_FUNC);
 	gtk_range_set_increments((GtkRange *)arg0, arg1, arg2);
 	OS_NATIVE_EXIT(env, that, _1gtk_1range_1set_1increments_FUNC);
 }
@@ -12939,7 +14014,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1rc_1parse_1string)
 	jbyte *lparg0=NULL;
 	OS_NATIVE_ENTER(env, that, _1gtk_1rc_1parse_1string_FUNC);
 	if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
+/*
 	gtk_rc_parse_string((const gchar *)lparg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_rc_parse_string)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(const gchar *))fp)((const gchar *)lparg0);
+		}
+	}
 fail:
 	if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1rc_1parse_1string_FUNC);
@@ -13029,6 +14112,272 @@ fail:
 }
 #endif
 
+#ifndef NO__1gtk_1render_1arrow
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1arrow)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1arrow_FUNC);
+/*
+	gtk_render_arrow(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_arrow)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, jdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1arrow_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1background
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1background)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1background_FUNC);
+/*
+	gtk_render_background(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_background)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1background_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1check
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1check)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1check_FUNC);
+/*
+	gtk_render_check(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_check)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1check_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1expander
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1expander)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1expander_FUNC);
+/*
+	gtk_render_expander(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_expander)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1expander_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1extension
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1extension)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jint arg6)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1extension_FUNC);
+/*
+	gtk_render_extension(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5, (GtkPositionType)arg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_extension)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble, GtkPositionType))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5, (GtkPositionType)arg6);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1extension_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1focus
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1focus)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1focus_FUNC);
+/*
+	gtk_render_focus(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_focus)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1focus_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1frame
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1frame)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1frame_FUNC);
+/*
+	gtk_render_frame(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_frame)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1frame_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1frame_1gap
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1frame_1gap)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5, jint arg6, jdouble arg7, jdouble arg8)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1frame_1gap_FUNC);
+/*
+	gtk_render_frame_gap(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5, arg6, (gdouble)arg7, (gdouble)arg8);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_frame_gap)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble, jint, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5, arg6, (gdouble)arg7, (gdouble)arg8);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1frame_1gap_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1handle
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1handle)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1handle_FUNC);
+/*
+	gtk_render_handle(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_handle)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1handle_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1layout
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1layout)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jintLong arg4)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1layout_FUNC);
+/*
+	gtk_render_layout(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (PangoLayout *)arg4);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_layout)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, PangoLayout *))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (PangoLayout *)arg4);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1layout_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1line
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1line)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1line_FUNC);
+/*
+	gtk_render_line(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_line)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1line_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1render_1option
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1render_1option)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3, jdouble arg4, jdouble arg5)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1render_1option_FUNC);
+/*
+	gtk_render_option(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_render_option)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, gdouble, gdouble, gdouble, gdouble))fp)(arg0, arg1, (gdouble)arg2, (gdouble)arg3, (gdouble)arg4, (gdouble)arg5);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1render_1option_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1rgb_1to_1hsv
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1rgb_1to_1hsv)
+	(JNIEnv *env, jclass that, jdouble arg0, jdouble arg1, jdouble arg2, jdoubleArray arg3, jdoubleArray arg4, jdoubleArray arg5)
+{
+	jdouble *lparg3=NULL;
+	jdouble *lparg4=NULL;
+	jdouble *lparg5=NULL;
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1rgb_1to_1hsv_FUNC);
+	if (arg3) if ((lparg3 = (*env)->GetDoubleArrayElements(env, arg3, NULL)) == NULL) goto fail;
+	if (arg4) if ((lparg4 = (*env)->GetDoubleArrayElements(env, arg4, NULL)) == NULL) goto fail;
+	if (arg5) if ((lparg5 = (*env)->GetDoubleArrayElements(env, arg5, NULL)) == NULL) goto fail;
+/*
+	rc = (jintLong)gtk_rgb_to_hsv(arg0, arg1, arg2, lparg3, lparg4, lparg5);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_rgb_to_hsv)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jdouble, jdouble, jdouble, jdouble *, jdouble *, jdouble *))fp)(arg0, arg1, arg2, lparg3, lparg4, lparg5);
+		}
+	}
+fail:
+	if (arg5 && lparg5) (*env)->ReleaseDoubleArrayElements(env, arg5, lparg5, 0);
+	if (arg4 && lparg4) (*env)->ReleaseDoubleArrayElements(env, arg4, lparg4, 0);
+	if (arg3 && lparg3) (*env)->ReleaseDoubleArrayElements(env, arg3, lparg3, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1rgb_1to_1hsv_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1scale_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scale_1new)
+	(JNIEnv *env, jclass that, jint arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1scale_1new_FUNC);
+/*
+	rc = (jintLong)gtk_scale_new((GtkOrientation)arg0, (GtkAdjustment *)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_scale_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, GtkAdjustment *))fp)((GtkOrientation)arg0, (GtkAdjustment *)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1scale_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1scale_1set_1digits
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scale_1set_1digits)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -13049,6 +14398,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scale_1set_1draw_1value)
 }
 #endif
 
+#ifndef NO__1gtk_1scrollbar_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrollbar_1new)
+	(JNIEnv *env, jclass that, jint arg0, jintLong arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1scrollbar_1new_FUNC);
+/*
+	rc = (jintLong)gtk_scrollbar_new((GtkOrientation)arg0, (GtkAdjustment *)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_scrollbar_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation, GtkAdjustment *))fp)((GtkOrientation)arg0, (GtkAdjustment *)arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1scrollbar_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1scrolled_1window_1add_1with_1viewport
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1add_1with_1viewport)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -13071,6 +14440,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1get_1hadjustment)
 }
 #endif
 
+#ifndef NO__1gtk_1scrolled_1window_1get_1hscrollbar
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1get_1hscrollbar)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
+/*
+	rc = (jintLong)gtk_scrolled_window_get_hscrollbar((GtkScrolledWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_scrolled_window_get_hscrollbar)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkScrolledWindow *))fp)((GtkScrolledWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1hscrollbar_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1scrolled_1window_1get_1policy
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1get_1policy)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
@@ -13112,6 +14501,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1get_1vadjustment)
 }
 #endif
 
+#ifndef NO__1gtk_1scrolled_1window_1get_1vscrollbar
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1get_1vscrollbar)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
+/*
+	rc = (jintLong)gtk_scrolled_window_get_vscrollbar((GtkScrolledWindow *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_scrolled_window_get_vscrollbar)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkScrolledWindow *))fp)((GtkScrolledWindow *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1get_1vscrollbar_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1scrolled_1window_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1new)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -13124,16 +14533,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1scrolled_1window_1set_1placement
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1set_1placement)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1set_1placement_FUNC);
-	gtk_scrolled_window_set_placement((GtkScrolledWindow *)arg0, (GtkCornerType)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1set_1placement_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1scrolled_1window_1set_1policy
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1set_1policy)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
@@ -13164,6 +14563,106 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1selection_1data_1free)
 }
 #endif
 
+#ifndef NO__1gtk_1selection_1data_1get_1data
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1data)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
+/*
+	rc = (jintLong)gtk_selection_data_get_data((GtkSelectionData *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_selection_data_get_data)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1data_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1data_1type)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
+/*
+	rc = (jintLong)gtk_selection_data_get_data_type((GtkSelectionData *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_selection_data_get_data_type)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1data_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1format
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1format)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
+/*
+	rc = (jint)gtk_selection_data_get_format((GtkSelectionData *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_selection_data_get_format)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1format_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1length
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1length)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
+/*
+	rc = (jint)gtk_selection_data_get_length((GtkSelectionData *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_selection_data_get_length)
+		if (fp) {
+			rc = (jint)((jint (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1length_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1selection_1data_1get_1target
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1selection_1data_1get_1target)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
+/*
+	rc = (jintLong)gtk_selection_data_get_target((GtkSelectionData *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_selection_data_get_target)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkSelectionData *))fp)((GtkSelectionData *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1selection_1data_1get_1target_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1selection_1data_1set
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1selection_1data_1set)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4)
@@ -13186,6 +14685,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1separator_1menu_1item_1new)
 }
 #endif
 
+#ifndef NO__1gtk_1separator_1new
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1separator_1new)
+	(JNIEnv *env, jclass that, jint arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1separator_1new_FUNC);
+/*
+	rc = (jintLong)gtk_separator_new((GtkOrientation)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_separator_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkOrientation))fp)((GtkOrientation)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1separator_1new_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1separator_1tool_1item_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1separator_1tool_1item_1new)
 	(JNIEnv *env, jclass that)
@@ -13438,89 +14957,349 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1status_1icon_1get_1visible)
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1status_1icon_1new)
 	(JNIEnv *env, jclass that)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1new_FUNC);
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1new_FUNC);
+/*
+	rc = (jintLong)gtk_status_icon_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_status_icon_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1new_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1status_1icon_1position_1menu_1func
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1status_1icon_1position_1menu_1func)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
+	rc = (jintLong)gtk_status_icon_position_menu_func();
+	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1status_1icon_1set_1from_1pixbuf
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1from_1pixbuf)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+/*
+	gtk_status_icon_set_from_pixbuf(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_from_pixbuf)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1status_1icon_1set_1tooltip
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1tooltip)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1tooltip_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	gtk_status_icon_set_tooltip(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_tooltip)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1tooltip_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1status_1icon_1set_1visible
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1visible)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
+/*
+	gtk_status_icon_set_visible(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_visible)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1add_1class
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1add_1class)
+	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+{
+	jbyte *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+/*
+	gtk_style_context_add_class(arg0, lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_add_class)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1class_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1add_1provider
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1add_1provider)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1provider_FUNC);
+/*
+	gtk_style_context_add_provider(arg0, arg1, (guint)arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_add_provider)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong, guint))fp)(arg0, arg1, (guint)arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1provider_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1add_1provider_1for_1screen
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1add_1provider_1for_1screen)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+/*
+	gtk_style_context_add_provider_for_screen((GdkScreen *)arg0, arg1, (guint)arg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_add_provider_for_screen)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GdkScreen *, jintLong, guint))fp)((GdkScreen *)arg0, arg1, (guint)arg2);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1add_1provider_1for_1screen_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1background_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1background_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GdkRGBA _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
+	if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_style_context_get_background_color(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_background_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1background_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1border
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1border)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GtkBorder _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1border_FUNC);
+	if (arg2) if ((lparg2 = getGtkBorderFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_style_context_get_border(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_border)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GtkBorder *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1border_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1border_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1border_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GdkRGBA _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1border_1color_FUNC);
+	if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_style_context_get_border_color(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_border_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1border_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GdkRGBA _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1color_FUNC);
+	if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_style_context_get_color(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1font
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1font)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1font_FUNC);
+/*
+	rc = (jintLong)gtk_style_context_get_font(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_font)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1font_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1style_1context_1get_1padding
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1get_1padding)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GtkBorder _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1get_1padding_FUNC);
+	if (arg2) if ((lparg2 = getGtkBorderFields(env, arg2, &_arg2)) == NULL) goto fail;
 /*
-	rc = (jintLong)gtk_status_icon_new();
+	gtk_style_context_get_padding(arg0, arg1, lparg2);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gtk_status_icon_new)
+		OS_LOAD_FUNCTION(fp, gtk_style_context_get_padding)
 		if (fp) {
-			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+			((void (CALLING_CONVENTION*)(jintLong, jint, GtkBorder *))fp)(arg0, arg1, lparg2);
 		}
 	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1new_FUNC);
-	return rc;
+fail:
+	if (arg2 && lparg2) setGtkBorderFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1get_1padding_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1status_1icon_1position_1menu_1func
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1status_1icon_1position_1menu_1func)
-	(JNIEnv *env, jclass that)
+#ifndef NO__1gtk_1style_1context_1invalidate
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1invalidate)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
-	rc = (jintLong)gtk_status_icon_position_menu_func();
-	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1position_1menu_1func_FUNC);
-	return rc;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1invalidate_FUNC);
+/*
+	gtk_style_context_invalidate(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_context_invalidate)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1invalidate_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1status_1icon_1set_1from_1pixbuf
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1from_1pixbuf)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+#ifndef NO__1gtk_1style_1context_1restore
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1restore)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1restore_FUNC);
 /*
-	gtk_status_icon_set_from_pixbuf(arg0, arg1);
+	gtk_style_context_restore(arg0);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_from_pixbuf)
+		OS_LOAD_FUNCTION(fp, gtk_style_context_restore)
 		if (fp) {
-			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
 		}
 	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1from_1pixbuf_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1restore_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1status_1icon_1set_1tooltip
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1tooltip)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
+#ifndef NO__1gtk_1style_1context_1save
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1save)
+	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	jbyte *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1tooltip_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1save_FUNC);
 /*
-	gtk_status_icon_set_tooltip(arg0, lparg1);
+	gtk_style_context_save(arg0);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_tooltip)
+		OS_LOAD_FUNCTION(fp, gtk_style_context_save)
 		if (fp) {
-			((void (CALLING_CONVENTION*)(jintLong, jbyte *))fp)(arg0, lparg1);
+			((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
 		}
 	}
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1tooltip_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1save_FUNC);
 }
 #endif
 
-#ifndef NO__1gtk_1status_1icon_1set_1visible
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1status_1icon_1set_1visible)
-	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+#ifndef NO__1gtk_1style_1context_1set_1state
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1style_1context_1set_1state)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1style_1context_1set_1state_FUNC);
 /*
-	gtk_status_icon_set_visible(arg0, arg1);
+	gtk_style_context_set_state(arg0, arg1);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gtk_status_icon_set_visible)
+		OS_LOAD_FUNCTION(fp, gtk_style_context_set_state)
 		if (fp) {
-			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
 		}
 	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1status_1icon_1set_1visible_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1style_1context_1set_1state_FUNC);
 }
 #endif
 
@@ -13792,7 +15571,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1style_1render_1icon)
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1style_1render_1icon_FUNC);
 	if (arg6) if ((lparg6 = (*env)->GetByteArrayElements(env, arg6, NULL)) == NULL) goto fail;
-	rc = (jintLong)gtk_style_render_icon((GtkStyle *)arg0, (GtkIconSource *)arg1, arg2, arg3, arg4, (GtkWidget *)arg5, (const gchar *)lparg6);
+/*
+	rc = (jintLong)gtk_style_render_icon(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_style_render_icon)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint, jint, jintLong, jbyte *))fp)(arg0, arg1, arg2, arg3, arg4, arg5, lparg6);
+		}
+	}
 fail:
 	if (arg6 && lparg6) (*env)->ReleaseByteArrayElements(env, arg6, lparg6, 0);
 	OS_NATIVE_EXIT(env, that, _1gtk_1style_1render_1icon_FUNC);
@@ -13876,18 +15663,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1text_1buffer_1get_1char_1count
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1text_1buffer_1get_1char_1count)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1text_1buffer_1get_1char_1count_FUNC);
-	rc = (jint)gtk_text_buffer_get_char_count((GtkTextBuffer *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1text_1buffer_1get_1char_1count_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1text_1buffer_1get_1end_1iter
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1buffer_1get_1end_1iter)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -14352,23 +16127,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1set_1wrap_1mode)
 }
 #endif
 
-#ifndef NO__1gtk_1text_1view_1window_1to_1buffer_1coords
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1text_1view_1window_1to_1buffer_1coords)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jintArray arg4, jintArray arg5)
-{
-	jint *lparg4=NULL;
-	jint *lparg5=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1text_1view_1window_1to_1buffer_1coords_FUNC);
-	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
-	if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail;
-	gtk_text_view_window_to_buffer_coords((GtkTextView *)arg0, (GtkTextWindowType)arg1, (gint)arg2, (gint)arg3, (gint *)lparg4, (gint *)lparg5);
-fail:
-	if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0);
-	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1text_1view_1window_1to_1buffer_1coords_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1toggle_1button_1get_1active
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1toggle_1button_1get_1active)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -14381,18 +16139,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1toggle_1button_1get_1active)
 }
 #endif
 
-#ifndef NO__1gtk_1toggle_1button_1get_1inconsistent
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1toggle_1button_1get_1inconsistent)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1toggle_1button_1get_1inconsistent_FUNC);
-	rc = (jboolean)gtk_toggle_button_get_inconsistent((GtkToggleButton *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1toggle_1button_1get_1inconsistent_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1toggle_1button_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1toggle_1button_1new)
 	(JNIEnv *env, jclass that)
@@ -14591,23 +16337,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1insert)
 }
 #endif
 
-#ifndef NO__1gtk_1toolbar_1insert_1widget
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1insert_1widget)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jbyteArray arg2, jbyteArray arg3, jint arg4)
-{
-	jbyte *lparg2=NULL;
-	jbyte *lparg3=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1toolbar_1insert_1widget_FUNC);
-	if (arg2) if ((lparg2 = (*env)->GetByteArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
-	gtk_toolbar_insert_widget((GtkToolbar *)arg0, (GtkWidget *)arg1, (const char *)lparg2, (const char *)lparg3, (gint)arg4);
-fail:
-	if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0);
-	if (arg2 && lparg2) (*env)->ReleaseByteArrayElements(env, arg2, lparg2, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1toolbar_1insert_1widget_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1toolbar_1new
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1toolbar_1new)
 	(JNIEnv *env, jclass that)
@@ -14620,6 +16349,16 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1toolbar_1new)
 }
 #endif
 
+#ifndef NO__1gtk_1toolbar_1set_1icon_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1set_1icon_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
+	gtk_toolbar_set_icon_size((GtkToolbar *)arg0, arg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1toolbar_1set_1icon_1size_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1toolbar_1set_1orientation
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1toolbar_1set_1orientation)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -14738,7 +16477,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tooltips_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1tooltips_1new_FUNC);
+/*
 	rc = (jintLong)gtk_tooltips_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_tooltips_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1tooltips_1new_FUNC);
 	return rc;
 }
@@ -14769,18 +16516,18 @@ fail:
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1model_1get__III_3II) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3IJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1model_1get__III_3II) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3II) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3IJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintArray arg3, jint arg4)
 #endif
 {
 	jint *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__III_3II_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3IJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC);
 #endif
 	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -14789,23 +16536,23 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__III_3II_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3IJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3II_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1model_1get__III_3JI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3JJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1model_1get__III_3JI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1model_1get__JJI_3JI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__III_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3JJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1model_1get__JJI_3JI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlongArray arg3, jint arg4)
 #endif
 {
 	jlong *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__III_3JI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3JJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC);
 #endif
 	if (arg3) if ((lparg3 = (*env)->GetLongArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	gtk_tree_model_get((GtkTreeModel *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -14814,7 +16561,7 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__III_3JI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3JJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1model_1get__JJI_3JI_FUNC);
 #endif
 }
 #endif
@@ -14949,16 +16696,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1path_1compare)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1path_1down
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1path_1down)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1down_FUNC);
-	gtk_tree_path_down((GtkTreePath *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1down_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1tree_1path_1free
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1path_1free)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -15005,18 +16742,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1path_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1path_1new_1first
-JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1path_1new_1first)
-	(JNIEnv *env, jclass that)
-{
-	jintLong rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1path_1new_1first_FUNC);
-	rc = (jintLong)gtk_tree_path_new_first();
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1path_1new_1first_FUNC);
-	return rc;
-}
-#endif
-
 #if (!defined(NO__1gtk_1tree_1path_1new_1from_1string__I) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1path_1new_1from_1string__J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1path_1new_1from_1string__I)(JNIEnv *env, jclass that, jintLong arg0)
@@ -15110,22 +16835,6 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1tree_1selection_1count_1selected_1rows)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1selection_1get_1selected
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1tree_1selection_1get_1selected)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLong arg2)
-{
-	jintLong *lparg1=NULL;
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1get_1selected_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	rc = (jboolean)gtk_tree_selection_get_selected((GtkTreeSelection *)arg0, (GtkTreeModel **)lparg1, (GtkTreeIter *)arg2);
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1get_1selected_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1tree_1selection_1get_1selected_1rows
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1selection_1get_1selected_1rows)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
@@ -15182,16 +16891,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1selection_1select_1iter)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1selection_1selected_1foreach
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1selection_1selected_1foreach)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1selection_1selected_1foreach_FUNC);
-	gtk_tree_selection_selected_foreach((GtkTreeSelection *)arg0, (GtkTreeSelectionForeachFunc)arg1, (gpointer)arg2);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1selection_1selected_1foreach_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1tree_1selection_1set_1mode
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1selection_1set_1mode)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -15278,60 +16977,60 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1remove)
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIIJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1store_1set__IIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIII) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIIJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIII_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIIJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC);
 #endif
 	gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIII_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIIJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIII_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIJJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1store_1set__IIIJI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIJI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIJJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIJI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jlong arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIJI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIJJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC);
 #endif
 	gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIJI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIJJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIJI_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jobject arg3, jint arg4)
 #endif
 {
 	GdkColor _arg3, *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #endif
 	if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail;
 	gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -15339,44 +17038,44 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIZJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1store_1set__IIIZI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJIZI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__IIIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIZJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJIZI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4)
 #endif
 {
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__IIIZI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIZJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC);
 #endif
 	gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, arg3, arg4);
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__IIIZI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIZJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJIZI_FUNC);
 #endif
 }
 #endif
 
-#if (!defined(NO__1gtk_1tree_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJI_3BJ) && defined(JNI64))
+#if (!defined(NO__1gtk_1tree_1store_1set__III_3BI) && !defined(JNI64)) || (!defined(NO__1gtk_1tree_1store_1set__JJI_3BI) && defined(JNI64))
 #ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__III_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4)
 #else
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJI_3BJ)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jintLong arg4)
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1store_1set__JJI_3BI)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jbyteArray arg3, jint arg4)
 #endif
 {
 	jbyte *lparg3=NULL;
 #ifndef JNI64
 	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__III_3BI_FUNC);
 #else
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJI_3BJ_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC);
 #endif
 	if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	gtk_tree_store_set((GtkTreeStore *)arg0, (GtkTreeIter *)arg1, arg2, lparg3, arg4);
@@ -15385,7 +17084,7 @@ fail:
 #ifndef JNI64
 	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__III_3BI_FUNC);
 #else
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJI_3BJ_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1store_1set__JJI_3BI_FUNC);
 #endif
 }
 #endif
@@ -15489,6 +17188,26 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1clear)
 }
 #endif
 
+#ifndef NO__1gtk_1tree_1view_1column_1get_1button
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1button)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1button_FUNC);
+/*
+	rc = (jintLong)gtk_tree_view_column_get_button((GtkTreeViewColumn *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_tree_view_column_get_button)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkTreeViewColumn *))fp)((GtkTreeViewColumn *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1button_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1tree_1view_1column_1get_1cell_1renderers
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1cell_1renderers)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -15545,54 +17264,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1resizable)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1view_1column_1get_1sizing
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1sizing)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1sizing_FUNC);
-	rc = (jint)gtk_tree_view_column_get_sizing((GtkTreeViewColumn *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1sizing_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1view_1column_1get_1sort_1indicator
-JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1sort_1indicator)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jboolean rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1sort_1indicator_FUNC);
-	rc = (jboolean)gtk_tree_view_column_get_sort_indicator((GtkTreeViewColumn *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1sort_1indicator_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1view_1column_1get_1sort_1order
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1sort_1order)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1sort_1order_FUNC);
-	rc = (jint)gtk_tree_view_column_get_sort_order((GtkTreeViewColumn *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1sort_1order_FUNC);
-	return rc;
-}
-#endif
-
-#ifndef NO__1gtk_1tree_1view_1column_1get_1spacing
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1spacing)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1get_1spacing_FUNC);
-	rc = (jint)gtk_tree_view_column_get_spacing((GtkTreeViewColumn *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1get_1spacing_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1tree_1view_1column_1get_1visible
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1get_1visible)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -15749,20 +17420,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1set_1sort_1order)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1view_1column_1set_1title
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1set_1title)
-	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
-{
-	jbyte *lparg1=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1column_1set_1title_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	gtk_tree_view_column_set_title((GtkTreeViewColumn *)arg0, (const gchar *)lparg1);
-fail:
-	if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1column_1set_1title_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1tree_1view_1column_1set_1visible
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1set_1visible)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -15783,20 +17440,20 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1column_1set_1widget)
 }
 #endif
 
-#ifndef NO__1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords)
+#ifndef NO__1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3, jintArray arg4)
 {
 	jint *lparg3=NULL;
 	jint *lparg4=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
 	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
 	if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail;
 /*
-	gtk_tree_view_convert_widget_to_bin_window_coords((GtkTreeView *)arg0, arg1, arg2, lparg3, lparg4);
+	gtk_tree_view_convert_bin_window_to_tree_coords((GtkTreeView *)arg0, arg1, arg2, lparg3, lparg4);
 */
 	{
-		OS_LOAD_FUNCTION(fp, gtk_tree_view_convert_widget_to_bin_window_coords)
+		OS_LOAD_FUNCTION(fp, gtk_tree_view_convert_bin_window_to_tree_coords)
 		if (fp) {
 			((void (CALLING_CONVENTION*)(GtkTreeView *, jint, jint, jint *, jint *))fp)((GtkTreeView *)arg0, arg1, arg2, lparg3, lparg4);
 		}
@@ -15804,7 +17461,7 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tree_1view_1convert_1widget_1to_1bin_1wi
 fail:
 	if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0);
 	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords_FUNC);
+	OS_NATIVE_EXIT(env, that, _1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC);
 }
 #endif
 
@@ -16205,24 +17862,20 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vbox_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1vbox_1new_FUNC);
+/*
 	rc = (jintLong)gtk_vbox_new((gboolean)arg0, (gint)arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_vbox_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gboolean, gint))fp)((gboolean)arg0, (gint)arg1);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1vbox_1new_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1gtk_1viewport_1get_1shadow_1type
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1viewport_1get_1shadow_1type)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1viewport_1get_1shadow_1type_FUNC);
-	rc = (jint)gtk_viewport_get_shadow_type((GtkViewport *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1viewport_1get_1shadow_1type_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1viewport_1set_1shadow_1type
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1viewport_1set_1shadow_1type)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1)
@@ -16239,7 +17892,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vscale_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1vscale_1new_FUNC);
+/*
 	rc = (jintLong)gtk_vscale_new((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_vscale_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1vscale_1new_FUNC);
 	return rc;
 }
@@ -16251,7 +17912,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vscrollbar_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1vscrollbar_1new_FUNC);
+/*
 	rc = (jintLong)gtk_vscrollbar_new((GtkAdjustment *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_vscrollbar_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkAdjustment *))fp)((GtkAdjustment *)arg0);
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1vscrollbar_1new_FUNC);
 	return rc;
 }
@@ -16263,7 +17932,15 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1vseparator_1new)
 {
 	jintLong rc = 0;
 	OS_NATIVE_ENTER(env, that, _1gtk_1vseparator_1new_FUNC);
+/*
 	rc = (jintLong)gtk_vseparator_new();
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_vseparator_new)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)();
+		}
+	}
 	OS_NATIVE_EXIT(env, that, _1gtk_1vseparator_1new_FUNC);
 	return rc;
 }
@@ -16365,6 +18042,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1destroy)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1draw
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1draw)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1draw_FUNC);
+/*
+	gtk_widget_draw(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_draw)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1draw_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1event
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1event)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -16389,6 +18084,48 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1accessible)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1allocation
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1allocation)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	GtkAllocation _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1allocation_FUNC);
+	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+/*
+	gtk_widget_get_allocation((GtkWidget *)arg0, (GtkAllocation *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_allocation)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkWidget *, GtkAllocation *))fp)((GtkWidget *)arg0, (GtkAllocation *)lparg1);
+		}
+	}
+fail:
+	if (arg1 && lparg1) setGtkAllocationFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1allocation_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1can_1default
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1can_1default)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1can_1default_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_can_default(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_can_default)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1can_1default_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1get_1child_1visible
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1child_1visible)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16401,18 +18138,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1child_1visible)
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1get_1default_1direction
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1default_1direction)
-	(JNIEnv *env, jclass that)
-{
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1default_1direction_FUNC);
-	rc = (jint)gtk_widget_get_default_direction();
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1default_1direction_FUNC);
-	return rc;
-}
-#endif
-
 #ifndef NO__1gtk_1widget_1get_1default_1style
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1default_1style)
 	(JNIEnv *env, jclass that)
@@ -16425,26 +18150,54 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1default_1style)
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1get_1direction
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1direction)
+#ifndef NO__1gtk_1widget_1get_1events
+JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1events)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
 	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1direction_FUNC);
-	rc = (jint)gtk_widget_get_direction((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1direction_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1events_FUNC);
+	rc = (jint)gtk_widget_get_events((GtkWidget *)arg0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1events_FUNC);
 	return rc;
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1get_1events
-JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1get_1events)
+#ifndef NO__1gtk_1widget_1get_1has_1window
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1has_1window)
 	(JNIEnv *env, jclass that, jintLong arg0)
 {
-	jint rc = 0;
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1events_FUNC);
-	rc = (jint)gtk_widget_get_events((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1events_FUNC);
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1has_1window_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_has_window(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_has_window)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1has_1window_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1mapped
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1mapped)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1mapped_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_mapped(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_mapped)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1mapped_FUNC);
 	return rc;
 }
 #endif
@@ -16497,6 +18250,121 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1parent_1window)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1preferred_1height_1for_1width
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1preferred_1height_1for_1width)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jintArray arg3)
+{
+	jint *lparg2=NULL;
+	jint *lparg3=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
+	gtk_widget_get_preferred_height_for_width(arg0, arg1, lparg2, lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_preferred_height_for_width)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jint *, jint *))fp)(arg0, arg1, lparg2, lparg3);
+		}
+	}
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1preferred_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1preferred_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jobject arg2)
+{
+	GtkRequisition _arg1, *lparg1=NULL;
+	GtkRequisition _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1size_FUNC);
+	if (arg1) if ((lparg1 = getGtkRequisitionFields(env, arg1, &_arg1)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = getGtkRequisitionFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_widget_get_preferred_size((GtkWidget *)arg0, (GtkRequisition *)lparg1, (GtkRequisition *)lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_preferred_size)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkWidget *, GtkRequisition *, GtkRequisition *))fp)((GtkWidget *)arg0, (GtkRequisition *)lparg1, (GtkRequisition *)lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGtkRequisitionFields(env, arg2, lparg2);
+	if (arg1 && lparg1) setGtkRequisitionFields(env, arg1, lparg1);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1size_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1preferred_1width_1for_1height
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1preferred_1width_1for_1height)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jintArray arg2, jintArray arg3)
+{
+	jint *lparg2=NULL;
+	jint *lparg3=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail;
+/*
+	gtk_widget_get_preferred_width_for_height(arg0, arg1, lparg2, lparg3);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_preferred_width_for_height)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, jint *, jint *))fp)(arg0, arg1, lparg2, lparg3);
+		}
+	}
+fail:
+	if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1realized
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1realized)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1realized_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_realized(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_realized)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1realized_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1sensitive
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1sensitive)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1sensitive_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_sensitive(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_sensitive)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1sensitive_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1get_1size_1request
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1get_1size_1request)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
@@ -16514,6 +18382,26 @@ fail:
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1state_1flags
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1state_1flags)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1state_1flags_FUNC);
+/*
+	rc = (jintLong)gtk_widget_get_state_flags((GtkWidget *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_state_flags)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1state_1flags_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1get_1style
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1style)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16526,6 +18414,26 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1style)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1style_1context
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1style_1context)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1style_1context_FUNC);
+/*
+	rc = (jintLong)gtk_widget_get_style_context((GtkWidget *)arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_style_context)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkWidget *))fp)((GtkWidget *)arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1style_1context_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1get_1tooltip_1text
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1tooltip_1text)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16558,6 +18466,46 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1toplevel)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1get_1visible
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1get_1visible)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1visible_FUNC);
+/*
+	rc = (jboolean)gtk_widget_get_visible(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_visible)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1visible_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1get_1window
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1widget_1get_1window)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1get_1window_FUNC);
+/*
+	rc = (jintLong)gtk_widget_get_window(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_get_window)
+		if (fp) {
+			rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1get_1window_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1grab_1focus
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1grab_1focus)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16568,6 +18516,46 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1grab_1focus)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1has_1default
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1has_1default)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1has_1default_FUNC);
+/*
+	rc = (jboolean)gtk_widget_has_default(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_has_default)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1has_1default_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1has_1focus
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1has_1focus)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1has_1focus_FUNC);
+/*
+	rc = (jboolean)gtk_widget_has_focus(arg0);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_has_focus)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1has_1focus_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1hide
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1hide)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16578,6 +18566,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1hide)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1input_1shape_1combine_1region
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1input_1shape_1combine_1region)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1input_1shape_1combine_1region_FUNC);
+/*
+	gtk_widget_input_shape_combine_region((GtkWidget *)arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_input_shape_combine_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkWidget *, jintLong))fp)((GtkWidget *)arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1input_1shape_1combine_1region_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1is_1composited
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1is_1composited)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -16658,19 +18664,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1modify_1fg
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1fg)
-	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
-{
-	GdkColor _arg2, *lparg2=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1fg_FUNC);
-	if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
-	gtk_widget_modify_fg((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
-fail:
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1fg_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1widget_1modify_1font
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1font)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -16691,16 +18684,65 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1style)
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1modify_1text
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1modify_1text)
+#ifndef NO__1gtk_1widget_1override_1background_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1background_1color)
 	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
 {
-	GdkColor _arg2, *lparg2=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1modify_1text_FUNC);
-	if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail;
-	gtk_widget_modify_text((GtkWidget *)arg0, (GtkStateType)arg1, (GdkColor *)lparg2);
+	GdkRGBA _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
+	if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_widget_override_background_color(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_override_background_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+		}
+	}
+fail:
+	if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1background_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1override_1color
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1color)
+	(JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2)
+{
+	GdkRGBA _arg2, *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1color_FUNC);
+	if (arg2) if ((lparg2 = getGdkRGBAFields(env, arg2, &_arg2)) == NULL) goto fail;
+/*
+	gtk_widget_override_color(arg0, arg1, lparg2);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_override_color)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jint, GdkRGBA *))fp)(arg0, arg1, lparg2);
+		}
+	}
 fail:
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1modify_1text_FUNC);
+	if (arg2 && lparg2) setGdkRGBAFields(env, arg2, lparg2);
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1color_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1override_1font
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1override_1font)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1override_1font_FUNC);
+/*
+	gtk_widget_override_font(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_override_font)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1override_1font_FUNC);
 }
 #endif
 
@@ -16756,6 +18798,27 @@ JNIEXPORT jint JNICALL OS_NATIVE(_1gtk_1widget_1send_1expose)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1set_1allocation
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1allocation)
+	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
+{
+	GtkAllocation _arg1, *lparg1=NULL;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1allocation_FUNC);
+	if (arg1) if ((lparg1 = getGtkAllocationFields(env, arg1, &_arg1)) == NULL) goto fail;
+/*
+	gtk_widget_set_allocation(arg0, (GtkAllocation *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_allocation)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, GtkAllocation *))fp)(arg0, (GtkAllocation *)lparg1);
+		}
+	}
+fail:
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1allocation_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1set_1app_1paintable
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1app_1paintable)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -16766,6 +18829,44 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1app_1paintable)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1set_1can_1default
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1can_1default)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1can_1default_FUNC);
+/*
+	gtk_widget_set_can_default(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_can_default)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1can_1default_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1set_1can_1focus
+JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1widget_1set_1can_1focus)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	jboolean rc = 0;
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1can_1focus_FUNC);
+/*
+	rc = (jboolean)gtk_widget_set_can_focus(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_can_focus)
+		if (fp) {
+			rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1can_1focus_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1set_1default_1direction
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1default_1direction)
 	(JNIEnv *env, jclass that, jint arg0)
@@ -16796,6 +18897,42 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1double_1buffered)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1set_1has_1window
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1has_1window)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1has_1window_FUNC);
+/*
+	gtk_widget_set_has_window(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_has_window)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1has_1window_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1set_1mapped
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1mapped)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1mapped_FUNC);
+/*
+	gtk_widget_set_mapped(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_mapped)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1mapped_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1set_1name
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1name)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -16820,6 +18957,24 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1parent_1window)
 }
 #endif
 
+#ifndef NO__1gtk_1widget_1set_1receives_1default
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1receives_1default)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1receives_1default_FUNC);
+/*
+	gtk_widget_set_receives_default(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_receives_default)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1receives_1default_FUNC);
+}
+#endif
+
 #ifndef NO__1gtk_1widget_1set_1redraw_1on_1allocate
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1redraw_1on_1allocate)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -16860,16 +19015,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1state)
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1set_1style
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1style)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1style_FUNC);
-	gtk_widget_set_style((GtkWidget *)arg0, (GtkStyle *)arg1);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1style_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1widget_1set_1tooltip_1text
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1tooltip_1text)
 	(JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1)
@@ -16892,13 +19037,39 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1shape_1combine_1mask
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1shape_1combine_1mask)
-	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
+#ifndef NO__1gtk_1widget_1set_1visible
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1set_1visible)
+	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
+{
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1set_1visible_FUNC);
+/*
+	gtk_widget_set_visible(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_set_visible)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jboolean))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1set_1visible_FUNC);
+}
+#endif
+
+#ifndef NO__1gtk_1widget_1shape_1combine_1region
+JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1shape_1combine_1region)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
 {
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1shape_1combine_1mask_FUNC);
-	gtk_widget_shape_combine_mask((GtkWidget *)arg0, (GdkBitmap *)arg1, (gint)arg2, (gint)arg3);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1shape_1combine_1mask_FUNC);
+	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1shape_1combine_1region_FUNC);
+/*
+	gtk_widget_shape_combine_region(arg0, arg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_shape_combine_region)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1);
+		}
+	}
+	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1shape_1combine_1region_FUNC);
 }
 #endif
 
@@ -16912,16 +19083,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1show)
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1show_1now
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1show_1now)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1show_1now_FUNC);
-	gtk_widget_show_now((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1show_1now_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1widget_1size_1allocate
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1size_1allocate)
 	(JNIEnv *env, jclass that, jintLong arg0, jobject arg1)
@@ -16942,7 +19103,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1size_1request)
 	GtkRequisition _arg1, *lparg1=NULL;
 	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1size_1request_FUNC);
 	if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail;
+/*
 	gtk_widget_size_request((GtkWidget *)arg0, (GtkRequisition *)lparg1);
+*/
+	{
+		OS_LOAD_FUNCTION(fp, gtk_widget_size_request)
+		if (fp) {
+			((void (CALLING_CONVENTION*)(GtkWidget *, GtkRequisition *))fp)((GtkWidget *)arg0, (GtkRequisition *)lparg1);
+		}
+	}
 fail:
 	if (arg1 && lparg1) setGtkRequisitionFields(env, arg1, lparg1);
 	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1size_1request_FUNC);
@@ -17024,16 +19193,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1widget_1unrealize
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1widget_1unrealize)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1widget_1unrealize_FUNC);
-	gtk_widget_unrealize((GtkWidget *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1widget_1unrealize_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1window_1activate_1default
 JNIEXPORT jboolean JNICALL OS_NATIVE(_1gtk_1window_1activate_1default)
 	(JNIEnv *env, jclass that, jintLong arg0)
@@ -17181,23 +19340,6 @@ fail:
 }
 #endif
 
-#ifndef NO__1gtk_1window_1get_1size
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1get_1size)
-	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
-{
-	jint *lparg1=NULL;
-	jint *lparg2=NULL;
-	OS_NATIVE_ENTER(env, that, _1gtk_1window_1get_1size_FUNC);
-	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
-	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
-	gtk_window_get_size((GtkWindow *)arg0, (gint *)lparg1, (gint *)lparg2);
-fail:
-	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
-	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1window_1get_1size_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1window_1group_1add_1window
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1group_1add_1window)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -17296,16 +19438,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(_1gtk_1window_1new)
 }
 #endif
 
-#ifndef NO__1gtk_1window_1present
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1present)
-	(JNIEnv *env, jclass that, jintLong arg0)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1window_1present_FUNC);
-	gtk_window_present((GtkWindow *)arg0);
-	OS_NATIVE_EXIT(env, that, _1gtk_1window_1present_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1window_1remove_1accel_1group
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1remove_1accel_1group)
 	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -17369,24 +19501,6 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1icon_1list)
 }
 #endif
 
-#ifndef NO__1gtk_1window_1set_1keep_1below
-JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1keep_1below)
-	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
-{
-	OS_NATIVE_ENTER(env, that, _1gtk_1window_1set_1keep_1below_FUNC);
-/*
-	gtk_window_set_keep_below((GtkWindow *)arg0, (gboolean)arg1);
-*/
-	{
-		OS_LOAD_FUNCTION(fp, gtk_window_set_keep_below)
-		if (fp) {
-			((void (CALLING_CONVENTION*)(GtkWindow *, gboolean))fp)((GtkWindow *)arg0, (gboolean)arg1);
-		}
-	}
-	OS_NATIVE_EXIT(env, that, _1gtk_1window_1set_1keep_1below_FUNC);
-}
-#endif
-
 #ifndef NO__1gtk_1window_1set_1modal
 JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1window_1set_1modal)
 	(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
@@ -18556,6 +20670,23 @@ fail:
 }
 #endif
 
+#ifndef NO__1pango_1layout_1get_1pixel_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1get_1pixel_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
+{
+	jint *lparg1=NULL;
+	jint *lparg2=NULL;
+	OS_NATIVE_ENTER(env, that, _1pango_1layout_1get_1pixel_1size_FUNC);
+	if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
+	if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
+	pango_layout_get_pixel_size((PangoLayout *)arg0, (int *)lparg1, (int *)lparg2);
+fail:
+	if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
+	if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
+	OS_NATIVE_EXIT(env, that, _1pango_1layout_1get_1pixel_1size_FUNC);
+}
+#endif
+
 #ifndef NO__1pango_1layout_1get_1size
 JNIEXPORT void JNICALL OS_NATIVE(_1pango_1layout_1get_1size)
 	(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
@@ -18984,6 +21115,48 @@ JNIEXPORT void JNICALL OS_NATIVE(_1pango_1tab_1array_1set_1tab)
 }
 #endif
 
+#ifndef NO__1swt_1fixed_1get_1type
+JNIEXPORT jintLong JNICALL OS_NATIVE(_1swt_1fixed_1get_1type)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, _1swt_1fixed_1get_1type_FUNC);
+	rc = (jintLong)swt_fixed_get_type();
+	OS_NATIVE_EXIT(env, that, _1swt_1fixed_1get_1type_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1swt_1fixed_1move
+JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1move)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
+{
+	OS_NATIVE_ENTER(env, that, _1swt_1fixed_1move_FUNC);
+	swt_fixed_move((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
+	OS_NATIVE_EXIT(env, that, _1swt_1fixed_1move_FUNC);
+}
+#endif
+
+#ifndef NO__1swt_1fixed_1resize
+JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1resize)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3)
+{
+	OS_NATIVE_ENTER(env, that, _1swt_1fixed_1resize_FUNC);
+	swt_fixed_resize((SwtFixed*)arg0, (GtkWidget*)arg1, arg2, arg3);
+	OS_NATIVE_EXIT(env, that, _1swt_1fixed_1resize_FUNC);
+}
+#endif
+
+#ifndef NO__1swt_1fixed_1restack
+JNIEXPORT void JNICALL OS_NATIVE(_1swt_1fixed_1restack)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jboolean arg3)
+{
+	OS_NATIVE_ENTER(env, that, _1swt_1fixed_1restack_FUNC);
+	swt_fixed_restack((SwtFixed*)arg0, (GtkWidget*)arg1, (GtkWidget*)arg2, arg3);
+	OS_NATIVE_EXIT(env, that, _1swt_1fixed_1restack_FUNC);
+}
+#endif
+
 #ifndef NO__1ubuntu_1menu_1proxy_1get
 JNIEXPORT jintLong JNICALL OS_NATIVE(_1ubuntu_1menu_1proxy_1get)
 	(JNIEnv *env, jclass that)
@@ -19124,26 +21297,6 @@ JNIEXPORT void JNICALL OS_NATIVE(g_1value_1unset)
 }
 #endif
 
-#ifndef NO_gdk_1threads_1enter
-JNIEXPORT void JNICALL OS_NATIVE(gdk_1threads_1enter)
-	(JNIEnv *env, jclass that)
-{
-	OS_NATIVE_ENTER(env, that, gdk_1threads_1enter_FUNC);
-	gdk_threads_enter();
-	OS_NATIVE_EXIT(env, that, gdk_1threads_1enter_FUNC);
-}
-#endif
-
-#ifndef NO_gdk_1threads_1init
-JNIEXPORT void JNICALL OS_NATIVE(gdk_1threads_1init)
-	(JNIEnv *env, jclass that)
-{
-	OS_NATIVE_ENTER(env, that, gdk_1threads_1init_FUNC);
-	gdk_threads_init();
-	OS_NATIVE_EXIT(env, that, gdk_1threads_1init_FUNC);
-}
-#endif
-
 #ifndef NO_gdk_1threads_1leave
 JNIEXPORT void JNICALL OS_NATIVE(gdk_1threads_1leave)
 	(JNIEnv *env, jclass that)
@@ -19505,30 +21658,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
-	XCrossingEvent _arg1, *lparg1=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J_FUNC);
-#endif
-	if (arg1) if ((lparg1 = getXCrossingEventFields(env, arg1, &_arg1)) == NULL) goto fail;
-	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
@@ -19553,30 +21682,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I) && !defined(JNI64)) || (!defined(NO_memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J)(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-#endif
-{
-	XFocusChangeEvent _arg1, *lparg1=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J_FUNC);
-#endif
-	if (arg1) if ((lparg1 = getXFocusChangeEventFields(env, arg1, &_arg1)) == NULL) goto fail;
-	memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
-fail:
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
@@ -20170,31 +22275,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
-	GtkTargetPair _arg0, *lparg0=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ_FUNC);
-#endif
-	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
-	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
-	if (arg0 && lparg0) setGtkTargetPairFields(env, arg0, lparg0);
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1)
@@ -20391,31 +22471,6 @@ fail:
 }
 #endif
 
-#if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ) && defined(JNI64))
-#ifndef JNI64
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#else
-JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
-#endif
-{
-	XCrossingEvent _arg0, *lparg0=NULL;
-#ifndef JNI64
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_FUNC);
-#else
-	OS_NATIVE_ENTER(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ_FUNC);
-#endif
-	if (arg0) if ((lparg0 = &_arg0) == NULL) goto fail;
-	memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
-fail:
-	if (arg0 && lparg0) setXCrossingEventFields(env, arg0, lparg0);
-#ifndef JNI64
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_FUNC);
-#else
-	OS_NATIVE_EXIT(env, that, memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ_FUNC);
-#endif
-}
-#endif
-
 #if (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II) && !defined(JNI64)) || (!defined(NO_memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ) && defined(JNI64))
 #ifndef JNI64
 JNIEXPORT void JNICALL OS_NATIVE(memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II)(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jintLong arg2)
diff --git a/os.h b/os.h
index 5462050..0b592de 100644
--- a/os.h
+++ b/os.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -29,6 +29,10 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
+#if GTK_CHECK_VERSION(3,0,0)
+#include <gtk/gtkx.h>
+#include <gdk/gdkx.h>
+#endif
 #include <pango/pango.h>
 #include <pango/pango-font.h>
 #include <string.h>
@@ -90,6 +94,99 @@
 #include <X11/extensions/Xrender.h>
 #endif
 
+/* Disable access to sealed structs in GTK3 */
+#if GTK_CHECK_VERSION(3,0,0)
+
+#define GTK3 1
+
+#define GdkRegion cairo_region_t
+#define gdk_region_point_in cairo_region_contains_point
+#define gdk_region_new cairo_region_create
+#define gdk_region_offset cairo_region_translate
+#define gdk_region_subtract cairo_region_subtract
+#define gdk_region_union cairo_region_union
+#define gdk_region_intersect cairo_region_intersect
+#define gdk_region_destroy cairo_region_destroy
+#define gdk_region_empty cairo_region_is_empty
+#define gdk_region_get_clipbox cairo_region_get_extents
+#define gdk_region_rectangle cairo_region_create_rectangle
+#define gdk_region_union_with_rect cairo_region_union_rectangle
+#define gdk_region_rect_in cairo_region_contains_rectangle
+
+#define NO_GdkDragContext
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2II
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GdkDragContext_2JJ
+#define NO_GtkSelectionData
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2II
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2JJ
+#define NO__1gtk_1style_1get_1bg_1gc
+#define NO__1gtk_1style_1get_1black_1gc
+#define NO__1gtk_1style_1get_1dark_1gc
+#define NO__1gtk_1style_1get_1fg_1gc
+#define NO__1gtk_1style_1get_1light_1gc
+#define NO__1gtk_1style_1get_1mid_1gc
+#define NO__1gtk_1style_1get_1text_1aa_1gc
+#define NO__1gtk_1style_1get_1text_1gc
+#define NO__1gtk_1style_1get_1white_1gc
+#define NO__1gdk_1gc_1get_1values
+#define NO__1gdk_1gc_1new
+#define NO__1gdk_1draw_1rectangle
+#define NO__1gdk_1gc_1set_1clip_1region
+#define NO__1gdk_1gc_1set_1foreground
+#define NO__1gdk_1gc_1set_1function
+#define NO__1gdk_1gc_1set_1subwindow
+#define NO__1gdk_1gc_1set_1values
+#define NO__1gdk_1draw_1drawable
+#define NO__1gdk_1pixmap_1new
+#define NO__1GDK_1PIXMAP_1XID
+#define NO_GdkImage
+#define NO_GdkVisual
+#define NO_GtkColorSelectionDialog
+#define NO_GdkGCValues
+#define NO_GtkAccessible
+#define NO_GTK_1ENTRY_1IM_1CONTEXT
+#define NO_GTK_1TEXTVIEW_1IM_1CONTEXT
+#define NO_GtkAdjustment
+#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GtkAdjustment_2
+#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkAdjustment_2
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2I
+#define NO_memmove__Lorg_eclipse_swt_internal_gtk_GtkAdjustment_2J
+#define NO_GtkFixed
+#define NO_memmove__ILorg_eclipse_swt_internal_gtk_GtkFixed_2
+#define NO_memmove__JLorg_eclipse_swt_internal_gtk_GtkFixed_2
+
+#define NO_GTK_1WIDGET_1REQUISITION_1HEIGHT
+#define NO_GTK_1WIDGET_1REQUISITION_1WIDTH
+
+
+#else
+
+#define NO_SwtFixed
+#define NO__1swt_1fixed_1get_1type
+#define NO__1swt_1fixed_1move
+#define NO__1swt_1fixed_1resize
+#define NO__1swt_1fixed_1restack
+#define NO__1gtk_1widget_1input_1shape_1combine_1region
+
+#define NO_GdkRGBA
+#define NO__1gtk_1widget_1draw
+#define NO__1gtk_1widget_1override_1color
+#define NO__1gtk_1widget_1override_1background_1color
+#define NO__1gtk_1widget_1override_1font
+#define NO__1gtk_1style_1context_1get_1font
+#define NO__1gtk_1style_1context_1get_1color
+#define NO__1gtk_1style_1context_1get_1background_1color
+#define NO__1gtk_1style_1context_1add_1class
+#define NO__1gtk_1style_1context_1get_1border_1color
+#define NO__1gtk_1style_1context_1get_1padding
+#define NO__1gtk_1style_1context_1restore
+#define NO__1gtk_1style_1context_1save
+#define NO__1gtk_1style_1context_1set_1state
+#define NO__1gtk_1color_1chooser_1get_1rgba
+#define NO__1gtk_1color_1chooser_1set_1rgba
+
+#endif
+
 #include "os_custom.h"
 
 #endif /* INC_os_H */
diff --git a/os_custom.c b/os_custom.c
index efdb5a2..cb6c662 100644
--- a/os_custom.c
+++ b/os_custom.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.
+* Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
 * The contents of this file are made available under the terms
 * of the GNU Lesser General Public License (LGPL) Version 2.1 that
 * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -19,6 +19,39 @@
 
 #define OS_NATIVE(func) Java_org_eclipse_swt_internal_gtk_OS_##func
 
+#ifndef NO__1call_1get_1size
+JNIEXPORT void JNICALL OS_NATIVE(_1call_1get_1size)
+	(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7)
+{
+   /*
+   * Bug in Solaris. For some reason, the assembler generated for this function (when not putting the parameters in the stack)  crashes. 
+   * It seems that this  is caused by a bug in the Sun Studio Compiler when the optimization level is greater or equal to two.
+   * The fix is rewrite the function passing all parameters on the stack. Alternatively, the problem could be fixed by lowering the optimization level,
+   * but this solution would significantly increase the size of the library. 
+   */
+	const GdkRectangle rect;
+	gint x, y, width, height;
+	const GdkRectangle *lprect = NULL;
+	gint* lpx = NULL;
+	gint* lpy = NULL;
+	gint* lpwidth = NULL;
+	gint* lpheight = NULL;
+	OS_NATIVE_ENTER(env, that, _1call_1get_1size_FUNC);
+	if (arg3) lprect = ▭
+	if (arg4) lpx = &x;
+	if (arg5) lpy = &y;
+	if (arg6) lpwidth = &width;
+	if (arg7) lpheight = &height;
+	((void (*)(GtkCellRenderer *, GtkWidget *, const GdkRectangle *, gint *, gint *, gint *, gint *))arg0)((GtkCellRenderer *)arg1, (GtkWidget *)arg2, lprect, lpx, lpy, lpwidth, lpheight);
+	if (arg3) *((GdkRectangle *)arg3) = rect;
+	if (arg4) *((gint *)arg4) = x;
+	if (arg5) *((gint *)arg5) = y;
+	if (arg6) *((gint *)arg6) = width;
+	if (arg7) *((gint *)arg7) = height;
+	OS_NATIVE_EXIT(env, that, _1call_1get_1size_FUNC);
+}
+#endif
+
 #ifndef NO_GDK_1WINDOWING_1X11
 JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1WINDOWING_1X11)
 	(JNIEnv *env, jclass that)
@@ -35,6 +68,38 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1WINDOWING_1X11)
 }
 #endif
 
+#ifndef NO_imContextNewProc_1CALLBACK
+static jintLong superIMContextNewProc;
+static GtkIMContext* lastIMContext;
+static GtkIMContext* imContextNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
+	GtkIMContext* context = ((GtkIMContext * (*)(GType, guint, GObjectConstructParam *))superIMContextNewProc)(type, n_construct_properties, construct_properties);
+	lastIMContext = context;
+	return context;
+}
+#ifndef NO_imContextLast
+JNIEXPORT jintLong JNICALL OS_NATIVE(imContextLast)
+	(JNIEnv *env, jclass that)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, imContextLast_FUNC);
+	rc = (jintLong)lastIMContext;
+	OS_NATIVE_EXIT(env, that, imContextLast_FUNC);
+	return rc;
+}
+#endif
+
+JNIEXPORT jintLong JNICALL OS_NATIVE(imContextNewProc_1CALLBACK)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	OS_NATIVE_ENTER(env, that, imContextNewProc_1CALLBACK_FUNC);
+	superIMContextNewProc = arg0;
+	rc = (jintLong)imContextNewProc;
+	OS_NATIVE_EXIT(env, that, imContextNewProc_1CALLBACK_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO_pangoLayoutNewProc_1CALLBACK
 static jintLong superPangoLayoutNewProc;
 static PangoLayout * pangoLayoutNewProc (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
@@ -187,3 +252,388 @@ glong g_utf8_offset_to_utf16_offset(const gchar* str, glong offset) {
 	}
 	return r;
 }
+
+#ifndef NO_SwtFixed
+
+struct _SwtFixedPrivate {
+  GtkAdjustment *hadjustment;
+  GtkAdjustment *vadjustment;
+  guint hscroll_policy : 1;
+  guint vscroll_policy : 1;
+  GList *children;
+};
+
+struct _SwtFixedChild
+{
+  GtkWidget *widget;
+  gint x;
+  gint y;
+  gint width;
+  gint height;
+};
+typedef struct _SwtFixedChild SwtFixedChild;
+
+enum {
+   PROP_0,
+   PROP_HADJUSTMENT,
+   PROP_VADJUSTMENT,
+   PROP_HSCROLL_POLICY,
+   PROP_VSCROLL_POLICY,
+};
+
+static void swt_fixed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
+static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
+static void swt_fixed_finalize (GObject *object);
+static void swt_fixed_realize (GtkWidget *widget);
+static void swt_fixed_map (GtkWidget *widget);
+static void swt_fixed_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural);
+static void swt_fixed_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural);
+static void swt_fixed_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
+static void swt_fixed_add (GtkContainer *container, GtkWidget *widget);
+static void swt_fixed_remove (GtkContainer *container, GtkWidget *widget);
+static void swt_fixed_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
+
+G_DEFINE_TYPE_WITH_CODE (SwtFixed, swt_fixed, GTK_TYPE_CONTAINER, G_IMPLEMENT_INTERFACE (GTK_TYPE_SCROLLABLE, NULL))
+
+static void swt_fixed_class_init (SwtFixedClass *class) {
+	GObjectClass *gobject_class = (GObjectClass*) class;
+	GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
+	GtkContainerClass *container_class = (GtkContainerClass*) class;
+
+	/* GOject implementation */
+	gobject_class->set_property = swt_fixed_set_property;
+	gobject_class->get_property = swt_fixed_get_property;
+	gobject_class->finalize = swt_fixed_finalize;
+
+	/* Scrollable implemetation */
+	g_object_class_override_property (gobject_class, PROP_HADJUSTMENT,    "hadjustment");
+	g_object_class_override_property (gobject_class, PROP_VADJUSTMENT,    "vadjustment");
+	g_object_class_override_property (gobject_class, PROP_HSCROLL_POLICY, "hscroll-policy");
+	g_object_class_override_property (gobject_class, PROP_VSCROLL_POLICY, "vscroll-policy");
+
+	/* Widget implementation */
+	widget_class->realize = swt_fixed_realize;
+	widget_class->map = swt_fixed_map;
+	widget_class->get_preferred_width = swt_fixed_get_preferred_width;
+	widget_class->get_preferred_height = swt_fixed_get_preferred_height;
+	widget_class->size_allocate = swt_fixed_size_allocate;
+
+	/* Container implementation */
+	container_class->add = swt_fixed_add;
+	container_class->remove = swt_fixed_remove;
+	container_class->forall = swt_fixed_forall;
+
+	g_type_class_add_private (class, sizeof (SwtFixedPrivate));
+}
+
+void swt_fixed_restack (SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling, gboolean above) {
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+	SwtFixedChild *child, *sibling_child;
+
+	list = priv->children;
+	while (list) {
+		child = list->data;
+		if (child->widget == widget) break;
+		list = list->next;
+	}
+	
+	if (!list) return;
+	priv->children = g_list_remove_link (priv->children, list);
+	g_list_free_1 (list);
+	
+	list = NULL;
+	if (sibling) {
+		list = priv->children;
+		while (list) {
+			sibling_child = list->data;
+			if (sibling_child->widget == sibling) {
+				break;
+			}
+			list = list->next;
+		}
+		if (list) {
+			if (!above) list = list->next;
+		}
+	}
+	if (!list) {
+		list = above ? priv->children : NULL;
+	}
+	priv->children = g_list_insert_before (priv->children, list, child);
+	
+	/*
+	{
+	GdkWindow *sibling_window = NULL;
+	if (list) {
+		child = list->data;
+		sibling_window = gtk_widget_get_window (child);
+	}
+	gdk_window_restack (gtk_widget_get_window (widget), sibling_window, above);
+	}
+	*/ 
+}
+
+static void swt_fixed_init (SwtFixed *widget) {
+	SwtFixedPrivate *priv;
+
+	priv = widget->priv = G_TYPE_INSTANCE_GET_PRIVATE (widget, SWT_TYPE_FIXED, SwtFixedPrivate);
+	priv->children = NULL;
+	priv->hadjustment = NULL;
+	priv->vadjustment = NULL;
+}
+
+static void swt_fixed_finalize (GObject *object) {
+	SwtFixed *widget = SWT_FIXED (object);
+	SwtFixedPrivate *priv = widget->priv;
+
+	g_object_unref (priv->hadjustment);
+	g_object_unref (priv->vadjustment);
+
+	G_OBJECT_CLASS (swt_fixed_parent_class)->finalize (object);
+}
+
+static void swt_fixed_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) {
+	SwtFixed *widget = SWT_FIXED (object);
+	SwtFixedPrivate *priv = widget->priv;
+
+	switch (prop_id) {
+		case PROP_HADJUSTMENT:
+			g_value_set_object (value, priv->hadjustment);
+			break;
+		case PROP_VADJUSTMENT:
+			g_value_set_object (value, priv->vadjustment);
+			break;
+		case PROP_HSCROLL_POLICY:
+			g_value_set_enum (value, priv->hscroll_policy);
+			break;
+		case PROP_VSCROLL_POLICY:
+			g_value_set_enum (value, priv->vscroll_policy);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
+	}
+}
+
+static void swt_fixed_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) {
+	SwtFixed *widget = SWT_FIXED (object);
+	SwtFixedPrivate *priv = widget->priv;
+	GtkAdjustment *adjustment;
+
+	switch (prop_id) {
+		case PROP_HADJUSTMENT:
+			adjustment = g_value_get_object (value);
+			if (adjustment && priv->hadjustment == adjustment) return;
+			if (priv->hadjustment != NULL) g_object_unref (priv->hadjustment);
+			if (adjustment == NULL) adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+			priv->hadjustment = g_object_ref_sink (adjustment);
+			g_object_notify (G_OBJECT (widget), "hadjustment");
+			break;
+		case PROP_VADJUSTMENT:
+			adjustment = g_value_get_object (value);
+			if (adjustment && priv->vadjustment == adjustment) return;
+			if (priv->vadjustment != NULL) g_object_unref (priv->vadjustment);
+			if (adjustment == NULL) adjustment = gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+			priv->vadjustment = g_object_ref_sink (adjustment);
+			g_object_notify (G_OBJECT (widget), "vadjustment");
+			break;
+		case PROP_HSCROLL_POLICY:
+			priv->hscroll_policy = g_value_get_enum (value);
+			break;
+		case PROP_VSCROLL_POLICY:
+			priv->vscroll_policy = g_value_get_enum (value);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+			break;
+    }
+}
+
+static void swt_fixed_realize (GtkWidget *widget) {
+	GtkAllocation allocation;
+	GdkWindow *window;
+	GdkWindowAttr attributes;
+	gint attributes_mask;
+
+ 	if (!gtk_widget_get_has_window (widget)) {
+    	GTK_WIDGET_CLASS (swt_fixed_parent_class)->realize (widget);
+    	return;
+    }
+ 
+	gtk_widget_set_realized (widget, TRUE);
+
+	gtk_widget_get_allocation (widget, &allocation);
+	
+	attributes.window_type = GDK_WINDOW_CHILD;
+	attributes.x = allocation.x;
+	attributes.y = allocation.y;
+	attributes.width = allocation.width;
+	attributes.height = allocation.height;
+	attributes.wclass = GDK_INPUT_OUTPUT;
+	attributes.visual = gtk_widget_get_visual (widget);
+	attributes.event_mask = GDK_EXPOSURE_MASK | GDK_SCROLL_MASK | 1 << 23 /*GDK_SMOOTH_SCROLL_MASK*/ | gtk_widget_get_events (widget);
+	attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+	window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
+	gtk_widget_set_window (widget, window);
+	gdk_window_set_user_data (window, widget);
+	gtk_style_context_set_background (gtk_widget_get_style_context (widget), window);
+}
+
+static void swt_fixed_map (GtkWidget *widget) {
+	SwtFixed *fixed = SWT_FIXED (widget);
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+	
+	gtk_widget_set_mapped (widget, TRUE);
+	list = priv->children;
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		list = list->next;
+		if (gtk_widget_get_visible (child)) {
+			if (!gtk_widget_get_mapped (child)) gtk_widget_map (child);
+		}
+	}
+	if (gtk_widget_get_has_window (widget)) {
+		gdk_window_show_unraised (gtk_widget_get_window (widget));
+	}
+}
+
+static void swt_fixed_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural) {
+	if (minimum) *minimum = 0;
+	if (natural) *natural = 0;
+}
+
+static void swt_fixed_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural) {
+	if (minimum) *minimum = 0;
+	if (natural) *natural = 0;
+}
+
+static void swt_fixed_size_allocate (GtkWidget *widget, GtkAllocation *allocation) {
+	SwtFixed *fixed = SWT_FIXED (widget);
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+	GtkAllocation child_allocation;
+	GtkRequisition requisition;
+	gint w, h;
+
+	gtk_widget_set_allocation (widget, allocation);
+
+	if (gtk_widget_get_has_window (widget)) {
+		if (gtk_widget_get_realized (widget)) {
+			gdk_window_move_resize (gtk_widget_get_window (widget), allocation->x, allocation->y, allocation->width, allocation->height);
+	    }
+	}
+	
+	list = priv->children;
+
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		list = list->next;
+		
+		child_allocation.x = child_data->x;
+		child_allocation.y = child_data->y;
+		if (!gtk_widget_get_has_window (widget)) {
+          child_allocation.x += allocation->x;
+          child_allocation.y += allocation->y;
+        }
+
+		w = child_data->width;
+		h = child_data->height;
+		if (w == -1 || h == -1) {
+			gtk_widget_get_preferred_size (child, &requisition, NULL);
+			if (w == -1) w = requisition.width;
+			if (h == -1) h = requisition.height;
+		}
+		child_allocation.width = w;
+		child_allocation.height = h;
+		
+		gtk_widget_size_allocate (child, &child_allocation);
+    }
+}
+
+void swt_fixed_move (SwtFixed *fixed, GtkWidget *widget, gint x, gint y) {
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+
+	list = priv->children;
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		if (child == widget) {
+			child_data->x = x;
+			child_data->y = y;
+			break;
+		}
+		list = list->next;
+	}
+}
+
+void swt_fixed_resize (SwtFixed *fixed, GtkWidget *widget, gint width, gint height) {
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+
+	list = priv->children;
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		if (child == widget) {
+			child_data->width = width;
+			child_data->height = height;
+			break;
+		}
+		list = list->next;
+	}
+}
+
+static void swt_fixed_add (GtkContainer *container, GtkWidget *child) {
+	GtkWidget *widget = GTK_WIDGET (container);
+	SwtFixed *fixed = SWT_FIXED (container);
+	SwtFixedPrivate *priv = fixed->priv;
+	SwtFixedChild *child_data;
+
+	child_data = g_new (SwtFixedChild, 1);
+	child_data->widget = child;
+  	child_data->x = child_data->y = 0;
+  	child_data->width = child_data->height = -1;
+  
+	priv->children = g_list_append (priv->children, child_data);
+	gtk_widget_set_parent (child, widget);
+}
+
+static void swt_fixed_remove (GtkContainer *container, GtkWidget *widget) {
+	SwtFixed *fixed = SWT_FIXED (container);
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+
+	list = priv->children;
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		if (child == widget) {
+			gtk_widget_unparent (widget);
+			priv->children = g_list_remove_link (priv->children, list);
+			g_list_free_1 (list);
+			g_free (child_data);
+			break;
+		}
+		list = list->next;
+	}
+}
+
+static void swt_fixed_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) {
+	SwtFixed *fixed = SWT_FIXED (container);
+	SwtFixedPrivate *priv = fixed->priv;
+	GList *list;
+	
+	list = priv->children;
+	while (list) {
+		SwtFixedChild *child_data = list->data;
+		GtkWidget *child = child_data->widget;
+		list = list->next;
+		(* callback) (child, callback_data);
+	}
+}
+
+#endif
diff --git a/os_custom.h b/os_custom.h
index c93d847..0771bf5 100644
--- a/os_custom.h
+++ b/os_custom.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
-* Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+* Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
 * The contents of this file are made available under the terms
 * of the GNU Lesser General Public License (LGPL) Version 2.1 that
 * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -29,6 +29,9 @@
 #define LIB_XRENDER "libXrender.a(libXrender.so)"
 #define LIB_GTK "libgtk-x11-2.0.a(libgtk-x11-2.0.so.0)"
 #define LIB_GDK "libgdk-x11-2.0.a(libgdk-x11-2.0.so.0)"
+#define LIB_GLIB "libglib-2.0.a(libglib-2.0.so.0)"
+#define LIB_GOBJECT "libgobject-2.0.a(libgobject-2.0.so.0)"
+#define LIB_GTHREAD "libgthread-2.0.a(libgthread-2.0.so.0)"
 #define LIB_ATK "libatk-1.0.a(libatk-1.0.so.0)"
 #define LIB_PANGO "libpango-1.0.a(libpango-1.0.so.0)"
 #define LIB_PANGOCAIRO "libpangocairo-1.0.a(libpangocairo-1.0.so.0)"
@@ -38,6 +41,9 @@
 #define LIB_XRENDER "libXrender.so"
 #define LIB_GTK "libgtk-x11-2.0.so"
 #define LIB_GDK "libgdk-x11-2.0.so"
+#define LIB_GLIB "libglib-2.0.so"
+#define LIB_GOBJECT "libgobject-2.0.so"
+#define LIB_GTHREAD "libgthread-2.0.so"
 #define LIB_ATK "libatk-1.0.so"
 #define LIB_PANGO "libpango-1.0.so"
 #define LIB_PANGOCAIRO "libpangocairo-1.0.so"
@@ -45,8 +51,16 @@
 #define LIB_FONTCONFIG "libfontconfig.so"
 #else
 #define LIB_XRENDER "libXrender.so"
+#if GTK_CHECK_VERSION(3,0,0)
+#define LIB_GTK "libgtk-3.so.0"
+#define LIB_GDK "libgdk-3.so.0"
+#else
 #define LIB_GTK "libgtk-x11-2.0.so.0"
 #define LIB_GDK "libgdk-x11-2.0.so.0"
+#endif
+#define LIB_GLIB "libglib-2.0.so.0"
+#define LIB_GOBJECT "libgobject-2.0.so.0"
+#define LIB_GTHREAD "libgthread-2.0.so.0"
 #define LIB_ATK "libatk-1.0.so.0"
 #define LIB_PANGO "libpango-1.0.so.0"
 #define LIB_PANGOCAIRO "libpangocairo-1.0.so.0"
@@ -64,6 +78,23 @@
 #define XRenderFreePicture_LIB LIB_XRENDER
 #define XRenderSetPictureClipRectangles_LIB LIB_XRENDER
 #define XRenderSetPictureTransform_LIB LIB_XRENDER
+#define g_filename_display_name_LIB LIB_GLIB
+#define g_thread_init_LIB LIB_GTHREAD
+#define gtk_widget_set_allocation_LIB LIB_GTK
+#define gtk_adjustment_configure_LIB LIB_GTK
+#define gtk_adjustment_get_lower_LIB LIB_GTK
+#define gtk_adjustment_get_page_increment_LIB LIB_GTK
+#define gtk_adjustment_get_page_size_LIB LIB_GTK
+#define gtk_adjustment_get_step_increment_LIB LIB_GTK
+#define gtk_adjustment_get_upper_LIB LIB_GTK
+#define gtk_adjustment_get_value_LIB LIB_GTK
+#define gtk_adjustment_set_page_increment_LIB LIB_GTK
+#define gtk_adjustment_set_step_increment_LIB LIB_GTK
+#define gtk_box_new_LIB LIB_GTK
+#define gtk_box_set_homogeneous_LIB LIB_GTK
+#define gtk_hbox_new_LIB LIB_GTK
+#define gtk_vbox_new_LIB LIB_GTK
+#define gtk_accessible_get_widget_LIB LIB_GTK
 #define gtk_calendar_display_options_LIB LIB_GTK
 #define gtk_calendar_get_date_LIB LIB_GTK
 #define gtk_calendar_new_LIB LIB_GTK
@@ -78,18 +109,41 @@
 #define gtk_cell_layout_set_attributes_LIB LIB_GTK
 #define gtk_cell_layout_clear_LIB LIB_GTK
 #define gtk_cell_layout_pack_start_LIB LIB_GTK
+#define gtk_cell_renderer_get_preferred_size_LIB LIB_GTK
+#define gtk_cell_renderer_get_size_LIB LIB_GTK
+#define gtk_color_selection_dialog_get_color_selection_LIB LIB_GTK
+#define gtk_color_selection_dialog_new_LIB LIB_GTK
+#define gtk_color_selection_set_has_palette_LIB LIB_GTK
+#define gtk_color_selection_get_current_color_LIB LIB_GTK
+#define gtk_color_selection_set_current_color_LIB LIB_GTK
+#define gtk_color_selection_palette_to_string_LIB LIB_GTK
+#define gtk_color_chooser_get_rgba_LIB LIB_GTK
+#define gtk_color_chooser_dialog_new_LIB LIB_GTK
+#define gtk_color_chooser_set_rgba_LIB LIB_GTK
+#define gtk_color_chooser_set_use_alpha_LIB LIB_GTK
 #define gtk_combo_box_entry_new_text_LIB LIB_GTK
 #define gtk_combo_box_new_text_LIB LIB_GTK
+#define gtk_combo_box_text_insert_LIB LIB_GTK
 #define gtk_combo_box_insert_text_LIB LIB_GTK
 #define gtk_combo_box_remove_text_LIB LIB_GTK
+#define gtk_combo_box_text_remove_LIB LIB_GTK
+#define gtk_combo_box_text_remove_all_LIB LIB_GTK
 #define gtk_combo_box_get_active_LIB LIB_GTK
 #define gtk_combo_box_get_model_LIB LIB_GTK
 #define gtk_combo_box_set_active_LIB LIB_GTK
 #define gtk_combo_box_set_focus_on_click_LIB LIB_GTK
 #define gtk_combo_box_popup_LIB LIB_GTK
 #define gtk_combo_box_popdown_LIB LIB_GTK
+#define gtk_combo_box_text_new_LIB LIB_GTK
+#define gtk_combo_box_text_new_with_entry_LIB LIB_GTK
 #define gtk_entry_text_index_to_layout_index_LIB LIB_GTK
 #define gtk_entry_get_inner_border_LIB LIB_GTK
+#define gtk_font_chooser_dialog_new_LIB LIB_GTK
+#define gtk_font_chooser_get_font_LIB LIB_GTK
+#define gtk_font_chooser_set_font_LIB LIB_GTK
+#define gtk_font_selection_dialog_get_font_name_LIB LIB_GTK
+#define gtk_font_selection_dialog_set_font_name_LIB LIB_GTK
+#define gtk_font_selection_dialog_new_LIB LIB_GTK
 #define gtk_file_chooser_add_filter_LIB LIB_GTK
 #define gtk_file_chooser_dialog_new_LIB LIB_GTK
 #define gtk_file_chooser_get_current_folder_LIB LIB_GTK
@@ -121,13 +175,23 @@
 #define gtk_label_set_line_wrap_mode_LIB LIB_GTK
 #define gtk_icon_info_load_icon_LIB LIB_GTK
 #define gtk_icon_info_free_LIB LIB_GTK
+#define gtk_icon_set_render_icon_LIB LIB_GTK
 #define gtk_icon_theme_lookup_by_gicon_LIB LIB_GTK
+#define gtk_image_set_from_gicon_LIB LIB_GTK
+#define gdk_keyboard_ungrab_LIB LIB_GDK
 #define gtk_icon_theme_get_default_LIB LIB_GTK
 #define gtk_menu_item_remove_submenu_LIB LIB_GTK
 #define gtk_menu_shell_set_take_focus_LIB LIB_GTK
 #define gtk_menu_tool_button_new_LIB LIB_GTK
 #define gtk_window_set_keep_below_LIB LIB_GTK
 #define gtk_set_locale_LIB LIB_GTK
+#define gtk_scrollbar_new_LIB LIB_GTK
+#define gtk_hscrollbar_new_LIB LIB_GTK
+#define gtk_vscrollbar_new_LIB LIB_GTK
+#define gtk_separator_new_LIB LIB_GTK
+#define gtk_rc_parse_string_LIB LIB_GTK
+#define gtk_hseparator_new_LIB LIB_GTK
+#define gtk_vseparator_new_LIB LIB_GTK
 #define gtk_toolbar_set_orientation_LIB LIB_GTK
 #define gtk_tooltip_trigger_tooltip_query_LIB LIB_GTK
 #define gtk_tooltips_set_tip_LIB LIB_GTK
@@ -137,37 +201,103 @@
 #define gtk_tooltips_force_window_LIB LIB_GTK
 #define gtk_tree_selection_count_selected_rows_LIB LIB_GTK
 #define gtk_tree_selection_get_selected_rows_LIB LIB_GTK
+#define gtk_tree_view_column_get_button_LIB LIB_GTK
 #define gtk_tree_view_column_get_cell_renderers_LIB LIB_GTK
 #define gtk_tree_view_column_cell_get_position_LIB LIB_GTK
-#define gtk_tree_view_convert_widget_to_bin_window_coords_LIB LIB_GTK
+#define gtk_tree_view_convert_bin_window_to_tree_coords_LIB LIB_GTK
 #define gtk_tree_view_set_grid_lines_LIB LIB_GTK
 #define gtk_tree_view_widget_to_tree_coords_LIB LIB_GTK
 #define gtk_entry_set_alignment_LIB LIB_GTK
 #define gtk_entry_set_icon_from_stock_LIB LIB_GTK
 #define gtk_entry_set_icon_sensitive_LIB LIB_GTK
+#define gtk_tooltips_new_LIB LIB_GTK
 #define gdk_cursor_new_from_pixbuf_LIB LIB_GDK
+#define gdk_cursor_unref_LIB LIB_GDK
+#define gdk_device_manager_get_client_pointer_LIB LIB_GDK
+#define gdk_device_get_window_at_position_LIB LIB_GDK
+#define gdk_device_grab_LIB LIB_GDK
+#define gdk_device_ungrab_LIB LIB_GDK
+#define gdk_display_get_device_manager_LIB LIB_GDK
+#define gdk_device_get_associated_device_LIB LIB_GDK
 #define gdk_display_get_default_LIB LIB_GDK
 #define gdk_display_supports_cursor_color_LIB LIB_GDK
+#define gdk_drag_context_get_actions_LIB LIB_GDK
+#define gdk_drag_context_get_dest_window_LIB LIB_GDK
+#define gdk_drag_context_get_selected_action_LIB LIB_GDK
+#define gdk_drag_context_list_targets_LIB LIB_GDK
 #define gdk_draw_arc_LIB LIB_GDK
+#define gdk_draw_layout_LIB LIB_GDK
 #define gdk_draw_layout_with_colors_LIB LIB_GDK
 #define gdk_draw_line_LIB LIB_GDK
 #define gdk_draw_lines_LIB LIB_GDK
 #define gdk_draw_pixbuf_LIB LIB_GDK
 #define gdk_draw_point_LIB LIB_GDK
+#define gdk_draw_polygon_LIB LIB_GDK
+#define gdk_draw_image_LIB LIB_GDK
+#define gdk_drawable_get_size_LIB LIB_GDK
+#define gdk_drawable_get_image_LIB LIB_GDK
+#define gdk_drawable_get_visible_region_LIB LIB_GDK
+#define gdk_gc_new_LIB LIB_GDK
+#define gdk_draw_rectangle_LIB LIB_GDK
+#define gdk_gc_set_clip_region_LIB LIB_GDK
+#define gdk_gc_set_foreground_LIB LIB_GDK
+#define gdk_gc_set_function_LIB LIB_GDK
+#define gdk_gc_set_subwindow_LIB LIB_GDK
+#define gdk_draw_drawable_LIB LIB_GDK
+#define gdk_drawable_get_depth_LIB LIB_GDK
+#define gdk_pixmap_new_LIB LIB_GDK
+#define gdk_color_white_LIB LIB_GDK
+#define gdk_colormap_get_system_LIB LIB_GDK
+#define gdk_bitmap_create_from_data_LIB LIB_GDK
+#define gdk_cursor_new_from_pixmap_LIB LIB_GDK
+#define gdk_window_get_internal_paint_info_LIB LIB_GDK
+#define gdk_window_invalidate_region_LIB LIB_GDK
+#define gdk_window_shape_combine_region_LIB LIB_GDK
+#define gdk_window_set_back_pixmap_LIB LIB_GDK
 #define gdk_gc_set_background_LIB LIB_GDK
+#define gdk_gc_set_stipple_LIB LIB_GDK
 #define gdk_gc_set_clip_mask_LIB LIB_GDK
+#define gdk_gc_set_fill_LIB LIB_GDK
 #define gdk_gc_set_clip_origin_LIB LIB_GDK
 #define gdk_gc_set_dashes_LIB LIB_GDK
+#define gdk_gc_set_exposures_LIB LIB_GDK
 #define gdk_gc_set_line_attributes_LIB LIB_GDK
 #define gdk_gc_set_tile_LIB LIB_GDK
 #define gdk_gc_set_ts_origin_LIB LIB_GDK
+#define gdk_gc_set_values_LIB LIB_GDK
+#define gdk_gc_get_values_LIB LIB_GDK
 #define gdk_pixbuf_save_to_bufferv_LIB LIB_GDK
+#define gdk_pixbuf_get_from_drawable_LIB LIB_GDK
+#define gdk_pixbuf_get_from_window_LIB LIB_GDK
+#define gdk_pixbuf_render_pixmap_and_mask_LIB LIB_GDK
+#define gdk_pointer_grab_LIB LIB_GDK
+#define gdk_pointer_ungrab_LIB LIB_GDK
+#define gdk_region_polygon_LIB LIB_GDK
+#define gdk_region_get_rectangles_LIB LIB_GDK
 #define gdk_screen_get_default_LIB LIB_GDK
 #define gdk_screen_get_monitor_at_point_LIB LIB_GDK
 #define gdk_screen_get_monitor_at_window_LIB LIB_GDK
 #define gdk_screen_get_monitor_geometry_LIB LIB_GDK
 #define gdk_screen_get_n_monitors_LIB LIB_GDK
 #define gdk_screen_get_number_LIB LIB_GDK
+#define gdk_pixbuf_render_to_drawable_LIB LIB_GDK
+#define gdk_visual_get_depth_LIB LIB_GDK
+#define gtk_scrolled_window_get_hscrollbar_LIB LIB_GTK
+#define gtk_scrolled_window_get_vscrollbar_LIB LIB_GTK
+#define gtk_scale_new_LIB LIB_GTK
+#define gtk_style_context_add_provider_for_screen_LIB LIB_GTK
+#define gtk_style_context_add_provider_LIB LIB_GTK
+#define gtk_style_context_restore_LIB LIB_GTK
+#define gtk_style_context_save_LIB LIB_GTK
+#define gtk_style_context_set_state_LIB LIB_GTK
+#define gtk_style_render_icon_LIB LIB_GTK
+#define gtk_hscale_new_LIB LIB_GTK
+#define gtk_vscale_new_LIB LIB_GTK
+#define gtk_selection_data_get_data_LIB LIB_GTK
+#define gtk_selection_data_get_data_type_LIB LIB_GTK
+#define gtk_selection_data_get_format_LIB LIB_GTK
+#define gtk_selection_data_get_length_LIB LIB_GTK
+#define gtk_selection_data_get_target_LIB LIB_GTK
 #define gtk_status_icon_get_geometry_LIB LIB_GTK
 #define gtk_status_icon_get_visible_LIB LIB_GTK
 #define gtk_status_icon_new_LIB LIB_GTK
@@ -180,17 +310,56 @@
 #define gdk_window_create_similar_surface_LIB LIB_GDK
 #define gdk_window_lookup_LIB LIB_GDK
 #define gdk_window_restack_LIB LIB_GDK
+#define gdk_window_begin_paint_region_LIB LIB_GDK
+#define gdk_window_get_device_position_LIB LIB_GDK
+#define gdk_window_get_pointer_LIB LIB_GDK
+#define gdk_window_at_pointer_LIB LIB_GDK
+#define gdk_window_get_height_LIB LIB_GDK
+#define gdk_window_get_width_LIB LIB_GDK
+#define gdk_pixmap_get_size_LIB LIB_GDK
+#define gdk_window_get_display_LIB LIB_GDK
+#define gdk_window_get_visible_region_LIB LIB_GDK
 #define gdk_window_set_keep_above_LIB LIB_GDK
 #define gdk_window_set_accept_focus_LIB LIB_GDK
 #define gtk_window_set_opacity_LIB LIB_GTK
 #define gtk_window_set_skip_taskbar_hint_LIB LIB_GTK
 #define gtk_widget_is_composited_LIB LIB_GTK
+#define gtk_widget_get_allocation_LIB LIB_GTK
+#define gtk_widget_size_request_LIB LIB_GTK
+#define gtk_widget_get_preferred_size_LIB LIB_GTK
+#define gtk_widget_get_style_context_LIB LIB_GTK
 #define gtk_widget_get_tooltip_text_LIB LIB_GTK
+#define gtk_widget_get_visible_LIB LIB_GTK
+#define gtk_widget_get_state_flags_LIB LIB_GTK
+#define gtk_widget_has_focus_LIB LIB_GTK
+#define gtk_widget_has_default_LIB LIB_GTK
 #define gtk_widget_set_tooltip_text_LIB LIB_GTK
-#define gdk_pango_context_set_colormap_LIB LIB_GDK
+#define gtk_widget_set_has_window_LIB LIB_GTK
+#define gtk_fixed_set_has_window_LIB LIB_GTK
+#define gtk_widget_get_mapped_LIB LIB_GTK
+#define gtk_widget_get_sensitive_LIB LIB_GTK
+#define gtk_widget_get_has_window_LIB LIB_GTK
+#define gtk_widget_get_visible_LIB LIB_GTK
+#define gtk_widget_get_realized_LIB LIB_GTK
+#define gtk_widget_get_can_default_LIB LIB_GTK
+#define gtk_widget_get_window_LIB LIB_GTK
+#define gtk_widget_set_can_default_LIB LIB_GTK
+#define gtk_widget_set_can_focus_LIB LIB_GTK
+#define gtk_widget_set_mapped_LIB LIB_GTK
+#define gtk_widget_set_sensitive_LIB LIB_GTK
+#define gtk_widget_set_receives_default_LIB LIB_GTK
+#define gtk_widget_set_visible_LIB LIB_GTK
+#define gtk_widget_shape_combine_region_LIB LIB_GTK
+#define gtk_range_get_slider_range_LIB LIB_GTK
 #define gdk_x11_screen_get_window_manager_name_LIB LIB_GDK
 #define gdk_x11_screen_lookup_visual_LIB LIB_GDK
 #define gdk_x11_window_lookup_for_display_LIB LIB_GDK
+#define gdk_x11_display_utf8_to_compound_text_LIB LIB_GDK
+#define gdk_x11_drawable_get_xdisplay_LIB LIB_GDK
+#define gdk_x11_drawable_get_xid_LIB LIB_GDK
+#define gdk_x11_get_default_xdisplay_LIB LIB_GDK
+#define gdk_x11_window_get_xid_LIB LIB_GDK
+#define gdk_utf8_to_compound_text_LIB LIB_GDK
 #define gdk_threads_set_lock_functions_LIB LIB_GDK
 
 #define atk_object_add_relationship_LIB LIB_ATK
@@ -212,12 +381,33 @@
 #define pango_cairo_font_map_get_default_LIB LIB_PANGOCAIRO
 #define pango_cairo_font_map_set_resolution_LIB LIB_PANGOCAIRO
 #define gdk_cairo_reset_clip_LIB LIB_GDK
+#define gdk_cairo_get_clip_rectangle_LIB LIB_GDK
+#define gdk_cairo_set_source_pixbuf_LIB LIB_GDK
 #define gdk_cairo_set_source_color_LIB LIB_GDK
 #define gdk_cairo_set_source_window_LIB LIB_GDK
+#define gdk_cairo_region_create_from_surface_LIB LIB_GDK
 #define gdk_cairo_region_LIB LIB_GDK
 #define gdk_cairo_create_LIB LIB_GDK
+#define gdk_colormap_alloc_color_LIB LIB_GDK
+#define gdk_colormap_free_colors_LIB LIB_GDK
 #define gtk_enumerate_printers_LIB LIB_GTK
+#define gtk_object_sink_LIB LIB_GTK
 #define gtk_orientable_set_orientation_LIB LIB_GTK
+#define gtk_paint_arrow_LIB LIB_GTK
+#define gtk_paint_box_LIB LIB_GTK
+#define gtk_paint_box_gap_LIB LIB_GTK
+#define gtk_paint_handle_LIB LIB_GTK
+#define gtk_paint_focus_LIB LIB_GTK
+#define gtk_paint_expander_LIB LIB_GTK
+#define gtk_paint_extension_LIB LIB_GTK
+#define gtk_paint_hline_LIB LIB_GTK
+#define gtk_paint_vline_LIB LIB_GTK
+#define gtk_paint_flat_box_LIB LIB_GTK
+#define gtk_paint_check_LIB LIB_GTK
+#define gtk_paint_shadow_LIB LIB_GTK
+#define gtk_paint_shadow_gap_LIB LIB_GTK
+#define gtk_paint_option_LIB LIB_GTK
+#define gtk_paint_layout_LIB LIB_GTK
 #define gtk_page_setup_get_bottom_margin_LIB LIB_GTK
 #define gtk_page_setup_get_left_margin_LIB LIB_GTK
 #define gtk_page_setup_get_orientation_LIB LIB_GTK
@@ -287,6 +477,20 @@
 #define gtk_printer_get_backend_LIB LIB_GTK
 #define gtk_printer_get_name_LIB LIB_GTK
 #define gtk_printer_is_default_LIB LIB_GTK
+#define gtk_render_check_LIB LIB_GTK
+#define gtk_render_extension_LIB LIB_GTK
+#define gtk_render_expander_LIB LIB_GTK
+#define gtk_render_handle_LIB LIB_GTK
+#define gtk_render_arrow_LIB LIB_GTK
+#define gtk_render_line_LIB LIB_GTK
+#define gtk_render_focus_LIB LIB_GTK
+#define gtk_render_frame_LIB LIB_GTK
+#define gtk_render_frame_gap_LIB LIB_GTK
+#define gtk_render_background_LIB LIB_GTK
+#define gtk_render_option_LIB LIB_GTK
+#define gtk_render_layout_LIB LIB_GTK
+#define gtk_progress_bar_set_inverted_LIB LIB_GTK
+#define gtk_progress_bar_set_orientation_LIB LIB_GTK
 #define ubuntu_menu_proxy_get_LIB LIB_GTK
 #define FcConfigAppFontAddFile_LIB LIB_FONTCONFIG
 
@@ -321,35 +525,145 @@
 #define g_icon_to_string_LIB LIB_GIO
 #define g_icon_new_for_string_LIB LIB_GIO
 #define g_file_query_info_LIB LIB_GIO
+#define g_object_ref_sink_LIB LIB_GOBJECT
+
+// GTK3 only
+#define gtk_widget_draw_LIB LIB_GTK
+#define gtk_widget_override_color_LIB LIB_GTK
+#define gtk_widget_override_background_color_LIB LIB_GTK
+#define gtk_widget_override_font_LIB LIB_GTK
+#define gtk_widget_get_preferred_height_for_width_LIB LIB_GTK
+#define gtk_widget_get_preferred_width_for_height_LIB LIB_GTK
+#define gtk_style_context_get_font_LIB LIB_GTK
+#define gtk_style_context_get_color_LIB LIB_GTK
+#define gtk_style_context_get_background_color_LIB LIB_GTK
+#define gtk_style_context_add_class_LIB LIB_GTK
+#define gtk_style_context_get_border_color_LIB LIB_GTK
+#define gtk_style_context_get_padding_LIB LIB_GTK
+#define gtk_style_context_get_border_LIB LIB_GTK
+#define gtk_style_context_invalidate_LIB LIB_GTK
+#define gtk_hsv_to_rgb_LIB LIB_GTK
+#define gtk_rgb_to_hsv_LIB LIB_GTK
+#define gdk_window_set_background_pattern_LIB LIB_GTK
+#define gtk_widget_input_shape_combine_region_LIB LIB_GTK
+#define gtk_entry_set_placeholder_text_LIB LIB_GTK
+#define gtk_entry_get_icon_area_LIB LIB_GTK
+#define gdk_event_get_scroll_deltas_LIB LIB_GTK
+#define gtk_cell_renderer_set_fixed_size_LIB LIB_GTK
+#define gtk_cell_renderer_get_preferred_height_for_width_LIB LIB_GTK
+#define gtk_css_provider_load_from_data_LIB LIB_GTK
+#define gtk_css_provider_new_LIB LIB_GTK
+#define gtk_icon_set_render_icon_pixbuf_LIB LIB_GTK
+#define gtk_drag_set_icon_surface_LIB LIB_GTK
+
+#ifndef g_thread_supported
+#define g_thread_supported() 0
+#endif
 
 /* Field accessors */
+#if GTK_CHECK_VERSION(3,0,0)
+#define GTK_WIDGET_FLAGS(arg0) 0
+#endif
 #define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor
 #define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1
+#if GTK_CHECK_VERSION(3,0,0)
+#define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1)
+#define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) 0
+#else
 #define GTK_ACCEL_LABEL_SET_ACCEL_STRING(arg0, arg1) (arg0)->accel_string = arg1
 #define GTK_ACCEL_LABEL_GET_ACCEL_STRING(arg0) (arg0)->accel_string
+#endif
+#if GTK_CHECK_VERSION(2,20,0)
+#define GTK_RANGE_SLIDER_START(arg0) 0
+#else
 #define GTK_RANGE_SLIDER_START(arg0) (arg0)->slider_start
+#endif
+#if GTK_CHECK_VERSION(2,20,0)
+#define GTK_RANGE_SLIDER_END(arg0) 0
+#else
 #define GTK_RANGE_SLIDER_END(arg0) (arg0)->slider_end
-#define GTK_RANGE_HAS_STEPPER_A(arg0) (arg0)->has_stepper_a
-#define GTK_RANGE_HAS_STEPPER_B(arg0) (arg0)->has_stepper_b
-#define GTK_RANGE_HAS_STEPPER_C(arg0) (arg0)->has_stepper_c
-#define GTK_RANGE_HAS_STEPPER_D(arg0) (arg0)->has_stepper_d
+#endif
+#if GTK_CHECK_VERSION(2,8,0)
+#define GTK_SCROLLED_WINDOW_HSCROLLBAR(arg0) 0
+#else
 #define GTK_SCROLLED_WINDOW_HSCROLLBAR(arg0) (arg0)->hscrollbar
+#endif
 #define GTK_SCROLLED_WINDOW_SCROLLBAR_SPACING(arg0) (GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing >= 0 ? GTK_SCROLLED_WINDOW_GET_CLASS (arg0)->scrollbar_spacing : 3)		
+#if GTK_CHECK_VERSION(2,8,0)
+#define GTK_SCROLLED_WINDOW_VSCROLLBAR(arg0) 0
+#else
 #define GTK_SCROLLED_WINDOW_VSCROLLBAR(arg0) (arg0)->vscrollbar
+#endif
+#ifndef GTK_WIDGET_HAS_DEFAULT
+#define GTK_WIDGET_HAS_DEFAULT(arg0) 0
+#endif
+#ifndef GTK_WIDGET_HAS_FOCUS
+#define GTK_WIDGET_HAS_FOCUS(arg0) 0
+#endif
+#ifndef GTK_WIDGET_SENSITIVE
+#define GTK_WIDGET_SENSITIVE(arg0) 0
+#endif
+#ifndef GTK_WIDGET_SET_FLAGS
+#define GTK_WIDGET_SET_FLAGS(arg0, arg1)
+#endif
+#ifndef GTK_WIDGET_UNSET_FLAGS
+#define GTK_WIDGET_UNSET_FLAGS(arg0, arg1)
+#endif
+#ifndef GTK_OBJECT_FLAGS
+#define GTK_OBJECT_FLAGS(arg0) arg0
+#endif
+#ifndef GTK_WIDGET_VISIBLE
+#define GTK_WIDGET_VISIBLE(arg0) 0
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_HEIGHT(arg0) 0
+#else
 #define GTK_WIDGET_HEIGHT(arg0) (arg0)->allocation.height
-#define GTK_WIDGET_SET_HEIGHT(arg0, arg1) (arg0)->allocation.height = arg1
+#endif
+#ifndef GTK_WIDGET_MAPPED
+#define GTK_WIDGET_MAPPED(arg0) 0
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_WIDTH(arg0) 0
+#else
 #define GTK_WIDGET_WIDTH(arg0) (arg0)->allocation.width
-#define GTK_WIDGET_SET_WIDTH(arg0, arg1) (arg0)->allocation.width = arg1
+#endif
+#if GTK_CHECK_VERSION(2,14,0)
+#define GTK_WIDGET_WINDOW(arg0) 0
+#else
 #define GTK_WIDGET_WINDOW(arg0) (arg0)->window
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_X(arg0) 0
+#else
 #define GTK_WIDGET_X(arg0) (arg0)->allocation.x
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_SET_X(arg0, arg1)
+#else
 #define GTK_WIDGET_SET_X(arg0, arg1) (arg0)->allocation.x = arg1
+#endif
 #define GTK_ENTRY_IM_CONTEXT(arg0) (arg0)->im_context
 #define GTK_TEXTVIEW_IM_CONTEXT(arg0) (arg0)->im_context
+#if GTK_CHECK_VERSION(2,12,0)
+#define GTK_TOOLTIPS_TIP_WINDOW(arg0) 0
+#define GTK_TOOLTIPS_SET_ACTIVE(arg0, arg1)
+#define GTK_TOOLTIPS_GET_TIP_TEXT(arg0) 0
+#else
 #define GTK_TOOLTIPS_TIP_WINDOW(arg0) (arg0)->tip_window
 #define GTK_TOOLTIPS_SET_ACTIVE(arg0, arg1) (arg0)->active_tips_data = arg1
 #define GTK_TOOLTIPS_GET_TIP_TEXT(arg0) (arg0)->tip_text
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_Y(arg0) 0
+#else
 #define GTK_WIDGET_Y(arg0) ((GtkWidget *)arg0)->allocation.y
+#endif
+#if GTK_CHECK_VERSION(2,18,0)
+#define GTK_WIDGET_SET_Y(arg0, arg1)
+#else
 #define GTK_WIDGET_SET_Y(arg0, arg1) (arg0)->allocation.y = arg1
+#endif
 #define GTK_WIDGET_REQUISITION_WIDTH(arg0) (arg0)->requisition.width
 #define GTK_WIDGET_REQUISITION_HEIGHT(arg0) (arg0)->requisition.height
 #define GDK_EVENT_TYPE(arg0) (arg0)->type
@@ -397,3 +711,39 @@ gchar* g_utf16_offset_to_pointer(const gchar*, glong);
 glong g_utf16_strlen(const gchar*, glong max);
 glong g_utf16_offset_to_utf8_offset(const gchar*, glong);
 glong g_utf8_offset_to_utf16_offset(const gchar*, glong);
+
+#ifndef NO_SwtFixed
+
+#define SWT_TYPE_FIXED (swt_fixed_get_type ())
+#define SWT_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWT_TYPE_FIXED, SwtFixed))
+#define SWT_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWT_TYPE_FIXED, SwtFixedClass))
+#define SWT_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWT_TYPE_FIXED))
+#define SWT_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWT_TYPE_FIXED))
+#define SWT_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWT_TYPE_FIXED, SwtFixedClass))
+
+
+typedef struct _SwtFixed SwtFixed;
+typedef struct _SwtFixedPrivate SwtFixedPrivate;
+typedef struct _SwtFixedClass SwtFixedClass;
+
+struct _SwtFixed
+{
+  GtkContainer container;
+
+  /*< private >*/
+  SwtFixedPrivate *priv;
+};
+
+struct _SwtFixedClass
+{
+  GtkContainerClass parent_class;
+};
+
+GType swt_fixed_get_type (void) G_GNUC_CONST;
+
+void swt_fixed_restack(SwtFixed *fixed, GtkWidget *widget, GtkWidget *sibling, gboolean above);
+void swt_fixed_move(SwtFixed *fixed, GtkWidget *widget, gint x, gint y);
+void swt_fixed_resize(SwtFixed *fixed, GtkWidget *widget, gint width, gint height);
+
+#endif
+
diff --git a/os_stats.c b/os_stats.c
index f444a42..e0480b4 100644
--- a/os_stats.c
+++ b/os_stats.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,8 +18,6 @@
 
 #ifdef NATIVE_STATS
 
-int OS_nativeFunctionCount = 1402;
-int OS_nativeFunctionCallCount[1402];
 char * OS_nativeFunctionNames[] = {
 #ifndef JNI64
 	"Call__IIII",
@@ -39,10 +37,6 @@ char * OS_nativeFunctionNames[] = {
 	"GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING",
 	"GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING",
 	"GTK_1ENTRY_1IM_1CONTEXT",
-	"GTK_1RANGE_1HAS_1STEPPER_1A",
-	"GTK_1RANGE_1HAS_1STEPPER_1B",
-	"GTK_1RANGE_1HAS_1STEPPER_1C",
-	"GTK_1RANGE_1HAS_1STEPPER_1D",
 	"GTK_1RANGE_1SLIDER_1END",
 	"GTK_1RANGE_1SLIDER_1START",
 	"GTK_1SCROLLED_1WINDOW_1HSCROLLBAR",
@@ -52,11 +46,10 @@ char * OS_nativeFunctionNames[] = {
 	"GTK_1TOOLTIPS_1GET_1TIP_1TEXT",
 	"GTK_1TOOLTIPS_1SET_1ACTIVE",
 	"GTK_1TOOLTIPS_1TIP_1WINDOW",
+	"GTK_1TYPE_1ACCESSIBLE",
 	"GTK_1WIDGET_1HEIGHT",
 	"GTK_1WIDGET_1REQUISITION_1HEIGHT",
 	"GTK_1WIDGET_1REQUISITION_1WIDTH",
-	"GTK_1WIDGET_1SET_1HEIGHT",
-	"GTK_1WIDGET_1SET_1WIDTH",
 	"GTK_1WIDGET_1SET_1X",
 	"GTK_1WIDGET_1SET_1Y",
 	"GTK_1WIDGET_1WIDTH",
@@ -87,11 +80,9 @@ char * OS_nativeFunctionNames[] = {
 	"GdkEventVisibility_1sizeof",
 	"GdkEventWindowState_1sizeof",
 	"GdkEvent_1sizeof",
-	"GdkGCValues_1sizeof",
 	"GdkGeometry_1sizeof",
-	"GdkImage_1sizeof",
+	"GdkRGBA_1sizeof",
 	"GdkRectangle_1sizeof",
-	"GdkVisual_1sizeof",
 	"GdkWindowAttr_1sizeof",
 	"GtkAdjustment_1sizeof",
 	"GtkAllocation_1sizeof",
@@ -103,12 +94,9 @@ char * OS_nativeFunctionNames[] = {
 	"GtkCellRendererToggleClass_1sizeof",
 	"GtkCellRendererToggle_1sizeof",
 	"GtkColorSelectionDialog_1sizeof",
-	"GtkFixedClass_1sizeof",
-	"GtkFixed_1sizeof",
 	"GtkRequisition_1sizeof",
 	"GtkSelectionData_1sizeof",
 	"GtkTargetEntry_1sizeof",
-	"GtkTargetPair_1sizeof",
 	"GtkTextIter_1sizeof",
 	"GtkTreeIter_1sizeof",
 	"PangoAttrColor_1sizeof",
@@ -140,6 +128,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1GDK_1TYPE_1PIXBUF",
 	"_1GString_1len",
 	"_1GString_1str",
+	"_1GTK_1ACCESSIBLE",
 	"_1GTK_1IS_1ACCEL_1LABEL",
 	"_1GTK_1IS_1BUTTON",
 	"_1GTK_1IS_1CELL_1RENDERER_1PIXBUF",
@@ -159,6 +148,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1GTK_1TYPE_1CELL_1RENDERER_1TEXT",
 	"_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE",
 	"_1GTK_1TYPE_1FIXED",
+	"_1GTK_1TYPE_1IM_1MULTICONTEXT",
 	"_1GTK_1TYPE_1MENU",
 	"_1GTK_1TYPE_1WIDGET",
 	"_1GTK_1WIDGET_1FLAGS",
@@ -167,7 +157,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1GTK_1WIDGET_1MAPPED",
 	"_1GTK_1WIDGET_1SENSITIVE",
 	"_1GTK_1WIDGET_1SET_1FLAGS",
-	"_1GTK_1WIDGET_1STATE",
 	"_1GTK_1WIDGET_1UNSET_1FLAGS",
 	"_1GTK_1WIDGET_1VISIBLE",
 	"_1G_1OBJECT_1CLASS",
@@ -180,8 +169,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1PANGO_1TYPE_1FONT_1DESCRIPTION",
 	"_1PANGO_1TYPE_1LAYOUT",
 	"_1XCheckIfEvent",
-	"_1XCheckMaskEvent",
-	"_1XCheckWindowEvent",
 	"_1XDefaultRootWindow",
 	"_1XDefaultScreen",
 	"_1XFlush",
@@ -192,7 +179,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1XKeysymToKeycode",
 	"_1XListProperties",
 	"_1XQueryPointer",
-	"_1XQueryTree",
 	"_1XReconfigureWMWindow",
 	"_1XRenderComposite",
 	"_1XRenderCreatePicture",
@@ -217,7 +203,22 @@ char * OS_nativeFunctionNames[] = {
 	"_1access",
 	"_1atk_1object_1add_1relationship",
 	"_1atk_1object_1remove_1relationship",
-	"_1call",
+#ifndef JNI64
+	"_1call__IIIII",
+#else
+	"_1call__JJJJJ",
+#endif
+#ifndef JNI64
+	"_1call__IIIIIII",
+#else
+	"_1call__JJJJJJJ",
+#endif
+#ifndef JNI64
+	"_1call__IIIIIIII",
+#else
+	"_1call__JJJJJJJJ",
+#endif
+	"_1call_1get_1size",
 	"_1dlclose",
 	"_1dlopen",
 	"_1dlsym",
@@ -226,7 +227,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1app_1info_1get_1default_1for_1type",
 	"_1g_1app_1info_1get_1executable",
 	"_1g_1app_1info_1get_1icon",
-	"_1g_1app_1info_1get_1id",
 	"_1g_1app_1info_1get_1name",
 	"_1g_1app_1info_1launch",
 	"_1g_1app_1info_1launch_1default_1for_1uri",
@@ -236,15 +236,10 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1closure_1ref",
 	"_1g_1closure_1unref",
 	"_1g_1content_1type_1equals",
-	"_1g_1content_1type_1get_1mime_1type",
 	"_1g_1content_1type_1is_1a",
-	"_1g_1content_1types_1get_1registered",
 	"_1g_1data_1input_1stream_1new",
 	"_1g_1data_1input_1stream_1read_1line",
-	"_1g_1desktop_1app_1info_1new_1from_1filename",
-	"_1g_1file_1get_1path",
 	"_1g_1file_1get_1uri",
-	"_1g_1file_1icon_1get_1file",
 	"_1g_1file_1info_1get_1content_1type",
 	"_1g_1file_1info_1get_1modification_1time",
 	"_1g_1file_1new_1for_1commandline_1arg",
@@ -253,6 +248,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1file_1query_1info",
 	"_1g_1file_1read",
 	"_1g_1file_1test",
+	"_1g_1filename_1display_1name",
 	"_1g_1filename_1from_1uri",
 	"_1g_1filename_1from_1utf8",
 	"_1g_1filename_1to_1uri",
@@ -273,11 +269,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1list_1prepend",
 	"_1g_1list_1previous",
 	"_1g_1list_1remove_1link",
-	"_1g_1list_1reverse",
 	"_1g_1list_1set_1next",
 	"_1g_1list_1set_1previous",
-	"_1g_1locale_1from_1utf8",
-	"_1g_1locale_1to_1utf8",
 	"_1g_1log_1default_1handler",
 	"_1g_1log_1remove_1handler",
 	"_1g_1log_1set_1handler",
@@ -286,7 +279,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1main_1context_1default",
 	"_1g_1main_1context_1get_1poll_1func",
 	"_1g_1main_1context_1iteration",
-	"_1g_1main_1context_1pending",
 	"_1g_1main_1context_1prepare",
 	"_1g_1main_1context_1query",
 	"_1g_1main_1context_1release",
@@ -306,6 +298,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1object_1new",
 	"_1g_1object_1notify",
 	"_1g_1object_1ref",
+	"_1g_1object_1ref_1sink",
 #ifndef JNI64
 	"_1g_1object_1set__I_3BFI",
 #else
@@ -342,7 +335,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1set_1prgname",
 	"_1g_1signal_1add_1emission_1hook",
 	"_1g_1signal_1connect",
-	"_1g_1signal_1connect_1after",
 	"_1g_1signal_1connect_1closure",
 	"_1g_1signal_1connect_1closure_1by_1id",
 #ifndef JNI64
@@ -373,7 +365,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1signal_1handler_1disconnect",
 	"_1g_1signal_1handler_1find",
 	"_1g_1signal_1handlers_1block_1matched",
-	"_1g_1signal_1handlers_1disconnect_1matched",
 	"_1g_1signal_1handlers_1unblock_1matched",
 	"_1g_1signal_1lookup",
 	"_1g_1signal_1remove_1emission_1hook",
@@ -406,7 +397,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1g_1utf16_1pointer_1to_1offset",
 	"_1g_1utf16_1strlen",
 	"_1g_1utf16_1to_1utf8",
-	"_1g_1utf8_1offset_1to_1pointer",
 	"_1g_1utf8_1offset_1to_1utf16_1offset",
 	"_1g_1utf8_1pointer_1to_1offset",
 	"_1g_1utf8_1strlen",
@@ -426,9 +416,12 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1beep",
 	"_1gdk_1bitmap_1create_1from_1data",
 	"_1gdk_1cairo_1create",
+	"_1gdk_1cairo_1get_1clip_1rectangle",
 	"_1gdk_1cairo_1region",
+	"_1gdk_1cairo_1region_1create_1from_1surface",
 	"_1gdk_1cairo_1reset_1clip",
 	"_1gdk_1cairo_1set_1source_1color",
+	"_1gdk_1cairo_1set_1source_1pixbuf",
 	"_1gdk_1cairo_1set_1source_1window",
 	"_1gdk_1color_1free",
 	"_1gdk_1color_1parse",
@@ -436,13 +429,22 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1colormap_1alloc_1color",
 	"_1gdk_1colormap_1free_1colors",
 	"_1gdk_1colormap_1get_1system",
-	"_1gdk_1colormap_1query_1color",
 	"_1gdk_1cursor_1new",
 	"_1gdk_1cursor_1new_1from_1pixbuf",
 	"_1gdk_1cursor_1new_1from_1pixmap",
 	"_1gdk_1cursor_1unref",
+	"_1gdk_1device_1get_1associated_1device",
+	"_1gdk_1device_1get_1window_1at_1position",
+	"_1gdk_1device_1grab",
+	"_1gdk_1device_1manager_1get_1client_1pointer",
+	"_1gdk_1device_1ungrab",
 	"_1gdk_1display_1get_1default",
+	"_1gdk_1display_1get_1device_1manager",
 	"_1gdk_1display_1supports_1cursor_1color",
+	"_1gdk_1drag_1context_1get_1actions",
+	"_1gdk_1drag_1context_1get_1dest_1window",
+	"_1gdk_1drag_1context_1get_1selected_1action",
+	"_1gdk_1drag_1context_1list_1targets",
 	"_1gdk_1drag_1status",
 	"_1gdk_1draw_1arc",
 	"_1gdk_1draw_1drawable",
@@ -465,7 +467,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1event_1free",
 	"_1gdk_1event_1get",
 	"_1gdk_1event_1get_1coords",
-	"_1gdk_1event_1get_1root_1coords",
+	"_1gdk_1event_1get_1scroll_1deltas",
 	"_1gdk_1event_1get_1state",
 	"_1gdk_1event_1get_1time",
 	"_1gdk_1event_1handler_1set",
@@ -496,12 +498,11 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1keymap_1translate_1keyboard_1state",
 	"_1gdk_1keyval_1to_1lower",
 	"_1gdk_1keyval_1to_1unicode",
-	"_1gdk_1pango_1attr_1embossed_1new",
 	"_1gdk_1pango_1context_1get",
-	"_1gdk_1pango_1context_1set_1colormap",
 	"_1gdk_1pango_1layout_1get_1clip_1region",
 	"_1gdk_1pixbuf_1copy_1area",
 	"_1gdk_1pixbuf_1get_1from_1drawable",
+	"_1gdk_1pixbuf_1get_1from_1window",
 	"_1gdk_1pixbuf_1get_1has_1alpha",
 	"_1gdk_1pixbuf_1get_1height",
 	"_1gdk_1pixbuf_1get_1pixels",
@@ -516,12 +517,10 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1pixbuf_1render_1pixmap_1and_1mask",
 	"_1gdk_1pixbuf_1render_1to_1drawable",
 	"_1gdk_1pixbuf_1save_1to_1bufferv",
-	"_1gdk_1pixbuf_1scale",
 	"_1gdk_1pixbuf_1scale_1simple",
-	"_1gdk_1pixmap_1foreign_1new",
+	"_1gdk_1pixmap_1get_1size",
 	"_1gdk_1pixmap_1new",
 	"_1gdk_1pointer_1grab",
-	"_1gdk_1pointer_1is_1grabbed",
 	"_1gdk_1pointer_1ungrab",
 	"_1gdk_1property_1get",
 	"_1gdk_1region_1destroy",
@@ -552,29 +551,33 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1unicode_1to_1keyval",
 	"_1gdk_1utf8_1to_1compound_1text",
 	"_1gdk_1utf8_1to_1string_1target",
+	"_1gdk_1visual_1get_1depth",
 	"_1gdk_1visual_1get_1system",
 	"_1gdk_1window_1add_1filter",
 	"_1gdk_1window_1at_1pointer",
 	"_1gdk_1window_1begin_1paint_1rect",
-	"_1gdk_1window_1clear_1area",
+	"_1gdk_1window_1begin_1paint_1region",
 	"_1gdk_1window_1create_1similar_1surface",
 	"_1gdk_1window_1destroy",
 	"_1gdk_1window_1end_1paint",
 	"_1gdk_1window_1focus",
-	"_1gdk_1window_1freeze_1updates",
 	"_1gdk_1window_1get_1children",
+	"_1gdk_1window_1get_1device_1position",
+	"_1gdk_1window_1get_1display",
 	"_1gdk_1window_1get_1events",
 	"_1gdk_1window_1get_1frame_1extents",
+	"_1gdk_1window_1get_1height",
 	"_1gdk_1window_1get_1internal_1paint_1info",
 	"_1gdk_1window_1get_1origin",
 	"_1gdk_1window_1get_1parent",
 	"_1gdk_1window_1get_1pointer",
 	"_1gdk_1window_1get_1position",
 	"_1gdk_1window_1get_1user_1data",
+	"_1gdk_1window_1get_1visible_1region",
+	"_1gdk_1window_1get_1width",
 	"_1gdk_1window_1hide",
 	"_1gdk_1window_1invalidate_1rect",
 	"_1gdk_1window_1invalidate_1region",
-	"_1gdk_1window_1is_1viewable",
 	"_1gdk_1window_1is_1visible",
 	"_1gdk_1window_1lookup",
 	"_1gdk_1window_1lower",
@@ -588,44 +591,56 @@ char * OS_nativeFunctionNames[] = {
 	"_1gdk_1window_1resize",
 	"_1gdk_1window_1restack",
 	"_1gdk_1window_1scroll",
-	"_1gdk_1window_1set_1accept_1focus",
 	"_1gdk_1window_1set_1back_1pixmap",
+	"_1gdk_1window_1set_1background_1pattern",
 	"_1gdk_1window_1set_1cursor",
 	"_1gdk_1window_1set_1debug_1updates",
 	"_1gdk_1window_1set_1decorations",
 	"_1gdk_1window_1set_1events",
-	"_1gdk_1window_1set_1icon",
-	"_1gdk_1window_1set_1icon_1list",
-	"_1gdk_1window_1set_1keep_1above",
 	"_1gdk_1window_1set_1override_1redirect",
 	"_1gdk_1window_1set_1user_1data",
 	"_1gdk_1window_1shape_1combine_1region",
 	"_1gdk_1window_1show",
 	"_1gdk_1window_1show_1unraised",
-	"_1gdk_1window_1thaw_1updates",
 	"_1gdk_1x11_1atom_1to_1xatom",
-	"_1gdk_1x11_1colormap_1get_1xcolormap",
 	"_1gdk_1x11_1display_1get_1xdisplay",
+	"_1gdk_1x11_1display_1utf8_1to_1compound_1text",
 	"_1gdk_1x11_1drawable_1get_1xdisplay",
 	"_1gdk_1x11_1drawable_1get_1xid",
+	"_1gdk_1x11_1get_1default_1xdisplay",
 	"_1gdk_1x11_1screen_1get_1window_1manager_1name",
 	"_1gdk_1x11_1screen_1lookup_1visual",
 	"_1gdk_1x11_1visual_1get_1xvisual",
+	"_1gdk_1x11_1window_1get_1xid",
 	"_1gdk_1x11_1window_1lookup_1for_1display",
+	"_1glib_1major_1version",
+	"_1glib_1micro_1version",
+	"_1glib_1minor_1version",
 	"_1gtk_1accel_1group_1new",
-	"_1gtk_1accel_1groups_1activate",
 	"_1gtk_1accel_1label_1set_1accel_1widget",
 	"_1gtk_1accelerator_1get_1default_1mod_1mask",
 	"_1gtk_1accelerator_1parse",
+	"_1gtk_1accessible_1get_1widget",
 	"_1gtk_1adjustment_1changed",
+	"_1gtk_1adjustment_1configure",
+	"_1gtk_1adjustment_1get_1lower",
+	"_1gtk_1adjustment_1get_1page_1increment",
+	"_1gtk_1adjustment_1get_1page_1size",
+	"_1gtk_1adjustment_1get_1step_1increment",
+	"_1gtk_1adjustment_1get_1upper",
+	"_1gtk_1adjustment_1get_1value",
 	"_1gtk_1adjustment_1new",
+	"_1gtk_1adjustment_1set_1page_1increment",
+	"_1gtk_1adjustment_1set_1step_1increment",
 	"_1gtk_1adjustment_1set_1value",
 	"_1gtk_1adjustment_1value_1changed",
 	"_1gtk_1arrow_1new",
 	"_1gtk_1arrow_1set",
 	"_1gtk_1bin_1get_1child",
 	"_1gtk_1border_1free",
+	"_1gtk_1box_1new",
 	"_1gtk_1box_1set_1child_1packing",
+	"_1gtk_1box_1set_1homogeneous",
 	"_1gtk_1box_1set_1spacing",
 	"_1gtk_1button_1clicked",
 	"_1gtk_1button_1get_1relief",
@@ -642,8 +657,11 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1cell_1layout_1get_1cells",
 	"_1gtk_1cell_1layout_1pack_1start",
 	"_1gtk_1cell_1layout_1set_1attributes",
+	"_1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width",
+	"_1gtk_1cell_1renderer_1get_1preferred_1size",
 	"_1gtk_1cell_1renderer_1get_1size",
 	"_1gtk_1cell_1renderer_1pixbuf_1new",
+	"_1gtk_1cell_1renderer_1set_1fixed_1size",
 	"_1gtk_1cell_1renderer_1text_1new",
 	"_1gtk_1cell_1renderer_1toggle_1new",
 	"_1gtk_1check_1button_1new",
@@ -654,13 +672,16 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1clipboard_1clear",
 	"_1gtk_1clipboard_1get",
 	"_1gtk_1clipboard_1set_1can_1store",
-	"_1gtk_1clipboard_1set_1with_1data",
 	"_1gtk_1clipboard_1set_1with_1owner",
 	"_1gtk_1clipboard_1store",
 	"_1gtk_1clipboard_1wait_1for_1contents",
+	"_1gtk_1color_1chooser_1dialog_1new",
+	"_1gtk_1color_1chooser_1get_1rgba",
+	"_1gtk_1color_1chooser_1set_1rgba",
+	"_1gtk_1color_1chooser_1set_1use_1alpha",
+	"_1gtk_1color_1selection_1dialog_1get_1color_1selection",
 	"_1gtk_1color_1selection_1dialog_1new",
 	"_1gtk_1color_1selection_1get_1current_1color",
-	"_1gtk_1color_1selection_1palette_1from_1string",
 	"_1gtk_1color_1selection_1palette_1to_1string",
 	"_1gtk_1color_1selection_1set_1current_1color",
 	"_1gtk_1color_1selection_1set_1has_1palette",
@@ -674,6 +695,11 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1combo_1box_1remove_1text",
 	"_1gtk_1combo_1box_1set_1active",
 	"_1gtk_1combo_1box_1set_1focus_1on_1click",
+	"_1gtk_1combo_1box_1text_1insert",
+	"_1gtk_1combo_1box_1text_1new",
+	"_1gtk_1combo_1box_1text_1new_1with_1entry",
+	"_1gtk_1combo_1box_1text_1remove",
+	"_1gtk_1combo_1box_1text_1remove_1all",
 	"_1gtk_1container_1add",
 	"_1gtk_1container_1forall",
 	"_1gtk_1container_1get_1border_1width",
@@ -681,6 +707,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1container_1remove",
 	"_1gtk_1container_1resize_1children",
 	"_1gtk_1container_1set_1border_1width",
+	"_1gtk_1css_1provider_1load_1from_1data",
+	"_1gtk_1css_1provider_1new",
 	"_1gtk_1dialog_1add_1button",
 	"_1gtk_1dialog_1run",
 	"_1gtk_1drag_1begin",
@@ -691,12 +719,11 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1drag_1finish",
 	"_1gtk_1drag_1get_1data",
 	"_1gtk_1drag_1set_1icon_1pixbuf",
-	"_1gtk_1drawing_1area_1new",
+	"_1gtk_1drag_1set_1icon_1surface",
 	"_1gtk_1editable_1copy_1clipboard",
 	"_1gtk_1editable_1cut_1clipboard",
 	"_1gtk_1editable_1delete_1selection",
 	"_1gtk_1editable_1delete_1text",
-	"_1gtk_1editable_1get_1chars",
 	"_1gtk_1editable_1get_1editable",
 	"_1gtk_1editable_1get_1position",
 	"_1gtk_1editable_1get_1selection_1bounds",
@@ -705,6 +732,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1editable_1select_1region",
 	"_1gtk_1editable_1set_1editable",
 	"_1gtk_1editable_1set_1position",
+	"_1gtk_1entry_1get_1icon_1area",
 	"_1gtk_1entry_1get_1inner_1border",
 	"_1gtk_1entry_1get_1invisible_1char",
 	"_1gtk_1entry_1get_1layout",
@@ -713,27 +741,24 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1entry_1get_1text",
 	"_1gtk_1entry_1get_1visibility",
 	"_1gtk_1entry_1new",
-	"_1gtk_1entry_1set_1activates_1default",
 	"_1gtk_1entry_1set_1alignment",
 	"_1gtk_1entry_1set_1has_1frame",
 	"_1gtk_1entry_1set_1icon_1from_1stock",
 	"_1gtk_1entry_1set_1icon_1sensitive",
 	"_1gtk_1entry_1set_1invisible_1char",
 	"_1gtk_1entry_1set_1max_1length",
+	"_1gtk_1entry_1set_1placeholder_1text",
 	"_1gtk_1entry_1set_1text",
 	"_1gtk_1entry_1set_1visibility",
+	"_1gtk_1entry_1set_1width_1chars",
 	"_1gtk_1entry_1text_1index_1to_1layout_1index",
 	"_1gtk_1enumerate_1printers",
-	"_1gtk_1events_1pending",
 	"_1gtk_1expander_1get_1expanded",
-	"_1gtk_1expander_1get_1label_1widget",
 	"_1gtk_1expander_1new",
 	"_1gtk_1expander_1set_1expanded",
-	"_1gtk_1expander_1set_1label",
 	"_1gtk_1expander_1set_1label_1widget",
 	"_1gtk_1file_1chooser_1add_1filter",
 	"_1gtk_1file_1chooser_1dialog_1new",
-	"_1gtk_1file_1chooser_1get_1current_1folder",
 	"_1gtk_1file_1chooser_1get_1filename",
 	"_1gtk_1file_1chooser_1get_1filenames",
 	"_1gtk_1file_1chooser_1get_1filter",
@@ -756,30 +781,31 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1fixed_1move",
 	"_1gtk_1fixed_1new",
 	"_1gtk_1fixed_1set_1has_1window",
+	"_1gtk_1font_1chooser_1dialog_1new",
+	"_1gtk_1font_1chooser_1get_1font",
+	"_1gtk_1font_1chooser_1set_1font",
 	"_1gtk_1font_1selection_1dialog_1get_1font_1name",
 	"_1gtk_1font_1selection_1dialog_1new",
 	"_1gtk_1font_1selection_1dialog_1set_1font_1name",
 	"_1gtk_1frame_1get_1label_1widget",
 	"_1gtk_1frame_1new",
-	"_1gtk_1frame_1set_1label",
 	"_1gtk_1frame_1set_1label_1widget",
 	"_1gtk_1frame_1set_1shadow_1type",
 	"_1gtk_1get_1current_1event",
 	"_1gtk_1get_1current_1event_1state",
-	"_1gtk_1get_1current_1event_1time",
 	"_1gtk_1get_1default_1language",
 	"_1gtk_1get_1event_1widget",
-	"_1gtk_1grab_1add",
 	"_1gtk_1grab_1get_1current",
-	"_1gtk_1grab_1remove",
 	"_1gtk_1hbox_1new",
 	"_1gtk_1hscale_1new",
 	"_1gtk_1hscrollbar_1new",
 	"_1gtk_1hseparator_1new",
+	"_1gtk_1hsv_1to_1rgb",
 	"_1gtk_1icon_1factory_1lookup_1default",
 	"_1gtk_1icon_1info_1free",
 	"_1gtk_1icon_1info_1load_1icon",
 	"_1gtk_1icon_1set_1render_1icon",
+	"_1gtk_1icon_1set_1render_1icon_1pixbuf",
 	"_1gtk_1icon_1source_1free",
 	"_1gtk_1icon_1source_1new",
 	"_1gtk_1icon_1source_1set_1pixbuf",
@@ -799,9 +825,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1image_1menu_1item_1set_1image",
 	"_1gtk_1image_1new",
 	"_1gtk_1image_1new_1from_1pixbuf",
-	"_1gtk_1image_1new_1from_1pixmap",
+	"_1gtk_1image_1set_1from_1gicon",
 	"_1gtk_1image_1set_1from_1pixbuf",
-	"_1gtk_1image_1set_1from_1pixmap",
 	"_1gtk_1init_1check",
 	"_1gtk_1label_1get_1layout",
 	"_1gtk_1label_1get_1mnemonic_1keyval",
@@ -830,34 +855,32 @@ char * OS_nativeFunctionNames[] = {
 #ifndef JNI64
 	"_1gtk_1list_1store_1set__IIIII",
 #else
-	"_1gtk_1list_1store_1set__JJIIJ",
+	"_1gtk_1list_1store_1set__JJIII",
 #endif
 #ifndef JNI64
 	"_1gtk_1list_1store_1set__IIIJI",
 #else
-	"_1gtk_1list_1store_1set__JJIJJ",
+	"_1gtk_1list_1store_1set__JJIJI",
 #endif
 #ifndef JNI64
 	"_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I",
 #else
-	"_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J",
+	"_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I",
 #endif
 #ifndef JNI64
 	"_1gtk_1list_1store_1set__IIIZI",
 #else
-	"_1gtk_1list_1store_1set__JJIZJ",
+	"_1gtk_1list_1store_1set__JJIZI",
 #endif
 #ifndef JNI64
 	"_1gtk_1list_1store_1set__III_3BI",
 #else
-	"_1gtk_1list_1store_1set__JJI_3BJ",
+	"_1gtk_1list_1store_1set__JJI_3BI",
 #endif
 	"_1gtk_1main",
 	"_1gtk_1main_1do_1event",
-	"_1gtk_1main_1iteration",
 	"_1gtk_1major_1version",
 	"_1gtk_1menu_1bar_1new",
-	"_1gtk_1menu_1get_1attach_1widget",
 	"_1gtk_1menu_1item_1get_1submenu",
 	"_1gtk_1menu_1item_1remove_1submenu",
 	"_1gtk_1menu_1item_1set_1submenu",
@@ -866,7 +889,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1menu_1popup",
 	"_1gtk_1menu_1shell_1deactivate",
 	"_1gtk_1menu_1shell_1insert",
-	"_1gtk_1menu_1shell_1select_1item",
 	"_1gtk_1menu_1shell_1set_1take_1focus",
 	"_1gtk_1menu_1tool_1button_1new",
 	"_1gtk_1message_1dialog_1new",
@@ -917,8 +939,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1paint_1option",
 	"_1gtk_1paint_1shadow",
 	"_1gtk_1paint_1shadow_1gap",
-	"_1gtk_1paint_1slider",
-	"_1gtk_1paint_1tab",
 	"_1gtk_1paint_1vline",
 	"_1gtk_1paper_1size_1free",
 	"_1gtk_1paper_1size_1get_1display_1name",
@@ -932,25 +952,16 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1paper_1size_1new_1from_1ppd",
 	"_1gtk_1plug_1get_1id",
 	"_1gtk_1plug_1new",
-	"_1gtk_1print_1job_1get_1printer",
-	"_1gtk_1print_1job_1get_1settings",
-	"_1gtk_1print_1job_1get_1status",
 	"_1gtk_1print_1job_1get_1surface",
-	"_1gtk_1print_1job_1get_1title",
 	"_1gtk_1print_1job_1new",
 	"_1gtk_1print_1job_1send",
-	"_1gtk_1print_1job_1set_1source_1file",
 	"_1gtk_1print_1settings_1foreach",
 	"_1gtk_1print_1settings_1get",
 	"_1gtk_1print_1settings_1get_1collate",
 	"_1gtk_1print_1settings_1get_1duplex",
 	"_1gtk_1print_1settings_1get_1n_1copies",
-	"_1gtk_1print_1settings_1get_1orientation",
 	"_1gtk_1print_1settings_1get_1page_1ranges",
-	"_1gtk_1print_1settings_1get_1paper_1height",
-	"_1gtk_1print_1settings_1get_1paper_1width",
 	"_1gtk_1print_1settings_1get_1print_1pages",
-	"_1gtk_1print_1settings_1get_1printer",
 	"_1gtk_1print_1settings_1get_1resolution",
 	"_1gtk_1print_1settings_1new",
 	"_1gtk_1print_1settings_1set",
@@ -977,6 +988,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1progress_1bar_1new",
 	"_1gtk_1progress_1bar_1pulse",
 	"_1gtk_1progress_1bar_1set_1fraction",
+	"_1gtk_1progress_1bar_1set_1inverted",
 	"_1gtk_1progress_1bar_1set_1orientation",
 	"_1gtk_1radio_1button_1get_1group",
 	"_1gtk_1radio_1button_1new",
@@ -984,6 +996,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1radio_1menu_1item_1new",
 	"_1gtk_1radio_1menu_1item_1new_1with_1label",
 	"_1gtk_1range_1get_1adjustment",
+	"_1gtk_1range_1get_1slider_1range",
 	"_1gtk_1range_1set_1increments",
 	"_1gtk_1range_1set_1inverted",
 	"_1gtk_1range_1set_1range",
@@ -996,20 +1009,42 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1rc_1style_1set_1color_1flags",
 	"_1gtk_1rc_1style_1set_1fg",
 	"_1gtk_1rc_1style_1set_1text",
+	"_1gtk_1render_1arrow",
+	"_1gtk_1render_1background",
+	"_1gtk_1render_1check",
+	"_1gtk_1render_1expander",
+	"_1gtk_1render_1extension",
+	"_1gtk_1render_1focus",
+	"_1gtk_1render_1frame",
+	"_1gtk_1render_1frame_1gap",
+	"_1gtk_1render_1handle",
+	"_1gtk_1render_1layout",
+	"_1gtk_1render_1line",
+	"_1gtk_1render_1option",
+	"_1gtk_1rgb_1to_1hsv",
+	"_1gtk_1scale_1new",
 	"_1gtk_1scale_1set_1digits",
 	"_1gtk_1scale_1set_1draw_1value",
+	"_1gtk_1scrollbar_1new",
 	"_1gtk_1scrolled_1window_1add_1with_1viewport",
 	"_1gtk_1scrolled_1window_1get_1hadjustment",
+	"_1gtk_1scrolled_1window_1get_1hscrollbar",
 	"_1gtk_1scrolled_1window_1get_1policy",
 	"_1gtk_1scrolled_1window_1get_1shadow_1type",
 	"_1gtk_1scrolled_1window_1get_1vadjustment",
+	"_1gtk_1scrolled_1window_1get_1vscrollbar",
 	"_1gtk_1scrolled_1window_1new",
-	"_1gtk_1scrolled_1window_1set_1placement",
 	"_1gtk_1scrolled_1window_1set_1policy",
 	"_1gtk_1scrolled_1window_1set_1shadow_1type",
 	"_1gtk_1selection_1data_1free",
+	"_1gtk_1selection_1data_1get_1data",
+	"_1gtk_1selection_1data_1get_1data_1type",
+	"_1gtk_1selection_1data_1get_1format",
+	"_1gtk_1selection_1data_1get_1length",
+	"_1gtk_1selection_1data_1get_1target",
 	"_1gtk_1selection_1data_1set",
 	"_1gtk_1separator_1menu_1item_1new",
+	"_1gtk_1separator_1new",
 	"_1gtk_1separator_1tool_1item_1new",
 	"_1gtk_1separator_1tool_1item_1set_1draw",
 	"_1gtk_1set_1locale",
@@ -1034,6 +1069,19 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1status_1icon_1set_1from_1pixbuf",
 	"_1gtk_1status_1icon_1set_1tooltip",
 	"_1gtk_1status_1icon_1set_1visible",
+	"_1gtk_1style_1context_1add_1class",
+	"_1gtk_1style_1context_1add_1provider",
+	"_1gtk_1style_1context_1add_1provider_1for_1screen",
+	"_1gtk_1style_1context_1get_1background_1color",
+	"_1gtk_1style_1context_1get_1border",
+	"_1gtk_1style_1context_1get_1border_1color",
+	"_1gtk_1style_1context_1get_1color",
+	"_1gtk_1style_1context_1get_1font",
+	"_1gtk_1style_1context_1get_1padding",
+	"_1gtk_1style_1context_1invalidate",
+	"_1gtk_1style_1context_1restore",
+	"_1gtk_1style_1context_1save",
+	"_1gtk_1style_1context_1set_1state",
 	"_1gtk_1style_1get_1base",
 	"_1gtk_1style_1get_1bg",
 	"_1gtk_1style_1get_1bg_1gc",
@@ -1060,7 +1108,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1text_1buffer_1cut_1clipboard",
 	"_1gtk_1text_1buffer_1delete",
 	"_1gtk_1text_1buffer_1get_1bounds",
-	"_1gtk_1text_1buffer_1get_1char_1count",
 	"_1gtk_1text_1buffer_1get_1end_1iter",
 	"_1gtk_1text_1buffer_1get_1insert",
 	"_1gtk_1text_1buffer_1get_1iter_1at_1line",
@@ -1101,9 +1148,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1text_1view_1set_1justification",
 	"_1gtk_1text_1view_1set_1tabs",
 	"_1gtk_1text_1view_1set_1wrap_1mode",
-	"_1gtk_1text_1view_1window_1to_1buffer_1coords",
 	"_1gtk_1toggle_1button_1get_1active",
-	"_1gtk_1toggle_1button_1get_1inconsistent",
 	"_1gtk_1toggle_1button_1new",
 	"_1gtk_1toggle_1button_1set_1active",
 	"_1gtk_1toggle_1button_1set_1inconsistent",
@@ -1121,8 +1166,8 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tool_1item_1set_1is_1important",
 	"_1gtk_1tool_1item_1set_1proxy_1menu_1item",
 	"_1gtk_1toolbar_1insert",
-	"_1gtk_1toolbar_1insert_1widget",
 	"_1gtk_1toolbar_1new",
+	"_1gtk_1toolbar_1set_1icon_1size",
 	"_1gtk_1toolbar_1set_1orientation",
 	"_1gtk_1toolbar_1set_1show_1arrow",
 	"_1gtk_1toolbar_1set_1style",
@@ -1135,12 +1180,12 @@ char * OS_nativeFunctionNames[] = {
 #ifndef JNI64
 	"_1gtk_1tree_1model_1get__III_3II",
 #else
-	"_1gtk_1tree_1model_1get__JJI_3IJ",
+	"_1gtk_1tree_1model_1get__JJI_3II",
 #endif
 #ifndef JNI64
 	"_1gtk_1tree_1model_1get__III_3JI",
 #else
-	"_1gtk_1tree_1model_1get__JJI_3JJ",
+	"_1gtk_1tree_1model_1get__JJI_3JI",
 #endif
 	"_1gtk_1tree_1model_1get_1iter",
 	"_1gtk_1tree_1model_1get_1iter_1first",
@@ -1153,12 +1198,10 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tree_1model_1iter_1nth_1child",
 	"_1gtk_1tree_1path_1append_1index",
 	"_1gtk_1tree_1path_1compare",
-	"_1gtk_1tree_1path_1down",
 	"_1gtk_1tree_1path_1free",
 	"_1gtk_1tree_1path_1get_1depth",
 	"_1gtk_1tree_1path_1get_1indices",
 	"_1gtk_1tree_1path_1new",
-	"_1gtk_1tree_1path_1new_1first",
 #ifndef JNI64
 	"_1gtk_1tree_1path_1new_1from_1string__I",
 #else
@@ -1169,12 +1212,10 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tree_1path_1prev",
 	"_1gtk_1tree_1path_1up",
 	"_1gtk_1tree_1selection_1count_1selected_1rows",
-	"_1gtk_1tree_1selection_1get_1selected",
 	"_1gtk_1tree_1selection_1get_1selected_1rows",
 	"_1gtk_1tree_1selection_1path_1is_1selected",
 	"_1gtk_1tree_1selection_1select_1all",
 	"_1gtk_1tree_1selection_1select_1iter",
-	"_1gtk_1tree_1selection_1selected_1foreach",
 	"_1gtk_1tree_1selection_1set_1mode",
 	"_1gtk_1tree_1selection_1unselect_1all",
 	"_1gtk_1tree_1selection_1unselect_1iter",
@@ -1186,27 +1227,27 @@ char * OS_nativeFunctionNames[] = {
 #ifndef JNI64
 	"_1gtk_1tree_1store_1set__IIIII",
 #else
-	"_1gtk_1tree_1store_1set__JJIIJ",
+	"_1gtk_1tree_1store_1set__JJIII",
 #endif
 #ifndef JNI64
 	"_1gtk_1tree_1store_1set__IIIJI",
 #else
-	"_1gtk_1tree_1store_1set__JJIJJ",
+	"_1gtk_1tree_1store_1set__JJIJI",
 #endif
 #ifndef JNI64
 	"_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I",
 #else
-	"_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J",
+	"_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I",
 #endif
 #ifndef JNI64
 	"_1gtk_1tree_1store_1set__IIIZI",
 #else
-	"_1gtk_1tree_1store_1set__JJIZJ",
+	"_1gtk_1tree_1store_1set__JJIZI",
 #endif
 #ifndef JNI64
 	"_1gtk_1tree_1store_1set__III_3BI",
 #else
-	"_1gtk_1tree_1store_1set__JJI_3BJ",
+	"_1gtk_1tree_1store_1set__JJI_3BI",
 #endif
 	"_1gtk_1tree_1view_1collapse_1row",
 	"_1gtk_1tree_1view_1column_1add_1attribute",
@@ -1214,14 +1255,11 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tree_1view_1column_1cell_1get_1size",
 	"_1gtk_1tree_1view_1column_1cell_1set_1cell_1data",
 	"_1gtk_1tree_1view_1column_1clear",
+	"_1gtk_1tree_1view_1column_1get_1button",
 	"_1gtk_1tree_1view_1column_1get_1cell_1renderers",
 	"_1gtk_1tree_1view_1column_1get_1fixed_1width",
 	"_1gtk_1tree_1view_1column_1get_1reorderable",
 	"_1gtk_1tree_1view_1column_1get_1resizable",
-	"_1gtk_1tree_1view_1column_1get_1sizing",
-	"_1gtk_1tree_1view_1column_1get_1sort_1indicator",
-	"_1gtk_1tree_1view_1column_1get_1sort_1order",
-	"_1gtk_1tree_1view_1column_1get_1spacing",
 	"_1gtk_1tree_1view_1column_1get_1visible",
 	"_1gtk_1tree_1view_1column_1get_1width",
 	"_1gtk_1tree_1view_1column_1new",
@@ -1237,10 +1275,9 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tree_1view_1column_1set_1sizing",
 	"_1gtk_1tree_1view_1column_1set_1sort_1indicator",
 	"_1gtk_1tree_1view_1column_1set_1sort_1order",
-	"_1gtk_1tree_1view_1column_1set_1title",
 	"_1gtk_1tree_1view_1column_1set_1visible",
 	"_1gtk_1tree_1view_1column_1set_1widget",
-	"_1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords",
+	"_1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords",
 	"_1gtk_1tree_1view_1create_1row_1drag_1icon",
 	"_1gtk_1tree_1view_1expand_1row",
 	"_1gtk_1tree_1view_1get_1background_1area",
@@ -1273,7 +1310,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1tree_1view_1unset_1rows_1drag_1dest",
 	"_1gtk_1tree_1view_1widget_1to_1tree_1coords",
 	"_1gtk_1vbox_1new",
-	"_1gtk_1viewport_1get_1shadow_1type",
 	"_1gtk_1viewport_1set_1shadow_1type",
 	"_1gtk_1vscale_1new",
 	"_1gtk_1vscrollbar_1new",
@@ -1292,53 +1328,74 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1widget_1create_1pango_1layout__J_3B",
 #endif
 	"_1gtk_1widget_1destroy",
+	"_1gtk_1widget_1draw",
 	"_1gtk_1widget_1event",
 	"_1gtk_1widget_1get_1accessible",
+	"_1gtk_1widget_1get_1allocation",
+	"_1gtk_1widget_1get_1can_1default",
 	"_1gtk_1widget_1get_1child_1visible",
-	"_1gtk_1widget_1get_1default_1direction",
 	"_1gtk_1widget_1get_1default_1style",
-	"_1gtk_1widget_1get_1direction",
 	"_1gtk_1widget_1get_1events",
+	"_1gtk_1widget_1get_1has_1window",
+	"_1gtk_1widget_1get_1mapped",
 	"_1gtk_1widget_1get_1modifier_1style",
 	"_1gtk_1widget_1get_1pango_1context",
 	"_1gtk_1widget_1get_1parent",
 	"_1gtk_1widget_1get_1parent_1window",
+	"_1gtk_1widget_1get_1preferred_1height_1for_1width",
+	"_1gtk_1widget_1get_1preferred_1size",
+	"_1gtk_1widget_1get_1preferred_1width_1for_1height",
+	"_1gtk_1widget_1get_1realized",
+	"_1gtk_1widget_1get_1sensitive",
 	"_1gtk_1widget_1get_1size_1request",
+	"_1gtk_1widget_1get_1state_1flags",
 	"_1gtk_1widget_1get_1style",
+	"_1gtk_1widget_1get_1style_1context",
 	"_1gtk_1widget_1get_1tooltip_1text",
 	"_1gtk_1widget_1get_1toplevel",
+	"_1gtk_1widget_1get_1visible",
+	"_1gtk_1widget_1get_1window",
 	"_1gtk_1widget_1grab_1focus",
+	"_1gtk_1widget_1has_1default",
+	"_1gtk_1widget_1has_1focus",
 	"_1gtk_1widget_1hide",
+	"_1gtk_1widget_1input_1shape_1combine_1region",
 	"_1gtk_1widget_1is_1composited",
 	"_1gtk_1widget_1is_1focus",
 	"_1gtk_1widget_1map",
 	"_1gtk_1widget_1mnemonic_1activate",
 	"_1gtk_1widget_1modify_1base",
 	"_1gtk_1widget_1modify_1bg",
-	"_1gtk_1widget_1modify_1fg",
 	"_1gtk_1widget_1modify_1font",
 	"_1gtk_1widget_1modify_1style",
-	"_1gtk_1widget_1modify_1text",
+	"_1gtk_1widget_1override_1background_1color",
+	"_1gtk_1widget_1override_1color",
+	"_1gtk_1widget_1override_1font",
 	"_1gtk_1widget_1queue_1resize",
 	"_1gtk_1widget_1realize",
 	"_1gtk_1widget_1remove_1accelerator",
 	"_1gtk_1widget_1reparent",
 	"_1gtk_1widget_1send_1expose",
+	"_1gtk_1widget_1set_1allocation",
 	"_1gtk_1widget_1set_1app_1paintable",
+	"_1gtk_1widget_1set_1can_1default",
+	"_1gtk_1widget_1set_1can_1focus",
 	"_1gtk_1widget_1set_1default_1direction",
 	"_1gtk_1widget_1set_1direction",
 	"_1gtk_1widget_1set_1double_1buffered",
+	"_1gtk_1widget_1set_1has_1window",
+	"_1gtk_1widget_1set_1mapped",
 	"_1gtk_1widget_1set_1name",
 	"_1gtk_1widget_1set_1parent_1window",
+	"_1gtk_1widget_1set_1receives_1default",
 	"_1gtk_1widget_1set_1redraw_1on_1allocate",
 	"_1gtk_1widget_1set_1sensitive",
 	"_1gtk_1widget_1set_1size_1request",
 	"_1gtk_1widget_1set_1state",
-	"_1gtk_1widget_1set_1style",
 	"_1gtk_1widget_1set_1tooltip_1text",
-	"_1gtk_1widget_1shape_1combine_1mask",
+	"_1gtk_1widget_1set_1visible",
+	"_1gtk_1widget_1shape_1combine_1region",
 	"_1gtk_1widget_1show",
-	"_1gtk_1widget_1show_1now",
 	"_1gtk_1widget_1size_1allocate",
 	"_1gtk_1widget_1size_1request",
 #ifndef JNI64
@@ -1352,7 +1409,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1widget_1style_1get__J_3B_3JJ",
 #endif
 	"_1gtk_1widget_1translate_1coordinates",
-	"_1gtk_1widget_1unrealize",
 	"_1gtk_1window_1activate_1default",
 	"_1gtk_1window_1add_1accel_1group",
 	"_1gtk_1window_1deiconify",
@@ -1364,7 +1420,6 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1window_1get_1modal",
 	"_1gtk_1window_1get_1opacity",
 	"_1gtk_1window_1get_1position",
-	"_1gtk_1window_1get_1size",
 	"_1gtk_1window_1group_1add_1window",
 	"_1gtk_1window_1group_1new",
 	"_1gtk_1window_1group_1remove_1window",
@@ -1374,14 +1429,12 @@ char * OS_nativeFunctionNames[] = {
 	"_1gtk_1window_1maximize",
 	"_1gtk_1window_1move",
 	"_1gtk_1window_1new",
-	"_1gtk_1window_1present",
 	"_1gtk_1window_1remove_1accel_1group",
 	"_1gtk_1window_1resize",
 	"_1gtk_1window_1set_1default",
 	"_1gtk_1window_1set_1destroy_1with_1parent",
 	"_1gtk_1window_1set_1geometry_1hints",
 	"_1gtk_1window_1set_1icon_1list",
-	"_1gtk_1window_1set_1keep_1below",
 	"_1gtk_1window_1set_1modal",
 	"_1gtk_1window_1set_1opacity",
 	"_1gtk_1window_1set_1resizable",
@@ -1467,6 +1520,7 @@ char * OS_nativeFunctionNames[] = {
 	"_1pango_1layout_1get_1line",
 	"_1pango_1layout_1get_1line_1count",
 	"_1pango_1layout_1get_1log_1attrs",
+	"_1pango_1layout_1get_1pixel_1size",
 	"_1pango_1layout_1get_1size",
 	"_1pango_1layout_1get_1spacing",
 	"_1pango_1layout_1get_1tabs",
@@ -1500,6 +1554,10 @@ char * OS_nativeFunctionNames[] = {
 	"_1pango_1tab_1array_1get_1tabs",
 	"_1pango_1tab_1array_1new",
 	"_1pango_1tab_1array_1set_1tab",
+	"_1swt_1fixed_1get_1type",
+	"_1swt_1fixed_1move",
+	"_1swt_1fixed_1resize",
+	"_1swt_1fixed_1restack",
 	"_1ubuntu_1menu_1proxy_1get",
 	"g_1main_1context_1wakeup",
 	"g_1value_1get_1double",
@@ -1512,10 +1570,10 @@ char * OS_nativeFunctionNames[] = {
 	"g_1value_1set_1int",
 	"g_1value_1set_1int64",
 	"g_1value_1unset",
-	"gdk_1threads_1enter",
-	"gdk_1threads_1init",
 	"gdk_1threads_1leave",
 	"gdk_1threads_1set_1lock_1functions",
+	"imContextLast",
+	"imContextNewProc_1CALLBACK",
 	"localeconv_1decimal_1point",
 #ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I",
@@ -1588,21 +1646,11 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__JLorg_eclipse_swt_internal_gtk_XClientMessageEvent_2J",
 #endif
 #ifndef JNI64
-	"memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I",
-#else
-	"memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J",
-#endif
-#ifndef JNI64
 	"memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I",
 #else
 	"memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J",
 #endif
 #ifndef JNI64
-	"memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I",
-#else
-	"memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J",
-#endif
-#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J",
@@ -1728,11 +1776,6 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2JJ",
 #endif
 #ifndef JNI64
-	"memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II",
-#else
-	"memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ",
-#endif
-#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I",
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J",
@@ -1773,11 +1816,6 @@ char * OS_nativeFunctionNames[] = {
 	"memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ",
 #endif
 #ifndef JNI64
-	"memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II",
-#else
-	"memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ",
-#endif
-#ifndef JNI64
 	"memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II",
 #else
 	"memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ",
@@ -1796,6 +1834,9 @@ char * OS_nativeFunctionNames[] = {
 	"realpath",
 	"strcmp",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(OS_nativeFunctionNames) / sizeof(char*)
+int OS_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int OS_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/os_stats.h b/os_stats.h
index f7321e2..886208f 100644
--- a/os_stats.h
+++ b/os_stats.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -47,10 +47,6 @@ typedef enum {
 	GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING_FUNC,
 	GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING_FUNC,
 	GTK_1ENTRY_1IM_1CONTEXT_FUNC,
-	GTK_1RANGE_1HAS_1STEPPER_1A_FUNC,
-	GTK_1RANGE_1HAS_1STEPPER_1B_FUNC,
-	GTK_1RANGE_1HAS_1STEPPER_1C_FUNC,
-	GTK_1RANGE_1HAS_1STEPPER_1D_FUNC,
 	GTK_1RANGE_1SLIDER_1END_FUNC,
 	GTK_1RANGE_1SLIDER_1START_FUNC,
 	GTK_1SCROLLED_1WINDOW_1HSCROLLBAR_FUNC,
@@ -60,11 +56,10 @@ typedef enum {
 	GTK_1TOOLTIPS_1GET_1TIP_1TEXT_FUNC,
 	GTK_1TOOLTIPS_1SET_1ACTIVE_FUNC,
 	GTK_1TOOLTIPS_1TIP_1WINDOW_FUNC,
+	GTK_1TYPE_1ACCESSIBLE_FUNC,
 	GTK_1WIDGET_1HEIGHT_FUNC,
 	GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC,
 	GTK_1WIDGET_1REQUISITION_1WIDTH_FUNC,
-	GTK_1WIDGET_1SET_1HEIGHT_FUNC,
-	GTK_1WIDGET_1SET_1WIDTH_FUNC,
 	GTK_1WIDGET_1SET_1X_FUNC,
 	GTK_1WIDGET_1SET_1Y_FUNC,
 	GTK_1WIDGET_1WIDTH_FUNC,
@@ -95,11 +90,9 @@ typedef enum {
 	GdkEventVisibility_1sizeof_FUNC,
 	GdkEventWindowState_1sizeof_FUNC,
 	GdkEvent_1sizeof_FUNC,
-	GdkGCValues_1sizeof_FUNC,
 	GdkGeometry_1sizeof_FUNC,
-	GdkImage_1sizeof_FUNC,
+	GdkRGBA_1sizeof_FUNC,
 	GdkRectangle_1sizeof_FUNC,
-	GdkVisual_1sizeof_FUNC,
 	GdkWindowAttr_1sizeof_FUNC,
 	GtkAdjustment_1sizeof_FUNC,
 	GtkAllocation_1sizeof_FUNC,
@@ -111,12 +104,9 @@ typedef enum {
 	GtkCellRendererToggleClass_1sizeof_FUNC,
 	GtkCellRendererToggle_1sizeof_FUNC,
 	GtkColorSelectionDialog_1sizeof_FUNC,
-	GtkFixedClass_1sizeof_FUNC,
-	GtkFixed_1sizeof_FUNC,
 	GtkRequisition_1sizeof_FUNC,
 	GtkSelectionData_1sizeof_FUNC,
 	GtkTargetEntry_1sizeof_FUNC,
-	GtkTargetPair_1sizeof_FUNC,
 	GtkTextIter_1sizeof_FUNC,
 	GtkTreeIter_1sizeof_FUNC,
 	PangoAttrColor_1sizeof_FUNC,
@@ -148,6 +138,7 @@ typedef enum {
 	_1GDK_1TYPE_1PIXBUF_FUNC,
 	_1GString_1len_FUNC,
 	_1GString_1str_FUNC,
+	_1GTK_1ACCESSIBLE_FUNC,
 	_1GTK_1IS_1ACCEL_1LABEL_FUNC,
 	_1GTK_1IS_1BUTTON_FUNC,
 	_1GTK_1IS_1CELL_1RENDERER_1PIXBUF_FUNC,
@@ -167,6 +158,7 @@ typedef enum {
 	_1GTK_1TYPE_1CELL_1RENDERER_1TEXT_FUNC,
 	_1GTK_1TYPE_1CELL_1RENDERER_1TOGGLE_FUNC,
 	_1GTK_1TYPE_1FIXED_FUNC,
+	_1GTK_1TYPE_1IM_1MULTICONTEXT_FUNC,
 	_1GTK_1TYPE_1MENU_FUNC,
 	_1GTK_1TYPE_1WIDGET_FUNC,
 	_1GTK_1WIDGET_1FLAGS_FUNC,
@@ -175,7 +167,6 @@ typedef enum {
 	_1GTK_1WIDGET_1MAPPED_FUNC,
 	_1GTK_1WIDGET_1SENSITIVE_FUNC,
 	_1GTK_1WIDGET_1SET_1FLAGS_FUNC,
-	_1GTK_1WIDGET_1STATE_FUNC,
 	_1GTK_1WIDGET_1UNSET_1FLAGS_FUNC,
 	_1GTK_1WIDGET_1VISIBLE_FUNC,
 	_1G_1OBJECT_1CLASS_FUNC,
@@ -188,8 +179,6 @@ typedef enum {
 	_1PANGO_1TYPE_1FONT_1DESCRIPTION_FUNC,
 	_1PANGO_1TYPE_1LAYOUT_FUNC,
 	_1XCheckIfEvent_FUNC,
-	_1XCheckMaskEvent_FUNC,
-	_1XCheckWindowEvent_FUNC,
 	_1XDefaultRootWindow_FUNC,
 	_1XDefaultScreen_FUNC,
 	_1XFlush_FUNC,
@@ -200,7 +189,6 @@ typedef enum {
 	_1XKeysymToKeycode_FUNC,
 	_1XListProperties_FUNC,
 	_1XQueryPointer_FUNC,
-	_1XQueryTree_FUNC,
 	_1XReconfigureWMWindow_FUNC,
 	_1XRenderComposite_FUNC,
 	_1XRenderCreatePicture_FUNC,
@@ -225,7 +213,22 @@ typedef enum {
 	_1access_FUNC,
 	_1atk_1object_1add_1relationship_FUNC,
 	_1atk_1object_1remove_1relationship_FUNC,
-	_1call_FUNC,
+#ifndef JNI64
+	_1call__IIIII_FUNC,
+#else
+	_1call__JJJJJ_FUNC,
+#endif
+#ifndef JNI64
+	_1call__IIIIIII_FUNC,
+#else
+	_1call__JJJJJJJ_FUNC,
+#endif
+#ifndef JNI64
+	_1call__IIIIIIII_FUNC,
+#else
+	_1call__JJJJJJJJ_FUNC,
+#endif
+	_1call_1get_1size_FUNC,
 	_1dlclose_FUNC,
 	_1dlopen_FUNC,
 	_1dlsym_FUNC,
@@ -234,7 +237,6 @@ typedef enum {
 	_1g_1app_1info_1get_1default_1for_1type_FUNC,
 	_1g_1app_1info_1get_1executable_FUNC,
 	_1g_1app_1info_1get_1icon_FUNC,
-	_1g_1app_1info_1get_1id_FUNC,
 	_1g_1app_1info_1get_1name_FUNC,
 	_1g_1app_1info_1launch_FUNC,
 	_1g_1app_1info_1launch_1default_1for_1uri_FUNC,
@@ -244,15 +246,10 @@ typedef enum {
 	_1g_1closure_1ref_FUNC,
 	_1g_1closure_1unref_FUNC,
 	_1g_1content_1type_1equals_FUNC,
-	_1g_1content_1type_1get_1mime_1type_FUNC,
 	_1g_1content_1type_1is_1a_FUNC,
-	_1g_1content_1types_1get_1registered_FUNC,
 	_1g_1data_1input_1stream_1new_FUNC,
 	_1g_1data_1input_1stream_1read_1line_FUNC,
-	_1g_1desktop_1app_1info_1new_1from_1filename_FUNC,
-	_1g_1file_1get_1path_FUNC,
 	_1g_1file_1get_1uri_FUNC,
-	_1g_1file_1icon_1get_1file_FUNC,
 	_1g_1file_1info_1get_1content_1type_FUNC,
 	_1g_1file_1info_1get_1modification_1time_FUNC,
 	_1g_1file_1new_1for_1commandline_1arg_FUNC,
@@ -261,6 +258,7 @@ typedef enum {
 	_1g_1file_1query_1info_FUNC,
 	_1g_1file_1read_FUNC,
 	_1g_1file_1test_FUNC,
+	_1g_1filename_1display_1name_FUNC,
 	_1g_1filename_1from_1uri_FUNC,
 	_1g_1filename_1from_1utf8_FUNC,
 	_1g_1filename_1to_1uri_FUNC,
@@ -281,11 +279,8 @@ typedef enum {
 	_1g_1list_1prepend_FUNC,
 	_1g_1list_1previous_FUNC,
 	_1g_1list_1remove_1link_FUNC,
-	_1g_1list_1reverse_FUNC,
 	_1g_1list_1set_1next_FUNC,
 	_1g_1list_1set_1previous_FUNC,
-	_1g_1locale_1from_1utf8_FUNC,
-	_1g_1locale_1to_1utf8_FUNC,
 	_1g_1log_1default_1handler_FUNC,
 	_1g_1log_1remove_1handler_FUNC,
 	_1g_1log_1set_1handler_FUNC,
@@ -294,7 +289,6 @@ typedef enum {
 	_1g_1main_1context_1default_FUNC,
 	_1g_1main_1context_1get_1poll_1func_FUNC,
 	_1g_1main_1context_1iteration_FUNC,
-	_1g_1main_1context_1pending_FUNC,
 	_1g_1main_1context_1prepare_FUNC,
 	_1g_1main_1context_1query_FUNC,
 	_1g_1main_1context_1release_FUNC,
@@ -314,6 +308,7 @@ typedef enum {
 	_1g_1object_1new_FUNC,
 	_1g_1object_1notify_FUNC,
 	_1g_1object_1ref_FUNC,
+	_1g_1object_1ref_1sink_FUNC,
 #ifndef JNI64
 	_1g_1object_1set__I_3BFI_FUNC,
 #else
@@ -350,7 +345,6 @@ typedef enum {
 	_1g_1set_1prgname_FUNC,
 	_1g_1signal_1add_1emission_1hook_FUNC,
 	_1g_1signal_1connect_FUNC,
-	_1g_1signal_1connect_1after_FUNC,
 	_1g_1signal_1connect_1closure_FUNC,
 	_1g_1signal_1connect_1closure_1by_1id_FUNC,
 #ifndef JNI64
@@ -381,7 +375,6 @@ typedef enum {
 	_1g_1signal_1handler_1disconnect_FUNC,
 	_1g_1signal_1handler_1find_FUNC,
 	_1g_1signal_1handlers_1block_1matched_FUNC,
-	_1g_1signal_1handlers_1disconnect_1matched_FUNC,
 	_1g_1signal_1handlers_1unblock_1matched_FUNC,
 	_1g_1signal_1lookup_FUNC,
 	_1g_1signal_1remove_1emission_1hook_FUNC,
@@ -414,7 +407,6 @@ typedef enum {
 	_1g_1utf16_1pointer_1to_1offset_FUNC,
 	_1g_1utf16_1strlen_FUNC,
 	_1g_1utf16_1to_1utf8_FUNC,
-	_1g_1utf8_1offset_1to_1pointer_FUNC,
 	_1g_1utf8_1offset_1to_1utf16_1offset_FUNC,
 	_1g_1utf8_1pointer_1to_1offset_FUNC,
 	_1g_1utf8_1strlen_FUNC,
@@ -434,9 +426,12 @@ typedef enum {
 	_1gdk_1beep_FUNC,
 	_1gdk_1bitmap_1create_1from_1data_FUNC,
 	_1gdk_1cairo_1create_FUNC,
+	_1gdk_1cairo_1get_1clip_1rectangle_FUNC,
 	_1gdk_1cairo_1region_FUNC,
+	_1gdk_1cairo_1region_1create_1from_1surface_FUNC,
 	_1gdk_1cairo_1reset_1clip_FUNC,
 	_1gdk_1cairo_1set_1source_1color_FUNC,
+	_1gdk_1cairo_1set_1source_1pixbuf_FUNC,
 	_1gdk_1cairo_1set_1source_1window_FUNC,
 	_1gdk_1color_1free_FUNC,
 	_1gdk_1color_1parse_FUNC,
@@ -444,13 +439,22 @@ typedef enum {
 	_1gdk_1colormap_1alloc_1color_FUNC,
 	_1gdk_1colormap_1free_1colors_FUNC,
 	_1gdk_1colormap_1get_1system_FUNC,
-	_1gdk_1colormap_1query_1color_FUNC,
 	_1gdk_1cursor_1new_FUNC,
 	_1gdk_1cursor_1new_1from_1pixbuf_FUNC,
 	_1gdk_1cursor_1new_1from_1pixmap_FUNC,
 	_1gdk_1cursor_1unref_FUNC,
+	_1gdk_1device_1get_1associated_1device_FUNC,
+	_1gdk_1device_1get_1window_1at_1position_FUNC,
+	_1gdk_1device_1grab_FUNC,
+	_1gdk_1device_1manager_1get_1client_1pointer_FUNC,
+	_1gdk_1device_1ungrab_FUNC,
 	_1gdk_1display_1get_1default_FUNC,
+	_1gdk_1display_1get_1device_1manager_FUNC,
 	_1gdk_1display_1supports_1cursor_1color_FUNC,
+	_1gdk_1drag_1context_1get_1actions_FUNC,
+	_1gdk_1drag_1context_1get_1dest_1window_FUNC,
+	_1gdk_1drag_1context_1get_1selected_1action_FUNC,
+	_1gdk_1drag_1context_1list_1targets_FUNC,
 	_1gdk_1drag_1status_FUNC,
 	_1gdk_1draw_1arc_FUNC,
 	_1gdk_1draw_1drawable_FUNC,
@@ -473,7 +477,7 @@ typedef enum {
 	_1gdk_1event_1free_FUNC,
 	_1gdk_1event_1get_FUNC,
 	_1gdk_1event_1get_1coords_FUNC,
-	_1gdk_1event_1get_1root_1coords_FUNC,
+	_1gdk_1event_1get_1scroll_1deltas_FUNC,
 	_1gdk_1event_1get_1state_FUNC,
 	_1gdk_1event_1get_1time_FUNC,
 	_1gdk_1event_1handler_1set_FUNC,
@@ -504,12 +508,11 @@ typedef enum {
 	_1gdk_1keymap_1translate_1keyboard_1state_FUNC,
 	_1gdk_1keyval_1to_1lower_FUNC,
 	_1gdk_1keyval_1to_1unicode_FUNC,
-	_1gdk_1pango_1attr_1embossed_1new_FUNC,
 	_1gdk_1pango_1context_1get_FUNC,
-	_1gdk_1pango_1context_1set_1colormap_FUNC,
 	_1gdk_1pango_1layout_1get_1clip_1region_FUNC,
 	_1gdk_1pixbuf_1copy_1area_FUNC,
 	_1gdk_1pixbuf_1get_1from_1drawable_FUNC,
+	_1gdk_1pixbuf_1get_1from_1window_FUNC,
 	_1gdk_1pixbuf_1get_1has_1alpha_FUNC,
 	_1gdk_1pixbuf_1get_1height_FUNC,
 	_1gdk_1pixbuf_1get_1pixels_FUNC,
@@ -524,12 +527,10 @@ typedef enum {
 	_1gdk_1pixbuf_1render_1pixmap_1and_1mask_FUNC,
 	_1gdk_1pixbuf_1render_1to_1drawable_FUNC,
 	_1gdk_1pixbuf_1save_1to_1bufferv_FUNC,
-	_1gdk_1pixbuf_1scale_FUNC,
 	_1gdk_1pixbuf_1scale_1simple_FUNC,
-	_1gdk_1pixmap_1foreign_1new_FUNC,
+	_1gdk_1pixmap_1get_1size_FUNC,
 	_1gdk_1pixmap_1new_FUNC,
 	_1gdk_1pointer_1grab_FUNC,
-	_1gdk_1pointer_1is_1grabbed_FUNC,
 	_1gdk_1pointer_1ungrab_FUNC,
 	_1gdk_1property_1get_FUNC,
 	_1gdk_1region_1destroy_FUNC,
@@ -560,29 +561,33 @@ typedef enum {
 	_1gdk_1unicode_1to_1keyval_FUNC,
 	_1gdk_1utf8_1to_1compound_1text_FUNC,
 	_1gdk_1utf8_1to_1string_1target_FUNC,
+	_1gdk_1visual_1get_1depth_FUNC,
 	_1gdk_1visual_1get_1system_FUNC,
 	_1gdk_1window_1add_1filter_FUNC,
 	_1gdk_1window_1at_1pointer_FUNC,
 	_1gdk_1window_1begin_1paint_1rect_FUNC,
-	_1gdk_1window_1clear_1area_FUNC,
+	_1gdk_1window_1begin_1paint_1region_FUNC,
 	_1gdk_1window_1create_1similar_1surface_FUNC,
 	_1gdk_1window_1destroy_FUNC,
 	_1gdk_1window_1end_1paint_FUNC,
 	_1gdk_1window_1focus_FUNC,
-	_1gdk_1window_1freeze_1updates_FUNC,
 	_1gdk_1window_1get_1children_FUNC,
+	_1gdk_1window_1get_1device_1position_FUNC,
+	_1gdk_1window_1get_1display_FUNC,
 	_1gdk_1window_1get_1events_FUNC,
 	_1gdk_1window_1get_1frame_1extents_FUNC,
+	_1gdk_1window_1get_1height_FUNC,
 	_1gdk_1window_1get_1internal_1paint_1info_FUNC,
 	_1gdk_1window_1get_1origin_FUNC,
 	_1gdk_1window_1get_1parent_FUNC,
 	_1gdk_1window_1get_1pointer_FUNC,
 	_1gdk_1window_1get_1position_FUNC,
 	_1gdk_1window_1get_1user_1data_FUNC,
+	_1gdk_1window_1get_1visible_1region_FUNC,
+	_1gdk_1window_1get_1width_FUNC,
 	_1gdk_1window_1hide_FUNC,
 	_1gdk_1window_1invalidate_1rect_FUNC,
 	_1gdk_1window_1invalidate_1region_FUNC,
-	_1gdk_1window_1is_1viewable_FUNC,
 	_1gdk_1window_1is_1visible_FUNC,
 	_1gdk_1window_1lookup_FUNC,
 	_1gdk_1window_1lower_FUNC,
@@ -596,44 +601,56 @@ typedef enum {
 	_1gdk_1window_1resize_FUNC,
 	_1gdk_1window_1restack_FUNC,
 	_1gdk_1window_1scroll_FUNC,
-	_1gdk_1window_1set_1accept_1focus_FUNC,
 	_1gdk_1window_1set_1back_1pixmap_FUNC,
+	_1gdk_1window_1set_1background_1pattern_FUNC,
 	_1gdk_1window_1set_1cursor_FUNC,
 	_1gdk_1window_1set_1debug_1updates_FUNC,
 	_1gdk_1window_1set_1decorations_FUNC,
 	_1gdk_1window_1set_1events_FUNC,
-	_1gdk_1window_1set_1icon_FUNC,
-	_1gdk_1window_1set_1icon_1list_FUNC,
-	_1gdk_1window_1set_1keep_1above_FUNC,
 	_1gdk_1window_1set_1override_1redirect_FUNC,
 	_1gdk_1window_1set_1user_1data_FUNC,
 	_1gdk_1window_1shape_1combine_1region_FUNC,
 	_1gdk_1window_1show_FUNC,
 	_1gdk_1window_1show_1unraised_FUNC,
-	_1gdk_1window_1thaw_1updates_FUNC,
 	_1gdk_1x11_1atom_1to_1xatom_FUNC,
-	_1gdk_1x11_1colormap_1get_1xcolormap_FUNC,
 	_1gdk_1x11_1display_1get_1xdisplay_FUNC,
+	_1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC,
 	_1gdk_1x11_1drawable_1get_1xdisplay_FUNC,
 	_1gdk_1x11_1drawable_1get_1xid_FUNC,
+	_1gdk_1x11_1get_1default_1xdisplay_FUNC,
 	_1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC,
 	_1gdk_1x11_1screen_1lookup_1visual_FUNC,
 	_1gdk_1x11_1visual_1get_1xvisual_FUNC,
+	_1gdk_1x11_1window_1get_1xid_FUNC,
 	_1gdk_1x11_1window_1lookup_1for_1display_FUNC,
+	_1glib_1major_1version_FUNC,
+	_1glib_1micro_1version_FUNC,
+	_1glib_1minor_1version_FUNC,
 	_1gtk_1accel_1group_1new_FUNC,
-	_1gtk_1accel_1groups_1activate_FUNC,
 	_1gtk_1accel_1label_1set_1accel_1widget_FUNC,
 	_1gtk_1accelerator_1get_1default_1mod_1mask_FUNC,
 	_1gtk_1accelerator_1parse_FUNC,
+	_1gtk_1accessible_1get_1widget_FUNC,
 	_1gtk_1adjustment_1changed_FUNC,
+	_1gtk_1adjustment_1configure_FUNC,
+	_1gtk_1adjustment_1get_1lower_FUNC,
+	_1gtk_1adjustment_1get_1page_1increment_FUNC,
+	_1gtk_1adjustment_1get_1page_1size_FUNC,
+	_1gtk_1adjustment_1get_1step_1increment_FUNC,
+	_1gtk_1adjustment_1get_1upper_FUNC,
+	_1gtk_1adjustment_1get_1value_FUNC,
 	_1gtk_1adjustment_1new_FUNC,
+	_1gtk_1adjustment_1set_1page_1increment_FUNC,
+	_1gtk_1adjustment_1set_1step_1increment_FUNC,
 	_1gtk_1adjustment_1set_1value_FUNC,
 	_1gtk_1adjustment_1value_1changed_FUNC,
 	_1gtk_1arrow_1new_FUNC,
 	_1gtk_1arrow_1set_FUNC,
 	_1gtk_1bin_1get_1child_FUNC,
 	_1gtk_1border_1free_FUNC,
+	_1gtk_1box_1new_FUNC,
 	_1gtk_1box_1set_1child_1packing_FUNC,
+	_1gtk_1box_1set_1homogeneous_FUNC,
 	_1gtk_1box_1set_1spacing_FUNC,
 	_1gtk_1button_1clicked_FUNC,
 	_1gtk_1button_1get_1relief_FUNC,
@@ -650,8 +667,11 @@ typedef enum {
 	_1gtk_1cell_1layout_1get_1cells_FUNC,
 	_1gtk_1cell_1layout_1pack_1start_FUNC,
 	_1gtk_1cell_1layout_1set_1attributes_FUNC,
+	_1gtk_1cell_1renderer_1get_1preferred_1height_1for_1width_FUNC,
+	_1gtk_1cell_1renderer_1get_1preferred_1size_FUNC,
 	_1gtk_1cell_1renderer_1get_1size_FUNC,
 	_1gtk_1cell_1renderer_1pixbuf_1new_FUNC,
+	_1gtk_1cell_1renderer_1set_1fixed_1size_FUNC,
 	_1gtk_1cell_1renderer_1text_1new_FUNC,
 	_1gtk_1cell_1renderer_1toggle_1new_FUNC,
 	_1gtk_1check_1button_1new_FUNC,
@@ -662,13 +682,16 @@ typedef enum {
 	_1gtk_1clipboard_1clear_FUNC,
 	_1gtk_1clipboard_1get_FUNC,
 	_1gtk_1clipboard_1set_1can_1store_FUNC,
-	_1gtk_1clipboard_1set_1with_1data_FUNC,
 	_1gtk_1clipboard_1set_1with_1owner_FUNC,
 	_1gtk_1clipboard_1store_FUNC,
 	_1gtk_1clipboard_1wait_1for_1contents_FUNC,
+	_1gtk_1color_1chooser_1dialog_1new_FUNC,
+	_1gtk_1color_1chooser_1get_1rgba_FUNC,
+	_1gtk_1color_1chooser_1set_1rgba_FUNC,
+	_1gtk_1color_1chooser_1set_1use_1alpha_FUNC,
+	_1gtk_1color_1selection_1dialog_1get_1color_1selection_FUNC,
 	_1gtk_1color_1selection_1dialog_1new_FUNC,
 	_1gtk_1color_1selection_1get_1current_1color_FUNC,
-	_1gtk_1color_1selection_1palette_1from_1string_FUNC,
 	_1gtk_1color_1selection_1palette_1to_1string_FUNC,
 	_1gtk_1color_1selection_1set_1current_1color_FUNC,
 	_1gtk_1color_1selection_1set_1has_1palette_FUNC,
@@ -682,6 +705,11 @@ typedef enum {
 	_1gtk_1combo_1box_1remove_1text_FUNC,
 	_1gtk_1combo_1box_1set_1active_FUNC,
 	_1gtk_1combo_1box_1set_1focus_1on_1click_FUNC,
+	_1gtk_1combo_1box_1text_1insert_FUNC,
+	_1gtk_1combo_1box_1text_1new_FUNC,
+	_1gtk_1combo_1box_1text_1new_1with_1entry_FUNC,
+	_1gtk_1combo_1box_1text_1remove_FUNC,
+	_1gtk_1combo_1box_1text_1remove_1all_FUNC,
 	_1gtk_1container_1add_FUNC,
 	_1gtk_1container_1forall_FUNC,
 	_1gtk_1container_1get_1border_1width_FUNC,
@@ -689,6 +717,8 @@ typedef enum {
 	_1gtk_1container_1remove_FUNC,
 	_1gtk_1container_1resize_1children_FUNC,
 	_1gtk_1container_1set_1border_1width_FUNC,
+	_1gtk_1css_1provider_1load_1from_1data_FUNC,
+	_1gtk_1css_1provider_1new_FUNC,
 	_1gtk_1dialog_1add_1button_FUNC,
 	_1gtk_1dialog_1run_FUNC,
 	_1gtk_1drag_1begin_FUNC,
@@ -699,12 +729,11 @@ typedef enum {
 	_1gtk_1drag_1finish_FUNC,
 	_1gtk_1drag_1get_1data_FUNC,
 	_1gtk_1drag_1set_1icon_1pixbuf_FUNC,
-	_1gtk_1drawing_1area_1new_FUNC,
+	_1gtk_1drag_1set_1icon_1surface_FUNC,
 	_1gtk_1editable_1copy_1clipboard_FUNC,
 	_1gtk_1editable_1cut_1clipboard_FUNC,
 	_1gtk_1editable_1delete_1selection_FUNC,
 	_1gtk_1editable_1delete_1text_FUNC,
-	_1gtk_1editable_1get_1chars_FUNC,
 	_1gtk_1editable_1get_1editable_FUNC,
 	_1gtk_1editable_1get_1position_FUNC,
 	_1gtk_1editable_1get_1selection_1bounds_FUNC,
@@ -713,6 +742,7 @@ typedef enum {
 	_1gtk_1editable_1select_1region_FUNC,
 	_1gtk_1editable_1set_1editable_FUNC,
 	_1gtk_1editable_1set_1position_FUNC,
+	_1gtk_1entry_1get_1icon_1area_FUNC,
 	_1gtk_1entry_1get_1inner_1border_FUNC,
 	_1gtk_1entry_1get_1invisible_1char_FUNC,
 	_1gtk_1entry_1get_1layout_FUNC,
@@ -721,27 +751,24 @@ typedef enum {
 	_1gtk_1entry_1get_1text_FUNC,
 	_1gtk_1entry_1get_1visibility_FUNC,
 	_1gtk_1entry_1new_FUNC,
-	_1gtk_1entry_1set_1activates_1default_FUNC,
 	_1gtk_1entry_1set_1alignment_FUNC,
 	_1gtk_1entry_1set_1has_1frame_FUNC,
 	_1gtk_1entry_1set_1icon_1from_1stock_FUNC,
 	_1gtk_1entry_1set_1icon_1sensitive_FUNC,
 	_1gtk_1entry_1set_1invisible_1char_FUNC,
 	_1gtk_1entry_1set_1max_1length_FUNC,
+	_1gtk_1entry_1set_1placeholder_1text_FUNC,
 	_1gtk_1entry_1set_1text_FUNC,
 	_1gtk_1entry_1set_1visibility_FUNC,
+	_1gtk_1entry_1set_1width_1chars_FUNC,
 	_1gtk_1entry_1text_1index_1to_1layout_1index_FUNC,
 	_1gtk_1enumerate_1printers_FUNC,
-	_1gtk_1events_1pending_FUNC,
 	_1gtk_1expander_1get_1expanded_FUNC,
-	_1gtk_1expander_1get_1label_1widget_FUNC,
 	_1gtk_1expander_1new_FUNC,
 	_1gtk_1expander_1set_1expanded_FUNC,
-	_1gtk_1expander_1set_1label_FUNC,
 	_1gtk_1expander_1set_1label_1widget_FUNC,
 	_1gtk_1file_1chooser_1add_1filter_FUNC,
 	_1gtk_1file_1chooser_1dialog_1new_FUNC,
-	_1gtk_1file_1chooser_1get_1current_1folder_FUNC,
 	_1gtk_1file_1chooser_1get_1filename_FUNC,
 	_1gtk_1file_1chooser_1get_1filenames_FUNC,
 	_1gtk_1file_1chooser_1get_1filter_FUNC,
@@ -764,30 +791,31 @@ typedef enum {
 	_1gtk_1fixed_1move_FUNC,
 	_1gtk_1fixed_1new_FUNC,
 	_1gtk_1fixed_1set_1has_1window_FUNC,
+	_1gtk_1font_1chooser_1dialog_1new_FUNC,
+	_1gtk_1font_1chooser_1get_1font_FUNC,
+	_1gtk_1font_1chooser_1set_1font_FUNC,
 	_1gtk_1font_1selection_1dialog_1get_1font_1name_FUNC,
 	_1gtk_1font_1selection_1dialog_1new_FUNC,
 	_1gtk_1font_1selection_1dialog_1set_1font_1name_FUNC,
 	_1gtk_1frame_1get_1label_1widget_FUNC,
 	_1gtk_1frame_1new_FUNC,
-	_1gtk_1frame_1set_1label_FUNC,
 	_1gtk_1frame_1set_1label_1widget_FUNC,
 	_1gtk_1frame_1set_1shadow_1type_FUNC,
 	_1gtk_1get_1current_1event_FUNC,
 	_1gtk_1get_1current_1event_1state_FUNC,
-	_1gtk_1get_1current_1event_1time_FUNC,
 	_1gtk_1get_1default_1language_FUNC,
 	_1gtk_1get_1event_1widget_FUNC,
-	_1gtk_1grab_1add_FUNC,
 	_1gtk_1grab_1get_1current_FUNC,
-	_1gtk_1grab_1remove_FUNC,
 	_1gtk_1hbox_1new_FUNC,
 	_1gtk_1hscale_1new_FUNC,
 	_1gtk_1hscrollbar_1new_FUNC,
 	_1gtk_1hseparator_1new_FUNC,
+	_1gtk_1hsv_1to_1rgb_FUNC,
 	_1gtk_1icon_1factory_1lookup_1default_FUNC,
 	_1gtk_1icon_1info_1free_FUNC,
 	_1gtk_1icon_1info_1load_1icon_FUNC,
 	_1gtk_1icon_1set_1render_1icon_FUNC,
+	_1gtk_1icon_1set_1render_1icon_1pixbuf_FUNC,
 	_1gtk_1icon_1source_1free_FUNC,
 	_1gtk_1icon_1source_1new_FUNC,
 	_1gtk_1icon_1source_1set_1pixbuf_FUNC,
@@ -807,9 +835,8 @@ typedef enum {
 	_1gtk_1image_1menu_1item_1set_1image_FUNC,
 	_1gtk_1image_1new_FUNC,
 	_1gtk_1image_1new_1from_1pixbuf_FUNC,
-	_1gtk_1image_1new_1from_1pixmap_FUNC,
+	_1gtk_1image_1set_1from_1gicon_FUNC,
 	_1gtk_1image_1set_1from_1pixbuf_FUNC,
-	_1gtk_1image_1set_1from_1pixmap_FUNC,
 	_1gtk_1init_1check_FUNC,
 	_1gtk_1label_1get_1layout_FUNC,
 	_1gtk_1label_1get_1mnemonic_1keyval_FUNC,
@@ -838,34 +865,32 @@ typedef enum {
 #ifndef JNI64
 	_1gtk_1list_1store_1set__IIIII_FUNC,
 #else
-	_1gtk_1list_1store_1set__JJIIJ_FUNC,
+	_1gtk_1list_1store_1set__JJIII_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1list_1store_1set__IIIJI_FUNC,
 #else
-	_1gtk_1list_1store_1set__JJIJJ_FUNC,
+	_1gtk_1list_1store_1set__JJIJI_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1list_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC,
 #else
-	_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC,
+	_1gtk_1list_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1list_1store_1set__IIIZI_FUNC,
 #else
-	_1gtk_1list_1store_1set__JJIZJ_FUNC,
+	_1gtk_1list_1store_1set__JJIZI_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1list_1store_1set__III_3BI_FUNC,
 #else
-	_1gtk_1list_1store_1set__JJI_3BJ_FUNC,
+	_1gtk_1list_1store_1set__JJI_3BI_FUNC,
 #endif
 	_1gtk_1main_FUNC,
 	_1gtk_1main_1do_1event_FUNC,
-	_1gtk_1main_1iteration_FUNC,
 	_1gtk_1major_1version_FUNC,
 	_1gtk_1menu_1bar_1new_FUNC,
-	_1gtk_1menu_1get_1attach_1widget_FUNC,
 	_1gtk_1menu_1item_1get_1submenu_FUNC,
 	_1gtk_1menu_1item_1remove_1submenu_FUNC,
 	_1gtk_1menu_1item_1set_1submenu_FUNC,
@@ -874,7 +899,6 @@ typedef enum {
 	_1gtk_1menu_1popup_FUNC,
 	_1gtk_1menu_1shell_1deactivate_FUNC,
 	_1gtk_1menu_1shell_1insert_FUNC,
-	_1gtk_1menu_1shell_1select_1item_FUNC,
 	_1gtk_1menu_1shell_1set_1take_1focus_FUNC,
 	_1gtk_1menu_1tool_1button_1new_FUNC,
 	_1gtk_1message_1dialog_1new_FUNC,
@@ -925,8 +949,6 @@ typedef enum {
 	_1gtk_1paint_1option_FUNC,
 	_1gtk_1paint_1shadow_FUNC,
 	_1gtk_1paint_1shadow_1gap_FUNC,
-	_1gtk_1paint_1slider_FUNC,
-	_1gtk_1paint_1tab_FUNC,
 	_1gtk_1paint_1vline_FUNC,
 	_1gtk_1paper_1size_1free_FUNC,
 	_1gtk_1paper_1size_1get_1display_1name_FUNC,
@@ -940,25 +962,16 @@ typedef enum {
 	_1gtk_1paper_1size_1new_1from_1ppd_FUNC,
 	_1gtk_1plug_1get_1id_FUNC,
 	_1gtk_1plug_1new_FUNC,
-	_1gtk_1print_1job_1get_1printer_FUNC,
-	_1gtk_1print_1job_1get_1settings_FUNC,
-	_1gtk_1print_1job_1get_1status_FUNC,
 	_1gtk_1print_1job_1get_1surface_FUNC,
-	_1gtk_1print_1job_1get_1title_FUNC,
 	_1gtk_1print_1job_1new_FUNC,
 	_1gtk_1print_1job_1send_FUNC,
-	_1gtk_1print_1job_1set_1source_1file_FUNC,
 	_1gtk_1print_1settings_1foreach_FUNC,
 	_1gtk_1print_1settings_1get_FUNC,
 	_1gtk_1print_1settings_1get_1collate_FUNC,
 	_1gtk_1print_1settings_1get_1duplex_FUNC,
 	_1gtk_1print_1settings_1get_1n_1copies_FUNC,
-	_1gtk_1print_1settings_1get_1orientation_FUNC,
 	_1gtk_1print_1settings_1get_1page_1ranges_FUNC,
-	_1gtk_1print_1settings_1get_1paper_1height_FUNC,
-	_1gtk_1print_1settings_1get_1paper_1width_FUNC,
 	_1gtk_1print_1settings_1get_1print_1pages_FUNC,
-	_1gtk_1print_1settings_1get_1printer_FUNC,
 	_1gtk_1print_1settings_1get_1resolution_FUNC,
 	_1gtk_1print_1settings_1new_FUNC,
 	_1gtk_1print_1settings_1set_FUNC,
@@ -985,6 +998,7 @@ typedef enum {
 	_1gtk_1progress_1bar_1new_FUNC,
 	_1gtk_1progress_1bar_1pulse_FUNC,
 	_1gtk_1progress_1bar_1set_1fraction_FUNC,
+	_1gtk_1progress_1bar_1set_1inverted_FUNC,
 	_1gtk_1progress_1bar_1set_1orientation_FUNC,
 	_1gtk_1radio_1button_1get_1group_FUNC,
 	_1gtk_1radio_1button_1new_FUNC,
@@ -992,6 +1006,7 @@ typedef enum {
 	_1gtk_1radio_1menu_1item_1new_FUNC,
 	_1gtk_1radio_1menu_1item_1new_1with_1label_FUNC,
 	_1gtk_1range_1get_1adjustment_FUNC,
+	_1gtk_1range_1get_1slider_1range_FUNC,
 	_1gtk_1range_1set_1increments_FUNC,
 	_1gtk_1range_1set_1inverted_FUNC,
 	_1gtk_1range_1set_1range_FUNC,
@@ -1004,20 +1019,42 @@ typedef enum {
 	_1gtk_1rc_1style_1set_1color_1flags_FUNC,
 	_1gtk_1rc_1style_1set_1fg_FUNC,
 	_1gtk_1rc_1style_1set_1text_FUNC,
+	_1gtk_1render_1arrow_FUNC,
+	_1gtk_1render_1background_FUNC,
+	_1gtk_1render_1check_FUNC,
+	_1gtk_1render_1expander_FUNC,
+	_1gtk_1render_1extension_FUNC,
+	_1gtk_1render_1focus_FUNC,
+	_1gtk_1render_1frame_FUNC,
+	_1gtk_1render_1frame_1gap_FUNC,
+	_1gtk_1render_1handle_FUNC,
+	_1gtk_1render_1layout_FUNC,
+	_1gtk_1render_1line_FUNC,
+	_1gtk_1render_1option_FUNC,
+	_1gtk_1rgb_1to_1hsv_FUNC,
+	_1gtk_1scale_1new_FUNC,
 	_1gtk_1scale_1set_1digits_FUNC,
 	_1gtk_1scale_1set_1draw_1value_FUNC,
+	_1gtk_1scrollbar_1new_FUNC,
 	_1gtk_1scrolled_1window_1add_1with_1viewport_FUNC,
 	_1gtk_1scrolled_1window_1get_1hadjustment_FUNC,
+	_1gtk_1scrolled_1window_1get_1hscrollbar_FUNC,
 	_1gtk_1scrolled_1window_1get_1policy_FUNC,
 	_1gtk_1scrolled_1window_1get_1shadow_1type_FUNC,
 	_1gtk_1scrolled_1window_1get_1vadjustment_FUNC,
+	_1gtk_1scrolled_1window_1get_1vscrollbar_FUNC,
 	_1gtk_1scrolled_1window_1new_FUNC,
-	_1gtk_1scrolled_1window_1set_1placement_FUNC,
 	_1gtk_1scrolled_1window_1set_1policy_FUNC,
 	_1gtk_1scrolled_1window_1set_1shadow_1type_FUNC,
 	_1gtk_1selection_1data_1free_FUNC,
+	_1gtk_1selection_1data_1get_1data_FUNC,
+	_1gtk_1selection_1data_1get_1data_1type_FUNC,
+	_1gtk_1selection_1data_1get_1format_FUNC,
+	_1gtk_1selection_1data_1get_1length_FUNC,
+	_1gtk_1selection_1data_1get_1target_FUNC,
 	_1gtk_1selection_1data_1set_FUNC,
 	_1gtk_1separator_1menu_1item_1new_FUNC,
+	_1gtk_1separator_1new_FUNC,
 	_1gtk_1separator_1tool_1item_1new_FUNC,
 	_1gtk_1separator_1tool_1item_1set_1draw_FUNC,
 	_1gtk_1set_1locale_FUNC,
@@ -1042,6 +1079,19 @@ typedef enum {
 	_1gtk_1status_1icon_1set_1from_1pixbuf_FUNC,
 	_1gtk_1status_1icon_1set_1tooltip_FUNC,
 	_1gtk_1status_1icon_1set_1visible_FUNC,
+	_1gtk_1style_1context_1add_1class_FUNC,
+	_1gtk_1style_1context_1add_1provider_FUNC,
+	_1gtk_1style_1context_1add_1provider_1for_1screen_FUNC,
+	_1gtk_1style_1context_1get_1background_1color_FUNC,
+	_1gtk_1style_1context_1get_1border_FUNC,
+	_1gtk_1style_1context_1get_1border_1color_FUNC,
+	_1gtk_1style_1context_1get_1color_FUNC,
+	_1gtk_1style_1context_1get_1font_FUNC,
+	_1gtk_1style_1context_1get_1padding_FUNC,
+	_1gtk_1style_1context_1invalidate_FUNC,
+	_1gtk_1style_1context_1restore_FUNC,
+	_1gtk_1style_1context_1save_FUNC,
+	_1gtk_1style_1context_1set_1state_FUNC,
 	_1gtk_1style_1get_1base_FUNC,
 	_1gtk_1style_1get_1bg_FUNC,
 	_1gtk_1style_1get_1bg_1gc_FUNC,
@@ -1068,7 +1118,6 @@ typedef enum {
 	_1gtk_1text_1buffer_1cut_1clipboard_FUNC,
 	_1gtk_1text_1buffer_1delete_FUNC,
 	_1gtk_1text_1buffer_1get_1bounds_FUNC,
-	_1gtk_1text_1buffer_1get_1char_1count_FUNC,
 	_1gtk_1text_1buffer_1get_1end_1iter_FUNC,
 	_1gtk_1text_1buffer_1get_1insert_FUNC,
 	_1gtk_1text_1buffer_1get_1iter_1at_1line_FUNC,
@@ -1109,9 +1158,7 @@ typedef enum {
 	_1gtk_1text_1view_1set_1justification_FUNC,
 	_1gtk_1text_1view_1set_1tabs_FUNC,
 	_1gtk_1text_1view_1set_1wrap_1mode_FUNC,
-	_1gtk_1text_1view_1window_1to_1buffer_1coords_FUNC,
 	_1gtk_1toggle_1button_1get_1active_FUNC,
-	_1gtk_1toggle_1button_1get_1inconsistent_FUNC,
 	_1gtk_1toggle_1button_1new_FUNC,
 	_1gtk_1toggle_1button_1set_1active_FUNC,
 	_1gtk_1toggle_1button_1set_1inconsistent_FUNC,
@@ -1129,8 +1176,8 @@ typedef enum {
 	_1gtk_1tool_1item_1set_1is_1important_FUNC,
 	_1gtk_1tool_1item_1set_1proxy_1menu_1item_FUNC,
 	_1gtk_1toolbar_1insert_FUNC,
-	_1gtk_1toolbar_1insert_1widget_FUNC,
 	_1gtk_1toolbar_1new_FUNC,
+	_1gtk_1toolbar_1set_1icon_1size_FUNC,
 	_1gtk_1toolbar_1set_1orientation_FUNC,
 	_1gtk_1toolbar_1set_1show_1arrow_FUNC,
 	_1gtk_1toolbar_1set_1style_FUNC,
@@ -1143,12 +1190,12 @@ typedef enum {
 #ifndef JNI64
 	_1gtk_1tree_1model_1get__III_3II_FUNC,
 #else
-	_1gtk_1tree_1model_1get__JJI_3IJ_FUNC,
+	_1gtk_1tree_1model_1get__JJI_3II_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1tree_1model_1get__III_3JI_FUNC,
 #else
-	_1gtk_1tree_1model_1get__JJI_3JJ_FUNC,
+	_1gtk_1tree_1model_1get__JJI_3JI_FUNC,
 #endif
 	_1gtk_1tree_1model_1get_1iter_FUNC,
 	_1gtk_1tree_1model_1get_1iter_1first_FUNC,
@@ -1161,12 +1208,10 @@ typedef enum {
 	_1gtk_1tree_1model_1iter_1nth_1child_FUNC,
 	_1gtk_1tree_1path_1append_1index_FUNC,
 	_1gtk_1tree_1path_1compare_FUNC,
-	_1gtk_1tree_1path_1down_FUNC,
 	_1gtk_1tree_1path_1free_FUNC,
 	_1gtk_1tree_1path_1get_1depth_FUNC,
 	_1gtk_1tree_1path_1get_1indices_FUNC,
 	_1gtk_1tree_1path_1new_FUNC,
-	_1gtk_1tree_1path_1new_1first_FUNC,
 #ifndef JNI64
 	_1gtk_1tree_1path_1new_1from_1string__I_FUNC,
 #else
@@ -1177,12 +1222,10 @@ typedef enum {
 	_1gtk_1tree_1path_1prev_FUNC,
 	_1gtk_1tree_1path_1up_FUNC,
 	_1gtk_1tree_1selection_1count_1selected_1rows_FUNC,
-	_1gtk_1tree_1selection_1get_1selected_FUNC,
 	_1gtk_1tree_1selection_1get_1selected_1rows_FUNC,
 	_1gtk_1tree_1selection_1path_1is_1selected_FUNC,
 	_1gtk_1tree_1selection_1select_1all_FUNC,
 	_1gtk_1tree_1selection_1select_1iter_FUNC,
-	_1gtk_1tree_1selection_1selected_1foreach_FUNC,
 	_1gtk_1tree_1selection_1set_1mode_FUNC,
 	_1gtk_1tree_1selection_1unselect_1all_FUNC,
 	_1gtk_1tree_1selection_1unselect_1iter_FUNC,
@@ -1194,27 +1237,27 @@ typedef enum {
 #ifndef JNI64
 	_1gtk_1tree_1store_1set__IIIII_FUNC,
 #else
-	_1gtk_1tree_1store_1set__JJIIJ_FUNC,
+	_1gtk_1tree_1store_1set__JJIII_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1tree_1store_1set__IIIJI_FUNC,
 #else
-	_1gtk_1tree_1store_1set__JJIJJ_FUNC,
+	_1gtk_1tree_1store_1set__JJIJI_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1tree_1store_1set__IIILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC,
 #else
-	_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2J_FUNC,
+	_1gtk_1tree_1store_1set__JJILorg_eclipse_swt_internal_gtk_GdkColor_2I_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1tree_1store_1set__IIIZI_FUNC,
 #else
-	_1gtk_1tree_1store_1set__JJIZJ_FUNC,
+	_1gtk_1tree_1store_1set__JJIZI_FUNC,
 #endif
 #ifndef JNI64
 	_1gtk_1tree_1store_1set__III_3BI_FUNC,
 #else
-	_1gtk_1tree_1store_1set__JJI_3BJ_FUNC,
+	_1gtk_1tree_1store_1set__JJI_3BI_FUNC,
 #endif
 	_1gtk_1tree_1view_1collapse_1row_FUNC,
 	_1gtk_1tree_1view_1column_1add_1attribute_FUNC,
@@ -1222,14 +1265,11 @@ typedef enum {
 	_1gtk_1tree_1view_1column_1cell_1get_1size_FUNC,
 	_1gtk_1tree_1view_1column_1cell_1set_1cell_1data_FUNC,
 	_1gtk_1tree_1view_1column_1clear_FUNC,
+	_1gtk_1tree_1view_1column_1get_1button_FUNC,
 	_1gtk_1tree_1view_1column_1get_1cell_1renderers_FUNC,
 	_1gtk_1tree_1view_1column_1get_1fixed_1width_FUNC,
 	_1gtk_1tree_1view_1column_1get_1reorderable_FUNC,
 	_1gtk_1tree_1view_1column_1get_1resizable_FUNC,
-	_1gtk_1tree_1view_1column_1get_1sizing_FUNC,
-	_1gtk_1tree_1view_1column_1get_1sort_1indicator_FUNC,
-	_1gtk_1tree_1view_1column_1get_1sort_1order_FUNC,
-	_1gtk_1tree_1view_1column_1get_1spacing_FUNC,
 	_1gtk_1tree_1view_1column_1get_1visible_FUNC,
 	_1gtk_1tree_1view_1column_1get_1width_FUNC,
 	_1gtk_1tree_1view_1column_1new_FUNC,
@@ -1245,10 +1285,9 @@ typedef enum {
 	_1gtk_1tree_1view_1column_1set_1sizing_FUNC,
 	_1gtk_1tree_1view_1column_1set_1sort_1indicator_FUNC,
 	_1gtk_1tree_1view_1column_1set_1sort_1order_FUNC,
-	_1gtk_1tree_1view_1column_1set_1title_FUNC,
 	_1gtk_1tree_1view_1column_1set_1visible_FUNC,
 	_1gtk_1tree_1view_1column_1set_1widget_FUNC,
-	_1gtk_1tree_1view_1convert_1widget_1to_1bin_1window_1coords_FUNC,
+	_1gtk_1tree_1view_1convert_1bin_1window_1to_1tree_1coords_FUNC,
 	_1gtk_1tree_1view_1create_1row_1drag_1icon_FUNC,
 	_1gtk_1tree_1view_1expand_1row_FUNC,
 	_1gtk_1tree_1view_1get_1background_1area_FUNC,
@@ -1281,7 +1320,6 @@ typedef enum {
 	_1gtk_1tree_1view_1unset_1rows_1drag_1dest_FUNC,
 	_1gtk_1tree_1view_1widget_1to_1tree_1coords_FUNC,
 	_1gtk_1vbox_1new_FUNC,
-	_1gtk_1viewport_1get_1shadow_1type_FUNC,
 	_1gtk_1viewport_1set_1shadow_1type_FUNC,
 	_1gtk_1vscale_1new_FUNC,
 	_1gtk_1vscrollbar_1new_FUNC,
@@ -1300,53 +1338,74 @@ typedef enum {
 	_1gtk_1widget_1create_1pango_1layout__J_3B_FUNC,
 #endif
 	_1gtk_1widget_1destroy_FUNC,
+	_1gtk_1widget_1draw_FUNC,
 	_1gtk_1widget_1event_FUNC,
 	_1gtk_1widget_1get_1accessible_FUNC,
+	_1gtk_1widget_1get_1allocation_FUNC,
+	_1gtk_1widget_1get_1can_1default_FUNC,
 	_1gtk_1widget_1get_1child_1visible_FUNC,
-	_1gtk_1widget_1get_1default_1direction_FUNC,
 	_1gtk_1widget_1get_1default_1style_FUNC,
-	_1gtk_1widget_1get_1direction_FUNC,
 	_1gtk_1widget_1get_1events_FUNC,
+	_1gtk_1widget_1get_1has_1window_FUNC,
+	_1gtk_1widget_1get_1mapped_FUNC,
 	_1gtk_1widget_1get_1modifier_1style_FUNC,
 	_1gtk_1widget_1get_1pango_1context_FUNC,
 	_1gtk_1widget_1get_1parent_FUNC,
 	_1gtk_1widget_1get_1parent_1window_FUNC,
+	_1gtk_1widget_1get_1preferred_1height_1for_1width_FUNC,
+	_1gtk_1widget_1get_1preferred_1size_FUNC,
+	_1gtk_1widget_1get_1preferred_1width_1for_1height_FUNC,
+	_1gtk_1widget_1get_1realized_FUNC,
+	_1gtk_1widget_1get_1sensitive_FUNC,
 	_1gtk_1widget_1get_1size_1request_FUNC,
+	_1gtk_1widget_1get_1state_1flags_FUNC,
 	_1gtk_1widget_1get_1style_FUNC,
+	_1gtk_1widget_1get_1style_1context_FUNC,
 	_1gtk_1widget_1get_1tooltip_1text_FUNC,
 	_1gtk_1widget_1get_1toplevel_FUNC,
+	_1gtk_1widget_1get_1visible_FUNC,
+	_1gtk_1widget_1get_1window_FUNC,
 	_1gtk_1widget_1grab_1focus_FUNC,
+	_1gtk_1widget_1has_1default_FUNC,
+	_1gtk_1widget_1has_1focus_FUNC,
 	_1gtk_1widget_1hide_FUNC,
+	_1gtk_1widget_1input_1shape_1combine_1region_FUNC,
 	_1gtk_1widget_1is_1composited_FUNC,
 	_1gtk_1widget_1is_1focus_FUNC,
 	_1gtk_1widget_1map_FUNC,
 	_1gtk_1widget_1mnemonic_1activate_FUNC,
 	_1gtk_1widget_1modify_1base_FUNC,
 	_1gtk_1widget_1modify_1bg_FUNC,
-	_1gtk_1widget_1modify_1fg_FUNC,
 	_1gtk_1widget_1modify_1font_FUNC,
 	_1gtk_1widget_1modify_1style_FUNC,
-	_1gtk_1widget_1modify_1text_FUNC,
+	_1gtk_1widget_1override_1background_1color_FUNC,
+	_1gtk_1widget_1override_1color_FUNC,
+	_1gtk_1widget_1override_1font_FUNC,
 	_1gtk_1widget_1queue_1resize_FUNC,
 	_1gtk_1widget_1realize_FUNC,
 	_1gtk_1widget_1remove_1accelerator_FUNC,
 	_1gtk_1widget_1reparent_FUNC,
 	_1gtk_1widget_1send_1expose_FUNC,
+	_1gtk_1widget_1set_1allocation_FUNC,
 	_1gtk_1widget_1set_1app_1paintable_FUNC,
+	_1gtk_1widget_1set_1can_1default_FUNC,
+	_1gtk_1widget_1set_1can_1focus_FUNC,
 	_1gtk_1widget_1set_1default_1direction_FUNC,
 	_1gtk_1widget_1set_1direction_FUNC,
 	_1gtk_1widget_1set_1double_1buffered_FUNC,
+	_1gtk_1widget_1set_1has_1window_FUNC,
+	_1gtk_1widget_1set_1mapped_FUNC,
 	_1gtk_1widget_1set_1name_FUNC,
 	_1gtk_1widget_1set_1parent_1window_FUNC,
+	_1gtk_1widget_1set_1receives_1default_FUNC,
 	_1gtk_1widget_1set_1redraw_1on_1allocate_FUNC,
 	_1gtk_1widget_1set_1sensitive_FUNC,
 	_1gtk_1widget_1set_1size_1request_FUNC,
 	_1gtk_1widget_1set_1state_FUNC,
-	_1gtk_1widget_1set_1style_FUNC,
 	_1gtk_1widget_1set_1tooltip_1text_FUNC,
-	_1gtk_1widget_1shape_1combine_1mask_FUNC,
+	_1gtk_1widget_1set_1visible_FUNC,
+	_1gtk_1widget_1shape_1combine_1region_FUNC,
 	_1gtk_1widget_1show_FUNC,
-	_1gtk_1widget_1show_1now_FUNC,
 	_1gtk_1widget_1size_1allocate_FUNC,
 	_1gtk_1widget_1size_1request_FUNC,
 #ifndef JNI64
@@ -1360,7 +1419,6 @@ typedef enum {
 	_1gtk_1widget_1style_1get__J_3B_3JJ_FUNC,
 #endif
 	_1gtk_1widget_1translate_1coordinates_FUNC,
-	_1gtk_1widget_1unrealize_FUNC,
 	_1gtk_1window_1activate_1default_FUNC,
 	_1gtk_1window_1add_1accel_1group_FUNC,
 	_1gtk_1window_1deiconify_FUNC,
@@ -1372,7 +1430,6 @@ typedef enum {
 	_1gtk_1window_1get_1modal_FUNC,
 	_1gtk_1window_1get_1opacity_FUNC,
 	_1gtk_1window_1get_1position_FUNC,
-	_1gtk_1window_1get_1size_FUNC,
 	_1gtk_1window_1group_1add_1window_FUNC,
 	_1gtk_1window_1group_1new_FUNC,
 	_1gtk_1window_1group_1remove_1window_FUNC,
@@ -1382,14 +1439,12 @@ typedef enum {
 	_1gtk_1window_1maximize_FUNC,
 	_1gtk_1window_1move_FUNC,
 	_1gtk_1window_1new_FUNC,
-	_1gtk_1window_1present_FUNC,
 	_1gtk_1window_1remove_1accel_1group_FUNC,
 	_1gtk_1window_1resize_FUNC,
 	_1gtk_1window_1set_1default_FUNC,
 	_1gtk_1window_1set_1destroy_1with_1parent_FUNC,
 	_1gtk_1window_1set_1geometry_1hints_FUNC,
 	_1gtk_1window_1set_1icon_1list_FUNC,
-	_1gtk_1window_1set_1keep_1below_FUNC,
 	_1gtk_1window_1set_1modal_FUNC,
 	_1gtk_1window_1set_1opacity_FUNC,
 	_1gtk_1window_1set_1resizable_FUNC,
@@ -1475,6 +1530,7 @@ typedef enum {
 	_1pango_1layout_1get_1line_FUNC,
 	_1pango_1layout_1get_1line_1count_FUNC,
 	_1pango_1layout_1get_1log_1attrs_FUNC,
+	_1pango_1layout_1get_1pixel_1size_FUNC,
 	_1pango_1layout_1get_1size_FUNC,
 	_1pango_1layout_1get_1spacing_FUNC,
 	_1pango_1layout_1get_1tabs_FUNC,
@@ -1508,6 +1564,10 @@ typedef enum {
 	_1pango_1tab_1array_1get_1tabs_FUNC,
 	_1pango_1tab_1array_1new_FUNC,
 	_1pango_1tab_1array_1set_1tab_FUNC,
+	_1swt_1fixed_1get_1type_FUNC,
+	_1swt_1fixed_1move_FUNC,
+	_1swt_1fixed_1resize_FUNC,
+	_1swt_1fixed_1restack_FUNC,
 	_1ubuntu_1menu_1proxy_1get_FUNC,
 	g_1main_1context_1wakeup_FUNC,
 	g_1value_1get_1double_FUNC,
@@ -1520,10 +1580,10 @@ typedef enum {
 	g_1value_1set_1int_FUNC,
 	g_1value_1set_1int64_FUNC,
 	g_1value_1unset_FUNC,
-	gdk_1threads_1enter_FUNC,
-	gdk_1threads_1init_FUNC,
 	gdk_1threads_1leave_FUNC,
 	gdk_1threads_1set_1lock_1functions_FUNC,
+	imContextLast_FUNC,
+	imContextNewProc_1CALLBACK_FUNC,
 	localeconv_1decimal_1point_FUNC,
 #ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_gtk_GInterfaceInfo_2I_FUNC,
@@ -1596,21 +1656,11 @@ typedef enum {
 	memmove__JLorg_eclipse_swt_internal_gtk_XClientMessageEvent_2J_FUNC,
 #endif
 #ifndef JNI64
-	memmove__ILorg_eclipse_swt_internal_gtk_XCrossingEvent_2I_FUNC,
-#else
-	memmove__JLorg_eclipse_swt_internal_gtk_XCrossingEvent_2J_FUNC,
-#endif
-#ifndef JNI64
 	memmove__ILorg_eclipse_swt_internal_gtk_XExposeEvent_2I_FUNC,
 #else
 	memmove__JLorg_eclipse_swt_internal_gtk_XExposeEvent_2J_FUNC,
 #endif
 #ifndef JNI64
-	memmove__ILorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2I_FUNC,
-#else
-	memmove__JLorg_eclipse_swt_internal_gtk_XFocusChangeEvent_2J_FUNC,
-#endif
-#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_GObjectClass_2J_FUNC,
@@ -1736,11 +1786,6 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_gtk_GtkSelectionData_2JJ_FUNC,
 #endif
 #ifndef JNI64
-	memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2II_FUNC,
-#else
-	memmove__Lorg_eclipse_swt_internal_gtk_GtkTargetPair_2JJ_FUNC,
-#endif
-#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2I_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_GtkWidgetClass_2J_FUNC,
@@ -1781,11 +1826,6 @@ typedef enum {
 	memmove__Lorg_eclipse_swt_internal_gtk_PangoLogAttr_2JJ_FUNC,
 #endif
 #ifndef JNI64
-	memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2II_FUNC,
-#else
-	memmove__Lorg_eclipse_swt_internal_gtk_XCrossingEvent_2JJ_FUNC,
-#endif
-#ifndef JNI64
 	memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2II_FUNC,
 #else
 	memmove__Lorg_eclipse_swt_internal_gtk_XExposeEvent_2JJ_FUNC,
diff --git a/os_structs.c b/os_structs.c
index f40d3a9..1fa8f1d 100644
--- a/os_structs.c
+++ b/os_structs.c
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2013 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -529,7 +529,7 @@ GdkEventExpose *getGdkEventExposeFields(JNIEnv *env, jobject lpObject, GdkEventE
 	lpStruct->area.y = (*env)->GetIntField(env, lpObject, GdkEventExposeFc.area_y);
 	lpStruct->area.width = (*env)->GetIntField(env, lpObject, GdkEventExposeFc.area_width);
 	lpStruct->area.height = (*env)->GetIntField(env, lpObject, GdkEventExposeFc.area_height);
-	lpStruct->region = (GdkRegion *)(*env)->GetIntLongField(env, lpObject, GdkEventExposeFc.region);
+	lpStruct->region = (void *)(*env)->GetIntLongField(env, lpObject, GdkEventExposeFc.region);
 	lpStruct->count = (gint)(*env)->GetIntField(env, lpObject, GdkEventExposeFc.count);
 	return lpStruct;
 }
@@ -1126,6 +1126,46 @@ void setGdkImageFields(JNIEnv *env, jobject lpObject, GdkImage *lpStruct)
 }
 #endif
 
+#ifndef NO_GdkRGBA
+typedef struct GdkRGBA_FID_CACHE {
+	int cached;
+	jclass clazz;
+	jfieldID red, green, blue, alpha;
+} GdkRGBA_FID_CACHE;
+
+GdkRGBA_FID_CACHE GdkRGBAFc;
+
+void cacheGdkRGBAFields(JNIEnv *env, jobject lpObject)
+{
+	if (GdkRGBAFc.cached) return;
+	GdkRGBAFc.clazz = (*env)->GetObjectClass(env, lpObject);
+	GdkRGBAFc.red = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "red", "D");
+	GdkRGBAFc.green = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "green", "D");
+	GdkRGBAFc.blue = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "blue", "D");
+	GdkRGBAFc.alpha = (*env)->GetFieldID(env, GdkRGBAFc.clazz, "alpha", "D");
+	GdkRGBAFc.cached = 1;
+}
+
+GdkRGBA *getGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct)
+{
+	if (!GdkRGBAFc.cached) cacheGdkRGBAFields(env, lpObject);
+	lpStruct->red = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.red);
+	lpStruct->green = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.green);
+	lpStruct->blue = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.blue);
+	lpStruct->alpha = (*env)->GetDoubleField(env, lpObject, GdkRGBAFc.alpha);
+	return lpStruct;
+}
+
+void setGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct)
+{
+	if (!GdkRGBAFc.cached) cacheGdkRGBAFields(env, lpObject);
+	(*env)->SetDoubleField(env, lpObject, GdkRGBAFc.red, (jdouble)lpStruct->red);
+	(*env)->SetDoubleField(env, lpObject, GdkRGBAFc.green, (jdouble)lpStruct->green);
+	(*env)->SetDoubleField(env, lpObject, GdkRGBAFc.blue, (jdouble)lpStruct->blue);
+	(*env)->SetDoubleField(env, lpObject, GdkRGBAFc.alpha, (jdouble)lpStruct->alpha);
+}
+#endif
+
 #ifndef NO_GdkRectangle
 typedef struct GdkRectangle_FID_CACHE {
 	int cached;
@@ -1277,7 +1317,9 @@ GdkWindowAttr *getGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAt
 	lpStruct->height = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.height);
 	lpStruct->wclass = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.wclass);
 	lpStruct->visual = (GdkVisual *)(*env)->GetIntLongField(env, lpObject, GdkWindowAttrFc.visual);
+#ifndef GTK3
 	lpStruct->colormap = (GdkColormap *)(*env)->GetIntLongField(env, lpObject, GdkWindowAttrFc.colormap);
+#endif
 	lpStruct->window_type = (*env)->GetIntField(env, lpObject, GdkWindowAttrFc.window_type);
 	lpStruct->cursor = (GdkCursor *)(*env)->GetIntLongField(env, lpObject, GdkWindowAttrFc.cursor);
 	lpStruct->wmclass_name = (gchar *)(*env)->GetIntLongField(env, lpObject, GdkWindowAttrFc.wmclass_name);
@@ -1297,7 +1339,9 @@ void setGdkWindowAttrFields(JNIEnv *env, jobject lpObject, GdkWindowAttr *lpStru
 	(*env)->SetIntField(env, lpObject, GdkWindowAttrFc.height, (jint)lpStruct->height);
 	(*env)->SetIntField(env, lpObject, GdkWindowAttrFc.wclass, (jint)lpStruct->wclass);
 	(*env)->SetIntLongField(env, lpObject, GdkWindowAttrFc.visual, (jintLong)lpStruct->visual);
+#ifndef GTK3
 	(*env)->SetIntLongField(env, lpObject, GdkWindowAttrFc.colormap, (jintLong)lpStruct->colormap);
+#endif
 	(*env)->SetIntField(env, lpObject, GdkWindowAttrFc.window_type, (jint)lpStruct->window_type);
 	(*env)->SetIntLongField(env, lpObject, GdkWindowAttrFc.cursor, (jintLong)lpStruct->cursor);
 	(*env)->SetIntLongField(env, lpObject, GdkWindowAttrFc.wmclass_name, (jintLong)lpStruct->wmclass_name);
@@ -1436,7 +1480,7 @@ void setGtkBorderFields(JNIEnv *env, jobject lpObject, GtkBorder *lpStruct)
 typedef struct GtkCellRendererClass_FID_CACHE {
 	int cached;
 	jclass clazz;
-	jfieldID render, get_size;
+	jfieldID render, get_size, get_preferred_width;
 } GtkCellRendererClass_FID_CACHE;
 
 GtkCellRendererClass_FID_CACHE GtkCellRendererClassFc;
@@ -1447,6 +1491,7 @@ void cacheGtkCellRendererClassFields(JNIEnv *env, jobject lpObject)
 	GtkCellRendererClassFc.clazz = (*env)->GetObjectClass(env, lpObject);
 	GtkCellRendererClassFc.render = (*env)->GetFieldID(env, GtkCellRendererClassFc.clazz, "render", I_J);
 	GtkCellRendererClassFc.get_size = (*env)->GetFieldID(env, GtkCellRendererClassFc.clazz, "get_size", I_J);
+	GtkCellRendererClassFc.get_preferred_width = (*env)->GetFieldID(env, GtkCellRendererClassFc.clazz, "get_preferred_width", I_J);
 	GtkCellRendererClassFc.cached = 1;
 }
 
@@ -1454,7 +1499,12 @@ GtkCellRendererClass *getGtkCellRendererClassFields(JNIEnv *env, jobject lpObjec
 {
 	if (!GtkCellRendererClassFc.cached) cacheGtkCellRendererClassFields(env, lpObject);
 	lpStruct->render = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkCellRendererClassFc.render);
+#ifndef GTK3
 	lpStruct->get_size = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkCellRendererClassFc.get_size);
+#endif
+#ifdef GTK3
+	lpStruct->get_preferred_width = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkCellRendererClassFc.get_preferred_width);
+#endif
 	return lpStruct;
 }
 
@@ -1462,7 +1512,12 @@ void setGtkCellRendererClassFields(JNIEnv *env, jobject lpObject, GtkCellRendere
 {
 	if (!GtkCellRendererClassFc.cached) cacheGtkCellRendererClassFields(env, lpObject);
 	(*env)->SetIntLongField(env, lpObject, GtkCellRendererClassFc.render, (jintLong)lpStruct->render);
+#ifndef GTK3
 	(*env)->SetIntLongField(env, lpObject, GtkCellRendererClassFc.get_size, (jintLong)lpStruct->get_size);
+#endif
+#ifdef GTK3
+	(*env)->SetIntLongField(env, lpObject, GtkCellRendererClassFc.get_preferred_width, (jintLong)lpStruct->get_preferred_width);
+#endif
 }
 #endif
 
@@ -1654,48 +1709,11 @@ void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpSt
 }
 #endif
 
-#ifndef NO_GtkTargetPair
-typedef struct GtkTargetPair_FID_CACHE {
-	int cached;
-	jclass clazz;
-	jfieldID target, flags, info;
-} GtkTargetPair_FID_CACHE;
-
-GtkTargetPair_FID_CACHE GtkTargetPairFc;
-
-void cacheGtkTargetPairFields(JNIEnv *env, jobject lpObject)
-{
-	if (GtkTargetPairFc.cached) return;
-	GtkTargetPairFc.clazz = (*env)->GetObjectClass(env, lpObject);
-	GtkTargetPairFc.target = (*env)->GetFieldID(env, GtkTargetPairFc.clazz, "target", I_J);
-	GtkTargetPairFc.flags = (*env)->GetFieldID(env, GtkTargetPairFc.clazz, "flags", "I");
-	GtkTargetPairFc.info = (*env)->GetFieldID(env, GtkTargetPairFc.clazz, "info", "I");
-	GtkTargetPairFc.cached = 1;
-}
-
-GtkTargetPair *getGtkTargetPairFields(JNIEnv *env, jobject lpObject, GtkTargetPair *lpStruct)
-{
-	if (!GtkTargetPairFc.cached) cacheGtkTargetPairFields(env, lpObject);
-	lpStruct->target = (GdkAtom)(*env)->GetIntLongField(env, lpObject, GtkTargetPairFc.target);
-	lpStruct->flags = (guint)(*env)->GetIntField(env, lpObject, GtkTargetPairFc.flags);
-	lpStruct->info = (guint)(*env)->GetIntField(env, lpObject, GtkTargetPairFc.info);
-	return lpStruct;
-}
-
-void setGtkTargetPairFields(JNIEnv *env, jobject lpObject, GtkTargetPair *lpStruct)
-{
-	if (!GtkTargetPairFc.cached) cacheGtkTargetPairFields(env, lpObject);
-	(*env)->SetIntLongField(env, lpObject, GtkTargetPairFc.target, (jintLong)lpStruct->target);
-	(*env)->SetIntField(env, lpObject, GtkTargetPairFc.flags, (jint)lpStruct->flags);
-	(*env)->SetIntField(env, lpObject, GtkTargetPairFc.info, (jint)lpStruct->info);
-}
-#endif
-
 #ifndef NO_GtkWidgetClass
 typedef struct GtkWidgetClass_FID_CACHE {
 	int cached;
 	jclass clazz;
-	jfieldID activate_signal, set_scroll_adjustments_signal, dispatch_child_properties_changed, show, show_all, hide, hide_all, map, unmap, realize, unrealize, size_request, size_allocate, state_changed, parent_set, hierarchy_changed, style_set, direction_changed, grab_notify, child_notify, mnemonic_activate, grab_focus, focus, event, button_press_event, button_release_event, scroll_event, motion_notify_event, delete_event, destroy_event, expose_event, key_press_event, key_release_event, en [...]
+	jfieldID map, size_allocate;
 } GtkWidgetClass_FID_CACHE;
 
 GtkWidgetClass_FID_CACHE GtkWidgetClassFc;
@@ -1705,70 +1723,8 @@ void cacheGtkWidgetClassFields(JNIEnv *env, jobject lpObject)
 	if (GtkWidgetClassFc.cached) return;
 	cacheGObjectClassFields(env, lpObject);
 	GtkWidgetClassFc.clazz = (*env)->GetObjectClass(env, lpObject);
-	GtkWidgetClassFc.activate_signal = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "activate_signal", "I");
-	GtkWidgetClassFc.set_scroll_adjustments_signal = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "set_scroll_adjustments_signal", "I");
-	GtkWidgetClassFc.dispatch_child_properties_changed = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "dispatch_child_properties_changed", I_J);
-	GtkWidgetClassFc.show = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "show", I_J);
-	GtkWidgetClassFc.show_all = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "show_all", I_J);
-	GtkWidgetClassFc.hide = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "hide", I_J);
-	GtkWidgetClassFc.hide_all = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "hide_all", I_J);
 	GtkWidgetClassFc.map = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "map", I_J);
-	GtkWidgetClassFc.unmap = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "unmap", I_J);
-	GtkWidgetClassFc.realize = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "realize", I_J);
-	GtkWidgetClassFc.unrealize = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "unrealize", I_J);
-	GtkWidgetClassFc.size_request = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "size_request", I_J);
 	GtkWidgetClassFc.size_allocate = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "size_allocate", I_J);
-	GtkWidgetClassFc.state_changed = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "state_changed", I_J);
-	GtkWidgetClassFc.parent_set = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "parent_set", I_J);
-	GtkWidgetClassFc.hierarchy_changed = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "hierarchy_changed", I_J);
-	GtkWidgetClassFc.style_set = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "style_set", I_J);
-	GtkWidgetClassFc.direction_changed = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "direction_changed", I_J);
-	GtkWidgetClassFc.grab_notify = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "grab_notify", I_J);
-	GtkWidgetClassFc.child_notify = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "child_notify", I_J);
-	GtkWidgetClassFc.mnemonic_activate = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "mnemonic_activate", I_J);
-	GtkWidgetClassFc.grab_focus = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "grab_focus", I_J);
-	GtkWidgetClassFc.focus = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "focus", I_J);
-	GtkWidgetClassFc.event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "event", I_J);
-	GtkWidgetClassFc.button_press_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "button_press_event", I_J);
-	GtkWidgetClassFc.button_release_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "button_release_event", I_J);
-	GtkWidgetClassFc.scroll_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "scroll_event", I_J);
-	GtkWidgetClassFc.motion_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "motion_notify_event", I_J);
-	GtkWidgetClassFc.delete_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "delete_event", I_J);
-	GtkWidgetClassFc.destroy_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "destroy_event", I_J);
-	GtkWidgetClassFc.expose_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "expose_event", I_J);
-	GtkWidgetClassFc.key_press_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "key_press_event", I_J);
-	GtkWidgetClassFc.key_release_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "key_release_event", I_J);
-	GtkWidgetClassFc.enter_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "enter_notify_event", I_J);
-	GtkWidgetClassFc.leave_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "leave_notify_event", I_J);
-	GtkWidgetClassFc.configure_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "configure_event", I_J);
-	GtkWidgetClassFc.focus_in_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "focus_in_event", I_J);
-	GtkWidgetClassFc.focus_out_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "focus_out_event", I_J);
-	GtkWidgetClassFc.map_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "map_event", I_J);
-	GtkWidgetClassFc.unmap_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "unmap_event", I_J);
-	GtkWidgetClassFc.property_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "property_notify_event", I_J);
-	GtkWidgetClassFc.selection_clear_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "selection_clear_event", I_J);
-	GtkWidgetClassFc.selection_request_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "selection_request_event", I_J);
-	GtkWidgetClassFc.selection_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "selection_notify_event", I_J);
-	GtkWidgetClassFc.proximity_in_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "proximity_in_event", I_J);
-	GtkWidgetClassFc.proximity_out_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "proximity_out_event", I_J);
-	GtkWidgetClassFc.visibility_notify_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "visibility_notify_event", I_J);
-	GtkWidgetClassFc.client_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "client_event", I_J);
-	GtkWidgetClassFc.no_expose_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "no_expose_event", I_J);
-	GtkWidgetClassFc.window_state_event = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "window_state_event", I_J);
-	GtkWidgetClassFc.selection_get = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "selection_get", I_J);
-	GtkWidgetClassFc.selection_received = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "selection_received", I_J);
-	GtkWidgetClassFc.drag_begin = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_begin", I_J);
-	GtkWidgetClassFc.drag_end = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_end", I_J);
-	GtkWidgetClassFc.drag_data_get = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_data_get", I_J);
-	GtkWidgetClassFc.drag_data_delete = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_data_delete", I_J);
-	GtkWidgetClassFc.drag_leave = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_leave", I_J);
-	GtkWidgetClassFc.drag_motion = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_motion", I_J);
-	GtkWidgetClassFc.drag_drop = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_drop", I_J);
-	GtkWidgetClassFc.drag_data_received = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "drag_data_received", I_J);
-	GtkWidgetClassFc.popup_menu = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "popup_menu", I_J);
-	GtkWidgetClassFc.show_help = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "show_help", I_J);
-	GtkWidgetClassFc.get_accessible = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "get_accessible", I_J);
-	GtkWidgetClassFc.screen_changed = (*env)->GetFieldID(env, GtkWidgetClassFc.clazz, "screen_changed", I_J);
 	GtkWidgetClassFc.cached = 1;
 }
 
@@ -1776,70 +1732,8 @@ GtkWidgetClass *getGtkWidgetClassFields(JNIEnv *env, jobject lpObject, GtkWidget
 {
 	if (!GtkWidgetClassFc.cached) cacheGtkWidgetClassFields(env, lpObject);
 	getGObjectClassFields(env, lpObject, (GObjectClass *)lpStruct);
-	lpStruct->activate_signal = (*env)->GetIntField(env, lpObject, GtkWidgetClassFc.activate_signal);
-	lpStruct->set_scroll_adjustments_signal = (*env)->GetIntField(env, lpObject, GtkWidgetClassFc.set_scroll_adjustments_signal);
-	lpStruct->dispatch_child_properties_changed = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.dispatch_child_properties_changed);
-	lpStruct->show = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.show);
-	lpStruct->show_all = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.show_all);
-	lpStruct->hide = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.hide);
-	lpStruct->hide_all = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.hide_all);
 	lpStruct->map = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.map);
-	lpStruct->unmap = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.unmap);
-	lpStruct->realize = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.realize);
-	lpStruct->unrealize = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.unrealize);
-	lpStruct->size_request = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.size_request);
 	lpStruct->size_allocate = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.size_allocate);
-	lpStruct->state_changed = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.state_changed);
-	lpStruct->parent_set = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.parent_set);
-	lpStruct->hierarchy_changed = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.hierarchy_changed);
-	lpStruct->style_set = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.style_set);
-	lpStruct->direction_changed = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.direction_changed);
-	lpStruct->grab_notify = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.grab_notify);
-	lpStruct->child_notify = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.child_notify);
-	lpStruct->mnemonic_activate = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.mnemonic_activate);
-	lpStruct->grab_focus = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.grab_focus);
-	lpStruct->focus = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.focus);
-	lpStruct->event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.event);
-	lpStruct->button_press_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.button_press_event);
-	lpStruct->button_release_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.button_release_event);
-	lpStruct->scroll_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.scroll_event);
-	lpStruct->motion_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.motion_notify_event);
-	lpStruct->delete_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.delete_event);
-	lpStruct->destroy_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.destroy_event);
-	lpStruct->expose_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.expose_event);
-	lpStruct->key_press_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.key_press_event);
-	lpStruct->key_release_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.key_release_event);
-	lpStruct->enter_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.enter_notify_event);
-	lpStruct->leave_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.leave_notify_event);
-	lpStruct->configure_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.configure_event);
-	lpStruct->focus_in_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.focus_in_event);
-	lpStruct->focus_out_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.focus_out_event);
-	lpStruct->map_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.map_event);
-	lpStruct->unmap_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.unmap_event);
-	lpStruct->property_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.property_notify_event);
-	lpStruct->selection_clear_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.selection_clear_event);
-	lpStruct->selection_request_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.selection_request_event);
-	lpStruct->selection_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.selection_notify_event);
-	lpStruct->proximity_in_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.proximity_in_event);
-	lpStruct->proximity_out_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.proximity_out_event);
-	lpStruct->visibility_notify_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.visibility_notify_event);
-	lpStruct->client_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.client_event);
-	lpStruct->no_expose_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.no_expose_event);
-	lpStruct->window_state_event = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.window_state_event);
-	lpStruct->selection_get = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.selection_get);
-	lpStruct->selection_received = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.selection_received);
-	lpStruct->drag_begin = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_begin);
-	lpStruct->drag_end = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_end);
-	lpStruct->drag_data_get = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_get);
-	lpStruct->drag_data_delete = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_delete);
-	lpStruct->drag_leave = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_leave);
-	lpStruct->drag_motion = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_motion);
-	lpStruct->drag_drop = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_drop);
-	lpStruct->drag_data_received = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_received);
-	lpStruct->popup_menu = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.popup_menu);
-	lpStruct->show_help = (gboolean(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.show_help);
-	lpStruct->get_accessible = (AtkObject*(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.get_accessible);
-	lpStruct->screen_changed = (void(*)())(*env)->GetIntLongField(env, lpObject, GtkWidgetClassFc.screen_changed);
 	return lpStruct;
 }
 
@@ -1847,70 +1741,8 @@ void setGtkWidgetClassFields(JNIEnv *env, jobject lpObject, GtkWidgetClass *lpSt
 {
 	if (!GtkWidgetClassFc.cached) cacheGtkWidgetClassFields(env, lpObject);
 	setGObjectClassFields(env, lpObject, (GObjectClass *)lpStruct);
-	(*env)->SetIntField(env, lpObject, GtkWidgetClassFc.activate_signal, (jint)lpStruct->activate_signal);
-	(*env)->SetIntField(env, lpObject, GtkWidgetClassFc.set_scroll_adjustments_signal, (jint)lpStruct->set_scroll_adjustments_signal);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.dispatch_child_properties_changed, (jintLong)lpStruct->dispatch_child_properties_changed);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.show, (jintLong)lpStruct->show);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.show_all, (jintLong)lpStruct->show_all);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.hide, (jintLong)lpStruct->hide);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.hide_all, (jintLong)lpStruct->hide_all);
 	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.map, (jintLong)lpStruct->map);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.unmap, (jintLong)lpStruct->unmap);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.realize, (jintLong)lpStruct->realize);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.unrealize, (jintLong)lpStruct->unrealize);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.size_request, (jintLong)lpStruct->size_request);
 	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.size_allocate, (jintLong)lpStruct->size_allocate);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.state_changed, (jintLong)lpStruct->state_changed);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.parent_set, (jintLong)lpStruct->parent_set);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.hierarchy_changed, (jintLong)lpStruct->hierarchy_changed);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.style_set, (jintLong)lpStruct->style_set);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.direction_changed, (jintLong)lpStruct->direction_changed);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.grab_notify, (jintLong)lpStruct->grab_notify);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.child_notify, (jintLong)lpStruct->child_notify);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.mnemonic_activate, (jintLong)lpStruct->mnemonic_activate);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.grab_focus, (jintLong)lpStruct->grab_focus);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.focus, (jintLong)lpStruct->focus);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.event, (jintLong)lpStruct->event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.button_press_event, (jintLong)lpStruct->button_press_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.button_release_event, (jintLong)lpStruct->button_release_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.scroll_event, (jintLong)lpStruct->scroll_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.motion_notify_event, (jintLong)lpStruct->motion_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.delete_event, (jintLong)lpStruct->delete_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.destroy_event, (jintLong)lpStruct->destroy_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.expose_event, (jintLong)lpStruct->expose_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.key_press_event, (jintLong)lpStruct->key_press_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.key_release_event, (jintLong)lpStruct->key_release_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.enter_notify_event, (jintLong)lpStruct->enter_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.leave_notify_event, (jintLong)lpStruct->leave_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.configure_event, (jintLong)lpStruct->configure_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.focus_in_event, (jintLong)lpStruct->focus_in_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.focus_out_event, (jintLong)lpStruct->focus_out_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.map_event, (jintLong)lpStruct->map_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.unmap_event, (jintLong)lpStruct->unmap_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.property_notify_event, (jintLong)lpStruct->property_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.selection_clear_event, (jintLong)lpStruct->selection_clear_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.selection_request_event, (jintLong)lpStruct->selection_request_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.selection_notify_event, (jintLong)lpStruct->selection_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.proximity_in_event, (jintLong)lpStruct->proximity_in_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.proximity_out_event, (jintLong)lpStruct->proximity_out_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.visibility_notify_event, (jintLong)lpStruct->visibility_notify_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.client_event, (jintLong)lpStruct->client_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.no_expose_event, (jintLong)lpStruct->no_expose_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.window_state_event, (jintLong)lpStruct->window_state_event);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.selection_get, (jintLong)lpStruct->selection_get);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.selection_received, (jintLong)lpStruct->selection_received);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_begin, (jintLong)lpStruct->drag_begin);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_end, (jintLong)lpStruct->drag_end);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_get, (jintLong)lpStruct->drag_data_get);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_delete, (jintLong)lpStruct->drag_data_delete);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_leave, (jintLong)lpStruct->drag_leave);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_motion, (jintLong)lpStruct->drag_motion);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_drop, (jintLong)lpStruct->drag_drop);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.drag_data_received, (jintLong)lpStruct->drag_data_received);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.popup_menu, (jintLong)lpStruct->popup_menu);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.show_help, (jintLong)lpStruct->show_help);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.get_accessible, (jintLong)lpStruct->get_accessible);
-	(*env)->SetIntLongField(env, lpObject, GtkWidgetClassFc.screen_changed, (jintLong)lpStruct->screen_changed);
 }
 #endif
 
diff --git a/os_structs.h b/os_structs.h
index eec80eb..cbea7c2 100644
--- a/os_structs.h
+++ b/os_structs.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2000, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -267,6 +267,18 @@ void setGdkImageFields(JNIEnv *env, jobject lpObject, GdkImage *lpStruct);
 #define GdkImage_sizeof() 0
 #endif
 
+#ifndef NO_GdkRGBA
+void cacheGdkRGBAFields(JNIEnv *env, jobject lpObject);
+GdkRGBA *getGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct);
+void setGdkRGBAFields(JNIEnv *env, jobject lpObject, GdkRGBA *lpStruct);
+#define GdkRGBA_sizeof() sizeof(GdkRGBA)
+#else
+#define cacheGdkRGBAFields(a,b)
+#define getGdkRGBAFields(a,b,c) NULL
+#define setGdkRGBAFields(a,b,c)
+#define GdkRGBA_sizeof() 0
+#endif
+
 #ifndef NO_GdkRectangle
 void cacheGdkRectangleFields(JNIEnv *env, jobject lpObject);
 GdkRectangle *getGdkRectangleFields(JNIEnv *env, jobject lpObject, GdkRectangle *lpStruct);
@@ -411,18 +423,6 @@ void setGtkTargetEntryFields(JNIEnv *env, jobject lpObject, GtkTargetEntry *lpSt
 #define GtkTargetEntry_sizeof() 0
 #endif
 
-#ifndef NO_GtkTargetPair
-void cacheGtkTargetPairFields(JNIEnv *env, jobject lpObject);
-GtkTargetPair *getGtkTargetPairFields(JNIEnv *env, jobject lpObject, GtkTargetPair *lpStruct);
-void setGtkTargetPairFields(JNIEnv *env, jobject lpObject, GtkTargetPair *lpStruct);
-#define GtkTargetPair_sizeof() sizeof(GtkTargetPair)
-#else
-#define cacheGtkTargetPairFields(a,b)
-#define getGtkTargetPairFields(a,b,c) NULL
-#define setGtkTargetPairFields(a,b,c)
-#define GtkTargetPair_sizeof() 0
-#endif
-
 #ifndef NO_GtkWidgetClass
 void cacheGtkWidgetClassFields(JNIEnv *env, jobject lpObject);
 GtkWidgetClass *getGtkWidgetClassFields(JNIEnv *env, jobject lpObject, GtkWidgetClass *lpStruct);
diff --git a/version.txt b/version.txt
index 3ea5390..5990b16 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-version 4.233
\ No newline at end of file
+version 4.333
\ No newline at end of file
diff --git a/webkitgtk.h b/webkitgtk.h
index 0c95804..894340c 100644
--- a/webkitgtk.h
+++ b/webkitgtk.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2009, 2012 IBM Corporation and others. All rights reserved.
  * The contents of this file are made available under the terms
  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
@@ -18,15 +18,21 @@
 
 #include <dlfcn.h>
 #include <string.h>
+#include <stdlib.h>
 #include <glib-object.h>
 
 #define WebKitGTK_LOAD_FUNCTION(var, name) \
 	static int initialized = 0; \
 	static void *var = NULL; \
 	if (!initialized) { \
-		void* handle = dlopen("libwebkit-1.0.so.2", LOAD_FLAGS); /* webkitgtk 1.2.x lib */ \
-		if (!handle) { \
-			handle = dlopen("libwebkitgtk-1.0.so.0", LOAD_FLAGS); /* webkitgtk >= 1.4.x lib */ \
+		void* handle ; \
+		if (getenv("SWT_GTK3")) { \
+			handle = dlopen("libwebkitgtk-3.0.so.0", LOAD_FLAGS); /* webkitgtk >= 3.x lib */ \
+		} else { \
+    		handle = dlopen("libwebkit-1.0.so.2", LOAD_FLAGS); /* webkitgtk 1.2.x lib */ \
+	    	if (!handle) { \
+		    	handle = dlopen("libwebkitgtk-1.0.so.0", LOAD_FLAGS); /* webkitgtk >= 1.4.x lib */ \
+		    } \
 		} \
 		if (handle) { \
 			var = dlsym(handle, #name); \
diff --git a/webkitgtk_stats.c b/webkitgtk_stats.c
index 6a0c3fc..c0d2265 100644
--- a/webkitgtk_stats.c
+++ b/webkitgtk_stats.c
@@ -18,8 +18,6 @@
 
 #ifdef NATIVE_STATS
 
-int WebKitGTK_nativeFunctionCount = 113;
-int WebKitGTK_nativeFunctionCallCount[113];
 char * WebKitGTK_nativeFunctionNames[] = {
 	"JSClassDefinition_1sizeof",
 	"_1JSClassCreate",
@@ -135,6 +133,9 @@ char * WebKitGTK_nativeFunctionNames[] = {
 	"_1webkit_1web_1view_1stop_1loading",
 	"memmove",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(WebKitGTK_nativeFunctionNames) / sizeof(char*)
+int WebKitGTK_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int WebKitGTK_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/xpcom.cpp b/xpcom.cpp
index b3db828..7c713c7 100644
--- a/xpcom.cpp
+++ b/xpcom.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,7 +57,7 @@ JNIEXPORT jint JNICALL XPCOM_NATIVE(_1Call__JJJJ)(JNIEnv *env, jclass that, jint
 #else
 	XPCOM_NATIVE_ENTER(env, that, _1Call__JJJJ_FUNC);
 #endif
-	rc = (jint)((SWT_XREInitEmbedding2)arg0)((nsILocalFile *)arg1, (nsILocalFile *)arg2, (nsIDirectoryServiceProvider *)arg3);
+	rc = (jint)((SWT_XREInitEmbedding2)arg0)((nsIFile *)arg1, (nsIFile *)arg2, (nsIDirectoryServiceProvider *)arg3);
 #ifndef JNI64
 	XPCOM_NATIVE_EXIT(env, that, _1Call__IIII_FUNC);
 #else
@@ -213,6 +213,31 @@ JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJ)(JNIEnv *env, jclass that, ji
 }
 #endif
 
+#if (!defined(NO__1VtblCall__IIB) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJB) && defined(JNI64))
+#ifndef JNI64
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIB)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyte arg2);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IIB)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyte arg2)
+#else
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJB)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyte arg2);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IJB)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jbyte arg2)
+#endif
+{
+	jint rc = 0;
+#ifndef JNI64
+	XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IIB_FUNC);
+#else
+	XPCOM_NATIVE_ENTER(env, that, _1VtblCall__IJB_FUNC);
+#endif
+	rc = (jint)((jint (STDMETHODCALLTYPE *)(jintLong, jbyte))(*(jintLong **)arg1)[arg0])(arg1, arg2);
+#ifndef JNI64
+	XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IIB_FUNC);
+#else
+	XPCOM_NATIVE_EXIT(env, that, _1VtblCall__IJB_FUNC);
+#endif
+	return rc;
+}
+#endif
+
 #if (!defined(NO__1VtblCall__IID) && !defined(JNI64)) || (!defined(NO__1VtblCall__IJD) && defined(JNI64))
 #ifndef JNI64
 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1VtblCall__IID)(JNIEnv *env, jclass that, jint arg0, jintLong arg1, jdouble arg2);
@@ -7053,6 +7078,19 @@ JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIMemory_1Realloc)
 }
 #endif
 
+#ifndef NO__1nsIScriptContext17_1GetNativeContext
+extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext17_1GetNativeContext)(JNIEnv *env, jclass that, jintLong arg0);
+JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext17_1GetNativeContext)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	XPCOM_NATIVE_ENTER(env, that, _1nsIScriptContext17_1GetNativeContext_FUNC);
+	rc = (jintLong)((nsIScriptContext17 *)arg0)->GetNativeContext();
+	XPCOM_NATIVE_EXIT(env, that, _1nsIScriptContext17_1GetNativeContext_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1nsIScriptContext_1GetNativeContext
 extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext_1GetNativeContext)(JNIEnv *env, jclass that, jintLong arg0);
 JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext_1GetNativeContext)
@@ -7066,6 +7104,32 @@ JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptContext_1GetNativeContext)
 }
 #endif
 
+#ifndef NO__1nsIScriptGlobalObject17_1EnsureScriptEnvironment
+extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject17_1EnsureScriptEnvironment)(JNIEnv *env, jclass that, jintLong arg0);
+JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject17_1EnsureScriptEnvironment)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jint rc = 0;
+	XPCOM_NATIVE_ENTER(env, that, _1nsIScriptGlobalObject17_1EnsureScriptEnvironment_FUNC);
+	rc = (jint)((nsIScriptGlobalObject17 *)arg0)->EnsureScriptEnvironment();
+	XPCOM_NATIVE_EXIT(env, that, _1nsIScriptGlobalObject17_1EnsureScriptEnvironment_FUNC);
+	return rc;
+}
+#endif
+
+#ifndef NO__1nsIScriptGlobalObject17_1GetScriptContext
+extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject17_1GetScriptContext)(JNIEnv *env, jclass that, jintLong arg0);
+JNIEXPORT jintLong JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject17_1GetScriptContext)
+	(JNIEnv *env, jclass that, jintLong arg0)
+{
+	jintLong rc = 0;
+	XPCOM_NATIVE_ENTER(env, that, _1nsIScriptGlobalObject17_1GetScriptContext_FUNC);
+	rc = (jintLong)((nsIScriptGlobalObject17 *)arg0)->GetScriptContext();
+	XPCOM_NATIVE_EXIT(env, that, _1nsIScriptGlobalObject17_1GetScriptContext_FUNC);
+	return rc;
+}
+#endif
+
 #ifndef NO__1nsIScriptGlobalObject_1EnsureScriptEnvironment
 extern "C" JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject_1EnsureScriptEnvironment)(JNIEnv *env, jclass that, jintLong arg0, jint arg1);
 JNIEXPORT jint JNICALL XPCOM_NATIVE(_1nsIScriptGlobalObject_1EnsureScriptEnvironment)
diff --git a/xpcom.h b/xpcom.h
index c41e064..afc18ec 100644
--- a/xpcom.h
+++ b/xpcom.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -26,11 +26,16 @@
 #ifndef nsIScriptContext_h__
 #include "nsIScriptContext.h"
 #include "nsIScriptGlobalObject.h"
+#include "nsIScriptContext_17.h"
+#include "nsIScriptGlobalObject_17.h"
 #endif /* nsIScriptContext_h__ */
 
 #define XPCOM_LOAD_FUNCTION LOAD_FUNCTION
 
 #ifdef _WIN32
+#if !(defined(__i386__) || defined(_M_IX86) || defined(_X86_))
+#define nsStaticModuleInfo void /* define on 64-bit win32 due to use of XULRunner 10 SDK */
+#endif
 #define STDMETHODCALLTYPE __stdcall
 #define NO__1NS_1InitXPCOM2
 #else /* _WIN32 */
@@ -40,7 +45,7 @@
 #endif /* __APPLE__ */
 #endif /* _WIN32 */
 
-#define SWT_XREInitEmbedding2 nsresult (*)(nsILocalFile *,nsILocalFile *,nsIDirectoryServiceProvider *)
+#define SWT_XREInitEmbedding2 nsresult (*)(nsIFile *,nsIFile *,nsIDirectoryServiceProvider *)
 #define SWT_XREInitEmbedding nsresult (*)(nsILocalFile *,nsILocalFile *,nsIDirectoryServiceProvider *,nsStaticModuleInfo const *,PRUint32)
 
 #endif /* INC_xpcom_H */
diff --git a/xpcom_custom.cpp b/xpcom_custom.cpp
index 09c20b4..bf023cc 100644
--- a/xpcom_custom.cpp
+++ b/xpcom_custom.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -246,7 +246,7 @@ fail:
 #ifndef NO_CALLBACK_1JSNative
 extern "C" JNIEXPORT jintLong JNICALL XPCOM_NATIVE(CALLBACK_1JSNative)(JNIEnv *env, jclass that, jintLong arg0);
 static jintLong CALLBACK_1JSNative;
-static jint proc_CALLBACK_1JSNative(jintLong arg0, jint arg1, jintLong arg2) {
+static jintLong proc_CALLBACK_1JSNative(jintLong arg0, jint arg1, jintLong arg2) {
 	return ((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jintLong))CALLBACK_1JSNative)(arg0, arg1, arg2);
 }
 static jintLong CALLBACK_JSNative(jintLong func) {
diff --git a/xpcom_stats.cpp b/xpcom_stats.cpp
index d0977c1..ff0bffd 100644
--- a/xpcom_stats.cpp
+++ b/xpcom_stats.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@
 
 #ifdef NATIVE_STATS
 
-int XPCOM_nativeFunctionCount = 251;
-int XPCOM_nativeFunctionCallCount[251];
 char * XPCOM_nativeFunctionNames[] = {
 	"CALLBACK_1JSNative",
 #ifndef JNI64
@@ -53,6 +51,11 @@ char * XPCOM_nativeFunctionNames[] = {
 	"_1VtblCall__IJ",
 #endif
 #ifndef JNI64
+	"_1VtblCall__IIB",
+#else
+	"_1VtblCall__IJB",
+#endif
+#ifndef JNI64
 	"_1VtblCall__IID",
 #else
 	"_1VtblCall__IJD",
@@ -1120,7 +1123,10 @@ char * XPCOM_nativeFunctionNames[] = {
 	"_1nsID_1new",
 	"_1nsIMemory_1Alloc",
 	"_1nsIMemory_1Realloc",
+	"_1nsIScriptContext17_1GetNativeContext",
 	"_1nsIScriptContext_1GetNativeContext",
+	"_1nsIScriptGlobalObject17_1EnsureScriptEnvironment",
+	"_1nsIScriptGlobalObject17_1GetScriptContext",
 	"_1nsIScriptGlobalObject_1EnsureScriptEnvironment",
 	"_1nsIScriptGlobalObject_1GetScriptContext",
 #ifndef JNI64
@@ -1141,6 +1147,9 @@ char * XPCOM_nativeFunctionNames[] = {
 	"nsDynamicFunctionLoad_1sizeof",
 	"strlen_1PRUnichar",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(XPCOM_nativeFunctionNames) / sizeof(char*)
+int XPCOM_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int XPCOM_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 
diff --git a/xpcom_stats.h b/xpcom_stats.h
index b47b3ae..4b3fac4 100644
--- a/xpcom_stats.h
+++ b/xpcom_stats.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -61,6 +61,11 @@ typedef enum {
 	_1VtblCall__IJ_FUNC,
 #endif
 #ifndef JNI64
+	_1VtblCall__IIB_FUNC,
+#else
+	_1VtblCall__IJB_FUNC,
+#endif
+#ifndef JNI64
 	_1VtblCall__IID_FUNC,
 #else
 	_1VtblCall__IJD_FUNC,
@@ -1128,7 +1133,10 @@ typedef enum {
 	_1nsID_1new_FUNC,
 	_1nsIMemory_1Alloc_FUNC,
 	_1nsIMemory_1Realloc_FUNC,
+	_1nsIScriptContext17_1GetNativeContext_FUNC,
 	_1nsIScriptContext_1GetNativeContext_FUNC,
+	_1nsIScriptGlobalObject17_1EnsureScriptEnvironment_FUNC,
+	_1nsIScriptGlobalObject17_1GetScriptContext_FUNC,
 	_1nsIScriptGlobalObject_1EnsureScriptEnvironment_FUNC,
 	_1nsIScriptGlobalObject_1GetScriptContext_FUNC,
 #ifndef JNI64
diff --git a/xpcominit.h b/xpcominit.h
index e80c00a..445117f 100644
--- a/xpcominit.h
+++ b/xpcominit.h
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
diff --git a/xpcominit_stats.cpp b/xpcominit_stats.cpp
index 84eb84c..79759b6 100644
--- a/xpcominit_stats.cpp
+++ b/xpcominit_stats.cpp
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -14,8 +14,6 @@
 
 #ifdef NATIVE_STATS
 
-int XPCOMInit_nativeFunctionCount = 5;
-int XPCOMInit_nativeFunctionCallCount[5];
 char * XPCOMInit_nativeFunctionNames[] = {
 	"GREProperty_1sizeof",
 	"GREVersionRange_1sizeof",
@@ -23,6 +21,9 @@ char * XPCOMInit_nativeFunctionNames[] = {
 	"_1XPCOMGlueShutdown",
 	"_1XPCOMGlueStartup",
 };
+#define NATIVE_FUNCTION_COUNT sizeof(XPCOMInit_nativeFunctionNames) / sizeof(char*)
+int XPCOMInit_nativeFunctionCount = NATIVE_FUNCTION_COUNT;
+int XPCOMInit_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT];
 
 #define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/swt-gtk.git



More information about the pkg-java-commits mailing list