LMMS
Loading...
Searching...
No Matches
swell.cpp File Reference
#include "swell.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/fcntl.h>
#include <sys/resource.h>
#include "swell-internal.h"
#include <sys/wait.h>
#include <pthread.h>
#include "../wdlatomic.h"
#include "../mutex.h"
#include "../assocarray.h"
#include "../wdlcstring.h"

Classes

struct  GLOBAL_REC

Functions

void Sleep (int ms)
DWORD GetTickCount ()
static void intToFileTime (time_t t, FILETIME *out)
BOOL GetFileTime (int filedes, FILETIME *lpCreationTime, FILETIME *lpLastAccessTime, FILETIME *lpLastWriteTime)
BOOL SWELL_PtInRect (const RECT *r, POINT p)
int MulDiv (int a, int b, int c)
unsigned int _controlfp (unsigned int flag, unsigned int mask)
void swell_cleanupZombies ()
BOOL CloseHandle (HANDLE hand)
HANDLE CreateEventAsSocket (void *SA, BOOL manualReset, BOOL initialSig, const char *ignored)
DWORD WaitForAnySocketObject (int numObjs, HANDLE *objs, DWORD msTO)
DWORD WaitForSingleObject (HANDLE hand, DWORD msTO)
static void__threadproc (void *parm)
DWORD GetCurrentThreadId ()
HANDLE CreateEvent (void *SA, BOOL manualReset, BOOL initialSig, const char *ignored)
HANDLE CreateThread (void *TA, DWORD stackSize, DWORD(*ThreadProc)(LPVOID), LPVOID parm, DWORD cf, DWORD *tidOut)
BOOL SetThreadPriority (HANDLE hand, int prio)
BOOL SetEvent (HANDLE hand)
BOOL ResetEvent (HANDLE hand)
BOOL WinOffsetRect (LPRECT lprc, int dx, int dy)
BOOL WinSetRect (LPRECT lprc, int xLeft, int yTop, int xRight, int yBottom)
int WinIntersectRect (RECT *out, const RECT *in1, const RECT *in2)
void WinUnionRect (RECT *out, const RECT *in1, const RECT *in2)
voidGlobalLock (HANDLE h)
int GlobalSize (HANDLE h)
void GlobalUnlock (HANDLE h)
void GlobalFree (HANDLE h)
HANDLE GlobalAlloc (int flags, int sz)
char * lstrcpyn (char *dest, const char *src, int l)
static int libkeycomp (void **p1, void **p2)
static WDL_AssocArray< void *, SWELL_HINSTANCE * > s_loadedLibs (libkeycomp)
HINSTANCE LoadLibrary (const char *fn)
voidSWELLAPI_GetFunc (const char *name)
HINSTANCE LoadLibraryGlobals (const char *fn, bool symbolsAsGlobals)
voidGetProcAddress (HINSTANCE hInst, const char *procName)
BOOL FreeLibrary (HINSTANCE hInst)
voidSWELL_GetBundle (HINSTANCE hInst)
DWORD GetModuleFileName (HINSTANCE hInst, char *fn, DWORD nSize)
bool SWELL_GenerateGUID (void *g)
void GetTempPath (int bufsz, char *buf)
voidSWELL_ExtendedAPI (const char *key, void *v)

Variables

static WDL_PtrList< voids_zombie_handles
static WDL_Mutex s_libraryMutex
const char * g_swell_appname
char * g_swell_defini
const char * g_swell_fontpangram

Function Documentation

◆ __threadproc()

void * __threadproc ( void * parm)
static

◆ _controlfp()

unsigned int _controlfp ( unsigned int flag,
unsigned int mask )

◆ CloseHandle()

BOOL CloseHandle ( HANDLE hand)

◆ CreateEvent()

HANDLE CreateEvent ( void * SA,
BOOL manualReset,
BOOL initialSig,
const char * ignored )

◆ CreateEventAsSocket()

HANDLE CreateEventAsSocket ( void * SA,
BOOL manualReset,
BOOL initialSig,
const char * ignored )

◆ CreateThread()

