80 CCursorManager.nativeSetAllowsCursorSetInBackground(true);
81 } else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
82 CCursorManager.nativeSetAllowsCursorSetInBackground(false);
83 }
84
85 responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
86 clickCount, x, y, screenX, screenY);
87 }
88
89 public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
90 double deltaX, double deltaY, double deltaZ) {
91 int x = (int)pluginX;
92 int y = (int)pluginY;
93
94 responder.handleScrollEvent(x, y, modifierFlags, deltaX, deltaY);
95 }
96
97 public void handleKeyEvent(int eventType, int modifierFlags, String characters,
98 String charsIgnoringMods, boolean isRepeat, short keyCode,
99 boolean needsKeyTyped) {
100 responder.handleKeyEvent(eventType, modifierFlags, charsIgnoringMods, keyCode, needsKeyTyped, isRepeat);
101 }
102
103 public void handleInputEvent(String text) {
104 responder.handleInputEvent(text);
105 }
106
107 // handleFocusEvent is called when the applet becames focused/unfocused.
108 // This method can be called from different threads.
109 public void handleFocusEvent(boolean focused) {
110 synchronized (classLock) {
111 // In some cases an applet may not receive the focus lost event
112 // from the parent window (see 8012330)
113 focusedWindow = (focused) ? this
114 : ((focusedWindow == this) ? null : focusedWindow);
115 }
116 if (focusedWindow == this) {
117 // see bug 8010925
118 // we can't put this to handleWindowFocusEvent because
119 // it won't be invoced if focuse is moved to a html element
120 // on the same page.
|
80 CCursorManager.nativeSetAllowsCursorSetInBackground(true);
81 } else if (eventType == CocoaConstants.NPCocoaEventMouseExited) {
82 CCursorManager.nativeSetAllowsCursorSetInBackground(false);
83 }
84
85 responder.handleMouseEvent(eventType, modifierFlags, buttonNumber,
86 clickCount, x, y, screenX, screenY);
87 }
88
89 public void handleScrollEvent(double pluginX, double pluginY, int modifierFlags,
90 double deltaX, double deltaY, double deltaZ) {
91 int x = (int)pluginX;
92 int y = (int)pluginY;
93
94 responder.handleScrollEvent(x, y, modifierFlags, deltaX, deltaY);
95 }
96
97 public void handleKeyEvent(int eventType, int modifierFlags, String characters,
98 String charsIgnoringMods, boolean isRepeat, short keyCode,
99 boolean needsKeyTyped) {
100 responder.handleKeyEvent(eventType, modifierFlags, characters, charsIgnoringMods,
101 keyCode, needsKeyTyped, isRepeat);
102 }
103
104 public void handleInputEvent(String text) {
105 responder.handleInputEvent(text);
106 }
107
108 // handleFocusEvent is called when the applet becames focused/unfocused.
109 // This method can be called from different threads.
110 public void handleFocusEvent(boolean focused) {
111 synchronized (classLock) {
112 // In some cases an applet may not receive the focus lost event
113 // from the parent window (see 8012330)
114 focusedWindow = (focused) ? this
115 : ((focusedWindow == this) ? null : focusedWindow);
116 }
117 if (focusedWindow == this) {
118 // see bug 8010925
119 // we can't put this to handleWindowFocusEvent because
120 // it won't be invoced if focuse is moved to a html element
121 // on the same page.
|