2 * Copyright (c) 2020 Omar Polo <op@omarpolo.com>
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef STAR_PLATINUM_H
18 #define STAR_PLATINUM_H
20 /* XXX: why I need to define this to get XK_space/...?
21 * is this a bad idea? there is another way? */
31 unsigned int modifier;
49 void do_action(struct action, Window, int);
59 struct match *new_match(int, char*);
60 void recfree_match(struct match*);
61 int match_window(struct match*, Window);
69 struct rule *new_rule(struct key, struct action);
70 void recfree_rule(struct rule*);
71 int rule_matched(struct rule*, struct key);
74 struct match *matches;
79 extern struct group *config;
81 struct group *new_group(struct match*, struct rule*);
82 void recfree_group(struct group*);
83 void process_event(struct group*, XKeyEvent*);
84 int group_match(struct group*, Window);
87 int error_handler(Display*, XErrorEvent*);
88 void grabkey(struct key);
89 KeySym keycode_to_keysym(unsigned int);
90 Window focused_window();
91 void send_fake(Window, struct key, int);
92 int window_match_class(Window, const char*);
95 void printkey(struct key);
96 void printaction(struct action);
97 void printmatch(struct match*);
98 void printrule(struct rule*);
99 void printgroup(struct group*);
101 #endif /* STAR_PLATINUM_H */