/usr/include/gwenhywfar4/gwenhywfar/gwensignal.h is in libgwenhywfar60-dev 4.15.2beta-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | /***************************************************************************
$RCSfile$
-------------------
cvs : $Id: stringlist_p.h 786 2005-07-09 13:38:17Z aquamaniac $
begin : Thu Apr 03 2003
copyright : (C) 2003 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWENHYWFAR_SIGNAL_H
#define GWENHYWFAR_SIGNAL_H
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/list2.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup MOD_SIGNALSLOT Module for Signals and Slots
* @ingroup MOD_BASE
* @short Basic signal handling.
*
* This module introduces a simple signal-slot framework.
* Signals have a fixed list of arguments:
* <ul>
* <li>a void* pointer</li>
* <li>1st integer argument</li>
* <li>2nd integer argument</li>
* </ul>
* The actual type of the void pointer is defined by the signal and
* corresponding slot(s): Gwen checks the type at runtime and refuses to
* connect signals with slots which define this pointer to be of a different
* type.
* Any signal can be connected to any number of matching slots.
*
* The central object in this framework is @ref GWEN_SIGNALOBJECT. It holds
* a list of signals and slots for a given object.
*
*
*/
/*@{*/
typedef struct GWEN_SIGNALOBJECT GWEN_SIGNALOBJECT;
typedef struct GWEN_SIGNAL GWEN_SIGNAL;
typedef struct GWEN_SLOT GWEN_SLOT;
/**
* This is the prototype for the slot function. If there is a problem in the
* function it should return 1, otherwise 0.
*/
typedef int GWENHYWFAR_CB (*GWEN_SLOT_FUNCTION)(GWEN_SLOT *slot, void *userData, void *pArg1, void *pArg2, int iArg3, int iArg4);
/** @name SignalObject
*
*/
/*@{*/
GWENHYWFAR_API
GWEN_SIGNALOBJECT *GWEN_SignalObject_new(void);
GWENHYWFAR_API
void GWEN_SignalObject_free(GWEN_SIGNALOBJECT *so);
GWENHYWFAR_API
GWEN_SIGNAL *GWEN_SignalObject_FindSignal(const GWEN_SIGNALOBJECT *so,
const char *name,
const char *typeOfArg1,
const char *typeOfArg2);
GWENHYWFAR_API
GWEN_SLOT *GWEN_SignalObject_FindSlot(const GWEN_SIGNALOBJECT *so,
const char *name,
const char *typeOfArg1,
const char *typeOfArg2);
/**
* This function removes all signals and slots for the given derived
* type. This function can be used from within the FREEDATA function
* of the GWEN_INHERIT framework.
*/
GWENHYWFAR_API
void GWEN_SignalObject_RemoveForDerivedType(GWEN_SIGNALOBJECT *so,
const char *derivedType);
/**
* @defgroup MOD_SIGNALSLOT_SIGNAL Signals
* @short Signals
*
*/
/*@{*/
GWENHYWFAR_API
GWEN_SIGNAL *GWEN_Signal_new(GWEN_SIGNALOBJECT *so,
const char *derivedType,
const char *name,
const char *typeOfArg1,
const char *typeOfArg2);
GWENHYWFAR_API
void GWEN_Signal_free(GWEN_SIGNAL *sig);
GWENHYWFAR_API
GWEN_SIGNALOBJECT *GWEN_Signal_GetSignalObject(const GWEN_SIGNAL *sig);
GWENHYWFAR_API
int GWEN_Signal_Connect(GWEN_SIGNAL *sig, GWEN_SLOT *slot);
GWENHYWFAR_API
int GWEN_Signal_Disconnect(GWEN_SIGNAL *sig, GWEN_SLOT *slot);
/**
* This function calls the slot function of all connected slots.
* If any of the slot functions called returns with code 1 then
* this function will return 1, too. Otherwise 0 is returned.
* This means that this function will only return 0 if every called slot
* function returns 0.
*/
GWENHYWFAR_API
int GWEN_Signal_Emit(GWEN_SIGNAL *sig,
void *pArg1, void *pArg2, int iArg3, int iArg4);
/*@}*/
/**
* @defgroup MOD_SIGNALSLOT_SLOT Slots
* @short Slots
*
*/
/*@{*/
GWENHYWFAR_API
GWEN_SLOT *GWEN_Slot_new(GWEN_SIGNALOBJECT *so,
const char *derivedType,
const char *name,
const char *typeOfArg1,
const char *typeOfArg2,
GWEN_SLOT_FUNCTION fn,
void *userData);
GWENHYWFAR_API
void GWEN_Slot_free(GWEN_SLOT *slot);
GWENHYWFAR_API
GWEN_SIGNALOBJECT *GWEN_Slot_GetSignalObject(const GWEN_SLOT *slot);
/*@}*/ /* defgroup */
/*@}*/ /* defgroup */
#ifdef __cplusplus
} /* extern C */
#endif
#endif
|