tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / include / osl / signal.h
blob66eb9db5e0016bd418c72d067d741b9f97429704
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 .
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"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #define OSL_SIGNAL_USER_RESERVED 0
38 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
40 typedef void* oslSignalHandler;
42 typedef enum
44 osl_Signal_System,
45 osl_Signal_Terminate,
46 osl_Signal_AccessViolation,
47 osl_Signal_IntegerDivideByZero,
48 osl_Signal_FloatDivideByZero,
49 osl_Signal_DebugBreak,
50 osl_Signal_User,
51 osl_Signal_Alarm,
52 osl_Signal_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
53 } oslSignal;
55 typedef enum
57 osl_Signal_ActCallNextHdl,
58 osl_Signal_ActIgnore,
59 osl_Signal_ActAbortApp,
60 osl_Signal_ActKillApp,
61 osl_Signal_Act_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
62 } oslSignalAction;
64 #ifdef _WIN32
65 # pragma pack(push, 8)
66 #endif
68 typedef struct
70 oslSignal Signal;
71 sal_Int32 UserSignal;
72 void* UserData;
73 } oslSignalInfo;
75 #if defined( _WIN32)
76 # pragma pack(pop)
77 #endif
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(
103 sal_Bool bEnable );
105 #ifdef __cplusplus
107 #endif
109 #endif // INCLUDED_OSL_SIGNAL_H
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */