Skip to content

Commit 7438963

Browse files
committed
WIP
1 parent f091823 commit 7438963

File tree

4 files changed

+153
-154
lines changed

4 files changed

+153
-154
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,83 @@
1-
/*
2-
* Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
3-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4-
*
5-
* This code is free software; you can redistribute it and/or modify it
6-
* under the terms of the GNU General Public License version 2 only, as
7-
* published by the Free Software Foundation. Oracle designates this
8-
* particular file as subject to the "Classpath" exception as provided
9-
* by Oracle in the LICENSE file that accompanied this code.
10-
*
11-
* This code is distributed in the hope that it will be useful, but WITHOUT
12-
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13-
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14-
* version 2 for more details (a copy is included in the LICENSE file that
15-
* accompanied this code).
16-
*
17-
* You should have received a copy of the GNU General Public License version
18-
* 2 along with this work; if not, write to the Free Software Foundation,
19-
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20-
*
21-
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22-
* or visit www.oracle.com if you need additional information or have any
23-
* questions.
24-
*/
25-
package com.sun.glass.events;
26-
27-
import com.sun.glass.ui.Window;
28-
import com.sun.glass.ui.WindowControlsOverlay;
29-
import java.lang.annotation.Native;
30-
31-
public class MouseEvent {
32-
@Native final static public int BUTTON_NONE = 211;
33-
@Native final static public int BUTTON_LEFT = 212;
34-
@Native final static public int BUTTON_RIGHT = 213;
35-
@Native final static public int BUTTON_OTHER = 214;
36-
@Native final static public int BUTTON_BACK = 215;
37-
@Native final static public int BUTTON_FORWARD = 216;
38-
39-
@Native final static public int DOWN = 221;
40-
@Native final static public int UP = 222;
41-
@Native final static public int DRAG = 223;
42-
@Native final static public int MOVE = 224;
43-
@Native final static public int ENTER = 225;
44-
@Native final static public int EXIT = 226;
45-
@Native final static public int CLICK = 227; // synthetic
46-
47-
/**
48-
* Artificial WHEEL event type.
49-
* This kind of mouse event is NEVER sent to an app.
50-
* The app must listen to Scroll events instead.
51-
* This identifier is required for internal purposes.
52-
*/
53-
@Native final static public int WHEEL = 228;
54-
55-
/**
56-
* Non-client events are only natively produced on the Windows platform as a result of
57-
* handling the {@code WM_NCHITTEST} message for an {@link Window#EXTENDED} window.
58-
* <p>
59-
* They are never sent to applications, but are processed by {@link WindowControlsOverlay}.
60-
*/
61-
@Native final static public int NC_DOWN = 230;
62-
@Native final static public int NC_UP = 231;
63-
@Native final static public int NC_DRAG = 232;
64-
@Native final static public int NC_MOVE = 233;
65-
@Native final static public int NC_ENTER = 234;
66-
@Native final static public int NC_EXIT = 235;
67-
68-
public static boolean isNonClientEvent(int event) {
69-
return event >= NC_DOWN && event <= NC_EXIT;
70-
}
71-
72-
public static int toNonClientEvent(int event) {
73-
return switch (event) {
74-
case DOWN -> NC_DOWN;
75-
case UP -> NC_UP;
76-
case DRAG -> NC_DRAG;
77-
case MOVE -> NC_MOVE;
78-
case ENTER -> NC_ENTER;
79-
case EXIT -> NC_EXIT;
80-
default -> event;
81-
};
82-
}
83-
}
1+
/*
2+
* Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
package com.sun.glass.events;
26+
27+
import com.sun.glass.ui.Window;
28+
import com.sun.glass.ui.WindowControlsOverlay;
29+
import java.lang.annotation.Native;
30+
31+
public class MouseEvent {
32+
@Native final static public int BUTTON_NONE = 211;
33+
@Native final static public int BUTTON_LEFT = 212;
34+
@Native final static public int BUTTON_RIGHT = 213;
35+
@Native final static public int BUTTON_OTHER = 214;
36+
@Native final static public int BUTTON_BACK = 215;
37+
@Native final static public int BUTTON_FORWARD = 216;
38+
39+
@Native final static public int DOWN = 221;
40+
@Native final static public int UP = 222;
41+
@Native final static public int DRAG = 223;
42+
@Native final static public int MOVE = 224;
43+
@Native final static public int ENTER = 225;
44+
@Native final static public int EXIT = 226;
45+
@Native final static public int CLICK = 227; // synthetic
46+
47+
/**
48+
* Artificial WHEEL event type.
49+
* This kind of mouse event is NEVER sent to an app.
50+
* The app must listen to Scroll events instead.
51+
* This identifier is required for internal purposes.
52+
*/
53+
@Native final static public int WHEEL = 228;
54+
55+
/**
56+
* Non-client events are only natively produced on the Windows platform as a result of
57+
* handling the {@code WM_NCHITTEST} message for an {@link Window#EXTENDED} window.
58+
* <p>
59+
* They are never sent to applications, but are processed by {@link WindowControlsOverlay}.
60+
*/
61+
@Native final static public int NC_DOWN = 230;
62+
@Native final static public int NC_UP = 231;
63+
@Native final static public int NC_DRAG = 232;
64+
@Native final static public int NC_MOVE = 233;
65+
@Native final static public int NC_ENTER = 234;
66+
@Native final static public int NC_EXIT = 235;
67+
68+
public static boolean isNonClientEvent(int event) {
69+
return event >= NC_DOWN && event <= NC_EXIT;
70+
}
71+
72+
public static int toNonClientEvent(int event) {
73+
return switch (event) {
74+
case DOWN -> NC_DOWN;
75+
case UP -> NC_UP;
76+
case DRAG -> NC_DRAG;
77+
case MOVE -> NC_MOVE;
78+
case ENTER -> NC_ENTER;
79+
case EXIT -> NC_EXIT;
80+
default -> event;
81+
};
82+
}
83+
}

