Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
054e8f42
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
054e8f42
编写于
3月 13, 2014
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d378ee2e
4e1d0803
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
146 deletion
+40
-146
src/macosx/classes/sun/lwawt/macosx/CWrapper.java
src/macosx/classes/sun/lwawt/macosx/CWrapper.java
+1
-10
src/macosx/native/sun/awt/AWTView.h
src/macosx/native/sun/awt/AWTView.h
+2
-8
src/macosx/native/sun/awt/AWTView.m
src/macosx/native/sun/awt/AWTView.m
+5
-1
src/macosx/native/sun/awt/CDragSource.h
src/macosx/native/sun/awt/CDragSource.h
+8
-11
src/macosx/native/sun/awt/CDragSource.m
src/macosx/native/sun/awt/CDragSource.m
+9
-10
src/macosx/native/sun/awt/CDropTarget.h
src/macosx/native/sun/awt/CDropTarget.h
+8
-2
src/macosx/native/sun/awt/CWrapper.h
src/macosx/native/sun/awt/CWrapper.h
+0
-24
src/macosx/native/sun/awt/CWrapper.m
src/macosx/native/sun/awt/CWrapper.m
+7
-80
未找到文件。
src/macosx/classes/sun/lwawt/macosx/CWrapper.java
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
package
sun.lwawt.macosx
;
package
sun.lwawt.macosx
;
import
java.awt.geom.Rectangle2D
;
public
final
class
CWrapper
{
public
final
class
CWrapper
{
private
CWrapper
()
{
}
private
CWrapper
()
{
}
...
@@ -61,8 +59,6 @@ public final class CWrapper {
...
@@ -61,8 +59,6 @@ public final class CWrapper {
public
static
native
void
addChildWindow
(
long
parent
,
long
child
,
int
ordered
);
public
static
native
void
addChildWindow
(
long
parent
,
long
child
,
int
ordered
);
public
static
native
void
removeChildWindow
(
long
parent
,
long
child
);
public
static
native
void
removeChildWindow
(
long
parent
,
long
child
);
public
static
native
void
setFrame
(
long
window
,
int
x
,
int
y
,
int
w
,
int
h
,
boolean
display
);
public
static
native
void
setAlphaValue
(
long
window
,
float
alpha
);
public
static
native
void
setAlphaValue
(
long
window
,
float
alpha
);
public
static
native
void
setOpaque
(
long
window
,
boolean
opaque
);
public
static
native
void
setOpaque
(
long
window
,
boolean
opaque
);
public
static
native
void
setBackgroundColor
(
long
window
,
long
color
);
public
static
native
void
setBackgroundColor
(
long
window
,
long
color
);
...
@@ -80,7 +76,6 @@ public final class CWrapper {
...
@@ -80,7 +76,6 @@ public final class CWrapper {
public
static
native
void
removeFromSuperview
(
long
view
);
public
static
native
void
removeFromSuperview
(
long
view
);
public
static
native
void
setFrame
(
long
view
,
int
x
,
int
y
,
int
w
,
int
h
);
public
static
native
void
setFrame
(
long
view
,
int
x
,
int
y
,
int
w
,
int
h
);
public
static
native
Rectangle2D
frame
(
long
view
);
public
static
native
long
window
(
long
view
);
public
static
native
long
window
(
long
view
);
public
static
native
void
setHidden
(
long
view
,
boolean
hidden
);
public
static
native
void
setHidden
(
long
view
,
boolean
hidden
);
...
@@ -88,10 +83,6 @@ public final class CWrapper {
...
@@ -88,10 +83,6 @@ public final class CWrapper {
public
static
native
void
setToolTip
(
long
view
,
String
msg
);
public
static
native
void
setToolTip
(
long
view
,
String
msg
);
}
}
public
static
final
class
NSObject
{
public
static
native
void
release
(
long
object
);
}
public
static
final
class
NSColor
{
public
static
final
class
NSColor
{
public
static
native
long
clearColor
();
public
static
native
long
clearColor
();
}
}
...
...
src/macosx/native/sun/awt/AWTView.h
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#import "CDragSource.h"
#import "CDragSource.h"
#import "CDropTarget.h"
#import "CDropTarget.h"
@interface
AWTView
:
NSView
<
NSTextInputClient
>
{
@interface
AWTView
:
NSView
<
NSTextInputClient
,
CDragSourceHolder
,
CDropTargetHolder
>
{
@private
@private
jobject
m_cPlatformView
;
jobject
m_cPlatformView
;
...
@@ -61,14 +61,8 @@
...
@@ -61,14 +61,8 @@
-
(
id
)
initWithRect
:(
NSRect
)
rect
platformView
:
(
jobject
)
cPlatformView
windowLayer
:(
CALayer
*
)
windowLayer
;
-
(
id
)
initWithRect
:(
NSRect
)
rect
platformView
:
(
jobject
)
cPlatformView
windowLayer
:(
CALayer
*
)
windowLayer
;
-
(
void
)
deliverJavaMouseEvent
:
(
NSEvent
*
)
event
;
-
(
void
)
deliverJavaMouseEvent
:
(
NSEvent
*
)
event
;
-
(
void
)
resetTrackingArea
;
-
(
void
)
deliverJavaKeyEventHelper
:
(
NSEvent
*
)
event
;
-
(
jobject
)
awtComponent
:(
JNIEnv
*
)
env
;
-
(
jobject
)
awtComponent
:(
JNIEnv
*
)
env
;
-
(
void
)
setDragSource
:(
CDragSource
*
)
source
;
-
(
void
)
setDropTarget
:(
CDropTarget
*
)
target
;
// Input method-related events
// Input method-related events
-
(
void
)
setInputMethod
:(
jobject
)
inputMethod
;
-
(
void
)
setInputMethod
:(
jobject
)
inputMethod
;
-
(
void
)
abandonInput
;
-
(
void
)
abandonInput
;
...
...
src/macosx/native/sun/awt/AWTView.m
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -42,6 +42,10 @@
...
@@ -42,6 +42,10 @@
@interface
AWTView
()
@interface
AWTView
()
@property
(
retain
)
CDropTarget
*
_dropTarget
;
@property
(
retain
)
CDropTarget
*
_dropTarget
;
@property
(
retain
)
CDragSource
*
_dragSource
;
@property
(
retain
)
CDragSource
*
_dragSource
;
-
(
void
)
deliverResize
:
(
NSRect
)
rect
;
-
(
void
)
resetTrackingArea
;
-
(
void
)
deliverJavaKeyEventHelper
:
(
NSEvent
*
)
event
;
@end
@end
// Uncomment this line to see fprintfs of each InputMethod API being called on this View
// Uncomment this line to see fprintfs of each InputMethod API being called on this View
...
...
src/macosx/native/sun/awt/CDragSource.h
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,9 +29,15 @@
...
@@ -29,9 +29,15 @@
#import <Cocoa/Cocoa.h>
#import <Cocoa/Cocoa.h>
#include <jni.h>
#include <jni.h>
@class
CDragSource
;
@protocol
CDragSourceHolder
-
(
void
)
setDragSource
:(
CDragSource
*
)
source
;
@end
@interface
CDragSource
:
NSObject
{
@interface
CDragSource
:
NSObject
{
@private
@private
NSView
*
fView
;
NSView
<
CDragSourceHolder
>*
fView
;
jobject
fComponent
;
jobject
fComponent
;
jobject
fDragSourceContextPeer
;
jobject
fDragSourceContextPeer
;
...
@@ -53,8 +59,6 @@
...
@@ -53,8 +59,6 @@
jint
fDragMouseModifiers
;
jint
fDragMouseModifiers
;
}
}
+
(
CDragSource
*
)
currentDragSource
;
// Common methods:
// Common methods:
-
(
id
)
init
:(
jobject
)
jDragSourceContextPeer
-
(
id
)
init
:(
jobject
)
jDragSourceContextPeer
component
:(
jobject
)
jComponent
component
:(
jobject
)
jComponent
...
@@ -84,13 +88,6 @@
...
@@ -84,13 +88,6 @@
-
(
void
)
draggedImage
:(
NSImage
*
)
image
movedTo
:(
NSPoint
)
screenPoint
;
-
(
void
)
draggedImage
:(
NSImage
*
)
image
movedTo
:(
NSPoint
)
screenPoint
;
-
(
BOOL
)
ignoreModifierKeysWhileDragging
;
-
(
BOOL
)
ignoreModifierKeysWhileDragging
;
// Updates from the destination to the source
-
(
void
)
postDragEnter
;
-
(
void
)
postDragExit
;
// Utility
-
(
NSPoint
)
mapNSScreenPointToJavaWithOffset
:(
NSPoint
)
point
;
@end
@end
#endif // CDragSource_h
#endif // CDragSource_h
src/macosx/native/sun/awt/CDragSource.m
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -75,14 +75,17 @@ JNF_CLASS_CACHE(CImageClass, "sun/lwawt/macosx/CImage");
...
@@ -75,14 +75,17 @@ JNF_CLASS_CACHE(CImageClass, "sun/lwawt/macosx/CImage");
static
NSDragOperation
sDragOperation
;
static
NSDragOperation
sDragOperation
;
static
NSPoint
sDraggingLocation
;
static
NSPoint
sDraggingLocation
;
static
CDragSource
*
sCurrentDragSource
;
static
BOOL
sNeedsEnter
;
static
BOOL
sNeedsEnter
;
@implementation
CDragSource
@interface
CDragSource
()
// Updates from the destination to the source
-
(
void
)
postDragEnter
;
-
(
void
)
postDragExit
;
// Utility
-
(
NSPoint
)
mapNSScreenPointToJavaWithOffset
:(
NSPoint
)
point
;
@end
+
(
CDragSource
*
)
currentDragSource
{
@implementation
CDragSource
return
sCurrentDragSource
;
}
-
(
id
)
init
:(
jobject
)
jDragSourceContextPeer
-
(
id
)
init
:(
jobject
)
jDragSourceContextPeer
component
:(
jobject
)
jComponent
component
:(
jobject
)
jComponent
...
@@ -515,8 +518,6 @@ static BOOL sNeedsEnter;
...
@@ -515,8 +518,6 @@ static BOOL sNeedsEnter;
fDragKeyModifiers
=
[
DnDUtilities
extractJavaExtKeyModifiersFromJavaExtModifiers
:
fModifiers
];
fDragKeyModifiers
=
[
DnDUtilities
extractJavaExtKeyModifiersFromJavaExtModifiers
:
fModifiers
];
fDragMouseModifiers
=
[
DnDUtilities
extractJavaExtMouseModifiersFromJavaExtModifiers
:
fModifiers
];
fDragMouseModifiers
=
[
DnDUtilities
extractJavaExtMouseModifiersFromJavaExtModifiers
:
fModifiers
];
// Set the current DragSource
sCurrentDragSource
=
self
;
sNeedsEnter
=
YES
;
sNeedsEnter
=
YES
;
@try
{
@try
{
...
@@ -566,8 +567,6 @@ static BOOL sNeedsEnter;
...
@@ -566,8 +567,6 @@ static BOOL sNeedsEnter;
JNF_MEMBER_CACHE
(
resetHoveringMethod
,
CDragSourceContextPeerClass
,
"resetHovering"
,
"()V"
);
JNF_MEMBER_CACHE
(
resetHoveringMethod
,
CDragSourceContextPeerClass
,
"resetHovering"
,
"()V"
);
JNFCallVoidMethod
(
env
,
fDragSourceContextPeer
,
resetHoveringMethod
);
// Hust reset static variable
JNFCallVoidMethod
(
env
,
fDragSourceContextPeer
,
resetHoveringMethod
);
// Hust reset static variable
}
@finally
{
}
@finally
{
// Clear the current DragSource
sCurrentDragSource
=
nil
;
sNeedsEnter
=
NO
;
sNeedsEnter
=
NO
;
}
}
...
...
src/macosx/native/sun/awt/CDropTarget.h
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -31,9 +31,15 @@
...
@@ -31,9 +31,15 @@
@class
ControlModel
;
@class
ControlModel
;
@class
CDropTarget
;
@protocol
CDropTargetHolder
-
(
void
)
setDropTarget
:(
CDropTarget
*
)
target
;
@end
@interface
CDropTarget
:
NSObject
{
@interface
CDropTarget
:
NSObject
{
@private
@private
NSView
*
fView
;
NSView
<
CDropTargetHolder
>*
fView
;
jobject
fComponent
;
jobject
fComponent
;
jobject
fDropTarget
;
jobject
fDropTarget
;
jobject
fDropTargetContextPeer
;
jobject
fDropTargetContextPeer
;
...
...
src/macosx/native/sun/awt/CWrapper.h
已删除
100644 → 0
浏览文件 @
d378ee2e
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
src/macosx/native/sun/awt/CWrapper.m
浏览文件 @
054e8f42
/*
/*
* Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
4
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,37 +23,10 @@
...
@@ -23,37 +23,10 @@
* questions.
* questions.
*/
*/
#import "CWrapper.h"
#import
<JavaNativeFoundation
/
JavaNativeFoundation.h
>
#import
<JavaNativeFoundation
/
JavaNativeFoundation.h
>
#import "AWTWindow.h"
#import "LWCToolkit.h"
#import "GeomUtilities.h"
#import "ThreadUtilities.h"
#import "ThreadUtilities.h"
#import "sun_lwawt_macosx_CWrapper_NSWindow.h"
#import "sun_lwawt_macosx_CWrapper_NSWindow.h"
/*
* Class: sun_lwawt_macosx_CWrapper$NSObject
* Method: release
* Signature: (J)V
*/
JNIEXPORT void JNICALL
Java_sun_lwawt_macosx_CWrapper_00024NSObject_release
(JNIEnv *env, jclass cls, jlong objectPtr)
{
JNF_COCOA_ENTER(env);
id obj = (id)jlong_to_ptr(objectPtr);
[ThreadUtilities performOnMainThreadWaiting:NO block:^(){
CFRelease(obj);
}];
JNF_COCOA_EXIT(env);
}
/*
/*
* Class: sun_lwawt_macosx_CWrapper$NSWindow
* Class: sun_lwawt_macosx_CWrapper$NSWindow
* Method: makeKeyAndOrderFront
* Method: makeKeyAndOrderFront
...
@@ -309,8 +282,8 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_removeChildWindow
...
@@ -309,8 +282,8 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_removeChildWindow
{
{
JNF_COCOA_ENTER
(
env
);
JNF_COCOA_ENTER
(
env
);
AWTWindow
*parent =
(AWT
Window
*
)
jlong_to_ptr
(
parentPtr
);
NSWindow
*parent =
(NS
Window
*
)
jlong_to_ptr
(
parentPtr
);
AWTWindow
*child =
(AWT
Window
*
)
jlong_to_ptr
(
childPtr
);
NSWindow
*child =
(NS
Window
*
)
jlong_to_ptr
(
childPtr
);
[
ThreadUtilities
performOnMainThread:
@
selector
(
removeChildWindow:
)
[
ThreadUtilities
performOnMainThread:
@
selector
(
removeChildWindow:
)
on:parent
on:parent
withObject:child
withObject:child
...
@@ -319,26 +292,6 @@ JNF_COCOA_ENTER(env);
...
@@ -319,26 +292,6 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT
(
env
);
JNF_COCOA_EXIT
(
env
);
}
}
/
*
*
Class:
sun_lwawt_macosx_CWrapper
$
NSWindow
*
Method:
setFrame
*
Signature:
(
JIIIIZ
)
V
*
/
JNIEXPORT
void
JNICALL
Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setFrame
(
JNIEnv
*env
,
jclass
cls
,
jlong
windowPtr
,
jint
x
,
jint
y
,
jint
w
,
jint
h
,
jboolean
display
)
{
JNF_COCOA_ENTER
(
env
);
AWTWindow
*window =
(AWTWindow
*
)
jlong_to_ptr
(
windowPtr
);
NSRect
frame =
NSMakeRect(x,
y
,
w
,
h
);
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
window
setFrame:frame
display:display
];
}];
JNF_COCOA_EXIT
(
env
);
}
/
*
/
*
*
Class:
sun_lwawt_macosx_CWrapper
$
NSWindow
*
Class:
sun_lwawt_macosx_CWrapper
$
NSWindow
*
Method:
setAlphaValue
*
Method:
setAlphaValue
...
@@ -350,7 +303,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setAlphaValue
...
@@ -350,7 +303,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setAlphaValue
{
{
JNF_COCOA_ENTER
(
env
);
JNF_COCOA_ENTER
(
env
);
AWTWindow
*window =
(AWT
Window
*
)
jlong_to_ptr
(
windowPtr
);
NSWindow
*window =
(NS
Window
*
)
jlong_to_ptr
(
windowPtr
);
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
window
setAlphaValue:
(
CGFloat
)
alpha
];
[
window
setAlphaValue:
(
CGFloat
)
alpha
];
}];
}];
...
@@ -369,7 +322,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setOpaque
...
@@ -369,7 +322,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setOpaque
{
{
JNF_COCOA_ENTER
(
env
);
JNF_COCOA_ENTER
(
env
);
AWTWindow
*window =
(AWT
Window
*
)
jlong_to_ptr
(
windowPtr
);
NSWindow
*window =
(NS
Window
*
)
jlong_to_ptr
(
windowPtr
);
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
window
setOpaque:
(
BOOL
)
opaque
];
[
window
setOpaque:
(
BOOL
)
opaque
];
}];
}];
...
@@ -388,7 +341,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setBackgroundColor
...
@@ -388,7 +341,7 @@ Java_sun_lwawt_macosx_CWrapper_00024NSWindow_setBackgroundColor
{
{
JNF_COCOA_ENTER
(
env
);
JNF_COCOA_ENTER
(
env
);
AWTWindow
*window =
(AWT
Window
*
)
jlong_to_ptr
(
windowPtr
);
NSWindow
*window =
(NS
Window
*
)
jlong_to_ptr
(
windowPtr
);
NSColor
*color =
(NSColor
*
)
jlong_to_ptr
(
colorPtr
);
NSColor
*color =
(NSColor
*
)
jlong_to_ptr
(
colorPtr
);
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
ThreadUtilities
performOnMainThreadWaiting:NO
block:
^(){
[
window
setBackgroundColor:color
];
[
window
setBackgroundColor:color
];
...
@@ -398,6 +351,7 @@ JNF_COCOA_EXIT(env);
...
@@ -398,6 +351,7 @@ JNF_COCOA_EXIT(env);
}
}
/
*
/
*
*
Class:
sun_lwawt_macosx_CWrapper
$
NSWindow
*
Method:
miniaturize
*
Method:
miniaturize
*
Signature:
(
J
)
V
*
Signature:
(
J
)
V
*
/
*
/
...
@@ -559,33 +513,6 @@ JNF_COCOA_ENTER(env);
...
@@ -559,33 +513,6 @@ JNF_COCOA_ENTER(env);
JNF_COCOA_EXIT
(
env
);
JNF_COCOA_EXIT
(
env
);
}
}
/
*
*
Class:
sun_lwawt_macosx_CWrapper
$
NSView
*
Method:
frame
*
Signature:
(
J
)
Ljava
/
awt
/
Rectangle
;
*
/
JNIEXPORT
jobject
JNICALL
Java_sun_lwawt_macosx_CWrapper_00024NSView_frame
(
JNIEnv
*env
,
jclass
cls
,
jlong
viewPtr
)
{
jobject
jRect =
NULL;
JNF_COCOA_ENTER
(
env
);
__block
NSRect
rect =
NSZeroRect;
NSView
*view =
(NSView
*
)
jlong_to_ptr
(
viewPtr
);
[
ThreadUtilities
performOnMainThreadWaiting:YES
block:
^(){
rect =
[view
frame
];
}];
jRect =
NSToJavaRect(env,
rect
);
JNF_COCOA_EXIT
(
env
);
return
jRect
;
}
/
*
/
*
*
Class:
sun_lwawt_macosx_CWrapper
$
NSView
*
Class:
sun_lwawt_macosx_CWrapper
$
NSView
*
Method:
window
*
Method:
window
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录