From 1f876171067c04fc21fccd5a3051f982fd85c0f0 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 21 Oct 2009 19:07:36 +0000 Subject: Updated to xorg-server-1.7.99.1 --- xorg-server/hw/dmx/doc/html/dmxcommon_8c.html | 1284 ++++++++++++++----------- 1 file changed, 736 insertions(+), 548 deletions(-) (limited to 'xorg-server/hw/dmx/doc/html/dmxcommon_8c.html') diff --git a/xorg-server/hw/dmx/doc/html/dmxcommon_8c.html b/xorg-server/hw/dmx/doc/html/dmxcommon_8c.html index 3e0459c12..6782e36ff 100644 --- a/xorg-server/hw/dmx/doc/html/dmxcommon_8c.html +++ b/xorg-server/hw/dmx/doc/html/dmxcommon_8c.html @@ -6,687 +6,875 @@ - -
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals
-

dmxcommon.c File Reference

#include "dmxinputinit.h"
-#include "dmxcommon.h"
-#include "dmxconsole.h"
-#include "dmxprop.h"
-#include "dmxsync.h"
-#include "dmxmap.h"
-#include "inputstr.h"
-#include "input.h"
-#include "keysym.h"
-#include "mipointer.h"
-#include "scrnintstr.h"
-#include <unistd.h>
- - - - + + +
+

dmxcommon.c File Reference

#include "dmxinputinit.h"
+#include "dmxcommon.h"
+#include "dmxconsole.h"
+#include "dmxprop.h"
+#include "dmxsync.h"
+#include "dmxmap.h"
+#include "inputstr.h"
+#include "input.h"
+#include <X11/keysym.h>
+#include "mipointer.h"
+#include "scrnintstr.h"
+#include <unistd.h>
+

Data Structures

struct  _myPrivate
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  _myPrivate

Defines

#define DMX_STATE_DEBUG   0
#define DMXDBG0(f)
#define NAME(x)   priv->xkb->names->x ? XGetAtomName(priv->display,priv->xkb->names->x) : NULL
#define ADD(type)

Typedefs

typedef struct _myPrivate myPrivate

Functions