HANDLE CreateThread ( void * TA,
DWORD stackSize,
DWORD(* ThreadProc )(LPVOID),
LPVOID parm,
DWORD cf,
DWORD * tidOut )

◆ FreeLibrary()

BOOL FreeLibrary ( HINSTANCE hInst)

◆ GetCurrentThreadId()

DWORD GetCurrentThreadId ( )

◆ GetFileTime()

BOOL GetFileTime ( int filedes,
FILETIME * lpCreationTime,
FILETIME * lpLastAccessTime,
FILETIME * lpLastWriteTime )

◆ GetModuleFileName()

DWORD GetModuleFileName ( HINSTANCE hInst,
char * fn,
DWORD nSize )

◆ GetProcAddress()

void * GetProcAddress ( HINSTANCE hInst,
const char * procName )

◆ GetTempPath()

void GetTempPath ( int bufsz,
char * buf )

◆ GetTickCount()

DWORD GetTickCount ( )

◆ GlobalAlloc()

HANDLE GlobalAlloc ( int flags,
int sz )

◆ GlobalFree()

void GlobalFree ( HANDLE h)

◆ GlobalLock()

void * GlobalLock ( HANDLE h)

◆ GlobalSize()

int GlobalSize ( HANDLE h)

◆ GlobalUnlock()

void GlobalUnlock ( HANDLE h)

◆ intToFileTime()

void intToFileTime ( time_t t,
FILETIME * out )
static

◆ libkeycomp()

int libkeycomp ( void ** p1,
void ** p2 )
static

◆ LoadLibrary()

HINSTANCE LoadLibrary ( const char * fn)

◆ LoadLibraryGlobals()

HINSTANCE LoadLibraryGlobals ( const char * fn,
bool symbolsAsGlobals )

◆ lstrcpyn()

char * lstrcpyn ( char * dest,
const char * src,
int l )

◆ MulDiv()

int MulDiv ( int a,
int b,
int c )

◆ ResetEvent()

BOOL ResetEvent ( HANDLE hand)

◆ s_loadedLibs()

WDL_AssocArray< void *, SWELL_HINSTANCE * > s_loadedLibs ( libkeycomp )
static

◆ SetEvent()

BOOL SetEvent ( HANDLE hand)

◆ SetThreadPriority()

BOOL SetThreadPriority ( HANDLE hand,
int prio )

◆ Sleep()

void Sleep ( int ms)

◆ swell_cleanupZombies()

void swell_cleanupZombies ( )

◆ SWELL_ExtendedAPI()

void * SWELL_ExtendedAPI ( const char * key,
void * v )

◆ SWELL_GenerateGUID()

bool SWELL_GenerateGUID ( void * g)

◆ SWELL_GetBundle()

void * SWELL_GetBundle ( HINSTANCE hInst)

◆ SWELL_PtInRect()

BOOL SWELL_PtInRect ( const RECT * r,
POINT p )

◆ SWELLAPI_GetFunc()

void * SWELLAPI_GetFunc ( const char * name)

◆ WaitForAnySocketObject()

DWORD WaitForAnySocketObject ( int numObjs,
HANDLE * objs,
DWORD msTO )

◆ WaitForSingleObject()

DWORD WaitForSingleObject ( HANDLE hand,
DWORD msTO )

◆ WinIntersectRect()

int WinIntersectRect ( RECT * out,
const RECT * in1,
const RECT * in2 )

◆ WinOffsetRect()

BOOL WinOffsetRect ( LPRECT lprc,
int dx,
int dy )

◆ WinSetRect()

BOOL WinSetRect ( LPRECT lprc,
int xLeft,
int yTop,
int xRight,
int yBottom )

◆ WinUnionRect()

void WinUnionRect ( RECT * out,
const RECT * in1,
const RECT * in2 )

Variable Documentation

◆ g_swell_appname

const char* g_swell_appname

◆ g_swell_defini

char* g_swell_defini

◆ g_swell_fontpangram

const char* g_swell_fontpangram

◆ s_libraryMutex

WDL_Mutex s_libraryMutex
static

◆ s_zombie_handles

WDL_PtrList<void> s_zombie_handles
static