let you retrieve the Window for a surface
authorDana Jansens <danakj@orodu.net>
Mon, 26 May 2003 16:50:54 +0000 (16:50 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 26 May 2003 16:50:54 +0000 (16:50 +0000)
render2/render.h
render2/surface.c

index 1eb682ca7b9f5607442a2dc1ab8650d43839ac52..8c0611ca6594c09cd379a9e4d8043b01edbf7369 100644 (file)
@@ -132,6 +132,7 @@ struct RrSurface *RrSurfaceCopyChild(struct RrSurface *sur,
                                      struct RrSurface *parent);
 void RrSurfaceFree(struct RrSurface *sur);
 
+Window RrSurfaceWindow(struct RrSurface *sur);
 struct RrTexture *RrSurfaceTexture(struct RrSurface *sur, int texnum);
 
 #endif
index 37f7a040dbf0845e6aeb404ec8dcc82052569093..ab265ef740432c582b0a10a9f2067c9eb5180da5 100644 (file)
@@ -62,7 +62,7 @@ struct RrSurface *RrSurfaceNewChild(enum RrSurfaceType type,
 {
     struct RrSurface *sur;
 
-    /* cant be a child of a prototype! */
+    /* can't be a child of a prototype! */
     assert(parent->inst);
     if (!parent->inst) return NULL;
 
@@ -115,7 +115,7 @@ struct RrSurface *RrSurfaceCopyChild(struct RrSurface *orig,
 {
     struct RrSurface *sur;
 
-    /* cant be a child of a prototype! */
+    /* can't be a child of a prototype! */
     assert(parent->inst);
     if (!parent->inst) return NULL;
 
@@ -137,6 +137,15 @@ void RrSurfaceFree(struct RrSurface *sur)
     }
 }
 
+Window RrSurfaceWindow(struct RrSurface *sur)
+{
+    /* can't get a window for a prototype */
+    assert(sur->inst);
+    if (!sur->inst) return None;
+
+    return sur->win;
+}
+
 struct RrTexture *RrSurfaceTexture(struct RrSurface *sur, int texnum)
 {
     assert(texnum < sur->ntextures);