FTEQW
Documentation of the FTE engine source tree.
sys_plugfte.h
Go to the documentation of this file.
1#ifndef __QUAKEDEF_H__
2typedef enum qboolean;
3typedef void *vfsfile_t;
4#endif
5
6struct pipetype;
8{
9 qboolean (*RequestDownload)(void *ctx, struct pipetype *ftype, char *url);
10 void (*StatusChanged)(void *ctx); /*tells it that it needs to redraw the pre-active image*/
11};
12
13/*the conext structure contains this at the start (you can safely cast context->contextpublic)*/
15{
16 qboolean running; /*set if the plugin context is actually active*/
18 unsigned int dlsize;
19 unsigned int dldone;
20 float availver; /*this is the version of the plugin that is available, if current is better, use 0*/
21 char statusmessage[256];
22
23#if defined(_WIN32) && defined(__QUAKEDEF_H__)
24 /*the npapi stuff is lazy and uses this*/
25 void *oldwnd; /*not used in the plugin itself*/
26 void *oldproc; /*not used in the plugin itself*/
27#endif
28 void *user;
29};
30
31/*
32#include <windows.h>
33static void VS_DebugLocation(char *fname, int line, char *fmt, ...)
34{
35 char buffer[640];
36 va_list va;
37
38 sprintf(buffer, "%s(%i) : ", fname, line);
39 OutputDebugStringA(buffer);
40
41 va_start(va, fmt);
42 vsprintf(buffer, fmt, va);
43 va_end(va);
44 OutputDebugStringA(buffer);
45 OutputDebugStringA("\n");
46}
47*/
48
49
50
51
52
53
54
55
56struct context;
57struct pscript_property;
58
59struct context *Plug_CreateContext(void *sysctx, const struct browserfuncs *funcs);
60void Plug_DestroyContext(struct context *ctx);
61void Plug_LockPlugin(struct context *ctx, qboolean lockstate);
62qboolean Plug_StartContext(struct context *ctx);
63void Plug_StopContext(struct context *ctx, qboolean wait);
64qboolean Plug_ChangeWindow(struct context *ctx, void *whnd, int left, int top, int width, int height);
65
66int Plug_FindProp(struct context *ctx, const char *field);
67qboolean Plug_SetString(struct context *ctx, int field, const char *value);
68qboolean Plug_GetString(struct context *ctx, int field, const char **value);
69void Plug_GotString(const char *value);
70qboolean Plug_SetInteger(struct context *ctx, int field, int value);
71qboolean Plug_GetInteger(struct context *ctx, int field, int *value);
72qboolean Plug_SetFloat(struct context *ctx, int field, float value);
73qboolean Plug_GetFloat(struct context *ctx, int field, float *value);
74
75#ifdef _WIN32
76void *Plug_GetSplashBack(struct context *ctx, void *hdc, int *width, int *height);/*returns an HBITMAP*/
77void Plug_ReleaseSplashBack(struct context *ctx, void *bmp);
78#endif
79
81{
82 struct context *(*CreateContext)(void *sysctx, const struct browserfuncs *funcs);
83 void (*DestroyContext)(struct context *ctx);
84 void (*LockPlugin)(struct context *ctx, qboolean lockstate);
85 qboolean (*StartContext)(struct context *ctx);
86 void (*StopContext)(struct context *ctx, qboolean wait);
87 qboolean (*ChangeWindow)(struct context *ctx, void *whnd, int left, int top, int width, int height);
88
89 int (*FindProp)(struct context *ctx, const char *field);
90 qboolean (*SetString)(struct context *ctx, int field, const char *value);
91 qboolean (*GetString)(struct context *ctx, int field, const char **value);
92 void (*GotString)(const char *value);
93 qboolean (*SetInteger)(struct context *ctx, int field, int value);
94 qboolean (*GetInteger)(struct context *ctx, int field, int *value);
95 qboolean (*SetFloat)(struct context *ctx, int field, float value);
96 qboolean (*GetFloat)(struct context *ctx, int field, float *value);
97
98#ifdef _WIN32
99 void *(*GetSplashBack)(struct context *ctx, void *hdc, int *width, int *height);/*returns an HBITMAP*/
100 void (*ReleaseSplashBack)(struct context *ctx, void *bmp);
101#endif
102
103 qboolean (*SetWString)(struct context *ctx, int field, const wchar_t *value);
104};
105
106#define PLUG_APIVER 1
107#ifdef __cplusplus
108extern "C"
109#endif
110const struct plugfuncs *Plug_GetFuncs(int ver);
qboolean
Definition: api_menu.h:34
unsigned int width
Definition: bymorphed.h:4
unsigned int height
Definition: bymorphed.h:5
void(QDECL *vgui_frame)(void)
GLdouble GLdouble GLdouble top
Definition: gl_vidcommon.c:166
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
GLsizei GLboolean const GLfloat * value
Definition: glquake.h:164
plugimageloaderfuncs_t * funcs
Definition: image.c:237
Definition: sys_plugfte.h:8
void(* StatusChanged)(void *ctx)
Definition: sys_plugfte.h:10
qboolean(* RequestDownload)(void *ctx, struct pipetype *ftype, char *url)
Definition: sys_plugfte.h:9
Definition: sys_plugfte.h:15
char statusmessage[256]
Definition: sys_plugfte.h:21
float availver
Definition: sys_plugfte.h:20
qboolean running
Definition: sys_plugfte.h:16
void * user
Definition: sys_plugfte.h:28
qboolean downloading
Definition: sys_plugfte.h:17
unsigned int dldone
Definition: sys_plugfte.h:19
void * oldproc
Definition: sys_plugfte.h:26
void * oldwnd
Definition: sys_plugfte.h:25
unsigned int dlsize
Definition: sys_plugfte.h:18
Definition: sys_plugfte.h:81
qboolean(* SetWString)(struct context *ctx, int field, const wchar_t *value)
Definition: sys_plugfte.h:103
qboolean(* GetFloat)(struct context *ctx, int field, float *value)
Definition: sys_plugfte.h:96
qboolean(* SetFloat)(struct context *ctx, int field, float value)
Definition: sys_plugfte.h:95
void(* ReleaseSplashBack)(struct context *ctx, void *bmp)
Definition: sys_plugfte.h:100
void(* LockPlugin)(struct context *ctx, qboolean lockstate)
Definition: sys_plugfte.h:84
qboolean(* GetInteger)(struct context *ctx, int field, int *value)
Definition: sys_plugfte.h:94
void(* GotString)(const char *value)
Definition: sys_plugfte.h:92
int(* FindProp)(struct context *ctx, const char *field)
Definition: sys_plugfte.h:89
qboolean(* StartContext)(struct context *ctx)
Definition: sys_plugfte.h:85
qboolean(* GetString)(struct context *ctx, int field, const char **value)
Definition: sys_plugfte.h:91
void(* DestroyContext)(struct context *ctx)
Definition: sys_plugfte.h:83
qboolean(* SetInteger)(struct context *ctx, int field, int value)
Definition: sys_plugfte.h:93
void(* StopContext)(struct context *ctx, qboolean wait)
Definition: sys_plugfte.h:86
qboolean(* ChangeWindow)(struct context *ctx, void *whnd, int left, int top, int width, int height)
Definition: sys_plugfte.h:87
qboolean(* SetString)(struct context *ctx, int field, const char *value)
Definition: sys_plugfte.h:90
qboolean Plug_GetString(struct context *ctx, int field, const char **value)
Definition: sys_plugfte.c:2186
void Plug_GotString(const char *value)
Definition: sys_plugfte.c:2199
int Plug_FindProp(struct context *ctx, const char *field)
Definition: sys_plugfte.c:2074
void * vfsfile_t
Definition: sys_plugfte.h:2
qboolean Plug_ChangeWindow(struct context *ctx, void *whnd, int left, int top, int width, int height)
Definition: sys_plugfte.c:1626
qboolean Plug_StartContext(struct context *ctx)
Definition: sys_plugfte.c:1532
qboolean Plug_GetInteger(struct context *ctx, int field, int *value)
Definition: sys_plugfte.c:2203
qboolean Plug_SetFloat(struct context *ctx, int field, float value)
Definition: sys_plugfte.c:2158
void Plug_DestroyContext(struct context *ctx)
Definition: sys_plugfte.c:1656
void Plug_LockPlugin(struct context *ctx, qboolean lockstate)
Definition: sys_plugfte.c:1266
qboolean Plug_SetString(struct context *ctx, int field, const char *value)
Definition: sys_plugfte.c:2092
void Plug_StopContext(struct context *ctx, qboolean wait)
Definition: sys_plugfte.c:1564
struct context * Plug_CreateContext(void *sysctx, const struct browserfuncs *funcs)
Definition: sys_plugfte.c:1598
void Plug_ReleaseSplashBack(struct context *ctx, void *bmp)
Definition: sys_plugfte.c:2257
const struct plugfuncs * Plug_GetFuncs(int ver)
Definition: sys_plugfte.c:2289
qboolean Plug_GetFloat(struct context *ctx, int field, float *value)
Definition: sys_plugfte.c:2216
qboolean Plug_SetInteger(struct context *ctx, int field, int value)
Definition: sys_plugfte.c:2131
void * Plug_GetSplashBack(struct context *ctx, void *hdc, int *width, int *height)
Definition: sys_plugfte.c:2231