Helper.h revision 0c04bf3d366953a24840080b5f7be34d9406a7dc
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/** @file
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * VBox frontends: VBoxSDL (simple frontend based on SDL):
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Miscellaneous helpers header
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/*
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Copyright (C) 2006-2007 innotek GmbH
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * This file is part of VirtualBox Open Source Edition (OSE), as
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * available from http://www.virtualbox.org. This file is free software;
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * you can redistribute it and/or modify it under the terms of the GNU
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * General Public License as published by the Free Software Foundation,
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * distribution. VirtualBox OSE is distributed in the hope that it will
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * be useful, but WITHOUT ANY WARRANTY of any kind.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * If you received this file as part of a commercial VirtualBox
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * distribution, then only the terms of your commercial VirtualBox
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * license agreement apply instead of the previous paragraph.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#ifndef __H_HELPER
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#define __H_HELPER
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#if defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2)
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/** Indicates that the XPCOM queue thread is needed for this platform. */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore# define USE_XPCOM_QUEUE_THREAD 1
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/**
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Creates the XPCOM event thread
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore *
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * @returns VBOX status code
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * @param eqFD XPCOM event queue file descriptor
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amoreint startXPCOMEventQueueThread(int eqFD);
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/*
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Notify the XPCOM thread that we consumed an XPCOM event
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorevoid consumedXPCOMUserEvent(void);
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/**
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Signal to the XPCOM even queue thread that it should select for more events.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorevoid signalXPCOMEventQueueThread(void);
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore/**
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore * Indicates to the XPCOM thread that it should terminate now.
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amorevoid terminateXPCOMQueueThread(void);
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#endif /* defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2) */
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore#endif // __H_HELPER
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore
88447a05f537aabe9a1bc3d5313f22581ec992a7Garrett D'Amore