             }
         }
 
-        "public extension \(record.name.swift) {"
+        "public extension \(record.protocolName) {"
         Code.block {
             Code.loop(over: record.signals.filter { signalSanityCheck($0) == nil }) { signal in
-                
+
                 commentCode(signal)
                 "/// - Note: This function represents signal `\(signal.name)`"
                 "/// - Parameter flags: Flags"

    func swiftIdiomaticType() -> String {
        switch knownType {
        case is GIR.Record:
            return typeRef.type.swiftName + "Ref"
        case let type as GIR.Alias: // use containedTypes
            return ""
        case is GIR.Bitfield:
            return self.argumentTypeName
        case is GIR.Enumeration:
            return self.argumentTypeName
        default: // Treat as fundamental (if not a fundamental, report error)
            return self.swiftReturnRef.fullSwiftTypeName
        }
    }
    
    func swiftCCompatibleType() -> String {
        switch knownType {
        case is GIR.Record:
            return GIR.gpointerType.typeName
        case let type as GIR.Alias: // use containedTypes
            return ""
        case is GIR.Bitfield:
            return GIR.uint32Type.typeName
        case is GIR.Enumeration:
            return GIR.uint32Type.typeName
        default: // Treat as fundamental (if not a fundamental, report error)
            return self.callbackArgumentTypeName
        }

    
    return Code.block(indentation: nil) {
        
        "// MARK: Signals of \(record.name.swift)"

        Code.block {
            Code.loop(over: record.signals.compactMap({ signalSanityCheck($0) })) { error in
