VirtualBox

source: vbox/trunk/src/VBox/Additions/haiku/VBoxVideo/accelerant/accelerant.h@ 43408

Last change on this file since 43408 was 43408, checked in by vboxsync, 12 years ago

Additions/haiku: cleanup.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/* $Id: accelerant.h 43408 2012-09-22 16:53:18Z vboxsync $ */
2/** @file
3 * VBoxVideo Accelerant; Haiku Guest Additions, header.
4 */
5
6/*
7 * Copyright (C) 2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18/*
19 * This code is based on:
20 *
21 * VirtualBox Guest Additions for Haiku.
22 * Copyright (c) 2011 Mike Smith <[email protected]>
23 * François Revol <[email protected]>
24 *
25 * Permission is hereby granted, free of charge, to any person
26 * obtaining a copy of this software and associated documentation
27 * files (the "Software"), to deal in the Software without
28 * restriction, including without limitation the rights to use,
29 * copy, modify, merge, publish, distribute, sublicense, and/or sell
30 * copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following
32 * conditions:
33 *
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
36 *
37 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44 * OTHER DEALINGS IN THE SOFTWARE.
45 */
46
47#ifndef ___VBOX_ACCELERANT_H
48#define ___VBOX_ACCELERANT_H
49
50#include <Accelerant.h>
51#include "../common/VBoxVideo_common.h"
52
53struct AccelerantInfo
54{
55 /** @todo doxygen document these fields */
56 int deviceFD;
57 bool isClone;
58
59 SharedInfo *sharedInfo;
60 area_id sharedInfoArea;
61};
62extern AccelerantInfo gInfo;
63
64/* General */
65status_t vboxvideo_init_accelerant(int fd);
66ssize_t vboxvideo_accelerant_clone_info_size(void);
67void vboxvideo_get_accelerant_clone_info(void *data);
68status_t vboxvideo_clone_accelerant(void *data);
69void vboxvideo_uninit_accelerant(void);
70status_t vboxvideo_get_accelerant_device_info(accelerant_device_info *adi);
71sem_id vboxvideo_accelerant_retrace_semaphore(void);
72
73/* Modes & constraints */
74uint32 vboxvideo_accelerant_mode_count(void);
75status_t vboxvideo_get_mode_list(display_mode *dm);
76status_t vboxvideo_set_display_mode(display_mode *modeToSet);
77status_t vboxvideo_get_display_mode(display_mode *currentMode);
78status_t vboxvideo_get_edid_info(void *info, size_t size, uint32 *_version);
79status_t vboxvideo_get_frame_buffer_config(frame_buffer_config *config);
80status_t vboxvideo_get_pixel_clock_limits(display_mode *dm, uint32 *low, uint32 *high);
81
82/* Cursor */
83status_t vboxvideo_set_cursor_shape(uint16 width, uint16 height, uint16 hotX, uint16 hotY, uint8 *andMask, uint8 *xorMask);
84void vboxvideo_move_cursor(uint16 x, uint16 y);
85void vboxvideo_show_cursor(bool is_visible);
86
87/* Accelerant engine */
88uint32 vboxvideo_accelerant_engine_count(void);
89status_t vboxvideo_acquire_engine(uint32 capabilities, uint32 maxWait, sync_token *st, engine_token **et);
90status_t vboxvideo_release_engine(engine_token *et, sync_token *st);
91void vboxvideo_wait_engine_idle(void);
92status_t vboxvideo_get_sync_token(engine_token *et, sync_token *st);
93status_t vboxvideo_sync_to_token(sync_token *st);
94
95/* 2D acceleration */
96void vboxvideo_screen_to_screen_blit(engine_token *et, blit_params *list, uint32 count);
97void vboxvideo_fill_rectangle(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
98void vboxvideo_invert_rectangle(engine_token *et, fill_rect_params *list, uint32 count);
99void vboxvideo_fill_span(engine_token *et, uint32 color, uint16 *list, uint32 count);
100
101#endif /* ___VBOX_ACCELERANT_H */
102
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette