LibreOffice LibreOffice 25.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
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/*
21 * This file is part of LibreOffice published API.
22 */
23
24#ifndef INCLUDED_OSL_SIGNAL_H
25#define INCLUDED_OSL_SIGNAL_H
26
27#include "sal/config.h"
28
29#include "sal/saldllapi.h"
30#include "sal/types.h"
31
32#ifdef __cplusplus
33 extern "C" {
34#endif
35
36#define OSL_SIGNAL_USER_RESERVED 0
37
38#define OSL_SIGNAL_USER_X11SUBSYSTEMERROR (OSL_SIGNAL_USER_RESERVED - 2)
39
40 typedef void* oslSignalHandler;
41
42 typedef enum
43{
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;
54
55 typedef enum
56{
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;
63
64#ifdef _WIN32
65# pragma pack(push, 8)
66#endif
67
68 typedef struct
69{
70 oslSignal Signal;
71 sal_Int32 UserSignal;
72 void* UserData;
73} oslSignalInfo;
74
75#if defined( _WIN32)
76# pragma pack(pop)
77#endif
78
81 typedef oslSignalAction (SAL_CALL *oslSignalHandlerFunction)(void* pData, oslSignalInfo* pInfo);
82
83 SAL_DLLPUBLIC oslSignalHandler SAL_CALL osl_addSignalHandler(
84 oslSignalHandlerFunction Handler, void* pData);
85
86 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_removeSignalHandler(
87 oslSignalHandler hHandler);
88
89 SAL_DLLPUBLIC oslSignalAction SAL_CALL osl_raiseSignal(
90 sal_Int32 UserSignal, void* UserData);
91
101
102 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_setErrorReporting(
103 sal_Bool bEnable );
104
105#ifdef __cplusplus
106}
107#endif
108
109#endif // INCLUDED_OSL_SIGNAL_H
110
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
config.h
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
types.h
SAL_MAX_ENUM
#define SAL_MAX_ENUM
Definition types.h:205
sal_Bool
unsigned char sal_Bool
Definition types.h:38
oslSignalHandlerFunction
oslSignalAction(* oslSignalHandlerFunction)(void *pData, oslSignalInfo *pInfo)
The function-ptr representing the signal handler-function.
Definition signal.h:81
osl_setErrorReporting
SAL_DLLPUBLIC sal_Bool osl_setErrorReporting(sal_Bool bEnable)
Enables or disables error reporting.
osl_raiseSignal
SAL_DLLPUBLIC oslSignalAction osl_raiseSignal(sal_Int32 UserSignal, void *UserData)
oslSignalAction
oslSignalAction
Definition signal.h:56
osl_Signal_ActAbortApp
@ osl_Signal_ActAbortApp
Definition signal.h:59
osl_Signal_Act_FORCE_EQUAL_SIZE
@ osl_Signal_Act_FORCE_EQUAL_SIZE
Definition signal.h:61
osl_Signal_ActKillApp
@ osl_Signal_ActKillApp
Definition signal.h:60
osl_Signal_ActIgnore
@ osl_Signal_ActIgnore
Definition signal.h:58
osl_Signal_ActCallNextHdl
@ osl_Signal_ActCallNextHdl
Definition signal.h:57
oslSignalHandler
void * oslSignalHandler
Definition signal.h:40
osl_addSignalHandler
SAL_DLLPUBLIC oslSignalHandler osl_addSignalHandler(oslSignalHandlerFunction Handler, void *pData)
osl_removeSignalHandler
SAL_DLLPUBLIC sal_Bool osl_removeSignalHandler(oslSignalHandler hHandler)
oslSignal
oslSignal
Definition signal.h:43
osl_Signal_FORCE_EQUAL_SIZE
@ osl_Signal_FORCE_EQUAL_SIZE
Definition signal.h:52
osl_Signal_DebugBreak
@ osl_Signal_DebugBreak
Definition signal.h:49
osl_Signal_IntegerDivideByZero
@ osl_Signal_IntegerDivideByZero
Definition signal.h:47
osl_Signal_Terminate
@ osl_Signal_Terminate
Definition signal.h:45
osl_Signal_User
@ osl_Signal_User
Definition signal.h:50
osl_Signal_AccessViolation
@ osl_Signal_AccessViolation
Definition signal.h:46
osl_Signal_FloatDivideByZero
@ osl_Signal_FloatDivideByZero
Definition signal.h:48
osl_Signal_System
@ osl_Signal_System
Definition signal.h:44
osl_Signal_Alarm
@ osl_Signal_Alarm
Definition signal.h:51
oslSignalInfo
Definition signal.h:69
oslSignalInfo::Signal
oslSignal Signal
Definition signal.h:70
oslSignalInfo::UserData
void * UserData
Definition signal.h:72
oslSignalInfo::UserSignal
sal_Int32 UserSignal
Definition signal.h:71