mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 15:51:36 +00:00
ad83422c56
Until now, the new qwaq startup was used only in command-line tools and console applications where things like Ruamoko security and having a hunk were not an issue. Now the start up code (qwaq-*.c) can specify that Ruamoko is to be secured and provide a hunk on a per-thread basis, and the thread data is passed into the progs code via a progs resource.
37 lines
928 B
C
37 lines
928 B
C
#ifndef __qwaq_h
|
|
#define __qwaq_h
|
|
|
|
#include <pthread.h>
|
|
|
|
#include "QF/darray.h"
|
|
#include "QF/progs.h"
|
|
#include "QF/sys.h"
|
|
|
|
typedef void (*progsinit_f) (progs_t *pr);
|
|
|
|
typedef struct qwaq_thread_s {
|
|
pthread_t thread_id;
|
|
int return_code;
|
|
struct DARRAY_TYPE (const char *) args;
|
|
sys_printf_t sys_printf;
|
|
progsinit_f*progsinit;
|
|
progs_t *pr;
|
|
int rua_security;
|
|
struct memhunk_s *hunk;
|
|
struct hashlink_s *hashlink_freelist;
|
|
func_t main_func;
|
|
void *data;
|
|
} qwaq_thread_t;
|
|
|
|
typedef struct qwaq_thread_set_s DARRAY_TYPE(qwaq_thread_t *) qwaq_thread_set_t;
|
|
|
|
void BI_Graphics_Init (progs_t *pr);
|
|
void BI_Curses_Init (progs_t *pr);
|
|
void BI_TermInput_Init (progs_t *pr);
|
|
void QWAQ_EditBuffer_Init (progs_t *pr);
|
|
extern struct cbuf_s *qwaq_cbuf;
|
|
qwaq_thread_t *create_thread (void *(*thread_func) (qwaq_thread_t *), void *);
|
|
|
|
int qwaq_init_threads (qwaq_thread_set_t *thread_data);
|
|
|
|
#endif//__qwaq_h
|