dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

yajl_dumps.h (2793B)


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