update emoji autocorrect entries from po-files
[LibreOffice.git] / include / osl / signal.h
blob39d0ff08fd4f08acfc2b62a1f6bd820e8395cc44
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_OSL_SIGNAL_H
21 #define INCLUDED_OSL_SIGNAL_H
23 #include <sal/config.h>
25 #include <sal/saldllapi.h>
26 #include <sal/types.h>
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 #define OSL_SIGNAL_USER_RESERVED 0
34 #define OSL_SIGNAL_USER_RESOURCEFAILURE (OSL_SIGNAL_USER_RESERVED - 1)
35 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
36 #define OSL_SIGNAL_USER_RVPCONNECTIONERROR (OSL_SIGNAL_USER_RESERVED - 3)
38 typedef void* oslSignalHandler;
40 typedef enum
42 osl_Signal_System,
43 osl_Signal_Terminate,
44 osl_Signal_AccessViolation,
45 osl_Signal_IntegerDivideByZero,
46 osl_Signal_FloatDivideByZero,
47 osl_Signal_DebugBreak,
48 osl_Signal_User,
49 osl_Signal_Alarm,
50 osl_Signal_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
51 } oslSignal;
53 typedef enum
55 osl_Signal_ActCallNextHdl,
56 osl_Signal_ActIgnore,
57 osl_Signal_ActAbortApp,
58 osl_Signal_ActKillApp,
59 osl_Signal_Act_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
60 } oslSignalAction;
62 #ifdef SAL_W32
63 # pragma pack(push, 8)
64 #endif
66 typedef struct
68 oslSignal Signal;
69 sal_Int32 UserSignal;
70 void* UserData;
71 } oslSignalInfo;
73 #if defined( SAL_W32)
74 # pragma pack(pop)
75 #endif
77 /** the function-ptr. representing the signal handler-function.
79 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo);
81 SAL_DLLPUBLIC oslSignalHandler SAL_CALL osl_addSignalHandler(
82 oslSignalHandlerFunction Handler, void* pData);
84 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeSignalHandler(
85 oslSignalHandler hHandler);
87 SAL_DLLPUBLIC oslSignalAction SAL_CALL osl_raiseSignal(
88 sal_Int32 UserSignal, void* UserData);
90 /** Enables or disables error reporting
92 On default error reporting is enabled after process startup.
94 @param bEnable [in]
95 Enables or disables error reporting.
97 @return
98 sal_True if previous state of error reporting was enabled<br>
99 sal_False if previous state of error reporting was disbaled<br>
102 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setErrorReporting(
103 sal_Bool bEnable );
105 #ifdef __cplusplus
107 #endif
109 #endif // INCLUDED_OSL_SIGNAL_H
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */