LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
signal.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_OSL_SIGNAL_H
21 #define INCLUDED_OSL_SIGNAL_H
22 
23 #include "sal/config.h"
24 
25 #include "sal/saldllapi.h"
26 #include "sal/types.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define OSL_SIGNAL_USER_RESERVED 0
33 
34 #define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
35 
36 typedef void* oslSignalHandler;
37 
38 typedef enum
39 {
50 
51 typedef enum
52 {
59 
60 #ifdef _WIN32
61 # pragma pack(push, 8)
62 #endif
63 
64 typedef struct
65 {
67  sal_Int32 UserSignal;
68  void* UserData;
70 
71 #if defined( _WIN32)
72 # pragma pack(pop)
73 #endif
74 
77 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo);
78 
80  oslSignalHandlerFunction Handler, void* pData);
81 
83  oslSignalHandler hHandler);
84 
86  sal_Int32 UserSignal, void* UserData);
87 
99  sal_Bool bEnable );
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif // INCLUDED_OSL_SIGNAL_H
106 
107 
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
#define SAL_MAX_ENUM
Definition: types.h:201
unsigned char sal_Bool
Definition: types.h:34
oslSignalAction(* oslSignalHandlerFunction)(void *pData, oslSignalInfo *pInfo)
The function-ptr representing the signal handler-function.
Definition: signal.h:77
SAL_DLLPUBLIC sal_Bool osl_setErrorReporting(sal_Bool bEnable)
Enables or disables error reporting.
SAL_DLLPUBLIC oslSignalAction osl_raiseSignal(sal_Int32 UserSignal, void *UserData)
oslSignalAction
Definition: signal.h:52
@ osl_Signal_ActAbortApp
Definition: signal.h:55
@ osl_Signal_Act_FORCE_EQUAL_SIZE
Definition: signal.h:57
@ osl_Signal_ActKillApp
Definition: signal.h:56
@ osl_Signal_ActIgnore
Definition: signal.h:54
@ osl_Signal_ActCallNextHdl
Definition: signal.h:53
void * oslSignalHandler
Definition: signal.h:36
SAL_DLLPUBLIC oslSignalHandler osl_addSignalHandler(oslSignalHandlerFunction Handler, void *pData)
SAL_DLLPUBLIC sal_Bool osl_removeSignalHandler(oslSignalHandler hHandler)
oslSignal
Definition: signal.h:39
@ osl_Signal_FORCE_EQUAL_SIZE
Definition: signal.h:48
@ osl_Signal_DebugBreak
Definition: signal.h:45
@ osl_Signal_IntegerDivideByZero
Definition: signal.h:43
@ osl_Signal_Terminate
Definition: signal.h:41
@ osl_Signal_User
Definition: signal.h:46
@ osl_Signal_AccessViolation
Definition: signal.h:42
@ osl_Signal_FloatDivideByZero
Definition: signal.h:44
@ osl_Signal_System
Definition: signal.h:40
@ osl_Signal_Alarm
Definition: signal.h:47
Definition: signal.h:65
oslSignal Signal
Definition: signal.h:66
void * UserData
Definition: signal.h:68
sal_Int32 UserSignal
Definition: signal.h:67