vkQuake2 doxygen  1.0 dev
winquake.h File Reference
#include <windows.h>
#include <dsound.h>

Go to the source code of this file.

Macros

#define WINDOW_STYLE   (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE)
 

Functions

void IN_Activate (qboolean active)
 
void IN_MouseEvent (int mstate)
 

Variables

HINSTANCE global_hInstance
 
LPDIRECTSOUND pDS
 
LPDIRECTSOUNDBUFFER pDSBuf
 
DWORD gSndBufSize
 
HWND cl_hwnd
 
qboolean ActiveApp
 
qboolean Minimized
 
int window_center_x
 
int window_center_y
 
RECT window_rect
 

Macro Definition Documentation

◆ WINDOW_STYLE

#define WINDOW_STYLE   (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE)

Definition at line 28 of file winquake.h.

Function Documentation

◆ IN_Activate()

void IN_Activate ( qboolean  active)

Definition at line 399 of file in_win.c.

400 {
401  in_appactive = active;
402  mouseactive = !active; // force a new window check or turn off
403 }

◆ IN_MouseEvent()

void IN_MouseEvent ( int  mstate)

Definition at line 233 of file in_win.c.

234 {
235  int i;
236 
237  if (!mouseinitialized)
238  return;
239 
240 // perform button actions
241  for (i=0 ; i<mouse_buttons ; i++)
242  {
243  if ( (mstate & (1<<i)) &&
244  !(mouse_oldbuttonstate & (1<<i)) )
245  {
246  Key_Event (K_MOUSE1 + i, true, sys_msg_time);
247  }
248 
249  if ( !(mstate & (1<<i)) &&
250  (mouse_oldbuttonstate & (1<<i)) )
251  {
252  Key_Event (K_MOUSE1 + i, false, sys_msg_time);
253  }
254  }
255 
256  mouse_oldbuttonstate = mstate;
257 }

Referenced by MainWndProc().

Variable Documentation

◆ ActiveApp

qboolean ActiveApp

Definition at line 43 of file sys_win.c.

Referenced by AppActivate(), IN_Move(), MainWndProc(), and WinMain().

◆ cl_hwnd

HWND cl_hwnd

Definition at line 58 of file vid_dll.c.

Referenced by MainWndProc(), VID_Front_f(), and VID_UpdateWindowPosAndSize().

◆ global_hInstance

HINSTANCE global_hInstance

Definition at line 633 of file sys_win.c.

Referenced by VID_LoadRefresh(), and WinMain().

◆ gSndBufSize

DWORD gSndBufSize

Definition at line 66 of file snd_win.c.

Referenced by DS_CreateBuffers(), SNDDMA_BeginPainting(), and SNDDMA_InitWav().

◆ Minimized

qboolean Minimized

Definition at line 38 of file winquake.h.

◆ pDS

LPDIRECTSOUND pDS

◆ pDSBuf

LPDIRECTSOUNDBUFFER pDSBuf

◆ window_center_x

int window_center_x

Definition at line 133 of file in_win.c.

Referenced by IN_ActivateMouse(), and IN_MouseMove().

◆ window_center_y

int window_center_y

Definition at line 43 of file winquake.h.

◆ window_rect

RECT window_rect

Definition at line 134 of file in_win.c.

Referenced by IN_ActivateMouse().

Key_Event
void Key_Event(int key, qboolean down, unsigned time)
Definition: keys.c:744
K_MOUSE1
#define K_MOUSE1
Definition: keys.h:82
i
int i
Definition: q_shared.c:305
mouse_buttons
int mouse_buttons
Definition: in_win.c:119
mouseactive
qboolean mouseactive
Definition: in_win.c:126
mouse_oldbuttonstate
int mouse_oldbuttonstate
Definition: in_win.c:120
in_appactive
qboolean in_appactive
Definition: in_win.c:92
sys_msg_time
unsigned sys_msg_time
Definition: sys_win.c:48
mouseinitialized
qboolean mouseinitialized
Definition: in_win.c:129