Revision
189
Author
gstaplin@apple.com
Date
2009-02-19 19:37:50 -0800 (Thu, 19 Feb 2009)

Log Message

Add an event_mask to the apple_glx_pbuffer structure.

Add the getters and setters for that event mask.

Modified Paths

Diff

Modified: AppleSGLX/trunk/apple_glx_pbuffer.c (188 => 189)


--- AppleSGLX/trunk/apple_glx_pbuffer.c	2009-02-20 03:37:08 UTC (rev 188)
+++ AppleSGLX/trunk/apple_glx_pbuffer.c	2009-02-20 03:37:50 UTC (rev 189)
@@ -38,6 +38,7 @@
     int width, height;
     GLint fbconfigID;
     CGLPBufferObj buffer_obj;
+    unsigned long event_mask;    
     struct apple_glx_pbuffer *previous, *next;
 };
 
@@ -140,6 +141,8 @@
 
     pbuf->fbconfigID = modes->fbconfigID;
 
+    pbuf->event_mask = 0;
+
     *result = pbuf->xid;
 
     /* Link the pbuffer into the list. */
@@ -318,3 +321,25 @@
 
     return result;
 }
+
+bool apple_glx_pbuffer_set_event_mask(GLXDrawable d, unsigned long mask) {
+    struct apple_glx_pbuffer *pbuf;
+
+    if(find_pbuffer(d, &pbuf)) {
+	pbuf->event_mask = mask;
+	return true;
+    }
+
+    return false;
+}
+
+bool apple_glx_pbuffer_get_event_mask(GLXDrawable d, unsigned long *mask) {
+    struct apple_glx_pbuffer *pbuf;
+
+    if(find_pbuffer(d, &pbuf)) {
+	*mask = pbuf->event_mask;
+	return true;
+    }
+    
+    return false;
+}