VirtualBox

source: vbox/trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h@ 78352

Last change on this file since 78352 was 76582, checked in by vboxsync, 6 years ago

Frontends: scm header guard alignment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1/* $Id: VBoxSDL.h 76582 2019-01-01 06:25:48Z vboxsync $ */
2/** @file
3 *
4 * VBox frontends: VBoxSDL (simple frontend based on SDL):
5 * Main header
6 */
7
8/*
9 * Copyright (C) 2006-2019 Oracle Corporation
10 *
11 * This file is part of VirtualBox Open Source Edition (OSE), as
12 * available from http://www.virtualbox.org. This file is free software;
13 * you can redistribute it and/or modify it under the terms of the GNU
14 * General Public License (GPL) as published by the Free Software
15 * Foundation, in version 2 as it comes in the "COPYING" file of the
16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18 */
19
20#ifndef VBOX_INCLUDED_SRC_VBoxSDL_VBoxSDL_h
21#define VBOX_INCLUDED_SRC_VBoxSDL_VBoxSDL_h
22#ifndef RT_WITHOUT_PRAGMA_ONCE
23# pragma once
24#endif
25
26#include <iprt/cdefs.h>
27#ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */
28/* convince SDL to not overload main() */
29# define _SDL_main_h
30#endif
31
32/* include this first so Windows.h get's in before our stuff. */
33#ifdef _MSC_VER
34# pragma warning(push)
35# pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/
36#endif
37#include <SDL.h>
38#ifdef _MSC_VER
39# pragma warning(pop)
40#endif
41
42/** custom SDL event for display update handling */
43#define SDL_USER_EVENT_UPDATERECT (SDL_USEREVENT + 4)
44/** custom SDL event for changing the guest resolution */
45#define SDL_USER_EVENT_NOTIFYCHANGE (SDL_USEREVENT + 5)
46/** custom SDL for XPCOM event queue processing */
47#define SDL_USER_EVENT_XPCOM_EVENTQUEUE (SDL_USEREVENT + 6)
48/** custom SDL event for updating the titlebar */
49#define SDL_USER_EVENT_UPDATE_TITLEBAR (SDL_USEREVENT + 7)
50/** custom SDL user event for terminating the session */
51#define SDL_USER_EVENT_TERMINATE (SDL_USEREVENT + 8)
52/** custom SDL user event for secure label update notification */
53#define SDL_USER_EVENT_SECURELABEL_UPDATE (SDL_USEREVENT + 9)
54/** custom SDL user event for pointer shape change request */
55#define SDL_USER_EVENT_POINTER_CHANGE (SDL_USEREVENT + 10)
56/** custom SDL user event for a regular timer */
57#define SDL_USER_EVENT_TIMER (SDL_USEREVENT + 11)
58/** custom SDL user event for resetting mouse cursor */
59#define SDL_USER_EVENT_GUEST_CAP_CHANGED (SDL_USEREVENT + 12)
60/** custom SDL user event for window resize done */
61#define SDL_USER_EVENT_WINDOW_RESIZE_DONE (SDL_USEREVENT + 13)
62
63
64/** The user.code field of the SDL_USER_EVENT_TERMINATE event.
65 * @{
66 */
67/** Normal termination. */
68#define VBOXSDL_TERM_NORMAL 0
69/** Abnormal termination. */
70#define VBOXSDL_TERM_ABEND 1
71/** @} */
72
73void ResetVM(void);
74void SaveState(void);
75
76#ifdef VBOX_WIN32_UI
77int initUI(bool fResizable, int64_t &winId);
78int uninitUI(void);
79int resizeUI(uint16_t width, uint16_t height);
80int setUITitle(char *title);
81#endif /* VBOX_WIN32_UI */
82
83#ifdef VBOXSDL_WITH_X11
84void PushNotifyUpdateEvent(SDL_Event *event);
85#endif
86int PushSDLEventForSure(SDL_Event *event);
87
88#ifdef RT_OS_DARWIN
89RT_C_DECLS_BEGIN
90void *VBoxSDLGetDarwinWindowId(void);
91RT_C_DECLS_END
92#endif
93
94#endif /* !VBOX_INCLUDED_SRC_VBoxSDL_VBoxSDL_h */
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