Initial commit!

This commit is contained in:
reddsik
2017-03-26 13:00:19 +02:00
commit c85716f60e
90 changed files with 28790 additions and 0 deletions

21
libami/broker.c Normal file
View File

@@ -0,0 +1,21 @@
#include <stdio.h>
#include <stdlib.h>
#include "libami.h"
#include "module.h"
extern void (*md_broker_func)(XEvent *, unsigned long);
int cx_broker(unsigned long mask, void (*callback)(XEvent *, unsigned long))
{
md_broker_func=callback;
return md_command0(md_root, MCMD_SET_BROKER, &mask, sizeof(mask));
}
int cx_send_event(unsigned long mask, XEvent *e)
{
struct mcmd_event me;
me.mask=mask;
me.event=*e;
return md_command0(md_root, MCMD_SEND_EVENT, &me, sizeof(me));
}