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

tkeydef.h
Go to the documentation of this file.
00001 
00002 //           TkeyDef - Key Definitions class           //
00003 //                   - keeped in an array container    //
00005 
00006 #pragma once
00007 
00008 #include <windows.h>
00009 
00010 #ifndef __BORLANDC__ // Ioannou Dec. 8, 1998
00011 // We need these for MSVC6 (Sam Robertson Oct. 8, 1998)
00012 class TKeyDef;
00013 bool operator==(const TKeyDef &t1, const TKeyDef &t2);
00014 bool operator<(const TKeyDef &t1, const TKeyDef &t2);
00016 #endif
00017 
00018 // Paul Brannan Feb. 5, 1999
00019 enum tn_ops {TN_ESCAPE, TN_SCROLLBACK, TN_DIAL, TN_PASTE, TN_NULL, TN_CR, TN_CRLF};
00020 
00021 typedef struct {
00022     char sendstr;
00023     tn_ops the_op;
00024 } optype;
00025 
00026 union KeyDefType {
00027     char *szKeyDef;
00028     optype *op;
00029 };
00030 
00031 union KeyDefType_const {
00032     const char *szKeyDef;
00033     const optype *op;
00034 };
00035 
00036 class TKeyDef {
00037 private:
00038     KeyDefType  uKeyDef;
00039     DWORD       vk_code;
00040     DWORD       dwState;
00041 
00042 public:
00043     TKeyDef();
00044     TKeyDef(char *def, DWORD state, DWORD code);
00045     TKeyDef(optype op, DWORD state, DWORD code);
00046     TKeyDef(const TKeyDef &t);
00047 
00048     char *operator=(char *def);
00049     DWORD  operator=(DWORD code);
00050     TKeyDef& operator=(const TKeyDef &t);
00051     const optype& operator=(optype op);
00052 
00053     ~TKeyDef();
00054 
00055 #ifdef __BORLANDC__
00056     int operator==(TKeyDef &t);
00057 #else
00058     // made these into friends for compatibility with stl
00059     // (Paul Brannan 5/7/98)
00060     friend bool operator==(const TKeyDef &t1, const TKeyDef &t2);
00061     friend bool operator<(const TKeyDef &t1, const TKeyDef &t2);
00062 #endif
00063 
00064     const char *GetszKey() { return uKeyDef.szKeyDef; }
00065     const KeyDefType GetKeyDef() { return uKeyDef; }
00066     DWORD GetCodeKey() { return vk_code; }
00067 
00068 };

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.