Mercurial > projects > dwt-mac
diff dwt/widgets/Canvas.d @ 51:e6f04eb518ae
Updated Canvas to 3.514
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 07 Dec 2008 21:24:13 +0100 |
parents | cfa563df4fdd |
children | c74ba20de292 |
line wrap: on
line diff
--- a/dwt/widgets/Canvas.d Sun Dec 07 21:06:50 2008 +0100 +++ b/dwt/widgets/Canvas.d Sun Dec 07 21:24:13 2008 +0100 @@ -32,7 +32,7 @@ import dwt.internal.cocoa.OS; import dwt.dwthelper.utils; -import dwt.internal.cocoa.NSImage; +import dwt.internal.objc.cocoa.Cocoa; import dwt.widgets.Caret; import dwt.widgets.Composite; import dwt.widgets.Control; @@ -68,17 +68,17 @@ /* Do nothing */ } -int /*long*/ attributedSubstringFromRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) { +objc.id attributedSubstringFromRange (objc.id id, objc.SEL sel, objc.id range) { if (ime !is null) return ime.attributedSubstringFromRange (id, sel, range); return super.attributedSubstringFromRange(id, sel, range); } -bool becomeFirstResponder (int /*long*/ id, int /*long*/ sel) { +bool becomeFirstResponder (objc.id id, objc.SEL sel) { if (caret !is null) caret.setFocus (); return super.becomeFirstResponder(id, sel); } -bool resignFirstResponder (int /*long*/ id, int /*long*/ sel) { +bool resignFirstResponder (objc.id id, objc.SEL sel) { if (caret !is null) caret.killFocus (); return super.resignFirstResponder(id, sel); } @@ -115,7 +115,7 @@ super (parent, style); } -int /*long*/ characterIndexForPoint (int /*long*/ id, int /*long*/ sel, int /*long*/ point) { +NSInteger characterIndexForPoint (objc.id id, objc.SEL sel, objc.id point) { if (ime !is null) return ime.characterIndexForPoint (id, sel, point); return super.characterIndexForPoint (id, sel, point); } @@ -158,7 +158,7 @@ } } -void drawWidget (objc.id id_, NSRect rect) { +void drawWidget (objc.id id, NSRect rect) { super.drawWidget (id, rect); if (caret is null) return; if (caret.isShowing) { @@ -173,10 +173,10 @@ NSPoint point = NSPoint(); point.x = caret.x; point.y = caret.y; - image.handle.drawAtPoint(point, rect, NSCompositeXOR, 1); + image.handle.drawAtPoint(point, rect, OS.NSCompositeXOR, 1); } else { context.saveGraphicsState(); - context.setCompositingOperation(NSCompositeXOR); + context.setCompositingOperation(OS.NSCompositeXOR); NSRect drawRect = NSRect(); drawRect.x = caret.x; drawRect.y = caret.y; @@ -191,7 +191,7 @@ } } -NSRect firstRectForCharacterRange (int /*long*/ id, int /*long*/ sel, int /*long*/ range) { +NSRect firstRectForCharacterRange (objc.id id, objc.SEL sel, objc.id range) { if (ime !is null) return ime.firstRectForCharacterRange (id, sel, range); return super.firstRectForCharacterRange (id, sel, range); } @@ -236,19 +236,19 @@ return ime; } -bool hasMarkedText (int /*long*/ id, int /*long*/ sel) { +bool hasMarkedText (objc.id id, objc.SEL sel) { if (ime !is null) return ime.hasMarkedText (id, sel); return super.hasMarkedText (id, sel); } -bool insertText (int /*long*/ id, int /*long*/ sel, int /*long*/ string) { +bool insertText (objc.id id, objc.SEL sel, objc.id string) { if (ime !is null) { if (!ime.insertText (id, sel, string)) return false; } return super.insertText (id, sel, string); } -NSRange markedRange (int /*long*/ id, int /*long*/ sel) { +NSRange markedRange (objc.id id, objc.SEL sel) { if (ime !is null) return ime.markedRange (id, sel); return super.markedRange (id, sel); } @@ -346,7 +346,7 @@ if (isFocus) caret.setFocus (); } -NSRange selectedRange (int /*long*/ id, int /*long*/ sel) { +NSRange selectedRange (objc.id id, objc.SEL sel) { if (ime !is null) return ime.selectedRange (id, sel); return super.selectedRange (id, sel); } @@ -417,14 +417,14 @@ this.ime = ime; } -bool setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ range) { +bool setMarkedText_selectedRange (objc.id id, objc.SEL sel, objc.id string, objc.id range) { if (ime !is null) { if (!ime.setMarkedText_selectedRange (id, sel, string, range)) return false; } return super.setMarkedText_selectedRange (id, sel, string, range); } -int /*long*/ validAttributesForMarkedText (int /*long*/ id, int /*long*/ sel) { +objc.id validAttributesForMarkedText (objc.id id, objc.SEL sel) { if (ime !is null) return ime.validAttributesForMarkedText (id, sel); return super.validAttributesForMarkedText(id, sel); }