diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras index 886e94c84e..2f956cf4c5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras @@ -4396,6 +4396,12 @@ + + + + + + @@ -4438,6 +4444,7 @@ + @@ -4454,9 +4461,9 @@ - + - + @@ -4466,8 +4473,7 @@ - - + @@ -4488,7 +4494,7 @@ - + @@ -4496,7 +4502,7 @@ - + @@ -4508,7 +4514,7 @@ - + diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index cd24777ad6..a2f6e38e58 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -2246,10 +2246,10 @@ public static Selector getSelector (long value) { public static final int NSLineBreakByTruncatingTail = 4; public static final int NSLineBreakByWordWrapping = 0; public static final int NSLineToBezierPathElement = 1; -public static final int NSMiniControlSize = 2; +public static final int NSControlSizeMini = 2; public static final int NSMiterLineJoinStyle = 0; -public static final int NSMixedState = -1; +public static final int NSControlStateValueMixed = -1; public static final int NSMouseEntered = 8; public static final int NSMouseExited = 9; public static final int NSMouseMoved = 5; @@ -2260,8 +2260,8 @@ public static Selector getSelector (long value) { public static final int NSNoTitle = 0; public static final int NSNonZeroWindingRule = 0; -public static final int NSOffState = 0; -public static final int NSOnState = 1; +public static final int NSControlStateValueOff = 0; +public static final int NSControlStateValueOn = 1; public static final int NSOpenGLCPSurfaceOrder = 235; public static final int NSOpenGLPFAAccumSize = 14; public static final int NSOpenGLPFAAlphaSize = 11; @@ -2282,7 +2282,7 @@ public static Selector getSelector (long value) { public static final int NSPrintPanelShowsPrintSelection = 32; public static final int NSProgressIndicatorPreferredThickness = 14; public static final int NSRGBColorSpaceModel = 1; -public static final int NSRegularControlSize = 0; +public static final int NSControlSizeRegular = 0; public static final int NSRegularSquareBezelStyle = 2; public static final int NSResizableWindowMask = 8; public static final int NSRightMouseDown = 3; @@ -2290,7 +2290,7 @@ public static Selector getSelector (long value) { public static final int NSRightMouseUp = 4; public static final int NSRoundLineCapStyle = 1; public static final int NSRoundLineJoinStyle = 1; -public static final int NSScaleNone = 2; +public static final int NSImageScaleNone = 2; public static final int NSScrollElasticityNone = 1; public static final int NSScrollWheel = 22; public static final int NSScrollerDecrementLine = 4; @@ -2302,7 +2302,7 @@ public static Selector getSelector (long value) { public static final int NSScrollerStyleLegacy = 0; public static final int NSScrollerStyleOverlay = 1; public static final int NSShiftKeyMask = 131072; -public static final int NSSmallControlSize = 1; +public static final int NSControlSizeSmall = 1; public static final int NSSquareLineCapStyle = 2; public static final int NSStatusWindowLevel = 25; public static final int NSStringDrawingUsesLineFragmentOrigin = 1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java index 0d1b9a480a..236f53a33a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java @@ -154,7 +154,7 @@ NSSize cellSizeForBounds (long id, long sel, NSRect cellFrame) { if (((style & (SWT.PUSH|SWT.TOGGLE)) !=0) && (style & (SWT.FLAT|SWT.WRAP)) == 0) { if (image != null) { NSCell cell = new NSCell(id); - if (cell.controlSize() == OS.NSSmallControlSize) size.height += EXTRA_HEIGHT; + if (cell.controlSize() == OS.NSControlSizeSmall) size.height += EXTRA_HEIGHT; } // TODO: Why is this necessary? size.width += EXTRA_WIDTH; @@ -339,7 +339,7 @@ void drawBezelWithFrame_inView (long id, long sel, NSRect cellFrame, long viewid if (this.background != null) { NSButton button = (NSButton) view; - final boolean isHighlighted = (style & SWT.TOGGLE) == 0 ? button.isHighlighted() : ((NSButton) view).state() == OS.NSOnState; + final boolean isHighlighted = (style & SWT.TOGGLE) == 0 ? button.isHighlighted() : ((NSButton) view).state() == OS.NSControlStateValueOn; final NSWindow window = button.window(); final NSButtonCell defaultButtonCell = window == null ? null : window.defaultButtonCell(); @@ -640,8 +640,8 @@ String getNameText () { public boolean getSelection () { checkWidget (); if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false; - if ((style & SWT.CHECK) != 0 && grayed) return ((NSButton)view).state() == OS.NSMixedState; - return ((NSButton)view).state() == OS.NSOnState; + if ((style & SWT.CHECK) != 0 && grayed) return ((NSButton)view).state() == OS.NSControlStateValueMixed; + return ((NSButton)view).state() == OS.NSControlStateValueOn; } /** @@ -674,7 +674,7 @@ boolean isDescribedByLabel () { @Override long nextState(long id, long sel) { if ((style & SWT.CHECK) != 0 && grayed) { - return ((NSButton)view).state() == OS.NSMixedState ? OS.NSOffState : OS.NSMixedState; + return ((NSButton)view).state() == OS.NSControlStateValueMixed ? OS.NSControlStateValueOff : OS.NSControlStateValueMixed; } return super.nextState(id, sel); @@ -752,11 +752,11 @@ void sendSelection () { } } if ((style & SWT.CHECK) != 0) { - if (grayed && ((NSButton)view).state() == OS.NSOnState) { - ((NSButton)view).setState(OS.NSOffState); + if (grayed && ((NSButton)view).state() == OS.NSControlStateValueOn) { + ((NSButton)view).setState(OS.NSControlStateValueOff); } - if (!grayed && ((NSButton)view).state() == OS.NSMixedState) { - ((NSButton)view).setState(OS.NSOnState); + if (!grayed && ((NSButton)view).state() == OS.NSControlStateValueMixed) { + ((NSButton)view).setState(OS.NSControlStateValueOn); } } sendSelectionEvent (SWT.Selection); @@ -824,7 +824,7 @@ void setBounds (int x, int y, int width, int height, boolean move, boolean resiz int heightThreshold = REGULAR_BUTTON_HEIGHT; NSCell cell = ((NSControl)view).cell(); - if (cell != null && cell.controlSize() == OS.NSSmallControlSize) { + if (cell != null && cell.controlSize() == OS.NSControlSizeSmall) { heightThreshold = SMALL_BUTTON_HEIGHT; } @@ -887,9 +887,9 @@ public void setGrayed(boolean grayed) { if (checked) { if (grayed) { - ((NSButton) view).setState (OS.NSMixedState); + ((NSButton) view).setState (OS.NSControlStateValueMixed); } else { - ((NSButton) view).setState (OS.NSOnState); + ((NSButton) view).setState (OS.NSControlStateValueOn); } } } @@ -937,9 +937,9 @@ public void setImage (Image image) { NSSize size = cell.cellSize (); int height = (int)Math.ceil(size.height); if (height > SMALL_BUTTON_HEIGHT) { - cell.setControlSize(OS.NSRegularControlSize); + cell.setControlSize(OS.NSControlSizeRegular); } else if (display.smallFonts){ - cell.setControlSize(OS.NSSmallControlSize); + cell.setControlSize(OS.NSControlSizeSmall); } setFont(getFont()); } @@ -978,9 +978,9 @@ public void setSelection (boolean selected) { checkWidget(); if ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return; if (grayed) { - ((NSButton)view).setState (selected ? OS.NSMixedState : OS.NSOffState); + ((NSButton)view).setState (selected ? OS.NSControlStateValueMixed : OS.NSControlStateValueOff); } else { - ((NSButton)view).setState (selected ? OS.NSOnState : OS.NSOffState); + ((NSButton)view).setState (selected ? OS.NSControlStateValueOn : OS.NSControlStateValueOff); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java index 1e423a6a52..e70e61295b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java @@ -4278,7 +4278,7 @@ public void setSize (Point size) { void setSmallSize () { if (view instanceof NSControl) { NSCell cell = ((NSControl)view).cell(); - if (cell != null) cell.setControlSize (OS.NSSmallControlSize); + if (cell != null) cell.setControlSize (OS.NSControlSizeSmall); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java index 871c300a20..355ffd37a1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DateTime.java @@ -320,12 +320,12 @@ void hideCalendar() { int getBezelInset() { //TODO: Determine this value from the system instead of using constants - return (buttonView.cell ().controlSize () == OS.NSMiniControlSize) ? 3 : 1; + return (buttonView.cell ().controlSize () == OS.NSControlSizeMini) ? 3 : 1; } int getBezelSize() { //TODO: Determine this value from the system instead of using constants - return (buttonView.cell ().controlSize () == OS.NSMiniControlSize) ? 6 : 4; + return (buttonView.cell ().controlSize () == OS.NSControlSizeMini) ? 6 : 4; } NSCalendarDate getCalendarDate () { @@ -779,7 +779,7 @@ public void setSeconds (int seconds) { @Override void setSmallSize () { - if (buttonView != null) buttonView.cell ().setControlSize (OS.NSMiniControlSize); + if (buttonView != null) buttonView.cell ().setControlSize (OS.NSControlSizeMini); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java index ab9d700c3f..eeeee130f5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java @@ -3255,7 +3255,7 @@ NSFont getFont (long cls, long sel) { if (font != 0) { result = new NSFont (font); } else { - result = NSFont.systemFontOfSize (NSFont.systemFontSizeForControlSize (OS.NSRegularControlSize)); + result = NSFont.systemFontOfSize (NSFont.systemFontSizeForControlSize (OS.NSControlSizeRegular)); } result.retain (); OS.objc_msgSend (widget, OS.sel_release); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java index eff0a44290..1986b16d87 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java @@ -239,7 +239,7 @@ void createHandle () { NSImageView imageWidget = (NSImageView) new SWTImageView ().alloc (); imageWidget.init(); - imageWidget.setImageScaling (OS.NSScaleNone); + imageWidget.setImageScaling (OS.NSImageScaleNone); NSTextField textWidget = (NSTextField)new SWTTextField().alloc(); textWidget.init(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java index 0c78c4046e..512ef0ab5c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/MenuItem.java @@ -356,7 +356,7 @@ public Menu getParent () { public boolean getSelection () { checkWidget (); if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return false; - return nsItem.state() == OS.NSOnState; + return nsItem.state() == OS.NSControlStateValueOn; } /** @@ -793,7 +793,7 @@ boolean setRadioSelection (boolean value) { public void setSelection (boolean selected) { checkWidget (); if ((style & (SWT.CHECK | SWT.RADIO)) == 0) return; - nsItem.setState(selected ? OS.NSOnState : OS.NSOffState); + nsItem.setState(selected ? OS.NSControlStateValueOn : OS.NSControlStateValueOff); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java index e6b82c1349..61638b0dcc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java @@ -114,7 +114,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) { size = NSScrollView.frameSizeForContentSize(size, (style & SWT.H_SCROLL) != 0 ? OS.class_NSScroller : 0, (style & SWT.V_SCROLL) != 0 ? OS.class_NSScroller : 0, - border, OS.NSRegularControlSize, OS.NSScrollerStyleLegacy); + border, OS.NSControlSizeRegular, OS.NSScrollerStyleLegacy); width = (int)size.width; height = (int)size.height; NSRect frame = scrollView.contentView().frame(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java index caf1fd2a67..43e73d710f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Slider.java @@ -467,7 +467,7 @@ public void setSelection (int value) { @Override void setSmallSize () { /* This code is intentionally comment */ -// ((NSScroller)view).setControlSize (OS.NSSmallControlSize); +// ((NSScroller)view).setControlSize (OS.NSControlSizeSmall); } void updateBar (int selection, int minimum, int maximum, int thumb) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java index 301bd29be5..824c787a8c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java @@ -954,8 +954,8 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) { @Override void setSmallSize () { - textView.cell ().setControlSize (OS.NSSmallControlSize); - buttonView.cell ().setControlSize (OS.NSSmallControlSize); + textView.cell ().setControlSize (OS.NSControlSizeSmall); + buttonView.cell ().setControlSize (OS.NSControlSizeSmall); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java index 197214fb8b..4b83f4c40d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TabFolder.java @@ -632,7 +632,7 @@ void setSelection (int index, boolean notify, boolean force) { @Override void setSmallSize () { - ((NSTabView)view).setControlSize (OS.NSSmallControlSize); + ((NSTabView)view).setControlSize (OS.NSControlSizeSmall); } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java index 95a10a8fc1..9f47131864 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java @@ -585,7 +585,7 @@ void createHandle () { buttonCell.init (); checkColumn.setDataCell (buttonCell); buttonCell.setButtonType (OS.NSButtonTypeSwitch); - buttonCell.setControlSize(OS.NSSmallControlSize); + buttonCell.setControlSize(OS.NSControlSizeSmall); buttonCell.setImagePosition (OS.NSImageOnly); buttonCell.setAllowsMixedState (true); checkColumn.setWidth(getCheckColumnWidth()); @@ -2133,9 +2133,9 @@ long nextState (long id, long sel) { if (index == -1) index = (int)tableView.selectedRow (); TableItem item = items[index]; if (item.grayed) { - return item.checked ? OS.NSOffState : OS.NSMixedState; + return item.checked ? OS.NSControlStateValueOff : OS.NSControlStateValueMixed; } - return item.checked ? OS.NSOffState : OS.NSOnState; + return item.checked ? OS.NSControlStateValueOff : OS.NSControlStateValueOn; } @Override @@ -3475,9 +3475,9 @@ long tableView_objectValueForTableColumn_row (long id, long sel, long aTableView if (checkColumn != null && aTableColumn == checkColumn.id) { NSNumber value; if (item.checked && item.grayed) { - value = NSNumber.numberWithInt (OS.NSMixedState); + value = NSNumber.numberWithInt (OS.NSControlStateValueMixed); } else { - value = NSNumber.numberWithInt (item.checked ? OS.NSOnState : OS.NSOffState); + value = NSNumber.numberWithInt (item.checked ? OS.NSControlStateValueOn : OS.NSControlStateValueOff); } return value.id; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java index 3a863fc01b..0de7b123da 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java @@ -615,7 +615,7 @@ void createHandle () { buttonCell.init (); checkColumn.setDataCell (buttonCell); buttonCell.setButtonType (OS.NSButtonTypeSwitch); - buttonCell.setControlSize (OS.NSSmallControlSize); + buttonCell.setControlSize (OS.NSControlSizeSmall); buttonCell.setImagePosition (OS.NSImageOnly); buttonCell.setAllowsMixedState (true); checkColumn.setWidth (getCheckColumnWidth ()); @@ -2191,9 +2191,9 @@ long nextState (long id, long sel) { if (index == -1) index = (int)outlineView.selectedRow (); TreeItem item = (TreeItem)display.getWidget (outlineView.itemAtRow (index).id); if (item.grayed) { - return item.checked ? OS.NSOffState : OS.NSMixedState; + return item.checked ? OS.NSControlStateValueOff : OS.NSControlStateValueMixed; } - return item.checked ? OS.NSOffState : OS.NSOnState; + return item.checked ? OS.NSControlStateValueOff : OS.NSControlStateValueOn; } @Override @@ -2220,9 +2220,9 @@ long outlineView_objectValueForTableColumn_byItem (long id, long sel, long outli if (checkColumn != null && tableColumn == checkColumn.id) { NSNumber value; if (item.checked && item.grayed) { - value = NSNumber.numberWithInt (OS.NSMixedState); + value = NSNumber.numberWithInt (OS.NSControlStateValueMixed); } else { - value = NSNumber.numberWithInt (item.checked ? OS.NSOnState : OS.NSOffState); + value = NSNumber.numberWithInt (item.checked ? OS.NSControlStateValueOn : OS.NSControlStateValueOff); } return value.id; }