static void dmxCommonKbdSetAR (Display *display, unsigned char *old, unsigned char *new)
static void dmxCommonKbdSetLeds (Display *display, unsigned long new)
static void dmxCommonKbdSetCtrl (Display *display, KeybdCtrl *old, KeybdCtrl *new)
static void dmxCommonMouSetCtrl (Display *display, PtrCtrl *old, PtrCtrl *new)
void dmxCommonKbdCtrl (DevicePtr pDev, KeybdCtrl *ctrl)
void dmxCommonMouCtrl (DevicePtr pDev, PtrCtrl *ctrl)
void dmxCommonKbdBell (DevicePtr pDev, int percent, int volume, int pitch, int duration)
void dmxCommonKbdGetMap (DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
void dmxCommonKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
int dmxCommonKbdOn (DevicePtr pDev)
void dmxCommonKbdOff (DevicePtr pDev)
int dmxCommonOthOn (DevicePtr pDev)
void dmxCommonOthOff (DevicePtr pDev)
void dmxCommonOthGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
void dmxCommonMouGetMap (DevicePtr pDev, unsigned char *map, int *nButtons)
static void * dmxCommonXSelect (DMXScreenInfo *dmxScreen, void *closure)
static void * dmxCommonAddEnabledDevice (DMXScreenInfo *dmxScreen, void *closure)
static void * dmxCommonRemoveEnabledDevice (DMXScreenInfo *dmxScreen, void *closure)
int dmxCommonMouOn (DevicePtr pDev)
void dmxCommonMouOff (DevicePtr pDev)
int dmxFindPointerScreen (int x, int y)
pointer dmxCommonCopyPrivate (DeviceIntPtr pDevice)
void dmxCommonSaveState (pointer private)
void dmxCommonRestoreState (pointer private)
+

Detailed Description

+

This file implements common routines used by the backend and console input devices.

+

Define Documentation

+ +
+
+ + + + + + + + + +
#define ADD(type  ) 
+
+
+Value:
if (count < DMX_MAX_XINPUT_EVENT_TYPES) {                                \
+        type(priv->xi, event_type[count], event_list[count]);                \
+        if (event_type[count]) {                                             \
+            dmxMapInsert(dmxLocal, event_type[count], XI_##type);            \
+            ++count;                                                         \
+        }                                                                    \
+    } else {                                                                 \
+        dmxLog(dmxWarning, "More than %d event types for %s\n",              \
+               DMX_MAX_XINPUT_EVENT_TYPES, dmxInput->name);                  \
+    }
+
+

Referenced by dmxCommonOthOn().

+ +
+
+ +
+
+ + + + +
#define DMX_STATE_DEBUG   0
+
+
-

Typedefs

-typedef _myPrivate myPrivate +
+
+ +
+
+ + + + + + + + + +
#define DMXDBG0( ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + +
#define NAME( )    priv->xkb->names->x ? XGetAtomName(priv->display,priv->xkb->names->x) : NULL
+
+
-

Functions

-void dmxCommonKbdCtrl (DevicePtr pDev, KeybdCtrl *ctrl) +

Referenced by dmxCommonKbdGetInfo().

-void dmxCommonMouCtrl (DevicePtr pDev, PtrCtrl *ctrl) +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct _myPrivate myPrivate
+
+
+

Each device has a private area that is visible only from inside the driver code.

-void dmxCommonKbdBell (DevicePtr pDev, int percent, int volume, int pitch, int duration) +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
static void* dmxCommonAddEnabledDevice (DMXScreenInfo dmxScreen,
void *  closure 
) [static]
+
+
-void dmxCommonKbdGetMap (DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) +

References _DMXScreenInfo::beDisplay.

-void dmxCommonKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) +

Referenced by dmxCommonMouOn().

-int dmxCommonKbdOn (DevicePtr pDev) +
+
+ +
+
+ + + + + + + + + +
pointer dmxCommonCopyPrivate (DeviceIntPtr  pDevice ) 
+
+
+

Returns a pointer to the private area for the device that comes just prior to pDevice in the current dmxInput device list. This is used as the private area for the current device in some situations (e.g., when a keyboard and mouse form a pair that should share the same private area). If the requested private area cannot be located, then NULL is returned.

-void dmxCommonKbdOff (DevicePtr pDev) +

References _DMXInputInfo::devs, dmxInputs, GETDMXLOCALFROMPDEVICE, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::private.

-int dmxCommonOthOn (DevicePtr pDev) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void dmxCommonKbdBell (DevicePtr  pDev,
int  percent,
int  volume,
int  pitch,
int  duration 
)
+
+
+

Sound they keyboard bell.

-void dmxCommonOthOff (DevicePtr pDev) +

References GETPRIVFROMPDEV.

-void dmxCommonOthGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void dmxCommonKbdCtrl (DevicePtr  pDev,
KeybdCtrl *  ctrl 
)
+
+
+

Update the keyboard control.

-void dmxCommonMouGetMap (DevicePtr pDev, unsigned char *map, int *nButtons) +

References dmxCommonKbdSetCtrl(), dmxCommonSaveState(), and GETPRIVFROMPDEV.

-int dmxCommonMouOn (DevicePtr pDev) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void dmxCommonKbdGetInfo (DevicePtr  pDev,
DMXLocalInitInfoPtr  info 
)
+
+
+

Fill in the XKEYBOARD parts of the info structure for the specified pDev.

-void dmxCommonMouOff (DevicePtr pDev) +

References dmxCommonRestoreState(), dmxCommonSaveState(), dmxLogInput(), _DMXLocalInitInfo::freenames, GETDMXINPUTFROMPRIV, GETPRIVFROMPDEV, NAME, and _DMXLocalInitInfo::names.

-int dmxFindPointerScreen (int x, int y) +

Referenced by dmxBackendKbdGetInfo(), and dmxConsoleKbdGetInfo().

-pointer dmxCommonCopyPrivate (DeviceIntPtr pDevice) +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void dmxCommonKbdGetMap (DevicePtr  pDev,
KeySymsPtr  pKeySyms,
CARD8 *  pModMap 
)
+
+
+

Get the keyboard mapping.

-void dmxCommonSaveState (pointer private) +

References GETPRIVFROMPDEV.

-void dmxCommonRestoreState (pointer private) +

Referenced by dmxBackendKbdGetInfo(), and dmxConsoleKbdGetInfo().

- -

Detailed Description

-This file implements common routines used by the backend and console input devices.

Typedef Documentation

-

- - - - -
- - -
typedef struct _myPrivate myPrivate -
-
- - - - - -
-   - - -

-Each device has a private area that is visible only from inside the driver code.

-


Function Documentation

-

- - - - -
- + + + +
+
+
- - - - - - + + + + + + +
pointer dmxCommonCopyPrivate DeviceIntPtr  pDevice  ) void dmxCommonKbdOff (DevicePtr  pDev ) 
+ +
+

