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
  23  * questions.
  24  */
  25 
  26 #ifndef AWTMSG_H
  27 #define AWTMSG_H
  28 
  29 #include <awt.h>
  30 
  31 extern const UINT SYSCOMMAND_IMM;
  32 
  33 /*
  34  * #defines for MouseWheel support
  35  *
  36  * Most of this is defined in winuser.h, however
  37  * it is enclosed by #ifdefs that aren't true
  38  * for all windows platforms.  To ensure that
  39  * necessary #defines are always available,
  40  * they're defined here as necessary.
  41  * See winuser.h for details.
  42  */
  43 
  44 #ifndef WM_DPICHANGED
  45 #define WM_DPICHANGED                   0x02E0
  46 #endif //WM_DPICHANGED
  47 
  48 #ifndef WM_MOUSEWHEEL
  49 #define WM_MOUSEWHEEL                   0x020A
  50 #endif //WM_MOUSEWHEEL
  51 
  52 #ifndef WM_MOUSEHWHEEL
  53 #define WM_MOUSEHWHEEL                  0x020E
  54 #endif //WM_MOUSEHWHEEL
  55 
  56 #ifndef WHEEL_DELTA
  57 #define WHEEL_DELTA                     120
  58 #endif //WHEEL_DELTA
  59 
  60 #ifndef WHEEL_PAGESCROLL
  61 #define WHEEL_PAGESCROLL                (UINT_MAX)
  62 #endif //WHEEL_PAGESCROLL
  63 
  64 #ifndef SPI_GETWHEELSCROLLLINES
  65 #define SPI_GETWHEELSCROLLLINES         0x0068
  66 #endif //SPI_GETWHEELSCROLLLINES
  67 
  68 #ifndef SPI_GETWHEELSCROLLCHARS
  69 #define SPI_GETWHEELSCROLLCHARS         0x006C
  70 #endif //SPI_GETWHEELSCROLLCHARS
  71 
  72 #ifndef SM_MOUSEWHEELPRESENT
  73 #define SM_MOUSEWHEELPRESENT            75
  74 #endif //SM_MOUSEWHEELPRESENT
  75 
  76 #ifndef COLOR_HOTLIGHT
  77 #define COLOR_HOTLIGHT                  26
  78 #endif //COLOR_HOTLIGHT
  79 
  80 #ifndef COLOR_GRADIENTACTIVECAPTION
  81 #define COLOR_GRADIENTACTIVECAPTION     27
  82 #endif //COLOR_GRADIENTACTIVECAPTION
  83 
  84 #ifndef COLOR_GRADIENTINACTIVECAPTION
  85 #define COLOR_GRADIENTINACTIVECAPTION   28
  86 #endif //COLOR_GRADIENTINACTIVECAPTION
  87 
  88 #ifndef SPI_GETACTIVEWINDOWTRACKING
  89 #define SPI_GETACTIVEWINDOWTRACKING     0x1000
  90 #endif //SPI_GETACTIVEWINDOWTRACKING
  91 
  92 #ifndef SPI_GETMENUANIMATION
  93 #define SPI_GETMENUANIMATION            0x1002
  94 #endif //SPI_GETMENUANIMATION
  95 
  96 #ifndef SPI_GETCOMBOBOXANIMATION
  97 #define SPI_GETCOMBOBOXANIMATION        0x1004
  98 #endif //SPI_GETCOMBOBOXANIMATION
  99 
 100 #ifndef SPI_GETLISTBOXSMOOTHSCROLLING
 101 #define SPI_GETLISTBOXSMOOTHSCROLLING   0x1006
 102 #endif //SPI_GETLISTBOXSMOOTHSCROLLING
 103 
 104 #ifndef SPI_GETGRADIENTCAPTIONS
 105 #define SPI_GETGRADIENTCAPTIONS         0x1008
 106 #endif //SPI_GETGRADIENTCAPTIONS
 107 
 108 #ifndef SPI_GETKEYBOARDCUES
 109 #define SPI_GETKEYBOARDCUES             0x100A
 110 #endif //SPI_GETKEYBOARDCUES
 111 
 112 #ifndef SPI_GETACTIVEWNDTRKZORDER
 113 #define SPI_GETACTIVEWNDTRKZORDER       0x100C
 114 #endif //SPI_GETACTIVEWNDTRKZORDER
 115 
 116 #ifndef SPI_GETHOTTRACKING
 117 #define SPI_GETHOTTRACKING              0x100E
 118 #endif //SPI_GETHOTTRACKING
 119 
 120 #ifndef SPI_GETMENUFADE
 121 #define SPI_GETMENUFADE                 0x1012
 122 #endif //SPI_GETMENUFADE
 123 
 124 #ifndef SPI_GETSELECTIONFADE
 125 #define SPI_GETSELECTIONFADE            0x1014
 126 #endif //SPI_GETSELECTIONFADE
 127 
 128 #ifndef SPI_GETTOOLTIPANIMATION
 129 #define SPI_GETTOOLTIPANIMATION         0x1016
 130 #endif //SPI_GETTOOLTIPANIMATION
 131 
 132 #ifndef SPI_GETTOOLTIPFADE
 133 #define SPI_GETTOOLTIPFADE              0x1018
 134 #endif //SPI_GETTOOLTIPFADE
 135 
 136 #ifndef SPI_GETFOREGROUNDLOCKTIMEOUT
 137 #define SPI_GETFOREGROUNDLOCKTIMEOUT    0x2000
 138 #endif //SPI_GETFOREGROUNDLOCKTIMEOUT
 139 
 140 #ifndef SPI_GETACTIVEWNDTRKTIMEOUT
 141 #define SPI_GETACTIVEWNDTRKTIMEOUT      0x2002
 142 #endif //SPI_GETACTIVEWNDTRKTIMEOUT
 143 
 144 #ifndef SPI_GETFOREGROUNDFLASHCOUNT
 145 #define SPI_GETFOREGROUNDFLASHCOUNT     0x2004
 146 #endif //SPI_GETFOREGROUNDFLASHCOUNT
 147 
 148 #ifndef SPI_GETFONTSMOOTHINGTYPE
 149 #define SPI_GETFONTSMOOTHINGTYPE        0x200A
 150 #endif //SPI_GETFONTSMOOTHINGTYPE
 151 
 152 #ifndef SPI_GETFONTSMOOTHINGCONTRAST
 153 #define SPI_GETFONTSMOOTHINGCONTRAST    0x200C
 154 #endif //SPI_GETFONTSMOOTHINGCONTRAST
 155 
 156 
 157 //
 158 // Flags for AnimateWindow
 159 //
 160 #ifndef AW_HOR_POSITIVE
 161 #define AW_HOR_POSITIVE             0x00000001
 162 #endif //AW_HOR_POSITIVE
 163 
 164 #ifndef AW_HOR_NEGATIVE
 165 #define AW_HOR_NEGATIVE             0x00000002
 166 #endif //AW_HOR_NEGATIVE
 167 
 168 #ifndef AW_VER_POSITIVE
 169 #define AW_VER_POSITIVE             0x00000004
 170 #endif //AW_VER_POSITIVE
 171 
 172 #ifndef AW_VER_NEGATIVE
 173 #define AW_VER_NEGATIVE             0x00000008
 174 #endif //AW_VER_NEGATIVE
 175 
 176 #ifndef AW_CENTER
 177 #define AW_CENTER                   0x00000010
 178 #endif //AW_CENTER
 179 
 180 #ifndef AW_HIDE
 181 #define AW_HIDE                     0x00010000
 182 #endif //AW_HIDE
 183 
 184 #ifndef AW_ACTIVATE
 185 #define AW_ACTIVATE                 0x00020000
 186 #endif //AW_ACTIVATE
 187 
 188 #ifndef AW_SLIDE
 189 #define AW_SLIDE                    0x00040000
 190 #endif //AW_SLIDE
 191 
 192 #ifndef AW_BLEND
 193 #define AW_BLEND                    0x00080000
 194 #endif //AW_BLEND
 195 
 196 
 197 // AwtComponent messages
 198 enum {
 199     // 6427323: unfortunately WM_APP+nnn conflicts with edit control messages
 200     // on XP with IME support, so we're shifting our messages
 201     // to some random value just to avoid the conflict
 202     WM_AWT_COMPONENT_CREATE = WM_APP+0x1800,
 203     WM_AWT_DESTROY_WINDOW,
 204     WM_AWT_MOUSEENTER,
 205     WM_AWT_MOUSEEXIT,
 206     WM_AWT_COMPONENT_SHOW,
 207     WM_AWT_COMPONENT_HIDE,
 208     WM_AWT_COMPONENT_SETFOCUS,
 209     WM_AWT_WINDOW_SETACTIVE,
 210     WM_AWT_LIST_SETMULTISELECT,
 211     WM_AWT_HANDLE_EVENT,
 212     WM_AWT_PRINT_COMPONENT,
 213     WM_AWT_RESHAPE_COMPONENT,
 214     WM_AWT_SETALWAYSONTOP,
 215     WM_AWT_BEGIN_VALIDATE,
 216     WM_AWT_END_VALIDATE,
 217     WM_AWT_FORWARD_CHAR,
 218     WM_AWT_FORWARD_BYTE,
 219     WM_AWT_SET_SCROLL_INFO,
 220     WM_AWT_CREATECONTEXT,
 221     WM_AWT_DESTROYCONTEXT,
 222     WM_AWT_ASSOCIATECONTEXT,
 223     WM_AWT_GET_DEFAULT_IME_HANDLER,
 224     WM_AWT_HANDLE_NATIVE_IME_EVENT,
 225     WM_AWT_PRE_KEYDOWN,
 226     WM_AWT_PRE_KEYUP,
 227     WM_AWT_PRE_SYSKEYDOWN,
 228     WM_AWT_PRE_SYSKEYUP,
 229 
 230     /* deleted DND mesg's */
 231 
 232     WM_AWT_ENDCOMPOSITION,
 233     WM_AWT_DISPOSE,
 234     WM_AWT_DISPOSEPDATA,
 235     WM_AWT_DELETEOBJECT,
 236     WM_AWT_SETCONVERSIONSTATUS,
 237     WM_AWT_GETCONVERSIONSTATUS,
 238     WM_AWT_SETOPENSTATUS,
 239     WM_AWT_GETOPENSTATUS,
 240     WM_AWT_ACTIVATEKEYBOARDLAYOUT,
 241     WM_AWT_OPENCANDIDATEWINDOW,
 242     WM_AWT_DLG_SHOWMODAL,
 243     WM_AWT_DLG_ENDMODAL,
 244     WM_AWT_SETCURSOR,
 245     WM_AWT_WAIT_FOR_SINGLE_OBJECT,
 246     WM_AWT_INVOKE_METHOD,
 247     WM_AWT_INVOKE_VOID_METHOD,
 248     WM_AWT_EXECUTE_SYNC,
 249     WM_AWT_OBJECTLISTCLEANUP,
 250 
 251     WM_AWT_CURSOR_SYNC,
 252     WM_AWT_GETDC,
 253     WM_AWT_RELEASEDC,
 254     WM_AWT_RELEASE_ALL_DCS,
 255     WM_AWT_SHOWCURSOR,
 256     WM_AWT_HIDECURSOR,
 257     WM_AWT_CREATE_PRINTED_PIXELS,
 258 
 259     // Tray messages
 260     WM_AWT_TRAY_NOTIFY,
 261 
 262     WM_SYNC_WAIT
 263 };
 264 
 265 #ifndef WM_UNDOCUMENTED_CLICKMENUBAR
 266 #define WM_UNDOCUMENTED_CLICKMENUBAR 0x0313
 267 #endif
 268 
 269 #ifndef WM_UNDOCUMENTED_CLIENTSHUTDOWN
 270 #define WM_UNDOCUMENTED_CLIENTSHUTDOWN 0x003b
 271 #endif
 272 
 273 #endif  // AWTMSG_H