⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 struct.h

📁 WinCE 3.0 BSP, 包含Inter SA1110, Intel_815E, Advantech_PCM9574 等
💻 H
字号:
//
// Permedia3 Sample Display Driver
// struct.h
//
// Copyright (c) 2000 Microsoft Corporation. All rights reserved.
//
// This file contains the type defintions of all of the various data structures
// used throughout the driver.

#pragma once

// This structure is used to store configuration data about the device at a
// global level.

typedef struct t_PERM3_CONFIG {

  // PCI bus configuration details.

  PCI_COMMON_CONFIG PciCommonConfig;
  PCI_SLOT_NUMBER   PciSlotNumber;
  ULONG             PciBusNumber;

  // BIOS version number.

  ULONG             BiosVersionMajorNumber:8;
  ULONG             BiosVersionMinorNumber:8;
  ULONG             Reserved1:16;

  // Register initialization table.

  ULONG *           InitializationTable;
  ULONG             InitializationTableEntries;

  // Extended clock settings for PXRX chips.

  ULONG             PXRXCoreClock;
  ULONG             PXRXMemoryClock;
  ULONG             PXRXMemoryClockSrc;
  ULONG             PXRXSetupClock;
  ULONG             PXRXSetupClockSrc;
  ULONG             PXRXGammaClock;
  ULONG             PXRXCoreClockAlt;
  BOOL              HaveExtendedClocks;

  // The DLL instance for the driver.

  HMODULE           DllInstance;

  // Notes if DrvEnabledPDEV has already been called for graphics, as we
  // may be called multiple times for printer contexts.

  BOOL              GraphicsPDEVEnabled;

} PERM3_CONFIG;

// This structure is used to store information about a specific video mode. We
// use an array of these things as the "video mode table." This does not deal
// with the format of the color data.

typedef struct t_PERM3_VIDEO_MODE {

  ULONG HResolution;        // In Pixels
  ULONG HTotalTime;         // In Characters
  UCHAR HFrontPorch;        // In Characters
  UCHAR HSyncTime;          // In Characters
  UCHAR HBackPorch;         // In Characters
  UCHAR HSyncPolarity;      // Positive or Negative
  
  ULONG VResolution;        // In Lines
  ULONG VTotalTime;         // In Lines
  UCHAR VFrontPorch;        // In Lines
  UCHAR VSyncTime;          // In Lines
  UCHAR VBackPorch;         // In Lines
  UCHAR VSyncPolarity;      // Positive or Negative

  ULONG Frequency;          // Hertz
  ULONG PixelClock;         // Pixels Per Second (!TODO! Is this the right unit?)

} PERM3_VIDEO_MODE;

// This structure is used to describe color formats that could be used as
// the primary surface color format. It consists of the basic color format
// data plus some extra Perm3 data. 

typedef struct t_PERM3_FORMAT {

  // Notice use of the "anonymous structure" Microsoft C extension. We also
  // intentionally locate this structure first to allow us to cast to the
  // embedded structure.

  FORMAT;

  // Do we need to SystemFree the Palette/Masks pointer when the structure
  // goes out of scope?
 
  BOOL FreePaletteMasks;

  UCHAR RDColorFormat;

} PERM3_FORMAT;

// A display mode to us is a combination of a video mode (with resolution
// and video timing information,) and a pixel format, with color information.
// Store indicies into both the video mode table and the pixel table as well
// as the stride for this particular display mode.

typedef struct t_PERM3_DISPLAY_MODE {

  USHORT VideoMode;
  USHORT PixelFormat;

} PERM3_DISPLAY_MODE;

// Surface management is a joint effort between GDI and the driver. GDI relies
// on the driver to remember at very least the HBITMAP that was assigned to
// that surface by EngCreateDeviceSurface. However it will give us one 32
// bit value that will allow us to identify the surface (that value must be
// passed into the function that generates the HBITMAP, so it can't be the
// 32 bit identifier.) Instead, we pass around pointers to these structures.

// Our surfaces will be simple extensions of the swg surface structure.

typedef struct t_PERM3_SURFACE {

  // Notice use of the "anonymous structure" Microsoft C extension. We also
  // intentionally locate this structure first to allow us to cast to the
  // embedded structure.

  SURFACE;

  HSURF         BitmapHandle;

  // Do we need to SystemFree() the Format pointer when the structure goes
  // out of scope?

  BOOL          FreeFormat;

  // DirectDraw allows a color key to be associated with every surface.

  COLORKEY_TYPE ColorKeyType;
  COLOR_SPACE   SourceColorKey;
  COLOR_SPACE   DestColorKey;

} PERM3_SURFACE;

// This structure is used to pass parameters to the blitting routines. We will
// use the same structure as the software blitting library as we do not need
// any extra fields.

typedef BLT_PARAM PERM3_BLT_PARAM;




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -