compose-iter.h 771 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright © 2022 Ran Benita <ran@unusedvar.com>
  3. * SPDX-License-Identifier: MIT
  4. */
  5. #pragma once
  6. #include "config.h"
  7. #include "src/compose/table.h"
  8. /**
  9. * The iterator function type used by xkb_compose_table_for_each().
  10. */
  11. typedef void
  12. (*xkb_compose_table_iter_t)(struct xkb_compose_table_entry *entry,
  13. void *data);
  14. /**
  15. * Run a specified function for every valid entry in the table.
  16. *
  17. * The entries are returned in lexicographic order of the left-hand
  18. * side of entries. This does not correspond to the order in which
  19. * the entries appear in the Compose file.
  20. */
  21. void
  22. xkb_compose_table_for_each(struct xkb_compose_table *table,
  23. xkb_compose_table_iter_t iter,
  24. void *data);