< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Toolkit.h

Print this page


   1 /*
   2  * Copyright (c) 1996, 2017, 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


 227 
 228     void SetDynamicLayout(BOOL dynamic);
 229     BOOL IsDynamicLayoutSet();
 230     BOOL IsDynamicLayoutSupported();
 231     BOOL IsDynamicLayoutActive();
 232     BOOL areExtraMouseButtonsEnabled();
 233     void setExtraMouseButtonsEnabled(BOOL enable);
 234     static UINT GetNumberOfButtons();
 235 
 236     bool IsWin8OrLater();
 237     bool IsTouchKeyboardAutoShowEnabled();
 238     bool IsAnyKeyboardAttached();
 239     bool IsTouchKeyboardAutoShowSystemEnabled();
 240     void ShowTouchKeyboard();
 241     void HideTouchKeyboard();
 242     BOOL TIRegisterTouchWindow(HWND hWnd, ULONG ulFlags);
 243     BOOL TIGetTouchInputInfo(HTOUCHINPUT hTouchInput,
 244         UINT cInputs, PTOUCHINPUT pInputs, int cbSize);
 245     BOOL TICloseTouchInputHandle(HTOUCHINPUT hTouchInput);
 246 


 247     INLINE BOOL localPump() { return m_localPump; }
 248     INLINE BOOL VerifyComponents() { return FALSE; } // TODO: Use new DebugHelper class to set this flag
 249     INLINE HWND GetHWnd() { return m_toolkitHWnd; }
 250 
 251     INLINE HMODULE GetModuleHandle() { return m_dllHandle; }
 252     INLINE void SetModuleHandle(HMODULE h) { m_dllHandle = h; }
 253 
 254     INLINE static DWORD MainThread() { return GetInstance().m_mainThreadId; }
 255     INLINE void VerifyActive() throw (awt_toolkit_shutdown) {
 256         if (!m_isActive && m_mainThreadId != ::GetCurrentThreadId()) {
 257             throw awt_toolkit_shutdown();
 258         }
 259     }
 260     INLINE BOOL IsDisposed() { return m_isDisposed; }
 261     static UINT GetMouseKeyState();
 262     static void GetKeyboardState(PBYTE keyboardState);
 263 
 264     static ATOM RegisterClass();
 265     static void UnregisterClass();
 266     INLINE LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0) {


 481 
 482     HHOOK m_hGetMessageHook;
 483     HHOOK m_hMouseLLHook;
 484     UINT_PTR  m_timer;
 485 
 486     class AwtCmdIDList* m_cmdIDs;
 487     BYTE                m_lastKeyboardState[KB_STATE_SIZE];
 488     CriticalSection     m_lockKB;
 489 
 490     static AwtToolkit theInstance;
 491 
 492     /* The current modal dialog frame (normally NULL). */
 493     AwtDialog* m_pModalDialog;
 494 
 495     /* The WToolkit peer instance */
 496     jobject m_peer;
 497 
 498     HMODULE m_dllHandle;  /* The module handle. */
 499 
 500     CriticalSection m_Sync;




 501 
 502 /* track display changes - used by palette-updating code.
 503    This is a workaround for a windows bug that prevents
 504    WM_PALETTECHANGED event from occurring immediately after
 505    a WM_DISPLAYCHANGED event.
 506   */
 507 private:
 508     BOOL m_displayChanged;  /* Tracks displayChanged events */
 509     // 0 means we are not embedded.
 510     DWORD m_embedderProcessID;
 511 
 512 public:
 513     BOOL HasDisplayChanged() { return m_displayChanged; }
 514     void ResetDisplayChanged() { m_displayChanged = FALSE; }
 515     void RegisterEmbedderProcessId(HWND);
 516     BOOL IsEmbedderProcessId(const DWORD processID) const
 517     {
 518         return m_embedderProcessID && (processID == m_embedderProcessID);
 519     }
 520 


   1 /*
   2  * Copyright (c) 1996, 2020, 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


 227 
 228     void SetDynamicLayout(BOOL dynamic);
 229     BOOL IsDynamicLayoutSet();
 230     BOOL IsDynamicLayoutSupported();
 231     BOOL IsDynamicLayoutActive();
 232     BOOL areExtraMouseButtonsEnabled();
 233     void setExtraMouseButtonsEnabled(BOOL enable);
 234     static UINT GetNumberOfButtons();
 235 
 236     bool IsWin8OrLater();
 237     bool IsTouchKeyboardAutoShowEnabled();
 238     bool IsAnyKeyboardAttached();
 239     bool IsTouchKeyboardAutoShowSystemEnabled();
 240     void ShowTouchKeyboard();
 241     void HideTouchKeyboard();
 242     BOOL TIRegisterTouchWindow(HWND hWnd, ULONG ulFlags);
 243     BOOL TIGetTouchInputInfo(HTOUCHINPUT hTouchInput,
 244         UINT cInputs, PTOUCHINPUT pInputs, int cbSize);
 245     BOOL TICloseTouchInputHandle(HTOUCHINPUT hTouchInput);
 246 
 247     LRESULT InvokeInputMethodFunction(UINT msg, WPARAM wParam=0, LPARAM lParam=0);
 248 
 249     INLINE BOOL localPump() { return m_localPump; }
 250     INLINE BOOL VerifyComponents() { return FALSE; } // TODO: Use new DebugHelper class to set this flag
 251     INLINE HWND GetHWnd() { return m_toolkitHWnd; }
 252 
 253     INLINE HMODULE GetModuleHandle() { return m_dllHandle; }
 254     INLINE void SetModuleHandle(HMODULE h) { m_dllHandle = h; }
 255 
 256     INLINE static DWORD MainThread() { return GetInstance().m_mainThreadId; }
 257     INLINE void VerifyActive() throw (awt_toolkit_shutdown) {
 258         if (!m_isActive && m_mainThreadId != ::GetCurrentThreadId()) {
 259             throw awt_toolkit_shutdown();
 260         }
 261     }
 262     INLINE BOOL IsDisposed() { return m_isDisposed; }
 263     static UINT GetMouseKeyState();
 264     static void GetKeyboardState(PBYTE keyboardState);
 265 
 266     static ATOM RegisterClass();
 267     static void UnregisterClass();
 268     INLINE LRESULT SendMessage(UINT msg, WPARAM wParam=0, LPARAM lParam=0) {


 483 
 484     HHOOK m_hGetMessageHook;
 485     HHOOK m_hMouseLLHook;
 486     UINT_PTR  m_timer;
 487 
 488     class AwtCmdIDList* m_cmdIDs;
 489     BYTE                m_lastKeyboardState[KB_STATE_SIZE];
 490     CriticalSection     m_lockKB;
 491 
 492     static AwtToolkit theInstance;
 493 
 494     /* The current modal dialog frame (normally NULL). */
 495     AwtDialog* m_pModalDialog;
 496 
 497     /* The WToolkit peer instance */
 498     jobject m_peer;
 499 
 500     HMODULE m_dllHandle;  /* The module handle. */
 501 
 502     CriticalSection m_Sync;
 503     CriticalSection m_inputMethodLock;
 504 
 505     HANDLE m_inputMethodWaitEvent;
 506     LRESULT m_inputMethodData;
 507 
 508 /* track display changes - used by palette-updating code.
 509    This is a workaround for a windows bug that prevents
 510    WM_PALETTECHANGED event from occurring immediately after
 511    a WM_DISPLAYCHANGED event.
 512   */
 513 private:
 514     BOOL m_displayChanged;  /* Tracks displayChanged events */
 515     // 0 means we are not embedded.
 516     DWORD m_embedderProcessID;
 517 
 518 public:
 519     BOOL HasDisplayChanged() { return m_displayChanged; }
 520     void ResetDisplayChanged() { m_displayChanged = FALSE; }
 521     void RegisterEmbedderProcessId(HWND);
 522     BOOL IsEmbedderProcessId(const DWORD processID) const
 523     {
 524         return m_embedderProcessID && (processID == m_embedderProcessID);
 525     }
 526 


< prev index next >