     signal.returns.swiftCCompatibleType()
 }
 
+private func cCallbackArgumentsDecl(record: GIR.Record, signal: GIR.Signal) -> String {
+    Code.line {
+        "unownedSelf"
+        Code.loopEnumerated(over: signal.args) { index, _ in
+            ", arg\(index + 1)"
+        }
+        ", userData"
+    }
+}
+
 private func generaceCCallbackCall(record: GIR.Record, signal: GIR.Signal) -> String {
     Code.line {
-        "call(\(record.structRef.type.swiftName)(raw: $0)"
+        "call(\(record.structRef.type.swiftName)(raw: unownedSelf)"
         Code.loopEnumerated(over: signal.args) { index, argument in
             ", \(argument.swiftSignalArgumentConversion(at: index + 1))"
         }

        case is GIR.Enumeration:
            return GIR.uint32Type.typeName
        default: // Treat as fundamental (if not a fundamental, report error)
            return self.typeRef.fullTypeName
        }
    }
    
    func swiftSignalArgumentConversion(at index: Int) -> String {
        switch knownType {
        case is GIR.Record:
            return typeRef.type.swiftName + "Ref" + "(raw: $\(index))"
        case let type as GIR.Alias: // use containedTypes
            return ""
        case is GIR.Bitfield:
            return self.argumentTypeName + "($\(index))"
        case is GIR.Enumeration:
            return self.argumentTypeName + "($\(index))"
        default: // Treat as fundamental (if not a fundamental, report error)
            return swiftReturnRef.cast(expression: "$\(index)", from: typeRef)
        }
    }
}

    if !signal.args.allSatisfy({ !($0.knownType is GIR.Alias) }) || (signal.returns.knownType is GIR.Alias) {
        return "// Warning: signal \(signal.name) is ignored because of Alias argument or return is not yet supported"
    }

    if !signal.args.allSatisfy({ !$0.isOptional }) || signal.returns.isOptional {
        return "// Warning: signal \(signal.name) is ignored because of argument or return optional is not allowed"
    }

    if !signal.args.allSatisfy({ !$0.isArray }) || signal.returns.isArray {
        return "// Warning: signal \(signal.name) is ignored because of argument or return array is not allowed"
    }

    if !signal.args.allSatisfy({ $0.isNullable == false }) || signal.returns.isNullable == true {
        return "// Warning: signal \(signal.name) is ignored because of argument or return nullability is not allowed"
    }
