Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.7 KiB

  1. #ifndef YAJL_DUMPS_H_
  2. #define YAJL_DUMPS_H_
  3. #include <string.h>
  4. #include <yajl/yajl_gen.h>
  5. #define YSTR(str) yajl_gen_string(gen, (unsigned char *)str, strlen(str))
  6. #define YINT(num) yajl_gen_integer(gen, num)
  7. #define YDOUBLE(num) yajl_gen_double(gen, num)
  8. #define YBOOL(v) yajl_gen_bool(gen, v)
  9. #define YNULL() yajl_gen_null(gen)
  10. #define YARR(body) \
  11. { \
  12. yajl_gen_array_open(gen); \
  13. body; \
  14. yajl_gen_array_close(gen); \
  15. }
  16. #define YMAP(body) \
  17. { \
  18. yajl_gen_map_open(gen); \
  19. body; \
  20. yajl_gen_map_close(gen); \
  21. }
  22. int dump_tag(yajl_gen gen, const char *name, const int tag_mask);
  23. int dump_tags(yajl_gen gen, int tags_len);
  24. int dump_client(yajl_gen gen, Client *c);
  25. int dump_monitor(yajl_gen gen, Monitor *mon, int is_selected);
  26. int dump_monitors(yajl_gen gen, Monitor *mons, Monitor *selmon);
  27. int dump_layouts(yajl_gen gen, const Layout layouts[], const int layouts_len);
  28. int dump_tag_state(yajl_gen gen, TagState state);
  29. int dump_tag_event(yajl_gen gen, int mon_num, TagState old_state,
  30. TagState new_state);
  31. int dump_client_focus_change_event(yajl_gen gen, Client *old_client,
  32. Client *new_client, int mon_num);
  33. int dump_layout_change_event(yajl_gen gen, const int mon_num,
  34. const char *old_symbol, const Layout *old_layout,
  35. const char *new_symbol, const Layout *new_layout);
  36. int dump_monitor_focus_change_event(yajl_gen gen, const int last_mon_num,
  37. const int new_mon_num);
  38. int dump_focused_title_change_event(yajl_gen gen, const int mon_num,
  39. const Window client_id,
  40. const char *old_name, const char *new_name);
  41. int dump_client_state(yajl_gen gen, const ClientState *state);
  42. int dump_focused_state_change_event(yajl_gen gen, const int mon_num,
  43. const Window client_id,
  44. const ClientState *old_state,
  45. const ClientState *new_state);
  46. int dump_error_message(yajl_gen gen, const char *reason);
  47. #endif // YAJL_DUMPS_H_