VirtualBox

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

Last change on this file since 105686 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

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