2002-03-10 00:29:33 +01:00
|
|
|
#
|
|
|
|
# Copyright 1999, 2000, 2001 Patrik Stridvall
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2002-03-10 00:29:33 +01:00
|
|
|
#
|
|
|
|
|
2001-08-22 20:09:15 +02:00
|
|
|
package winapi_module_user;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
|
|
|
|
require Exporter;
|
|
|
|
|
|
|
|
@ISA = qw(Exporter);
|
|
|
|
@EXPORT = qw();
|
|
|
|
@EXPORT_OK = qw(
|
2004-10-26 02:12:21 +02:00
|
|
|
is_user_function
|
|
|
|
get_message_result_type
|
|
|
|
get_message_result_kind
|
|
|
|
get_message_wparam_type
|
|
|
|
get_message_wparam_kind
|
|
|
|
get_message_lparam_type
|
|
|
|
get_message_lparam_kind
|
2001-08-22 20:09:15 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
use config qw($wine_dir);
|
|
|
|
use options qw($options);
|
|
|
|
use output qw($output);
|
|
|
|
|
|
|
|
use c_parser;
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
my $message;
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# is_user_function
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub is_user_function($) {
|
2001-08-22 20:09:15 +02:00
|
|
|
my $name = shift;
|
|
|
|
if($name =~ /^(?:DefWindowProc|SendMessage)[AW]?$/) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# $message
|
|
|
|
|
|
|
|
$message = {
|
|
|
|
WM_ACTIVATE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0006, result => "void", wparam => ["", ""], lparam => "HWND" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_ACTIVATEAPP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001c, result => "void", wparam => "BOOL", lparam => "DWORD" },
|
|
|
|
WM_ACTIVATESHELLWINDOW => {
|
|
|
|
id => 0x003e, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_ACTIVATETOPLEVEL => {
|
|
|
|
id => 0x036e, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_ALTTABACTIVE => {
|
|
|
|
id => 0x0029, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_APP => {
|
|
|
|
id => 0x8000, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_ASKCBFORMATNAME => {
|
|
|
|
id => 0x030c, result => "void", wparam => "int", lparam => "LPTSTR" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_BEGINDRAG => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x022c, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_CANCELMODE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001f, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_CANCELJOURNAL => {
|
|
|
|
id => 0x004b, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_CAPTURECHANGED => {
|
|
|
|
id => 0x0215, result => "void", wparam => "void", lparam => "HWND" },
|
|
|
|
WM_CHANGECBCHAIN => {
|
|
|
|
id => 0x030d, result => "void", wparam => "HWND", lparam => "HWND" },
|
|
|
|
WM_CHILDACTIVATE => {
|
|
|
|
id => 0x0022, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_CLEAR => {
|
|
|
|
id => 0x0303, result => "void", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_CHAR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0102, result => "void", wparam => "TCHAR", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_CHARTOITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002f, result => "int", wparam => ["UINT", "UINT"], lparam => "HWND" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_CLOSE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0010, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_COALESCE_FIRST => {
|
|
|
|
id => 0x0390, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_COALESCE_LAST => {
|
|
|
|
id => 0x039f, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_COMMAND => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0111, result => "void", wparam => ["UINT", "UINT"], lparam => "HWND" },
|
|
|
|
WM_COMMANDHELP => {
|
|
|
|
id => 0x0365, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_COMMNOTIFY => {
|
|
|
|
id => 0x0044, result => "void", wparam => "int", lparam => ["", ""] },
|
|
|
|
WM_CONTEXTMENU => {
|
|
|
|
id => 0x007b, result => "void", wparam => "HWND", lparam => ["UINT", "UINT"] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_COPY => {
|
|
|
|
id => 0x0301, result => "void", wparam => "void", lparam => "void" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_COPYDATA => {
|
|
|
|
id => 0x004a, result => "", wparam => "", lparam => "" },
|
2002-06-01 04:55:48 +02:00
|
|
|
WM_COMPACTING => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0041, result => "void", wparam => "UINT", lparam => "void" },
|
2002-06-01 04:55:48 +02:00
|
|
|
WM_COMPAREITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0039, result => "int", wparam => "UINT", lparam => "const COMPAREITEMSTRUCT *" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_CREATE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0001, result => "BOOL", wparam => "void", lparam => "LPCREATESTRUCT" },
|
|
|
|
WM_CTLCOLOR => {
|
|
|
|
id => 0x0019, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_CTLCOLORBTN => {
|
|
|
|
id => 0x0135, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLORDLG => {
|
|
|
|
id => 0x136, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLOREDIT => {
|
|
|
|
id => 0x133, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLORLISTBOX => {
|
|
|
|
id => 0x134, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLORMSGBOX => {
|
|
|
|
id => 0x132, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLORSCROLLBAR => {
|
|
|
|
id => 0x137, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CTLCOLORSTATIC => {
|
|
|
|
id => 0x138, result => "HBRUSH", wparam => "HDC", lparam => "HWND" },
|
|
|
|
WM_CUT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0300, result => "void", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_DDE_ACK => { # FIXME: Only correct if replying to WM_DDE_INITIATE
|
|
|
|
id => 0x03E4, result => "void", wparam => "HWND", lparam => ["ATOM", "ATOM"] },
|
|
|
|
WM_DDE_INITIATE => {
|
|
|
|
id => 0x03E0, result => "void", wparam => "HWND", lparam => ["ATOM", "ATOM"] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_DEADCHAR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0103, result => "void", wparam => "TCHAR", lparam => ["", ""] },
|
|
|
|
WM_DEVICECHANGE => {
|
|
|
|
id => 0x0219, result => "BOOL", wparam => "UINT", lparam => "DWORD" },
|
2002-06-01 04:55:48 +02:00
|
|
|
WM_DELETEITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002d, result => "void", wparam => "UINT", lparam => "const DELETEITEMSTRUCT *" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_DEVMODECHANGE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001b, result => "void", wparam => "void", lparam => "LPCTSTR" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_DESTROY => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0002, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_DESTROYCLIPBOARD => {
|
|
|
|
id => 0x0307, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_DISABLEMODAL => {
|
|
|
|
id => 0x036c, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_DISPLAYCHANGE => {
|
|
|
|
id => 0x007e, result => "void", wparam => "UINT", lparam => ["UINT", "UINT"] },
|
|
|
|
WM_DRAGLOOP => {
|
|
|
|
id => 0x022d, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_DRAGMOVE => {
|
|
|
|
id => 0x022f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_DRAGSELECT => {
|
|
|
|
id => 0x022e, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_DRAWCLIPBOARD => {
|
|
|
|
id => 0x0308, result => "void", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_DRAWITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002b, result => "void", wparam => "UINT", lparam => "const DRAWITEMSTRUCT *" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_DROPFILES => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0233, result => "void", wparam => "HDROP", lparam => "void" },
|
|
|
|
WM_DROPOBJECT => {
|
|
|
|
id => 0x022a, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_ENABLE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x000a, result => "void", wparam => "BOOL", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_ENDSESSION => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0016, result => "void", wparam => "BOOL", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_ENTERIDLE => {
|
|
|
|
id => 0x0121, result => "void", wparam => "UINT", lparam => "HWND" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_ENTERSIZEMOVE => {
|
|
|
|
id => 0x0231, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_ENTERMENULOOP => {
|
|
|
|
id => 0x0211, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_ERASEBKGND => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0014, result => "BOOL", wparam => "HDC", lparam => "void" },
|
|
|
|
WM_EXITHELPMODE => {
|
|
|
|
id => 0x0367, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_EXITMENULOOP => {
|
|
|
|
id => 0x0212, result => "", wparam => "", lparam => "" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_EXITSIZEMOVE => {
|
|
|
|
id => 0x0232, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_FILESYSCHANGE => {
|
|
|
|
id => 0x0034, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_FLOATSTATUS => {
|
|
|
|
id => 0x036d, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_FONTCHANGE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001d, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
|
|
|
|
WM_GETDLGCODE => {
|
|
|
|
id => 0x0087, result => "UINT", wparam => "WPARAM", lparam => "LPMSG" },
|
|
|
|
WM_GETFONT => {
|
|
|
|
id => 0x0031, result => "HFONT", wparam => "void", lparam => "void" },
|
|
|
|
WM_GETHOTKEY => {
|
|
|
|
id => 0x0033, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_GETICON => {
|
|
|
|
id => 0x007f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_GETMINMAXINFO => {
|
|
|
|
id => 0x0024, result => "void", wparam => "void", lparam => "LPMINMAXINFO" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_GETTEXT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x000d, result => "int", wparam => "int", lparam => "LPTSTR" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_GETTEXTLENGTH => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x000e, result => "int", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_HELP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0053, result => "void", wparam => "void", lparam => "LPHELPINFO" },
|
|
|
|
WM_HELPHITTEST => {
|
|
|
|
id => 0x0366, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_HOTKEY => {
|
|
|
|
id => 0x0312, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_HSCROLL => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0114, result => "void", wparam => ["int", "int"], lparam => "HWND" },
|
|
|
|
WM_HSCROLLCLIPBOARD => {
|
|
|
|
id => 0x030e, result => "void", wparam => "HWND", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_ICONERASEBKGND => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0027, result => "BOOL", wparam => "HDC", lparam => "void" },
|
|
|
|
WM_IME_CHAR => {
|
|
|
|
id => 0x0286, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_COMPOSITION => {
|
|
|
|
id => 0x010f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_COMPOSITIONFULL => {
|
|
|
|
id => 0x0284, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_CONTROL => {
|
|
|
|
id => 0x0283, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_ENDCOMPOSITION => {
|
|
|
|
id => 0x010e, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_KEYDOWN => {
|
|
|
|
id => 0x0290, result => "void", wparam => "UINT", lparam => ["int", "UINT"] },
|
|
|
|
WM_IME_KEYLAST => {
|
|
|
|
id => 0x010f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_KEYUP => {
|
|
|
|
id => 0x0291, result => "void", wparam => "UINT", lparam => ["int", "UINT"] },
|
|
|
|
WM_IME_NOTIFY => {
|
|
|
|
id => 0x0282, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_REQUEST => {
|
|
|
|
id => 0x0288, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_SELECT => {
|
|
|
|
id => 0x0285, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_SETCONTEXT => {
|
|
|
|
id => 0x0281, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IME_STARTCOMPOSITION => {
|
|
|
|
id => 0x010d, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_IDLEUPDATECMDUI => {
|
|
|
|
id => 0x0363, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_INITDIALOG => {
|
|
|
|
id => 0x0110, result => "BOOL", wparam => "HWND", lparam => "LPARAM" },
|
|
|
|
WM_INITIALUPDATE => {
|
|
|
|
id => 0x0364, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_INITMENU => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0116, result => "void", wparam => "HMENU", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_INITMENUPOPUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0117, result => "void", wparam => "HMENU", lparam => ["UINT", "BOOL"] },
|
|
|
|
WM_INPUTLANGCHANGE => {
|
|
|
|
id => 0x0051, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_INPUTLANGCHANGEREQUEST => {
|
|
|
|
id => 0x0050, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_ISACTIVEICON => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0035, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_KEYDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0100, result => "void", wparam => "UINT", lparam => ["int", "UINT"] },
|
|
|
|
WM_KEYLAST => {
|
|
|
|
id => 0x0108, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_KICKIDLE => {
|
|
|
|
id => 0x036a, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_KEYUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0101, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_KILLFOCUS => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0008, result => "void", wparam => "HWND", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_LBTRACKPOINT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0131, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_LBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0203, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_LBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0201, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_LBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0202, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_MBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0209, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0207, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0208, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_MDIACTIVATE => {
|
|
|
|
id => 0x0222, result => "void", wparam => "HWND", lparam => "HWND" },
|
|
|
|
WM_MDICASCADE => {
|
|
|
|
id => 0x0227, result => "BOOL", wparam => "UINT", lparam => "void" },
|
|
|
|
WM_MDICREATE => {
|
|
|
|
id => 0x0220, result => "HWND", wparam => "void", lparam => "const LPMDICREATESTRUCT" },
|
|
|
|
WM_MDIDESTROY => {
|
|
|
|
id => 0x0221, result => "void", wparam => "HWND", lparam => "void" },
|
|
|
|
WM_MDIGETACTIVE => {
|
|
|
|
id => 0x0229, result => "HWND", wparam => "void", lparam => "void" },
|
|
|
|
WM_MDIICONARRANGE => {
|
|
|
|
id => 0x0228, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_MDIMAXIMIZE => {
|
|
|
|
id => 0x0225, result => "void", wparam => "HWND", lparam => "void" },
|
|
|
|
WM_MDINEXT => {
|
|
|
|
id => 0x0224, result => "HWND", wparam => "HWND", lparam => "BOOL" },
|
|
|
|
WM_MDIREFRESHMENU => {
|
|
|
|
id => 0x0234, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_MDIRESTORE => {
|
|
|
|
id => 0x0223, result => "void", wparam => "HWND", lparam => "void" },
|
|
|
|
WM_MDISETMENU => {
|
|
|
|
id => 0x0230, result => "HMENU", wparam => "BOOL", lparam => "HMENU" },
|
|
|
|
WM_MDITILE => {
|
|
|
|
id => 0x0226, result => "BOOL", wparam => "UINT", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MEASUREITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002c, result => "void", wparam => "UINT", lparam => "MEASUREITEMSTRUCT *" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MENUSELECT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x011f, result => "void", wparam => ["", ""], lparam => "HMENU" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MENUCHAR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0120, result => "DWORD", wparam => ["", "WORD"], lparam => "HMENU" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MOUSEACTIVATE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0021, result => "int", wparam => "HWND", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MOUSEMOVE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0200, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_MOUSEWHEEL => {
|
|
|
|
id => 0x020a, result => "void", wparam => ["DWORD", "int"], lparam => ["UINT", "UINT"] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_MOVE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0003, result => "void", wparam => "void", lparam => ["", ""] },
|
|
|
|
WM_MOVING => {
|
|
|
|
id => 0x0216, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_NCACTIVATE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0086, result => "BOOL", wparam => "BOOL", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCLBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a3, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCLBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a1, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCLBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a2, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCMOUSEMOVE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a0, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCMBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a9, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCMBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a7, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCMBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a8, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCRBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a6, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCRBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a4, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCRBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x00a5, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCCALCSIZE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0083, result => "UINT", wparam => "void", lparam => "NCCALCSIZE_PARAMS *" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCCREATE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0081, result => "BOOL", wparam => "void", lparam => "LPCREATESTRUCT" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCDESTROY => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0082, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_NCHITTEST => {
|
|
|
|
id => 0x0084, result => "UINT", wparam => "void", lparam => ["int", "int"] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NCPAINT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0085, result => "void", wparam => "HRGN", lparam => "void" },
|
|
|
|
WM_NEXTDLGCTL => {
|
|
|
|
id => 0x0028, result => "HWND", wparam => "HWND", lparam => "BOOL" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NEXTMENU => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0213, result => "void", wparam => "UINT", lparam => "LPMDINEXTMENU" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_NOTIFY => {
|
|
|
|
id => 0x004e, result => "LRESULT", wparam => "int", lparam => "NMHDR *" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_NOTIFYFORMAT => {
|
|
|
|
id => 0x0055, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_NULL => {
|
|
|
|
id => 0x0000, result => "", wparam => "", lparam => "" },
|
|
|
|
|
|
|
|
WM_OCC_INITNEW => {
|
|
|
|
id => 0x0378, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OCC_LOADFROMSTORAGE => {
|
|
|
|
id => 0x0377, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OCC_LOADFROMSTORAGE_EX => {
|
|
|
|
id => 0x037b, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OCC_LOADFROMSTREAM => {
|
|
|
|
id => 0x0376, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OCC_LOADFROMSTREAM_EX => {
|
|
|
|
id => 0x037a, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OTHERWINDOWCREATED => {
|
|
|
|
id => 0x003c, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_OTHERWINDOWDESTROYED => {
|
|
|
|
id => 0x003d, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_PAINT => {
|
|
|
|
id => 0x000f, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_PAINTCLIPBOARD => {
|
|
|
|
id => 0x0309, result => "void", wparam => "HWND", lparam => "const LPPAINTSTRUCT" },
|
|
|
|
WM_PAINTICON => {
|
|
|
|
id => 0x0026, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_PALETTEISCHANGING => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0310, result => "void", wparam => "HWND", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_PALETTECHANGED => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0311, result => "void", wparam => "HWND", lparam => "void" },
|
|
|
|
WM_PARENTNOTIFY => {
|
|
|
|
id => 0x0210, result => "void", wparam => ["UINT", "int"], lparam => "HWND" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_PASTE => {
|
|
|
|
id => 0x0302, result => "void", wparam => "void", lparam => "void" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_PENWINFIRST => {
|
|
|
|
id => 0x0380, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_PENWINLAST => {
|
|
|
|
id => 0x038f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_POPMESSAGESTRING => {
|
|
|
|
id => 0x0375, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_POWER => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0048, result => "void", wparam => "int", lparam => "void" },
|
|
|
|
WM_POWERBROADCAST => {
|
|
|
|
id => 0x0218, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_PRINT => {
|
|
|
|
id => 0x0317, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_PRINTCLIENT => {
|
|
|
|
id => 0x0318, result => "void", wparam => "HDC", lparam => "DWORD" },
|
|
|
|
|
|
|
|
WM_QUERY3DCONTROLS => {
|
|
|
|
id => 0x036f, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_QUERYAFXWNDPROC => {
|
|
|
|
id => 0x0360, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_QUERYCENTERWND => {
|
|
|
|
id => 0x036b, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_QUERYDRAGICON => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0037, result => "HICON", wparam => "void", lparam => "void" },
|
|
|
|
WM_QUERYDROPOBJECT => {
|
|
|
|
id => 0x022b, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_QUERYENDSESSION => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0011, result => "BOOL", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_QUERYNEWPALETTE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x030f, result => "BOOL", wparam => "void", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_QUERYOPEN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0013, result => "BOOL", wparam => "void", lparam => "void" },
|
|
|
|
WM_QUERYPARKICON => {
|
|
|
|
id => 0x0036, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_QUERYSAVESTATE => {
|
|
|
|
id => 0x0038, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_QUEUESYNC => {
|
|
|
|
id => 0x0023, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_QUEUE_SENTINEL => {
|
|
|
|
id => 0x0379, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_QUIT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0012, result => "void", wparam => "int", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_RBUTTONDBLCLK => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0206, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_RBUTTONDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0204, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_RBUTTONUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0205, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_RECALCPARENT => {
|
|
|
|
id => 0x0368, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_RENDERALLFORMATS => {
|
|
|
|
id => 0x0306, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_RENDERFORMAT => {
|
|
|
|
id => 0x0305, result => "HANDLE", wparam => "UINT", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_SETCURSOR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0020, result => "BOOL", wparam => "HWND", lparam => ["UINT", "UINT"] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SETFOCUS => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0007, result => "void", wparam => "HWND", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SETFONT => {
|
|
|
|
id => 0x0030, result => "void", wparam => "HFONT", lparam => "BOOL" },
|
2001-09-11 01:16:05 +02:00
|
|
|
WM_SETHOTKEY => {
|
|
|
|
id => 0x0032, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SETICON => {
|
|
|
|
id => 0x0080, result => "HICON", wparam => "DWORD", lparam => "HICON" },
|
|
|
|
WM_SETMESSAGESTRING => {
|
|
|
|
id => 0x0362, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SETREDRAW => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x000b, result => "void", wparam => "BOOL", lparam => "void" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SETTEXT => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x000c, result => "void", wparam => "void", lparam => "LPCTSTR" },
|
|
|
|
WM_SETVISIBLE => {
|
|
|
|
id => 0x0009, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SHOWWINDOW => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0018, result => "void", wparam => "BOOL", lparam => "UINT" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SIZE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0005, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_SIZECHILD => {
|
|
|
|
id => 0x0369, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SIZECLIPBOARD => {
|
|
|
|
id => 0x030b, result => "void", wparam => "HWND", lparam => "const LPRECT" },
|
|
|
|
WM_SIZEPARENT => {
|
|
|
|
id => 0x0361, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SIZEWAIT => {
|
|
|
|
id => 0x0004, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SIZING => {
|
|
|
|
id => 0x0214, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SOCKET_DEAD => {
|
|
|
|
id => 0x0374, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SOCKET_NOTIFY => {
|
|
|
|
id => 0x0373, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SPOOLERSTATUS => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002a, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_STYLECHANGED => {
|
|
|
|
id => 0x007d, result => "void", wparam => "DWORD", lparam => "LPSTYLESTRUCT" },
|
|
|
|
WM_STYLECHANGING => {
|
|
|
|
id => 0x007c, result => "void", wparam => "DWORD", lparam => "LPSTYLESTRUCT" },
|
|
|
|
WM_SYNCPAINT => {
|
|
|
|
id => 0x0088, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SYNCTASK => {
|
|
|
|
id => 0x0089, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SYSCHAR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0106, result => "void", wparam => "TCHAR", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SYSCOLORCHANGE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0015, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_SYSCOMMAND => {
|
|
|
|
id => 0x0112, result => "void", wparam => "UINT", lparam => "int" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SYSDEADCHAR => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0107, result => "void", wparam => "TCHAR", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SYSKEYDOWN => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0104, result => "void", wparam => "UINT", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_SYSKEYUP => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0105, result => "void", wparam => "UINT", lparam => ["", ""] },
|
|
|
|
WM_SYSTEMERROR => {
|
|
|
|
id => 0x0017, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_SYSTIMER => {
|
|
|
|
id => 0x0118, result => "", wparam => "", lparam => "" },
|
|
|
|
|
|
|
|
WM_TCARD => {
|
|
|
|
id => 0x0052, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_TESTING => {
|
|
|
|
id => 0x003a, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_TIMECHANGE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001e, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_TIMER => {
|
|
|
|
id => 0x0113, result => "void", wparam => "UINT", lparam => "void" },
|
|
|
|
|
|
|
|
WM_UNDO => {
|
|
|
|
id => 0x0304, result => "void", wparam => "void", lparam => "void" },
|
|
|
|
WM_USER => {
|
|
|
|
id => 0x0400, result => "", wparam => "", lparam => "" },
|
|
|
|
WM_USERCHANGED => {
|
|
|
|
id => 0x0054, result => "", wparam => "", lparam => "" },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_VKEYTOITEM => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x002e, result => "int", wparam => ["UINT", "int"], lparam => "HWND" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_VSCROLL => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0115, result => "void", wparam => ["int", "int"], lparam => "HWND" },
|
|
|
|
WM_VSCROLLCLIPBOARD => {
|
|
|
|
id => 0x030a, result => "void", wparam => "HWND", lparam => ["", ""] },
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
WM_WINDOWPOSCHANGING => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0046, result => "BOOL", wparam => "void", lparam => "LPWINDOWPOS" },
|
2001-08-22 20:09:15 +02:00
|
|
|
WM_WINDOWPOSCHANGED => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x0047, result => "void", wparam => "void", lparam => "const LPWINDOWPOS" },
|
2002-06-01 04:55:48 +02:00
|
|
|
WM_WININICHANGE => {
|
2001-09-11 01:16:05 +02:00
|
|
|
id => 0x001a, result => "void", wparam => "void", lparam => "LPCTSTR" }
|
2001-08-22 20:09:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# _get_kind
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub _get_kind($) {
|
2001-08-22 20:09:15 +02:00
|
|
|
local $_ = shift;
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
if(!$_) {
|
2001-08-22 20:09:15 +02:00
|
|
|
return undef;
|
|
|
|
} elsif(/^(?:HBRUSH|HDC|HFONT|HMENU|HRGN|HWND)$/ || /\*$/ ||
|
|
|
|
/^LP(?!ARAM)/)
|
|
|
|
{
|
|
|
|
return "ptr";
|
|
|
|
} else {
|
|
|
|
return "long";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_result_type
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_result_type($) {
|
2001-08-22 20:09:15 +02:00
|
|
|
my $name = shift;
|
|
|
|
return $$message{$name}{result};
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_result_kind
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_result_kind(@) {
|
2001-08-22 20:09:15 +02:00
|
|
|
return _get_kind(get_message_result_type(@_));
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_wparam_type
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_wparam_type($) {
|
2001-08-22 20:09:15 +02:00
|
|
|
my $name = shift;
|
|
|
|
return $$message{$name}{wparam};
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_wparam_kind
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_wparam_kind(@) {
|
2001-08-22 20:09:15 +02:00
|
|
|
return _get_kind(get_message_wparam_type(@_));
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_lparam_type
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_lparam_type($) {
|
2001-08-22 20:09:15 +02:00
|
|
|
my $name = shift;
|
|
|
|
return $$message{$name}{lparam};
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# get_message_lparam_kind
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub get_message_lparam_kind(@) {
|
2001-08-22 20:09:15 +02:00
|
|
|
return _get_kind(get_message_lparam_type(@_));
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
2001-09-11 01:16:05 +02:00
|
|
|
# _parse_file
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub _parse_file($$$) {
|
2001-09-11 01:16:05 +02:00
|
|
|
my $file = shift;
|
|
|
|
my $found_preprocessor = shift;
|
|
|
|
my $found_comment = shift;
|
2001-08-22 20:09:15 +02:00
|
|
|
|
|
|
|
{
|
2006-08-08 12:19:31 +02:00
|
|
|
open(IN, "< $file") || die "Error: Can't open $file: $!\n";
|
2001-08-22 20:09:15 +02:00
|
|
|
local $/ = undef;
|
|
|
|
$_ = <IN>;
|
|
|
|
close(IN);
|
|
|
|
}
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
my @lines = split(/\n/, $_);
|
|
|
|
my $max_line = scalar(@lines);
|
|
|
|
|
2001-08-22 20:09:15 +02:00
|
|
|
my $parser = new c_parser($file);
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
$parser->set_found_preprocessor_callback($found_preprocessor);
|
|
|
|
$parser->set_found_comment_callback($found_comment);
|
|
|
|
|
|
|
|
my $found_line = sub {
|
|
|
|
my $line = shift;
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
$output->progress("$file: line $line of $max_line");
|
|
|
|
};
|
|
|
|
|
|
|
|
$parser->set_found_line_callback($found_line);
|
|
|
|
|
|
|
|
my $line = 1;
|
|
|
|
my $column = 0;
|
|
|
|
|
|
|
|
my $old_prefix = $output->prefix;
|
|
|
|
$output->progress("$file");
|
|
|
|
$output->prefix("$file: ");
|
|
|
|
|
|
|
|
if(!$parser->parse_c_file(\$_, \$line, \$column)) {
|
|
|
|
$output->write("can't parse file\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
$output->prefix($old_prefix);
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# _get_tuple_arguments
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub _get_tuple_arguments($) {
|
2001-09-11 01:16:05 +02:00
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
my $parser = new c_parser;
|
|
|
|
|
|
|
|
my $line = 1;
|
|
|
|
my $column = 0;
|
|
|
|
|
|
|
|
my @arguments;
|
|
|
|
my @argument_lines;
|
|
|
|
my @argument_columns;
|
|
|
|
if(!$parser->parse_c_tuple(\$_, \$line, \$column, \@arguments, \@argument_lines, \@argument_columns)) {
|
|
|
|
return undef;
|
|
|
|
}
|
|
|
|
|
|
|
|
return @arguments;
|
|
|
|
}
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# _parse_windowsx_h
|
|
|
|
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub _parse_windowsx_h($$$) {
|
2001-09-11 01:16:05 +02:00
|
|
|
my $last_comment;
|
|
|
|
|
2001-08-22 20:09:15 +02:00
|
|
|
my $found_preprocessor = sub {
|
|
|
|
my $begin_line = shift;
|
|
|
|
my $begin_column = shift;
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(!s/^\#\s*define\s*// || !/^FORWARD_WM_/) {
|
|
|
|
return 1;
|
|
|
|
}
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
my $name;
|
2001-08-22 20:09:15 +02:00
|
|
|
if(s/^FORWARD_(\w+)\([^\)]*\)\s*(.*?)\s*$/$2/s) {
|
2001-09-11 01:16:05 +02:00
|
|
|
$name = $1;
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
if($name eq "WM_SYSTEMERROR") {
|
2001-08-22 20:09:15 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
my $result;
|
|
|
|
if(s/^\(\s*(\w+)\s*\)(?:\(\s*\w+\s*\))*\(\s*\w+\s*\)//) {
|
|
|
|
$result = $1;
|
2001-08-22 20:09:15 +02:00
|
|
|
} else {
|
2001-09-11 01:16:05 +02:00
|
|
|
die "$name: '$_'";
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
2001-09-11 01:16:05 +02:00
|
|
|
|
|
|
|
(undef, $_, my $wparam, my $lparam) = _get_tuple_arguments($_);
|
|
|
|
|
|
|
|
my @names = ();
|
|
|
|
if(/^$name$/) {
|
|
|
|
@names = $name;
|
|
|
|
} elsif(/^\(\w+\)\s*\?\s*(\w+)\s*:\s*(\w+)$/) {
|
|
|
|
@names = ($1, $2);
|
2001-08-22 20:09:15 +02:00
|
|
|
} else {
|
2001-09-11 01:16:05 +02:00
|
|
|
die "$name: '$_'";
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
2001-09-11 01:16:05 +02:00
|
|
|
|
|
|
|
local $_ = $last_comment;
|
|
|
|
s%^/\*\s*(.*?)\s*\*/$%$1%;
|
|
|
|
|
|
|
|
my %arguments;
|
|
|
|
if(s/^(\w+)\s+\w+\s*\(\s*(.*?)\s*\)$/$2/) {
|
|
|
|
my $result2 = $1;
|
|
|
|
if($result2 eq "INT") { $result2 = "int"; }
|
|
|
|
if($result ne $result2) {
|
|
|
|
$output->write("message $name: result type mismatch '$result' != '$result2'\n");
|
|
|
|
}
|
|
|
|
foreach (split(/\s*,\s*/)) {
|
2005-09-06 11:23:46 +02:00
|
|
|
if(/^((?:const\s+|volatile\s+)?\w+(?:\s*\*\s*|\s+)?)(\w+)$/) {
|
2001-09-11 01:16:05 +02:00
|
|
|
my $type = $1;
|
|
|
|
my $name = $2;
|
|
|
|
|
|
|
|
$type =~ s/^\s*(.*?)\s*$/$1/;
|
|
|
|
|
|
|
|
$arguments{$name} = $type;
|
|
|
|
} else {
|
|
|
|
die "$name: '$_'";
|
|
|
|
}
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
2002-06-01 04:55:48 +02:00
|
|
|
# $output->write("$1: $_\n");
|
2001-08-22 20:09:15 +02:00
|
|
|
} else {
|
2001-09-11 01:16:05 +02:00
|
|
|
die "$name: '$_'";
|
|
|
|
}
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
my $find_inner_cast = sub {
|
|
|
|
local $_ = shift;
|
2005-09-06 11:23:46 +02:00
|
|
|
if(/^(?:\(\s*((?:const\s+|volatile\s+)?\w+(?:\s*\*)?)\s*\))*\(.*?\)$/) {
|
2001-09-11 01:16:05 +02:00
|
|
|
if(defined($1)) {
|
|
|
|
return $1;
|
|
|
|
} else {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
my @entries = (
|
|
|
|
[ \$wparam, "W", "w" ],
|
|
|
|
[ \$lparam, "L", "l" ]
|
|
|
|
);
|
|
|
|
foreach my $entry (@entries) {
|
|
|
|
(my $refparam, my $upper, my $lower) = @$entry;
|
|
|
|
|
|
|
|
local $_ = $$refparam;
|
2005-09-06 11:23:46 +02:00
|
|
|
if(s/^\(\s*$upper(?:)PARAM\s*\)\s*(?:\(\s*((?:const\s+|volatile\s+)?\w+(?:\s*\*)?)\s*\))*\(\s*(.*?)\s*\)$/$2/) {
|
2001-09-11 01:16:05 +02:00
|
|
|
if(defined($1)) {
|
|
|
|
$$refparam = $1;
|
|
|
|
} else {
|
|
|
|
$$refparam = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
if(/^\w+$/) {
|
|
|
|
if(exists($arguments{$_})) {
|
|
|
|
$$refparam = $arguments{$_};
|
|
|
|
}
|
|
|
|
} elsif(/^\(\s*(\w+)\s*\)\s*\?\s*\(\s*(\w+)\s*\)\s*:\s*(?:\(\s*(\w+)\s*\)|0)$/) {
|
|
|
|
foreach ($1, $2, $3) {
|
|
|
|
if(exists($arguments{$_})) {
|
|
|
|
$$refparam = $arguments{$_};
|
|
|
|
last;
|
|
|
|
}
|
|
|
|
}
|
2005-09-06 11:23:46 +02:00
|
|
|
} elsif(/^\(\((?:const\s+|volatile\s+)?\w+\s*(?:\*\s*)?\)\s*(?:\(\s*\w+\s*\)|\w+)\s*\)\s*\->\s*\w+$/) {
|
2001-09-11 01:16:05 +02:00
|
|
|
$$refparam = "UINT";
|
|
|
|
} else {
|
|
|
|
die "$name: '$_'";
|
|
|
|
}
|
|
|
|
} elsif(s/^(?:\(\s*$upper(?:)PARAM\s*\)\s*)?MAKE$upper(?:)PARAM\s*//) {
|
|
|
|
(my $low, my $high) = _get_tuple_arguments($_);
|
|
|
|
|
|
|
|
$low = &$find_inner_cast($low);
|
|
|
|
$high = &$find_inner_cast($high);
|
|
|
|
|
|
|
|
$$refparam = "($low,$high)";
|
|
|
|
} elsif(s/^\(.*?$lower(?:)Param.*?\)$//) {
|
|
|
|
$$refparam = $upper . "PARAM";
|
|
|
|
} elsif(s/^\(\s*(.*?)\s*\)$//) {
|
|
|
|
$$refparam = "$1";
|
|
|
|
} elsif(s/^0L$//) {
|
|
|
|
$$refparam = "void";
|
2001-08-22 20:09:15 +02:00
|
|
|
} else {
|
2001-09-11 01:16:05 +02:00
|
|
|
die "$name: '$_'";
|
|
|
|
}
|
2002-06-01 04:55:48 +02:00
|
|
|
}
|
2001-09-11 01:16:05 +02:00
|
|
|
|
|
|
|
# $output->write("$result: '@names', '$wparam', '$lparam'\n");
|
|
|
|
|
|
|
|
foreach my $name (@names) {
|
|
|
|
my $result2 = $$message{$name}{result};
|
|
|
|
my $wparam2 = $$message{$name}{wparam};
|
|
|
|
my $lparam2 = $$message{$name}{lparam};
|
|
|
|
|
|
|
|
if(ref($wparam2)) {
|
|
|
|
$wparam2 = "(" . join(",", @$wparam2) . ")";
|
|
|
|
}
|
|
|
|
|
|
|
|
if(ref($lparam2)) {
|
|
|
|
$lparam2 = "(" . join(",", @$lparam2) . ")";
|
|
|
|
}
|
|
|
|
|
|
|
|
if($result ne $result2) {
|
|
|
|
$output->write("message $name: wrong result type '$result2' should be '$result'\n");
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
if($wparam ne $wparam2) {
|
|
|
|
# if($wparam ne "WPARAM" && $wparam ne "(,)") {
|
|
|
|
$output->write("message $name: wrong wparam type '$wparam2' should be '$wparam'\n");
|
|
|
|
# }
|
|
|
|
}
|
|
|
|
|
|
|
|
if($lparam ne $lparam2) {
|
|
|
|
# if($lparam ne "LPARAM" && $lparam ne "(,)") {
|
|
|
|
$output->write("message $name: wrong lparam type '$lparam2' should be '$lparam'\n");
|
|
|
|
# }
|
|
|
|
}
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
my $found_comment = sub {
|
|
|
|
my $begin_line = shift;
|
|
|
|
my $begin_column = shift;
|
|
|
|
my $comment = shift;
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
$last_comment = $comment;
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
return 1;
|
|
|
|
};
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
_parse_file("$wine_dir/include/windowsx.h", $found_preprocessor, $found_comment);
|
|
|
|
}
|
2001-08-22 20:09:15 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
|
|
|
|
########################################################################
|
|
|
|
# _parse_winuser_h
|
|
|
|
|
2004-10-26 02:12:21 +02:00
|
|
|
sub _parse_winuser_h($$$) {
|
2001-09-11 01:16:05 +02:00
|
|
|
my %not_found = ();
|
|
|
|
|
|
|
|
my $found_preprocessor = sub {
|
|
|
|
my $begin_line = shift;
|
|
|
|
my $begin_column = shift;
|
|
|
|
local $_ = shift;
|
|
|
|
|
|
|
|
if(/^\#\s*define\s+(WM_\w+)\s+(0x[0-9a-fA-F]+)\s*$/) {
|
|
|
|
my $name = $1;
|
|
|
|
my $id = lc($2);
|
2002-06-01 04:55:48 +02:00
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
if(exists($$message{$name})) {
|
|
|
|
my $id2 = sprintf("0x%04x", $$message{$name}{id});
|
|
|
|
if($id ne $id2) {
|
|
|
|
$output->write("message $name: wrong value ($id2) should be $id\n");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$output->write("message $name: exists but is not supported\n");
|
|
|
|
$not_found{$name} = $id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
_parse_file("$wine_dir/include/winuser.h", $found_preprocessor);
|
|
|
|
|
|
|
|
foreach my $name (sort(keys(%not_found))) {
|
|
|
|
my $id = $not_found{$name};
|
|
|
|
|
|
|
|
print " $name => {\n";
|
|
|
|
print "\tid => $id, result => \"\", wparam => \"\", lparam => \"\" },\n";
|
|
|
|
}
|
2001-08-22 20:09:15 +02:00
|
|
|
}
|
|
|
|
|
2001-09-11 01:16:05 +02:00
|
|
|
# _parse_windowsx_h;
|
|
|
|
# _parse_winuser_h;
|
|
|
|
|
|
|
|
1;
|