def collect_defines(file_name):
    """
    Collect all XCB defines from file.
    """
    defines = []
    with open(file_name, "r") as f:
        for line in f.readlines():
            line = line.strip()
            if not line.startswith("#define XCB"):
                continue
            defines.append(line)
    return defines