Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public Object nativeToJava(TransferData transferData) {
NSRect rect = new NSRect();
rect.width = size.width;
rect.height = size.height;
nsImage.drawInRect(rect, new NSRect(), OS.NSCompositeCopy, 1);
nsImage.drawInRect(rect, new NSRect(), OS.NSCompositingOperationCopy, 1);
newImage.unlockFocus();
nsImage.release();
nsImage = newImage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,7 @@
<enum name='NSColorRenderingIntentPerceptual' value='3'/>
<enum name='NSColorRenderingIntentRelativeColorimetric' value='2'/>
<enum name='NSColorRenderingIntentSaturation' value='4'/>
<enum name='NSColorSpaceModelRGB' value='1'/>
<enum name='NSCommandKeyMask' value='1048576'/>
<enum name='NSCompositeClear' value='0'/>
<enum name='NSCompositeColor' value='27'/>
Expand Down Expand Up @@ -1450,6 +1451,10 @@
<enum name='NSCompositeSourceOut' value='4'/>
<enum name='NSCompositeSourceOver' value='2'/>
<enum name='NSCompositeXOR' value='10'/>
<enum name='NSCompositingOperationClear' value='0'/>
<enum name='NSCompositingOperationCopy' value='1'/>
<enum name='NSCompositingOperationSourceAtop' value='5'/>
<enum name='NSCompositingOperationSourceOver' value='2'/>
<enum name='NSCompressedFontMask' value='512'/>
<enum name='NSCondensedFontMask' value='64'/>
<enum name='NSContentsCellMask' value='1'/>
Expand Down Expand Up @@ -1479,6 +1484,9 @@
<enum name='NSCursorUpdateMask' value='131072'/>
<enum name='NSCurveToBezierPathElement' value='2'/>
<enum name='NSCustomPaletteModeColorPanel' value='4'/>
<enum name='NSDatePickerStyleClockAndCalendar' value='1'/>
<enum name='NSDatePickerStyleTextField' value='2'/>
<enum name='NSDatePickerStyleTextFieldAndStepper' value='0'/>
<enum name='NSDecimalTabStopType' value='3'/>
<enum name='NSDefaultControlTint' value='0'/>
<enum name='NSDeleteCharFunctionKey' value='63294'/>
Expand Down Expand Up @@ -1655,6 +1663,8 @@
<enum name='NSFontPanelCollectionModeMask' value='4'/>
<enum name='NSFontPanelDocumentColorEffectModeMask' value='2048'/>
<enum name='NSFontPanelFaceModeMask' value='1'/>
<enum name='NSFontPanelModeMaskAllEffects' value='1048320'/>
<enum name='NSFontPanelModeMaskAllModes' value='4294967295'/>
<enum name='NSFontPanelShadowEffectModeMask' value='4096'/>
<enum name='NSFontPanelSizeModeMask' value='2'/>
<enum name='NSFontPanelStandardModesMask' value='65535'/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4385,15 +4385,13 @@
<enum name="NSButtonTypePushOnPushOff" swt_gen="true"></enum>
<enum name="NSButtonTypeRadio" swt_gen="true"></enum>
<enum name="NSButtonTypeSwitch" swt_gen="true"></enum>
<enum name="NSCancelButton" swt_gen="true"></enum>
<enum name="NSCarriageReturnCharacter" swt_gen="true"></enum>
<enum name="NSClockAndCalendarDatePickerStyle" swt_gen="true"></enum>
<enum name="NSClosePathBezierPathElement" swt_gen="true"></enum>
<enum name="NSCommandKeyMask" swt_gen="true"></enum>
<enum name="NSCompositeClear" swt_gen="true"></enum>
<enum name="NSCompositeCopy" swt_gen="true"></enum>
<enum name="NSCompositeSourceAtop" swt_gen="true"></enum>
<enum name="NSCompositeSourceOver" swt_gen="true"></enum>
<enum name="NSCompositingOperationClear" swt_gen="true"></enum>
<enum name="NSCompositingOperationCopy" swt_gen="true"></enum>
<enum name="NSCompositingOperationSourceAtop" swt_gen="true"></enum>
<enum name="NSCompositingOperationSourceOver" swt_gen="true"></enum>
<enum name="NSContentsCellMask" swt_gen="true"></enum>
<enum name="NSControlKeyMask" swt_gen="true"></enum>
<enum name="NSControlSizeMini" swt_gen="true"></enum>
Expand Down Expand Up @@ -4426,8 +4424,8 @@
<enum name="NSFileHandlingPanelOKButton" swt_gen="true"></enum>
<enum name="NSFlagsChanged" swt_gen="true"></enum>
<enum name="NSFocusRingTypeNone" swt_gen="true"></enum>
<enum name="NSFontPanelAllEffectsModeMask" swt_gen="true"></enum>
<enum name="NSFontPanelAllModesMask" swt_gen="true"></enum>
<enum name="NSFontPanelModeMaskAllEffects" swt_gen="true"></enum>
<enum name="NSFontPanelModeMaskAllModes" swt_gen="true"></enum>
<enum name="NSHelpFunctionKey" swt_gen="true"></enum>
<enum name="NSHelpKeyMask" swt_gen="true"></enum>
<enum name="NSHourMinuteDatePickerElementFlag" swt_gen="true"></enum>
Expand Down Expand Up @@ -4463,6 +4461,7 @@
<enum name="NSLineToBezierPathElement" swt_gen="true"></enum>

<enum name="NSMiterLineJoinStyle" swt_gen="true"></enum>
<enum name="NSModalResponseCancel" swt_gen="true"></enum>

<enum name="NSMouseEntered" swt_gen="true"></enum>
<enum name="NSMouseExited" swt_gen="true"></enum>
Expand Down Expand Up @@ -4493,7 +4492,7 @@
<enum name="NSPrintPanelShowsPageSetupAccessory" swt_gen="true"></enum>
<enum name="NSPrintPanelShowsPrintSelection" swt_gen="true"></enum>
<enum name="NSProgressIndicatorPreferredThickness" swt_gen="true"></enum>
<enum name="NSRGBColorSpaceModel" swt_gen="true"></enum>
<enum name="NSColorSpaceModelRGB" swt_gen="true"></enum>

<enum name="NSRegularSquareBezelStyle" swt_gen="true"></enum>
<enum name="NSResizableWindowMask" swt_gen="true"></enum>
Expand Down Expand Up @@ -4534,8 +4533,9 @@
<enum name="NSTextAlignmentJustified" swt_gen="true"></enum>
<enum name="NSTextAlignmentLeft" swt_gen="true"></enum>
<enum name="NSTextAlignmentRight" swt_gen="true"></enum>
<enum name="NSTextFieldAndStepperDatePickerStyle" swt_gen="true"></enum>
<enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum>
<enum name="NSDatePickerStyleClockAndCalendar" swt_gen="true"></enum>
<enum name="NSDatePickerStyleTextField" swt_gen="true"></enum>
<enum name="NSDatePickerStyleTextFieldAndStepper" swt_gen="true"></enum>
<enum name="NSToolbarDisplayModeIconOnly" swt_gen="true"></enum>
<enum name="NSTouchPhaseAny" swt_gen="true"></enum>
<enum name="NSTouchPhaseBegan" swt_gen="true"></enum>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2173,16 +2173,15 @@ public static Selector getSelector (long value) {
public static final int NSButtonTypePushOnPushOff = 1;
public static final int NSButtonTypeRadio = 4;
public static final int NSButtonTypeSwitch = 3;
public static final int NSCancelButton = 0;
public static final int NSCarriageReturnCharacter = 13;
public static final int NSClockAndCalendarDatePickerStyle = 1;
public static final int NSDatePickerStyleClockAndCalendar = 1;

public static final int NSClosePathBezierPathElement = 3;
public static final int NSCommandKeyMask = 1048576;
public static final int NSCompositeClear = 0;
public static final int NSCompositeCopy = 1;
public static final int NSCompositeSourceAtop = 5;
public static final int NSCompositeSourceOver = 2;
public static final int NSCompositingOperationClear = 0;
public static final int NSCompositingOperationCopy = 1;
public static final int NSCompositingOperationSourceAtop = 5;
public static final int NSCompositingOperationSourceOver = 2;
public static final int NSContentsCellMask = 1;
public static final int NSControlKeyMask = 262144;
public static final int NSCriticalAlertStyle = 2;
Expand Down Expand Up @@ -2211,8 +2210,8 @@ public static Selector getSelector (long value) {
public static final int NSFileHandlingPanelOKButton = 1;
public static final int NSFlagsChanged = 12;
public static final int NSFocusRingTypeNone = 1;
public static final int NSFontPanelAllEffectsModeMask = 1048320;
public static final int NSFontPanelAllModesMask = -1;
public static final int NSFontPanelModeMaskAllEffects = 1048320;
public static final int NSFontPanelModeMaskAllModes = -1;

public static final int NSHelpFunctionKey = 63302;
public static final int NSHelpKeyMask = 4194304;
Expand Down Expand Up @@ -2249,6 +2248,7 @@ public static Selector getSelector (long value) {
public static final int NSControlSizeMini = 2;

public static final int NSMiterLineJoinStyle = 0;
public static final int NSModalResponseCancel = 0;
public static final int NSControlStateValueMixed = -1;
public static final int NSMouseEntered = 8;
public static final int NSMouseExited = 9;
Expand Down Expand Up @@ -2281,7 +2281,7 @@ public static Selector getSelector (long value) {
public static final int NSPrintPanelShowsPageSetupAccessory = 256;
public static final int NSPrintPanelShowsPrintSelection = 32;
public static final int NSProgressIndicatorPreferredThickness = 14;
public static final int NSRGBColorSpaceModel = 1;
public static final int NSColorSpaceModelRGB = 1;
public static final int NSControlSizeRegular = 0;
public static final int NSRegularSquareBezelStyle = 2;
public static final int NSResizableWindowMask = 8;
Expand Down Expand Up @@ -2322,8 +2322,8 @@ public static Selector getSelector (long value) {
public static final int NSTextAlignmentJustified = 3;
public static final int NSTextAlignmentLeft = 0;
public static final int NSTextAlignmentRight = IS_X86_64 ? 1 : 2;
public static final int NSTextFieldAndStepperDatePickerStyle = 0;
public static final int NSTextFieldDatePickerStyle = 2;
public static final int NSDatePickerStyleTextFieldAndStepper = 0;
public static final int NSDatePickerStyleTextField = 2;

public static final int NSToolbarDisplayModeIconOnly = 2;
public static final long NSTouchPhaseAny = -1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public PrinterData open() {
response = (int)panel.runModalWithPrintInfo(printInfo);
}
display.setData(SET_MODAL_DIALOG, null);
if (response != OS.NSCancelButton) {
if (response != OS.NSModalResponseCancel) {
NSPrinter printer = printInfo.printer();
NSString str = printer.name();
data = new PrinterData(Printer.DRIVER, str.getString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ public void copyArea(Image image, int x, int y) {
destRect.y = destY;
destRect.width = destWidth * scaleFactor;
destRect.height = destHeight * scaleFactor;
data.image.handle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
data.image.handle.drawInRect(destRect, srcRect, OS.NSCompositingOperationCopy, 1);
NSGraphicsContext.static_restoreGraphicsState();
return;
}
Expand Down Expand Up @@ -725,7 +725,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d
destRect.y = destY;
destRect.width = width;
destRect.height = height;
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositeCopy, 1);
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositingOperationCopy, 1);
handle.restoreGraphicsState();
return;
}
Expand Down Expand Up @@ -1304,7 +1304,7 @@ void drawImage(Image srcImage, int srcX, int srcY, int srcWidth, int srcHeight,
destRect.y = destY;
destRect.width = destWidth;
destRect.height = destHeight;
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositeSourceOver, data.alpha / 255f);
imageHandle.drawInRect(destRect, srcRect, OS.NSCompositingOperationSourceOver, data.alpha / 255f);
handle.restoreGraphicsState();
} finally {
uncheckGC(pool);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static NSBitmapImageRep createImageRep(Image image, NSSize targetSize) {
NSRect sourceRect = new NSRect();
sourceRect.width = 0;
sourceRect.height = 0;
imgHandle.drawInRect(target, sourceRect, OS.NSCompositeCopy, 1);
imgHandle.drawInRect(target, sourceRect, OS.NSCompositingOperationCopy, 1);
NSGraphicsContext.static_restoreGraphicsState();
rep.autorelease();
return rep;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view
transform.scaleXBy(1, -1);
transform.translateXBy(0, -imageSize.height);
transform.concat();
image.handle.drawInRect(destRect, new NSRect(), OS.NSCompositeSourceOver, 1);
image.handle.drawInRect(destRect, new NSRect(), OS.NSCompositingOperationSourceOver, 1);
NSGraphicsContext.static_restoreGraphicsState();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void drawBackground (long id, NSGraphicsContext context, NSRect rect) {
if (isObscured()) {
glcontext.setValues(new int[]{-1}, OS.NSOpenGLCPSurfaceOrder);
context.saveGraphicsState();
context.setCompositingOperation(OS.NSCompositeClear);
context.setCompositingOperation(OS.NSCompositingOperationClear);
if (visiblePath == null) {
long visibleRegion = getVisibleRegion();
visiblePath = getPath(visibleRegion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
void createHandle () {
NSDatePicker widget = (NSDatePicker)new SWTDatePicker().alloc();
widget.init();
int pickerStyle = (style & SWT.DROP_DOWN) != 0 ? OS.NSTextFieldDatePickerStyle : OS.NSTextFieldAndStepperDatePickerStyle;
int pickerStyle = (style & SWT.DROP_DOWN) != 0 ? OS.NSDatePickerStyleTextField : OS.NSDatePickerStyleTextFieldAndStepper;
int elementFlags = 0;
if ((style & SWT.CALENDAR) != 0) {
pickerStyle = OS.NSClockAndCalendarDatePickerStyle;
pickerStyle = OS.NSDatePickerStyleClockAndCalendar;
elementFlags = OS.NSYearMonthDayDatePickerElementFlag;
} else {
if ((style & SWT.TIME) != 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ Color getWidgetColor (int id) {
double [] getNSColorRGB (NSColor color) {
if (color == null) return null;
NSColorSpace colorSpace = color.colorSpace();
if (colorSpace == null || colorSpace.colorSpaceModel() != OS.NSRGBColorSpaceModel) {
if (colorSpace == null || colorSpace.colorSpaceModel() != OS.NSColorSpaceModelRGB) {
color = color.colorUsingColorSpaceName(OS.NSDeviceRGBColorSpace);
}
if (color == null) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public void setRGB (RGB rgb) {
}

int validModesForFontPanel(long id, long sel, long arg0) {
return effectsVisible ? OS.NSFontPanelAllModesMask : OS.NSFontPanelAllModesMask & ~OS.NSFontPanelAllEffectsModeMask;
return effectsVisible ? OS.NSFontPanelModeMaskAllModes : OS.NSFontPanelModeMaskAllModes & ~OS.NSFontPanelModeMaskAllEffects;
}

void windowWillClose(long id, long sel, long sender) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void drawLabelInRect(long id, long sel, boolean shouldTruncateLabel, NSRect rect
transform.scaleXBy(1, -1);
transform.translateXBy(0, -(destRect.height + 2 * destRect.y));
transform.concat();
image.handle.drawInRect(destRect, new NSRect(), OS.NSCompositeSourceOver, 1);
image.handle.drawInRect(destRect, new NSRect(), OS.NSCompositingOperationSourceOver, 1);
NSGraphicsContext.static_restoreGraphicsState();
rect.x += imageSize.width + IMAGE_GAP;
rect.width -= imageSize.width + IMAGE_GAP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect rect, long view) {
transform.scaleXBy(1, -1);
transform.translateXBy(0, -(destRect.height + 2 * destRect.y));
transform.concat();
image.drawInRect(destRect, new NSRect(), OS.NSCompositeSourceOver, 1);
image.drawInRect(destRect, new NSRect(), OS.NSCompositingOperationSourceOver, 1);
context.restoreGraphicsState();
int imageWidth = imageBounds.width + IMAGE_GAP;
rect.x += imageWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
sourceRect.height = destRect.height;
image.handle.drawInRect (destRect, sourceRect, OS.NSCompositeSourceOver, 1f);
image.handle.drawInRect (destRect, sourceRect, OS.NSCompositingOperationSourceOver, 1f);
if (isFlipped) context.restoreGraphicsState ();
drawX += destRect.width;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void updateImage () {
rect.height = size.height;
rect.width = size.width;
newImage.lockFocus ();
defaultImage.drawInRect (rect, rect, OS.NSCompositeSourceOver, 1);
defaultImage.drawInRect (rect, rect, OS.NSCompositingOperationSourceOver, 1);
if (drawImage) {
NSImage badgetImage = overlayImage.handle;
NSSize badgeSize = badgetImage.size ();
Expand All @@ -439,7 +439,7 @@ void updateImage () {
dstRect.x = size.width / 2;
dstRect.height = size.height / 2;
dstRect.width = size.width / 2;
badgetImage.drawInRect(dstRect, srcRect, OS.NSCompositeSourceOver, 1);
badgetImage.drawInRect(dstRect, srcRect, OS.NSCompositingOperationSourceOver, 1);
}
if (drawIntermidiate || drawProgress) {
switch (progressState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void drawImageWithFrameInView (long id, long sel, long image, NSRect rect, long

if (drawSelected) {
NSColor.colorWithDeviceRed(0,0,0,.3f).setFill();
OS.NSRectFillUsingOperation(rect, OS.NSCompositeSourceAtop);
OS.NSRectFillUsingOperation(rect, OS.NSCompositingOperationSourceAtop);
OS.CGContextEndTransparencyLayer(cgContext);
NSGraphicsContext.currentContext().restoreGraphicsState();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ void drawRectangles (NSWindow window, Rectangle [] rects, boolean erase) {
} else {
parentOrigin = new Point (0, 0);
}
context.setCompositingOperation(erase ? OS.NSCompositeClear : OS.NSCompositeSourceOver);
context.setCompositingOperation(erase ? OS.NSCompositingOperationClear : OS.NSCompositingOperationSourceOver);
NSRect rectFrame = new NSRect();
NSPoint globalPoint = new NSPoint();
double screenHeight = display.getPrimaryFrame().height;
Expand Down Expand Up @@ -782,7 +782,7 @@ public boolean open () {
}
NSGraphicsContext.static_saveGraphicsState();
NSGraphicsContext.setCurrentContext(context);
context.setCompositingOperation(OS.NSCompositeClear);
context.setCompositingOperation(OS.NSCompositingOperationClear);
frame.x = frame.y = 0;
NSBezierPath.fillRect(frame);
NSGraphicsContext.static_restoreGraphicsState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect rect, long view) {
transform.scaleXBy(1, -1);
transform.translateXBy(0, -(destRect.height + 2 * destRect.y));
transform.concat();
image.drawInRect(destRect, srcRect, OS.NSCompositeSourceOver, 1);
image.drawInRect(destRect, srcRect, OS.NSCompositingOperationSourceOver, 1);
context.restoreGraphicsState();
int imageWidth = imageBounds.width + IMAGE_GAP;
rect.x += imageWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void drawInteriorWithFrame_inView (long id, long sel, NSRect cellRect, long view
NSRect sourceRect = new NSRect ();
sourceRect.width = destRect.width;
sourceRect.height = destRect.height;
image.handle.drawInRect (destRect, sourceRect, OS.NSCompositeSourceOver, 1f);
image.handle.drawInRect (destRect, sourceRect, OS.NSCompositingOperationSourceOver, 1f);
if (isFlipped) context.restoreGraphicsState ();
drawX += destRect.width;
}
Expand Down
Loading