Skip to content

Commit

Permalink
modified: ev.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Wiladams committed Oct 30, 2012
1 parent a033592 commit 90e123e
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions ev.lua
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
-- --
-- uses almost-identical API to lua-ev (https://github.com/brimworks/lua-ev) -- uses almost-identical API to lua-ev (https://github.com/brimworks/lua-ev)
-- --
-- Author: Evan Wies <evan@neomantra.net> -- Borrowed Heavily From: Evan Wies <evan@neomantra.net>
--
-- Enhanced By: William Adams <williamaadams.wordpress.com>
-- --


local ffi = require('ffi') local ffi = require('ffi')
Expand All @@ -11,8 +13,23 @@ local bit = require("bit")
local band, bor = bit.band, bit.bor local band, bor = bit.band, bit.bor




ffi.cdef[[
static const int EV_FEATURES = 0x7f;

static const int EV_FEATURE_CODE = ((EV_FEATURES) & 1);
static const int EV_FEATURE_DATA = ((EV_FEATURES) & 2);
static const int EV_FEATURE_CONFIG = ((EV_FEATURES) & 4);
static const int EV_FEATURE_API = ((EV_FEATURES) & 8);
static const int EV_FEATURE_WATCHERS = ((EV_FEATURES) & 16);
static const int EV_FEATURE_BACKENDS = ((EV_FEATURES) & 32);
static const int EV_FEATURE_OS = ((EV_FEATURES) & 64);
]]

ffi.cdef[[
static const int EV_VERSION_MAJOR = 4;
static const int EV_VERSION_MINOR = 11;
]]


-- extracted from preprocessing <ev.h>
ffi.cdef[[ ffi.cdef[[


/* eventmask, revents, events... */ /* eventmask, revents, events... */
Expand Down

0 comments on commit 90e123e

Please sign in to comment.