winreplace.h File Reference

Replaces a windows.h include (for Linux). More...

#include <sys/time.h>
#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

Include dependency graph for winreplace.h:

This graph shows which files directly or indirectly include this file:


Classes

union  _LARGE_INTEGER
struct  tagRECT
struct  _finddata_t
struct  abs_time_t

Defines

#define MAX_PATH   260
#define SW_SHOW   5
#define WM_CREATE   1
#define WM_DESTROY   2
#define WM_MOVE   3
#define WM_SIZE   5
#define WM_PAINT   15
#define WM_CLOSE   16
#define WM_ACTIVATEAPP   28
#define WM_KEYDOWN   256
#define WM_KEYUP   257
#define WM_INITDIALOG   272
#define WM_COMMAND   273
#define WM_SYSCOMMAND   274
#define WA_ACTIVE   1
#define WA_CLICKACTIVE   2
#define VK_F1   SDLK_F1
#define VK_F2   SDLK_F2
#define VK_F3   SDLK_F3
#define VK_F4   SDLK_F4
#define VK_F5   SDLK_F5
#define VK_F12   SDLK_F12
#define VK_RETURN   SDLK_RETURN
#define VK_MULTIPLY   SDLK_KP_MULTIPLY
#define VK_DIVIDE   SDLK_KP_DIVIDE
#define VK_ADD   SDLK_KP_PLUS
#define VK_SUBTRACT   SDLK_KP_MINUS
#define VK_NUMPAD0   SDLK_KP0
#define VK_NUMPAD1   SDLK_KP1
#define VK_NUMPAD2   SDLK_KP2
#define VK_NUMPAD3   SDLK_KP3
#define VK_NUMPAD4   SDLK_KP4
#define FOREGROUND_BLUE   1
#define FOREGROUND_GREEN   2
#define FOREGROUND_RED   4
#define FOREGROUND_INTENSITY   8
#define BACKGROUND_BLUE   16
#define BACKGROUND_GREEN   32
#define BACKGROUND_RED   64
#define BACKGROUND_INTENSITY   128
#define DECLARE_HANDLE(n)   typedef struct n##__{int i;}*n
#define INVALID_SOCKET   (SOCKET)(~0)
#define SOCKET_ERROR   (-1)
#define MAKEINTRESOURCE(i)   (i)
#define ADDR_ANY   INADDR_ANY
#define Sleep(X)   usleep(X*1000);

Typedefs

typedef FILE TMP_HANDLE
typedef FILE * HANDLE
typedef void TMP_HMODULE
typedef void * HMODULE
typedef long long __int64
typedef unsigned char BYTE
typedef unsigned short WORD
typedef char CHAR
typedef unsigned long DWORD
typedef long LONG
typedef LONG HRESULT
typedef long long LONGLONG
typedef unsigned long long ULONGLONG
typedef unsigned int UINT_PTR
typedef unsigned int * PUINT_PTR
typedef long LONG_PTR
typedef long * PLONG_PTR
typedef void * PVOID
typedef void * LPVOID
typedef LONG_PTR WPARAM
typedef LONG_PTR LPARAM
typedef u_int SOCKET
typedef const CHARPCSTR
typedef const CHARLPCSTR
typedef int HBITMAP
typedef struct sockaddr_in SOCKADDR_IN
typedef struct sockaddr SOCKADDR
typedef struct sockaddr * LPSOCKADDR
typedef union _LARGE_INTEGER LARGE_INTEGER
typedef union _LARGE_INTEGERPLARGE_INTEGER
typedef struct tagRECT RECT

Functions

 DECLARE_HANDLE (HWND)
 DECLARE_HANDLE (HINSTANCE)
 DECLARE_HANDLE (HRSRC)
 DECLARE_HANDLE (HGLOBAL)
long _findfirst (const char *pattern, _finddata_t *findData)
long _findnext (long handle, _finddata_t *findData)
int _findclose (long handle)
bool NtQueryPerformanceCounter (PLARGE_INTEGER Counter, PLARGE_INTEGER Frequency)
bool QueryPerformanceFrequency (PLARGE_INTEGER frequency)
bool QueryPerformanceCounter (PLARGE_INTEGER counter)
int GetObject (HBITMAP hBitmap, int ignored, LPVOID *lpvObject)
 adapted version of GetObject for our purposes. replaced 2nd param
HRSRC FindResource (HMODULE hModule, int name, LPCSTR type)
 clone of FindResource function in Windows API - inspired by Wine note: the syntax is taken from FindResourceA which calls FindResourceExA (except: name is an int)
HGLOBAL LoadResource (HMODULE hModule, HRSRC hResource)
 clone of LoadResource
LPVOID LockResource (HGLOBAL hGlobal)
 clone of LockResource
DWORD SizeofResource (HMODULE hModule, HRSRC hResource)
 clone of SizeofResource (determine data length of a certain res)
unsigned char * getResource (int type, int id, unsigned long *len)

Detailed Description

Replaces a windows.h include (for Linux).


Define Documentation

#define ADDR_ANY   INADDR_ANY

#define BACKGROUND_BLUE   16

#define BACKGROUND_GREEN   32

#define BACKGROUND_INTENSITY   128

#define BACKGROUND_RED   64

#define DECLARE_HANDLE (  )     typedef struct n##__{int i;}*n

#define FOREGROUND_BLUE   1

