graphicscomposition/openwfcompositionengine/composition/src/wfcscene.c
branchRCL_3
changeset 19 bbf46f59e123
parent 0 5d03bc08d59c
child 20 25ffed67c7ef
equal deleted inserted replaced
18:57c618273d5c 19:bbf46f59e123
     1 /* Copyright (c) 2009 The Khronos Group Inc.
     1 /* Copyright (c) 2009-2010 The Khronos Group Inc.
       
     2  * Portions copyright (c) 2009-2010  Nokia Corporation and/or its subsidiary(-ies)
     2  *
     3  *
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * without limitation the rights to use, copy, modify, merge, publish,
   127 /*----------------------------------------------------------------------------*/
   128 /*----------------------------------------------------------------------------*/
   128 OWF_API_CALL WFC_SCENE*
   129 OWF_API_CALL WFC_SCENE*
   129 WFC_Scene_Create(WFC_CONTEXT* context)
   130 WFC_Scene_Create(WFC_CONTEXT* context)
   130 {
   131 {
   131     WFC_SCENE*              scene;
   132     WFC_SCENE*              scene;
   132 
   133 	
   133     DPRINT(("WFC_Scene_Create"));
   134 	DPRINT(("WFC_Scene_Create"));
       
   135 	
       
   136 	OWF_ASSERT(context);
       
   137 	
   134     scene = SCENE(OWF_Pool_GetObject(context->scenePool));
   138     scene = SCENE(OWF_Pool_GetObject(context->scenePool));
   135 
   139 
   136     OWF_ASSERT(scene);
   140     OWF_ASSERT(scene);
   137 
   141 
   138     ADDREF(scene->context, context);
   142     ADDREF(scene->context, context);
   445     {
   449     {
   446         element = ELEMENT(scene->elements->data)->handle;
   450         element = ELEMENT(scene->elements->data)->handle;
   447     }
   451     }
   448     return element;
   452     return element;
   449 }
   453 }
       
   454 
       
   455 /*----------------------------------------------------------------------------*/
       
   456 OWF_API_CALL WFC_ELEMENT*
       
   457 WFC_Scene_TopMostElement(WFC_SCENE* scene)
       
   458 {
       
   459     OWF_NODE*               node = NULL;
       
   460 
       
   461     for (node = scene->elements; node && node->next; node = node->next)
       
   462     {
       
   463         /* All work done in the for statement, so no body */
       
   464     }
       
   465     
       
   466     return node ? ELEMENT(node->data) : NULL;
       
   467 }