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

machine.h
Go to the documentation of this file.
00001 /* 
00002  *  FreeLoader
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License along
00015  *  with this program; if not, write to the Free Software Foundation, Inc.,
00016  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #pragma once
00020 
00021 #ifndef __DISK_H
00022 #include "disk.h"
00023 #endif
00024 
00025 #ifndef __MEMORY_H
00026 #include "mm.h"
00027 #endif
00028 
00029 #ifndef __FS_H
00030 #include "fs.h"
00031 #endif
00032 
00033 typedef enum tagVIDEODISPLAYMODE
00034 {
00035   VideoTextMode,
00036   VideoGraphicsMode
00037 } VIDEODISPLAYMODE, *PVIDEODISPLAYMODE;
00038 
00039 typedef struct tagMACHVTBL
00040 {
00041   VOID (*ConsPutChar)(int Ch);
00042   BOOLEAN (*ConsKbHit)(VOID);
00043   int (*ConsGetCh)(VOID);
00044 
00045   VOID (*VideoClearScreen)(UCHAR Attr);
00046   VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init);
00047   VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth);
00048   ULONG (*VideoGetBufferSize)(VOID);
00049   VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y);
00050   VOID (*VideoHideShowTextCursor)(BOOLEAN Show);
00051   VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y);
00052   VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer);
00053   BOOLEAN (*VideoIsPaletteFixed)(VOID);
00054   VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
00055   VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
00056   VOID (*VideoSync)(VOID);
00057   VOID (*Beep)(VOID);
00058   VOID (*PrepareForReactOS)(IN BOOLEAN Setup);
00059 
00060   FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current);
00061   PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize);
00062 
00063   BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
00064   BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
00065   BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
00066   ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber);
00067 
00068   TIMEINFO* (*GetTime)(VOID);
00069   ULONG (*GetRelativeTime)(VOID);
00070 
00071   PCONFIGURATION_COMPONENT_DATA (*HwDetect)(VOID);
00072   VOID (*HwIdle)(VOID);
00073 } MACHVTBL, *PMACHVTBL;
00074 
00075 VOID MachInit(const char *CmdLine);
00076 
00077 extern MACHVTBL MachVtbl;
00078 
00079 VOID MachConsPutChar(int Ch);
00080 BOOLEAN MachConsKbHit(VOID);
00081 int MachConsGetCh(VOID);
00082 VOID MachVideoClearScreen(UCHAR Attr);
00083 VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init);
00084 VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
00085 ULONG MachVideoGetBufferSize(VOID);
00086 VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
00087 VOID MachVideoHideShowTextCursor(BOOLEAN Show);
00088 VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
00089 VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
00090 BOOLEAN MachVideoIsPaletteFixed(VOID);
00091 VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
00092 VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue);
00093 VOID MachVideoSync(VOID);
00094 VOID MachBeep(VOID);
00095 BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size);
00096 BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size);
00097 BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
00098 BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
00099 ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber);
00100 VOID MachPrepareForReactOS(IN BOOLEAN Setup);
00101 VOID MachHwIdle(VOID);
00102 
00103 #define MachConsPutChar(Ch)         MachVtbl.ConsPutChar(Ch)
00104 #define MachConsKbHit()             MachVtbl.ConsKbHit()
00105 #define MachConsGetCh()             MachVtbl.ConsGetCh()
00106 #define MachVideoClearScreen(Attr)      MachVtbl.VideoClearScreen(Attr)
00107 #define MachVideoSetDisplayMode(Mode, Init) MachVtbl.VideoSetDisplayMode((Mode), (Init))
00108 #define MachVideoGetDisplaySize(W, H, D)    MachVtbl.VideoGetDisplaySize((W), (H), (D))
00109 #define MachVideoGetBufferSize()        MachVtbl.VideoGetBufferSize()
00110 #define MachVideoSetTextCursorPosition(X, Y)    MachVtbl.VideoSetTextCursorPosition((X), (Y))
00111 #define MachVideoHideShowTextCursor(Show)   MachVtbl.VideoHideShowTextCursor(Show)
00112 #define MachVideoPutChar(Ch, Attr, X, Y)    MachVtbl.VideoPutChar((Ch), (Attr), (X), (Y))
00113 #define MachVideoCopyOffScreenBufferToVRAM(Buf) MachVtbl.VideoCopyOffScreenBufferToVRAM(Buf)
00114 #define MachVideoIsPaletteFixed()       MachVtbl.VideoIsPaletteFixed()
00115 #define MachVideoSetPaletteColor(Col, R, G, B)  MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B))
00116 #define MachVideoGetPaletteColor(Col, R, G, B)  MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B))
00117 #define MachVideoSync()             MachVtbl.VideoSync()
00118 #define MachBeep()                   MachVtbl.Beep()
00119 #define MachPrepareForReactOS(a)        MachVtbl.PrepareForReactOS(a)
00120 #define MachDiskGetBootPath(Path, Size)     MachVtbl.DiskGetBootPath((Path), (Size))
00121 #define MachDiskNormalizeSystemPath(Path, Size) MachVtbl.DiskNormalizeSystemPath((Path), (Size))
00122 #define MachDiskReadLogicalSectors(Drive, Start, Count, Buf)    MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))
00123 #define MachDiskGetDriveGeometry(Drive, Geom)   MachVtbl.DiskGetDriveGeometry((Drive), (Geom))
00124 #define MachDiskGetCacheableBlockCount(Drive)   MachVtbl.DiskGetCacheableBlockCount(Drive)
00125 #define MachHwDetect()              MachVtbl.HwDetect()
00126 #define MachHwIdle()                MachVtbl.HwIdle()
00127 
00128 /* EOF */

Generated on Fri May 25 2012 04:17:19 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.