[1] | 1 | /** @file
|
---|
| 2 | *
|
---|
| 3 | * VBox frontends: VBoxSDL (simple frontend based on SDL):
|
---|
| 4 | * Main header
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | /*
|
---|
[28800] | 8 | * Copyright (C) 2006-2007 Oracle Corporation
|
---|
[1] | 9 | *
|
---|
| 10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
| 12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
[5999] | 13 | * General Public License (GPL) as published by the Free Software
|
---|
| 14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
[1] | 17 | */
|
---|
| 18 |
|
---|
| 19 | #ifndef __H_VBOXSDL
|
---|
| 20 | #define __H_VBOXSDL
|
---|
| 21 |
|
---|
[3669] | 22 | #ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */
|
---|
[1] | 23 | /* convince SDL to not overload main() */
|
---|
| 24 | #define _SDL_main_h
|
---|
[614] | 25 | #endif
|
---|
[1] | 26 | /* include this first so Windows.h get's in before our stuff. */
|
---|
| 27 | #include <SDL.h>
|
---|
| 28 |
|
---|
| 29 | /** custom SDL event for display update handling */
|
---|
| 30 | #define SDL_USER_EVENT_UPDATERECT (SDL_USEREVENT + 4)
|
---|
| 31 | /** custom SDL event for resize handling */
|
---|
| 32 | #define SDL_USER_EVENT_RESIZE (SDL_USEREVENT + 5)
|
---|
| 33 | /** custom SDL for XPCOM event queue processing */
|
---|
| 34 | #define SDL_USER_EVENT_XPCOM_EVENTQUEUE (SDL_USEREVENT + 6)
|
---|
| 35 | /** custom SDL event for updating the titlebar */
|
---|
| 36 | #define SDL_USER_EVENT_UPDATE_TITLEBAR (SDL_USEREVENT + 7)
|
---|
| 37 | /** custom SDL user event for terminating the session */
|
---|
| 38 | #define SDL_USER_EVENT_TERMINATE (SDL_USEREVENT + 8)
|
---|
| 39 | /** custom SDL user event for secure label update notification */
|
---|
| 40 | #define SDL_USER_EVENT_SECURELABEL_UPDATE (SDL_USEREVENT + 9)
|
---|
| 41 | /** custom SDL user event for pointer shape change request */
|
---|
| 42 | #define SDL_USER_EVENT_POINTER_CHANGE (SDL_USEREVENT + 10)
|
---|
| 43 | /** custom SDL user event for a regular timer */
|
---|
| 44 | #define SDL_USER_EVENT_TIMER (SDL_USEREVENT + 11)
|
---|
| 45 | /** custom SDL user event for resetting mouse cursor */
|
---|
| 46 | #define SDL_USER_EVENT_GUEST_CAP_CHANGED (SDL_USEREVENT + 12)
|
---|
[11576] | 47 | /** custom SDL user event for window resize done */
|
---|
[522] | 48 | #define SDL_USER_EVENT_WINDOW_RESIZE_DONE (SDL_USEREVENT + 13)
|
---|
[1] | 49 |
|
---|
| 50 |
|
---|
| 51 | /** The user.code field of the SDL_USER_EVENT_TERMINATE event.
|
---|
| 52 | * @{
|
---|
| 53 | */
|
---|
| 54 | /** Normal termination. */
|
---|
| 55 | #define VBOXSDL_TERM_NORMAL 0
|
---|
| 56 | /** Abnormal termination. */
|
---|
| 57 | #define VBOXSDL_TERM_ABEND 1
|
---|
| 58 | /** @} */
|
---|
| 59 |
|
---|
| 60 | void ResetVM(void);
|
---|
| 61 | void SaveState(void);
|
---|
| 62 |
|
---|
| 63 | #ifdef VBOX_WIN32_UI
|
---|
[31698] | 64 | int initUI(bool fResizable, int64_t &winId);
|
---|
[1] | 65 | int uninitUI(void);
|
---|
| 66 | int resizeUI(uint16_t width, uint16_t height);
|
---|
| 67 | int setUITitle(char *title);
|
---|
| 68 | #endif /* VBOX_WIN32_UI */
|
---|
| 69 |
|
---|
[4637] | 70 | #ifdef VBOXSDL_WITH_X11
|
---|
[3289] | 71 | void PushNotifyUpdateEvent(SDL_Event *event);
|
---|
| 72 | #endif
|
---|
| 73 | int PushSDLEventForSure(SDL_Event *event);
|
---|
| 74 |
|
---|
[1] | 75 | #endif // __H_VBOXSDL
|
---|