mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
Initial commit!
This commit is contained in:
21
libami/broker.c
Normal file
21
libami/broker.c
Normal 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));
|
||||
}
|
||||
Reference in New Issue
Block a user