modules/javafx.graphics/src/main/java/com/sun/javafx/tk/TKSceneListener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

modules/javafx.graphics/src/main/native-glass/win/ViewContainer.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,6 @@ void ViewContainer::NotifyCaptureChanged(HWND hwnd, HWND to)
10631063

10641064
void ViewContainer::ResetMouseTracking(HWND hwnd)
10651065
{
1066-
return;
10671066
if (!m_bTrackingMouse) {
10681067
return;
10691068
}
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
/*
2-
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
3-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4-
*
5-
* This code is free software; you can redistribute it and/or modify it
6-
* under the terms of the GNU General Public License version 2 only, as
7-
* published by the Free Software Foundation. Oracle designates this
8-
* particular file as subject to the "Classpath" exception as provided
9-
* by Oracle in the LICENSE file that accompanied this code.
10-
*
11-
* This code is distributed in the hope that it will be useful, but WITHOUT
12-
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13-
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14-
* version 2 for more details (a copy is included in the LICENSE file that
15-
* accompanied this code).
16-
*
17-
* You should have received a copy of the GNU General Public License version
18-
* 2 along with this work; if not, write to the Free Software Foundation,
19-
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20-
*
21-
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22-
* or visit www.oracle.com if you need additional information or have any
23-
* questions.
24-
*/
25-
26-
#ifndef _GLASS_COMMON_
27-
#define _GLASS_COMMON_
28-
29-
#ifndef _WIN32_WINNT
30-
#define _WIN32_WINNT 0x0601
31-
#endif
32-
#ifndef _WIN32_IE
33-
#define _WIN32_IE 0x0500
34-
#endif
35-
36-
#ifndef _WIN32_WINNT_
37-
#define _WIN32_WINNT_ _WIN32_WINNT
38-
#endif
39-
40-
#pragma warning(disable : 4675)
41-
42-
#include <assert.h>
43-
#include <comdef.h>
44-
#include <comutil.h>
45-
#include <imm.h>
46-
#include <jni.h>
47-
#include <malloc.h>
48-
#include <manipulations.h>
49-
#include <memory>
50-
#include <mmsystem.h>
51-
#include <new>
52-
#include <ole2.h>
53-
#include <shlobj.h>
54-
#include <stdio.h>
55-
#include <string.h>
56-
#include <Tpcshrd.h>
57-
#include <tchar.h>
58-
#include <vector>
59-
#include <wchar.h>
60-
#include <windows.h>
61-
#include <windowsx.h>
62-
#include <shellapi.h>
63-
#include <versionhelpers.h>
64-
65-
#include "Utils.h"
66-
#include "OleUtils.h"
67-
#include "Dwmapi.h"
68-
69-
#endif /* #ifndef _GLASS_COMMON_ */
1+
/*
2+
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This code is free software; you can redistribute it and/or modify it
6+
* under the terms of the GNU General Public License version 2 only, as
7+
* published by the Free Software Foundation. Oracle designates this
8+
* particular file as subject to the "Classpath" exception as provided
9+
* by Oracle in the LICENSE file that accompanied this code.
10+
*
11+
* This code is distributed in the hope that it will be useful, but WITHOUT
12+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
* version 2 for more details (a copy is included in the LICENSE file that
15+
* accompanied this code).
16+
*
17+
* You should have received a copy of the GNU General Public License version
18+
* 2 along with this work; if not, write to the Free Software Foundation,
19+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
*
21+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
* or visit www.oracle.com if you need additional information or have any
23+
* questions.
24+
*/
25+
26+
#ifndef _GLASS_COMMON_
27+
#define _GLASS_COMMON_
28+
29+
#ifndef _WIN32_WINNT
30+
#define _WIN32_WINNT 0x0601
31+
#endif
32+
#ifndef _WIN32_IE
33+
#define _WIN32_IE 0x0500
34+
#endif
35+
36+
#ifndef _WIN32_WINNT_
37+
#define _WIN32_WINNT_ _WIN32_WINNT
38+
#endif
39+
40+
#pragma warning(disable : 4675)
41+
42+
#include <assert.h>
43+
#include <comdef.h>
44+
#include <comutil.h>
45+
#include <imm.h>
46+
#include <jni.h>
47+
#include <malloc.h>
48+
#include <manipulations.h>
49+
#include <memory>
50+
#include <mmsystem.h>
51+
#include <new>
52+
#include <ole2.h>
53+
#include <shlobj.h>
54+
#include <stdio.h>
55+
#include <string.h>
56+
#include <Tpcshrd.h>
57+
#include <tchar.h>
58+
#include <vector>
59+
#include <wchar.h>
60+
#include <windows.h>
61+
#include <windowsx.h>
62+
#include <shellapi.h>
63+
#include <versionhelpers.h>
64+
65+
#include "Utils.h"
66+
#include "OleUtils.h"
67+
#include "Dwmapi.h"
68+
69+
#endif /* #ifndef _GLASS_COMMON_ */

0 commit comments

Comments
 (0)