Path: blob/master/src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.h
40957 views
/*1* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#define JACCESSINSPECTOR_LOG "jaccessinspector.log"2627void CALLBACK TimerProc(HWND hWnd, UINT uTimerMsg, UINT uTimerID, DWORD dwTime);28LRESULT CALLBACK KeyboardProc(int code, WPARAM wParam, LPARAM lParam);29LRESULT CALLBACK MouseProc(int code, WPARAM wParam, LPARAM lParam);3031BOOL InitWindow(HANDLE hInstance);32INT_PTR CALLBACK jaccessinspectorDialogProc( HWND hDlg, UINT message,33WPARAM wParam, LPARAM lParam );3435void HandleJavaPropertyChange( long vmID, PropertyChangeEvent event,36AccessibleContext ac,37wchar_t *name, wchar_t *oldValue,38wchar_t *newValue );3940void HandleJavaShutdown(long vmID);41void HandleJavaFocusGained(long vmID, FocusEvent event, AccessibleContext ac);42void HandleJavaFocusLost(long vmID, FocusEvent event, AccessibleContext ac);4344void HandleJavaCaretUpdate(long vmID, CaretEvent event, AccessibleContext ac);4546void HandleMouseClicked(long vmID, MouseEvent event, AccessibleContext ac);47void HandleMouseEntered(long vmID, MouseEvent event, AccessibleContext ac);48void HandleMouseExited(long vmID, MouseEvent event, AccessibleContext ac);49void HandleMousePressed(long vmID, MouseEvent event, AccessibleContext ac);50void HandleMouseReleased(long vmID, MouseEvent event, AccessibleContext ac);5152void HandleMenuCanceled(long vmID, MenuEvent event, AccessibleContext ac);53void HandleMenuDeselected(long vmID, MenuEvent event, AccessibleContext ac);54void HandleMenuSelected(long vmID, MenuEvent event, AccessibleContext ac);55void HandlePopupMenuCanceled(long vmID, MenuEvent event, AccessibleContext ac);56void HandlePopupMenuWillBecomeInvisible( long vmID, MenuEvent event,57AccessibleContext ac );58void HandlePopupMenuWillBecomeVisible( long vmID, MenuEvent event,59AccessibleContext ac );6061void HandlePropertyNameChange( long vmID, PropertyChangeEvent event,62AccessibleContext ac,63wchar_t *oldName, wchar_t *newName);64void HandlePropertyDescriptionChange( long vmID, PropertyChangeEvent event,65AccessibleContext ac,66wchar_t *oldDescription,67wchar_t *newDescription );68void HandlePropertyStateChange( long vmID, PropertyChangeEvent event,69AccessibleContext ac,70wchar_t *oldState, wchar_t *newState );71void HandlePropertyValueChange( long vmID, PropertyChangeEvent event,72AccessibleContext ac,73wchar_t *oldValue, wchar_t *newValue );74void HandlePropertySelectionChange( long vmID, PropertyChangeEvent event,75AccessibleContext ac );76void HandlePropertyTextChange( long vmID, PropertyChangeEvent event,77AccessibleContext ac );78void HandlePropertyCaretChange( long vmID, PropertyChangeEvent event,79AccessibleContext ac,80int oldPosition, int newPosition );81void HandlePropertyVisibleDataChange( long vmID, PropertyChangeEvent event,82AccessibleContext ac );83void HandlePropertyChildChange( long vmID, PropertyChangeEvent event,84AccessibleContext ac,85jobject oldChild, jobject newChild );86void HandlePropertyActiveDescendentChange(long vmID, PropertyChangeEvent event,87AccessibleContext ac,88jobject oldActiveDescendent,89jobject newActiveDescendent);9091void HandlePropertyTableModelChange( long vmID, PropertyChangeEvent event,92AccessibleContext ac,93wchar_t *oldValue, wchar_t *newValue );9495char *getAccessibleInfo( long vmID, AccessibleContext ac,96int x, int y, char *buffer, int bufsize );9798char *getTimeAndDate();99void displayAndLogText(char *buffer, ...);100101const char * const jaccessinspectorOptionsRegistryKey =102"Software\\JavaSoft\\Java Development Kit\\jaccessinspector";103BOOL SaveActiveEventOptionsToRegistry();104BOOL ReadActiveEventOptionsFromRegistry();105void ApplyEventOptions(HWND hWnd);106BOOL EnableDlgItem(HWND hDlg, int nIDDlgItem, BOOL bEnable);107void EnableMessageNavButtons();108void WINAPI AddToMessageHistory(const char * message);109BOOL UpdateMessageNumber();110INT_PTR CALLBACK GoToMessageDialogProc( HWND hDlg, UINT message, WPARAM wParam,111LPARAM lParam );112BOOL InitGoToMessageDialogBox(HANDLE hInstance);113BOOL ShouldCheckMonitorTheSameEventsAsJAWS();114void MaybeCheckMonitorTheSameEventsAsJAWS(HMENU menu);115BOOL ShouldCheckMonitorAllEvents();116void MaybeCheckMonitorAllEvents(HMENU menu);117118119