Skip to content

Commit

Permalink
Merge pull request #2 from kwhat/master
Browse files Browse the repository at this point in the history
Merging 12th of January 2015
  • Loading branch information
munsuri committed Jan 12, 2015
2 parents 92635ce + 6836a65 commit 943bc2a
Show file tree
Hide file tree
Showing 32 changed files with 169 additions and 73 deletions.
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/nbproject/
/nbproject/
/build/
/autom4te.cache/
/config/
/include/config.h.in*
/m4/ltoptions.m4
/m4/ltversion.m4
/m4/libtool.m4
/m4/ltsugar.m4
/m4/lt~obsolete.m4
/Makefile.in
/configure
/aclocal.m4
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
libuiohook
==========

A C library to provide global keyboard and mouse hooks.
A multi-platform C library to provide global input/ouput hooking from userland.

## Compiling
Prerequisites: pkg-config, libtool, gcc/clang/msys2-mingw32

./bootstrap.sh
./configure
make && make install

## Useage
* [Hook Demo](https://github.com/kwhat/libuiohook/blob/master/src/demo_hook.c)
* [Async Hook Demo](https://github.com/kwhat/libuiohook/blob/master/src/demo_hook_async.c)
* [Event Post Demo](https://github.com/kwhat/libuiohook/blob/master/src/demo_post.c)
* [Properties Demo](https://github.com/kwhat/libuiohook/blob/master/src/demo_properties.c)
* [Public Interface](https://github.com/kwhat/libuiohook/blob/master/include/uiohook.h)
* Please see the man pages for function documentation.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
m4_define([UIOHOOK_MAJOR], [1])
m4_define([UIOHOOK_MINOR], [0])
m4_define([UIOHOOK_PATCH], [0])
m4_define([UIOHOOK_RC], [_RC5])
m4_define([UIOHOOK_RC], [])
m4_define([UIOHOOK_BUGS], [alex@1stleg.com])
m4_define([UIOHOOK_VERSION_STRING], UIOHOOK_MAJOR[.]UIOHOOK_MINOR[.]UIOHOOK_PATCH[]UIOHOOK_RC)

Expand Down
5 changes: 4 additions & 1 deletion include/uiohook.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -50,14 +50,17 @@
#define UIOHOOK_ERROR_CREATE_OBSERVER 0x44
/* End Error Codes */

/* Begin Log Levels and Function Prototype */
typedef enum _log_level {
LOG_LEVEL_DEBUG = 1,
LOG_LEVEL_INFO,
LOG_LEVEL_WARN,
LOG_LEVEL_ERROR
} log_level;

// Logger callback function prototype.
typedef bool (*logger_t)(unsigned int, const char *, ...);
/* End Log Levels and Function Prototype */

/* Begin Virtual Event Types and Data Structures */
typedef enum _event_type {
Expand Down
2 changes: 1 addition & 1 deletion man/hook_get_auto_repeat_rate.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Copyright 2006-2014 Alexander Barker (alex@1stleg.com)
.\" Copyright 2006-2015 Alexander Barker (alex@1stleg.com)
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion man/hook_run.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Copyright 2006-2014 Alexander Barker (alex@1stleg.com)
.\" Copyright 2006-2015 Alexander Barker (alex@1stleg.com)
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" libUIOHook is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions man/hook_set_dispatch_proc.man
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Copyright 2006-2014 Alexander Barker (alex@1stleg.com)
.\" Copyright 2006-2015 Alexander Barker (alex@1stleg.com)
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" libUIOHook is free software: you can redistribute it and/or modify
Expand All @@ -15,7 +15,7 @@
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
.\" %%%LICENSE_END
.\"
.TH hook_get_auto_repeat_rate 3 "07 July 2014" "Version 1.0" "libUIOHook Programmer's Manual"
.TH hook_set_dispatch_proc 3 "07 July 2014" "Version 1.0" "libUIOHook Programmer's Manual"
.SH NAME
hook_set_dispatch_proc \- Set the event callback function
.SH SYNTAX
Expand Down
4 changes: 2 additions & 2 deletions src/copyright.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -29,7 +29,7 @@
#include <stdio.h>
#define COPYRIGHT() fprintf(stdout, \
"libUIOHook: Cross-platfrom userland keyboard and mouse hooking.\n" \
"Copyright (C) 2006-2014 Alexander Barker. All Rights Received.\n" \
"Copyright (C) 2006-2015 Alexander Barker. All Rights Received.\n" \
"https://github.com/kwhat/libuiohook/\n" \
"\n" \
"libUIOHook is free software: you can redistribute it and/or modify\n" \
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/input_helper.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/input_helper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/input_hook.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/post_event.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
3 changes: 2 additions & 1 deletion src/darwin/system_properties.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -37,6 +37,7 @@
#include "logger.h"
#include "input_helper.h"

// FIXME Implement properly for multihead setup.
UIOHOOK_API screen_data* hook_get_screen_info(uint8_t *count) {
// FIXME This needs to be implemented correctly for Multi-Head!
*count = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/demo_hook.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/demo_hook_async.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/demo_post.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/demo_properties.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/logger.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/logger.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/windows/input_helper.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion src/windows/input_helper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* libUIOHook: Cross-platfrom userland keyboard and mouse hooking.
* Copyright (C) 2006-2014 Alexander Barker. All Rights Received.
* Copyright (C) 2006-2015 Alexander Barker. All Rights Received.
* https://github.com/kwhat/libuiohook/
*
* libUIOHook is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 943bc2a

Please sign in to comment.