icculus quake2 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 406 of file in_win.c.

407 {
408  in_appactive = active;
409  mouseactive = !active; // force a new window check or turn off
410 }

◆ IN_MouseEvent()

void IN_MouseEvent ( int  mstate)

Definition at line 240 of file in_win.c.

241 {
242  int i;
243 
244  if (!mouseinitialized)
245  return;
246 
247 // perform button actions
248  for (i=0 ; i<mouse_buttons ; i++)
249  {
250  if ( (mstate & (1<<i)) &&
251  !(mouse_oldbuttonstate & (1<<i)) )
252  {
253  Key_Event (K_MOUSE1 + i, true, sys_msg_time);
254  }
255 
256  if ( !(mstate & (1<<i)) &&
257  (mouse_oldbuttonstate & (1<<i)) )
258  {
259  Key_Event (K_MOUSE1 + i, false, sys_msg_time);
260  }
261  }
262 
263  mouse_oldbuttonstate = mstate;
264 }

Referenced by MainWndProc().

Variable Documentation

◆ ActiveApp

qboolean ActiveApp

Definition at line 42 of file sys_win.c.

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

◆ cl_hwnd

HWND cl_hwnd

Definition at line 53 of file vid_dll.c.

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

◆ global_hInstance

HINSTANCE global_hInstance

Definition at line 594 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 132 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 133 of file in_win.c.

Referenced by IN_ActivateMouse().

Key_Event
void Key_Event(int key, qboolean down, unsigned time)
Definition: keys.c:745
i
int i
Definition: q_shared.c:305
mouse_buttons
int mouse_buttons
Definition: in_win.c:118
mouseactive
qboolean mouseactive
Definition: in_win.c:125
mouse_oldbuttonstate
int mouse_oldbuttonstate
Definition: in_win.c:119
in_appactive
qboolean in_appactive
Definition: in_win.c:91
sys_msg_time
unsigned sys_msg_time
Definition: sys_win.c:47
mouseinitialized
qboolean mouseinitialized
Definition: in_win.c:128
K_MOUSE1
@ K_MOUSE1
Definition: keys.h:79