ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
395 discussions
Start a n
N
ew thread
[dreimer] 33149: Add alternative German "de-ergo/eMeier 0.1", "NEO 1.1" and "Ristome" Layouts. If you have a modified Keyboard lying around, have fun writing.
by dreimer@svn.reactos.org
Author: dreimer Date: Sat Apr 26 07:30:46 2008 New Revision: 33149 URL:
http://svn.reactos.org/svn/reactos?rev=33149&view=rev
Log: Add alternative German "de-ergo/eMeier 0.1", "NEO 1.1" and "Ristome" Layouts. If you have a modified Keyboard lying around, have fun writing. Added: trunk/reactos/dll/keyboard/kbdgerg/ (with props) trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.c (with props) trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.def (with props) trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild (with props) trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rc (with props) trunk/reactos/dll/keyboard/kbdgneo/ (with props) trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.c (with props) trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.def (with props) trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild (with props) trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rc (with props) trunk/reactos/dll/keyboard/kbdgrist/ (with props) trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.c (with props) trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.def (with props) trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild (with props) trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rc (with props) Modified: trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/boot/bootdata/txtsetup.sif trunk/reactos/dll/keyboard/keyboard.rbuild Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -46,6 +46,12 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00030402","Layout Text",0x00000000,"Bulgarian phonetic BDS 5237-2006 " HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout File",0x00000000,"kbdda.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000406","Layout Text",0x00000000,"Danish" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0020407","Layout File",0x00000000,"kbdgerg.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0020407","Layout Text",0x00000000,"German (de_ergo)" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0010407","Layout File",0x00000000,"kbdgneo.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0010407","Layout Text",0x00000000,"German (NEO-1.1)" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0000407","Layout File",0x00000000,"kbdgrist.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0000407","Layout Text",0x00000000,"German (RISTOME)" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout File",0x00000000,"kbdgr.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000407","Layout Text",0x00000000,"German" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000807","Layout File",0x00000000,"kbdsg.dll" Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -150,6 +150,9 @@ dll\keyboard\kbdes\kbdes.dll 1 dll\keyboard\kbdfi\kbdfi.dll 1 dll\keyboard\kbdfr\kbdfr.dll 1 +dll\keyboard\kbdgerg\kbdgerg.dll 1 +dll\keyboard\kbdgneo\kbdgneo.dll 1 +dll\keyboard\kbdgrist\kbdgrist.dll 1 dll\keyboard\kbdgr\kbdgr.dll 1 dll\keyboard\kbdhe\kbdhe.dll 1 dll\keyboard\kbdheb\kbdheb.dll 1 Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -146,6 +146,9 @@ 0000080C = "French (Belgium)" 0000040C = "French (France)" 00000407 = "German (Germany)" +a0020407 = "German (de_ergo)" +a0010407 = "German (NEO-1.1)" +a0000407 = "German (Ristome)" 00000807 = "German (Swiss)" 00000408 = "Greek" 00010408 = "Greek 220" @@ -182,6 +185,9 @@ 0000040A = kbdes.dll 0000040B = kbdfi.dll 0000040C = kbdfr.dll +a0020407 = kbdgerg.dll +a0010407 = kbdgneo.dll +a0000407 = kbdgrist.dll 00000407 = kbdgr.dll 00000408 = kbdhe.dll 00010408 = kbdhe.dll Propchange: trunk/reactos/dll/keyboard/kbdgerg/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sat Apr 26 07:30:46 2008 @@ -1,0 +1,7 @@ +GNUmakefile +*.vcproj +*.user +*.cbp +*.ncb +*.suo +*.sln Added: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/kbdge…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.c (added) +++ trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.c [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,456 @@ +/* + * ReactOS German de_ergo/eMeier ASCII Keyboard layout + * Copyright (C) 2008 ReactOS + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ */ + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_4, VK_OEM_6, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'X', 'Q', 'H', + 'W', 'Z', 'Y', 'D', + 'T', 'B', 'P', + 'J', VK_OEM_PLUS, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'U', 'I', 'A', 'E', + 'O', 'L', 'R', 'N', + 'S', 'F', 'V', VK_OEM_5, + VK_LSHIFT, VK_OEM_2, + /* - 2c - */ + /* Third letters row */ + VK_OEM_3, VK_OEM_7, VK_OEM_1, 'C', + 'K', 'G', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD,VK_OEM_MINUS, VK_RSHIFT, + /* - 37 - */ + /* Bottom Row */ + VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 72 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ + VK_EMPTY, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = { + modifier_keys, + 6, + { 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { VK_OEM_5, NOCAPS, {WCH_DEAD, 0xb0} }, + { 0xff, NOCAPS, {'^', WCH_NONE} }, // FIXME - why doesn't this work? + /* Normal vs Shifted */ + /* The numbers */ + { '1', NOCAPS, {'1', '!'} }, + /* Ctrl-2 generates NUL */ + { '4', NOCAPS, {'4', '$'} }, + { '5', NOCAPS, {'5', '%'} }, + + { VK_OEM_6, NOCAPS, {WCH_DEAD, WCH_DEAD} }, + { 0xff, NOCAPS, {0xb4, '`'} }, + + /* First letter row */ + { 'W', CAPS, {'w', 'W'} }, + { 'R', CAPS, {'r', 'R'} }, + { 'T', CAPS, {'t', 'T'} }, + { 'Z', CAPS, {'z', 'Z'} }, + { 'U', CAPS, {'u', 'U'} }, + { 'I', CAPS, {'i', 'I'} }, + { 'O', CAPS, {'o', 'O'} }, + { 'P', CAPS, {'p', 'P'} }, + /* Second letter row */ + { 'A', CAPS, {'a', 'A'} }, + { 'S', CAPS, {'s', 'S'} }, + { 'D', CAPS, {'d', 'D'} }, + { 'F', CAPS, {'f', 'F'} }, + { 'G', CAPS, {'g', 'G'} }, + { 'H', CAPS, {'h', 'H'} }, + { 'J', CAPS, {'j', 'J'} }, + { 'K', CAPS, {'k', 'K'} }, + { 'L', CAPS, {'l', 'L'} }, + { VK_OEM_3, CAPS, {0xf6, 0xd6} }, + { VK_OEM_7, CAPS, {0xe4, 0xc4} }, + /* Third letter row */ + { 'Y', CAPS, {'y', 'Y'} }, + { 'X', CAPS, {'x', 'X'} }, + { 'C', CAPS, {'c', 'C'} }, + { 'V', CAPS, {'v', 'V'} }, + { 'B', CAPS, {'b', 'B'} }, + { 'N', CAPS, {'n', 'N'} }, + + /* Specials */ + { VK_OEM_COMMA, CAPS, {',', ';'} }, + { VK_OEM_PERIOD, CAPS, {'.', ':'} }, + { VK_DECIMAL, NOCAPS, {',',','} }, + { VK_TAB, NOCAPS, {'\t', '\t'} }, + { VK_ADD, NOCAPS, {'+', '+'} }, + { VK_DIVIDE, NOCAPS, {'/', '/'} }, + { VK_MULTIPLY, NOCAPS, {'*', '*'} }, + { VK_SUBTRACT, NOCAPS, {'-', '-'} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Ctrl */ + /* Legacy (telnet-style) ascii escapes */ + { '3', CAPS, {'3', 0xa7, 0xb3} }, + { '7', CAPS, {'7', '/', '{'} }, + { '8', CAPS, {'8', '(', '['} }, + { '9', CAPS, {'9', ')', ']'} }, + { '0', CAPS, {'0', '=', '}'} }, + { VK_OEM_4, CAPS, {0xdf, '?', '\\'} }, + { 'Q', CAPS, {'q', 'Q', '@'} }, + { 'E', CAPS, {'e', 'E', 0x20ac} }, + { 'M', CAPS, {'m', 'M', 0xb5} }, + { VK_OEM_102, NOCAPS, {'<', '>', '|'} }, // FIXME - why doesn't this work? + { 0,0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + /* Legacy Ascii generators */ + { VK_OEM_1, CAPS, {0xfc, 0xdc, WCH_NONE, 0x1b} }, + { VK_OEM_PLUS, CAPS, {'+', '*', '~', 0x1d} }, + { VK_OEM_2, CAPS, {'#', '\'', WCH_NONE, 0x1c} }, + { VK_BACK, NOCAPS, {'\b', '\b', WCH_NONE, 0x7f} }, + { VK_ESCAPE, NOCAPS, {0x1b, 0x1b, WCH_NONE, 0x1b} }, + { VK_RETURN, NOCAPS, {'\r', '\r', WCH_NONE, '\n'} }, + { VK_SPACE, NOCAPS, {' ', ' ', WCH_NONE, ' '} }, + { VK_CANCEL, NOCAPS, {0x03, 0x03, WCH_NONE, 0x03} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + { '2', CAPS, {'2', '\"', 0xb2, WCH_NONE, 0x00} }, + { '6', CAPS, {'6', '&', WCH_NONE, WCH_NONE, 0x1e} }, + { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, WCH_NONE, 0x1f} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_DECIMAL, 0, {'.'} }, + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, +// { VK_BACK, 0, '\010' }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(5,key_to_chars_5mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x00, L"" }, + { 0x01, L"Esc" }, + { 0x0e, L"R\x00fc" L"ck" }, + { 0x0f, L"Tabulator" }, + { 0x1c, L"Eingabe" }, + { 0x1d, L"Strg" }, + { 0x2a, L"Umschalt" }, + { 0x36, L"Umschalt Rechts" }, + { 0x37, L" (Zehnertastatur)" }, + { 0x38, L"Alt" }, + { 0x39, L"Leer" }, + { 0x3a, L"Feststell" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Rollen-Feststell" }, + { 0x47, L"7 (Zehnertastatur)" }, + { 0x48, L"8 (Zehnertastatur)" }, + { 0x49, L"9 (Zehnertastatur)" }, + { 0x4a, L"- (Zehnertastatur)" }, + { 0x4b, L"4 (Zehnertastatur)" }, + { 0x4c, L"5 (Zehnertastatur)" }, + { 0x4d, L"6 (Zehnertastatur)" }, + { 0x4e, L"+ (Zehnertastatur)" }, + { 0x4f, L"1 (Zehnertastatur)" }, + { 0x50, L"2 (Zehnertastatur)" }, + { 0x51, L"3 (Zehnertastatur)" }, + { 0x52, L"0 (Zehnertastatur)" }, + { 0x53, L"Komma (Zehnertastatur)" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL }, +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Eingabe (Zehnertastatur" }, + { 0x1d, L"Strg-Rechts" }, + { 0x35, L" (Zehnertastatur)" }, + { 0x37, L"Druck" }, + { 0x38, L"Alt Gr" }, + { 0x45, L"Num-Feststell" }, + { 0x46, L"Untbr" }, + { 0x47, L"Pos1" }, + { 0x48, L"Nach-Oben" }, + { 0x49, L"Bild-Nach-Oben" }, + { 0x4b, L"Nach-Links" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Nach-Rechts" }, + { 0x4f, L"Ende" }, + { 0x50, L"Nach-Unten" }, + { 0x51, L"Bild-Nach-Unten" }, + { 0x52, L"Einfg" }, + { 0x53, L"Entf" }, + { 0x54, L"<ReactOS>" }, + { 0x55, L"Hilfe" }, + { 0x56, L"Linke <ReactOS>" }, + { 0x5b, L"Rechte <ReactOS>" }, + { 0, NULL }, +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = { + L"\x00b4" L"Akut", + L"`" L"Gravis", + L"^" L"Zirkumflex", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags + +ROSDATA DEADKEY dead_key[] = { + { DEADTRANS(L'a', L'^', 0xe2, 0x00) }, + { DEADTRANS(L'e', L'^', 0xea, 0x00) }, + { DEADTRANS(L'i', L'^', 0xee, 0x00) }, + { DEADTRANS(L'o', L'^', 0xf4, 0x00) }, + { DEADTRANS(L'u', L'^', 0xfb, 0x00) }, + { DEADTRANS(L'A', L'^', 0xc2, 0x00) }, + { DEADTRANS(L'E', L'^', 0xca, 0x00) }, + { DEADTRANS(L'I', L'^', 0xce, 0x00) }, + { DEADTRANS(L'O', L'^', 0xd4, 0x00) }, + { DEADTRANS(L'U', L'^', 0xdb, 0x00) }, + { DEADTRANS(L' ', L'^', L'^', 0x00) }, + { DEADTRANS(L'a', 0xb4, 0xe1, 0x00) }, + { DEADTRANS(L'e', 0xb4, 0xe9, 0x00) }, + { DEADTRANS(L'i', 0xb4, 0xed, 0x00) }, + { DEADTRANS(L'o', 0xb4, 0xf3, 0x00) }, + { DEADTRANS(L'u', 0xb4, 0xfa, 0x00) }, + { DEADTRANS(L'y', 0xb4, 0xfd, 0x00) }, + { DEADTRANS(L'A', 0xb4, 0xc1, 0x00) }, + { DEADTRANS(L'E', 0xb4, 0xc9, 0x00) }, + { DEADTRANS(L'I', 0xb4, 0xcd, 0x00) }, + { DEADTRANS(L'O', 0xb4, 0xd3, 0x00) }, + { DEADTRANS(L'U', 0xb4, 0xda, 0x00) }, + { DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) }, + { DEADTRANS(L' ', 0xb4, 0xb4, 0x00) }, + { DEADTRANS(L'a', L'`', 0xe0, 0x00) }, + { DEADTRANS(L'e', L'`', 0xe8, 0x00) }, + { DEADTRANS(L'i', L'`', 0xec, 0x00) }, + { DEADTRANS(L'o', L'`', 0xf2, 0x00) }, + { DEADTRANS(L'u', L'`', 0xf9, 0x00) }, + { DEADTRANS(L'A', L'`', 0xc0, 0x00) }, + { DEADTRANS(L'E', L'`', 0xc8, 0x00) }, + { DEADTRANS(L'I', L'`', 0xcc, 0x00) }, + { DEADTRANS(L'O', L'`', 0xd2, 0x00) }, + { DEADTRANS(L'U', L'`', 0xd9, 0x00) }, + { DEADTRANS(L' ', L'`', L'`', 0x00) }, + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks -- currently implemented by wine code */ + dead_key, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + dead_key_names, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(1,1), /* Version 1.0 */ + + /* Ligatures -- German doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor(VOID) { + return &keyboard_layout_table; +} + Propchange: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/kbdge…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.def (added) +++ trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.def [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdgerg.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Propchange: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/kbdge…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild (added) +++ trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="kbdgerg" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kbdgerg.dll" allowwarnings="true"> + <importlibrary definition="kbdgerg.def" /> + <include base="ntoskrnl">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="_WIN32_WINNT">0x0500</define> + <file>kbdgerg.c</file> + <file>kbdgerg.rc</file> +</module> Propchange: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgerg/kbdge…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rc (added) +++ trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rc [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS German de_ergo/eMeier Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdgerg\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdgerg.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/keyboard/kbdgerg/kbdgerg.rc ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/dll/keyboard/kbdgneo/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sat Apr 26 07:30:46 2008 @@ -1,0 +1,7 @@ +GNUmakefile +*.vcproj +*.user +*.cbp +*.ncb +*.suo +*.sln Added: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/kbdgn…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.c (added) +++ trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.c [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,456 @@ +/* + * ReactOS German NEO ASCII Keyboard layout + * Copyright (C) 2008 ReactOS + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ */ + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_MINUS, VK_OEM_6, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'V', 'L', + 'C', 'W', 'K', 'H', + 'G', 'F', 'J', + VK_OEM_4, VK_OEM_PLUS, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'U', 'I', 'A', 'E', + 'O', 'S', 'N', 'R', + 'T', 'D', 'Y', VK_OEM_5, + VK_LSHIFT, VK_OEM_2, + /* - 2c - */ + /* Third letters row */ + VK_OEM_3, VK_OEM_1, VK_OEM_7, 'P', + 'Z', 'B', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD,'X', VK_RSHIFT, + /* - 37 - */ + /* Bottom Row */ + VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 72 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ + VK_EMPTY, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = { + modifier_keys, + 6, + { 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { VK_OEM_5, NOCAPS, {WCH_DEAD, 0xb0} }, + { 0xff, NOCAPS, {'^', WCH_NONE} }, // FIXME - why doesn't this work? + /* Normal vs Shifted */ + /* The numbers */ + { '1', NOCAPS, {'1', '!'} }, + /* Ctrl-2 generates NUL */ + { '4', NOCAPS, {'4', '$'} }, + { '5', NOCAPS, {'5', '%'} }, + + { VK_OEM_6, NOCAPS, {WCH_DEAD, WCH_DEAD} }, + { 0xff, NOCAPS, {0xb4, '`'} }, + + /* First letter row */ + { 'W', CAPS, {'w', 'W'} }, + { 'R', CAPS, {'r', 'R'} }, + { 'T', CAPS, {'t', 'T'} }, + { 'Z', CAPS, {'z', 'Z'} }, + { 'U', CAPS, {'u', 'U'} }, + { 'I', CAPS, {'i', 'I'} }, + { 'O', CAPS, {'o', 'O'} }, + { 'P', CAPS, {'p', 'P'} }, + /* Second letter row */ + { 'A', CAPS, {'a', 'A'} }, + { 'S', CAPS, {'s', 'S'} }, + { 'D', CAPS, {'d', 'D'} }, + { 'F', CAPS, {'f', 'F'} }, + { 'G', CAPS, {'g', 'G'} }, + { 'H', CAPS, {'h', 'H'} }, + { 'J', CAPS, {'j', 'J'} }, + { 'K', CAPS, {'k', 'K'} }, + { 'L', CAPS, {'l', 'L'} }, + { VK_OEM_3, CAPS, {0xf6, 0xd6} }, + { VK_OEM_7, CAPS, {0xe4, 0xc4} }, + /* Third letter row */ + { 'Y', CAPS, {'y', 'Y'} }, + { 'X', CAPS, {'x', 'X'} }, + { 'C', CAPS, {'c', 'C'} }, + { 'V', CAPS, {'v', 'V'} }, + { 'B', CAPS, {'b', 'B'} }, + { 'N', CAPS, {'n', 'N'} }, + + /* Specials */ + { VK_OEM_COMMA, CAPS, {',', ';'} }, + { VK_OEM_PERIOD, CAPS, {'.', ':'} }, + { VK_DECIMAL, NOCAPS, {',',','} }, + { VK_TAB, NOCAPS, {'\t', '\t'} }, + { VK_ADD, NOCAPS, {'+', '+'} }, + { VK_DIVIDE, NOCAPS, {'/', '/'} }, + { VK_MULTIPLY, NOCAPS, {'*', '*'} }, + { VK_SUBTRACT, NOCAPS, {'-', '-'} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Ctrl */ + /* Legacy (telnet-style) ascii escapes */ + { '3', CAPS, {'3', 0xa7, 0xb3} }, + { '7', CAPS, {'7', '/', '{'} }, + { '8', CAPS, {'8', '(', '['} }, + { '9', CAPS, {'9', ')', ']'} }, + { '0', CAPS, {'0', '=', '}'} }, + { VK_OEM_4, CAPS, {0xdf, '?', '\\'} }, + { 'Q', CAPS, {'q', 'Q', '@'} }, + { 'E', CAPS, {'e', 'E', 0x20ac} }, + { 'M', CAPS, {'m', 'M', 0xb5} }, + { VK_OEM_102, NOCAPS, {'<', '>', '|'} }, // FIXME - why doesn't this work? + { 0,0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + /* Legacy Ascii generators */ + { VK_OEM_1, CAPS, {0xfc, 0xdc, WCH_NONE, 0x1b} }, + { VK_OEM_PLUS, CAPS, {'+', '*', '~', 0x1d} }, + { VK_OEM_2, CAPS, {'#', '\'', WCH_NONE, 0x1c} }, + { VK_BACK, NOCAPS, {'\b', '\b', WCH_NONE, 0x7f} }, + { VK_ESCAPE, NOCAPS, {0x1b, 0x1b, WCH_NONE, 0x1b} }, + { VK_RETURN, NOCAPS, {'\r', '\r', WCH_NONE, '\n'} }, + { VK_SPACE, NOCAPS, {' ', ' ', WCH_NONE, ' '} }, + { VK_CANCEL, NOCAPS, {0x03, 0x03, WCH_NONE, 0x03} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + { '2', CAPS, {'2', '\"', 0xb2, WCH_NONE, 0x00} }, + { '6', CAPS, {'6', '&', WCH_NONE, WCH_NONE, 0x1e} }, + { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, WCH_NONE, 0x1f} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_DECIMAL, 0, {'.'} }, + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, +// { VK_BACK, 0, '\010' }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(5,key_to_chars_5mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x00, L"" }, + { 0x01, L"Esc" }, + { 0x0e, L"R\x00fc" L"ck" }, + { 0x0f, L"Tabulator" }, + { 0x1c, L"Eingabe" }, + { 0x1d, L"Strg" }, + { 0x2a, L"Umschalt" }, + { 0x36, L"Umschalt Rechts" }, + { 0x37, L" (Zehnertastatur)" }, + { 0x38, L"Alt" }, + { 0x39, L"Leer" }, + { 0x3a, L"Feststell" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Rollen-Feststell" }, + { 0x47, L"7 (Zehnertastatur)" }, + { 0x48, L"8 (Zehnertastatur)" }, + { 0x49, L"9 (Zehnertastatur)" }, + { 0x4a, L"- (Zehnertastatur)" }, + { 0x4b, L"4 (Zehnertastatur)" }, + { 0x4c, L"5 (Zehnertastatur)" }, + { 0x4d, L"6 (Zehnertastatur)" }, + { 0x4e, L"+ (Zehnertastatur)" }, + { 0x4f, L"1 (Zehnertastatur)" }, + { 0x50, L"2 (Zehnertastatur)" }, + { 0x51, L"3 (Zehnertastatur)" }, + { 0x52, L"0 (Zehnertastatur)" }, + { 0x53, L"Komma (Zehnertastatur)" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL }, +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Eingabe (Zehnertastatur" }, + { 0x1d, L"Strg-Rechts" }, + { 0x35, L" (Zehnertastatur)" }, + { 0x37, L"Druck" }, + { 0x38, L"Alt Gr" }, + { 0x45, L"Num-Feststell" }, + { 0x46, L"Untbr" }, + { 0x47, L"Pos1" }, + { 0x48, L"Nach-Oben" }, + { 0x49, L"Bild-Nach-Oben" }, + { 0x4b, L"Nach-Links" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Nach-Rechts" }, + { 0x4f, L"Ende" }, + { 0x50, L"Nach-Unten" }, + { 0x51, L"Bild-Nach-Unten" }, + { 0x52, L"Einfg" }, + { 0x53, L"Entf" }, + { 0x54, L"<ReactOS>" }, + { 0x55, L"Hilfe" }, + { 0x56, L"Linke <ReactOS>" }, + { 0x5b, L"Rechte <ReactOS>" }, + { 0, NULL }, +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = { + L"\x00b4" L"Akut", + L"`" L"Gravis", + L"^" L"Zirkumflex", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags + +ROSDATA DEADKEY dead_key[] = { + { DEADTRANS(L'a', L'^', 0xe2, 0x00) }, + { DEADTRANS(L'e', L'^', 0xea, 0x00) }, + { DEADTRANS(L'i', L'^', 0xee, 0x00) }, + { DEADTRANS(L'o', L'^', 0xf4, 0x00) }, + { DEADTRANS(L'u', L'^', 0xfb, 0x00) }, + { DEADTRANS(L'A', L'^', 0xc2, 0x00) }, + { DEADTRANS(L'E', L'^', 0xca, 0x00) }, + { DEADTRANS(L'I', L'^', 0xce, 0x00) }, + { DEADTRANS(L'O', L'^', 0xd4, 0x00) }, + { DEADTRANS(L'U', L'^', 0xdb, 0x00) }, + { DEADTRANS(L' ', L'^', L'^', 0x00) }, + { DEADTRANS(L'a', 0xb4, 0xe1, 0x00) }, + { DEADTRANS(L'e', 0xb4, 0xe9, 0x00) }, + { DEADTRANS(L'i', 0xb4, 0xed, 0x00) }, + { DEADTRANS(L'o', 0xb4, 0xf3, 0x00) }, + { DEADTRANS(L'u', 0xb4, 0xfa, 0x00) }, + { DEADTRANS(L'y', 0xb4, 0xfd, 0x00) }, + { DEADTRANS(L'A', 0xb4, 0xc1, 0x00) }, + { DEADTRANS(L'E', 0xb4, 0xc9, 0x00) }, + { DEADTRANS(L'I', 0xb4, 0xcd, 0x00) }, + { DEADTRANS(L'O', 0xb4, 0xd3, 0x00) }, + { DEADTRANS(L'U', 0xb4, 0xda, 0x00) }, + { DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) }, + { DEADTRANS(L' ', 0xb4, 0xb4, 0x00) }, + { DEADTRANS(L'a', L'`', 0xe0, 0x00) }, + { DEADTRANS(L'e', L'`', 0xe8, 0x00) }, + { DEADTRANS(L'i', L'`', 0xec, 0x00) }, + { DEADTRANS(L'o', L'`', 0xf2, 0x00) }, + { DEADTRANS(L'u', L'`', 0xf9, 0x00) }, + { DEADTRANS(L'A', L'`', 0xc0, 0x00) }, + { DEADTRANS(L'E', L'`', 0xc8, 0x00) }, + { DEADTRANS(L'I', L'`', 0xcc, 0x00) }, + { DEADTRANS(L'O', L'`', 0xd2, 0x00) }, + { DEADTRANS(L'U', L'`', 0xd9, 0x00) }, + { DEADTRANS(L' ', L'`', L'`', 0x00) }, + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks -- currently implemented by wine code */ + dead_key, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + dead_key_names, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(1,1), /* Version 1.0 */ + + /* Ligatures -- German doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor(VOID) { + return &keyboard_layout_table; +} + Propchange: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/kbdgn…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.def (added) +++ trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.def [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdgneo.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Propchange: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/kbdgn…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild (added) +++ trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="kbdgneo" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kbdgneo.dll" allowwarnings="true"> + <importlibrary definition="kbdgneo.def" /> + <include base="ntoskrnl">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="_WIN32_WINNT">0x0500</define> + <file>kbdgneo.c</file> + <file>kbdgneo.rc</file> +</module> Propchange: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgneo/kbdgn…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rc (added) +++ trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rc [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS German NEO Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdgneo\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdgneo.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/keyboard/kbdgneo/kbdgneo.rc ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/dll/keyboard/kbdgrist/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sat Apr 26 07:30:46 2008 @@ -1,0 +1,7 @@ +GNUmakefile +*.vcproj +*.user +*.cbp +*.ncb +*.suo +*.sln Added: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/kbdg…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.c (added) +++ trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.c [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,456 @@ +/* + * ReactOS German Ristome ASCII Keyboard layout + * Copyright (C) 2008 ReactOS + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ */ + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_MINUS, VK_OEM_6, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'P', 'R', + 'O', 'C', 'B', 'T', + 'D', 'W', 'J', + VK_OEM_3, VK_OEM_PLUS, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'Z', 'L', 'A', 'N', + 'I', 'U', 'E', 'H', + 'S', 'F', 'Y', VK_OEM_5, + VK_LSHIFT, VK_OEM_2, + /* - 2c - */ + /* Third letters row */ + 'X', 'V', 'G', 'M', + 'K', VK_OEM_7, VK_OEM_1, VK_OEM_4, + VK_OEM_COMMA, VK_OEM_PERIOD,VK_RSHIFT, + /* - 37 - */ + /* Bottom Row */ + VK_MULTIPLY, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* EREOF */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 72 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ + VK_EMPTY, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = { + modifier_keys, + 6, + { 0, 1, 3, 4, SHFT_INVALID, SHFT_INVALID, 2 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { VK_OEM_5, NOCAPS, {WCH_DEAD, 0xb0} }, + { 0xff, NOCAPS, {'^', WCH_NONE} }, // FIXME - why doesn't this work? + /* Normal vs Shifted */ + /* The numbers */ + { '1', NOCAPS, {'1', '!'} }, + /* Ctrl-2 generates NUL */ + { '4', NOCAPS, {'4', '$'} }, + { '5', NOCAPS, {'5', '%'} }, + + { VK_OEM_6, NOCAPS, {WCH_DEAD, WCH_DEAD} }, + { 0xff, NOCAPS, {0xb4, '`'} }, + + /* First letter row */ + { 'W', CAPS, {'w', 'W'} }, + { 'R', CAPS, {'r', 'R'} }, + { 'T', CAPS, {'t', 'T'} }, + { 'Z', CAPS, {'z', 'Z'} }, + { 'U', CAPS, {'u', 'U'} }, + { 'I', CAPS, {'i', 'I'} }, + { 'O', CAPS, {'o', 'O'} }, + { 'P', CAPS, {'p', 'P'} }, + /* Second letter row */ + { 'A', CAPS, {'a', 'A'} }, + { 'S', CAPS, {'s', 'S'} }, + { 'D', CAPS, {'d', 'D'} }, + { 'F', CAPS, {'f', 'F'} }, + { 'G', CAPS, {'g', 'G'} }, + { 'H', CAPS, {'h', 'H'} }, + { 'J', CAPS, {'j', 'J'} }, + { 'K', CAPS, {'k', 'K'} }, + { 'L', CAPS, {'l', 'L'} }, + { VK_OEM_3, CAPS, {0xf6, 0xd6} }, + { VK_OEM_7, CAPS, {0xe4, 0xc4} }, + /* Third letter row */ + { 'Y', CAPS, {'y', 'Y'} }, + { 'X', CAPS, {'x', 'X'} }, + { 'C', CAPS, {'c', 'C'} }, + { 'V', CAPS, {'v', 'V'} }, + { 'B', CAPS, {'b', 'B'} }, + { 'N', CAPS, {'n', 'N'} }, + + /* Specials */ + { VK_OEM_COMMA, CAPS, {',', ';'} }, + { VK_OEM_PERIOD, CAPS, {'.', ':'} }, + { VK_DECIMAL, NOCAPS, {',',','} }, + { VK_TAB, NOCAPS, {'\t', '\t'} }, + { VK_ADD, NOCAPS, {'+', '+'} }, + { VK_DIVIDE, NOCAPS, {'/', '/'} }, + { VK_MULTIPLY, NOCAPS, {'*', '*'} }, + { VK_SUBTRACT, NOCAPS, {'-', '-'} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Ctrl */ + /* Legacy (telnet-style) ascii escapes */ + { '3', CAPS, {'3', 0xa7, 0xb3} }, + { '7', CAPS, {'7', '/', '{'} }, + { '8', CAPS, {'8', '(', '['} }, + { '9', CAPS, {'9', ')', ']'} }, + { '0', CAPS, {'0', '=', '}'} }, + { VK_OEM_4, CAPS, {0xdf, '?', '\\'} }, + { 'Q', CAPS, {'q', 'Q', '@'} }, + { 'E', CAPS, {'e', 'E', 0x20ac} }, + { 'M', CAPS, {'m', 'M', 0xb5} }, + { VK_OEM_102, NOCAPS, {'<', '>', '|'} }, // FIXME - why doesn't this work? + { 0,0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + /* Legacy Ascii generators */ + { VK_OEM_1, CAPS, {0xfc, 0xdc, WCH_NONE, 0x1b} }, + { VK_OEM_PLUS, CAPS, {'+', '*', '~', 0x1d} }, + { VK_OEM_2, CAPS, {'#', '\'', WCH_NONE, 0x1c} }, + { VK_BACK, NOCAPS, {'\b', '\b', WCH_NONE, 0x7f} }, + { VK_ESCAPE, NOCAPS, {0x1b, 0x1b, WCH_NONE, 0x1b} }, + { VK_RETURN, NOCAPS, {'\r', '\r', WCH_NONE, '\n'} }, + { VK_SPACE, NOCAPS, {' ', ' ', WCH_NONE, ' '} }, + { VK_CANCEL, NOCAPS, {0x03, 0x03, WCH_NONE, 0x03} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = { + /* Normal, Shifted, Ctrl, C-S-x */ + { '2', CAPS, {'2', '\"', 0xb2, WCH_NONE, 0x00} }, + { '6', CAPS, {'6', '&', WCH_NONE, WCH_NONE, 0x1e} }, + { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, WCH_NONE, 0x1f} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_DECIMAL, 0, {'.'} }, + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, +// { VK_BACK, 0, '\010' }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(5,key_to_chars_5mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x00, L"" }, + { 0x01, L"Esc" }, + { 0x0e, L"R\x00fc" L"ck" }, + { 0x0f, L"Tabulator" }, + { 0x1c, L"Eingabe" }, + { 0x1d, L"Strg" }, + { 0x2a, L"Umschalt" }, + { 0x36, L"Umschalt Rechts" }, + { 0x37, L" (Zehnertastatur)" }, + { 0x38, L"Alt" }, + { 0x39, L"Leer" }, + { 0x3a, L"Feststell" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Rollen-Feststell" }, + { 0x47, L"7 (Zehnertastatur)" }, + { 0x48, L"8 (Zehnertastatur)" }, + { 0x49, L"9 (Zehnertastatur)" }, + { 0x4a, L"- (Zehnertastatur)" }, + { 0x4b, L"4 (Zehnertastatur)" }, + { 0x4c, L"5 (Zehnertastatur)" }, + { 0x4d, L"6 (Zehnertastatur)" }, + { 0x4e, L"+ (Zehnertastatur)" }, + { 0x4f, L"1 (Zehnertastatur)" }, + { 0x50, L"2 (Zehnertastatur)" }, + { 0x51, L"3 (Zehnertastatur)" }, + { 0x52, L"0 (Zehnertastatur)" }, + { 0x53, L"Komma (Zehnertastatur)" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL }, +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Eingabe (Zehnertastatur" }, + { 0x1d, L"Strg-Rechts" }, + { 0x35, L" (Zehnertastatur)" }, + { 0x37, L"Druck" }, + { 0x38, L"Alt Gr" }, + { 0x45, L"Num-Feststell" }, + { 0x46, L"Untbr" }, + { 0x47, L"Pos1" }, + { 0x48, L"Nach-Oben" }, + { 0x49, L"Bild-Nach-Oben" }, + { 0x4b, L"Nach-Links" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Nach-Rechts" }, + { 0x4f, L"Ende" }, + { 0x50, L"Nach-Unten" }, + { 0x51, L"Bild-Nach-Unten" }, + { 0x52, L"Einfg" }, + { 0x53, L"Entf" }, + { 0x54, L"<ReactOS>" }, + { 0x55, L"Hilfe" }, + { 0x56, L"Linke <ReactOS>" }, + { 0x5b, L"Rechte <ReactOS>" }, + { 0, NULL }, +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = { + L"\x00b4" L"Akut", + L"`" L"Gravis", + L"^" L"Zirkumflex", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags + +ROSDATA DEADKEY dead_key[] = { + { DEADTRANS(L'a', L'^', 0xe2, 0x00) }, + { DEADTRANS(L'e', L'^', 0xea, 0x00) }, + { DEADTRANS(L'i', L'^', 0xee, 0x00) }, + { DEADTRANS(L'o', L'^', 0xf4, 0x00) }, + { DEADTRANS(L'u', L'^', 0xfb, 0x00) }, + { DEADTRANS(L'A', L'^', 0xc2, 0x00) }, + { DEADTRANS(L'E', L'^', 0xca, 0x00) }, + { DEADTRANS(L'I', L'^', 0xce, 0x00) }, + { DEADTRANS(L'O', L'^', 0xd4, 0x00) }, + { DEADTRANS(L'U', L'^', 0xdb, 0x00) }, + { DEADTRANS(L' ', L'^', L'^', 0x00) }, + { DEADTRANS(L'a', 0xb4, 0xe1, 0x00) }, + { DEADTRANS(L'e', 0xb4, 0xe9, 0x00) }, + { DEADTRANS(L'i', 0xb4, 0xed, 0x00) }, + { DEADTRANS(L'o', 0xb4, 0xf3, 0x00) }, + { DEADTRANS(L'u', 0xb4, 0xfa, 0x00) }, + { DEADTRANS(L'y', 0xb4, 0xfd, 0x00) }, + { DEADTRANS(L'A', 0xb4, 0xc1, 0x00) }, + { DEADTRANS(L'E', 0xb4, 0xc9, 0x00) }, + { DEADTRANS(L'I', 0xb4, 0xcd, 0x00) }, + { DEADTRANS(L'O', 0xb4, 0xd3, 0x00) }, + { DEADTRANS(L'U', 0xb4, 0xda, 0x00) }, + { DEADTRANS(L'Y', 0xb4, 0xdd, 0x00) }, + { DEADTRANS(L' ', 0xb4, 0xb4, 0x00) }, + { DEADTRANS(L'a', L'`', 0xe0, 0x00) }, + { DEADTRANS(L'e', L'`', 0xe8, 0x00) }, + { DEADTRANS(L'i', L'`', 0xec, 0x00) }, + { DEADTRANS(L'o', L'`', 0xf2, 0x00) }, + { DEADTRANS(L'u', L'`', 0xf9, 0x00) }, + { DEADTRANS(L'A', L'`', 0xc0, 0x00) }, + { DEADTRANS(L'E', L'`', 0xc8, 0x00) }, + { DEADTRANS(L'I', L'`', 0xcc, 0x00) }, + { DEADTRANS(L'O', L'`', 0xd2, 0x00) }, + { DEADTRANS(L'U', L'`', 0xd9, 0x00) }, + { DEADTRANS(L' ', L'`', L'`', 0x00) }, + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks -- currently implemented by wine code */ + dead_key, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + dead_key_names, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(1,1), /* Version 1.0 */ + + /* Ligatures -- German doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor(VOID) { + return &keyboard_layout_table; +} + Propchange: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/kbdg…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.def (added) +++ trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.def [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdgrist.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Propchange: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/kbdg…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild (added) +++ trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="kbdgrist" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kbdgrist.dll" allowwarnings="true"> + <importlibrary definition="kbdgrist.def" /> + <include base="ntoskrnl">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="_WIN32_WINNT">0x0500</define> + <file>kbdgrist.c</file> + <file>kbdgrist.rc</file> +</module> Propchange: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdgrist/kbdg…
============================================================================== --- trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rc (added) +++ trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rc [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS German Ristome Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdgrist\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdgrist.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/keyboard/kbdgrist/kbdgrist.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/keyboard/keyboard.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/keyboard.rbui…
============================================================================== --- trunk/reactos/dll/keyboard/keyboard.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/keyboard.rbuild [iso-8859-1] Sat Apr 26 07:30:46 2008 @@ -36,6 +36,15 @@ </directory> <directory name="kbdfr"> <xi:include href="kbdfr/kbdfr.rbuild" /> + </directory> + <directory name="kbdgerg"> + <xi:include href="kbdgerg/kbdgerg.rbuild" /> + </directory> + <directory name="kbdgneo"> + <xi:include href="kbdgneo/kbdgneo.rbuild" /> + </directory> + <directory name="kbdgrist"> + <xi:include href="kbdgrist/kbdgrist.rbuild" /> </directory> <directory name="kbdgr"> <xi:include href="kbdgr/kbdgr.rbuild" />
16 years, 8 months
1
0
0
0
[greatlrd] 33147: fixed : we do not longer losing the hdev for ms dxg.sys fixed : remove few hacks I did and reactivate some api I did take offline. the struct EDD_DIRECTDRAW_LOCAL from yuah gdi book does not match windows xp, I have verify some member for windows xp. the struct EDD_DIRECTDRAW_GLOBAL from yuah gdi book does not match windows xp, I have verify some member for windows xp. and add two new member so hPDEV get in right place.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sat Apr 26 04:29:10 2008 New Revision: 33147 URL:
http://svn.reactos.org/svn/reactos?rev=33147&view=rev
Log: fixed : we do not longer losing the hdev for ms dxg.sys fixed : remove few hacks I did and reactivate some api I did take offline. the struct EDD_DIRECTDRAW_LOCAL from yuah gdi book does not match windows xp, I have verify some member for windows xp. the struct EDD_DIRECTDRAW_GLOBAL from yuah gdi book does not match windows xp, I have verify some member for windows xp. and add two new member so hPDEV get in right place. Modified: trunk/reactos/include/reactos/drivers/directx/directxint.h trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Modified: trunk/reactos/include/reactos/drivers/directx/directxint.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
============================================================================== --- trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/drivers/directx/directxint.h [iso-8859-1] Sat Apr 26 04:29:10 2008 @@ -12,17 +12,17 @@ // GDI Object Header // DD_BASEOBJECT pobj; -/* 0x10 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal; +/* 0x10 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal; // verify it match windows xp /* 0x1C */ struct _EDD_SURFACE * peSurface_DdList; /* 0x1C */ ULONG unk_01c; /* 0x20 */ ULONG unk_020; -/* 0x24 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2; +/* 0x24 */ struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2; // verify it match windows xp /* 0x28 */ FLATPTR fpProcess; /* 0x2C */ FLONG fl; -/* 0x30 */ HANDLE UniqueProcess; +/* 0x30 */ struct _EDD_DIRECTDRAW_LOCAL *peDirectDrawLocal_prev; // verify it match windows xp, to old lcl store here when new handle are create. /* 0x34 */ PEPROCESS Process; /* 0x38 */ ULONG unk_038; -/* 0x3C */ ULONG unk_03C; +/* 0x3C */ HANDLE UniqueProcess; /* 0x40 */ VOID *unk_040; /* 0x44 */ VOID *unk_044; /* 0x48 */ ULONG unk_048; @@ -121,7 +121,7 @@ /* 0x4EC */ ULONG unk_4ec[18]; /* 0x534 */ D3DNTHAL_CALLBACKS3 d3dNtHalCallbacks3; /* 0x54C */ ULONG unk_54c[23]; -/* 0x5A8 */ EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList; +/* 0x5A8 */ EDD_DIRECTDRAW_LOCAL* peDirectDrawLocalList; // verify it match windows xp, comment it is current local struct not a list /* 0x5ac */ EDD_SURFACE* peSurface_LockList; /* 0x5B0 */ FLONG fl; /* 0x5B4 */ ULONG cSurfaceLocks; @@ -131,6 +131,8 @@ /* 0x5C4 */ BOOL bSuspended; /* 0x5C8 */ ULONG unk_5c8[12]; /* 0x5F8 */ RECTL rcbounds; +/* 0x5FC */ ULONG unk_5FC; +/* 0x600 */ ULONG unk_600; /* 0x608 */ HDEV hDev; /* 0x60c */ PVOID hPDev; /* The real Pdev */ Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dd.c [iso-8859-1] Sat Apr 26 04:29:10 2008 @@ -75,10 +75,8 @@ } DPRINT1("Calling on dxg.sys DdCanCreateSurface\n"); - DPRINT1("FIXME it crash when it trying call on pfnDdCanCreateSurface\n"); - /* FIXME it crash when it trying call on pfnDdCanCreateSurface */ - // return pfnDdCanCreateSurface(hDirectDrawLocal,puCanCreateSurfaceData); - return 0; + + return pfnDdCanCreateSurface(hDirectDrawLocal,puCanCreateSurfaceData); } /************************************************************************/ @@ -98,10 +96,8 @@ } DPRINT1("Calling on dxg.sys pfnDdGetScanLine\n"); - DPRINT1("FIXME it crash when it trying call on pfnDdGetScanLine\n"); - /* FIXME it crash when it trying call on pfnDdGetScanLine */ - // return pfnDdGetScanLine(hDirectDrawLocal,puGetScanLineData); - return 0; + + return pfnDdGetScanLine(hDirectDrawLocal,puGetScanLineData); } Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Sat Apr 26 04:29:10 2008 @@ -24,7 +24,7 @@ ULONG gdwDirectDrawContext; EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global; -EDD_DIRECTDRAW_LOCAL edd_DirectDrawLocalList; + /************************************************************************/ @@ -118,18 +118,6 @@ gpDxFuncs[lstDrvFN[t].iFunc].pfn =lstDrvFN[t].pfn; } - /* dump sort list for debuging */ -#if DXDDRAWDEBUG - DPRINT1("ghDxGraphics address 0x%08lx\n",ghDxGraphics); - DPRINT1("gpfnStartupDxGraphics address 0x%08lx\n",gpfnStartupDxGraphics); - DPRINT1("gpfnCleanupDxGraphics address 0x%08lx\n",gpfnCleanupDxGraphics); - - for (t=0;t<=DXG_INDEX_DxDdIoctl;t++) - { - DPRINT1("gpDxFuncs[0x%08lx].iFunc = 0x%08lx\n",t,gpDxFuncs[t].iFunc); - DPRINT1("gpDxFuncs[0x%08lx].pfn = 0x%08lx\n",t,gpDxFuncs[t].pfn); - } -#endif DPRINT1("DirectX interface is activated\n"); } @@ -184,16 +172,11 @@ ((PGDIDEVICE)pDC->pPDev)->pEDDgpl = &edd_DdirectDraw_Global; RtlZeroMemory(&edd_DdirectDraw_Global,sizeof(EDD_DIRECTDRAW_GLOBAL)); - /* FIXME this should be alloc by win32k */ - RtlZeroMemory(&edd_DirectDrawLocalList,sizeof(EDD_DIRECTDRAW_LOCAL)); + /* setup hdev for edd_DdirectDraw_Global xp */ - edd_DdirectDraw_Global.hDev = (PVOID)pDC->pPDev; edd_DdirectDraw_Global.hPDev = (PVOID)pDC->pPDev; - edd_DdirectDraw_Global.peDirectDrawLocalList = &edd_DirectDrawLocalList; - - /* setup hdev for edd_DdirectDraw_Local xp */ - edd_DirectDrawLocalList.peDirectDrawGlobal = &edd_DdirectDraw_Global; + DC_UnlockDc(pDC); /* get the pfnDdCreateDirectDrawObject after we load the drv */ @@ -353,12 +336,11 @@ DPRINT1("Warning: hDirectDrawLocal is NULL\n"); return DDHAL_DRIVER_HANDLED; } + DPRINT1("hDirectDrawLocal = %lx \n",hDirectDrawLocal); DPRINT1("Calling dxg.sys pfnDdDeleteDirectDrawObject\n"); - DPRINT1("FIXME delete of the HANDLE\n"); - /* FIXME it crash inside or after it return from DxEngLockShareSem */ - // return pfnDdDeleteDirectDrawObject(hDirectDrawLocal); - return DDHAL_DRIVER_HANDLED; + + return pfnDdDeleteDirectDrawObject(hDirectDrawLocal); } /************************************************************************/ @@ -627,20 +609,20 @@ /* internal debug api */ void dump_edd_directdraw_global(EDD_DIRECTDRAW_GLOBAL *pEddgbl) { - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->dhpdev : 0x%08lx\n",pEddgbl->dhpdev); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->dwReserved1 : 0x%08lx\n",pEddgbl->dwReserved1); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->dwReserved2 : 0x%08lx\n",pEddgbl->dwReserved2); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_000c[0] : 0x%08lx\n",pEddgbl->unk_000c[0]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_000c[1] : 0x%08lx\n",pEddgbl->unk_000c[1]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_000c[2] : 0x%08lx\n",pEddgbl->unk_000c[2]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->cDriverReferences : 0x%08lx\n",pEddgbl->cDriverReferences); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_01c[0] : 0x%08lx\n",pEddgbl->unk_01c[0]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_01c[1] : 0x%08lx\n",pEddgbl->unk_01c[1]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_01c[2] : 0x%08lx\n",pEddgbl->unk_01c[2]); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->llAssertModeTimeout : 0x%llx\n",pEddgbl->llAssertModeTimeout); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->dwNumHeaps : 0x%08lx\n",pEddgbl->dwNumHeaps); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->dhpdev : 0x%08lx\n",(((DWORD)&pEddgbl->dhpdev) - (DWORD)pEddgbl), pEddgbl->dhpdev); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->dwReserved1 : 0x%08lx\n",(((DWORD)&pEddgbl->dwReserved1) - (DWORD)pEddgbl),pEddgbl->dwReserved1); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->dwReserved2 : 0x%08lx\n",(((DWORD)&pEddgbl->dwReserved2) - (DWORD)pEddgbl),pEddgbl->dwReserved2); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_000c[0] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_000c) - (DWORD)pEddgbl),pEddgbl->unk_000c[0]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_000c[1] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_000c) - (DWORD)pEddgbl),pEddgbl->unk_000c[1]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_000c[2] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_000c) - (DWORD)pEddgbl),pEddgbl->unk_000c[2]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->cDriverReferences : 0x%08lx\n",(((DWORD)&pEddgbl->cDriverReferences) - (DWORD)pEddgbl),pEddgbl->cDriverReferences); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_01c[0] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_01c) - (DWORD)pEddgbl),pEddgbl->unk_01c[0]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_01c[1] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_01c) - (DWORD)pEddgbl),pEddgbl->unk_01c[1]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_01c[2] : 0x%08lx\n",(((DWORD)&pEddgbl->unk_01c) - (DWORD)pEddgbl),pEddgbl->unk_01c[2]); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->llAssertModeTimeout : 0x%llx\n",(((DWORD)&pEddgbl->llAssertModeTimeout) - (DWORD)pEddgbl),pEddgbl->llAssertModeTimeout); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->dwNumHeaps : 0x%08lx\n",(((DWORD)&pEddgbl->dwNumHeaps) - (DWORD)pEddgbl),pEddgbl->dwNumHeaps); // VIDEOMEMORY *pvmList; - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->pvmList : 0x%08lx\n",pEddgbl->pvmList); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->pvmList : 0x%08lx\n",(((DWORD)&pEddgbl->pvmList) - (DWORD)pEddgbl),pEddgbl->pvmList); DPRINT1("PEDD_DIRECTDRAW_GLOBAL->dwNumFourCC : 0x%08lx\n",pEddgbl->dwNumFourCC); DPRINT1("PEDD_DIRECTDRAW_GLOBAL->pdwFourCC : 0x%08lx\n",pEddgbl->pdwFourCC); // DD_HALINFO ddHalInfo; @@ -844,8 +826,10 @@ DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_5c8[11] : 0x%08lx\n",pEddgbl->unk_5c8[11]); // RECTL rcbounds; DPRINT1("PEDD_DIRECTDRAW_GLOBAL->rcbounds : 0x%08lx\n",pEddgbl->rcbounds); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->hDev : 0x%08lx\n",pEddgbl->hDev); - DPRINT1("PEDD_DIRECTDRAW_GLOBAL->hPDev : 0x%08lx\n",pEddgbl->hPDev); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_5FC : 0x%08lx\n",(((DWORD)&pEddgbl->unk_5FC) - (DWORD)pEddgbl), pEddgbl->unk_5FC); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->unk_600 : 0x%08lx\n",(((DWORD)&pEddgbl->unk_600) - (DWORD)pEddgbl), pEddgbl->unk_600); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->hDev : 0x%08lx\n",(((DWORD)&pEddgbl->hDev) - (DWORD)pEddgbl), pEddgbl->hDev); + DPRINT1("0x%08lx PEDD_DIRECTDRAW_GLOBAL->hPDev : 0x%08lx\n",(((DWORD)&pEddgbl->hPDev) - (DWORD)pEddgbl), pEddgbl->hPDev); DPRINT1("PEDD_DIRECTDRAW_GLOBAL->ddPaletteCallbacks : 0x%08lx\n",pEddgbl->ddPaletteCallbacks); DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_1e0[0] : 0x%08lx\n",pEddgbl->unk_610[0]); DPRINT1("PEDD_DIRECTDRAW_GLOBAL->unk_610[1] : 0x%08lx\n",pEddgbl->unk_610[1]); Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] Sat Apr 26 04:29:10 2008 @@ -178,7 +178,7 @@ STDCALL DxEngLockShareSem() { - BOOLEAN retVal = 0; + BOOLEAN retVal = FALSE; DPRINT1("ReactX Calling : DxEngLockShareSem\n"); #if 0 if (ExIsResourceAcquiredExclusiveLite(&ghsemShareDevLock) == FALSE) @@ -541,11 +541,11 @@ PGDIDEVICE pPDev = (PGDIDEVICE)hDev; PERESOURCE Resource; + DPRINT1("ReactX Calling : DxEngLockHdev \n"); + DPRINT1("hDev : 0x%08lx\n",hDev); Resource = pPDev->hsemDevLock; - - DPRINT1("ReactX Calling : DxEngLockHdev \n"); if (Resource) {
16 years, 8 months
1
0
0
0
[dchapyshev] 33146: - Add US IBM Arabic 238_L and Icelandic layouts to bootcd
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Apr 25 11:50:06 2008 New Revision: 33146 URL:
http://svn.reactos.org/svn/reactos?rev=33146&view=rev
Log: - Add US IBM Arabic 238_L and Icelandic layouts to bootcd Modified: trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Fri Apr 25 11:50:06 2008 @@ -59,6 +59,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout File",0x00000000,"kbddv.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Id", 0x00000000,"0002" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00010409","Layout Text",0x00000000,"US-Dvorak" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout File",0x00000000,"kbdusa.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Id", 0x00000000,"000B" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00050409","Layout Text",0x00000000,"US English (IBM Arabic 238_L)" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout File",0x00000000,"kbdes.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040a","Layout Text",0x00000000,"Spanish" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040b","Layout File",0x00000000,"kbdfi.dll" @@ -67,6 +70,8 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040c","Layout Text",0x00000000,"French" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout File",0x00000000,"kbdheb.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040d","Layout Text",0x00000000,"Hebrew" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout File",0x00000000,"kbdic.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000040f","Layout Text",0x00000000,"Icelandic" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout File",0x00000000,"kbdit.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000410","Layout Text",0x00000000,"Italian" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000411","Layout File",0x00000000,"kbdja.dll" Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Fri Apr 25 11:50:06 2008 @@ -154,6 +154,7 @@ dll\keyboard\kbdhe\kbdhe.dll 1 dll\keyboard\kbdheb\kbdheb.dll 1 dll\keyboard\kbdhu\kbdhu.dll 1 +dll\keyboard\kbdic\kbdic.dll 1 dll\keyboard\kbdit\kbdit.dll 1 dll\keyboard\kbdja\kbdja.dll 1 dll\keyboard\kbdlt\kbdlt.dll 1 @@ -161,7 +162,7 @@ dll\keyboard\kbdpl1\kbdpl1.dll 1 dll\keyboard\kbdpo\kbdpo.dll 1 dll\keyboard\kbdru\kbdru.dll 1 -dll\keyboard\kbdru1\kbdru1.dll 1 +dll\keyboard\kbdru1\kbdru1.dll 1 dll\keyboard\kbdsg\kbdsg.dll 1 dll\keyboard\kbdsk\kbdsk.dll 1 dll\keyboard\kbdsw\kbdsw.dll 1 @@ -169,6 +170,7 @@ dll\keyboard\kbduk\kbduk.dll 1 dll\keyboard\kbdur\kbdur.dll 1 dll\keyboard\kbdus\kbdus.dll 1 +dll\keyboard\kbdusa\kbdusa.dll 1 dll\ntdll\ntdll.dll 1 Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Fri Apr 25 11:50:06 2008 @@ -131,7 +131,7 @@ [KeyboardLayout] -0000041c = "Albanian" +0000041C = "Albanian" 00040402 = "Bulgarian BDS 5237-1978" 00020402 = "Bulgarian phonetic classic" 00030402 = "Bulgarian phonetic BDS 5237-2006" @@ -151,6 +151,7 @@ 00010408 = "Greek 220" 0000040D = "Hebrew" 0000040E = "Hungarian" +0000040F = "Icelandic" 00000410 = "Italian" 00000411 = "Japanese" 00000427 = "Lithuanian" @@ -164,17 +165,20 @@ 0000041D = "Swedish (Sweden)" 0000041E = "Thai (traditional)" 00000422 = "Ukrainian" +00050409 = "US English (IBM Arabic 238_L)" [Files.KeyboardLayout] -00040402 = kbdbgm.dll 00020402 = kbdbgt.dll 00030402 = kbdbga.dll +00040402 = kbdbgm.dll 0000080C = kbdbe.dll 00000813 = kbdbe.dll 00000455 = kbdbur.dll 00000405 = kbdcz1.dll 00000406 = kbdda.dll +00000409 = kbdus.dll 00010409 = kbddv.dll +00050409 = kbdusa.dll 0000040A = kbdes.dll 0000040B = kbdfi.dll 0000040C = kbdfr.dll @@ -183,6 +187,7 @@ 00010408 = kbdhe.dll 0000040D = kbdheb.dll 0000040E = kbdhu.dll +0000040F = kbdic.dll 00000410 = kbdit.dll 00000411 = kbdja.dll 0000041c = kbdal.dll @@ -198,7 +203,6 @@ 0000041E = kbdth.dll 00000809 = kbduk.dll 00000422 = kbdur.dll -00000409 = kbdus.dll [HiveInfs.Install] AddReg=hivecls.inf,AddReg
16 years, 8 months
1
0
0
0
[dchapyshev] 33145: - Add US IBM Arabic 238_L keyboard layout - Add Icelandic keyboard layout
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Fri Apr 25 11:49:17 2008 New Revision: 33145 URL:
http://svn.reactos.org/svn/reactos?rev=33145&view=rev
Log: - Add US IBM Arabic 238_L keyboard layout - Add Icelandic keyboard layout Added: trunk/reactos/dll/keyboard/kbdic/ trunk/reactos/dll/keyboard/kbdic/kbdic.c (with props) trunk/reactos/dll/keyboard/kbdic/kbdic.def (with props) trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild (with props) trunk/reactos/dll/keyboard/kbdic/kbdic.rc (with props) trunk/reactos/dll/keyboard/kbdusa/ trunk/reactos/dll/keyboard/kbdusa/kbdusa.c (with props) trunk/reactos/dll/keyboard/kbdusa/kbdusa.def (with props) trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild (with props) trunk/reactos/dll/keyboard/kbdusa/kbdusa.rc (with props) Modified: trunk/reactos/dll/keyboard/keyboard.rbuild Added: trunk/reactos/dll/keyboard/kbdic/kbdic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/kbdic.c…
============================================================================== --- trunk/reactos/dll/keyboard/kbdic/kbdic.c (added) +++ trunk/reactos/dll/keyboard/kbdic/kbdic.c [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,477 @@ +/* + * ReactOS Icelandic Keyboard layout + * Copyright (C) 2008 ReactOS + * Author: Dmitry Chapyshev + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ */ + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_MINUS, VK_OEM_PLUS, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'W', 'E', + 'R', 'T', 'Y', 'U', + 'I', 'O', 'P', + VK_OEM_4, VK_OEM_6, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'A', 'S', 'D', 'F', + 'G', 'H', 'J', 'K', + 'L', VK_OEM_1, VK_OEM_7, VK_OEM_3, + VK_LSHIFT, VK_OEM_5, + /* - 2c - */ + /* Third letters row */ + 'Z', 'X', 'C', 'V', + 'B', 'N', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD,VK_OEM_2, VK_RSHIFT | KEXT, + /* - 37 - */ + /* Bottom Row */ + 0x26a, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_OEM_WSCTRL,VK_OEM_FINISH,VK_OEM_JUMP, VK_EREOF, /* EREOF */ + VK_OEM_BACKTAB, VK_OEM_AUTO, VK_EMPTY, VK_ZOOM, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_OEM_PA3, VK_EMPTY, VK_OEM_RESET, + /* - 72 - */ + VK_EMPTY, 0xc1, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ + 0, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = { + modifier_keys, + 3, + { 0, 1, 2, 3, 0, 0, 0xC0 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { '1', NOCAPS, {'1', '!' } }, + { '2', NOCAPS, {'2', '\"' } }, + { '3', NOCAPS, {'3', '#' } }, + { '4', NOCAPS, {'4', '$' } }, + { VK_OEM_4, NOCAPS, {'-', '_' } }, + { 'W', CAPS, {'w', 'W' } }, + { 'R', CAPS, {'r', 'R' } }, + { 'T', CAPS, {'t', 'T' } }, + { 'Y', CAPS, {'y', 'Y' } }, + { 'U', CAPS, {'u', 'U' } }, + { 'I', CAPS, {'i', 'I' } }, + { 'O', CAPS, {'o', 'O' } }, + { 'P', CAPS, {'p', 'P' } }, + { 'A', CAPS, {'a', 'A' } }, + { 'S', CAPS, {'s', 'S' } }, + { 'D', CAPS, {'d', 'D' } }, + { 'F', CAPS, {'f', 'F' } }, + { 'G', CAPS, {'g', 'G' } }, + { 'H', CAPS, {'h', 'H' } }, + { 'J', CAPS, {'j', 'J' } }, + { 'K', CAPS, {'k', 'K' } }, + { 'L', CAPS, {'l', 'L' } }, + { VK_OEM_3, CAPS, {0x00e6, 0x00c6} }, + { 'Z', CAPS, {'z', 'Z' } }, + { 'X', CAPS, {'x', 'X' } }, + { 'C', CAPS, {'c', 'C' } }, + { 'V', CAPS, {'v', 'V' } }, + { 'B', CAPS, {'b', 'B' } }, + { 'N', CAPS, {'n', 'N' } }, + { VK_OEM_COMMA, NOCAPS, {',', ';' } }, + { VK_OEM_PERIOD, NOCAPS, {'.', ':' } }, + { VK_DECIMAL, NOCAPS, {',', ',' } }, + { VK_TAB, NOCAPS, {'\t', '\t' } }, + { VK_ADD, NOCAPS, {'+', '+' } }, + { VK_DIVIDE, NOCAPS, {'/', '/' } }, + { VK_MULTIPLY, NOCAPS, {'*', '*' } }, + { VK_SUBTRACT, NOCAPS, {'-', '-' } }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Ctrl */ + /* Legacy (telnet-style) ascii escapes */ + { '5', NOCAPS, {'5', '%', 0x20ac } }, + { '7', NOCAPS, {'7', '/', '{' } }, + { '8', NOCAPS, {'8', '(', '[' } }, + { '9', NOCAPS, {'9', ')', ']' } }, + { '0', NOCAPS, {'0', '=', '}' } }, + { VK_OEM_PLUS, CAPS, {0x00f6, 0x00d6, '\\' } }, + { 'Q', CAPS, {'q', 'Q', '@' } }, + { 'E', CAPS, {'e', 'E', 0x20ac } }, + { VK_OEM_2, NOCAPS, {'+', '*', WCH_DEAD} }, + { 0xff, NOCAPS, {WCH_NONE, WCH_NONE, '`' } }, + { VK_OEM_7, NOCAPS, {WCH_DEAD, '\'', WCH_DEAD} }, + { 0xff, NOCAPS, {0x00b4, WCH_NONE, '^' } }, + { 'M', CAPS, {'m', 'M', 0x00b5 } }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Ctrl-Alt, Ctrl */ + /* Legacy Ascii generators */ + { VK_OEM_5, NOCAPS, {WCH_DEAD, WCH_DEAD, 0x00b0,0x001c } }, + { 0xff, NOCAPS, {0x00b0, 0x00a8, WCH_NONE, WCH_NONE} }, + { VK_OEM_6, CAPS, {0x00f0, 0x00d0, WCH_NONE, 0x001b } }, + { VK_OEM_1, NOCAPS, {'\'', '?', '~', 0x001d } }, + { VK_OEM_MINUS, CAPS, {0x00fe, 0x00de, WCH_NONE, 0x001f } }, + { VK_OEM_102, NOCAPS, {'<', '>', '|', 0x001c } }, + { VK_BACK, NOCAPS, {'\b', '\b', WCH_NONE, 0x007f } }, + { VK_ESCAPE, NOCAPS, {0x001b, 0x001b, WCH_NONE, 0x001b } }, + { VK_RETURN, NOCAPS, {'\r', '\r', WCH_NONE, '\n' } }, + { VK_SPACE, NOCAPS, {' ', ' ', WCH_NONE, ' ' } }, + { VK_CANCEL, NOCAPS, {0x0003, 0x0003, WCH_NONE, 0x0003 } }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS5 key_to_chars_5mod[] = { + /* Normal, Shifted, Ctrl-Alt, Ctrl, S+Ctrl */ + /* Legacy Ascii generators */ + { '6', NOCAPS, {'6', '&', WCH_NONE, WCH_NONE, 0x001e} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(5,key_to_chars_5mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x01, L"Esc" }, + { 0x0e, L"Backspace" }, + { 0x0f, L"Tab" }, + { 0x1c, L"Enter" }, + { 0x1d, L"Ctrl" }, + { 0x2a, L"Shift" }, + { 0x36, L"Right Shift" }, + { 0x37, L"Num *" }, + { 0x38, L"Alt" }, + { 0x39, L"Space" }, + { 0x3a, L"Caps Lock" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Scroll Lock" }, + { 0x47, L"Num 7" }, + { 0x48, L"Num 8" }, + { 0x49, L"Num 9" }, + { 0x4a, L"Num -" }, + { 0x4b, L"Num 4" }, + { 0x4c, L"Num 5" }, + { 0x4d, L"Num 6" }, + { 0x4e, L"Num +" }, + { 0x4f, L"Num 1" }, + { 0x50, L"Num 2" }, + { 0x51, L"Num 3" }, + { 0x52, L"Num 0" }, + { 0x53, L"Num Del" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL } +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Num Enter" }, + { 0x1d, L"Right Control" }, + { 0x35, L"Num /" }, + { 0x37, L"Prnt Scrn" }, + { 0x38, L"Right Alt" }, + { 0x45, L"Num Lock" }, + { 0x46, L"Break" }, + { 0x47, L"Home" }, + { 0x48, L"Up" }, + { 0x49, L"Page Up" }, + { 0x4b, L"Left" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Right" }, + { 0x4f, L"End" }, + { 0x50, L"Down" }, + { 0x51, L"Page Down" }, + { 0x52, L"Insert" }, + { 0x53, L"Delete" }, + { 0x54, L"<ReactOS>" }, + { 0x56, L"Help" }, + { 0x5b, L"Left <ReactOS>" }, + { 0x5c, L"Right <ReactOS>" }, + { 0x5d, L"Application" }, + { 0, NULL } +}; + +ROSDATA DEADKEY_LPWSTR dead_key_names[] = { + L"\x00b4" L"ACUTE", + L"`" L"GRAVE", + L"^" L"CIRCUMFLEX", + L"\x00a8" L"UMLAUT", + L"\x00b0" L"RING", + NULL +}; + +#define DEADTRANS(ch, accent, comp, flags) MAKELONG(ch, accent), comp, flags + +ROSDATA DEADKEY dead_key[] = { + { DEADTRANS(L'a', L'`', 0x00e0, 0x0000) }, + { DEADTRANS(L'e', L'`', 0x00e8, 0x0000) }, + { DEADTRANS(L'i', L'`', 0x00ec, 0x0000) }, + { DEADTRANS(L'o', L'`', 0x00f2, 0x0000) }, + { DEADTRANS(L'u', L'`', 0x00f9, 0x0000) }, + { DEADTRANS(L'A', L'`', 0x00c0, 0x0000) }, + { DEADTRANS(L'E', L'`', 0x00c8, 0x0000) }, + { DEADTRANS(L'I', L'`', 0x00cc, 0x0000) }, + { DEADTRANS(L'O', L'`', 0x00d2, 0x0000) }, + { DEADTRANS(L'U', L'`', 0x00d9, 0x0000) }, + { DEADTRANS(L' ', L'`', L'`', 0x0000) }, + + { DEADTRANS(L'a', 0x00b4, 0x00e1, 0x0000) }, + { DEADTRANS(L'e', 0x00b4, 0x00e9, 0x0000) }, + { DEADTRANS(L'i', 0x00b4, 0x00ed, 0x0000) }, + { DEADTRANS(L'o', 0x00b4, 0x00f3, 0x0000) }, + { DEADTRANS(L'u', 0x00b4, 0x00fa, 0x0000) }, + { DEADTRANS(L'y', 0x00b4, 0x00fd, 0x0000) }, + { DEADTRANS(L'A', 0x00b4, 0x00c1, 0x0000) }, + { DEADTRANS(L'E', 0x00b4, 0x00c9, 0x0000) }, + { DEADTRANS(L'I', 0x00b4, 0x00cd, 0x0000) }, + { DEADTRANS(L'O', 0x00b4, 0x00d3, 0x0000) }, + { DEADTRANS(L'U', 0x00b4, 0x00da, 0x0000) }, + { DEADTRANS(L'Y', 0x00b4, 0x00dd, 0x0000) }, + { DEADTRANS(L' ', 0x00b4, 0x00b4, 0x0000) }, + + { DEADTRANS(L'a', L'^', 0x00e2, 0x0000) }, + { DEADTRANS(L'e', L'^', 0x00ea, 0x0000) }, + { DEADTRANS(L'i', L'^', 0x00ee, 0x0000) }, + { DEADTRANS(L'o', L'^', 0x00f4, 0x0000) }, + { DEADTRANS(L'u', L'^', 0x00fb, 0x0000) }, + { DEADTRANS(L'A', L'^', 0x00c2, 0x0000) }, + { DEADTRANS(L'E', L'^', 0x00ca, 0x0000) }, + { DEADTRANS(L'I', L'^', 0x00ce, 0x0000) }, + { DEADTRANS(L'O', L'^', 0x00d4, 0x0000) }, + { DEADTRANS(L'U', L'^', 0x00db, 0x0000) }, + { DEADTRANS(L' ', L'^', L'^', 0x0000) }, + + { DEADTRANS(L'a', 0x00b0, 0x00e5, 0x0000) }, + { DEADTRANS(L'A', 0x00b0, 0x00c5, 0x0000) }, + { DEADTRANS(L' ', 0x00b0, 0x00b0, 0x0000) }, + + { DEADTRANS(L'a', 0x00a8, 0x00e4, 0x0000) }, + { DEADTRANS(L'e', 0x00a8, 0x00eb, 0x0000) }, + { DEADTRANS(L'i', 0x00a8, 0x00ef, 0x0000) }, + { DEADTRANS(L'o', 0x00a8, 0x00f6, 0x0000) }, + { DEADTRANS(L'u', 0x00a8, 0x00fc, 0x0000) }, + { DEADTRANS(L'y', 0x00a8, 0x00ff, 0x0000) }, + { DEADTRANS(L'A', 0x00a8, 0x00c4, 0x0000) }, + { DEADTRANS(L'E', 0x00a8, 0x00cb, 0x0000) }, + { DEADTRANS(L'I', 0x00a8, 0x00cf, 0x0000) }, + { DEADTRANS(L'O', 0x00a8, 0x00d6, 0x0000) }, + { DEADTRANS(L'U', 0x00a8, 0x00dc, 0x0000) }, + { DEADTRANS(L' ', 0x00a8, 0x00a8, 0x0000) }, + { 0, 0 } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks */ + dead_key, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + dead_key_names, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(0,1), /* Version 1.0 */ + + /* Ligatures -- Russian doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor(VOID) { + return &keyboard_layout_table; +} + +INT STDCALL +DllMain( + PVOID hinstDll, + ULONG dwReason, + PVOID reserved) +{ + return 1; +} + Propchange: trunk/reactos/dll/keyboard/kbdic/kbdic.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdic/kbdic.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/kbdic.d…
============================================================================== --- trunk/reactos/dll/keyboard/kbdic/kbdic.def (added) +++ trunk/reactos/dll/keyboard/kbdic/kbdic.def [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdic.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Propchange: trunk/reactos/dll/keyboard/kbdic/kbdic.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/kbdic.r…
============================================================================== --- trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild (added) +++ trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="kbdic" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kbdic.dll" allowwarnings="true"> + <importlibrary definition="kbdic.def" /> + <include base="ntoskrnl">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="_WIN32_WINNT">0x0500</define> + <file>kbdic.c</file> + <file>kbdic.rc</file> +</module> Propchange: trunk/reactos/dll/keyboard/kbdic/kbdic.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdic/kbdic.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdic/kbdic.r…
============================================================================== --- trunk/reactos/dll/keyboard/kbdic/kbdic.rc (added) +++ trunk/reactos/dll/keyboard/kbdic/kbdic.rc [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Icelandic Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdic\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdic.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/keyboard/kbdic/kbdic.rc ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdusa/kbdusa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/kbdusa…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusa/kbdusa.c (added) +++ trunk/reactos/dll/keyboard/kbdusa/kbdusa.c [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,398 @@ +/* + * ReactOS US IBM Arabic 238_L Keyboard layout + * Copyright (C) 2008 ReactOS + * Author: Dmitry Chapyshev + * License: LGPL, see: LGPL.txt + * + * Thanks to:
http://www.barcodeman.com/altek/mule/scandoc.php
+ * and
http://win.tue.nl/~aeb/linux/kbd/scancodes-1.html
+ */ + +#include <windows.h> +#include <internal/kbd.h> + +#ifdef _M_IA64 +#define ROSDATA static __declspec(allocate(".data")) +#else +#ifdef _MSC_VER +#pragma data_seg(".data") +#define ROSDATA static +#else +#define ROSDATA static __attribute__((section(".data"))) +#endif +#endif + +#define VK_EMPTY 0xff /* The non-existent VK */ +#define KSHIFT 0x001 /* Shift modifier */ +#define KCTRL 0x002 /* Ctrl modifier */ +#define KALT 0x004 /* Alt modifier */ +#define KEXT 0x100 /* Extended key code */ +#define KMULTI 0x200 /* Multi-key */ +#define KSPEC 0x400 /* Special key */ +#define KNUMP 0x800 /* Number-pad */ +#define KNUMS 0xc00 /* Special + number pad */ +#define KMEXT 0x300 /* Multi + ext */ + +#define SHFT_INVALID 0x0F + +ROSDATA USHORT scancode_to_vk[] = { + /* Numbers Row */ + /* - 00 - */ + /* 1 ... 2 ... 3 ... 4 ... */ + VK_EMPTY, VK_ESCAPE, '1', '2', + '3', '4', '5', '6', + '7', '8', '9', '0', + VK_OEM_MINUS, VK_OEM_PLUS, VK_BACK, + /* - 0f - */ + /* First Letters Row */ + VK_TAB, 'Q', 'W', 'E', + 'R', 'T', 'Y', 'U', + 'I', 'O', 'P', + VK_OEM_4, VK_OEM_6, VK_RETURN, + /* - 1d - */ + /* Second Letters Row */ + VK_LCONTROL, + 'A', 'S', 'D', 'F', + 'G', 'H', 'J', 'K', + 'L', VK_OEM_1, VK_OEM_7, VK_OEM_3, + VK_LSHIFT, VK_OEM_5, + /* - 2c - */ + /* Third letters row */ + 'Z', 'X', 'C', 'V', + 'B', 'N', 'M', VK_OEM_COMMA, + VK_OEM_PERIOD,VK_OEM_2, VK_RSHIFT | KEXT, + /* - 37 - */ + /* Bottom Row */ + 0x26a, VK_LMENU, VK_SPACE, VK_CAPITAL, + + /* - 3b - */ + /* F-Keys */ + VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, + VK_F7, VK_F8, VK_F9, VK_F10, + /* - 45 - */ + /* Locks */ + VK_NUMLOCK | KMEXT, + VK_SCROLL | KMULTI, + /* - 47 - */ + /* Number-Pad */ + VK_HOME | KNUMS, VK_UP | KNUMS, VK_PRIOR | KNUMS, VK_SUBTRACT, + VK_LEFT | KNUMS, VK_CLEAR | KNUMS, VK_RIGHT | KNUMS, VK_ADD, + VK_END | KNUMS, VK_DOWN | KNUMS, VK_NEXT | KNUMS, + VK_INSERT | KNUMS, VK_DELETE | KNUMS, + /* - 54 - */ + /* Presumably PrtSc */ + VK_SNAPSHOT, + /* - 55 - */ + /* Oddities, and the remaining standard F-Keys */ + VK_EMPTY, VK_OEM_102, VK_F11, VK_F12, + /* - 59 - */ + VK_CLEAR, VK_OEM_WSCTRL,VK_OEM_FINISH,VK_OEM_JUMP, VK_EREOF, /* EREOF */ + VK_OEM_BACKTAB, VK_OEM_AUTO, VK_EMPTY, VK_ZOOM, /* ZOOM */ + VK_HELP, + /* - 64 - */ + /* Even more F-Keys (for example, NCR keyboards from the early 90's) */ + VK_F13, VK_F14, VK_F15, VK_F16, VK_F17, VK_F18, VK_F19, VK_F20, + VK_F21, VK_F22, VK_F23, + /* - 6f - */ + /* Not sure who uses these codes */ + VK_OEM_PA3, VK_EMPTY, VK_OEM_RESET, + /* - 72 - */ + VK_EMPTY, 0xc1, VK_EMPTY, VK_EMPTY, + /* - 76 - */ + /* One more f-key */ + VK_F24, + /* - 77 - */ + VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, + VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ + 0, + /* - 80 - */ + 0 +}; + +ROSDATA VSC_VK extcode0_to_vk[] = { + { 0x10, VK_MEDIA_PREV_TRACK | KEXT }, + { 0x19, VK_MEDIA_NEXT_TRACK | KEXT }, + { 0x1D, VK_RCONTROL | KEXT }, + { 0x20, VK_VOLUME_MUTE | KEXT }, + { 0x21, VK_LAUNCH_APP2 | KEXT }, + { 0x22, VK_MEDIA_PLAY_PAUSE | KEXT }, + { 0x24, VK_MEDIA_STOP | KEXT }, + { 0x2E, VK_VOLUME_DOWN | KEXT }, + { 0x30, VK_VOLUME_UP | KEXT }, + { 0x32, VK_BROWSER_HOME | KEXT }, + { 0x35, VK_DIVIDE | KEXT }, + { 0x37, VK_SNAPSHOT | KEXT }, + { 0x38, VK_RMENU | KEXT }, + { 0x47, VK_HOME | KEXT }, + { 0x48, VK_UP | KEXT }, + { 0x49, VK_PRIOR | KEXT }, + { 0x4B, VK_LEFT | KEXT }, + { 0x4D, VK_RIGHT | KEXT }, + { 0x4F, VK_END | KEXT }, + { 0x50, VK_DOWN | KEXT }, + { 0x51, VK_NEXT | KEXT }, + { 0x52, VK_INSERT | KEXT }, + { 0x53, VK_DELETE | KEXT }, + { 0x5B, VK_LWIN | KEXT }, + { 0x5C, VK_RWIN | KEXT }, + { 0x5D, VK_APPS | KEXT }, + { 0x5F, VK_SLEEP | KEXT }, + { 0x65, VK_BROWSER_SEARCH | KEXT }, + { 0x66, VK_BROWSER_FAVORITES | KEXT }, + { 0x67, VK_BROWSER_REFRESH | KEXT }, + { 0x68, VK_BROWSER_STOP | KEXT }, + { 0x69, VK_BROWSER_FORWARD | KEXT }, + { 0x6A, VK_BROWSER_BACK | KEXT }, + { 0x6B, VK_LAUNCH_APP1 | KEXT }, + { 0x6C, VK_LAUNCH_MAIL | KEXT }, + { 0x6D, VK_LAUNCH_MEDIA_SELECT | KEXT }, + { 0x1C, VK_RETURN | KEXT }, + { 0x46, VK_CANCEL | KEXT }, + { 0, 0 }, +}; + +ROSDATA VSC_VK extcode1_to_vk[] = { + { 0x1d, VK_PAUSE}, + { 0, 0 }, +}; + +ROSDATA VK_TO_BIT modifier_keys[] = { + { VK_SHIFT, KSHIFT }, + { VK_CONTROL, KCTRL }, + { VK_MENU, KALT }, + { 0, 0 } +}; + +ROSDATA MODIFIERS modifier_bits = { + modifier_keys, + 3, + { 0, 1, 2, 3, 0, 0, 0xC0 } /* Modifier bit order, NONE, SHIFT, CTRL, ALT, MENU, SHIFT + MENU, CTRL + MENU */ +}; + +#define NOCAPS 0 +#define CAPS KSHIFT /* Caps -> shift */ + +ROSDATA VK_TO_WCHARS2 key_to_chars_2mod[] = { + { VK_OEM_3, NOCAPS, {'<', '>'} }, + { '1', NOCAPS, {'1', '!'} }, + { '3', NOCAPS, {'3', '#'} }, + { '4', NOCAPS, {'4', '$'} }, + { '5', NOCAPS, {'5', '%'} }, + { '7', NOCAPS, {'7', '&'} }, + { '8', NOCAPS, {'8', '*'} }, + { '9', NOCAPS, {'9', '('} }, + { '0', NOCAPS, {'0', ')'} }, + { VK_OEM_PLUS, NOCAPS, {'=', '+'} }, + { 'Q', CAPS, {'q', 'Q'} }, + { 'W', CAPS, {'w', 'W'} }, + { 'E', CAPS, {'e', 'E'} }, + { 'R', CAPS, {'r', 'R'} }, + { 'T', CAPS, {'t', 'T'} }, + { 'Y', CAPS, {'y', 'Y'} }, + { 'U', CAPS, {'u', 'U'} }, + { 'I', CAPS, {'i', 'I'} }, + { 'O', CAPS, {'o', 'O'} }, + { 'P', CAPS, {'p', 'P'} }, + { 'A', CAPS, {'a', 'A'} }, + { 'S', CAPS, {'s', 'S'} }, + { 'D', CAPS, {'d', 'D'} }, + { 'F', CAPS, {'f', 'F'} }, + { 'G', CAPS, {'g', 'G'} }, + { 'H', CAPS, {'h', 'H'} }, + { 'J', CAPS, {'j', 'J'} }, + { 'K', CAPS, {'k', 'K'} }, + { 'L', CAPS, {'l', 'L'} }, + { VK_OEM_1, NOCAPS, {';', ':'} }, + { VK_OEM_7, NOCAPS, {'\'','\"'}}, + { 'Z', CAPS, {'z', 'Z'} }, + { 'X', CAPS, {'x', 'X'} }, + { 'C', CAPS, {'c', 'C'} }, + { 'V', CAPS, {'v', 'V'} }, + { 'B', CAPS, {'b', 'B'} }, + { 'N', CAPS, {'n', 'N'} }, + { 'M', CAPS, {'m', 'M'} }, + { VK_OEM_COMMA, NOCAPS, {',', ','} }, + { VK_OEM_PERIOD,NOCAPS, {'.', '.'} }, + { VK_OEM_2, NOCAPS, {'/', '?'} }, + { VK_DECIMAL, NOCAPS, {'.', '.'} }, + { VK_TAB, NOCAPS, {'\t','\t'}}, + { VK_ADD, NOCAPS, {'+', '+'} }, + { VK_DIVIDE, NOCAPS, {'/', '/'} }, + { VK_MULTIPLY, NOCAPS, {'*', '*'} }, + { VK_SUBTRACT, NOCAPS, {'-', '-'} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS3 key_to_chars_3mod[] = { + /* Normal, Shifted, Ctrl */ + /* Legacy (telnet-style) ascii escapes */ + { VK_OEM_4, NOCAPS, {'[', '{', 0x001b} }, + { VK_OEM_6, NOCAPS, {']', '}', 0x001d} }, + { VK_OEM_5, NOCAPS, {'`', '~', 0x001c} }, + { VK_OEM_102, NOCAPS, {'\\', '|', 0x001c} }, + { VK_BACK, NOCAPS, {'\b', '\b', 0x007f} }, + { VK_ESCAPE, NOCAPS, {0x001b, 0x001b, 0x001b} }, + { VK_RETURN, NOCAPS, {'\r', '\r', '\n' } }, + { VK_SPACE, NOCAPS, {' ', ' ', ' ' } }, + { VK_CANCEL, NOCAPS, {0x0003, 0x0003, 0x0003} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS4 key_to_chars_4mod[] = { + /* Normal, Shifted, Ctrl-Alt, Ctrl */ + /* Legacy Ascii generators */ + { '2', NOCAPS, {'2', '@', WCH_NONE, 0x0000} }, + { '6', NOCAPS, {'6', '^', WCH_NONE, 0x001e} }, + { VK_OEM_MINUS, NOCAPS, {'-', '_', WCH_NONE, 0x001f} }, + { 0, 0 } +}; + +ROSDATA VK_TO_WCHARS1 keypad_numbers[] = { + { VK_NUMPAD0, 0, {'0'} }, + { VK_NUMPAD1, 0, {'1'} }, + { VK_NUMPAD2, 0, {'2'} }, + { VK_NUMPAD3, 0, {'3'} }, + { VK_NUMPAD4, 0, {'4'} }, + { VK_NUMPAD5, 0, {'5'} }, + { VK_NUMPAD6, 0, {'6'} }, + { VK_NUMPAD7, 0, {'7'} }, + { VK_NUMPAD8, 0, {'8'} }, + { VK_NUMPAD9, 0, {'9'} }, + { 0,0 } +}; + +#define vk_master(n,x) { (PVK_TO_WCHARS1)x, n, sizeof(x[0]) } + +ROSDATA VK_TO_WCHAR_TABLE vk_to_wchar_master_table[] = { + vk_master(3,key_to_chars_3mod), + vk_master(4,key_to_chars_4mod), + vk_master(2,key_to_chars_2mod), + vk_master(1,keypad_numbers), + { 0,0,0 } +}; + +ROSDATA VSC_LPWSTR key_names[] = { + { 0x01, L"Esc" }, + { 0x0e, L"Backspace" }, + { 0x0f, L"Tab" }, + { 0x1c, L"Enter" }, + { 0x1d, L"Ctrl" }, + { 0x2a, L"Shift" }, + { 0x36, L"Right Shift" }, + { 0x37, L"Num *" }, + { 0x38, L"Alt" }, + { 0x39, L"Space" }, + { 0x3a, L"Caps Lock" }, + { 0x3b, L"F1" }, + { 0x3c, L"F2" }, + { 0x3d, L"F3" }, + { 0x3e, L"F4" }, + { 0x3f, L"F5" }, + { 0x40, L"F6" }, + { 0x41, L"F7" }, + { 0x42, L"F8" }, + { 0x43, L"F9" }, + { 0x44, L"F10" }, + { 0x45, L"Pause" }, + { 0x46, L"Scroll Lock" }, + { 0x47, L"Num 7" }, + { 0x48, L"Num 8" }, + { 0x49, L"Num 9" }, + { 0x4a, L"Num -" }, + { 0x4b, L"Num 4" }, + { 0x4c, L"Num 5" }, + { 0x4d, L"Num 6" }, + { 0x4e, L"Num +" }, + { 0x4f, L"Num 1" }, + { 0x50, L"Num 2" }, + { 0x51, L"Num 3" }, + { 0x52, L"Num 0" }, + { 0x53, L"Num Del" }, + { 0x54, L"Sys Req" }, + { 0x57, L"F11" }, + { 0x58, L"F12" }, + { 0x7c, L"F13" }, + { 0x7d, L"F14" }, + { 0x7e, L"F15" }, + { 0x7f, L"F16" }, + { 0x80, L"F17" }, + { 0x81, L"F18" }, + { 0x82, L"F19" }, + { 0x83, L"F20" }, + { 0x84, L"F21" }, + { 0x85, L"F22" }, + { 0x86, L"F23" }, + { 0x87, L"F24" }, + { 0, NULL } +}; + +ROSDATA VSC_LPWSTR extended_key_names[] = { + { 0x1c, L"Num Enter" }, + { 0x1d, L"Right Control" }, + { 0x35, L"Num /" }, + { 0x37, L"Prnt Scrn" }, + { 0x38, L"Right Alt" }, + { 0x45, L"Num Lock" }, + { 0x46, L"Break" }, + { 0x47, L"Home" }, + { 0x48, L"Up" }, + { 0x49, L"Page Up" }, + { 0x4b, L"Left" }, +//{ 0x4c, L"Center" }, + { 0x4d, L"Right" }, + { 0x4f, L"End" }, + { 0x50, L"Down" }, + { 0x51, L"Page Down" }, + { 0x52, L"Insert" }, + { 0x53, L"Delete" }, + { 0x54, L"<ReactOS>" }, + { 0x56, L"Help" }, + { 0x5b, L"Left <ReactOS>" }, + { 0x5c, L"Right <ReactOS>" }, + { 0x5d, L"Application" }, + { 0, NULL } +}; + +/* Finally, the master table */ +ROSDATA KBDTABLES keyboard_layout_table = { + /* modifier assignments */ + &modifier_bits, + + /* character from vk tables */ + vk_to_wchar_master_table, + + /* diacritical marks */ + NULL, + + /* Key names */ + (VSC_LPWSTR *)key_names, + (VSC_LPWSTR *)extended_key_names, + NULL, /* Dead key names */ + + /* scan code to virtual key maps */ + scancode_to_vk, + sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + extcode0_to_vk, + extcode1_to_vk, + + MAKELONG(0,1), /* Version 1.0 */ + + /* Ligatures -- Russian doesn't have any */ + 0, + 0, + NULL +}; + +PKBDTABLES STDCALL KbdLayerDescriptor(VOID) { + return &keyboard_layout_table; +} + +INT STDCALL +DllMain( + PVOID hinstDll, + ULONG dwReason, + PVOID reserved) +{ + return 1; +} + Propchange: trunk/reactos/dll/keyboard/kbdusa/kbdusa.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdusa/kbdusa.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/kbdusa…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusa/kbdusa.def (added) +++ trunk/reactos/dll/keyboard/kbdusa/kbdusa.def [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,8 @@ +; +; ReactOS Operating System +; +LIBRARY kbdusa.dll + +EXPORTS +KbdLayerDescriptor@0 +;EOF Propchange: trunk/reactos/dll/keyboard/kbdusa/kbdusa.def ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/kbdusa…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild (added) +++ trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,10 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<module name="kbdusa" type="kernelmodedll" entrypoint="0" installbase="system32" installname="kbdusa.dll" allowwarnings="true"> + <importlibrary definition="kbdusa.def" /> + <include base="ntoskrnl">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="_WIN32_WINNT">0x0500</define> + <file>kbdusa.c</file> + <file>kbdusa.rc</file> +</module> Propchange: trunk/reactos/dll/keyboard/kbdusa/kbdusa.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/keyboard/kbdusa/kbdusa.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/kbdusa/kbdusa…
============================================================================== --- trunk/reactos/dll/keyboard/kbdusa/kbdusa.rc (added) +++ trunk/reactos/dll/keyboard/kbdusa/kbdusa.rc [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -1,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS US IBM Arabic 238_L Keyboard Layout\0" +#define REACTOS_STR_INTERNAL_NAME "kbdusa\0" +#define REACTOS_STR_ORIGINAL_FILENAME "kbdusa.dll\0" +#include <reactos/version.rc> Propchange: trunk/reactos/dll/keyboard/kbdusa/kbdusa.rc ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/keyboard/keyboard.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/keyboard/keyboard.rbui…
============================================================================== --- trunk/reactos/dll/keyboard/keyboard.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/keyboard/keyboard.rbuild [iso-8859-1] Fri Apr 25 11:49:17 2008 @@ -49,6 +49,9 @@ <directory name="kbdhu"> <xi:include href="kbdhu/kbdhu.rbuild" /> </directory> + <directory name="kbdic"> + <xi:include href="kbdic/kbdic.rbuild" /> + </directory> <directory name="kbdit"> <xi:include href="kbdit/kbdit.rbuild" /> </directory> @@ -94,4 +97,7 @@ <directory name="kbdus"> <xi:include href="kbdus/kbdus.rbuild" /> </directory> + <directory name="kbdusa"> + <xi:include href="kbdusa/kbdusa.rbuild" /> + </directory> </group>
16 years, 8 months
1
0
0
0
[dreimer] 33144: Replace ROSCalc with Wine Calc.
by dreimer@svn.reactos.org
Author: dreimer Date: Fri Apr 25 10:41:03 2008 New Revision: 33144 URL:
http://svn.reactos.org/svn/reactos?rev=33144&view=rev
Log: Replace ROSCalc with Wine Calc. Added: trunk/rosapps/winecalc/ (with props) trunk/rosapps/winecalc/calculator.ico (with props) trunk/rosapps/winecalc/dialog.c (with props) trunk/rosapps/winecalc/dialog.h (with props) trunk/rosapps/winecalc/lang/ (with props) trunk/rosapps/winecalc/lang/bg-BG.rc (with props) trunk/rosapps/winecalc/lang/ca-ES.rc (with props) trunk/rosapps/winecalc/lang/cs-CZ.rc (with props) trunk/rosapps/winecalc/lang/de-DE.rc (with props) trunk/rosapps/winecalc/lang/el-GR.rc (with props) trunk/rosapps/winecalc/lang/en-US.rc (with props) trunk/rosapps/winecalc/lang/es-ES.rc (with props) trunk/rosapps/winecalc/lang/fi-FI.rc (with props) trunk/rosapps/winecalc/lang/fr-FR.rc (with props) trunk/rosapps/winecalc/lang/hu-HU.rc (with props) trunk/rosapps/winecalc/lang/id-ID.rc (with props) trunk/rosapps/winecalc/lang/it-IT.rc (with props) trunk/rosapps/winecalc/lang/ja-JP.rc (with props) trunk/rosapps/winecalc/lang/ko-KO.rc (with props) trunk/rosapps/winecalc/lang/nb-NO.rc (with props) trunk/rosapps/winecalc/lang/nl-NL.rc (with props) trunk/rosapps/winecalc/lang/pl-PL.rc (with props) trunk/rosapps/winecalc/lang/pt-BR.rc (with props) trunk/rosapps/winecalc/lang/pt-PT.rc (with props) trunk/rosapps/winecalc/lang/ru-RU.rc (with props) trunk/rosapps/winecalc/lang/sk-SK.rc (with props) trunk/rosapps/winecalc/lang/sv-SE.rc (with props) trunk/rosapps/winecalc/lang/th-TH.rc (with props) trunk/rosapps/winecalc/lang/uk-UA.rc (with props) trunk/rosapps/winecalc/lang/zh-CN.rc (with props) trunk/rosapps/winecalc/resource.h (with props) trunk/rosapps/winecalc/rsrc.rc (with props) trunk/rosapps/winecalc/stats.c (with props) trunk/rosapps/winecalc/stats.h (with props) trunk/rosapps/winecalc/winecalc.c (with props) trunk/rosapps/winecalc/winecalc.h (with props) trunk/rosapps/winecalc/winecalc.rbuild (with props) Removed: trunk/rosapps/roscalc/ Modified: trunk/rosapps/directory.rbuild [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/rosapps/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/directory.rbuild?rev=33144…
Added: trunk/rosapps/winecalc/calculator.ico URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/calculator.ico?re…
Added: trunk/rosapps/winecalc/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/dialog.c?rev=3314…
Added: trunk/rosapps/winecalc/dialog.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/dialog.h?rev=3314…
Added: trunk/rosapps/winecalc/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/bg-BG.rc?rev…
Added: trunk/rosapps/winecalc/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/ca-ES.rc?rev…
Added: trunk/rosapps/winecalc/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/cs-CZ.rc?rev…
Added: trunk/rosapps/winecalc/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/de-DE.rc?rev…
Added: trunk/rosapps/winecalc/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/el-GR.rc?rev…
Added: trunk/rosapps/winecalc/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/en-US.rc?rev…
Added: trunk/rosapps/winecalc/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/es-ES.rc?rev…
Added: trunk/rosapps/winecalc/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/fi-FI.rc?rev…
Added: trunk/rosapps/winecalc/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/fr-FR.rc?rev…
Added: trunk/rosapps/winecalc/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/hu-HU.rc?rev…
Added: trunk/rosapps/winecalc/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/id-ID.rc?rev…
Added: trunk/rosapps/winecalc/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/it-IT.rc?rev…
Added: trunk/rosapps/winecalc/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/ja-JP.rc?rev…
Added: trunk/rosapps/winecalc/lang/ko-KO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/ko-KO.rc?rev…
Added: trunk/rosapps/winecalc/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/nb-NO.rc?rev…
Added: trunk/rosapps/winecalc/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/nl-NL.rc?rev…
Added: trunk/rosapps/winecalc/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/pl-PL.rc?rev…
Added: trunk/rosapps/winecalc/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/pt-BR.rc?rev…
Added: trunk/rosapps/winecalc/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/pt-PT.rc?rev…
Added: trunk/rosapps/winecalc/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/ru-RU.rc?rev…
Added: trunk/rosapps/winecalc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/sk-SK.rc?rev…
Added: trunk/rosapps/winecalc/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/sv-SE.rc?rev…
Added: trunk/rosapps/winecalc/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/th-TH.rc?rev…
Added: trunk/rosapps/winecalc/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/uk-UA.rc?rev…
Added: trunk/rosapps/winecalc/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/lang/zh-CN.rc?rev…
Added: trunk/rosapps/winecalc/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/resource.h?rev=33…
Added: trunk/rosapps/winecalc/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/rsrc.rc?rev=33144…
Added: trunk/rosapps/winecalc/stats.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/stats.c?rev=33144…
Added: trunk/rosapps/winecalc/stats.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/stats.h?rev=33144…
Added: trunk/rosapps/winecalc/winecalc.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/winecalc.c?rev=33…
Added: trunk/rosapps/winecalc/winecalc.h URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/winecalc.h?rev=33…
Added: trunk/rosapps/winecalc/winecalc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/winecalc/winecalc.rbuild?r…
16 years, 8 months
1
0
0
0
[dreimer] 33143: Replace Wine Calc with ROSCalc
by dreimer@svn.reactos.org
Author: dreimer Date: Fri Apr 25 10:40:31 2008 New Revision: 33143 URL:
http://svn.reactos.org/svn/reactos?rev=33143&view=rev
Log: Replace Wine Calc with ROSCalc Added: trunk/reactos/base/applications/calc/about.c (with props) trunk/reactos/base/applications/calc/calc.h (with props) trunk/reactos/base/applications/calc/copying.txt (with props) trunk/reactos/base/applications/calc/fun_mpfr.c (with props) trunk/reactos/base/applications/calc/function.c (with props) trunk/reactos/base/applications/calc/help.txt (with props) trunk/reactos/base/applications/calc/readme.txt (with props) trunk/reactos/base/applications/calc/res/ trunk/reactos/base/applications/calc/res/ROS_logo.bmp (with props) trunk/reactos/base/applications/calc/res/calc.ico (with props) trunk/reactos/base/applications/calc/res/calc_sm.ico (with props) trunk/reactos/base/applications/calc/resource.rc (with props) trunk/reactos/base/applications/calc/rpn.c (with props) trunk/reactos/base/applications/calc/rpn_mpfr.c (with props) trunk/reactos/base/applications/calc/todo.txt (with props) trunk/reactos/base/applications/calc/utl.c (with props) trunk/reactos/base/applications/calc/utl_mpfr.c (with props) trunk/reactos/base/applications/calc/whatsnew.txt (with props) trunk/reactos/base/applications/calc/winmain.c (with props) Removed: trunk/reactos/base/applications/calc/calculator.ico trunk/reactos/base/applications/calc/dialog.c trunk/reactos/base/applications/calc/dialog.h trunk/reactos/base/applications/calc/lang/bg-BG.rc trunk/reactos/base/applications/calc/lang/ca-ES.rc trunk/reactos/base/applications/calc/lang/cs-CZ.rc trunk/reactos/base/applications/calc/lang/el-GR.rc trunk/reactos/base/applications/calc/lang/fi-FI.rc trunk/reactos/base/applications/calc/lang/fr-FR.rc trunk/reactos/base/applications/calc/lang/hu-HU.rc trunk/reactos/base/applications/calc/lang/id-ID.rc trunk/reactos/base/applications/calc/lang/ja-JP.rc trunk/reactos/base/applications/calc/lang/ko-KO.rc trunk/reactos/base/applications/calc/lang/nb-NO.rc trunk/reactos/base/applications/calc/lang/nl-NL.rc trunk/reactos/base/applications/calc/lang/pt-BR.rc trunk/reactos/base/applications/calc/lang/pt-PT.rc trunk/reactos/base/applications/calc/lang/sv-SE.rc trunk/reactos/base/applications/calc/lang/th-TH.rc trunk/reactos/base/applications/calc/lang/zh-CN.rc trunk/reactos/base/applications/calc/rsrc.rc trunk/reactos/base/applications/calc/stats.c trunk/reactos/base/applications/calc/stats.h trunk/reactos/base/applications/calc/winecalc.c trunk/reactos/base/applications/calc/winecalc.h Modified: trunk/reactos/base/applications/calc/calc.rbuild trunk/reactos/base/applications/calc/lang/de-DE.rc (contents, props changed) trunk/reactos/base/applications/calc/lang/en-US.rc (contents, props changed) trunk/reactos/base/applications/calc/lang/es-ES.rc (contents, props changed) trunk/reactos/base/applications/calc/lang/it-IT.rc (contents, props changed) trunk/reactos/base/applications/calc/lang/pl-PL.rc trunk/reactos/base/applications/calc/lang/ru-RU.rc (contents, props changed) trunk/reactos/base/applications/calc/lang/sk-SK.rc trunk/reactos/base/applications/calc/lang/uk-UA.rc trunk/reactos/base/applications/calc/resource.h (contents, props changed) [This mail would be too long, it was shortened to contain the URLs only.] Added: trunk/reactos/base/applications/calc/about.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/abo…
Added: trunk/reactos/base/applications/calc/calc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/cal…
Modified: trunk/reactos/base/applications/calc/calc.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/cal…
Removed: trunk/reactos/base/applications/calc/calculator.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/cal…
Added: trunk/reactos/base/applications/calc/copying.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/cop…
Removed: trunk/reactos/base/applications/calc/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/dia…
Removed: trunk/reactos/base/applications/calc/dialog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/dia…
Added: trunk/reactos/base/applications/calc/fun_mpfr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/fun…
Added: trunk/reactos/base/applications/calc/function.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/fun…
Added: trunk/reactos/base/applications/calc/help.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/hel…
Removed: trunk/reactos/base/applications/calc/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/ko-KO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Modified: trunk/reactos/base/applications/calc/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Removed: trunk/reactos/base/applications/calc/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/lan…
Added: trunk/reactos/base/applications/calc/readme.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/rea…
Added: trunk/reactos/base/applications/calc/res/ROS_logo.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
Added: trunk/reactos/base/applications/calc/res/calc.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
Added: trunk/reactos/base/applications/calc/res/calc_sm.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
Modified: trunk/reactos/base/applications/calc/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
Added: trunk/reactos/base/applications/calc/resource.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/res…
Added: trunk/reactos/base/applications/calc/rpn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/rpn…
Added: trunk/reactos/base/applications/calc/rpn_mpfr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/rpn…
Removed: trunk/reactos/base/applications/calc/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/rsr…
Removed: trunk/reactos/base/applications/calc/stats.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/sta…
Removed: trunk/reactos/base/applications/calc/stats.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/sta…
Added: trunk/reactos/base/applications/calc/todo.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/tod…
Added: trunk/reactos/base/applications/calc/utl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/utl…
Added: trunk/reactos/base/applications/calc/utl_mpfr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/utl…
Added: trunk/reactos/base/applications/calc/whatsnew.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/wha…
Removed: trunk/reactos/base/applications/calc/winecalc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/win…
Removed: trunk/reactos/base/applications/calc/winecalc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/win…
Added: trunk/reactos/base/applications/calc/winmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/win…
16 years, 8 months
1
0
0
0
[dreimer] 33142: What do we learn here? Always try patches with a updated trunk. Removed Bulgarian Translation again. Its outdated.
by dreimer@svn.reactos.org
Author: dreimer Date: Fri Apr 25 06:55:28 2008 New Revision: 33142 URL:
http://svn.reactos.org/svn/reactos?rev=33142&view=rev
Log: What do we learn here? Always try patches with a updated trunk. Removed Bulgarian Translation again. Its outdated. Removed: trunk/reactos/base/applications/kbswitch/lang/bg-BG.rc Modified: trunk/reactos/base/applications/kbswitch/rsrc.rc Removed: trunk/reactos/base/applications/kbswitch/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
============================================================================== --- trunk/reactos/base/applications/kbswitch/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/kbswitch/lang/bg-BG.rc (removed) @@ -1,6 +1,0 @@ -LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT - -STRINGTABLE -BEGIN - IDS_EXIT, "Èçõîä" -END Modified: trunk/reactos/base/applications/kbswitch/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/kbswitch…
============================================================================== --- trunk/reactos/base/applications/kbswitch/rsrc.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/kbswitch/rsrc.rc [iso-8859-1] Fri Apr 25 06:55:28 2008 @@ -1,4 +1,3 @@ -#include "lang/bg-BG.rc" #include "lang/cs-CZ.rc" #include "lang/de-DE.rc" #include "lang/en-US.rc"
16 years, 8 months
1
0
0
0
[janderwald] 33140: - implement enumerating DirectPlay service providers - update resources
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Apr 25 05:56:18 2008 New Revision: 33140 URL:
http://svn.reactos.org/svn/reactos?rev=33140&view=rev
Log: - implement enumerating DirectPlay service providers - update resources Modified: trunk/reactos/base/applications/dxdiag/dxdiag.rbuild trunk/reactos/base/applications/dxdiag/lang/en-US.rc trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc trunk/reactos/base/applications/dxdiag/network.c trunk/reactos/base/applications/dxdiag/precomp.h trunk/reactos/base/applications/dxdiag/resource.h Modified: trunk/reactos/base/applications/dxdiag/dxdiag.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
============================================================================== --- trunk/reactos/base/applications/dxdiag/dxdiag.rbuild [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/dxdiag.rbuild [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -14,6 +14,8 @@ <library>version</library> <library>dinput8</library> <library>dxguid</library> + <library>dsound</library> + <library>version</library> <file>system.c</file> <file>display.c</file> <file>sound.c</file> Modified: trunk/reactos/base/applications/dxdiag/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/l…
============================================================================== --- trunk/reactos/base/applications/dxdiag/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/lang/en-US.rc [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -81,6 +81,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + GROUPBOX "Registered DirectPlay Service Provider", -1, 10, 10, 352, 80 + CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60 END IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 @@ -115,4 +117,18 @@ IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver" IDS_NOT_APPLICABLE "Not applicable" IDS_OPTION_YES "Yes" + IDS_DIRECTPLAY_COL_NAME1 "Name" + IDS_DIRECTPLAY_COL_NAME2 "Registry" + IDS_DIRECTPLAY_COL_NAME3 "File" + IDS_DIRECTPLAY_COL_NAME4 "Version" + IDS_DIRECTPLAY8_MODEMSP "DirectPlay8-Modem Service Provider" + IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 Serial Service Provider" + IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX Service Provider" + IDS_DIRECTPLAY8_TCPSP "DirectPlay8-TCP/IP Service Provider" + IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP Connection For DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX Connection For DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Modem Connection For DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Serial Connection For DirectPlay" + IDS_REG_SUCCESS "OK" + IDS_REG_FAIL "Error" END Modified: trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/l…
============================================================================== --- trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/lang/fr-FR.rc [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -81,6 +81,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + GROUPBOX "Registered DirectPlay Service Provider", -1, 10, 10, 352, 80 + CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60 END IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 190 @@ -115,4 +117,18 @@ IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver" IDS_NOT_APPLICABLE "Not applicable" IDS_OPTION_YES "Yes" + IDS_DIRECTPLAY_COL_NAME1 "Name" + IDS_DIRECTPLAY_COL_NAME2 "Registry" + IDS_DIRECTPLAY_COL_NAME3 "File" + IDS_DIRECTPLAY_COL_NAME4 "Version" + IDS_DIRECTPLAY8_MODEMSP "DirectPlay8-Modem Service Provider" + IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 Serial Service Provider" + IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX Service Provider" + IDS_DIRECTPLAY8_TCPSP "DirectPlay8-TCP/IP Service Provider" + IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP Connection For DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX Connection For DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Modem Connection For DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Serial Connection For DirectPlay" + IDS_REG_SUCCESS "OK" + IDS_REG_FAIL "Error" END Modified: trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/l…
============================================================================== --- trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/lang/pl-PL.rc [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -94,6 +94,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + GROUPBOX "Registered DirectPlay Service Provider", -1, 10, 10, 352, 80 + CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60 END STRINGTABLE DISCARDABLE @@ -122,5 +124,18 @@ IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver" IDS_NOT_APPLICABLE "Not applicable" IDS_OPTION_YES "Yes" - + IDS_DIRECTPLAY_COL_NAME1 "Name" + IDS_DIRECTPLAY_COL_NAME2 "Registry" + IDS_DIRECTPLAY_COL_NAME3 "File" + IDS_DIRECTPLAY_COL_NAME4 "Version" + IDS_DIRECTPLAY8_MODEMSP "DirectPlay8-Modem Service Provider" + IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 Serial Service Provider" + IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX Service Provider" + IDS_DIRECTPLAY8_TCPSP "DirectPlay8-TCP/IP Service Provider" + IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP Connection For DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX Connection For DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Modem Connection For DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Serial Connection For DirectPlay" + IDS_REG_SUCCESS "OK" + IDS_REG_FAIL "Error" END Modified: trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/l…
============================================================================== --- trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/lang/ru-RU.rc [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -87,6 +87,8 @@ STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN + GROUPBOX "Registered DirectPlay Service Provider", -1, 10, 10, 352, 80 + CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 332, 60 END STRINGTABLE DISCARDABLE @@ -115,5 +117,18 @@ IDS_DEVICE_FORCEFEEDBACK "Force Feedback-Driver" IDS_NOT_APPLICABLE "Í/Ä" IDS_OPTION_YES "Äà" - + IDS_DIRECTPLAY_COL_NAME1 "Name" + IDS_DIRECTPLAY_COL_NAME2 "Registry" + IDS_DIRECTPLAY_COL_NAME3 "File" + IDS_DIRECTPLAY_COL_NAME4 "Version" + IDS_DIRECTPLAY8_MODEMSP "DirectPlay8-Modem Service Provider" + IDS_DIRECTPLAY8_SERIALSP "DirectPlay8 Serial Service Provider" + IDS_DIRECTPLAY8_IPXSP "DirectPlay8 IPX Service Provider" + IDS_DIRECTPLAY8_TCPSP "DirectPlay8-TCP/IP Service Provider" + IDS_DIRECTPLAY_TCPCONN "Internet TCP/IP Connection For DirectPlay" + IDS_DIRECTPLAY_IPXCONN "IPX Connection For DirectPlay" + IDS_DIRECTPLAY_MODEMCONN "Modem Connection For DirectPlay" + IDS_DIRECTPLAY_SERIALCONN "Serial Connection For DirectPlay" + IDS_REG_SUCCESS "OK" + IDS_REG_FAIL "Error" END Modified: trunk/reactos/base/applications/dxdiag/network.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/n…
============================================================================== --- trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/network.c [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -9,6 +9,298 @@ #include "precomp.h" +typedef struct +{ + WCHAR Guid[40]; + UINT ResourceID; +}DIRECTPLAY_GUID; + +typedef struct _LANGANDCODEPAGE_ + { + WORD lang; + WORD code; +} LANGANDCODEPAGE, *LPLANGANDCODEPAGE; + +static DIRECTPLAY_GUID DirectPlay8SP[] = +{ + { + L"{6D4A3650-628D-11D2-AE0F-006097B01411}", + IDS_DIRECTPLAY8_MODEMSP + }, + { + L"{743B5D60-628D-11D2-AE0F-006097B01411}", + IDS_DIRECTPLAY8_SERIALSP + }, + { + L"{53934290-628D-11D2-AE0F-006097B01411}", + IDS_DIRECTPLAY8_IPXSP + }, + { + L"{EBFE7BA0-628D-11D2-AE0F-006097B01411}", + IDS_DIRECTPLAY8_TCPSP + } +}; + +static DIRECTPLAY_GUID DirectPlaySP[] = +{ + { + L"{36E95EE0-8577-11cf-960C-0080C7534E82}", + IDS_DIRECTPLAY_TCPCONN + }, + { + L"685BC400-9D2C-11cf-A9CD-00AA006886E3", + IDS_DIRECTPLAY_IPXCONN + }, + { + L"{44EAA760-CB68-11cf-9C4E-00A0C905425E}", + IDS_DIRECTPLAY_MODEMCONN + }, + { + L"{0F1D6860-88D9-11cf-9C4E-00A0C905425E}", + IDS_DIRECTPLAY_SERIALCONN + } +}; + +static +VOID +InitListViewColumns(HWND hDlgCtrl) +{ + WCHAR szText[256]; + LVCOLUMNW lvcolumn; + INT Index; + + ZeroMemory(&lvcolumn, sizeof(LVCOLUMNW)); + lvcolumn.pszText = szText; + lvcolumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH; + lvcolumn.fmt = LVCFMT_LEFT; + lvcolumn.cx = 200; + + for(Index = 0; Index < 4; Index++) + { + szText[0] = L'\0'; + LoadStringW(hInst, IDS_DIRECTPLAY_COL_NAME1 + Index, szText, sizeof(szText) / sizeof(WCHAR)); + szText[(sizeof(szText) / sizeof(WCHAR))-1] = L'\0'; + if (Index) + lvcolumn.cx = 98; + if (SendMessageW(hDlgCtrl, LVM_INSERTCOLUMNW, Index, (LPARAM)&lvcolumn) == -1) + return; + } +} + +UINT +FindProviderIndex(LPCWSTR szGuid, DIRECTPLAY_GUID * PreDefProviders) +{ + UINT Index; + for(Index = 0; Index < 4; Index++) + { + if (!wcsncmp(PreDefProviders[Index].Guid, szGuid, 40)) + return Index; + } + return UINT_MAX; +} +static +BOOL +GetFileVersion(WCHAR * szAppName, WCHAR * szVer) +{ + UINT VerSize; + DWORD DummyHandle; + LPVOID pBuf; + WORD lang = 0; + WORD code = 0; + LPLANGANDCODEPAGE lplangcode; + WCHAR szBuffer[100]; + WCHAR * pResult; + BOOL bResult = FALSE; + + static const WCHAR wFormat[] = L"\\StringFileInfo\\%04x%04x\\FileVersion"; + static const WCHAR wTranslation[] = L"VarFileInfo\\Translation"; + + /* query version info size */ + VerSize = GetFileVersionInfoSizeW(szAppName, &DummyHandle); + if (!VerSize) + return FALSE; + + + /* allocate buffer */ + pBuf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, VerSize); + if (!pBuf) + return FALSE; + + + /* query version info */ + if(!GetFileVersionInfoW(szAppName, 0, VerSize, pBuf)) + { + HeapFree(GetProcessHeap(), 0, pBuf); + return FALSE; + } + + /* query lang code */ + if(VerQueryValueW(pBuf, wTranslation, (LPVOID *)&lplangcode, &VerSize)) + { + /* FIXME find language from current locale / if not available, + * default to english + * for now default to first available language + */ + lang = lplangcode->lang; + code = lplangcode->code; + } + /* set up format */ + swprintf(szBuffer, wFormat, lang, code); + /* query manufacturer */ + pResult = NULL; + bResult = VerQueryValueW(pBuf, szBuffer, (LPVOID *)&pResult, &VerSize); + + if (VerSize && bResult && pResult) + { + wcscpy(szVer, pResult); + bResult = TRUE; + } + + HeapFree(GetProcessHeap(), 0, pBuf); + return bResult; +} + +static +BOOL +EnumerateServiceProviders(HKEY hKey, HWND hDlgCtrl, DIRECTPLAY_GUID * PreDefProviders) +{ + DWORD dwIndex = 0; + LONG result; + WCHAR szName[50]; + WCHAR szGUID[40]; + WCHAR szTemp[63]; + WCHAR szResult[MAX_PATH+20] = {0}; + DWORD RegProviders = 0; + DWORD ProviderIndex; + DWORD dwName; + LVITEMW Item; + INT ItemCount; + LRESULT lResult; + + + ItemCount = ListView_GetItemCount(hDlgCtrl); + ZeroMemory(&Item, sizeof(LVITEMW)); + Item.mask = LVIF_TEXT; + Item.pszText = szResult; + Item.iItem = ItemCount; + /* insert all predefined items first */ + for(dwIndex = 0; dwIndex < 4; dwIndex++) + { + Item.iItem = ItemCount + dwIndex; + Item.iSubItem = 0; + szResult[0] = L'\0'; + LoadStringW(hInst, PreDefProviders[dwIndex].ResourceID, szResult, sizeof(szResult)/sizeof(WCHAR)); + szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0'; + lResult = SendMessageW(hDlgCtrl, LVM_INSERTITEM, 0, (LPARAM)&Item); + szResult[0] = L'\0'; + LoadStringW(hInst, IDS_REG_FAIL, szResult, sizeof(szResult)/sizeof(WCHAR)); + szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0'; + Item.iItem = lResult; + Item.iSubItem = 1; + lResult = SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); + } + + dwIndex = 0; + do + { + dwName = sizeof(szName) / sizeof(WCHAR); + result = RegEnumKeyEx(hKey, dwIndex, szName, &dwName, NULL, NULL, NULL, NULL); + if (result == ERROR_SUCCESS) + { + szName[(sizeof(szName)/sizeof(WCHAR))-1] = L'\0'; + + ProviderIndex = UINT_MAX; + if (GetRegValue(hKey, szName, L"GUID", REG_SZ, szGUID, sizeof(szGUID))) + ProviderIndex = FindProviderIndex(szGUID, PreDefProviders); + else + ProviderIndex = UINT_MAX; + + szResult[0] = L'\0'; + /* check if the 'Path' key is available */ + if (!GetRegValue(hKey, szName, L"Path", REG_SZ, szResult, sizeof(szResult))) + { + /* retrieve the path by lookup the CLSID */ + wcscpy(szTemp, L"CLSID\\"); + wcscpy(&szTemp[6], szGUID); + wcscpy(&szTemp[44], L"\\InProcServer32"); + if (!GetRegValue(HKEY_CLASSES_ROOT, szTemp, NULL, REG_SZ, szResult, sizeof(szResult))) + szResult[0] = L'\0'; + } + if (szResult[0]) + { + /* insert path name */ + Item.iSubItem = 2; + Item.iItem = ProviderIndex + ItemCount; + SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); + /* retrieve file version */ + if (!GetFileVersion(szResult, szTemp)) + { + szTemp[0] = L'\0'; + LoadStringW(hInst, IDS_VERSION_UNKNOWN, szTemp, sizeof(szTemp)/sizeof(WCHAR)); + szTemp[(sizeof(szTemp)/sizeof(WCHAR))-1] = L'\0'; + } + Item.iSubItem = 3; + Item.pszText = szTemp; + SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); + Item.pszText = szResult; + } + + if (ProviderIndex != UINT_MAX) + { + RegProviders |= (1 << ProviderIndex); + szResult[0] = L'\0'; + LoadStringW(hInst, IDS_REG_SUCCESS, szResult, sizeof(szResult)); + Item.iSubItem = 1; + + Item.iItem = ProviderIndex + ItemCount; + szResult[(sizeof(szResult)/sizeof(WCHAR))-1] = L'\0'; + SendMessageW(hDlgCtrl, LVM_SETITEM, 0, (LPARAM)&Item); + } + } + dwIndex++; + }while(result != ERROR_NO_MORE_ITEMS); + + /* check if all providers have been registered */ +// if (RegProviders == 15) + return TRUE; + return FALSE; +} + + + +static +void +InitializeDirectPlayDialog(HWND hwndDlg) +{ + HKEY hKey; + LONG result; + HWND hDlgCtrl; + + /* open DirectPlay8 key */ + result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectPlay8\\Service Providers", 0, KEY_READ, &hKey); + if (result != ERROR_SUCCESS) + return; + + hDlgCtrl = GetDlgItem(hwndDlg, IDC_LIST_PROVIDER); + /* initialize list ctrl */ + InitListViewColumns(hDlgCtrl); + + /* enumerate providers */ + result = EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlay8SP); + RegCloseKey(hKey); + if (!result) + return; + + /* open DirectPlay key */ + result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectPlay\\Service Providers", 0, KEY_READ, &hKey); + if (result != ERROR_SUCCESS) + return; + + /* enumerate providers */ + result = EnumerateServiceProviders(hKey, hDlgCtrl, DirectPlaySP); + RegCloseKey(hKey); +} + INT_PTR CALLBACK NetworkPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { @@ -18,6 +310,7 @@ case WM_INITDIALOG: { SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER); + InitializeDirectPlayDialog(hDlg); return TRUE; } } Modified: trunk/reactos/base/applications/dxdiag/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/p…
============================================================================== --- trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -2,14 +2,16 @@ #define PRECOMP_H__ #define DIRECTINPUT_VERSION 0x0800 - +#define DIRECTSOUND_VERSION 0x0800 #include <stdio.h> #include <windows.h> +#include <limits.h> #include <setupapi.h> #include <devguid.h> #include <commctrl.h> #include <dinput.h> +#include <dsound.h> #include "resource.h" typedef struct Modified: trunk/reactos/base/applications/dxdiag/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/r…
============================================================================== --- trunk/reactos/base/applications/dxdiag/resource.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/dxdiag/resource.h [iso-8859-1] Fri Apr 25 05:56:18 2008 @@ -40,6 +40,11 @@ #define IDC_TREE_PORT 6001 #define IDC_RICH_INFO 6002 +/* DirectPlay dialog constants */ +#define IDC_LIST_PROVIDER 7000 + + + /* string resource constants */ #define IDS_MAIN_DIALOG 10000 #define IDS_SYSTEM_DIALOG 10001 @@ -65,6 +70,20 @@ #define IDS_DEVICE_FORCEFEEDBACK 10021 #define IDS_NOT_APPLICABLE 10100 #define IDS_OPTION_YES 10101 +#define IDS_DIRECTPLAY_COL_NAME1 10102 +#define IDS_DIRECTPLAY_COL_NAME2 10103 +#define IDS_DIRECTPLAY_COL_NAME3 10104 +#define IDS_DIRECTPLAY_COL_NAME4 10105 +#define IDS_DIRECTPLAY8_MODEMSP 10106 +#define IDS_DIRECTPLAY8_SERIALSP 10107 +#define IDS_DIRECTPLAY8_IPXSP 10108 +#define IDS_DIRECTPLAY8_TCPSP 10109 +#define IDS_DIRECTPLAY_TCPCONN 10110 +#define IDS_DIRECTPLAY_IPXCONN 10111 +#define IDS_DIRECTPLAY_MODEMCONN 10112 +#define IDS_DIRECTPLAY_SERIALCONN 10113 +#define IDS_REG_FAIL 10114 +#define IDS_REG_SUCCESS 10115 /* icon resource constants */ #define IDI_APPICON 20000
16 years, 8 months
1
0
0
0
[fireball] 33139: - Add more MDL flags. - Reformat MDL implementation (mdlsup.c) to make it readable, and add comments. - Add a couple dozen assertions to validate that MDL flags, state and addresses. - Use ADDRESS_AND_SIZE_TO_SPAN_PAGES macro for nice MDL calculations. - Set Mdl->Process only when required, and set/unset various MDL flags which were being ignored/incorrectly manipulated. - Keep track of Process->NumberOfLockedPages during MDL lock/unlock. - Don't return the base address of the
by fireball@svn.reactos.org
Author: fireball Date: Fri Apr 25 02:55:12 2008 New Revision: 33139 URL:
http://svn.reactos.org/svn/reactos?rev=33139&view=rev
Log: - Add more MDL flags. - Reformat MDL implementation (mdlsup.c) to make it readable, and add comments. - Add a couple dozen assertions to validate that MDL flags, state and addresses. - Use ADDRESS_AND_SIZE_TO_SPAN_PAGES macro for nice MDL calculations. - Set Mdl->Process only when required, and set/unset various MDL flags which were being ignored/incorrectly manipulated. - Keep track of Process->NumberOfLockedPages during MDL lock/unlock. - Don't return the base address of the MDL allocation when mapping locked pages - MDLs have a byte offset which was being ignored. - Fix incorrect usage of MDLs found in the kernel (thanks to the new assertions). - Split kernel vs. user mode MDL requests in a much more organized and optimized fashion. - Fix a number of smaller bugs throughout the code. Modified: trunk/reactos/dll/ntdll/def/ntdll.def trunk/reactos/include/ddk/winddk.h trunk/reactos/ntoskrnl/mm/mdlsup.c trunk/reactos/ntoskrnl/mm/pagefile.c Modified: trunk/reactos/dll/ntdll/def/ntdll.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.def?re…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.def [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll.def [iso-8859-1] Fri Apr 25 02:55:12 2008 @@ -1076,6 +1076,7 @@ towlower towupper vsprintf +vDbgPrintExWithPrefix wcscat wcschr wcscmp Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original) +++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Fri Apr 25 02:55:12 2008 @@ -2378,20 +2378,23 @@ ULONG ByteOffset; } MDL, *PMDL; -#define MDL_MAPPED_TO_SYSTEM_VA 0x0001 -#define MDL_PAGES_LOCKED 0x0002 -#define MDL_SOURCE_IS_NONPAGED_POOL 0x0004 -#define MDL_ALLOCATED_FIXED_SIZE 0x0008 -#define MDL_PARTIAL 0x0010 -#define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020 -#define MDL_IO_PAGE_READ 0x0040 -#define MDL_WRITE_OPERATION 0x0080 -#define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100 -#define MDL_FREE_EXTRA_PTES 0x0200 -#define MDL_IO_SPACE 0x0800 -#define MDL_NETWORK_HEADER 0x1000 -#define MDL_MAPPING_CAN_FAIL 0x2000 -#define MDL_ALLOCATED_MUST_SUCCEED 0x4000 +#define MDL_MAPPED_TO_SYSTEM_VA 0x0001 +#define MDL_PAGES_LOCKED 0x0002 +#define MDL_SOURCE_IS_NONPAGED_POOL 0x0004 +#define MDL_ALLOCATED_FIXED_SIZE 0x0008 +#define MDL_PARTIAL 0x0010 +#define MDL_PARTIAL_HAS_BEEN_MAPPED 0x0020 +#define MDL_IO_PAGE_READ 0x0040 +#define MDL_WRITE_OPERATION 0x0080 +#define MDL_PARENT_MAPPED_SYSTEM_VA 0x0100 +#define MDL_FREE_EXTRA_PTES 0x0200 +#define MDL_DESCRIBES_AWE 0x0400 +#define MDL_IO_SPACE 0x0800 +#define MDL_NETWORK_HEADER 0x1000 +#define MDL_MAPPING_CAN_FAIL 0x2000 +#define MDL_ALLOCATED_MUST_SUCCEED 0x4000 +#define MDL_INTERNAL 0x8000 + #define MDL_MAPPING_FLAGS ( \ MDL_MAPPED_TO_SYSTEM_VA | \ Modified: trunk/reactos/ntoskrnl/mm/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mdlsup.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mdlsup.c [iso-8859-1] Fri Apr 25 02:55:12 2008 @@ -20,948 +20,874 @@ /* GLOBALS *******************************************************************/ #define TAG_MDL TAG('M', 'D', 'L', ' ') - #define MI_MDL_MAPPING_REGION_SIZE (256*1024*1024) -static PVOID MiMdlMappingRegionBase = NULL; -static RTL_BITMAP MiMdlMappingRegionAllocMap; -static ULONG MiMdlMappingRegionHint; -static KSPIN_LOCK MiMdlMappingRegionLock; +PVOID MiMdlMappingRegionBase = NULL; +RTL_BITMAP MiMdlMappingRegionAllocMap; +ULONG MiMdlMappingRegionHint; +KSPIN_LOCK MiMdlMappingRegionLock; extern ULONG MmPageArraySize; -/* -MDL Flags desc. - -MDL_PAGES_LOCKED MmProbeAndLockPages has been called for this mdl -MDL_SOURCE_IS_NONPAGED_POOL mdl has been build by MmBuildMdlForNonPagedPool -MDL_PARTIAL mdl has been built by IoBuildPartialMdl -MDL_MAPPING_CAN_FAIL in case of an error, MmMapLockedPages will return NULL instead of to bugcheck -MDL_MAPPED_TO_SYSTEM_VA mdl has been mapped into kernel space using MmMapLockedPages -MDL_PARTIAL_HAS_BEEN_MAPPED mdl flagged MDL_PARTIAL has been mapped into kernel space using MmMapLockedPages -*/ - -/* FUNCTIONS *****************************************************************/ - - -/* - * @unimplemented - */ -NTSTATUS -STDCALL -MmAdvanceMdl ( - IN PMDL Mdl, - IN ULONG NumberOfBytes - ) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - +/* PRIVATE FUNCTIONS **********************************************************/ VOID INIT_FUNCTION NTAPI MmInitializeMdlImplementation(VOID) { - MEMORY_AREA* Result; - NTSTATUS Status; - PVOID Buffer; - PHYSICAL_ADDRESS BoundaryAddressMultiple; - - BoundaryAddressMultiple.QuadPart = 0; - MiMdlMappingRegionHint = 0; - MiMdlMappingRegionBase = NULL; - - MmLockAddressSpace(MmGetKernelAddressSpace()); - Status = MmCreateMemoryArea(MmGetKernelAddressSpace(), - MEMORY_AREA_MDL_MAPPING, - &MiMdlMappingRegionBase, - MI_MDL_MAPPING_REGION_SIZE, - PAGE_READWRITE, - &Result, - FALSE, - 0, - BoundaryAddressMultiple); - if (!NT_SUCCESS(Status)) - { - MmUnlockAddressSpace(MmGetKernelAddressSpace()); - KEBUGCHECK(0); - } - MmUnlockAddressSpace(MmGetKernelAddressSpace()); - - Buffer = ExAllocatePoolWithTag(NonPagedPool, - MI_MDL_MAPPING_REGION_SIZE / (PAGE_SIZE * 8), - TAG_MDL); - - RtlInitializeBitMap(&MiMdlMappingRegionAllocMap, Buffer, MI_MDL_MAPPING_REGION_SIZE / PAGE_SIZE); - RtlClearAllBits(&MiMdlMappingRegionAllocMap); - - KeInitializeSpinLock(&MiMdlMappingRegionLock); -} - - + MEMORY_AREA* Result; + NTSTATUS Status; + PVOID Buffer; + PHYSICAL_ADDRESS BoundaryAddressMultiple; + + BoundaryAddressMultiple.QuadPart = 0; + MiMdlMappingRegionHint = 0; + MiMdlMappingRegionBase = NULL; + + MmLockAddressSpace(MmGetKernelAddressSpace()); + Status = MmCreateMemoryArea(MmGetKernelAddressSpace(), + MEMORY_AREA_MDL_MAPPING, + &MiMdlMappingRegionBase, + MI_MDL_MAPPING_REGION_SIZE, + PAGE_READWRITE, + &Result, + FALSE, + 0, + BoundaryAddressMultiple); + if (!NT_SUCCESS(Status)) + { + MmUnlockAddressSpace(MmGetKernelAddressSpace()); + KEBUGCHECK(0); + } + MmUnlockAddressSpace(MmGetKernelAddressSpace()); + + Buffer = ExAllocatePoolWithTag(NonPagedPool, + MI_MDL_MAPPING_REGION_SIZE / (PAGE_SIZE * 8), + TAG_MDL); + + RtlInitializeBitMap(&MiMdlMappingRegionAllocMap, Buffer, MI_MDL_MAPPING_REGION_SIZE / PAGE_SIZE); + RtlClearAllBits(&MiMdlMappingRegionAllocMap); + + KeInitializeSpinLock(&MiMdlMappingRegionLock); +} + +/* PUBLIC FUNCTIONS ***********************************************************/ + + +/* + * @implemented + */ +PMDL +NTAPI +MmCreateMdl(IN PMDL Mdl, + IN PVOID Base, + IN ULONG Length) +{ + ULONG Size; + + /* Check if we don't have an MDL built */ + if (!Mdl) + { + /* Calcualte the size we'll need and allocate the MDL */ + Size = MmSizeOfMdl(Base, Length); + Mdl = ExAllocatePoolWithTag(NonPagedPool, Size, TAG_MDL); + if (!Mdl) return NULL; + } + + /* Initialize it */ + MmInitializeMdl(Mdl, Base, Length); + DPRINT("Creating MDL: %p\n", Mdl); + DPRINT("Base: %p. Length: %lx\n", Base, Length); + return Mdl; +} + +/* + * @implemented + */ +ULONG +NTAPI +MmSizeOfMdl(IN PVOID Base, + IN ULONG Length) +{ + /* Return the MDL size */ + return sizeof(MDL) + (ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Length) * sizeof(PFN_NUMBER)); +} + +/* + * @implemented + */ +VOID +NTAPI +MmBuildMdlForNonPagedPool(IN PMDL Mdl) +{ + ULONG i; + ULONG PageCount; + PPFN_NUMBER MdlPages; + PVOID Base; + DPRINT("Building MDL: %p\n", Mdl); + + /* Sanity checks */ + ASSERT(Mdl->ByteCount != 0); + ASSERT((Mdl->MdlFlags & (MDL_PAGES_LOCKED | + MDL_MAPPED_TO_SYSTEM_VA | + MDL_SOURCE_IS_NONPAGED_POOL | + MDL_PARTIAL)) == 0); + + /* We know the MDL isn't associated to a process now */ + Mdl->Process = NULL; + + /* Get page and VA information */ + MdlPages = (PPFN_NUMBER)(Mdl + 1); + Base = Mdl->StartVa; + + /* Set the system address and now get the page count */ + Mdl->MappedSystemVa = (PVOID)((ULONG_PTR)Base + Mdl->ByteOffset); + PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Mdl->MappedSystemVa, Mdl->ByteCount); + ASSERT(PageCount != 0); + + /* Go through each page */ + for (i = 0; i < PageCount; i++) + { + /* Map it */ + *MdlPages++ = MmGetPfnForProcess(NULL, + (PVOID)((ULONG_PTR)Base + (i * PAGE_SIZE))); + } + + /* Set the final flag */ + Mdl->MdlFlags |= MDL_SOURCE_IS_NONPAGED_POOL; +} + +/* + * @implemented + */ +VOID +NTAPI +MmFreePagesFromMdl(IN PMDL Mdl) +{ + PVOID Base; + PPFN_NUMBER Pages; + LONG NumberOfPages; + DPRINT("Freeing MDL: %p\n", Mdl); + + /* Sanity checks */ + ASSERT(KeGetCurrentIrql() <= APC_LEVEL); + ASSERT((Mdl->MdlFlags & MDL_IO_SPACE) == 0); + ASSERT(((ULONG_PTR)Mdl->StartVa & (PAGE_SIZE - 1)) == 0); + + /* Get address and page information */ + Base = (PVOID)((ULONG_PTR)Mdl->StartVa + Mdl->ByteOffset); + NumberOfPages = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Mdl->ByteCount); + + /* Loop all the MDL pages */ + Pages = (PPFN_NUMBER)(Mdl + 1); + while (--NumberOfPages >= 0) + { + /* Dereference each one of them */ + MmDereferencePage(Pages[NumberOfPages]); + } + + /* Remove the pages locked flag */ + Mdl->MdlFlags &= ~MDL_PAGES_LOCKED; +} + +/* + * @implemented + */ PVOID NTAPI -MmGetMdlPageAddress(PMDL Mdl, PVOID Offset) -{ - PPFN_NUMBER MdlPages; - - MdlPages = (PPFN_NUMBER)(Mdl + 1); - - return((PVOID)MdlPages[((ULONG_PTR)Offset) / PAGE_SIZE]); -} - - -/* - * @implemented - */ -VOID STDCALL -MmUnlockPages(PMDL Mdl) -/* - * FUNCTION: Unlocks the physical pages described by a given MDL - * ARGUMENTS: - * MemoryDescriptorList = MDL describing the buffer to be unlocked - * NOTES: The memory described by the specified MDL must have been locked - * previously by a call to MmProbeAndLockPages. As the pages unlocked, the - * MDL is updated - * - * May be called in any process context. - */ -{ - ULONG i; - PPFN_NUMBER MdlPages; - PFN_NUMBER Page; - - /* - * MmProbeAndLockPages MUST have been called to lock this mdl! - * - * Windows will bugcheck if you pass MmUnlockPages an mdl that hasn't been - * locked with MmLockAndProbePages, but (for now) we'll be more forgiving... - */ - if (!(Mdl->MdlFlags & MDL_PAGES_LOCKED)) - { - DPRINT1("MmUnlockPages called for non-locked mdl!\n"); - return; - } - - /* If mdl buffer is mapped io space -> do nothing */ - if (Mdl->MdlFlags & MDL_IO_SPACE) - { - Mdl->MdlFlags &= ~MDL_PAGES_LOCKED; - return; - } - - /* Automagically undo any calls to MmGetSystemAddressForMdl's for this mdl */ - if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) - { - MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl); - } - - /* - * FIXME: I don't know whether this right, but it looks sensible - */ - if ((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) || - (Mdl->MdlFlags & MDL_IO_PAGE_READ)) - { - return; - } - - - MdlPages = (PPFN_NUMBER)(Mdl + 1); - for (i=0; i<(PAGE_ROUND_UP(Mdl->ByteCount+Mdl->ByteOffset)/PAGE_SIZE); i++) - { - Page = MdlPages[i]; - MmUnlockPage(Page); - MmDereferencePage(Page); - } - - Mdl->MdlFlags &= ~MDL_PAGES_LOCKED; -} - - -/* - * @unimplemented +MmMapLockedPages(IN PMDL Mdl, + IN KPROCESSOR_MODE AccessMode) +{ + /* Call the extended version */ + return MmMapLockedPagesSpecifyCache(Mdl, + AccessMode, + MmCached, + NULL, + TRUE, + HighPagePriority); +} + +/* + * @implemented + */ +VOID +NTAPI +MmUnlockPages(IN PMDL Mdl) +{ + ULONG i; + PPFN_NUMBER MdlPages; + PFN_NUMBER Page; + PEPROCESS Process; + PVOID Base; + ULONG Flags, PageCount; + DPRINT("Unlocking MDL: %p\n", Mdl); + + /* Sanity checks */ + ASSERT((Mdl->MdlFlags & MDL_PAGES_LOCKED) != 0); + ASSERT((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) == 0); + ASSERT((Mdl->MdlFlags & MDL_PARTIAL) == 0); + ASSERT(Mdl->ByteCount != 0); + + /* Get the process associated and capture the flags which are volatile */ + Process = Mdl->Process; + Flags = Mdl->MdlFlags; + + /* Automagically undo any calls to MmGetSystemAddressForMdl's for this mdl */ + if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) + { + /* Unmap the pages from system spage */ + MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl); + } + + /* Get the page count */ + MdlPages = (PPFN_NUMBER)(Mdl + 1); + Base = (PVOID)((ULONG_PTR)Mdl->StartVa + Mdl->ByteOffset); + PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Mdl->ByteCount); + ASSERT(PageCount != 0); + + /* We don't support AWE */ + if (Flags & MDL_DESCRIBES_AWE) ASSERT(FALSE); + + /* Check if the buffer is mapped I/O space */ + if (Flags & MDL_IO_SPACE) + { + /* Check if this was a wirte */ + if (Flags & MDL_WRITE_OPERATION) + { + /* Windows keeps track of the modified bit */ + } + + /* Check if we have a process */ + if (Process) + { + /* Handle the accounting of locked pages */ + ASSERT(Process->NumberOfLockedPages >= 0); + InterlockedExchangeAddSizeT(&Process->NumberOfLockedPages, + -PageCount); + } + + /* We're done */ + Mdl->MdlFlags &= ~MDL_IO_SPACE; + Mdl->MdlFlags &= ~MDL_PAGES_LOCKED; + return; + } + + /* Check if we have a process */ + if (Process) + { + /* Handle the accounting of locked pages */ + ASSERT(Process->NumberOfLockedPages >= 0); + InterlockedExchangeAddSizeT(&Process->NumberOfLockedPages, + -PageCount); + } + + /* Scan each page */ + for (i = 0; i < PageCount; i++) + { + /* Get the page entry */ + + /* Unlock and dereference it */ + Page = MdlPages[i]; + MmUnlockPage(Page); + MmDereferencePage(Page); + } + + /* We're done */ + Mdl->MdlFlags &= ~MDL_PAGES_LOCKED; +} + +/* + * @implemented + */ +VOID +NTAPI +MmUnmapLockedPages(IN PVOID BaseAddress, + IN PMDL Mdl) +{ + KIRQL oldIrql; + ULONG i, PageCount; + ULONG Base; + MEMORY_AREA *MemoryArea; + DPRINT("Unmapping MDL: %p\n", Mdl); + DPRINT("Base: %p\n", BaseAddress); + + /* Sanity check */ + ASSERT(Mdl->ByteCount != 0); + + /* Check if this is a kernel request */ + if (BaseAddress > MM_HIGHEST_USER_ADDRESS) + { + /* Get base and count information */ + Base = (ULONG_PTR)Mdl->StartVa + Mdl->ByteOffset; + PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Mdl->ByteCount); + + /* Sanity checks */ + ASSERT((Mdl->MdlFlags & MDL_PARENT_MAPPED_SYSTEM_VA) == 0); + ASSERT(PageCount != 0); + ASSERT(Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA); + + /* ReactOS does not support this flag */ + if (Mdl->MdlFlags & MDL_FREE_EXTRA_PTES) ASSERT(FALSE); + + /* Remove flags */ + Mdl->MdlFlags &= ~(MDL_MAPPED_TO_SYSTEM_VA | + MDL_PARTIAL_HAS_BEEN_MAPPED | + MDL_FREE_EXTRA_PTES); + + /* If we came from non-paged pool, on ReactOS, we can leave */ + if (Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) return; + + /* Loop each page */ + BaseAddress = PAGE_ALIGN(BaseAddress); + for (i = 0; i < PageCount; i++) + { + /* Delete it */ + MmDeleteVirtualMapping(NULL, + (PVOID)((ULONG_PTR)BaseAddress + (i * PAGE_SIZE)), + FALSE, + NULL, + NULL); + } + + /* Lock the mapping region */ + KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql); + + /* Deallocate all the pages used. */ + Base = ((ULONG_PTR)BaseAddress - (ULONG_PTR)MiMdlMappingRegionBase) / PAGE_SIZE; + RtlClearBits(&MiMdlMappingRegionAllocMap, Base, PageCount); + MiMdlMappingRegionHint = min(MiMdlMappingRegionHint, Base); + + /* Release the lock */ + KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); + } + else + { + /* Sanity check */ + ASSERT(Mdl->Process == PsGetCurrentProcess()); + + /* Find the memory area */ + MemoryArea = MmLocateMemoryAreaByAddress((PMADDRESS_SPACE)&(Mdl->Process)->VadRoot, + BaseAddress); + ASSERT(MemoryArea); + + /* Free it */ + MmFreeMemoryArea((PMADDRESS_SPACE)&(Mdl->Process)->VadRoot, + MemoryArea, + NULL, + NULL); + } +} + +/* + * @implemented + */ +VOID +NTAPI +MmProbeAndLockPages(IN PMDL Mdl, + IN KPROCESSOR_MODE AccessMode, + IN LOCK_OPERATION Operation) +{ + PPFN_TYPE MdlPages; + PVOID Base, Address; + ULONG i, j; + ULONG NrPages; + NTSTATUS Status; + PFN_TYPE Page; + PEPROCESS CurrentProcess; + PETHREAD Thread; + PMADDRESS_SPACE AddressSpace; + DPRINT("Probing MDL: %p\n", Mdl); + + /* Sanity checks */ + ASSERT(Mdl->ByteCount != 0); + ASSERT(((ULONG)Mdl->ByteOffset & ~(PAGE_SIZE - 1)) == 0); + ASSERT(((ULONG_PTR)Mdl->StartVa & (PAGE_SIZE - 1)) == 0); + ASSERT((Mdl->MdlFlags & (MDL_PAGES_LOCKED | + MDL_MAPPED_TO_SYSTEM_VA | + MDL_SOURCE_IS_NONPAGED_POOL | + MDL_PARTIAL | + MDL_IO_SPACE)) == 0); + + /* Get page and base information */ + MdlPages = (PPFN_NUMBER)(Mdl + 1); + Base = (PVOID)Mdl->StartVa; + Address = (PVOID)((ULONG_PTR)Base + Mdl->ByteOffset); + NrPages = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Address, Mdl->ByteCount); + ASSERT(NrPages != 0); + + /* Check if this is an MDL in I/O Space */ + if (Mdl->StartVa >= MmSystemRangeStart && + MmGetPfnForProcess(NULL, Mdl->StartVa) >= MmPageArraySize) + { + /* Just loop each page */ + for (i = 0; i < NrPages; i++) + { + /* And map it */ + MdlPages[i] = MmGetPfnForProcess(NULL, + (PVOID)((ULONG_PTR)Mdl->StartVa + (i * PAGE_SIZE))); + } + + /* Set the flags and exit */ + Mdl->MdlFlags |= MDL_PAGES_LOCKED|MDL_IO_SPACE; + return; + } + + /* Get the thread and process */ + Thread = PsGetCurrentThread(); + if (Address <= MM_HIGHEST_USER_ADDRESS) + { + /* Get the process */ + CurrentProcess = PsGetCurrentProcess(); + } + else + { + /* No process */ + CurrentProcess = NULL; + } + + /* Check what kind of operaiton this is */ + if (Operation != IoReadAccess) + { + /* Set the write flag */ + Mdl->MdlFlags |= MDL_WRITE_OPERATION; + } + else + { + /* Remove the write flag */ + Mdl->MdlFlags &= ~(MDL_WRITE_OPERATION); + } + + /* Check if this came from kernel mode */ + if (Base >= MM_HIGHEST_USER_ADDRESS) + { + /* We should not have a process */ + ASSERT(CurrentProcess == NULL); + Mdl->Process = NULL; + AddressSpace = MmGetKernelAddressSpace(); + } + else + { + /* Sanity checks */ + ASSERT(NrPages != 0); + ASSERT(CurrentProcess == PsGetCurrentProcess()); + + /* Track locked pages */ + InterlockedExchangeAddSizeT(&CurrentProcess->NumberOfLockedPages, + NrPages); + + /* Save the process */ + Mdl->Process = CurrentProcess; + + /* Use the process lock */ + AddressSpace = (PMADDRESS_SPACE)&(CurrentProcess)->VadRoot; + } + + + /* + * Lock the pages + */ + MmLockAddressSpace(AddressSpace); + + for (i = 0; i < NrPages; i++) + { + PVOID Address; + + Address = (char*)Mdl->StartVa + (i*PAGE_SIZE); + + if (!MmIsPagePresent(NULL, Address)) + { + /* Fault the page in */ + Status = MmAccessFault(FALSE, Address, AccessMode, NULL); + if (!NT_SUCCESS(Status)) + { + MmUnlockAddressSpace(AddressSpace); + ExRaiseStatus(STATUS_ACCESS_VIOLATION); + } + } + else + { + MmLockPage(MmGetPfnForProcess(NULL, Address)); + } + + if ((Operation == IoWriteAccess || Operation == IoModifyAccess) && + (!(MmGetPageProtect(NULL, (PVOID)Address) & PAGE_READWRITE))) + { + Status = MmAccessFault(TRUE, Address, AccessMode, NULL); + if (!NT_SUCCESS(Status)) + { + for (j = 0; j < i; j++) + { + Page = MdlPages[j]; + if (Page < MmPageArraySize) + { + MmUnlockPage(Page); + MmDereferencePage(Page); + } + } + MmUnlockAddressSpace(AddressSpace); + ExRaiseStatus(STATUS_ACCESS_VIOLATION); + } + } + Page = MmGetPfnForProcess(NULL, Address); + MdlPages[i] = Page; + if (Page >= MmPageArraySize) + { + Mdl->MdlFlags |= MDL_IO_SPACE; + } + else + { + MmReferencePage(Page); + } + } + + MmUnlockAddressSpace(AddressSpace); + Mdl->MdlFlags |= MDL_PAGES_LOCKED; +} + +/* + * @implemented + */ +PMDL +NTAPI +MmAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, + IN PHYSICAL_ADDRESS HighAddress, + IN PHYSICAL_ADDRESS SkipBytes, + IN SIZE_T Totalbytes) +{ + PMDL Mdl; + PPFN_TYPE Pages; + ULONG NumberOfPagesWanted, NumberOfPagesAllocated; + ULONG Ret; + DPRINT("Allocating pages: %p\n", LowAddress.LowPart); + + /* SkipBytes must be a multiple of the page size */ + if (BYTE_OFFSET(SkipBytes.LowPart)) return NULL; + + /* Create the actual MDL */ + Mdl = MmCreateMdl(NULL, NULL, Totalbytes); + if (!Mdl) return NULL; + + /* Allocate pages into the MDL */ + NumberOfPagesAllocated = 0; + NumberOfPagesWanted = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; + Pages = (PPFN_TYPE)(Mdl + 1); + while (NumberOfPagesWanted > 0) + { + Ret = MmAllocPagesSpecifyRange(MC_NPPOOL, + LowAddress, + HighAddress, + NumberOfPagesWanted, + Pages + NumberOfPagesAllocated); + if (Ret == (ULONG)-1) break; + + NumberOfPagesAllocated += Ret; + NumberOfPagesWanted -= Ret; + + if (SkipBytes.QuadPart == 0) break; + LowAddress.QuadPart += SkipBytes.QuadPart; + HighAddress.QuadPart += SkipBytes.QuadPart; + } + + /* If nothing was allocated, fail */ + if (NumberOfPagesAllocated) + { + /* Free our MDL */ + ExFreePool(Mdl); + return NULL; + } + + /* Zero out the MDL pages */ + //RtlZeroMemory(LowAddress.LowPart, NumberOfPagesAllocated * PAGE_SIZE); + + /* Return the MDL */ + Mdl->MdlFlags |= MDL_PAGES_LOCKED; + Mdl->ByteCount = (ULONG)(NumberOfPagesAllocated * PAGE_SIZE); + return Mdl; +} + +/* + * @implemented */ PVOID -STDCALL -MmMapLockedPagesWithReservedMapping ( - IN PVOID MappingAddress, - IN ULONG PoolTag, - IN PMDL MemoryDescriptorList, - IN MEMORY_CACHING_TYPE CacheType - ) -{ - UNIMPLEMENTED; - return 0; -} - - -/* - * @implemented - */ -VOID STDCALL -MmUnmapLockedPages(PVOID BaseAddress, PMDL Mdl) -/* - * FUNCTION: Releases a mapping set up by a preceding call to MmMapLockedPages - * ARGUMENTS: - * BaseAddress = Base virtual address to which the pages were mapped - * MemoryDescriptorList = MDL describing the mapped pages - * - * User space unmappings _must_ be done from the original process context! - */ -{ - KIRQL oldIrql; - ULONG i; - ULONG PageCount; - ULONG Base; - - DPRINT("MmUnmapLockedPages(BaseAddress %x, Mdl %x)\n", BaseAddress, Mdl); - - /* - * In this case, the MDL has the same system address as the base address - * so there is no need to free it - */ - if ((Mdl->MdlFlags & MDL_SOURCE_IS_NONPAGED_POOL) && - (BaseAddress >= MmSystemRangeStart)) - { - return; - } - - - /* Calculate the number of pages we mapped. */ - PageCount = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; - - /* - * Docs says that BaseAddress should be a _base_ address, but every example - * I've seen pass the actual address. -Gunnar - */ - BaseAddress = PAGE_ALIGN(BaseAddress); - - /* Unmap all the pages. */ - for (i = 0; i < PageCount; i++) - { - MmDeleteVirtualMapping(Mdl->Process, - (char*)BaseAddress + (i * PAGE_SIZE), - FALSE, - NULL, - NULL); - } - - if (BaseAddress >= MmSystemRangeStart) - { - ASSERT(Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA); - - KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql); - /* Deallocate all the pages used. */ - Base = (ULONG)((char*)BaseAddress - (char*)MiMdlMappingRegionBase) / PAGE_SIZE; - - RtlClearBits(&MiMdlMappingRegionAllocMap, Base, PageCount); - - MiMdlMappingRegionHint = min (MiMdlMappingRegionHint, Base); - - KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); - - /* Reset the MDL state. */ - Mdl->MdlFlags &= ~MDL_MAPPED_TO_SYSTEM_VA; - Mdl->MappedSystemVa = NULL; - - } - else - { - MEMORY_AREA *Marea; - - ASSERT(Mdl->Process == PsGetCurrentProcess()); - - Marea = MmLocateMemoryAreaByAddress( (PMADDRESS_SPACE)&(Mdl->Process)->VadRoot, BaseAddress ); - if (Marea == NULL) - { - DPRINT1( "Couldn't open memory area when unmapping user-space pages!\n" ); - KEBUGCHECK(0); - } - - MmFreeMemoryArea( (PMADDRESS_SPACE)&(Mdl->Process)->VadRoot, Marea, NULL, NULL ); - - Mdl->Process = NULL; - } - -} - - -/* - * @unimplemented - */ -VOID -STDCALL -MmUnmapReservedMapping ( - IN PVOID BaseAddress, - IN ULONG PoolTag, - IN PMDL MemoryDescriptorList - ) -{ - UNIMPLEMENTED; -} - - -VOID -NTAPI -MmBuildMdlFromPages(PMDL Mdl, PPFN_TYPE Pages) -{ - memcpy(Mdl + 1, Pages, sizeof(PFN_TYPE) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE)); - - /* FIXME: this flag should be set by the caller perhaps? */ - Mdl->MdlFlags |= MDL_IO_PAGE_READ; -} - - -/* - * @unimplemented - */ -NTSTATUS -STDCALL -MmPrefetchPages ( - IN ULONG NumberOfLists, - IN PREAD_LIST *ReadLists - ) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @unimplemented - */ -NTSTATUS -STDCALL -MmProtectMdlSystemAddress ( - IN PMDL MemoryDescriptorList, - IN ULONG NewProtect - ) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - - -/* - * @implemented - */ -VOID STDCALL MmProbeAndLockPages (PMDL Mdl, - KPROCESSOR_MODE AccessMode, - LOCK_OPERATION Operation) -/* - * FUNCTION: Probes the specified pages, makes them resident and locks them - * ARGUMENTS: - * Mdl = MDL to probe - * AccessMode = Access at which to probe the buffer - * Operation = Operation to probe for - * - * This function can be seen as a safe version of MmBuildMdlForNonPagedPool - * used in cases where you know that the mdl address is paged memory or - * you don't know where the mdl address comes from. MmProbeAndLockPages will - * work no matter what kind of mdl address you have. - */ -{ - PPFN_TYPE MdlPages; - ULONG i, j; - ULONG NrPages; - NTSTATUS Status; - KPROCESSOR_MODE Mode; - PFN_TYPE Page; - PEPROCESS CurrentProcess = PsGetCurrentProcess(); - PMADDRESS_SPACE AddressSpace; - - DPRINT("MmProbeAndLockPages(Mdl %x)\n", Mdl); - - ASSERT(!(Mdl->MdlFlags & (MDL_PAGES_LOCKED|MDL_MAPPED_TO_SYSTEM_VA|MDL_PARTIAL| - MDL_IO_SPACE|MDL_SOURCE_IS_NONPAGED_POOL))); - - MdlPages = (PPFN_TYPE)(Mdl + 1); - NrPages = PAGE_ROUND_UP(Mdl->ByteOffset + Mdl->ByteCount) / PAGE_SIZE; - - /* mdl must have enough page entries */ - ASSERT(NrPages <= (Mdl->Size - sizeof(MDL))/sizeof(PFN_TYPE)); - - - if (Mdl->StartVa >= MmSystemRangeStart && - MmGetPfnForProcess(NULL, Mdl->StartVa) >= MmPageArraySize) - { - /* phys addr is not phys memory so this must be io memory */ - - for (i = 0; i < NrPages; i++) - { - MdlPages[i] = MmGetPfnForProcess(NULL, (char*)Mdl->StartVa + (i*PAGE_SIZE)); - } - - Mdl->MdlFlags |= MDL_PAGES_LOCKED|MDL_IO_SPACE; - return; - } - - - if (Mdl->StartVa >= MmSystemRangeStart) - { - /* FIXME: why isn't AccessMode used? */ - Mode = KernelMode; - Mdl->Process = NULL; - AddressSpace = MmGetKernelAddressSpace(); - } - else - { - /* FIXME: why isn't AccessMode used? */ - Mode = UserMode; - Mdl->Process = CurrentProcess; - AddressSpace = (PMADDRESS_SPACE)&(CurrentProcess)->VadRoot; - } - - - /* - * Lock the pages - */ - MmLockAddressSpace(AddressSpace); - - for (i = 0; i < NrPages; i++) - { - PVOID Address; - - Address = (char*)Mdl->StartVa + (i*PAGE_SIZE); - - /* - * FIXME: skip the probing/access stuff if buffer is nonpaged kernel space? - * -Gunnar - */ - - if (!MmIsPagePresent(NULL, Address)) - { - Status = MmAccessFault(FALSE, Address, Mode, NULL); - if (!NT_SUCCESS(Status)) - { - for (j = 0; j < i; j++) +NTAPI +MmMapLockedPagesSpecifyCache(IN PMDL Mdl, + IN KPROCESSOR_MODE AccessMode, + IN MEMORY_CACHING_TYPE CacheType, + IN PVOID BaseAddress, + IN ULONG BugCheckOnFailure, + IN MM_PAGE_PRIORITY Priority) +{ + PVOID Base; + PULONG MdlPages; + KIRQL oldIrql; + ULONG PageCount; + ULONG StartingOffset; + PEPROCESS CurrentProcess; + NTSTATUS Status; + ULONG Protect; + MEMORY_AREA *Result; + LARGE_INTEGER BoundaryAddressMultiple; + DPRINT("Mapping MDL: %p\n", Mdl); + DPRINT("Base: %p\n", BaseAddress); + + /* Sanity checks */ + ASSERT(Mdl->ByteCount != 0); + + /* Get the base */ + Base = (PVOID)((ULONG_PTR)Mdl->StartVa + Mdl->ByteOffset); + + /* Set default page protection */ + Protect = PAGE_READWRITE; + if (CacheType == MmNonCached) Protect |= PAGE_NOCACHE; + + /* Handle kernel case first */ + if (AccessMode == KernelMode) + { + /* Get the list of pages and count */ + MdlPages = (PPFN_NUMBER)(Mdl + 1); + PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base, Mdl->ByteCount); + + /* Sanity checks */ + ASSERT((Mdl->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA | + MDL_SOURCE_IS_NONPAGED_POOL | + MDL_PARTIAL_HAS_BEEN_MAPPED)) == 0); + ASSERT((Mdl->MdlFlags & (MDL_PAGES_LOCKED | MDL_PARTIAL)) != 0); + + /* Allocate that number of pages from the mdl mapping region. */ + KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql); + StartingOffset = RtlFindClearBitsAndSet(&MiMdlMappingRegionAllocMap, + PageCount, + MiMdlMappingRegionHint); + if (StartingOffset == 0xffffffff) + { + KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); + DPRINT("Out of MDL mapping space\n"); + if ((Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) || !BugCheckOnFailure) { - Page = MdlPages[j]; - if (Page < MmPageArraySize) - { - MmUnlockPage(Page); - MmDereferencePage(Page); - } + return NULL; } - MmUnlockAddressSpace(AddressSpace); - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - } - } - else - { - MmLockPage(MmGetPfnForProcess(NULL, Address)); - } - - if ((Operation == IoWriteAccess || Operation == IoModifyAccess) && - (!(MmGetPageProtect(NULL, (PVOID)Address) & PAGE_READWRITE))) - { - Status = MmAccessFault(TRUE, Address, Mode, NULL); - if (!NT_SUCCESS(Status)) - { - for (j = 0; j < i; j++) - { - Page = MdlPages[j]; - if (Page < MmPageArraySize) - { - MmUnlockPage(Page); - MmDereferencePage(Page); - } - } - MmUnlockAddressSpace(AddressSpace); - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - } - } - Page = MmGetPfnForProcess(NULL, Address); - MdlPages[i] = Page; - if (Page >= MmPageArraySize) - Mdl->MdlFlags |= MDL_IO_SPACE; - else - MmReferencePage(Page); - } - - MmUnlockAddressSpace(AddressSpace); - Mdl->MdlFlags |= MDL_PAGES_LOCKED; -} - - -/* - * @unimplemented - */ -VOID -STDCALL -MmProbeAndLockProcessPages ( - IN OUT PMDL MemoryDescriptorList, - IN PEPROCESS Process, - IN KPROCESSOR_MODE AccessMode, - IN LOCK_OPERATION Operation - ) -{ - UNIMPLEMENTED; -} - - -/* - * @unimplemented - */ -VOID -STDCALL -MmProbeAndLockSelectedPages( - IN OUT PMDL MemoryDescriptorList, - IN LARGE_INTEGER PageList[], - IN KPROCESSOR_MODE AccessMode, - IN LOCK_OPERATION Operation - ) -{ - UNIMPLEMENTED; -} - - -/* - * @implemented - */ -ULONG STDCALL MmSizeOfMdl (PVOID Base, - ULONG Length) -/* - * FUNCTION: Returns the number of bytes to allocate for an MDL describing - * the given address range - * ARGUMENTS: - * Base = base virtual address - * Length = number of bytes to map - */ -{ - ULONG len; - - len = ADDRESS_AND_SIZE_TO_SPAN_PAGES(Base,Length); - - return(sizeof(MDL)+(len*sizeof(PFN_TYPE))); -} - - -/* - * @implemented - */ -VOID STDCALL -MmBuildMdlForNonPagedPool (PMDL Mdl) -/* - * FUNCTION: Fills in the corresponding physical page array of a given - * MDL for a buffer in nonpaged system space - * ARGUMENTS: - * Mdl = Points to an MDL that supplies a virtual address, - * byte offset and length - * - * This function can be seen as a fast version of MmProbeAndLockPages in case - * you _know_ that the mdl address is within nonpaged kernel space. - */ -{ - ULONG i; - ULONG PageCount; - PPFN_TYPE MdlPages; - - /* - * mdl buffer must (at least) be in kernel space, thou this doesn't - * necesarely mean that the buffer in within _nonpaged_ kernel space... - */ - ASSERT(Mdl->StartVa >= MmSystemRangeStart); - - PageCount = PAGE_ROUND_UP(Mdl->ByteOffset + Mdl->ByteCount) / PAGE_SIZE; - MdlPages = (PPFN_TYPE)(Mdl + 1); - - /* mdl must have enough page entries */ - ASSERT(PageCount <= (Mdl->Size - sizeof(MDL))/sizeof(PFN_TYPE)); - - for (i=0; i < PageCount; i++) - { - *MdlPages++ = MmGetPfnForProcess(NULL, (char*)Mdl->StartVa + (i * PAGE_SIZE)); - } - - Mdl->MdlFlags |= MDL_SOURCE_IS_NONPAGED_POOL; - Mdl->Process = NULL; - Mdl->MappedSystemVa = (char*)Mdl->StartVa + Mdl->ByteOffset; -} - - -/* - * @implemented - */ -PMDL STDCALL -MmCreateMdl (PMDL Mdl, - PVOID Base, - ULONG Length) -/* - * FUNCTION: Allocates and initalizes an MDL - * ARGUMENTS: - * MemoryDescriptorList = Points to MDL to initalize. If this is - * NULL then one is allocated - * Base = Base virtual address of the buffer - * Length = Length in bytes of the buffer - * RETURNS: A pointer to initalized MDL - */ -{ - if (Mdl == NULL) - { - ULONG Size; - - Size = MmSizeOfMdl(Base,Length); - Mdl = - (PMDL)ExAllocatePoolWithTag(NonPagedPool, Size, TAG_MDL); - if (Mdl == NULL) - { - return(NULL); - } - } - - MmInitializeMdl(Mdl, (char*)Base, Length); - - return(Mdl); -} - - -/* - * @unimplemented - */ -VOID STDCALL -MmMapMemoryDumpMdl (PVOID Unknown0) -/* - * FIXME: Has something to do with crash dumps. Do we want to implement - * this? - */ -{ - UNIMPLEMENTED; -} - - -/* - * @implemented - */ -PMDL STDCALL -MmAllocatePagesForMdl ( IN PHYSICAL_ADDRESS LowAddress, - IN PHYSICAL_ADDRESS HighAddress, - IN PHYSICAL_ADDRESS SkipBytes, - IN SIZE_T Totalbytes ) -{ - /* - MmAllocatePagesForMdl allocates zero-filled, nonpaged, physical memory pages to an MDL - - MmAllocatePagesForMdlSearch the PFN database for free, zeroed or standby - pagesAllocates pages and puts in MDLDoes not map pages (caller responsibility) - Designed to be used by an AGP driver - - LowAddress is the lowest acceptable physical address it wants to allocate - and HighAddress is the highest. SkipBytes are the number of bytes that the - kernel should keep free above LowAddress and below the address at which it - starts to allocate physical memory. TotalBytes are the number of bytes that - the driver wants to allocate. The return value of the function is a MDL - that if non-zero describes the physical memory the kernel has given the - driver. To access portions of the memory the driver must create sub-MDLs - from the returned MDL that describe appropriate portions of the physical - memory. When a driver wants to access physical memory described by a - sub-MDL it must map the sub-MDL using MmGetSystemAddressForMdlSafe. - - Konstantin Gusev - */ - - PMDL Mdl; - PPFN_TYPE Pages; - ULONG NumberOfPagesWanted, NumberOfPagesAllocated; - ULONG Ret; - - DPRINT("MmAllocatePagesForMdl - LowAddress = 0x%I64x, HighAddress = 0x%I64x, " - "SkipBytes = 0x%I64x, Totalbytes = 0x%x\n", - LowAddress.QuadPart, HighAddress.QuadPart, - SkipBytes.QuadPart, Totalbytes); - - /* SkipBytes must be a multiple of the page size */ - if ((SkipBytes.QuadPart % PAGE_SIZE) != 0) - { - DPRINT1("Warning: SkipBytes is not a multiple of PAGE_SIZE\n"); - return NULL; - } - - /* Allocate memory for the MDL */ - Mdl = MmCreateMdl(NULL, 0, Totalbytes); - if (Mdl == NULL) - { - return NULL; - } - - /* Allocate pages into the MDL */ - NumberOfPagesAllocated = 0; - NumberOfPagesWanted = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; - Pages = (PPFN_TYPE)(Mdl + 1); - while (NumberOfPagesWanted > 0) - { - Ret = MmAllocPagesSpecifyRange( - MC_NPPOOL, - LowAddress, - HighAddress, - NumberOfPagesWanted, - Pages + NumberOfPagesAllocated); - if (Ret == (ULONG)-1) - break; - - NumberOfPagesAllocated += Ret; - NumberOfPagesWanted -= Ret; - - if (SkipBytes.QuadPart == 0) - break; - LowAddress.QuadPart += SkipBytes.QuadPart; - HighAddress.QuadPart += SkipBytes.QuadPart; - } - - if (NumberOfPagesAllocated == 0) - { - ExFreePool(Mdl); - Mdl = NULL; - } - else if (NumberOfPagesWanted > 0) - { - Mdl->ByteCount = (ULONG)(NumberOfPagesAllocated * PAGE_SIZE); - /* FIXME: I don't know if Mdl->Size should also be changed -- blight */ - } - return Mdl; -} - - -/* - * @implemented - */ -VOID STDCALL -MmFreePagesFromMdl ( IN PMDL Mdl ) -{ - /* - Drivers use the MmFreePagesFromMdl, the kernel-mode equivalent of - FreeUserPhysicalPages, to free the physical memory it has allocated with - MmAllocatePagesForMdl. This function is also prototyped in ntddk.h: - - Note that a driver is responsible for deallocating the MDL returned by - MmAllocatePagesForMdl with a call to ExFreePool, since MmFreePagesFromMdl - does not free the MDL. - - Konstantin Gusev - - */ - PPFN_TYPE Pages; - LONG NumberOfPages; - - NumberOfPages = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; - Pages = (PPFN_TYPE)(Mdl + 1); - - while (--NumberOfPages >= 0) - { - MmDereferencePage(Pages[NumberOfPages]); - } -} - - -/* - * @implemented - */ -PVOID STDCALL -MmMapLockedPagesSpecifyCache ( IN PMDL Mdl, - IN KPROCESSOR_MODE AccessMode, - IN MEMORY_CACHING_TYPE CacheType, - IN PVOID BaseAddress, - IN ULONG BugCheckOnFailure, - IN MM_PAGE_PRIORITY Priority) -{ - PVOID Base; - PULONG MdlPages; - KIRQL oldIrql; - ULONG PageCount; - ULONG StartingOffset; - PEPROCESS CurrentProcess; - NTSTATUS Status; - ULONG Protect; - - DPRINT("MmMapLockedPagesSpecifyCache(Mdl 0x%x, AccessMode 0x%x, CacheType 0x%x, " - "BaseAddress 0x%x, BugCheckOnFailure 0x%x, Priority 0x%x)\n", - Mdl, AccessMode, CacheType, BaseAddress, BugCheckOnFailure, Priority); - - /* FIXME: Implement Priority */ - (void) Priority; - - Protect = PAGE_READWRITE; - if (CacheType == MmNonCached) - Protect |= PAGE_NOCACHE; - else if (CacheType == MmWriteCombined) - DPRINT("CacheType MmWriteCombined not supported!\n"); - - /* Calculate the number of pages required. */ - PageCount = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; - - if (AccessMode != KernelMode) - { - MEMORY_AREA *Result; - LARGE_INTEGER BoundaryAddressMultiple; - NTSTATUS Status; - - /* pretty sure you can't map partial mdl's to user space */ - ASSERT(!(Mdl->MdlFlags & MDL_PARTIAL)); - - BoundaryAddressMultiple.QuadPart = 0; - Base = BaseAddress; - - CurrentProcess = PsGetCurrentProcess(); - - MmLockAddressSpace((PMADDRESS_SPACE)&CurrentProcess->VadRoot); - Status = MmCreateMemoryArea((PMADDRESS_SPACE)&CurrentProcess->VadRoot, - MEMORY_AREA_MDL_MAPPING, - &Base, - PageCount * PAGE_SIZE, - Protect, - &Result, - (Base != NULL), - 0, - BoundaryAddressMultiple); - MmUnlockAddressSpace((PMADDRESS_SPACE)&CurrentProcess->VadRoot); - if (!NT_SUCCESS(Status)) - { - if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) - { - return NULL; - } - - /* Throw exception */ - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - ASSERT(0); - } - - Mdl->Process = (PEPROCESS)CurrentProcess; - } - else /* if (AccessMode == KernelMode) */ - { - /* can't map mdl twice */ - ASSERT(!(Mdl->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA|MDL_PARTIAL_HAS_BEEN_MAPPED))); - /* can't map mdl buildt from non paged pool into kernel space */ - ASSERT(!(Mdl->MdlFlags & (MDL_SOURCE_IS_NONPAGED_POOL))); - - CurrentProcess = NULL; - - /* Allocate that number of pages from the mdl mapping region. */ - KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql); - - StartingOffset = RtlFindClearBitsAndSet(&MiMdlMappingRegionAllocMap, PageCount, MiMdlMappingRegionHint); - - if (StartingOffset == 0xffffffff) - { - KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); - - DPRINT1("Out of MDL mapping space\n"); - - if ((Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) || !BugCheckOnFailure) - { - return NULL; - } - - KEBUGCHECK(0); - } - - Base = (PVOID)((ULONG_PTR)MiMdlMappingRegionBase + StartingOffset * PAGE_SIZE); - - if (MiMdlMappingRegionHint == StartingOffset) - { - MiMdlMappingRegionHint += PageCount; - } - - KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); - - Mdl->Process = NULL; - } - - /* Set the virtual mappings for the MDL pages. */ - MdlPages = (PULONG)(Mdl + 1); - - if (Mdl->MdlFlags & MDL_IO_SPACE) - Status = MmCreateVirtualMappingUnsafe(CurrentProcess, + KEBUGCHECK(0); + } + Base = (PVOID)((ULONG_PTR)MiMdlMappingRegionBase + StartingOffset * PAGE_SIZE); + if (MiMdlMappingRegionHint == StartingOffset) MiMdlMappingRegionHint += PageCount; + KeReleaseSpinLock(&MiMdlMappingRegionLock, oldIrql); + + /* Set the virtual mappings for the MDL pages. */ + if (Mdl->MdlFlags & MDL_IO_SPACE) + { + /* Map the pages */ + Status = MmCreateVirtualMappingUnsafe(NULL, + Base, + Protect, + MdlPages, + PageCount); + } + else + { + /* Map the pages */ + Status = MmCreateVirtualMapping(NULL, Base, Protect, MdlPages, PageCount); - else - Status = MmCreateVirtualMapping(CurrentProcess, - Base, - Protect, - MdlPages, - PageCount); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Unable to create virtual mapping\n"); - if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) - { - return NULL; - } - if (AccessMode != KernelMode) - { - /* Throw exception */ - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - ASSERT(0); - } - else /* AccessMode == KernelMode */ - { - if (!BugCheckOnFailure) + } + + /* Check if the mapping suceeded */ + if (!NT_SUCCESS(Status)) + { + /* If it can fail, return NULL */ + if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) return NULL; + + /* Should we bugcheck? */ + if (!BugCheckOnFailure) return NULL; + + /* Yes, crash the system */ + KeBugCheckEx(NO_MORE_SYSTEM_PTES, 0, PageCount, 0, 0); + } + + /* Mark it as mapped */ + ASSERT((Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) == 0); + Mdl->MdlFlags |= MDL_MAPPED_TO_SYSTEM_VA; + + /* Check if it was partial */ + if (Mdl->MdlFlags & MDL_PARTIAL) + { + /* Write the appropriate flag here too */ + Mdl->MdlFlags |= MDL_PARTIAL_HAS_BEEN_MAPPED; + } + + /* Save the mapped address */ + Base = (PVOID)((ULONG_PTR)Base + Mdl->ByteOffset); + Mdl->MappedSystemVa = Base; + return Base; + } + + + /* Calculate the number of pages required. */ + MdlPages = (PPFN_NUMBER)(Mdl + 1); + PageCount = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; + + BoundaryAddressMultiple.QuadPart = 0; + Base = BaseAddress; + + CurrentProcess = PsGetCurrentProcess(); + + MmLockAddressSpace((PMADDRESS_SPACE)&CurrentProcess->VadRoot); + Status = MmCreateMemoryArea((PMADDRESS_SPACE)&CurrentProcess->VadRoot, + MEMORY_AREA_MDL_MAPPING, + &Base, + PageCount * PAGE_SIZE, + Protect, + &Result, + (Base != NULL), + 0, + BoundaryAddressMultiple); + MmUnlockAddressSpace((PMADDRESS_SPACE)&CurrentProcess->VadRoot); + if (!NT_SUCCESS(Status)) + { + if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) + { return NULL; - - /* FIXME: Use some bugcheck code instead of 0 */ - KEBUGCHECK(0); - } - } - - /* Mark the MDL has having being mapped. */ - if (AccessMode == KernelMode) - { - if (Mdl->MdlFlags & MDL_PARTIAL) - { - Mdl->MdlFlags |= MDL_PARTIAL_HAS_BEEN_MAPPED; - } - else - { - Mdl->MdlFlags |= MDL_MAPPED_TO_SYSTEM_VA; - } - Mdl->MappedSystemVa = (char*)Base + Mdl->ByteOffset; - } - else - DPRINT1("UserMode mapping - returning 0x%x\n", (ULONG)Base + Mdl->ByteOffset); - - return((char*)Base + Mdl->ByteOffset); -} - - -/* - * @implemented - */ -PVOID STDCALL -MmMapLockedPages(PMDL Mdl, KPROCESSOR_MODE AccessMode) -/* - * FUNCTION: Maps the physical pages described by a given MDL - * ARGUMENTS: - * Mdl = Points to an MDL updated by MmProbeAndLockPages, MmBuildMdlForNonPagedPool, - * MmAllocatePagesForMdl or IoBuildPartialMdl. - * AccessMode = Specifies the portion of the address space to map the - * pages. - * RETURNS: The base virtual address that maps the locked pages for the - * range described by the MDL - * - * If mapping into user space, pages are mapped into current address space. - */ -{ - return MmMapLockedPagesSpecifyCache(Mdl, - AccessMode, - MmCached, - NULL, - TRUE, - NormalPagePriority); -} - + } + + /* Throw exception */ + ExRaiseStatus(STATUS_ACCESS_VIOLATION); + ASSERT(0); + } + + /* Set the virtual mappings for the MDL pages. */ + if (Mdl->MdlFlags & MDL_IO_SPACE) + { + /* Map the pages */ + Status = MmCreateVirtualMappingUnsafe(CurrentProcess, + Base, + Protect, + MdlPages, + PageCount); + } + else + { + /* Map the pages */ + Status = MmCreateVirtualMapping(CurrentProcess, + Base, + Protect, + MdlPages, + PageCount); + } + + /* Check if the mapping suceeded */ + if (!NT_SUCCESS(Status)) + { + /* If it can fail, return NULL */ + if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) return NULL; + + /* Throw exception */ + ExRaiseStatus(STATUS_ACCESS_VIOLATION); + } + + /* Return the base */ + Base = (PVOID)((ULONG_PTR)Base + Mdl->ByteOffset); + return Base; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +MmAdvanceMdl(IN PMDL Mdl, + IN ULONG NumberOfBytes) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +PVOID +NTAPI +MmMapLockedPagesWithReservedMapping(IN PVOID MappingAddress, + IN ULONG PoolTag, + IN PMDL MemoryDescriptorList, + IN MEMORY_CACHING_TYPE CacheType) +{ + UNIMPLEMENTED; + return 0; +} + +/* + * @unimplemented + */ +VOID +NTAPI +MmUnmapReservedMapping(IN PVOID BaseAddress, + IN ULONG PoolTag, + IN PMDL MemoryDescriptorList) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +MmPrefetchPages(IN ULONG NumberOfLists, + IN PREAD_LIST *ReadLists) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +NTSTATUS +NTAPI +MmProtectMdlSystemAddress(IN PMDL MemoryDescriptorList, + IN ULONG NewProtect) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +STDCALL +MmProbeAndLockProcessPages(IN OUT PMDL MemoryDescriptorList, + IN PEPROCESS Process, + IN KPROCESSOR_MODE AccessMode, + IN LOCK_OPERATION Operation) +{ + UNIMPLEMENTED; +} + + +/* + * @unimplemented + */ +VOID +STDCALL +MmProbeAndLockSelectedPages(IN OUT PMDL MemoryDescriptorList, + IN LARGE_INTEGER PageList[], + IN KPROCESSOR_MODE AccessMode, + IN LOCK_OPERATION Operation) +{ + UNIMPLEMENTED; +} + +/* + * @unimplemented + */ +VOID +NTAPI +MmMapMemoryDumpMdl(IN PMDL Mdl) +{ + UNIMPLEMENTED; +} /* EOF */ - - - - - - - - - Modified: trunk/reactos/ntoskrnl/mm/pagefile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pagefile.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/pagefile.c [iso-8859-1] Fri Apr 25 02:55:12 2008 @@ -125,6 +125,17 @@ /* FUNCTIONS *****************************************************************/ +VOID +NTAPI +MmBuildMdlFromPages(PMDL Mdl, PPFN_TYPE Pages) +{ + memcpy(Mdl + 1, Pages, sizeof(PFN_TYPE) * (PAGE_ROUND_UP(Mdl->ByteOffset+Mdl->ByteCount)/PAGE_SIZE)); + + /* FIXME: this flag should be set by the caller perhaps? */ + Mdl->MdlFlags |= MDL_IO_PAGE_READ; +} + + BOOLEAN STDCALL MmIsFileAPagingFile(PFILE_OBJECT FileObject) @@ -247,6 +258,7 @@ MmInitializeMdl(Mdl, NULL, PAGE_SIZE); MmBuildMdlFromPages(Mdl, &Page); + Mdl->MdlFlags |= MDL_PAGES_LOCKED; file_offset.QuadPart = offset * PAGE_SIZE; file_offset = MmGetOffsetPageFile(PagingFileList[i]->RetrievalPointers, file_offset); @@ -262,7 +274,11 @@ KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); Status = Iosb.Status; } - MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl); + + if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) + { + MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl); + } return(Status); } @@ -303,6 +319,7 @@ MmInitializeMdl(Mdl, NULL, PAGE_SIZE); MmBuildMdlFromPages(Mdl, &Page); + Mdl->MdlFlags |= MDL_PAGES_LOCKED; file_offset.QuadPart = offset * PAGE_SIZE; file_offset = MmGetOffsetPageFile(PagingFileList[i]->RetrievalPointers, file_offset); @@ -318,7 +335,10 @@ KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); Status = Iosb.Status; } - MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl); + if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA) + { + MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl); + } return(Status); }
16 years, 8 months
1
0
0
0
[greatlrd] 33138: adding more debug output for dx
by greatlrd@svn.reactos.org
Author: greatlrd Date: Fri Apr 25 00:47:32 2008 New Revision: 33138 URL:
http://svn.reactos.org/svn/reactos?rev=33138&view=rev
Log: adding more debug output for dx Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c Modified: trunk/reactos/subsystems/win32/win32k/include/intddraw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/intddraw.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/intddraw.h [iso-8859-1] Fri Apr 25 00:47:32 2008 @@ -122,4 +122,7 @@ BOOL FASTCALL IntGetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp); BOOL FASTCALL IntSetDeviceGammaRamp(HDEV hPDev, PGAMMARAMP Ramp, BOOL); +/* Debug function oly for win32k dx */ +void dump_edd_directdraw_global(EDD_DIRECTDRAW_GLOBAL *pEddgbl); + #endif /* _INT_W32k_DDRAW */ Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/ddraw.c [iso-8859-1] Fri Apr 25 00:47:32 2008 @@ -22,7 +22,7 @@ DRVFN gpDxFuncs[DXG_INDEX_DxDdIoctl]; HANDLE ghDxGraphics = NULL; ULONG gdwDirectDrawContext; -void dump_edd_directdraw_global(EDD_DIRECTDRAW_GLOBAL *pEddgbl); + EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global; EDD_DIRECTDRAW_LOCAL edd_DirectDrawLocalList; Modified: trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntddraw/dxeng.c [iso-8859-1] Fri Apr 25 00:47:32 2008 @@ -297,6 +297,10 @@ DPRINT1("ReactX Calling : DxEngGetHdevData DXEGSHDEVDATA : %ld\n", Type); +#if 1 + DPRINT1("HDEV hDev %08lx\n", hDev); +#endif + switch ( Type ) { case DxEGShDevData_Surface: @@ -330,6 +334,7 @@ case DxEGShDevData_eddg: DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_eddg\n"); retVal = (DWORD) PDev->pEDDgpl; + dump_edd_directdraw_global(PDev->pEDDgpl); break; case DxEGShDevData_dd_nCount: DPRINT1("requested DXEGSHDEVDATA DxEGShDevData_dd_nCount\n"); @@ -381,7 +386,11 @@ break; } - return retVal; +#if 1 + DPRINT1("return value %08lx\n", retVal); +#endif + + return retVal; }
16 years, 8 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
40
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Results per page:
10
25
50
100
200