#define FOREGROUND_GREEN   2

#define FOREGROUND_INTENSITY   8

#define FOREGROUND_RED   4

#define INVALID_SOCKET   (SOCKET)(~0)

#define MAKEINTRESOURCE (  )     (i)

#define MAX_PATH   260

#define Sleep (  )     usleep(X*1000);

#define SOCKET_ERROR   (-1)

#define SW_SHOW   5

#define VK_ADD   SDLK_KP_PLUS

#define VK_DIVIDE   SDLK_KP_DIVIDE

#define VK_F1   SDLK_F1

#define VK_F12   SDLK_F12

#define VK_F2   SDLK_F2

#define VK_F3   SDLK_F3

#define VK_F4   SDLK_F4

#define VK_F5   SDLK_F5

#define VK_MULTIPLY   SDLK_KP_MULTIPLY

#define VK_NUMPAD0   SDLK_KP0

#define VK_NUMPAD1   SDLK_KP1

#define VK_NUMPAD2   SDLK_KP2

#define VK_NUMPAD3   SDLK_KP3

#define VK_NUMPAD4   SDLK_KP4

#define VK_RETURN   SDLK_RETURN

#define VK_SUBTRACT   SDLK_KP_MINUS

#define WA_ACTIVE   1

#define WA_CLICKACTIVE   2

#define WM_ACTIVATEAPP   28

#define WM_CLOSE   16

#define WM_COMMAND   273

#define WM_CREATE   1

#define WM_DESTROY   2

#define WM_INITDIALOG   272

#define WM_KEYDOWN   256

#define WM_KEYUP   257

#define WM_MOVE   3

#define WM_PAINT   15

#define WM_SIZE   5

#define WM_SYSCOMMAND   274


Typedef Documentation

typedef long long __int64

typedef unsigned char BYTE

typedef char CHAR

typedef unsigned long DWORD

typedef FILE * HANDLE

typedef int HBITMAP

typedef void * HMODULE

typedef LONG HRESULT

typedef long LONG

typedef long LONG_PTR

typedef long long LONGLONG

typedef LONG_PTR LPARAM

typedef const CHAR * LPCSTR

typedef struct sockaddr* LPSOCKADDR

typedef void * LPVOID

typedef const CHAR* PCSTR

typedef union _LARGE_INTEGER * PLARGE_INTEGER

typedef long * PLONG_PTR

typedef unsigned int * PUINT_PTR

typedef void* PVOID

typedef struct tagRECT RECT

typedef struct sockaddr SOCKADDR

typedef struct sockaddr_in SOCKADDR_IN

typedef u_int SOCKET

typedef FILE TMP_HANDLE

typedef void TMP_HMODULE

typedef unsigned int UINT_PTR

typedef unsigned long long ULONGLONG

typedef unsigned short WORD

typedef LONG_PTR WPARAM


Function Documentation

int _findclose ( long  handle  ) 

Here is the caller graph for this function:

long _findfirst ( const char *  pattern,
_finddata_t findData 
)

Here is the caller graph for this function:

long _findnext ( long  handle,
_finddata_t findData 
)

Here is the caller graph for this function:

DECLARE_HANDLE ( HGLOBAL   ) 

DECLARE_HANDLE ( HRSRC   ) 

DECLARE_HANDLE ( HINSTANCE   ) 

DECLARE_HANDLE ( HWND   ) 

HRSRC FindResource ( HMODULE  hModule,
int  name,
LPCSTR  type 
)

clone of FindResource function in Windows API - inspired by Wine note: the syntax is taken from FindResourceA which calls FindResourceExA (except: name is an int)

Parameters:
hModule hModule (ignored)
name name of the resource (as int)
type type of the resource
Returns:
returns a handle

Here is the call graph for this function:

Here is the caller graph for this function:

int GetObject ( HBITMAP  hBitmap,
int  ignored,
LPVOID lpvObject 
)

adapted version of GetObject for our purposes. replaced 2nd param

Parameters:
hBitmap the resource id to the desired bitmap
ignored 
lpvObject pointer to data
Returns:
returns size of bitmap

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char* getResource ( int  type,
int  id,
unsigned long *  len 
)

Here is the caller graph for this function:

HGLOBAL LoadResource ( HMODULE  hModule,
HRSRC  hResource 
)

clone of LoadResource

Parameters:
hModule hModule (ignored)
hResource resource handler returned by FindResource
Returns:
global handle to the resource

Here is the caller graph for this function:

LPVOID LockResource ( HGLOBAL  hGlobal  ) 

clone of LockResource

Parameters:
hGlobal handle obtained by LoadResource
Returns:
pointer to the demanded resource

Here is the caller graph for this function:

bool NtQueryPerformanceCounter ( PLARGE_INTEGER  Counter,
PLARGE_INTEGER  Frequency 
)

Here is the caller graph for this function:

bool QueryPerformanceCounter ( PLARGE_INTEGER  counter  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool QueryPerformanceFrequency ( PLARGE_INTEGER  frequency  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

DWORD SizeofResource ( HMODULE  hModule,
HRSRC  hResource 
)

clone of SizeofResource (determine data length of a certain res)

Parameters:
hModule hModule (ignored)
hResource resource handle
Returns:
size of data buffer

Here is the caller graph for this function:


Generated on Sat Oct 18 12:26:39 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo