head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.28; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.28; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.15; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.49; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @ File Index
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

dmxconsole.c File Reference

#include "dmxinputinit.h"
#include "dmxevents.h"
#include "dmxconsole.h"
#include "dmxcommon.h"
#include "dmxscrinit.h"
#include "dmxcb.h"
#include "dmxsync.h"
#include "inputstr.h"
#include "input.h"
#include "mipointer.h"
#include "windowstr.h"

Data Structures

struct  _myPrivate

Functions

pointer dmxConsoleCreatePrivate (DeviceIntPtr pDevice)
void dmxConsoleDestroyPrivate (pointer private)
void dmxConsoleUpdateInfo (pointer private, DMXUpdateType type, WindowPtr pWindow)
void dmxConsoleUpdatePosition (pointer private, int x, int y)
void dmxConsoleCollectEvents (DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
void dmxConsoleReInit (DevicePtr pDev)
void dmxConsoleInit (DevicePtr pDev)
void dmxConsoleMouGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
void dmxConsoleKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
int dmxConsoleFunctions (pointer private, DMXFunctionType function)
void dmxConsoleCapture (DMXInputInfo *dmxInput)
void dmxConsoleUncapture (DMXInputInfo *dmxInput)

Detailed Description

This file implements the console input devices.

Function Documentation

void dmxConsoleCapture DMXInputInfo dmxInput  ) 
 

This routine is used to warp the pointer into the console window from anywhere on the screen. It is used when backend and console input are both being taken from the same X display.

void dmxConsoleCollectEvents DevicePtr  pDev,
dmxMotionProcPtr  motion,
dmxEnqueueProcPtr  enqueue,
dmxCheckSpecialProcPtr  checkspecial,
DMXBlockType  block
 

Collect all pending events from the console's display. Plase these events on the server event queue using the motion and enqueue routines. The checkspecial routine is used to check for special keys that need handling. block tells if signals should be blocked when updating the event queue.

pointer dmxConsoleCreatePrivate DeviceIntPtr  pDevice  ) 
 

Create the private area for pDevice.

void dmxConsoleDestroyPrivate pointer  private  ) 
 

If private is non-NULL, free its associated memory.

int dmxConsoleFunctions pointer  private,
DMXFunctionType  function
 

Handle special console-only keys.

void dmxConsoleInit DevicePtr  pDev  ) 
 

Initialized the console device described by pDev.

void dmxConsoleKbdGetInfo DevicePtr  pDev,
DMXLocalInitInfoPtr  info
 

Fill in the info structure for the specified pDev. Only used for keyboard.

void dmxConsoleMouGetInfo DevicePtr  pDev,
DMXLocalInitInfoPtr  info
 

Fill in the info structure for the specified pDev. Only used for pointers.

void dmxConsoleReInit DevicePtr  pDev  ) 
 

Re-initialized the console device described by pDev (after a reconfig).

void dmxConsoleUncapture DMXInputInfo dmxInput  ) 
 

Undo the capture that was done by dmxConsoleCapture.

void dmxConsoleUpdateInfo pointer  private,
DMXUpdateType  type,
WindowPtr  pWindow
 

Whenever the window layout (size, position, stacking order) might be changed, this routine is called with the pWindow that changed and the type of change. This routine is called in a conservative fashion: the actual layout of the windows of the screen might not have had any human-visible changes.

void dmxConsoleUpdatePosition pointer  private,
int  x,
int  y
 

This routine gets called from #dmxCoreMotion for each motion. This allows the console's notion of the cursor postion to change when another input device actually caused the change.


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @initial import of xorg-server-1.4.2 @ text @@ 1.1.1.2 log @import xorg-server 1.9.2. important changes since 1.6.5 include: - built-in symbol visibility, default not export - fixes for various crashes - many fixes for XI2, EXA, dix, render, glx, xkb, EDID, randr, Xv, resource handling, Xext, vfb, xfree86 / vga and composite support. - fixes several memory leaks - many many documentation updates - record extension enabled - no longer looks for XF86Config files @ text @d9 17 a25 111

dmxconsole.c File Reference

#include "dmxinputinit.h"
#include "dmxevents.h"
#include "dmxconsole.h"
#include "dmxcommon.h"
#include "dmxscrinit.h"
#include "dmxcb.h"
#include "dmxsync.h"
#include "inputstr.h"
#include "input.h"
#include "mipointer.h"
#include "windowstr.h"

Data Structures

struct  _myPrivate

Defines

#define DMX_CONSOLE_DEBUG   0
#define DMX_WINDOW_DEBUG   0
#define CONSOLE_NUM   3
#define CONSOLE_DEN   4
#define DMX_CONSOLE_NAME   "DMX Console"
#define DMX_RES_NAME   "Xdmx"
#define DMX_RES_CLASS   "XDmx"
#define CONSOLE_BG_COLOR   "gray75"
#define CONSOLE_FG_COLOR   "black"
#define CONSOLE_SCREEN_BG_COLOR   "white"
#define CONSOLE_SCREEN_FG_COLOR   "black"
#define CONSOLE_SCREEN_DET_COLOR   "gray75"
#define CONSOLE_SCREEN_CUR_COLOR   "red"
#define DMXDBG0(f)
#define DMXDBG1(f, a)
#define DMXDBG2(f, a, b)
#define DMXDBG3(f, a, b, c)
#define DMXDBG4(f, a, b, c, d)
#define DMXDBG5(f, a, b, c, d, e)
#define DMXDBG6(f, a, b, c, d, e, g)
#define DMXDBG7(f, a, b, c, d, e, g, h)

Typedefs

typedef struct _myPrivate myPrivate

Functions

static int scalex (myPrivate *priv, int x)
static int scaley (myPrivate *priv, int y)
static int unscalex (myPrivate *priv, int x)
static int unscaley (myPrivate *priv, int y)
pointer dmxConsoleCreatePrivate (DeviceIntPtr pDevice)
void dmxConsoleDestroyPrivate (pointer private)
static void dmxConsoleDrawFineCursor (myPrivate *priv, XRectangle *rect)
static void dmxConsoleDrawWindows (pointer private)
static void dmxConsoleDraw (myPrivate *priv, int updateCursor, int update)
static void dmxConsoleClearCursor (myPrivate *priv, int x, int y, XRectangle *rect)
static void dmxConsoleUpdateFineCursor (myPrivate *priv)
void dmxConsoleUpdateInfo (pointer private, DMXUpdateType type, WindowPtr pWindow)
static void dmxConsoleMoveAbsolute (myPrivate *priv, int x, int y, DevicePtr pDev, dmxMotionProcPtr motion, DMXBlockType block)
static void dmxConsoleMoveRelative (myPrivate *priv, int x, int y, DevicePtr pDev, dmxMotionProcPtr motion, DMXBlockType block)
void dmxConsoleUpdatePosition (pointer private, int x, int y)
void dmxConsoleCollectEvents (DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
static void dmxCloseConsole (myPrivate *priv)
static Bool dmxCloseConsoleScreen (int idx, ScreenPtr pScreen)
static Cursor dmxConsoleCreateEmptyCursor (myPrivate *priv)
static void dmxConsoleComputeWidthHeight (myPrivate *priv, int *width, int *height, double *xScale, double *yScale, int *consWidth, int *consHeight)
void dmxConsoleReInit (DevicePtr pDev)
void dmxConsoleInit (DevicePtr pDev)
void dmxConsoleMouGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
void dmxConsoleKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
int dmxConsoleFunctions (pointer private, DMXFunctionType function)
static void dmxDump (void)
void dmxConsoleCapture (DMXInputInfo *dmxInput)
void dmxConsoleUncapture (DMXInputInfo *dmxInput)

Detailed Description

This file implements the console input devices.


Define Documentation

#define CONSOLE_BG_COLOR   "gray75"
d27 2 a28 1

Referenced by dmxConsoleInit().

d30 1 a30 12
#define CONSOLE_DEN   4
d32 1 a32 12
#define CONSOLE_FG_COLOR   "black"
d34 1 a34 12
#define CONSOLE_NUM   3
d36 1 a36 1

Referenced by dmxConsoleComputeWidthHeight().

d38 1 a38 12
#define CONSOLE_SCREEN_BG_COLOR   "white"
d40 1 a40 1

Referenced by dmxConsoleInit().

d42 1 a42 12
#define CONSOLE_SCREEN_CUR_COLOR   "red"
d44 1 a44 1

Referenced by dmxConsoleInit().

d46 1 a46 12
#define CONSOLE_SCREEN_DET_COLOR   "gray75"
d48 1 a48 1

Referenced by dmxConsoleInit().

d50 1 a50 12
#define CONSOLE_SCREEN_FG_COLOR   "black"
d52 15 a66 10

Referenced by dmxConsoleInit().

a67 3
#define DMX_CONSOLE_DEBUG   0
a68 9
d70 19 a88 37

Referenced by dmxConsoleInit().

#define DMX_CONSOLE_NAME   "DMX Console"
#define DMX_RES_CLASS   "XDmx"
#define DMX_RES_NAME   "Xdmx"
d90 4 a93 37
#define DMX_WINDOW_DEBUG   0
#define DMXDBG0 (   f  ) 
a95 1 a96 4 d98 2 a99 18
#define DMXDBG1 (   f,   a 
)
a101 1 a102 5 d104 2 a105 2 a108 23
#define DMXDBG2 (   f,   a,
  b )
d110 2 a111 2 a113 1 a114 5 d116 2 a117 2 d121 2 a122 2 a123 3
#define DMXDBG3 (   f,
  a,   b,
  c )
a124 43

Referenced by dmxConsoleCapture().

d126 26 a151 22
#define DMXDBG4 (   f,
  a,
  b,
  c,
  d 
)
a152 34
#define DMXDBG5 (   f,
  a,
  b,
  c,
  d,
  e 
)

Referenced by dmxConsoleCollectEvents().

a153 53
d155 26 a180 28
#define DMXDBG6 (   f,
  a,
  b,
  c,
  d,
  e,
  g 
)
a181 38
#define DMXDBG7 (   f,
  a,
  b,
  c,
  d,
  e,
  g,
  h 
)
a182 10

Typedef Documentation

d184 19 a202 32

Function Documentation

typedef struct _myPrivate myPrivate
static void dmxCloseConsole ( myPrivate priv  )  [static]
d204 4 a207 4 a209 1 d211 3 a213 2 d217 2 a218 2 a219 7
static Bool dmxCloseConsoleScreen ( int  idx, ScreenPtr  pScreen ) [static]
d222 26 a247 42

This routine is used to warp the pointer into the console window from anywhere on the screen. It is used when backend and console input are both being taken from the same X display.

References _myPrivate::captured, _myPrivate::curX, _myPrivate::curY, _DMXInputInfo::devs, DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_CONSOLE, dmxConsoleUpdateFineCursor(), DMXDBG0, DMXDBG3, dmxDump(), dmxSync(), _DMXLocalInputInfo::extType, _myPrivate::fine, _DMXInputInfo::name, _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, and _DMXLocalInputInfo::type.

Referenced by dmxBackendUpdatePosition().

void dmxConsoleCapture ( DMXInputInfo dmxInput  ) 
a248 7
static void dmxConsoleClearCursor ( myPrivate priv,
int  x,
int  y,
XRectangle *  rect 
) [static]
d251 19 a269 12

Collect all pending events from the console's display. Plase these events on the server event queue using the motion and enqueue routines. The checkspecial routine is used to check for special keys that need handling. block tells if signals should be blocked when updating the event queue.

References dmxCommonRestoreState(), dmxCommonSaveState(), dmxConsoleDraw(), dmxConsoleMoveAbsolute(), dmxConsoleMoveRelative(), dmxConsoleUncapture(), DMXDBG2, DMXDBG4, DMXDBG5, DMXDBG6, _myPrivate::dmxInput, _myPrivate::height, and _myPrivate::width.

