/*
*
* 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.
*/
#ifndef _LIBVTSSUNWAST_H
#define _LIBVTSSUNWAST_H
#include <errno.h>
#include <memory.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <setjmp.h>
#include <stropts.h> /* ioctl() */
#include <sys/visual_io.h>
#include "libvtsSUNWxfb.h" /* Common VTS library definitions */
#include "gfx_common.h"
#define Status int
#include "graphicstest.h"
#include "gfx_vts.h"
#include "astio.h"
#include "ast.h"
typedef struct ast_info {
char const *ast_name;
int ast_fd;
int ast_endian;
int ast_palet_changed;
} ast_info_t;
typedef struct ast_xw_struct {
char const *xw_dispname;
int xw_screen;
int xw_ss_timeout;
int xw_ss_interval;
} ast_xw_t;
#ifdef __cplusplus
extern "C" {
#endif
/* chip.c */
extern return_packet *ast_test_chip(
int const fd);
extern int chip_test(
return_packet *const rp,
int const fd);
extern int draw_lines(
extern int draw_cascaded_box(
/* dma.c */
extern return_packet *ast_test_dma(
register int const fd);
extern int dma_test(
return_packet *const rp,
int const fd);
/* mapper.c */
extern return_packet *ast_test_open(
int const fd);
extern int map_me(
return_packet *const rp,
int const fd);
extern int ast_test_scratch(
return_packet *const rp,
int const test);
/* memory.c */
extern return_packet *ast_test_memory(
int const fd);
extern int memory_test(
return_packet *const rp,
int const fd);
extern void check_plane(
int const num_planes,
int const access_mode,
int const fb_pitch,
int const fb_height,
int const fb_width,
int const bytepp,
extern void init_data(
int const num_planes);
void);
extern boolean_t write_read(
int const xoff,
int const yoff,
boolean_t const complement,
int const access_mode,
int const fb_pitch,
int const bytepp,
/* tools.c */
extern int ast_map_mem(
return_packet *const rp,
int const test);
extern int ast_get_pci_info(
void);
extern int ast_map_mmio(
void);
extern int ast_map_fb(
void);
extern int ast_init_info(
return_packet *const rp,
int const test);
extern int ast_init_graphics(
void);
extern int ast_finish_graphics(
void);
extern int ast_save_palet(
void);
extern int ast_set_palet(
void);
extern int ast_restore_palet(
void);
extern int ast_open_key(
void);
extern int ast_fill_solid_rect(
extern int ast_fill_pattern_rect(
extern int ast_draw_solid_line(
extern int ast_unmap_mem(
return_packet *const rp,
int const test);
extern int ast_unmap_fb(
void);
extern int ast_unmap_mmio(
void);
extern int ast_store_mmio(
extern int ast_get_index_reg(
extern int ast_set_index_reg(
extern int ast_get_reg(
extern int ast_set_reg(
extern uint_t ast_mmio_read32(
extern void ast_mmio_write32(
extern int ast_wait_idle(
void);
/* libvtsSUNWast.c */
extern ast_info_t ast_info;
extern void ast_block_signals(
void);
extern void ast_restore_signals(
void);
extern int ast_lock_display(
void);
extern int ast_unlock_display(
void);
extern int ast_open_display(
void);
extern int ast_create_cursor(
void);
extern int ast_create_window(
void);
extern int ast_grab_server(
void);
extern int ast_ungrab_server(
void);
extern int ast_grab_keyboard(
void);
extern int ast_ungrab_keyboard(
void);
extern int ast_grab_pointer(
void);
extern int ast_ungrab_pointer(
void);
extern int ast_disable_screensaver(
void);
extern int ast_restore_screensaver(
void);
extern int ast_disable_dpms(
void);
extern int ast_restore_dpms(
void);
extern int ast_sleep(
extern void ast_signal_routine(
int const signo);
extern int ast_check_for_interrupt(
void);
extern void graphicstest_finish(
int const flag);
#ifdef __cplusplus
}
#endif
#endif /* _LIBVTSSUNWAST_H */
/* End of libvtsSUNWast.h */