Turn pDev off.

+ +

References DMX_KEYBOARD_EVENT_MASK, dmxCommonRestoreState(), and GETPRIVFROMPDEV.

+
+ + +
+
+ + + + + + + + +
int dmxCommonKbdOn (DevicePtr  pDev ) 
-
- - - - - -
-   - - -

-Returns a pointer to the private area for the device that comes just prior to pDevice in the current dmxInput device list. This is used as the private area for the current device in some situations (e.g., when a keyboard and mouse form a pair that should share the same private area). If the requested private area cannot be located, then NULL is returned.

-

- - - - -
- + +
+

Turn pDev on (i.e., take input from pDev).

+ +

References DMX_KEYBOARD_EVENT_MASK, dmxCommonSaveState(), and GETPRIVFROMPDEV.

+ +
+ + +
+
+
- - - - + + + + + - - - + + + - - - + + - - - + + + +
void dmxCommonKbdBell DevicePtr  pDev, static void dmxCommonKbdSetAR (Display *  display,
int  percent, unsigned char *  old,
int  volume, unsigned char *  new 
int  pitch, ) [static]
+ +
+ +

Referenced by dmxCommonKbdSetCtrl().

+ +
+ + +
+
+ + + + + + + + + + + + - - + + - - + + -
static void dmxCommonKbdSetCtrl (Display *  display,
KeybdCtrl *  old,
int  durationKeybdCtrl *  new 
) [static]
-
- - - - - -
-   - - -

-Sound they keyboard bell.

-

- - - - -
- + + + + +
+
+
- - - - + + + + + - - - + + - - + + -
void dmxCommonKbdCtrl DevicePtr  pDev, static void dmxCommonKbdSetLeds (Display *  display,
KeybdCtrl *  ctrlunsigned long  new 
) [static]
-
- - - - - -
-   - - -

-Update the keyboard control.

-

- - - - -
- + +
+ +

Referenced by dmxCommonKbdSetCtrl().

+ +
+ + +
+
+
- - - - + + + + + - - - + + - - + + -
void dmxCommonKbdGetInfo DevicePtr  pDev, void dmxCommonMouCtrl (DevicePtr  pDev,
DMXLocalInitInfoPtr  infoPtrCtrl *  ctrl 
)
-
- - - - - -
-   - - -

-Fill in the XKEYBOARD parts of the info structure for the specified pDev.

-

- - - - -
- + +
+

Update the mouse control.

+ +

References dmxCommonMouSetCtrl(), and GETPRIVFROMPDEV.

+ +
+ + +
+
+
- - - - + + + + + - - - + + + - - - + + - - + + -
void dmxCommonKbdGetMap DevicePtr  pDev, void dmxCommonMouGetMap (DevicePtr  pDev,
KeySymsPtr  pKeySyms, unsigned char *  map,
CARD8 *  pModMapint *  nButtons 
)
-
- - - - - -
-   - - -

-Get the keyboard mapping.

-

- - - - -
- + +
+

Obtain the mouse button mapping.

+ +

References DMX_MAX_BUTTONS, and GETPRIVFROMPDEV.

+ +

Referenced by dmxBackendMouGetInfo(), and dmxConsoleMouGetInfo().

+ +
+ + +
+
+
- - - - - - + + + + + + -
void dmxCommonKbdOff DevicePtr  pDev  ) void dmxCommonMouOff (DevicePtr  pDev ) 
-
- - - - - -
-   - - -

-Turn pDev off.

-

- - - - -
- + + + + +
+
+
- - - - - - + + + + + + -
int dmxCommonKbdOn DevicePtr  pDev  ) int dmxCommonMouOn (DevicePtr  pDev ) 
-
- - - - - -
-   - - -

-Turn pDev on (i.e., take input from pDev).

-

- - - - -
- + + + + +
+
+
- - - - + + + + + + + + + + - - + + - - + + -
void dmxCommonMouCtrl DevicePtr  pDev, static void dmxCommonMouSetCtrl (Display *  display,
PtrCtrl *  old,
PtrCtrl *  ctrlPtrCtrl *  new 
) [static]
-
- - - - - -
-   - - -

-Update the mouse control.

-

- - - - -
- + +
+ +

Referenced by dmxCommonMouCtrl().

+ +
+ + +
+
+
- - - - + + + + + - - - + + - - - + + +
void dmxCommonMouGetMap DevicePtr  pDev, void dmxCommonOthGetInfo (DevicePtr  pDev,
unsigned char *  map, DMXLocalInitInfoPtr  info 
int *  nButtons)
+ + + + +
+
+ + + + + + - - -
void dmxCommonOthOff (DevicePtr  pDev ) 
-
- - - - - -
-   - - -

-Obtain the mouse button mapping.

-

- - - - -
- - - - - - - - - + +
+

Turn pDev off.

-
void dmxCommonMouOff DevicePtr  pDev  ) 
-
- - - - - -
-   - - -

-Turn pDev off.

-

- - - - -
- +

References GETPRIVFROMPDEV.

+ + + + +
+
+
- - - - - - + + + + + + -
int dmxCommonMouOn DevicePtr  pDev  ) int dmxCommonOthOn (DevicePtr  pDev ) 
-
- - - - - -
-   - - -

-Turn pDev on (i.e., take input from pDev).

-

- - - - -
- + + + + +
+
+
- - - - + + + + + - - - + + - - + + -
void dmxCommonOthGetInfo DevicePtr  pDev, static void* dmxCommonRemoveEnabledDevice (DMXScreenInfo dmxScreen,
DMXLocalInitInfoPtr  infovoid *  closure 
) [static]
-
- - - - - -
-   - - -

-Fill the info structure with information needed to initialize pDev.

-

- - - - -
- + +
+ +

References _DMXScreenInfo::beDisplay.

+ +

Referenced by dmxCommonMouOff().

+ +
+ + +
+
+
- - - - - - + + + + + + -
void dmxCommonOthOff DevicePtr  pDev  ) void dmxCommonRestoreState (pointer  private ) 
-
- - - - - -
-   - - -

-Turn pDev off.

-

- - - - -
- + + + + +
+
+
- - - - - - + + + + + + -
int dmxCommonOthOn DevicePtr  pDev  ) void dmxCommonSaveState (pointer  private ) 
-
- - - - - -
-   - - -

-Turn pDev on (i.e., take input from pDev).

-

- - - - -
- + +
+

This routine saves and resets some important state for the backend and console device drivers:

+
    +
  • the modifier map is saved and set to 0 (so DMX controls the LEDs)
  • +
  • the key click, bell, led, and repeat masks are saved and set to the values that DMX claims to be using
  • +
+

This routine and dmxCommonRestoreState are used when the pointer enters and leaves the console window, or when the backend window is active or not active (for a full-screen window, this only happens at server startup and server shutdown).

+ +

References dmxCommonKbdSetCtrl(), DMXDBG0, dmxLogInput(), dmxScreens, dmxSync(), dmxUseXKB, and GETPRIVFROMPRIVATE.

+ +

Referenced by dmxBackendCollectEvents(), dmxCommonKbdCtrl(), dmxCommonKbdGetInfo(), dmxCommonKbdOn(), and dmxConsoleCollectEvents().

+ +
+ + +
+
+
- - - - - - + + + + - -
void dmxCommonRestoreState pointer  private  ) static void* dmxCommonXSelect (DMXScreenInfo dmxScreen,
-
- - - - - -
-   - - -

-This routine restores all the information saved by dmxCommonSaveState.

-

- - - - -
- - - - - - - + + + + + + + + + -
void dmxCommonSaveState pointer  private  ) void *  closure 
) [static]
-
- - - - - -
-   - - -

-This routine saves and resets some important state for the backend and console device drivers:

    -
  • the modifier map is saved and set to 0 (so DMX controls the LEDs)
  • the key click, bell, led, and repeat masks are saved and set to the values that DMX claims to be using
-

-This routine and dmxCommonRestoreState are used when the pointer enters and leaves the console window, or when the backend window is active or not active (for a full-screen window, this only happens at server startup and server shutdown).

-

- - - - -
- + + + + +
+
+
- - - - + + + + + - - - + + - - + + -
int dmxFindPointerScreen int  x, int dmxFindPointerScreen (int  x,
int  yint  y 
)
-
- - - - - -
-   - - -

-Given the global coordinates x and y, determine the screen with the lowest number on which those coordinates lie. If they are not on any screen, return -1. The number returned is an index into #dmxScreenInfo and is between -1 and dmxNumScreens - 1, inclusive.

+

+
+

Given the global coordinates x and y, determine the screen with the lowest number on which those coordinates lie. If they are not on any screen, return -1. The number returned is an index into dmxScreenInfo and is between -1 and dmxNumScreens - 1, inclusive.

+ +

References dmxNumScreens.

+ +
+
+
-- cgit v1.2.3