UDK 3.2.7 C/C++ API Reference
|
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 00002 /************************************************************************* 00003 * 00004 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 00005 * 00006 * Copyright 2000, 2010 Oracle and/or its affiliates. 00007 * 00008 * OpenOffice.org - a multi-platform office productivity suite 00009 * 00010 * This file is part of OpenOffice.org. 00011 * 00012 * OpenOffice.org is free software: you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 3 00014 * only, as published by the Free Software Foundation. 00015 * 00016 * OpenOffice.org is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License version 3 for more details 00020 * (a copy is included in the LICENSE file that accompanied this code). 00021 * 00022 * You should have received a copy of the GNU Lesser General Public License 00023 * version 3 along with OpenOffice.org. If not, see 00024 * <http://www.openoffice.org/license.html> 00025 * for a copy of the LGPLv3 License. 00026 * 00027 ************************************************************************/ 00028 00029 #ifndef _OSL_SIGNAL_H_ 00030 #define _OSL_SIGNAL_H_ 00031 00032 #include "sal/types.h" 00033 00034 #ifdef __cplusplus 00035 extern "C" { 00036 #endif 00037 00038 #define OSL_SIGNAL_USER_RESERVED 0 00039 00040 #define OSL_SIGNAL_USER_RESOURCEFAILURE (OSL_SIGNAL_USER_RESERVED - 1) 00041 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2) 00042 #define OSL_SIGNAL_USER_RVPCONNECTIONERROR (OSL_SIGNAL_USER_RESERVED - 3) 00043 00044 typedef void* oslSignalHandler; 00045 00046 typedef enum 00047 { 00048 osl_Signal_System, 00049 osl_Signal_Terminate, 00050 osl_Signal_AccessViolation, 00051 osl_Signal_IntegerDivideByZero, 00052 osl_Signal_FloatDivideByZero, 00053 osl_Signal_DebugBreak, 00054 osl_Signal_User, 00055 osl_Signal_Alarm, 00056 osl_Signal_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 00057 } oslSignal; 00058 00059 typedef enum 00060 { 00061 osl_Signal_ActCallNextHdl, 00062 osl_Signal_ActIgnore, 00063 osl_Signal_ActAbortApp, 00064 osl_Signal_ActKillApp, 00065 osl_Signal_Act_FORCE_EQUAL_SIZE = SAL_MAX_ENUM 00066 } oslSignalAction; 00067 00068 #ifdef SAL_W32 00069 # pragma pack(push, 8) 00070 #endif 00071 00072 typedef struct 00073 { 00074 oslSignal Signal; 00075 sal_Int32 UserSignal; 00076 void* UserData; 00077 } oslSignalInfo; 00078 00079 #if defined( SAL_W32) 00080 # pragma pack(pop) 00081 #endif 00082 00085 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo); 00086 00087 SAL_DLLPUBLIC oslSignalHandler SAL_CALL osl_addSignalHandler( 00088 oslSignalHandlerFunction Handler, void* pData); 00089 00090 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeSignalHandler( 00091 oslSignalHandler hHandler); 00092 00093 SAL_DLLPUBLIC oslSignalAction SAL_CALL osl_raiseSignal( 00094 sal_Int32 UserSignal, void* UserData); 00095 00108 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setErrorReporting( 00109 sal_Bool bEnable ); 00110 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 00115 #endif /* _OSL_SIGNAL_H_ */ 00116 00117 00118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */