/**
* Copyright © 2009 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "scrnintstr.h"
#include "windowstr.h"
#include "exevents.h"
#include <assert.h>
#ifndef PROTOCOL_COMMON_H
#define PROTOCOL_COMMON_H
/* Check default values in a reply */
{ \
}
/* initialise default values for request */
{ \
}
/* Various defines used in the tests. Some tests may use different values
* than these defaults */
/* default client index */
/* default client mask for resources and windows */
/* default client sequence number for replies */
/* default root window id */
/* default client window id */
/* invalid window ID. use for BadWindow checks. */
/* initial fake sprite position */
/* Various structs used throughout the tests */
/* The default devices struct, contains one pointer + keyboard and the
* matching master devices. Initialize with init_devices() if needed. */
struct devices {
int num_devices;
int num_master_devices;
};
/**
* The set of default devices available in all tests if necessary.
*/
/**
* test-specific userdata, passed into the reply handler.
*/
extern void *global_userdata;
/**
* The reply handler called from WriteToClient. Set this handler if you need
* to check the reply values.
*/
/**
* The default screen used for the windows. Initialized by init_simple().
*/
/**
* Semi-initialized root window. initialized by init().
*/
/**
* Semi-initialized top-level window. initialized by init().
*/
/* various simple functions for quick setup */
/**
* Initialize the above struct with default devices and return the struct.
* Usually not needed if you call ::init_simple.
*/
struct devices init_devices(void);
/**
* Init a mostly zeroed out client with default values for index and mask.
*/
/**
* Init a mostly zeroed out window with the given window ID.
* Usually not needed if you call ::init_simple which sets up root and
* window.
*/
/**
* Create a very simple setup that provides the minimum values for most
* tests, including a screen, the root and client window and the default
* device setup.
*/
void init_simple(void);
/* Declarations for various overrides in the test files. */
unsigned char *mask);
#endif /* PROTOCOL_COMMON_H */