#include <stdlib.h>#include <assert.h>#include "DisplayModeInfo.h"Go to the source code of this file.
Compounds | |
| struct | DisplayModeInfo |
| struct | DisplayModeInfo_Data |
Defines | |
| #define | geErrorLog_AddString(Error, xx, yy) |
| #define | DISPLAYMODES_MAX 16 |
Typedefs | |
| typedef DisplayModeInfo_Data | DisplayModeInfo_Data |
| typedef DisplayModeInfo | DisplayModeInfo |
Functions | |
| DisplayModeInfo * | DisplayModeInfo_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) |
|
|
Definition at line 34 of file DisplayModeInfo.c. Referenced by DisplayModeInfo_AddEntry(). |
|
|
Definition at line 30 of file DisplayModeInfo.c. |
|
|
|
|
|
|
|
||||||||||||||||||||||||
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
||||||||||||||||||||||||||||
|
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 }
|
1.3.2