void dmxConsoleCollectEvents ( DevicePtr  pDev,
dmxMotionProcPtr  motion,
dmxEnqueueProcPtr  enqueue,
dmxCheckSpecialProcPtr  checkspecial,
DMXBlockType  block 
)
d271 4 a274 4 a276 1 a277 5 d279 2 a280 2 a282 1 d284 2 a285 2 a286 26
static void dmxConsoleComputeWidthHeight ( myPrivate priv, int *  width,
int *  height, double *  xScale,
double *  yScale,
int *  consWidth,
int *  consHeight 
) [static]
d289 19 a307 51

References dmxFatal, dmxLog(), and _myPrivate::pixmap.

Referenced by dmxConsoleInit().

static Cursor dmxConsoleCreateEmptyCursor ( myPrivate priv  )  [static]
pointer dmxConsoleCreatePrivate ( DeviceIntPtr  pDevice  ) 

Create the private area for pDevice.

void dmxConsoleDestroyPrivate ( pointer  private  ) 

If private is non-NULL, free its associated memory.

d327 26 a352 20
static void dmxConsoleDrawFineCursor ( myPrivate priv,
XRectangle *  rect 
) [static]
a353 5
static void dmxConsoleDrawWindows ( pointer  private  )  [static]

References dmxDebug, dmxLog(), dmxNumScreens, scalex(), and scaley().

a354 25

Referenced by dmxConsoleDraw().

a410 7 a411 11 d413 2 a414 2 a416 1 a417 5 d419 2 a420 2 d424 2 a425 2 a426 5
static void dmxConsoleMoveAbsolute ( myPrivate priv,
int  x,
int  y,
DevicePtr  pDev, dmxMotionProcPtr  motion,
DMXBlockType  block ) [static]
d429 19 a447 85
static void dmxConsoleMoveRelative ( myPrivate priv,
int  x,
int  y,
DevicePtr  pDev,
dmxMotionProcPtr  motion,
DMXBlockType  block 
) [static]
void dmxConsoleReInit ( DevicePtr  pDev  ) 

Re-initialized the console device described by pDev (after a reconfig).

References dmxConsoleComputeWidthHeight(), and dmxConsoleDraw().

d449 4 a452 4 a454 1 a455 4 d457 2 a458 2 a459 13
void dmxConsoleUpdateInfo ( pointer  private,
DMXUpdateType  type, WindowPtr  pWindow 
)

Whenever the window layout (size, position, stacking order) might be changed, this routine is called with the pWindow that changed and the type of change. This routine is called in a conservative fashion: the actual layout of the windows of the screen might not have had any human-visible changes.

References dmxConsoleDraw().

a460 7 a461 5 d463 2 a464 2 d468 2 a469 23
void dmxConsoleUpdatePosition ( pointer  private,
int  x,
int  y )

This routine gets called from dmxCoreMotion for each motion. This allows the console's notion of the cursor postion to change when another input device actually caused the change.

References dmxConsoleDraw(), dmxConsoleUpdateFineCursor(), DMXDBG2, DMXDBG6, dmxGeneration, scalex(), and scaley().

static int unscalex ( myPrivate priv,
int  x 
) [static]

References _myPrivate::xScale.

Referenced by dmxConsoleMoveAbsolute().

static int unscaley ( myPrivate priv,
int  y 
) [static]

References _myPrivate::yScale.

Referenced by dmxConsoleMoveAbsolute().

@ 1.1.1.3 log @initial import of xorg-server 1.10.3. highlights include: - fixes xorg bugs 29969, 30367, 30527, 30267, 30260, 29046, 30260, 31548, 28672, 24887, 32115, 21457, 32436, 21827, 28414, 24703, 32803, 16318, 33449, 33324, 33929, 35082, 35209, 36146, 36119 - many additional NULL checks - adjustments related to input ABI 12 - *lots* of dead code removal - vga arbitrator fixes - GL fixes - EDID fixes - conversion to using asprintf() in many places - many fixes from valgrind, compiler warnings see these for more details: http://lists.freedesktop.org/archives/xorg-announce/2011-February/001612.html http://lists.freedesktop.org/archives/xorg-announce/2011-April/001646.html http://lists.freedesktop.org/archives/xorg-announce/2011-May/001675.html http://lists.freedesktop.org/archives/xorg-announce/2011-July/001710.html @ text @d9 3 a11 2