FTEQW
Documentation of the FTE engine source tree.
sys_win.c File Reference

Typedefs

typedef DWORD ProcessId
 
typedef DWORD HANDLE hFile
 
typedef DWORD HANDLE MINIDUMP_TYPE DumpType
 
typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam
 
typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam
 
typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION PMINIDUMP_USER_STREAM_INFORMATION PMINIDUMP_CALLBACK_INFORMATION CallbackParam
 
typedef struct qSHARDAPPIDINFOLINK qSHARDAPPIDINFOLINK
 
typedef struct qIPropertyStore qIPropertyStore
 
typedef struct qIObjectCollection qIObjectCollection
 
typedef struct qICustomDestinationList qICustomDestinationList
 
typedef struct qIApplicationAssociationRegistrationUI qIApplicationAssociationRegistrationUI
 

Enumerations

enum  { CLOCK_TGT = 1 , CLOCK_QPC = 2 , CLOCK_QPC_SINGLE = 3 }
 

Functions

 __declspec (dllexport)
 
void VARGS Sys_Printf (char *fmt,...)
 
void Sys_SendKeyEvents (void)
 
void Sys_ServerActivity (void)
 
void Sys_RecentServer (char *command, char *target, char *title, char *desc)
 
qboolean Sys_InitTerminal (void)
 
char * Sys_ConsoleInput (void)
 
void Sys_CloseTerminal (void)
 
dllhandle_t * Sys_LoadLibrary (const char *name, dllfunction_t *funcs)
 
voidSys_GetAddressForName (dllhandle_t *module, const char *exportname)
 
void Sys_CloseLibrary (dllhandle_t *lib)
 
void Sys_Init (void)
 
void Sys_Shutdown (void)
 
qboolean Sys_RandomBytes (qbyte *string, int len)
 
qboolean Sys_GetDesktopParameters (int *width, int *height, int *bpp, int *refreshrate)
 
void INS_Move (void)
 
void INS_Commands (void)
 
void INS_Init (void)
 
void INS_ReInit (void)
 
void INS_Shutdown (void)
 
void INS_UpdateGrabs (int fullscreen, int activeapp)
 
voidRT_GetCoreWindow (int *width, int *height)
 
void D3D11_DoResize (int newwidth, int newheight)
 
void Sys_Clipboard_PasteText (clipboardtype_t cbt, void(*callback)(void *cb, char *utf8), void *ctx)
 
void Sys_SaveClipboard (clipboardtype_t cbt, char *text)
 
unsigned int Sys_Milliseconds (void)
 
double Sys_DoubleTime (void)
 
void Sys_Quit (void)
 
void Sys_mkdir (const char *path)
 
qboolean Sys_rmdir (const char *path)
 
qboolean Sys_remove (const char *path)
 
qboolean Sys_Rename (const char *oldfname, const char *newfname)
 
int Sys_EnumerateFiles (const char *gpath, const char *match, int(QDECL *func)(const char *fname, qofs_t fsize, void *parm, searchpathfuncs_t *spath), void *parm, searchpathfuncs_t *spath)
 
size_t HashCalculate (const char *hashtype, const void *data, size_t data_size, void *digest_out, size_t digest_size)
 
HMODULE LoadLibraryU (const char *name)
 
char * Sys_GetNameForAddress (dllhandle_t *module, void *address)
 
int VARGS Sys_DebugLog (char *file, char *fmt,...)
 
typedef BOOL (WINAPI *MINIDUMPWRITEDUMP)(HANDLE hProcess
 
void DumpGLState (void)
 
DWORD CrashExceptionHandler (qboolean iswatchdog, DWORD exceptionCode, LPEXCEPTION_POINTERS exceptionInfo)
 
LONG CALLBACK nonmsvc_CrashExceptionHandler (PEXCEPTION_POINTERS ExceptionInfo)
 
int watchdogthreadfunction (void *arg)
 
LRESULT CALLBACK LowLevelKeyboardProc (INT nCode, WPARAM wParam, LPARAM lParam)
 
void SetHookState (qboolean state)
 
int Sys_EnumerateFiles (const char *gpath, const char *match, int(QDECL *func)(const char *fname, qofs_t fsize, time_t mtime, void *parm, searchpathfuncs_t *spath), void *parm, searchpathfuncs_t *spath)
 
qboolean Sys_ResolveFileURL (const char *inurl, int inlen, char *out, int outlen)
 
void Sys_MakeCodeWriteable (void *startaddr, unsigned long length)
 
void Sys_DoFileAssociations (int elevated, const char *scheme)
 
void Sys_Register_File_Associations_f (void)
 
void VARGS Sys_Error (const char *error,...)
 
void Sys_Clipboard_PasteText (clipboardtype_t cbt, void(*callback)(void *cb, const char *utf8), void *ctx)
 
void Sys_SaveClipboard (clipboardtype_t cbt, const char *text)
 
BOOL WINAPI HandlerRoutine (DWORD dwCtrlType)
 
qboolean QCExternalDebuggerCommand (char *text)
 
void SleepUntilInput (int time)
 
qboolean Sys_Startup_CheckMem (quakeparms_t *parms)
 
void Win7_Init (void)
 
 HRESULT (WINAPI *pSHOpenWithDialog)(HWND hwndParent
 
 LPITEMIDLIST (STDAPICALLTYPE *pSHBrowseForFolderW)(LPBROWSEINFOW lpbi)
 
 BOOL (STDAPICALLTYPE *pSHGetPathFromIDListW)(LPCITEMIDLIST pidl
 
void Win7_TaskListInit (void)
 
qboolean Sys_SetUpdatedBinary (const char *newbinary)
 
qboolean Sys_EngineMayUpdate (void)
 
char * Sys_URIScheme_NeedsRegistering (void)
 
int MessageBoxU (HWND hWnd, char *lpText, char *lpCaption, UINT uType)
 
void FS_Directorize (char *fname, size_t fnamesize)
 
LRESULT CALLBACK NoCloseWindowProc (HWND w, UINT m, WPARAM wp, LPARAM lp)
 
BOOL CopyFileU (const char *src, const char *dst, BOOL bFailIfExists)
 
qboolean Sys_RunInstaller (void)
 
 __attribute__ ((visibility("default")))
 
int __cdecl main (void)
 
void Sys_Sleep (double seconds)
 
voidWIN_CreateCursor (const qbyte *imagedata, int width, int height, uploadfmt_t format, float hotx, float hoty, float scale)
 
qboolean WIN_SetCursor (void *cursor)
 
void WIN_DestroyCursor (void *cursor)
 
void WIN_WindowCreated (HWND window)
 

Variables

qboolean isDedicated = false
 
int isPlugin
 
qboolean debugout
 
float gammapending
 
HWND sys_parentwindow
 
unsigned int sys_parentleft
 
unsigned int sys_parenttop
 
unsigned int sys_parentwidth
 
unsigned int sys_parentheight
 
int qwinvermaj
 
int qwinvermin
 
char * sys_argv [MAX_NUM_ARGVS]
 
jmp_buf restart_jmpbuf
 
int starttime
 
qboolean Minimized
 
qboolean WinNT
 
HANDLE qwclsemaphore
 
voidwatchdogthread
 
volatile int watchdogframe
 
cvar_t sys_disableWinKeys = CVAR("sys_disableWinKeys", "0")
 
cvar_t sys_disableTaskSwitch = CVARF("sys_disableTaskSwitch", "0", CVAR_NOTFROMSERVER)
 
HINSTANCE global_hInstance
 
int global_nCmdShow
 
HWND hwnd_dialog
 
const qOPENASINFO * poainfo
 
LPWSTR pszPath
 
LPWSTR int csidl
 
LPWSTR int BOOL fCreate
 
PNOTIFYICONDATAW lpData
 
const GUID qIID_IApplicationAssociationRegistrationUI = {0x1f76a169,0xf994,0x40ac, {0x8f,0xc8,0x09,0x59,0xe8,0x87,0x47,0x10}}
 
const GUID qCLSID_ApplicationAssociationRegistrationUI = {0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}}
 
char sys_language [64]
 
HCURSOR hArrowCursor
 
HCURSOR hCustomCursor
 

Typedef Documentation

◆ CallbackParam

typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION PMINIDUMP_USER_STREAM_INFORMATION PMINIDUMP_CALLBACK_INFORMATION CallbackParam

◆ DumpType

typedef DWORD HANDLE MINIDUMP_TYPE DumpType

◆ ExceptionParam

typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam

◆ hFile

typedef DWORD HANDLE hFile

◆ ProcessId

typedef DWORD ProcessId

◆ qIApplicationAssociationRegistrationUI

typedef struct qIApplicationAssociationRegistrationUI qIApplicationAssociationRegistrationUI

◆ qICustomDestinationList

typedef struct qICustomDestinationList qICustomDestinationList

◆ qIObjectCollection

typedef struct qIObjectCollection qIObjectCollection

◆ qIPropertyStore

typedef struct qIPropertyStore qIPropertyStore

◆ qSHARDAPPIDINFOLINK

typedef struct qSHARDAPPIDINFOLINK qSHARDAPPIDINFOLINK

◆ UserStreamParam

typedef DWORD HANDLE MINIDUMP_TYPE PMINIDUMP_EXCEPTION_INFORMATION PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CLOCK_TGT 
CLOCK_QPC 
CLOCK_QPC_SINGLE 

Function Documentation

◆ __attribute__()

__attribute__ ( (visibility("default"))  )

◆ __declspec()

__declspec ( dllexport  )

◆ BOOL() [1/2]

BOOL ( STDAPICALLTYPE *  pSHGetPathFromIDListW)

◆ BOOL() [2/2]

static BOOL ( WINAPI *  MINIDUMPWRITEDUMP)

◆ CopyFileU()

BOOL CopyFileU ( const char *  src,
const char *  dst,
BOOL  bFailIfExists 
)

◆ CrashExceptionHandler()

DWORD CrashExceptionHandler ( qboolean  iswatchdog,
DWORD  exceptionCode,
LPEXCEPTION_POINTERS  exceptionInfo 
)

◆ D3D11_DoResize()

void D3D11_DoResize ( int  newwidth,
int  newheight 
)

◆ DumpGLState()

void DumpGLState ( void  )

◆ FS_Directorize()

void FS_Directorize ( char *  fname,
size_t  fnamesize 
)

◆ HandlerRoutine()

BOOL WINAPI HandlerRoutine ( DWORD  dwCtrlType)

◆ HashCalculate()

size_t HashCalculate ( const char *  hashtype,
const void data,
size_t  data_size,
void digest_out,
size_t  digest_size 
)

◆ HRESULT()

HRESULT ( WINAPI *  pSHOpenWithDialog)

◆ INS_Commands()

void INS_Commands ( void  )

◆ INS_Init()

void INS_Init ( void  )

◆ INS_Move()

void INS_Move ( void  )

◆ INS_ReInit()

void INS_ReInit ( void  )

◆ INS_Shutdown()

void INS_Shutdown ( void  )

◆ INS_UpdateGrabs()

void INS_UpdateGrabs ( int  fullscreen,
int  activeapp 
)

◆ LoadLibraryU()

HMODULE LoadLibraryU ( const char *  name)

◆ LowLevelKeyboardProc()

LRESULT CALLBACK LowLevelKeyboardProc ( INT  nCode,
WPARAM  wParam,
LPARAM  lParam 
)

◆ LPITEMIDLIST()

LPITEMIDLIST ( STDAPICALLTYPE *  pSHBrowseForFolderW)

◆ main()

int __cdecl main ( void  )

◆ MessageBoxU()

int MessageBoxU ( HWND  hWnd,
char *  lpText,
char *  lpCaption,
UINT  uType 
)

◆ NoCloseWindowProc()

LRESULT CALLBACK NoCloseWindowProc ( HWND  w,
UINT  m,
WPARAM  wp,
LPARAM  lp 
)

◆ nonmsvc_CrashExceptionHandler()

LONG CALLBACK nonmsvc_CrashExceptionHandler ( PEXCEPTION_POINTERS  ExceptionInfo)

◆ QCExternalDebuggerCommand()

qboolean QCExternalDebuggerCommand ( char *  text)

◆ RT_GetCoreWindow()

void * RT_GetCoreWindow ( int width,
int height 
)

◆ SetHookState()

void SetHookState ( qboolean  state)

◆ SleepUntilInput()

void SleepUntilInput ( int  time)

◆ Sys_Clipboard_PasteText() [1/2]

void Sys_Clipboard_PasteText ( clipboardtype_t  cbt,
void(*)(void *cb, char *utf8)  callback,
void ctx 
)

◆ Sys_Clipboard_PasteText() [2/2]

void Sys_Clipboard_PasteText ( clipboardtype_t  cbt,
void(*)(void *cb, const char *utf8)  callback,
void ctx 
)

◆ Sys_CloseLibrary()

void Sys_CloseLibrary ( dllhandle_t *  lib)

◆ Sys_CloseTerminal()

void Sys_CloseTerminal ( void  )

◆ Sys_ConsoleInput()

char * Sys_ConsoleInput ( void  )

◆ Sys_DebugLog()

int VARGS Sys_DebugLog ( char *  file,
char *  fmt,
  ... 
)

◆ Sys_DoFileAssociations()

void Sys_DoFileAssociations ( int  elevated,
const char *  scheme 
)

◆ Sys_DoubleTime()

double Sys_DoubleTime ( void  )

◆ Sys_EngineMayUpdate()

qboolean Sys_EngineMayUpdate ( void  )

◆ Sys_EnumerateFiles() [1/2]

int Sys_EnumerateFiles ( const char *  gpath,
const char *  match,
int(QDECL *func)(const char *fname, qofs_t fsize, time_t mtime, void *parm, searchpathfuncs_t *spath)  ,
void parm,
searchpathfuncs_t spath 
)

◆ Sys_EnumerateFiles() [2/2]

int Sys_EnumerateFiles ( const char *  gpath,
const char *  match,
int(QDECL *func)(const char *fname, qofs_t fsize, void *parm, searchpathfuncs_t *spath)  ,
void parm,
searchpathfuncs_t spath 
)

◆ Sys_Error()

void VARGS Sys_Error ( const char *  error,
  ... 
)

◆ Sys_GetAddressForName()

void * Sys_GetAddressForName ( dllhandle_t *  module,
const char *  exportname 
)

◆ Sys_GetDesktopParameters()

qboolean Sys_GetDesktopParameters ( int width,
int height,
int bpp,
int refreshrate 
)

◆ Sys_GetNameForAddress()

char * Sys_GetNameForAddress ( dllhandle_t *  module,
void address 
)

◆ Sys_Init()

void Sys_Init ( void  )

◆ Sys_InitTerminal()

qboolean Sys_InitTerminal ( void  )

◆ Sys_LoadLibrary()

dllhandle_t * Sys_LoadLibrary ( const char *  name,
dllfunction_t funcs 
)

◆ Sys_MakeCodeWriteable()

void Sys_MakeCodeWriteable ( void startaddr,
unsigned long  length 
)

◆ Sys_Milliseconds()

unsigned int Sys_Milliseconds ( void  )

◆ Sys_mkdir()

void Sys_mkdir ( const char *  path)

◆ Sys_Printf()

void VARGS Sys_Printf ( char *  fmt,
  ... 
)

◆ Sys_Quit()

void Sys_Quit ( void  )

◆ Sys_RandomBytes()

qboolean Sys_RandomBytes ( qbyte string,
int  len 
)

◆ Sys_RecentServer()

void Sys_RecentServer ( char *  command,
char *  target,
char *  title,
char *  desc 
)

◆ Sys_Register_File_Associations_f()

void Sys_Register_File_Associations_f ( void  )

◆ Sys_remove()

qboolean Sys_remove ( const char *  path)

◆ Sys_Rename()

qboolean Sys_Rename ( const char *  oldfname,
const char *  newfname 
)

◆ Sys_ResolveFileURL()

qboolean Sys_ResolveFileURL ( const char *  inurl,
int  inlen,
char *  out,
int  outlen 
)

◆ Sys_rmdir()

qboolean Sys_rmdir ( const char *  path)

◆ Sys_RunInstaller()

qboolean Sys_RunInstaller ( void  )

◆ Sys_SaveClipboard() [1/2]

void Sys_SaveClipboard ( clipboardtype_t  cbt,
char *  text 
)

◆ Sys_SaveClipboard() [2/2]

void Sys_SaveClipboard ( clipboardtype_t  cbt,
const char *  text 
)

◆ Sys_SendKeyEvents()

void Sys_SendKeyEvents ( void  )

◆ Sys_ServerActivity()

void Sys_ServerActivity ( void  )

◆ Sys_SetUpdatedBinary()

qboolean Sys_SetUpdatedBinary ( const char *  newbinary)

◆ Sys_Shutdown()

void Sys_Shutdown ( void  )

◆ Sys_Sleep()

void Sys_Sleep ( double  seconds)

◆ Sys_Startup_CheckMem()

qboolean Sys_Startup_CheckMem ( quakeparms_t parms)

◆ Sys_URIScheme_NeedsRegistering()

char * Sys_URIScheme_NeedsRegistering ( void  )

◆ watchdogthreadfunction()

int watchdogthreadfunction ( void arg)

◆ Win7_Init()

void Win7_Init ( void  )

◆ Win7_TaskListInit()

void Win7_TaskListInit ( void  )

◆ WIN_CreateCursor()

void * WIN_CreateCursor ( const qbyte imagedata,
int  width,
int  height,
uploadfmt_t  format,
float  hotx,
float  hoty,
float  scale 
)

◆ WIN_DestroyCursor()

void WIN_DestroyCursor ( void cursor)

◆ WIN_SetCursor()

qboolean WIN_SetCursor ( void cursor)

◆ WIN_WindowCreated()

void WIN_WindowCreated ( HWND  window)

Variable Documentation

◆ bpp

int bpp

◆ csidl

LPWSTR int csidl

◆ debugout

qboolean debugout

◆ dwThreadId

HOOKPROC HINSTANCE DWORD dwThreadId

◆ fCreate

LPWSTR int BOOL fCreate

◆ gammapending

float gammapending

◆ global_hInstance

HINSTANCE global_hInstance

◆ global_nCmdShow

int global_nCmdShow

◆ hArrowCursor

HCURSOR hArrowCursor

◆ hCustomCursor

HCURSOR hCustomCursor

◆ height

int height

◆ hmod

HOOKPROC HINSTANCE hmod

◆ hwnd_dialog

HWND hwnd_dialog

◆ isDedicated

qboolean isDedicated = false

◆ isPlugin

int isPlugin
extern

◆ llkeyboardhook

HHOOK llkeyboardhook

◆ lParam

int WPARAM LPARAM lParam

◆ lpData

PNOTIFYICONDATAW lpData

◆ lpfn

HOOKPROC lpfn

◆ Minimized

qboolean Minimized

◆ nCode

int nCode

◆ poainfo

const qOPENASINFO* poainfo

◆ pszPath

LPWSTR pszPath

◆ qCLSID_ApplicationAssociationRegistrationUI

const GUID qCLSID_ApplicationAssociationRegistrationUI = {0x1968106d,0xf3b5,0x44cf,{0x89,0x0e,0x11,0x6f,0xcb,0x9e,0xce,0xf1}}

◆ qIID_IApplicationAssociationRegistrationUI

const GUID qIID_IApplicationAssociationRegistrationUI = {0x1f76a169,0xf994,0x40ac, {0x8f,0xc8,0x09,0x59,0xe8,0x87,0x47,0x10}}

◆ qwclsemaphore

HANDLE qwclsemaphore

◆ qwinvermaj

int qwinvermaj

◆ qwinvermin

int qwinvermin

◆ rate

int rate

◆ restart_jmpbuf

jmp_buf restart_jmpbuf

◆ starttime

int starttime

◆ sys_argv

char* sys_argv[MAX_NUM_ARGVS]

◆ sys_disableTaskSwitch

cvar_t sys_disableTaskSwitch = CVARF("sys_disableTaskSwitch", "0", CVAR_NOTFROMSERVER)

◆ sys_disableWinKeys

cvar_t sys_disableWinKeys = CVAR("sys_disableWinKeys", "0")

◆ sys_language

char sys_language[64]
extern

◆ sys_parentheight

unsigned int sys_parentheight

◆ sys_parentleft

unsigned int sys_parentleft

◆ sys_parenttop

unsigned int sys_parenttop

◆ sys_parentwidth

unsigned int sys_parentwidth

◆ sys_parentwindow

HWND sys_parentwindow

◆ watchdogframe

volatile int watchdogframe

◆ watchdogthread

void * watchdogthread

◆ width

int width

◆ WinNT

qboolean WinNT

◆ wParam

int WPARAM wParam