From: Allison N. <dem...@ma...> - 2008-08-04 13:44:59
|
Hi everyone, OK, for those that don't religiously follow cocoadev, I just asked a question over there about how to stop my Mac from going to sleep. The response was not exactly... ideal from the point of view of a RubyCocoa developer. Apparently the answer is to use the following: UpdateSystemActivity(OverallAct); Which is a pure C function call, with the prototype being found in power.h My question is: How do I best go about integrating this into a RubyCocoa app. I have previously written C Extensions to Ruby, but that doesn't seem to be a particularly flexible/reuseable solution. What is considered the best way of accessing this type of code, or better yet, has anyone already exposed this functionality for RubyCocoa? Thanks in advance for any help/guidance. Alli |