O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Events

You interact with kqueues using kevents, which describe which entities and filters you are interested in. struct kevent works on all Mac OS X systems starting with 10.3:

s​t​r​u​c​t​ ​k​e​v​e​n​t​ ​{​ ​ ​ ​ ​u​i​n​t​p​t​r​_​t​ ​ ​ ​ ​ ​i​d​e​n​t​;​ ​ ​ ​ ​ ​ ​ ​/​*​ ​i​d​e​n​t​i​f​i​e​r​ ​f​o​r​ ​t​h​i​s​ ​e​v​e​n​t​ ​*​/​ ​ ​ ​ ​i​n​t​1​6​_​t​ ​ ​ ​ ​ ​ ​ ​f​i​l​t​e​r​;​ ​ ​ ​ ​ ​ ​/​*​ ​f​i​l​t​e​r​ ​f​o​r​ ​e​v​e​n​t​ ​*​/​ ​ ​ ​ ​u​i​n​t​1​6​_​t​ ​ ​ ​ ​ ​ ​f​l​a​g​s​;​ ​ ​ ​ ​ ​ ​ ​/​*​ ​g​e​n​e​r​a​l​ ​f​l​a​g​s​ ​*​/​ ​ ​ ​ ​u​i​n​t​3​2​_​t​ ​ ​ ​ ​ ​ ​f​f​l​a​g​s​;​ ​ ​ ​ ​ ​ ​/​*​ ​f​i​l​t​e​r​-​s​p​e​c​i​f​i​c​ ​f​l​a​g​s​ ​*​/​ ​ ​ ​ ​i​n​t​p​t​r​_​t​ ​ ​ ​ ​ ​ ​d​a​t​a​;​ ​ ​ ​ ​ ​ ​ ​ ​/​*​ ​f​i​l​t​e​r​-​s​p​e​c​i​f​i​c​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required