ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

tmapldr.h
Go to the documentation of this file.
00001 
00002 //                                                               //
00003 // File format :                                                 //
00004 //                                                               //
00005 //  Comments with a ; in column 1                                //
00006 //  Empty Lines ignored                                          //
00007 //  The words are separated by a space, a tab, or a plus ("+")   //
00008 //                                                               //
00009 //  First a [GLOBAL] section :                                   //
00010 //   [GLOBAL]                                                    //
00011 //   VK_F1         112                                           //
00012 //   .                                                           //
00013 //   .                                                           //
00014 //   [END_GLOBAL]                                                //
00015 //                                                               //
00016 //   The GLOBAL section defines the names of the keys            //
00017 //   and the virtual key code they have.                         //
00018 //   If you repeat a name you'll overwrite the code.             //
00019 //   You can name the keys anything you like                     //
00020 //   The Virtual key nymber must be in Decimal                   //
00021 //   After the number you can put anything : it is ignored       //
00022 //   Here you must put ALL the keys you'll use in the            //
00023 //   other sections.                                             //
00024 //                                                               //
00025 //  Then the emulations sections :                               //
00026 //                                                               //
00027 //   [SCO_ANSI]                                                  //
00028 //                                                               //
00029 //   VK_F1                    \027[M or                          //
00030 //   VK_F1                    ^[[M   or                          //
00031 //   VK_F1 SHIFT              ^[[W  etc                          //
00032 //   .                                                           //
00033 //   .                                                           //
00034 //   [SCO_ANSI_END]                                              //
00035 //                                                               //
00036 //   There are three parts :                                     //
00037 //      a) the key name                                          //
00038 //      b) the shift state                                       //
00039 //         here you put compination of the words :               //
00040 //                                                               //
00041 //                RIGHT_ALT                                      //
00042 //                LEFT_ALT                                       //
00043 //                RIGHT_CTRL                                     //
00044 //                LEFT_CTRL                                      //
00045 //                SHIFT                                          //
00046 //                NUMLOCK                                        //
00047 //                SCROLLLOCK                                     //
00048 //                CAPSLOCK                                       //
00049 //                ENHANCED                                       //
00050 //                APP_KEY                                        //
00051 //      c) the assigned string :                                 //
00052 //         you can use the ^ for esc (^[ = 0x1b)                 //
00053 //                         \ and a three digit decimal number    //
00054 //                         (\027)                                //
00055 //         You can't use the NULL !!!                            //
00056 //         Also (for the moment) you can't use spaces            //
00057 //         in the string : everything after the 3rd word is      //
00058 //           ignored - use unsderscore instead.                  //
00059 //                                                               //
00060 //   for  example :                                              //
00061 //                                                               //
00062 //         VK_F4  SHIFT+LEFT_ALT  \0274m^[[M = 0x1b 4 m 0x1b [ M //
00063 //         VK_F1  RIGHT_CTRL      This_is_ctrl_f1                //
00064 //                                                               //
00065 // You may have as many sections as you like                     //
00066 // If you repeat any section (even the GLOBAL) you'll overwrite  //
00067 // the common parts.                                             //
00068 //                                                               //
00070 
00071 #pragma once
00072 
00073 #include "keytrans.h"
00074 #include "tcharmap.h"
00075 
00076 // AVS
00077 typedef TArrayAsVector<string> stringArray;
00078 
00079 class TMapLoader {
00080 public:
00081     TMapLoader(KeyTranslator &RefKeyTrans, TCharmap &RefCharmap):
00082       KeyTrans(RefKeyTrans), Charmap(RefCharmap) {}
00083     ~TMapLoader() {}
00084 
00085     // If called more than once the new map replaces the old one.
00086     // load with a different KeysetName to change keysets
00087     // Return 0 on error
00088     int Load(const char * filename, const char * szKeysetName);
00089 
00090     void Display();
00091 private:
00092     KeyTranslator &KeyTrans;
00093     TCharmap &Charmap;
00094 
00095     int LookForPart(stringArray& sa, const char* partType, const char* partName);
00096     char* ParseKeyDef(const char* buf, WORD& vk_code, DWORD& control);
00097 
00098     int LoadGlobal(string& buf);
00099     int LoadKeyMap(string buf);
00100     int LoadCharMap(string buf);
00101 
00102 };

Generated on Sun May 27 2012 04:17:16 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.