Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

modified: ev.lua

  • Loading branch information...
commit 90e123ea16426e5626fa0f639c859c91a7f34575 1 parent a033592
@Wiladams authored
Showing with 19 additions and 2 deletions.
  1. +19 −2 ev.lua
View
21 ev.lua
@@ -2,7 +2,9 @@
--
-- 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')
@@ -11,8 +13,23 @@ local bit = require("bit")
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[[
/* eventmask, revents, events... */
Please sign in to comment.
Something went wrong with that request. Please try again.