Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

# dmx.c File Reference

`#include <X11/Xlibint.h>`
`#include "Xext.h"`
`#include "extutil.h"`
`#include "dmxproto.h"`
`#include "dmxext.h"`

## Functions
dmx_extension_info Bool | DMXQueryExtension (Display *dpy, int *event_basep, int *error_basep)
Bool | DMXQueryVersion (Display *dpy, int *majorVersion, int *minorVersion, int *patchVersion)
Bool | DMXSync (Display *dpy)
Bool | DMXForceWindowCreation (Display *dpy, Window window)
Bool | DMXGetScreenCount (Display *dpy, int *screen_count)
Bool | DMXGetScreenAttributes (Display *dpy, int physical_screen, DMXScreenAttributes *attr)
int | DMXChangeScreensAttributes (Display *dpy, int screen_count, int *screens, int mask_count, unsigned int *masks, DMXScreenAttributes *attrs, int *error_screen)
Bool | DMXAddScreen (Display *dpy, const char *displayName, unsigned int mask, DMXScreenAttributes *attr, int *screen)
Bool | DMXRemoveScreen (Display *dpy, int screen)
Bool | DMXGetWindowAttributes (Display *dpy, Window window, int *screen_count, int available_count, DMXWindowAttributes *inf)
Bool | DMXGetDesktopAttributes (Display *dpy, DMXDesktopAttributes *attr)
int | DMXChangeDesktopAttributes (Display *dpy, unsigned int mask, DMXDesktopAttributes *attr)
Bool | DMXGetInputCount (Display *dpy, int *input_count)
Bool | DMXGetInputAttributes (Display *dpy, int id, DMXInputAttributes *inf)
Bool | DMXAddInput (Display *dpy, unsigned int mask, DMXInputAttributes *attr, int *id)
Bool | DMXAddBackendInput (Display *dpy, int screen, int sendsCore, int *newId)
Bool | DMXAddConsoleInput (Display *dpy, const char *name, int sendsCore, int *newId)
Bool | DMXRemoveInput (Display *dpy, int id)

## Detailed Description

This file implements the client-side part of the DMX protocol. It can be included in client applications by linking with the libdmx.a library.

## Function Documentation

Bool DMXAddBackendInput | ( | Display * | dpy,
|  | int | screen,
|  | int | sendsCore,
|  | int * | newId
| ) |

| Add backend input (a helper function that calls DMXAddInput).

Bool DMXAddConsoleInput | ( | Display * | dpy,
|  | const char * | name,
|  | int | sendsCore,
|  | int * | newId
| ) |

| Add console input (a helper function that calls DMXAddInput).

Bool DMXAddInput | ( | Display * | dpy,
|  | unsigned int | mask,
|  | DMXInputAttributes * | attr,
|  | int * | id
| ) |

| Add input.

Bool DMXAddScreen | ( | Display * | dpy,
|  | const char * | displayName,
|  | unsigned int | mask,
|  | DMXScreenAttributes * | attr,
|  | int * | screen
| ) |

| Add a screen.

int DMXChangeDesktopAttributes | ( | Display * | dpy,
|  | unsigned int | mask,
|  | DMXDesktopAttributes * | attr
| ) |

| Change the global bounding box and origin offset. Available in DMX Protocol Version 2.0

int DMXChangeScreensAttributes | ( | Display * | dpy,
|  | int | screen_count,
|  | int * | screens,
|  | int | mask_count,
|  | unsigned int * | masks,
|  | DMXScreenAttributes * | attrs,
|  | int * | error_screen
| ) |

| Change geometries and positions of the DMX screen and root windows on the back-end X server.

Bool DMXForceWindowCreation | ( | Display * | dpy,
|  | Window | window
| ) |

| The creation of the specified window will be forced. Available in DMX Protocol Version 1.2 Reply added in DMX Protocol Version 2.0

Bool DMXGetDesktopAttributes | ( | Display * | dpy,
|  | DMXDesktopAttributes * | attr
| ) |

| If the DMXGetDesktopAttributes protocol request returns information correctly, the information will be placed in attr, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 2.0

Bool DMXGetInputAttributes | ( | Display * | dpy,
|  | int | id,
|  | DMXInputAttributes * | inf
| ) |

| If the DMXGetInputAttributes protocol request returns information about the input device with the specified id, information about the input device will be placed in inf, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.1

Bool DMXGetInputCount | ( | Display * | dpy,
|  | int * | input_count
| ) |

| If the DMXGetInputCount protocol request returns the input count, the value will be placed in input_count, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.1

Bool DMXGetScreenAttributes | ( | Display * | dpy,
|  | int | physical_screen,
|  | DMXScreenAttributes * | attr
| ) |

| If the DMXGetScreenAttributes protocol request returns information for the specified physical_screen, information about the screen will be placed in attr, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.0; Modified in Version 2.0

Bool DMXGetScreenCount | ( | Display * | dpy,
|  | int * | screen_count
| ) |

| If the DMXGetScreenCount protocol request returns the screen count, the value will be placed in screen_count, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.0

Bool DMXGetWindowAttributes | ( | Display * | dpy,
|  | Window | window,
|  | int * | screen_count,
|  | int | available_count,
|  | DMXWindowAttributes * | inf
| ) |

| If the DMXGetWindowAttributes protocol request returns information about the specified window, the number of screens for which information is available will be returned in screen_count and information about the first available_count of those screens will be placed in inf. Because this call transports a great deal of information over the wire, please call DMXGetScreenCount first, and make sure inf is that large. Note that if the specified window has not yet been mapped when DMXGetWindowAttributes is called, then a subsequent XMapWindow call might be buffered in xlib while requests directly to the back-end X servers are processed. This race condition can be solved by calling DMXSync before talking directly to the back-end X servers. Available in DMX Protocol Version 1.0, but not working correctly until DMX Protocol Version 1.4

dmx_extension_info Bool DMXQueryExtension | ( | Display * | dpy,
|  | int * | event_basep,
|  | int * | error_basep
| ) |

| If the server has the DMX extension, the event and error bases will be placed in event_basep and error_basep, and True will be returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.0

Bool DMXQueryVersion | ( | Display * | dpy,
|  | int * | majorVersion,
|  | int * | minorVersion,
|  | int * | patchVersion
| ) |

| If the DMXQueryVersion protocol request returns version information from the server, majorVersion, minorVersion, and patchVersion are filled in with the appropriate information and True is returned. Otherwise, False will be returned. Available in DMX Protocol Version 1.0

Bool DMXRemoveInput | ( | Display * | dpy,
|  | int | id
| ) |

| Remove an input.

Bool DMXRemoveScreen | ( | Display * | dpy,
|  | int | screen
| ) |

| Remove a screen.

Bool DMXSync | ( | Display * | dpy | ) |

| Flush all pending dmxSync requests in DMX server. Available in DMX Protocol Version 1.5