eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_extsrc.h File Reference
This graph shows which files directly or indirectly include this file:

Macros

#define D4D_IMG_WORK_PATH_DEFAULT
 D4D_IMG_WORK_PATH_DEFAULT constant default declaration ("a:\\") More...
 
#define D4D_FNT_WORK_PATH_DEFAULT
 D4D_FNT_WORK_PATH_DEFAULT constant default declaration ("a:\\") More...
 
#define D4D_DRIVE_MAX_STRLEN
 D4D_DRIVE_MAX_STRLEN constant default declaration (8) More...
 
#define D4D_SEEK_SET
 D4D_SEEK_SET eGUI Origin constant for begin of file (1) More...
 
#define D4D_SEEK_CUR
 D4D_SEEK_CUR eGUI Origin constant for current position of file (2) More...
 
#define D4D_SEEK_END
 D4D_SEEK_END eGUI Origin constant for end of file (3) More...
 
#define D4D_DECLARE_LOCALE_FUNCTIONS(D4DLOCALE_TranslateStr, D4DLOCALE_GetTranslateStrLength)
 Macro that define the external custom strings functionality. More...
 
#define D4D_DECLARE_FILE_FUNCTIONS(D4DFILE_fopen, D4DFILE_fclose, D4DFILE_read, D4DFILE_write, D4DFILE_fseek, D4DFILE_ftell)
 Macro that define the API to external resources. More...
 
#define D4D_READ8L(x)
 Macro for handling endianism - read 8bit - from Little Endian. More...
 
#define D4D_READ16L(x)
 Macro for handling endianism - read 16bit - from Little Endian. More...
 
#define D4D_READ32L(x)
 Macro for handling endianism - read 32bit - from Little Endian. More...
 
#define D4D_READ8B(x)
 Macro for handling endianism - read 8bit - from Big Endian. More...
 
#define D4D_READ16B(x)
 Macro for handling endianism - read 16bit - from Big Endian. More...
 
#define D4D_READ32B(x)
 Macro for handling endianism - read 32bit - from Big Endian. More...
 
#define D4D_WRITE8L(x)
 Macro for handling endianism - write 8bit - from Little Endian. More...
 
#define D4D_WRITE16L(x)
 Macro for handling endianism - write 16bit - from Little Endian. More...
 
#define D4D_WRITE32L(x)
 Macro for handling endianism - write 32bit - from Little Endian. More...
 
#define D4D_WRITE8B(x)
 Macro for handling endianism - write 8bit - from Big Endian. More...
 
#define D4D_WRITE16B(x)
 Macro for handling endianism - write 16bit - from Big Endian. More...
 
#define D4D_WRITE32B(x)
 Macro for handling endianism - write 32bit - from Big Endian. More...
 
#define D4D_FileOpen
 Macro used as short cut to used File Open function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_FileClose
 Macro used as short cut to used File Close function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_FileRead
 Macro used as short cut to used File Read function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_FileWrite
 Macro used as short cut to used File Write function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_FileSeek
 Macro used as short cut to used File Seek function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_FileTell
 Macro used as short cut to used File Tell function defined by D4D_DECLARE_FILE_FUNCTIONS. More...
 
#define D4D_MemAlloc(size)
 Mem Alloc eGUI definition. If not defined by user config any special user function, it used standard system function. More...
 
#define D4D_MemFree(pMem)
 Mem Free eGUI definition. If not defined by user config any special user function, it used standard system function. More...
 
#define D4D_MemCopy(pDst, pSrc, size)
 Mem Copy eGUI definition. If not defined by user config any special user function, it used standard system function. More...
 
#define D4D_CompareStringsUniversal(s1, s2)
 

Typedefs

typedef D4D_FILEPTR(* D4DFILE_FOPEN )(D4D_CHAR *filename, D4D_CHAR *mode)
 File open eGUI function type. More...
 
typedef int(* D4DFILE_FCLOSE )(D4D_FILEPTR p_file)
 File close eGUI function type. More...
 
typedef int(* D4DFILE_READ )(D4D_FILEPTR p_file, void *buffer, int size)
 File read eGUI function type. More...
 
typedef int(* D4DFILE_WRITE )(D4D_FILEPTR p_file, const void *buffer, int size)
 File write eGUI function type. More...
 
typedef int(* D4DFILE_FSEEK )(D4D_FILEPTR p_file, long offset, int origin)
 File seek eGUI function type. More...
 
typedef long(* D4DFILE_FTELL )(D4D_FILEPTR p_file)
 File tell eGUI function type. More...
 
typedef int(* D4DLOCALE_TRANSLATE_STR )(const D4D_TCHAR *originTxt, D4D_TCHAR *newTxt, int offset, int size)
 String translate function for customizing strings. More...
 
typedef int(* D4DLOCALE_GET_TRANSLATE_STR_LEN )(const D4D_TCHAR *originTxt)
 String translate string get lenght function for customized strings. More...
 
typedef struct D4DFILE_FUNCTIONS_S D4DFILE_FUNCTIONS
 eGUI structure to store API for external files support More...
 
typedef struct
D4DLOCALE_FUNCTIONS_S 
D4DLOCALE_FUNCTIONS
 eGUI structure to store API for external strings (translated) support More...
 

Functions

D4D_CHARD4D_GetFileExtension (D4D_CHAR *pFileName)
 
D4D_BOOL D4D_FileIsAbsolutePath (D4D_CHAR *pFileName)
 
int D4D_StrLen (register const D4D_CHAR *s)
 The function returns length of string terminated by zero. More...
 
D4D_CHARD4D_StrCopy (register D4D_CHAR *sd, register const D4D_CHAR *ss)
 The function copy string one string to other one (terminated by zero) More...
 
D4D_WCHARD4D_StrCopyAscii2Unicode (register D4D_WCHAR *sd, register const D4D_CHAR *ss)
 The function copy string one string (STANDARD 8 bit) to other one (UNICODE)(terminated by zero) More...
 
D4D_CHARD4D_StrCopyUnicode2Ascii (register D4D_CHAR *sd, register const D4D_WCHAR *ss)
 The function copy string one string (UNICODE) to other one (STANDARD 8 bit)(terminated by zero) More...
 
D4D_CHARD4D_StrCat (register D4D_CHAR *sd, register const D4D_CHAR *ss)
 The function concatenate strings (terminated by zero) More...
 
D4D_WCHARD4D_StrCatUnicode (register D4D_WCHAR *sd, register const D4D_WCHAR *ss)
 The function concatenate strings (terminated by zero) (UNICODE version) More...
 
int D4D_CompareStrings (const D4D_CHAR *s1, const D4D_CHAR *s2)
 The function copare two strings (terminated by zero) More...
 
int D4D_CompareStringsUnicode (const D4D_WCHAR *s1, const D4D_WCHAR *s2)
 The function copare two strings (terminated by zero) (UNICODE version) More...
 
void D4D_ToUpper (D4D_CHAR *s)
 The function convert all small alpha characters to upper in string(terminated by zero) More...
 
LWord D4D_SwapLong (LWord n)
 The function swap bytes in Long. More...
 
Word D4D_SwapWord (Word n)
 The function swap bytes in Word. More...
 

Variables

const D4DLOCALE_FUNCTIONS d4d_extsrcLocale
 
const D4DFILE_FUNCTIONS d4d_extsrcFile
 

Detailed Description

D4D Driver extscr helper functions header file.

Author
Petr Gargulak
Version
0.0.18.0
Date
Oct-2-2013

Definition in file d4d_extsrc.h.

Macro Definition Documentation

#define D4D_CompareStringsUniversal (   s1,
  s2 
)

Definition at line 371 of file d4d_extsrc.h.

Function Documentation

int D4D_CompareStrings ( const D4D_CHAR s1,
const D4D_CHAR s2 
)

The function copare two strings (terminated by zero)

Parameters
s1- first string
s2- second string
Returns
0 - strings are identical, <>0 - strings are different
Note
If the D4D_STD_STRING_H_INCLUDE is defined, the library strcmp() function is called. Only 1 Byte wide char is handled (not UNICODE).

Definition at line 257 of file d4d_extsrc.c.

Here is the caller graph for this function:

int D4D_CompareStringsUnicode ( const D4D_WCHAR s1,
const D4D_WCHAR s2 
)

The function copare two strings (terminated by zero) (UNICODE version)

Parameters
s1- first string
s2- second string
Returns
0 - strings are identical, <>0 - strings are different
Note
The strings MUST have type D4D_WCHAR*.

Definition at line 290 of file d4d_extsrc.c.

D4D_BOOL D4D_FileIsAbsolutePath ( D4D_CHAR pFileName)
D4D_CHAR* D4D_GetFileExtension ( D4D_CHAR pFileName)

Here is the caller graph for this function:

D4D_CHAR* D4D_StrCat ( register D4D_CHAR sd,
register const D4D_CHAR ss 
)

The function concatenate strings (terminated by zero)

Parameters
sd- destination string
ss- source string
Returns
pointer to destination string
Note
If the D4D_STD_STRING_H_INCLUDE is defined, the library strcat() function is called. Only 1 Byte wide char is handled (not UNICODE).

Definition at line 211 of file d4d_extsrc.c.

D4D_WCHAR* D4D_StrCatUnicode ( register D4D_WCHAR sd,
register const D4D_WCHAR ss 
)

The function concatenate strings (terminated by zero) (UNICODE version)

Parameters
sd- destination string
ss- source string
Returns
pointer to destination string
Note
Handling just only UNICODE strings.

Definition at line 236 of file d4d_extsrc.c.

D4D_CHAR* D4D_StrCopy ( register D4D_CHAR sd,
register const D4D_CHAR ss 
)

The function copy string one string to other one (terminated by zero)

Parameters
sd- destination string
ss- source string
Returns
pointer to destination string
Note
If the D4D_STD_STRING_H_INCLUDE is defined, the library strcpy() function is called. Only 1 Byte wide char is handled (not UNICODE).

Definition at line 154 of file d4d_extsrc.c.

Here is the caller graph for this function:

D4D_WCHAR* D4D_StrCopyAscii2Unicode ( register D4D_WCHAR sd,
register const D4D_CHAR ss 
)

The function copy string one string (STANDARD 8 bit) to other one (UNICODE)(terminated by zero)

Parameters
sd- destination string
ss- source string
Returns
pointer to destination string
Note
Is used to convert strings from Unicode to standard ASCII.

Definition at line 193 of file d4d_extsrc.c.

D4D_CHAR* D4D_StrCopyUnicode2Ascii ( register D4D_CHAR sd,
register const D4D_WCHAR ss 
)

The function copy string one string (UNICODE) to other one (STANDARD 8 bit)(terminated by zero)

Parameters
sd- destination string
ss- source string
Returns
pointer to destination string
Note
Is used to convert strings from standard ASCII to Unicode.

Definition at line 176 of file d4d_extsrc.c.

int D4D_StrLen ( register const D4D_CHAR s)

The function returns length of string terminated by zero.

Parameters
s- input string
Returns
length of string
Note
If the D4D_STD_STRING_H_INCLUDE is defined, the library strlen() function is called. Only 1 Byte wide char is handled (not UNICODE).

Definition at line 128 of file d4d_extsrc.c.

Here is the caller graph for this function:

LWord D4D_SwapLong ( LWord  n)

The function swap bytes in Long.

Parameters
n- input long number
Returns
swapped input long number
Note
Is Used to handling endianism.

Definition at line 335 of file d4d_extsrc.c.

Word D4D_SwapWord ( Word  n)

The function swap bytes in Word.

Parameters
n- input word number
Returns
swapped input word number
Note
Is Used to handling endianism.

Definition at line 352 of file d4d_extsrc.c.

Here is the caller graph for this function:

void D4D_ToUpper ( D4D_CHAR s)

The function convert all small alpha characters to upper in string(terminated by zero)

Parameters
s- input string
Returns
none
Note
Only 1 Byte wide char is handled (not UNICODE).

Definition at line 318 of file d4d_extsrc.c.

Here is the caller graph for this function:

Variable Documentation

const D4DFILE_FUNCTIONS d4d_extsrcFile
const D4DLOCALE_FUNCTIONS d4d_extsrcLocale