1 /*************************************************************************** 2 $RCSfile$ 3 ------------------- 4 cvs : $Id: stringlist_p.h 786 2005-07-09 13:38:17Z aquamaniac $ 5 begin : Thu Apr 03 2003 6 copyright : (C) 2003 by Martin Preuss 7 email : martin@libchipcard.de 8 9 *************************************************************************** 10 * * 11 * This library is free software; you can redistribute it and/or * 12 * modify it under the terms of the GNU Lesser General Public * 13 * License as published by the Free Software Foundation; either * 14 * version 2.1 of the License, or (at your option) any later version. * 15 * * 16 * This library is distributed in the hope that it will be useful, * 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 19 * Lesser General Public License for more details. * 20 * * 21 * You should have received a copy of the GNU Lesser General Public * 22 * License along with this library; if not, write to the Free Software * 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * 24 * MA 02111-1307 USA * 25 * * 26 ***************************************************************************/ 27 28 #ifndef GWENHYWFAR_SIGNAL_P_H 29 #define GWENHYWFAR_SIGNAL_P_H 30 31 #include "gwensignal.h" 32 33 34 GWEN_LIST2_FUNCTION_DEFS(GWEN_SIGNAL, GWEN_Signal) 35 GWEN_LIST2_FUNCTION_DEFS(GWEN_SLOT, GWEN_Slot) 36 37 void GWEN_Signal_List2_freeAll(GWEN_SIGNAL_LIST2 *slist); 38 void GWEN_Slot_List2_freeAll(GWEN_SLOT_LIST2 *slist); 39 40 41 struct GWEN_SIGNAL { 42 GWEN_SIGNALOBJECT *signalObject; 43 char *name; 44 uint32_t derivedParentType; 45 uint32_t typeOfArg1; 46 uint32_t typeOfArg2; 47 GWEN_SLOT_LIST2 *connectedSlots; 48 uint32_t _refCount; 49 }; 50 51 GWEN_SIGNAL *GWEN_Signal__List2_freeAll_cb(GWEN_SIGNAL *sig, void *user_data); 52 GWEN_SIGNAL *GWEN_Signal__List2_hasSignal_cb(GWEN_SIGNAL *sig, void *user_data); 53 int GWEN_Signal_List2_HasSignal(GWEN_SIGNAL_LIST2 *slist, GWEN_SIGNAL *sig); 54 55 void GWEN_Signal_Attach(GWEN_SIGNAL *sig); 56 57 58 struct GWEN_SLOT { 59 GWEN_SIGNALOBJECT *signalObject; 60 char *name; 61 uint32_t derivedParentType; 62 GWEN_SLOT_FUNCTION func; 63 void *userData; 64 uint32_t typeOfArg1; 65 uint32_t typeOfArg2; 66 GWEN_SIGNAL_LIST2 *connectedSignals; 67 uint32_t _refCount; 68 }; 69 70 GWEN_SLOT *GWEN_Slot__List2_freeAll_cb(GWEN_SLOT *slot, void *user_data); 71 GWEN_SLOT *GWEN_Slot__List2_hasSlot_cb(GWEN_SLOT *slot, void *user_data); 72 int GWEN_Slot_List2_HasSlot(GWEN_SLOT_LIST2 *slist, GWEN_SLOT *slot); 73 void GWEN_Slot_Attach(GWEN_SLOT *slot); 74 75 76 77 78 struct GWEN_SIGNALOBJECT { 79 GWEN_SLOT_LIST2 *slotList; 80 GWEN_SIGNAL_LIST2 *signalList; 81 }; 82 83 uint32_t GWEN_SignalObject_MkTypeId(const char *typeName); 84 GWEN_SIGNAL *GWEN_SignalObject__findSignal(const GWEN_SIGNALOBJECT *so, 85 const char *name, 86 uint32_t typeId1, 87 uint32_t typeId2); 88 GWEN_SLOT *GWEN_SignalObject__findSlot(const GWEN_SIGNALOBJECT *so, 89 const char *name, 90 uint32_t typeId1, 91 uint32_t typeId2); 92 int GWEN_SignalObject_AddSignal(GWEN_SIGNALOBJECT *so, GWEN_SIGNAL *sig); 93 int GWEN_SignalObject_AddSlot(GWEN_SIGNALOBJECT *so, GWEN_SLOT *slot); 94 95 96 #endif 97 98