1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 * This file is part of LibreOffice published API.
24 #ifndef INCLUDED_OSL_SIGNAL_H
25 #define INCLUDED_OSL_SIGNAL_H
27 #include "sal/config.h"
29 #include "sal/saldllapi.h"
30 #include "sal/types.h"
36 #define OSL_SIGNAL_USER_RESERVED 0
38 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
40 typedef void* oslSignalHandler
;
46 osl_Signal_AccessViolation
,
47 osl_Signal_IntegerDivideByZero
,
48 osl_Signal_FloatDivideByZero
,
49 osl_Signal_DebugBreak
,
52 osl_Signal_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
57 osl_Signal_ActCallNextHdl
,
59 osl_Signal_ActAbortApp
,
60 osl_Signal_ActKillApp
,
61 osl_Signal_Act_FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
65 # pragma pack(push, 8)
79 /** The function-ptr representing the signal handler-function.
81 typedef oslSignalAction (SAL_CALL
*oslSignalHandlerFunction
)(void* pData
, oslSignalInfo
* pInfo
);
83 SAL_DLLPUBLIC oslSignalHandler SAL_CALL
osl_addSignalHandler(
84 oslSignalHandlerFunction Handler
, void* pData
);
86 SAL_DLLPUBLIC sal_Bool SAL_CALL
osl_removeSignalHandler(
87 oslSignalHandler hHandler
);
89 SAL_DLLPUBLIC oslSignalAction SAL_CALL
osl_raiseSignal(
90 sal_Int32 UserSignal
, void* UserData
);
92 /** Enables or disables error reporting
94 On default error reporting is enabled after process startup.
96 @param[in] bEnable Enables or disables error reporting.
98 @retval sal_True if previous state of error reporting was enabled
99 @retval sal_False if previous state of error reporting was disabled
102 SAL_DLLPUBLIC sal_Bool SAL_CALL
osl_setErrorReporting(
109 #endif // INCLUDED_OSL_SIGNAL_H
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */