Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

DisplayModeInfo.h File Reference

#include "basetype.h"

Go to the source code of this file.

Typedefs

typedef DisplayModeInfo DisplayModeInfo

Enumerations

enum  DisplayModeInfo_Flags {
  SYSTEM = 1, VIDEO = 2, HARDWARE = 4, DMABLT = 8,
  FASTBLT = 16, SAFEBLT = 32, FLIP = 64, DMAPAGELOCKREQUIRED = 128,
  DMAASYNCH = 256, STRETCHMODE = 512, MODEXMODE = 1024
}

Functions

DisplayModeInfoDisplayModeInfo_Create (void)
void DisplayModeInfo_Destroy (DisplayModeInfo **Info)
int DisplayModeInfo_GetModeCount (DisplayModeInfo *Info)
geBoolean DisplayModeInfo_AddEntry (DisplayModeInfo *Info, int Width, int Height, int BitsPerPixel, uint32 Flags)
geBoolean DisplayModeInfo_GetNth (DisplayModeInfo *Info, int Nth, int *Width, int *Height, int *BitsPerPixel, uint32 *Flags)


Typedef Documentation

typedef struct DisplayModeInfo DisplayModeInfo
 

Definition at line 49 of file DisplayModeInfo.h.


Enumeration Type Documentation

enum DisplayModeInfo_Flags
 

Enumeration values:
SYSTEM 
VIDEO 
HARDWARE 
DMABLT 
FASTBLT 
SAFEBLT 
FLIP 
DMAPAGELOCKREQUIRED 
DMAASYNCH 
STRETCHMODE 
MODEXMODE 

Definition at line 34 of file DisplayModeInfo.h.

00035 {
00036         SYSTEM                          =1,     //store buffer in system
00037         VIDEO                           =2,     //or video ram
00038         HARDWARE                        =4,     //refresh choices
00039         DMABLT                          =8,
00040         FASTBLT                         =16,
00041         SAFEBLT                         =32,
00042         FLIP                            =64,
00043         DMAPAGELOCKREQUIRED     =128,//pagelock for dma req
00044         DMAASYNCH                       =256,//can do asynch dma
00045         STRETCHMODE                     =512,//stretch to fit
00046         MODEXMODE                       =1024
00047 };


Function Documentation

geBoolean DisplayModeInfo_AddEntry DisplayModeInfo Info,
int  Width,
int  Height,
int  BitsPerPixel,
uint32  Flags
 

Definition at line 81 of file DisplayModeInfo.c.

References DISPLAYMODES_MAX, GE_ERR_INTERNAL_RESOURCE, GE_FALSE, GE_TRUE, geBoolean, geErrorLog_AddString, DisplayModeInfo::Mode, DisplayModeInfo::ModeCount, and NULL.

Referenced by DDRAWDisplay_ModeCallback(), and DIBDisplay_GetDisplayInfo().

00086 {
00087         assert( Info != NULL );
00088 
00089         if (Info->ModeCount<DISPLAYMODES_MAX)
00090                 {
00091                         Info->Mode[Info->ModeCount].Width        = Width;
00092                         Info->Mode[Info->ModeCount].Height       = Height;
00093                         Info->Mode[Info->ModeCount].BitsPerPixel = BitsPerPixel;
00094                         Info->Mode[Info->ModeCount].Flags        = Flags;
00095                         Info->ModeCount++;
00096                         return GE_TRUE;
00097                 }
00098         else
00099                 {
00100                         geErrorLog_AddString(GE_ERR_INTERNAL_RESOURCE,"GE_DisplayModeInfo_AddEntry:Too many modes",NULL);
00101                         return GE_FALSE;
00102                 }
00103 }

DisplayModeInfo* DisplayModeInfo_Create void   ) 
 

Definition at line 52 of file DisplayModeInfo.c.

References GE_ERR_MEMORY_RESOURCE, geErrorLog_AddString, and NULL.

Referenced by SoftDrv_DisplayInfoTable_Create().

00053 {
00054         DisplayModeInfo *Info;
00055 
00056         Info = malloc(sizeof(*Info));
00057         if (Info == NULL)
00058                 {
00059                         geErrorLog_AddString(GE_ERR_MEMORY_RESOURCE,"DisplayModeInfo:  unable to get memory for object",NULL);
00060                         return NULL;
00061                 }
00062         Info-> ModeCount = 0;
00063         return Info;
00064 }

void DisplayModeInfo_Destroy DisplayModeInfo **  Info  ) 
 

Definition at line 66 of file DisplayModeInfo.c.

References NULL.

Referenced by SoftDrv_DisplayInfoTable_Create(), and SoftDrv_DisplayInfoTable_Destroy().

00067 {
00068         assert ( Info != NULL );
00069         assert (*Info != NULL );
00070         free ( *Info );
00071         *Info = NULL;
00072 }

int DisplayModeInfo_GetModeCount DisplayModeInfo Info  ) 
 

Definition at line 74 of file DisplayModeInfo.c.

References DisplayModeInfo::ModeCount, and NULL.

Referenced by SoftDrv_EnumModes().

00075 {
00076         assert( Info != NULL );
00077 
00078         return Info->ModeCount;
00079 }

geBoolean DisplayModeInfo_GetNth DisplayModeInfo Info,
int  Nth,
int *  Width,
int *  Height,
int *  BitsPerPixel,
uint32 Flags
 

Definition at line 105 of file DisplayModeInfo.c.

References DisplayModeInfo_Data::BitsPerPixel, DisplayModeInfo_Data::Flags, GE_FALSE, GE_TRUE, geBoolean, geErrorLog_AddString, DisplayModeInfo_Data::Height, DisplayModeInfo::Mode, DisplayModeInfo::ModeCount, NULL, and DisplayModeInfo_Data::Width.

Referenced by SoftDrv_EnumModes(), and SoftDrv_Init().

00110 {
00111         assert( Info != NULL );
00112         assert( Width        != NULL );
00113         assert( Height       != NULL );
00114         assert( BitsPerPixel != NULL );
00115         assert( Flags        != NULL );
00116         if ((Nth < 0) || (Nth > Info->ModeCount))
00117                 {
00118                         geErrorLog_AddString(GE_ERR_BAD_PARAMETER,"DisplayModeInfo_GetNth:  bad mode index",geErrorLog_IntToString(Nth));
00119                         return GE_FALSE;
00120                 }
00121 
00122         *Width        = Info->Mode[Nth].Width;
00123         *Height       = Info->Mode[Nth].Height;
00124         *BitsPerPixel = Info->Mode[Nth].BitsPerPixel;
00125         *Flags        = Info->Mode[Nth].Flags;
00126         return GE_TRUE;
00127 }


Generated on Tue Sep 30 12:37:25 2003 for GTestAndEngine by doxygen 1.3.2